Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 1872f1a

Browse files
committed
🚀 Initial Commit 20 Sep 2018
0 parents  commit 1872f1a

File tree

6,851 files changed

+311786
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

6,851 files changed

+311786
-0
lines changed

extract/ABCS2014/.contest

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"announcements": "Contest ended. <br> Thanks to all the participants who made our Abacus OPC as a grand success. <br> Congratulations to the winners.<br>\r\n1.Rajagopal Srinivasan<br>2.Jai Vasanth<br>3.con_nha_ngheo<br>\r\n<br>\r\nSave the Hacker will take place at CEG, Anna University in Chennai on March 22, 2014.<br>\r\nWinners will get cash prizes worth <b><em>Rs. 50,000</em></b> and a chance at building a career at Freshdesk.<br>\r\nTo know more and to register: <a href=\"http://www.savethehacker.com/abacus/\" > save the hacker </a> <br>\r\n<br>\r\nContest Duration is extended by 30 minutes. <br>\r\n<br>\r\nGuys for the Grand staircase prob do look at the string and the output surely you will get an idea!!<br><br>\r\nMore Testcases for grand staircase:<br>\r\nInput:<br>\r\n1<br>\r\nabcba<br>\r\nOutput:<br>\r\n0<br>\r\nExplanation:<br>\r\na will form a set 5,1<br>\r\nb will form a set 4,2<br>\r\nc will form a set 3<br>\r\nso after re-arranging we ll get 5,1,4,2,3,4,2,5,1<br>\r\nthey will pick stair set 1,2,3,4,5 so they are having enough stairs<br>\r\nto form a valid staircase and so the anwer is 0<br>\r\nTestcase for Grand Staircase:<br>\r\n<br>\r\nInput:<br>\r\n3<br>\r\nabc<br>\r\nacc<br>\r\naba<br>\r\n<br>\r\nOutput:<br>\r\n2<br>\r\n1<br>\r\n0<br>\r\nIn the flappy bird question, there is a correction for the constraints. <br>\r\nThe x values are given in non-decreasing order and not the y-values as stated. <br>\r\n<br>\r\nMore test case for Pipes:<br>\r\nInput:<br>\r\n2<br>\r\n2 3<br>\r\n3 4 5<br>\r\n6 5 4<br>\r\n2 3<br>\r\n1 1 1<br>\r\n2 3 11 <br>\r\n<br>\r\nOutput: <br>\r\n-1 <br>\r\n-1<br>\r\n<br>",
3+
"ip": "149.129.135.113",
4+
"code": "ABCS2014",
5+
"duration": "210",
6+
"name": "aBaCUS'14",
7+
"is_contest_elements_visible": true,
8+
"rank_and_score": null,
9+
"is_flexi_time_contest": false,
10+
"partial_scores": [],
11+
"rules": "<div><b>Rules and Regulations:</b></div> <div> <ul> <li>Contest problems will become visible on 15th March, 2014 at 20:00 HRS (IST) and end at 15th March, 2014 at 23:00 HRS (IST). Check your timezone <a href=\"http://www.timeanddate.com/worldclock/fixedtime.html?msg=CodeChef%3A+aBaCUS%2714&amp;iso=20140315T20&amp;p1=176&amp;ah=3\">here</a>.</li> <li>Please do not discuss strategy, suggestions or tips in the comments during a live contest. Posting questions clarifying the problem statement is ok. If you are unsure, email us at [email protected].</li> <li>Discussing problems or any aspect of problem, on any other platform on web, on identification, could lead to disabling of respective account and banning from the community.</li> <li>If you do not have a CodeChef ID create one\u00a0<a target=\"_blank\" href=\"http://codechef.com/user/register\">here</a>.</li> <li>Please do not discuss strategy, suggestions or tips in the comments during a live contest. Posting questions clarifying the problem statement is ok.</li> <li>Almost all languages supported on CodeChef are allowed.</li> <li>Each program will be tested based on our critical test data. However output and input should be exactly as specified in the samples provided.</li> <li>All participants are expected to abide by the\u00a0<a href=\"http://discuss.codechef.com/questions/18662/does-codechef-have-any-code-of-conduct\" target=\"_blank\">CodeChef Code Of Conduct</a></li> <li>Please contact\u00a0<span><a target=\"_blank\" href=\"mailto:[email protected]\">[email protected]</a></span> for any queries during the contest.</li> </ul> </div> <div><b>Judging Criteria:</b> <ul> <li>All the problems have same points alloted to them.</li> <li>Users are ranked according to the most problems solved. Ties will be broken by the total time for each user in ascending order of time.</li> <li>The decision of the organizers in declaring the results will be final. No queries in this regard will be entertained.</li> <li>Any participant found to be indulging in any form of malpractice will be immediately disqualified.</li> <li>The total time is the sum of the time consumed for each problem solved. The time consumed for a solved problem is the time elapsed from the beginning of the contest to the submission of the first accepted run plus 20 penalty minutes for every previously rejected run for that problem(Wrong answer, Time limit exceeded, Runtime Error, Compilation Error). There is no time consumed for a problem that is not solved.</li> </ul> </div>",
12+
"problemsstats": {
13+
"partially_solved": [],
14+
"solved": [],
15+
"attempted": []
16+
},
17+
"is_OTP_required": false,
18+
"banner": "/sites/default/files/uploads/landing_page_banners/banner-compete.jpg",
19+
"isRanklistFrozen": false,
20+
"todos": [],
21+
"autoRefresh": true,
22+
"status": "success",
23+
"is_registration_enabled_contest": false,
24+
"problems": {
25+
"ABA14E": {
26+
"allow_submission": false,
27+
"name": "Grand Staircase",
28+
"category_name": "main",
29+
"accuracy": 10,
30+
"successful_submissions": "2",
31+
"code": "ABA14E",
32+
"type": "0",
33+
"is_direct_submittable": false
34+
},
35+
"ABA14B": {
36+
"allow_submission": false,
37+
"name": "Chain Reaction",
38+
"category_name": "main",
39+
"accuracy": 36.88,
40+
"successful_submissions": "95",
41+
"code": "ABA14B",
42+
"type": "0",
43+
"is_direct_submittable": false
44+
},
45+
"ABA14A": {
46+
"allow_submission": false,
47+
"name": "Help Ram",
48+
"category_name": "main",
49+
"accuracy": 15.07,
50+
"successful_submissions": "149",
51+
"code": "ABA14A",
52+
"type": "0",
53+
"is_direct_submittable": false
54+
},
55+
"ABA14C": {
56+
"allow_submission": false,
57+
"name": "Flappy Bird",
58+
"category_name": "main",
59+
"accuracy": 0,
60+
"successful_submissions": 0,
61+
"code": "ABA14C",
62+
"type": "0",
63+
"is_direct_submittable": false
64+
},
65+
"ABA14F": {
66+
"allow_submission": false,
67+
"name": "Super Mario",
68+
"category_name": "main",
69+
"accuracy": 0,
70+
"successful_submissions": 0,
71+
"code": "ABA14F",
72+
"type": "0",
73+
"is_direct_submittable": false
74+
},
75+
"ABA14D": {
76+
"allow_submission": false,
77+
"name": "Pipes",
78+
"category_name": "main",
79+
"accuracy": 0,
80+
"successful_submissions": 0,
81+
"code": "ABA14D",
82+
"type": "0",
83+
"is_direct_submittable": false
84+
}
85+
},
86+
"stats": null,
87+
"is_a_parent_contest": false,
88+
"time": {
89+
"end": 1394906400,
90+
"current": 1537437697,
91+
"freezing": 0,
92+
"start": 1394893800
93+
},
94+
"user": {
95+
"username": ""
96+
}
97+
}

extract/ABCS2014/ABA14A/.problem

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"status": "success",
3+
"problem_status": "unattempted",
4+
"problem_tester": null,
5+
"body": "<span class=\"solution-visible-txt\">All submissions for this problem are available.</span><p>\n<a href=\"https://www.facebook.com/ramkumar.sundaravadivel?fref=ts&amp;ref=br_tf\">Ramkumar</a> loves to solve riddles one day <a href=\"http://www.spoj.com/users/sathyaceg/\">SpojSathya</a>gave him a riddle to solve.<br />\n<a href=\"https://www.facebook.com/sathyanarayanan.ganesan.37?fref=ts&amp;ref=br_tf\">Sathya</a> will give him pair of integers a and b. Ramkumar has to find the largest<br />\nnumber in the range [a,b] inclusive which can be represented as product of atleast two prime numbers. But ramkumar is busy in watching \"Arrow\" he is asking your help. Help him to find the largest such number in that range. </p>\n<p><br /><br />\n<b>Input format</b>:<br />\n<br /></p>\n<p>\tThe first line will have a integer T. <br /><br />\n\tNext T lines will have a pair of numbers a and b. <br /><br /></p>\n<p><b>Output format:</b> <br /></p>\n<p>\tFor each testcase print in a single line the largest number in the range that<br />\nsatisfies the above condition else if you can't find such number print \"-1\".<br />\n<br /><br /><br />\n<b>Constraints: </b><br /></p>\n<p>\t1&lt;=T&lt;=100 (for each testcase file) <br /><br />\n\t2&lt;=a&lt;=b&lt;=10^12 <br /><br /></p>\n<p><b>Sample Input:</b> <br /></p>\n<p>\t2<br /><br />\n\t5 11<br /><br />\n\t7 35<br /><br /><br />\n<b>Sample Output:</b><br /><br />\n\t10 <br /><br />\n\t35<br /></p>\n",
6+
"category_name": "main",
7+
"user": {
8+
"username": ""
9+
},
10+
"date_added": "14-03-2014",
11+
"is_direct_submittable": false,
12+
"contest_name": "aBaCUS'14",
13+
"languages_supported": "C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS",
14+
"todo": false,
15+
"time": {
16+
"view_start_date": 1394893800,
17+
"end_date": 1394906400,
18+
"practice_submission_allowed": true,
19+
"visible_start_date": 1394906400,
20+
"submit_start_date": 1394893800,
21+
"current": 1537437700
22+
},
23+
"problem_author_html_handle": "abacus_opc",
24+
"problem_name": "Help Ram",
25+
"source_sizelimit": "50000",
26+
"tags": "<a class='problem-tag-small ' href='/tags/problems/abacus_opc'>abacus_opc</a>",
27+
"problem_tester_html_handle": "",
28+
"problem_author": "abacus_opc",
29+
"contest_code": "ABCS2014",
30+
"max_timelimit": "1",
31+
"problem_code": "ABA14A"
32+
}

extract/ABCS2014/ABA14B/.problem

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"status": "success",
3+
"problem_status": "unattempted",
4+
"problem_tester": null,
5+
"body": "<span class=\"solution-visible-txt\">All submissions for this problem are available.</span><p>\u00a0</p>\n<p>You get bored sometimes and love to play the game Chain reaction. This game is played upon a board of size RxC. Initially, the board is empty. In each turn, you can place an atom in any cell you want. After each turn, if the number of atoms in a cell becomes greater than 3, it will explode and one atom will spread to each of the four sides. If any other atoms remain( ie no of atoms > 4), it remains in the same cell. As you can see, this will create a chain reaction if the adjacent cells contain 3 atoms already.</p>\n<p>\u00a0If explosion occurs at edge cells or corner cells, some atoms are lost permanently. This also makes sure that the board will always reach a stable state after some number of explosions. </p>\n<p> You will be given the board size and the state of the board after some moves. Next you will make N moves. Write a program that prints the final stable state of the board after N moves.\n</p>\n<h3>Input</h3>\n<p>First line contains the number of test cases T.<br /><br />\nFirst line of each test case will have 2 integers R and C, R is the row size, C is the column size.<br /><br />\nThen R lines follow, each line containing C integers, denoting the number of atoms at that cell.<br /><br />\nNext line will have a single integer N , the number of moves that you make<br />\nN lines follow, each containing two integers, x and y denoting the cell (x, y) where you add a new atom.\n</p>\n<p>\u00a0</p>\n<h3>Output</h3>\n<p>For each test case print the final state of the board.<br /><br />\nIt must contain R lines, each having C space separated integers. </p>\n<p>\u00a0</p>\n<h3>Constraints</h3>\n<p>1&lt;=T&lt;=100<br /><br />\n2&lt;=R&lt;=20 , 2&lt;=C&lt;=20<br /><br />\nNumber of atoms in each cell will be less than 4. <br /><br />\n0&lt;=x<R , 0&lt;=y<C<br><br />\n1&lt;=N&lt;=1000<br />\n</r></p>\n<h3>Example</h3>\n<p><b>Input:</b></p>\n<p>1<br /><br />\n5 5<br /><br />\n0 0 0 0 0 <br /><br />\n0 0 3 0 0<br /><br />\n0 3 3 3 0<br /><br />\n0 0 3 0 0<br /><br />\n0 0 0 0 0<br /><br />\n2<br /><br />\n2 2<br /><br />\n0 0<br />\n</p>\n<p><br /><br />\n<b>Output:</b></p>\n<p>\u00a01 0 1 0 0<br /><br />\n0 2 1 2 0<br /><br />\n1 1 0 1 1<br /><br />\n0 2 1 2 0<br /><br />\n0 0 1 0 0<br />\n</p>\n<p><br /></p>\n<h3>Explanation</h3>\n<p> After adding the atom to (2, 2), it explodes which will cause all four adjacent cells (1, 2), (2, 1), (2, 3), (3, 2) to explode. This will lead to explosion of the cell (2, 2) for the second time as all those four cells sends back an atom to this cell.<br />\nAfter adding the atom to (0, 0), no explosion occurs.</p>\n",
6+
"category_name": "main",
7+
"user": {
8+
"username": ""
9+
},
10+
"date_added": "14-03-2014",
11+
"is_direct_submittable": false,
12+
"contest_name": "aBaCUS'14",
13+
"languages_supported": "C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS",
14+
"todo": false,
15+
"time": {
16+
"view_start_date": 1394893800,
17+
"end_date": 1394906400,
18+
"practice_submission_allowed": true,
19+
"visible_start_date": 1394906400,
20+
"submit_start_date": 1394893800,
21+
"current": 1537437699
22+
},
23+
"problem_author_html_handle": "abacus_opc",
24+
"problem_name": "Chain Reaction",
25+
"source_sizelimit": "50000",
26+
"tags": "<a class='problem-tag-small ' href='/tags/problems/abacus_opc'>abacus_opc</a>",
27+
"problem_tester_html_handle": "",
28+
"problem_author": "abacus_opc",
29+
"contest_code": "ABCS2014",
30+
"max_timelimit": "0.5",
31+
"problem_code": "ABA14B"
32+
}

extract/ABCS2014/ABA14C/.problem

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"status": "success",
3+
"problem_status": "unattempted",
4+
"problem_tester": null,
5+
"body": "<span class=\"solution-visible-txt\">All submissions for this problem are available.</span><p><b>Statement</b><br /><br />\nThe super annoying flappy bird is back! This time it has variations. The distance between each pipe, width of each pipe and the gap width of each pipe is not uniform. Consider the world as a 2D plane, the initial position of the flappy bird is given (x, y) also, for a unit distance horizontally, flappy bird can move at most M distance vertically. There will be N pipes ahead of flappy bird. All the pipes are vertically straight and all the gaps are horizontal. For each pipe four integers x1, x2, y1, y2 are given. x1 and x2 give x-coordinates of the width of the pipe, y1 and y2 give the y-coordinates of the width of the gap. If the bird touches the pipe or the ground, the game is over. You have to find the maximum score that can be obtained considering the bird flies optimally.<br /><br /></p>\n<p><b>Note:</b> <br /><br />\n1. Score is the number of pipes crossed successfully.<br /><br />\n2. All the values are integers, no floating point values are used to represent the points and distance travelled vertically also must be an integer. <br /><br />\n3.Since the value M is the distance it can move atmost vertically, it can choose not to move vertically at all at any instant. </p>\n<p><br /><br /><br />\n<b>Constraints:</b><br /><br />\n1 &lt; T &lt; 100<br /><br />\n0 &lt; x, y &lt;= 10^9<br /><br />\n0 &lt;= x1, x2, y1, y2 &lt;= 10^9; x1 &lt; x2 and y1 &lt; y2<br />\nalso, all the x values are given in non decreasing order. i.e. i-th pipe is always to the right of (i-1)th pipe <br /><br />\n1 &lt;= N &lt;= 1000<br /><br />\n1 &lt;= M &lt;= 10^9<br /><br />\n<br /><br />\n<b>Input</b><br /><br />\nFirst line contains T the number of test cases.<br /><br />\nFor each test case, 1st line contains four integers x, y, M and N.<br /><br />\nN lines follow each containing 4 integers x1, x2, y1, y2<br /><br /></p>\n<p><b>Output:</b><br /><br />\nFor each test case print a single integer, denoting the maximum score that can be obtained followed by a new line. <br /><br /></p>\n<p><b>Sample Input:</b> <br /><br />\n1<br /><br />\n1 2 1 4<br /><br />\n2 4 2 4<br /><br />\n5 7 2 5<br /><br />\n8 9 4 7<br /><br />\n11 12 8 9<br /><br />\n<br /><b>Sample Output:</b><br /><br />\n3<br /><br /></p>\n<p><img border=\"0\" src=\"/download/extimages/6d76ff177e492d69f72d32008b886211.png\" alt=\"Flappy\" width=\"500\" height=\"400\" /></p>\n",
6+
"category_name": "main",
7+
"user": {
8+
"username": ""
9+
},
10+
"date_added": "14-03-2014",
11+
"is_direct_submittable": false,
12+
"contest_name": "aBaCUS'14",
13+
"languages_supported": "C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS",
14+
"todo": false,
15+
"time": {
16+
"view_start_date": 1394893800,
17+
"end_date": 1394906400,
18+
"practice_submission_allowed": true,
19+
"visible_start_date": 1394906400,
20+
"submit_start_date": 1394893800,
21+
"current": 1537437701
22+
},
23+
"problem_author_html_handle": "abacus_opc",
24+
"problem_name": "Flappy Bird",
25+
"source_sizelimit": "50000",
26+
"tags": "<a class='problem-tag-small ' href='/tags/problems/abacus_opc'>abacus_opc</a>",
27+
"problem_tester_html_handle": "",
28+
"problem_author": "abacus_opc",
29+
"contest_code": "ABCS2014",
30+
"max_timelimit": "0.5",
31+
"problem_code": "ABA14C"
32+
}

0 commit comments

Comments
 (0)