{"sample_inputs":"[\"6 3\\n1 1 1 0 1 0\", \"5 2\\n0 0 0 1 0\"]","input_specification":"The first line of the input contains two integers n and a (1\u2009\u2264\u2009a\u2009\u2264\u2009n\u2009\u2264\u2009100)\u00a0\u2014 the number of cities and the index of city where Limak lives. The second line contains n integers t1,\u2009t2,\u2009...,\u2009tn (0\u2009\u2264\u2009ti\u2009\u2264\u20091). There are ti criminals in the i-th city.","src_uid":"4840d571d4ce6e1096bb678b6c100ae5","source_code":"#include\nint main()\n{\nint n,i,j,pos,counter;\nint criminals[100];\ncounter=0;\nscanf(\"%d%d\",&n,&pos);\nfor(i=0;i=0)&&(pos-1+j=0)&&(pos-1+j>=n)&&(criminals[pos-1-j]==1))\ncounter+=1;\nelse if((pos-1-j<0)&&(pos-1+j\nint main()\n{\n long long int c,a,n,m,b,d,e,f;\n scanf(\"%lld%lld%lld%lld\",&n,&m,&a,&b);\n c=n%m;\n d=m-n%m;\n b=b*c;\n a=a*d;\n if(a>b)\n printf(\"%lld\\n\",b);\n else\n printf(\"%lld\\n\",a);\n return 0;\n}\n","sample_outputs":"[\"15\", \"14\", \"0\"]","lang_cluster":"C","notes":"NoteIn the first example organizers can build $$$5$$$ boxes to make the total of $$$14$$$ paying $$$3$$$ burles for the each of them.In the second example organizers can demolish $$$2$$$ boxes to make the total of $$$0$$$ paying $$$7$$$ burles for the each of them.In the third example organizers are already able to distribute all the boxes equally among the delegations, each one get $$$5$$$ boxes.","output_specification":"Output the minimal amount of burles organizers should pay to satisfy all the delegations (i.e. to make the number of the boxes be divisible by $$$m$$$). It is allowed that the final number of the boxes is equal to $$$0$$$.","description":"Berland Football Cup starts really soon! Commentators from all over the world come to the event.Organizers have already built $$$n$$$ commentary boxes. $$$m$$$ regional delegations will come to the Cup. Every delegation should get the same number of the commentary boxes. If any box is left unoccupied then the delegations will be upset. So each box should be occupied by exactly one delegation.If $$$n$$$ is not divisible by $$$m$$$, it is impossible to distribute the boxes to the delegations at the moment.Organizers can build a new commentary box paying $$$a$$$ burles and demolish a commentary box paying $$$b$$$ burles. They can both build and demolish boxes arbitrary number of times (each time paying a corresponding fee). It is allowed to demolish all the existing boxes.What is the minimal amount of burles organizers should pay to satisfy all the delegations (i.e. to make the number of the boxes be divisible by $$$m$$$)?","human_testcases":"[{\"input\": \"9 7 3 8\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"2 7 3 7\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"30 6 17 19\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"500000000001 1000000000000 100 100\\r\\n\", \"output\": [\"49999999999900\"]}, {\"input\": \"1000000000000 750000000001 10 100\\r\\n\", \"output\": [\"5000000000020\"]}, {\"input\": \"1000000000000 750000000001 100 10\\r\\n\", \"output\": [\"2499999999990\"]}, {\"input\": \"42 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000000 1 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"7 2 3 7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"999999999 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999999999 10000000007 100 100\\r\\n\", \"output\": [\"70100\"]}, {\"input\": \"10000000001 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"29 6 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"99999999999 6 100 100\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"1000000000000 7 3 8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"99999999999 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999999999 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17 4 5 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100000000000 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 7 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000000 3 100 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"70 3 10 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 2 5 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"804289377 846930887 78 16\\r\\n\", \"output\": [\"3326037780\"]}, {\"input\": \"1000000000000 9 55 55\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"957747787 424238336 87 93\\r\\n\", \"output\": [\"10162213695\"]}, {\"input\": \"25 6 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"22 7 3 8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10000000000 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999999999 2 10 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"999999999999 2 100 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 3 3 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"99999 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 3 2 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000000000000 13 10 17\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"7 2 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 3 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2 2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 3 5 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"70 4 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 4 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 7 41 42\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"10 3 10 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 5 2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000 3 99 99\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"7 3 100 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 2 100 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000 1 23 33\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"30 7 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"90001 300 100 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"13 4 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000000 6 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"50 4 5 100\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"999 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2 5 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"20 3 3 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3982258181 1589052704 87 20\\r\\n\", \"output\": [\"16083055460\"]}, {\"input\": \"100 3 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"19 10 100 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"23 3 100 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"25 7 100 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 9 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9999999999 2 1 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000 2 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10000 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22 7 1 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100000000000 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18 7 100 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10003 4 1 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3205261341 718648876 58 11\\r\\n\", \"output\": [\"3637324207\"]}, {\"input\": \"8 3 100 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"15 7 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000 1 20 20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16 7 3 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000000000000 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 3 1 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"16 3 1 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"13 4 1 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 4 5 5\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"14 3 1 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 33 100 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22 7 1 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 4 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 4 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"17 4 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 3 100 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"702 7 3 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8 3 1 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2 5 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"99 19 1 7\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"16 3 100 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 34 1 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 33 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"15 4 4 10\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1144108931 470211273 45 79\\r\\n\", \"output\": [\"11993619960\"]}, {\"input\": \"2 3 3 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"29 5 4 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"15 7 1 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 3 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 12 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 2 3 4\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7 3 100 1\\r\\n', 'output': ['1']}, {'input': '7 2 1 2\\r\\n', 'output': ['1']}, {'input': '100000000000 3 1 1\\r\\n', 'output': ['1']}, {'input': '957747787 424238336 87 93\\r\\n', 'output': ['10162213695']}, {'input': '10 12 2 1\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '1 1 1 1\\r\\n', 'output': ['0']}, {'input': '100 3 2 5\\r\\n', 'output': ['4']}, {'input': '10000000001 2 1 1\\r\\n', 'output': ['1']}, {'input': '5 5 2 3\\r\\n', 'output': ['0']}, {'input': '30 6 17 19\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '100 7 1 1\\r\\n', 'output': ['2']}, {'input': '29 5 4 9\\r\\n', 'output': ['4']}, {'input': '25 7 100 1\\r\\n', 'output': ['4']}, {'input': '100 3 5 2\\r\\n', 'output': ['2']}, {'input': '70 4 1 1\\r\\n', 'output': ['2']}]","human_sample_testcases_4":"[{'input': '7 2 100 5\\r\\n', 'output': ['5']}, {'input': '7 3 100 1\\r\\n', 'output': ['1']}, {'input': '70 4 1 1\\r\\n', 'output': ['2']}, {'input': '100 7 1 1\\r\\n', 'output': ['2']}, {'input': '999999999999 10000000007 100 100\\r\\n', 'output': ['70100']}]","human_sample_testcases_5":"[{'input': '1000000000000 3 99 99\\r\\n', 'output': ['99']}, {'input': '15 4 4 10\\r\\n', 'output': ['4']}, {'input': '1000000000000 2 1 1\\r\\n', 'output': ['0']}, {'input': '3205261341 718648876 58 11\\r\\n', 'output': ['3637324207']}, {'input': '10000000001 2 1 1\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":2,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3000\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"8551308e5ff435e0fc507b89a912408a","source_code":"#include\nint main()\n{\n\tlong long int i,j,n,l,a,k;\n\tscanf(\"%lld\",&n);\n\tk=2520;\n\ta=n\/k;\n\tprintf(\"%lld\\n\",a);\n\treturn 0;\n}","sample_outputs":"[\"1\"]","lang_cluster":"C","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.","description":"IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is divisible by all numbers from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"3000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2520\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"124666\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"285032471610732\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"396825396825396\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"391926317950225\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"1440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2521\\r\\n', 'output': ['1']}, {'input': '2520\\r\\n', 'output': ['1']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}]","human_sample_testcases_2":"[{'input': '3000\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}]","human_sample_testcases_3":"[{'input': '504000000000000000\\r\\n', 'output': ['200000000000000']}, {'input': '2521\\r\\n', 'output': ['1']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}]","human_sample_testcases_4":"[{'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '314159265\\r\\n', 'output': ['124666']}]","human_sample_testcases_5":"[{'input': '2520\\r\\n', 'output': ['1']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '3628800\\r\\n', 'output': ['1440']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":3,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 6 2 2\", \"1 9 1 2\"]","input_specification":"The first line of the input contains four integers d, L, v1, v2 (1\u2009\u2264\u2009d,\u2009L,\u2009v1,\u2009v2\u2009\u2264\u200910\u2009000,\u2009d\u2009<\u2009L)\u00a0\u2014 Luke's width, the initial position of the second press and the speed of the first and second presses, respectively.","src_uid":"f34f3f974a21144b9f6e8615c41830f5","source_code":"#include\n\nmain(){\n double d,l,v1,v2;\n scanf(\"%lf %lf %lf %lf\",&d,&l,&v1,&v2);\n printf(\"%0.10lf\",(l-d)\/(v1+v2));\n}\n","sample_outputs":"[\"1.00000000000000000000\", \"2.66666666666666650000\"]","lang_cluster":"C","notes":"NoteIn the first sample Luke should stay exactly in the middle of the segment, that is at coordinates [2;4], as the presses move with the same speed.In the second sample he needs to occupy the position . In this case both presses move to his edges at the same time.","output_specification":"Print a single real value\u00a0\u2014 the maximum period of time Luke can stay alive for. Your answer will be considered correct if its absolute or relative error does not exceed 10\u2009-\u20096. Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if .","description":"Luke Skywalker got locked up in a rubbish shredder between two presses. R2D2 is already working on his rescue, but Luke needs to stay alive as long as possible. For simplicity we will assume that everything happens on a straight line, the presses are initially at coordinates 0 and L, and they move towards each other with speed v1 and v2, respectively. Luke has width d and is able to choose any position between the presses. Luke dies as soon as the distance between the presses is less than his width. Your task is to determine for how long Luke can stay alive.","human_testcases":"[{\"input\": \"2 6 2 2\\r\\n\", \"output\": [\"1.0000000\", \"1.000000\", \"1.0\", \"1.00000000000000000000\", \"1.0000000000\"]}, {\"input\": \"1 9 1 2\\r\\n\", \"output\": [\"2.66666666666666666674\", \"2.66666666667\", \"2.6666666666666665\", \"2.6666667\", \"2.66666666666666650000\", \"2.666667\", \"2.6666666667\", \"2.66666666666666651864\"]}, {\"input\": \"1 10000 1 1\\r\\n\", \"output\": [\"4999.50000000000000000000\", \"4999.500000\", \"4999.5\", \"4999.5000000\", \"4999.5000000000\"]}, {\"input\": \"9999 10000 10000 10000\\r\\n\", \"output\": [\"0.000050\", \"0.0000500000\", \"0.00005000000000000000\", \"0.0000500\", \"5.0E-5\", \"5e-05\"]}, {\"input\": \"1023 2340 1029 3021\\r\\n\", \"output\": [\"0.32518518518518518823\", \"0.3251852\", \"0.32518518518518519000\", \"0.325185\", \"0.32518518518518518519\", \"0.325185185185\", \"0.3251851852\", \"0.3251851851851852\"]}, {\"input\": \"2173 2176 10000 9989\\r\\n\", \"output\": [\"0.00015008254539996998\", \"0.0001500825454\", \"0.0001500825\", \"0.0001501\", \"1.5008254539996998E-4\", \"0.000150\"]}, {\"input\": \"1 2 123 1\\r\\n\", \"output\": [\"0.00806451612903225784\", \"0.00806451612903225780\", \"0.00806451612903225806\", \"0.0080645\", \"0.008064516129032258\", \"0.008065\", \"0.00806451612903\", \"0.0080645161\"]}, {\"input\": \"123 1242 12 312\\r\\n\", \"output\": [\"3.4537037037037037\", \"3.45370370370370370367\", \"3.453704\", \"3.45370370370370370000\", \"3.4537037037\", \"3.45370370370370372015\", \"3.4537037\"]}, {\"input\": \"2 9997 3 12\\r\\n\", \"output\": [\"666.3333333333334\", \"666.33333333333337000000\", \"666.333333\", \"666.33333333333333331483\", \"666.333333333\", \"666.33333333333337122895\", \"666.3333333333\", \"666.3333333\"]}, {\"input\": \"1 10000 10000 10000\\r\\n\", \"output\": [\"0.49995000000000001000\", \"0.4999500000\", \"0.49995000000000000551\", \"0.49995\", \"0.49995000000000000000\", \"0.4999500\", \"0.499950\"]}, {\"input\": \"3274 4728 888 4578\\r\\n\", \"output\": [\"0.2660080\", \"0.26600804976216613\", \"0.2660080498\", \"0.26600804976216613218\", \"0.266008049762\", \"0.26600804976216611781\", \"0.266008\", \"0.26600804976216613000\"]}, {\"input\": \"4600 9696 5634 8248\\r\\n\", \"output\": [\"0.36709407866301685000\", \"0.3670941\", \"0.367094\", \"0.36709407866301685397\", \"0.3670940787\", \"0.36709407866301685635\", \"0.367094078663\", \"0.36709407866301685\"]}, {\"input\": \"2255 7902 8891 429\\r\\n\", \"output\": [\"0.60590128755364806867\", \"0.60590128755364803000\", \"0.6059013\", \"0.605901\", \"0.605901287554\", \"0.60590128755364802693\", \"0.6059012876\", \"0.605901287553648\"]}, {\"input\": \"6745 9881 2149 9907\\r\\n\", \"output\": [\"0.260119442601\", \"0.2601194426011944\", \"0.2601194\", \"0.26011944260119442601\", \"0.26011944260119440608\", \"0.26011944260119441000\", \"0.2601194426\", \"0.260119\"]}, {\"input\": \"4400 8021 6895 2089\\r\\n\", \"output\": [\"0.403049866429\", \"0.40304986642920748000\", \"0.40304986642920748174\", \"0.4030498664292075\", \"0.40304986642920747995\", \"0.403050\", \"0.4030498664\", \"0.4030499\"]}, {\"input\": \"5726 9082 7448 3054\\r\\n\", \"output\": [\"0.319558179394\", \"0.3195582\", \"0.3195581794\", \"0.319558\", \"0.31955817939440107000\", \"0.31955817939440106648\", \"0.31955817939440106512\", \"0.31955817939440107\"]}, {\"input\": \"3381 9769 4898 2532\\r\\n\", \"output\": [\"0.859757738896\", \"0.8597577\", \"0.8597577389\", \"0.8597577388963661\", \"0.85975773889636609000\", \"0.85975773889636608605\", \"0.859758\", \"0.85975773889636608344\"]}, {\"input\": \"1036 6259 5451 4713\\r\\n\", \"output\": [\"0.51387249114521838000\", \"0.513872\", \"0.5138724911\", \"0.5138724911452184\", \"0.51387249114521837967\", \"0.51387249114521841794\", \"0.513872491145\", \"0.5138725\"]}, {\"input\": \"5526 6455 197 4191\\r\\n\", \"output\": [\"0.2117137648131267\", \"0.21171376481312670359\", \"0.2117137648\", \"0.211713764813\", \"0.2117138\", \"0.21171376481312670000\", \"0.211714\", \"0.21171376481312670920\"]}, {\"input\": \"1196 4082 4071 9971\\r\\n\", \"output\": [\"0.2055263\", \"0.20552627830793335217\", \"0.20552627830793334282\", \"0.2055262783\", \"0.205526278308\", \"0.20552627830793335000\", \"0.205526\", \"0.20552627830793335\"]}, {\"input\": \"8850 9921 8816 9449\\r\\n\", \"output\": [\"0.0586367\", \"0.05863673692855187517\", \"0.05863673692855187608\", \"0.0586367369\", \"0.0586367369286\", \"0.058637\", \"0.05863673692855187600\", \"0.058636736928551876\"]}, {\"input\": \"3341 7299 2074 8927\\r\\n\", \"output\": [\"0.35978547404781386000\", \"0.3597854740\", \"0.359785474048\", \"0.35978547404781383511\", \"0.35978547404781385799\", \"0.35978547404781386\", \"0.3597855\", \"0.359785\"]}, {\"input\": \"7831 8609 6820 2596\\r\\n\", \"output\": [\"0.082625\", \"0.08262531860662701784\", \"0.0826253186\", \"0.08262531860662701566\", \"0.08262531860662702\", \"0.08262531860662701600\", \"0.0826253186066\", \"0.0826253\"]}, {\"input\": \"2322 7212 77 4778\\r\\n\", \"output\": [\"1.00720906282183316166\", \"1.007209062821833\", \"1.00720906282183308988\", \"1.00720906282183310000\", \"1.00720906282\", \"1.0072091\", \"1.007209\", \"1.0072090628\"]}, {\"input\": \"9976 9996 4823 4255\\r\\n\", \"output\": [\"0.0022031284\", \"0.00220312844239\", \"0.00220312844238819110\", \"0.002203128442388191\", \"0.002203\", \"0.00220312844238819113\", \"0.0022031\", \"0.00220312844238819123\"]}, {\"input\": \"7631 9769 5377 6437\\r\\n\", \"output\": [\"0.18097172845776196559\", \"0.1809717285\", \"0.180971728458\", \"0.18097172845776197000\", \"0.1809717\", \"0.18097172845776197731\", \"0.180972\", \"0.18097172845776197\"]}, {\"input\": \"8957 9525 8634 107\\r\\n\", \"output\": [\"0.064981\", \"0.0649811\", \"0.06498112344125385\", \"0.06498112344125385464\", \"0.06498112344125385500\", \"0.06498112344125386112\", \"0.0649811234\", \"0.0649811234413\"]}, {\"input\": \"6612 9565 3380 2288\\r\\n\", \"output\": [\"0.52099505998588567399\", \"0.52099505998588568900\", \"0.520995\", \"0.5209950599858857\", \"0.520995059986\", \"0.5209951\", \"0.5209950600\", \"0.52099505998588569000\"]}, {\"input\": \"1103 6256 3934 9062\\r\\n\", \"output\": [\"0.39650661742074483\", \"0.39650661742074484457\", \"0.39650661742074483351\", \"0.3965066\", \"0.396506617421\", \"0.39650661742074483000\", \"0.3965066174\", \"0.396507\"]}, {\"input\": \"1854 3280 1481 2140\\r\\n\", \"output\": [\"0.393814\", \"0.3938139\", \"0.39381386357359843000\", \"0.393813863574\", \"0.39381386357359843\", \"0.39381386357359845346\", \"0.3938138636\", \"0.39381386357359843275\"]}, {\"input\": \"2 6 2 2\\r\\n\", \"output\": [\"1.0\", \"1\", \"1.000000\", \"1.0000000000\"]}, {\"input\": \"1 9 1 2\\r\\n\", \"output\": [\"2.6666666667\", \"2.6666666666666665\", \"2.666667\"]}, {\"input\": \"1 10000 1 1\\r\\n\", \"output\": [\"4999.5\", \"4999.500000\", \"4999.5000000000\"]}, {\"input\": \"9999 10000 10000 10000\\r\\n\", \"output\": [\"0.000050\", \"0.0000500000\", \"5.0E-5\", \"5e-005\"]}, {\"input\": \"1023 2340 1029 3021\\r\\n\", \"output\": [\"0.325185\", \"0.3251852\", \"0.3251851852\", \"0.3251851851851852\"]}, {\"input\": \"2173 2176 10000 9989\\r\\n\", \"output\": [\"0.0001500825\", \"1.5008254539996998E-4\", \"0.000150\"]}, {\"input\": \"1 2 123 1\\r\\n\", \"output\": [\"0.0080645161\", \"0.008064516129032258\", \"0.008064516\", \"0.008065\"]}, {\"input\": \"123 1242 12 312\\r\\n\", \"output\": [\"3.453704\", \"3.4537037037037037\", \"3.4537037037\"]}, {\"input\": \"2 9997 3 12\\r\\n\", \"output\": [\"666.3333333333\", \"666.333333\", \"666.3333\", \"666.3333333333334\"]}, {\"input\": \"1 10000 10000 10000\\r\\n\", \"output\": [\"0.49995\", \"0.4999500000\", \"0.499950\"]}, {\"input\": \"3274 4728 888 4578\\r\\n\", \"output\": [\"0.26600804976216613\", \"0.2660080498\", \"0.266008\"]}, {\"input\": \"4600 9696 5634 8248\\r\\n\", \"output\": [\"0.367094\", \"0.36709407866301685\", \"0.3670941\", \"0.3670940787\"]}, {\"input\": \"2255 7902 8891 429\\r\\n\", \"output\": [\"0.605901\", \"0.6059012876\", \"0.605901287553648\", \"0.6059013\"]}, {\"input\": \"6745 9881 2149 9907\\r\\n\", \"output\": [\"0.2601194426011944\", \"0.2601194426\", \"0.2601194\", \"0.260119\"]}, {\"input\": \"4400 8021 6895 2089\\r\\n\", \"output\": [\"0.4030499\", \"0.4030498664\", \"0.4030498664292075\", \"0.403050\"]}, {\"input\": \"5726 9082 7448 3054\\r\\n\", \"output\": [\"0.31955817939440107\", \"0.319558\", \"0.3195581794\", \"0.3195582\"]}, {\"input\": \"3381 9769 4898 2532\\r\\n\", \"output\": [\"0.8597577388963661\", \"0.8597577\", \"0.8597577389\", \"0.859758\"]}, {\"input\": \"1036 6259 5451 4713\\r\\n\", \"output\": [\"0.5138724911452184\", \"0.5138724911\", \"0.5138725\", \"0.513872\"]}, {\"input\": \"5526 6455 197 4191\\r\\n\", \"output\": [\"0.2117137648\", \"0.211714\", \"0.2117138\", \"0.2117137648131267\"]}, {\"input\": \"1196 4082 4071 9971\\r\\n\", \"output\": [\"0.205526\", \"0.2055263\", \"0.2055262783\", \"0.20552627830793335\"]}, {\"input\": \"8850 9921 8816 9449\\r\\n\", \"output\": [\"0.058637\", \"0.05863674\", \"0.0586367369\", \"0.058636736928551876\"]}, {\"input\": \"3341 7299 2074 8927\\r\\n\", \"output\": [\"0.359785\", \"0.3597854740\", \"0.35978547404781386\", \"0.3597855\"]}, {\"input\": \"7831 8609 6820 2596\\r\\n\", \"output\": [\"0.082625\", \"0.08262532\", \"0.0826253186\", \"0.08262531860662702\"]}, {\"input\": \"2322 7212 77 4778\\r\\n\", \"output\": [\"1.007209\", \"1.0072090628\", \"1.007209062821833\"]}, {\"input\": \"9976 9996 4823 4255\\r\\n\", \"output\": [\"0.002203128442388191\", \"0.002203\", \"0.0022031284\", \"0.002203128\"]}, {\"input\": \"7631 9769 5377 6437\\r\\n\", \"output\": [\"0.1809717\", \"0.18097172845776197\", \"0.1809717285\", \"0.180972\"]}, {\"input\": \"8957 9525 8634 107\\r\\n\", \"output\": [\"0.06498112344125385\", \"0.06498112\", \"0.064981\", \"0.0649811234\"]}, {\"input\": \"6612 9565 3380 2288\\r\\n\", \"output\": [\"0.520995\", \"0.5209951\", \"0.5209950599858857\", \"0.5209950600\"]}, {\"input\": \"1103 6256 3934 9062\\r\\n\", \"output\": [\"0.39650661742074483\", \"0.3965066\", \"0.3965066174\", \"0.396507\"]}, {\"input\": \"1854 3280 1481 2140\\r\\n\", \"output\": [\"0.393814\", \"0.3938139\", \"0.3938138636\", \"0.39381386357359843\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6612 9565 3380 2288\\r\\n', 'output': ['0.52099505998588567399', '0.52099505998588568900', '0.520995', '0.5209950599858857', '0.520995059986', '0.5209951', '0.5209950600', '0.52099505998588569000']}, {'input': '2255 7902 8891 429\\r\\n', 'output': ['0.605901', '0.6059012876', '0.605901287553648', '0.6059013']}, {'input': '2 6 2 2\\r\\n', 'output': ['1.0', '1', '1.000000', '1.0000000000']}, {'input': '7831 8609 6820 2596\\r\\n', 'output': ['0.082625', '0.08262531860662701784', '0.0826253186', '0.08262531860662701566', '0.08262531860662702', '0.08262531860662701600', '0.0826253186066', '0.0826253']}, {'input': '1 2 123 1\\r\\n', 'output': ['0.0080645161', '0.008064516129032258', '0.008064516', '0.008065']}]","human_sample_testcases_2":"[{'input': '1854 3280 1481 2140\\r\\n', 'output': ['0.393814', '0.3938139', '0.39381386357359843000', '0.393813863574', '0.39381386357359843', '0.39381386357359845346', '0.3938138636', '0.39381386357359843275']}, {'input': '4600 9696 5634 8248\\r\\n', 'output': ['0.36709407866301685000', '0.3670941', '0.367094', '0.36709407866301685397', '0.3670940787', '0.36709407866301685635', '0.367094078663', '0.36709407866301685']}, {'input': '1 10000 1 1\\r\\n', 'output': ['4999.50000000000000000000', '4999.500000', '4999.5', '4999.5000000', '4999.5000000000']}, {'input': '1 9 1 2\\r\\n', 'output': ['2.6666666667', '2.6666666666666665', '2.666667']}, {'input': '2 6 2 2\\r\\n', 'output': ['1.0000000', '1.000000', '1.0', '1.00000000000000000000', '1.0000000000']}]","human_sample_testcases_3":"[{'input': '6745 9881 2149 9907\\r\\n', 'output': ['0.2601194426011944', '0.2601194426', '0.2601194', '0.260119']}, {'input': '5526 6455 197 4191\\r\\n', 'output': ['0.2117137648131267', '0.21171376481312670359', '0.2117137648', '0.211713764813', '0.2117138', '0.21171376481312670000', '0.211714', '0.21171376481312670920']}, {'input': '8957 9525 8634 107\\r\\n', 'output': ['0.06498112344125385', '0.06498112', '0.064981', '0.0649811234']}, {'input': '3274 4728 888 4578\\r\\n', 'output': ['0.26600804976216613', '0.2660080498', '0.266008']}, {'input': '3381 9769 4898 2532\\r\\n', 'output': ['0.859757738896', '0.8597577', '0.8597577389', '0.8597577388963661', '0.85975773889636609000', '0.85975773889636608605', '0.859758', '0.85975773889636608344']}]","human_sample_testcases_4":"[{'input': '4400 8021 6895 2089\\r\\n', 'output': ['0.403049866429', '0.40304986642920748000', '0.40304986642920748174', '0.4030498664292075', '0.40304986642920747995', '0.403050', '0.4030498664', '0.4030499']}, {'input': '8957 9525 8634 107\\r\\n', 'output': ['0.064981', '0.0649811', '0.06498112344125385', '0.06498112344125385464', '0.06498112344125385500', '0.06498112344125386112', '0.0649811234', '0.0649811234413']}, {'input': '1 9 1 2\\r\\n', 'output': ['2.6666666667', '2.6666666666666665', '2.666667']}, {'input': '9999 10000 10000 10000\\r\\n', 'output': ['0.000050', '0.0000500000', '0.00005000000000000000', '0.0000500', '5.0E-5', '5e-05']}, {'input': '3274 4728 888 4578\\r\\n', 'output': ['0.2660080', '0.26600804976216613', '0.2660080498', '0.26600804976216613218', '0.266008049762', '0.26600804976216611781', '0.266008', '0.26600804976216613000']}]","human_sample_testcases_5":"[{'input': '1 10000 1 1\\r\\n', 'output': ['4999.50000000000000000000', '4999.500000', '4999.5', '4999.5000000', '4999.5000000000']}, {'input': '1 9 1 2\\r\\n', 'output': ['2.66666666666666666674', '2.66666666667', '2.6666666666666665', '2.6666667', '2.66666666666666650000', '2.666667', '2.6666666667', '2.66666666666666651864']}, {'input': '5526 6455 197 4191\\r\\n', 'output': ['0.2117137648131267', '0.21171376481312670359', '0.2117137648', '0.211713764813', '0.2117138', '0.21171376481312670000', '0.211714', '0.21171376481312670920']}, {'input': '5726 9082 7448 3054\\r\\n', 'output': ['0.31955817939440107', '0.319558', '0.3195581794', '0.3195582']}, {'input': '1036 6259 5451 4713\\r\\n', 'output': ['0.51387249114521838000', '0.513872', '0.5138724911', '0.5138724911452184', '0.51387249114521837967', '0.51387249114521841794', '0.513872491145', '0.5138725']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":4,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\"]","input_specification":"The only line of the input contains a single integer n (2\u2009\u2264\u2009n\u2009\u2264\u20092\u00b71018) \u2014 the power in which you need to raise number 5.","src_uid":"dcaff75492eafaf61d598779d6202c9d","source_code":"#include \n#include \nint main(){\n\t\tint i;\n\t\tscanf(\"%d\",&i);\n\t\tprintf(\"25\");\n\t\treturn 0;\n}\n","sample_outputs":"[\"25\"]","lang_cluster":"C","notes":null,"output_specification":"Output the last two digits of 5n without spaces between them.","description":"The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. \"Do I give such a hard task?\" \u2014 the HR manager thought. \"Just raise number 5 to the power of n and get last two digits of the number. Yes, of course, n can be rather big, and one cannot find the power using a calculator, but we need people who are able to think, not just follow the instructions.\"Could you pass the interview in the machine vision company in IT City?","human_testcases":"[{\"input\": \"2\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"2000000000000000000\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"987654321012345678\\r\\n\", \"output\": [\"25\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}]","human_sample_testcases_2":"[{'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}]","human_sample_testcases_3":"[{'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}]","human_sample_testcases_4":"[{'input': '7\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}]","human_sample_testcases_5":"[{'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":5,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\\n()))()\", \"3\\n(()\", \"2\\n(((\"]","input_specification":"The first line of the input contains one integer $$$n$$$ ($$$1 \\le n \\le 100$$$) \u2014 the half-length of the resulting regular bracket sequences (the resulting sequences must have length equal to $$$2n$$$). The second line of the input contains one string $$$s$$$ ($$$1 \\le |s| \\le 200$$$) \u2014 the string $$$s$$$ that should be a substring in each of the resulting regular bracket sequences ($$$|s|$$$ is the length of $$$s$$$).","src_uid":"590a49a7af0eb83376ed911ed488d7e5","source_code":"#include \n#include \nenum { BIG = 1000000007 };\n\nint n;\nchar s[240];\nint slen;\nint dp[201][101];\nint next[201][2];\nint fail[201];\n\nvoid nextstep(int eo) {\n int i, j;\n for (i = 0; i <= slen; i++) {\n int lp = next[i][0];\n int rp = next[i][1];\n for (j = eo; j <= n; j+=2) {\n int now = dp[i][j];\n if (j < n) {\n int add = dp[lp][j+1] + now;\n dp[lp][j+1] = add < BIG ? add : add - BIG;\n }\n if (j > 0) {\n int add = dp[rp][j-1] + now;\n dp[rp][j-1] = add < BIG ? add : add - BIG;\n }\n }\n }\n for (i = 0; i <= slen; i++) {\n for (j = eo; j <= n; j+=2) {\n dp[i][j] = 0;\n }\n }\n \/*for (i=0;i<=slen;i++){\n for (j=0;j<=n;j++){\n printf(\"%3d,\",dp[i][j]);\n }\n puts(\"\");\n }\n puts(\"\");*\/\n}\n\nint main() {\n scanf(\"%d\", &n);\n scanf(\" %202s\", s);\n slen = strlen(s);\n int i;\n \/\/ build state machine\n fail[0] = fail[1] = 0;\n if (s[0] == '(') {\n next[0][0] = 1;\n next[0][1] = 0;\n }\n else {\n next[0][0] = 0;\n next[0][1] = 1;\n }\n for (i = 1; i < slen; i++) {\n int r = s[i] == ')';\n int f = fail[i];\n next[i][r] = i+1;\n next[i][1-r] = next[f][1-r];\n fail[i+1] = next[f][r];\n }\n next[slen][0] = next[slen][1] = slen;\n dp[0][0] = 1;\n for (i = 0; i < n; i++) {\n nextstep(0);\n nextstep(1);\n }\n printf(\"%d\\n\", dp[slen][0]);\n return 0;\n}\n","sample_outputs":"[\"5\", \"4\", \"0\"]","lang_cluster":"C","notes":"NoteAll regular bracket sequences satisfying the conditions above for the first example: \"(((()))())\"; \"((()()))()\"; \"((()))()()\"; \"(()(()))()\"; \"()((()))()\". All regular bracket sequences satisfying the conditions above for the second example: \"((()))\"; \"(()())\"; \"(())()\"; \"()(())\". And there is no regular bracket sequences of length $$$4$$$ containing \"(((\" as a substring in the third example.","output_specification":"Print only one integer \u2014 the number of regular bracket sequences containing the given bracket sequence $$$s$$$ as a substring. Since this number can be huge, print it modulo $$$10^9+7$$$ ($$$1000000007$$$).","description":"You are given a bracket sequence $$$s$$$ (not necessarily a regular one). A bracket sequence is a string containing only characters '(' and ')'.A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters '1' and '+' between the original characters of the sequence. For example, bracket sequences \"()()\" and \"(())\" are regular (the resulting expressions are: \"(1)+(1)\" and \"((1+1)+1)\"), and \")(\", \"(\" and \")\" are not.Your problem is to calculate the number of regular bracket sequences of length $$$2n$$$ containing the given bracket sequence $$$s$$$ as a substring (consecutive sequence of characters) modulo $$$10^9+7$$$ ($$$1000000007$$$).","human_testcases":"[{\"input\": \"5\\r\\n()))()\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n(()\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2\\r\\n(((\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n()(()))))(()((((()())()))(()))()()))(((()))))))))(\\r\\n\", \"output\": [\"979898526\"]}, {\"input\": \"100\\r\\n()(()(()((()(()(()()()(()((()))())())))()))())()()\\r\\n\", \"output\": [\"711757760\"]}, {\"input\": \"100\\r\\n(()))(()())()()((())(()((()()))(())()(((((()(((()()))())))))(())((((()()()()()))(()))(())(())(()))((\\r\\n\", \"output\": [\"599470552\"]}, {\"input\": \"100\\r\\n(()(()()()()(()(()()(((()((()(((()(((()(()()((()())))))()()()))))()()())))()()))()))()()()()())()())\\r\\n\", \"output\": [\"812513651\"]}, {\"input\": \"100\\r\\n(()))()())((())))((((())()((())(()(())))(()()(((()()())())()()(())))())((((()())(())())((((()((()((()()(())))(())))))()(()))))())()()))))()(()(()())((\\r\\n\", \"output\": [\"657505568\"]}, {\"input\": \"100\\r\\n()()()(((((()(()((((()((((((()()()((()()(()()()(((()()((()()((()()()))()()()))()))))())()())()()()())()()()())())())))())()())())))())()))))()()()()()\\r\\n\", \"output\": [\"264738339\"]}, {\"input\": \"100\\r\\n()()))(()()))))((()()))))(()()(()())()))))()())()()((((()(()()((())))((()()())())(())((()((()))(((()(()))))))())))((((()())))(()(()(())))(()))()()())((())()((())(()(((()((())))())))()()()((()))()()())\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n(()(()()()((()((((((()(()()((((()()((((()((()()((()((()()(()(((()((()()()()(()((()()(((()()(()((()()))())()))())()()()()())))())())()))()))()()))))()))()))))))())())()())))())))())))()()()())()())()()\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n()\\r\\n\", \"output\": [\"558488487\"]}, {\"input\": \"100\\r\\n()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n)\\r\\n\", \"output\": [\"558488487\"]}, {\"input\": \"100\\r\\n))\\r\\n\", \"output\": [\"558488486\"]}, {\"input\": \"100\\r\\n))())())()))()())())()(((((((()()))())()())()(((()()))(())()((((()()()())()((()()()())()(((((()()()(()(()()((((()())))()))()(())(())))))))))((()((()())())(()((())((())()(()(()\\r\\n\", \"output\": [\"325\"]}, {\"input\": \"100\\r\\n()())(((()((())))((())((()(())))(((((((()))))))()(()((()()(((())))())()((((())()(())))(((((()))())(()))))((()))((())()(((())((()())(()(()))((()()()())())())))(()()()))()))))())))))))()(\\r\\n\", \"output\": [\"1820\"]}, {\"input\": \"100\\r\\n()(()())()(())))()())()(())((()(()()((()((((((())()))(()(()()))(()()())((()())))())())))())))(())(()()))(((())))(((((())(())(()))((())(())))())))()))()((())()()())()))(()())(()(()))(()(())))\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12\\r\\n()()()\\r\\n\", \"output\": [\"62316\"]}, {\"input\": \"20\\r\\n()(()()())\\r\\n\", \"output\": [\"296672330\"]}, {\"input\": \"32\\r\\n()((()()()())())\\r\\n\", \"output\": [\"468509380\"]}, {\"input\": \"50\\r\\n(\\r\\n\", \"output\": [\"265470434\"]}, {\"input\": \"10\\r\\n)()))())))())(())(()(((())(()))))))(()())))))))(((\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20\\r\\n))()))(()()))(())()))()(((((((((()((())((((((())(())(()())))(()()((())(()()()()(()())()()))))))())((\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n(\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n)\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n)\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4\\r\\n(\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"5\\r\\n(\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"6\\r\\n)\\r\\n\", \"output\": [\"132\"]}, {\"input\": \"7\\r\\n)\\r\\n\", \"output\": [\"429\"]}, {\"input\": \"8\\r\\n(\\r\\n\", \"output\": [\"1430\"]}, {\"input\": \"9\\r\\n(\\r\\n\", \"output\": [\"4862\"]}, {\"input\": \"10\\r\\n)\\r\\n\", \"output\": [\"16796\"]}, {\"input\": \"11\\r\\n(\\r\\n\", \"output\": [\"58786\"]}, {\"input\": \"12\\r\\n(\\r\\n\", \"output\": [\"208012\"]}, {\"input\": \"13\\r\\n)\\r\\n\", \"output\": [\"742900\"]}, {\"input\": \"14\\r\\n)\\r\\n\", \"output\": [\"2674440\"]}, {\"input\": \"15\\r\\n(\\r\\n\", \"output\": [\"9694845\"]}, {\"input\": \"16\\r\\n(\\r\\n\", \"output\": [\"35357670\"]}, {\"input\": \"17\\r\\n)\\r\\n\", \"output\": [\"129644790\"]}, {\"input\": \"18\\r\\n)\\r\\n\", \"output\": [\"477638700\"]}, {\"input\": \"19\\r\\n(\\r\\n\", \"output\": [\"767263183\"]}, {\"input\": \"20\\r\\n)\\r\\n\", \"output\": [\"564120378\"]}, {\"input\": \"21\\r\\n(\\r\\n\", \"output\": [\"466266852\"]}, {\"input\": \"22\\r\\n(\\r\\n\", \"output\": [\"482563003\"]}, {\"input\": \"23\\r\\n)\\r\\n\", \"output\": [\"59611249\"]}, {\"input\": \"1\\r\\n(((\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '20\\r\\n()(()()())\\r\\n', 'output': ['296672330']}, {'input': '100\\r\\n()()()(((((()(()((((()((((((()()()((()()(()()()(((()()((()()((()()()))()()()))()))))())()())()()()())()()()())())())))())()())())))())()))))()()()()()\\r\\n', 'output': ['264738339']}, {'input': '100\\r\\n()(()())()(())))()())()(())((()(()()((()((((((())()))(()(()()))(()()())((()())))())())))())))(())(()()))(((())))(((((())(())(()))((())(())))())))()))()((())()()())()))(()())(()(()))(()(())))\\r\\n', 'output': ['1']}, {'input': '1\\r\\n(\\r\\n', 'output': ['1']}, {'input': '22\\r\\n(\\r\\n', 'output': ['482563003']}]","human_sample_testcases_2":"[{'input': '100\\r\\n(()))(()())()()((())(()((()()))(())()(((((()(((()()))())))))(())((((()()()()()))(()))(())(())(()))((\\r\\n', 'output': ['599470552']}, {'input': '20\\r\\n()(()()())\\r\\n', 'output': ['296672330']}, {'input': '1\\r\\n(((\\r\\n', 'output': ['0']}, {'input': '8\\r\\n(\\r\\n', 'output': ['1430']}, {'input': '100\\r\\n()(()(()((()(()(()()()(()((()))())())))()))())()()\\r\\n', 'output': ['711757760']}]","human_sample_testcases_3":"[{'input': '18\\r\\n)\\r\\n', 'output': ['477638700']}, {'input': '2\\r\\n)\\r\\n', 'output': ['2']}, {'input': '20\\r\\n()(()()())\\r\\n', 'output': ['296672330']}, {'input': '14\\r\\n)\\r\\n', 'output': ['2674440']}, {'input': '15\\r\\n(\\r\\n', 'output': ['9694845']}]","human_sample_testcases_4":"[{'input': '100\\r\\n))\\r\\n', 'output': ['558488486']}, {'input': '100\\r\\n()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\\r\\n', 'output': ['1']}, {'input': '100\\r\\n()(()))))(()((((()())()))(()))()()))(((()))))))))(\\r\\n', 'output': ['979898526']}, {'input': '2\\r\\n(((\\r\\n', 'output': ['0']}, {'input': '100\\r\\n()()))(()()))))((()()))))(()()(()())()))))()())()()((((()(()()((())))((()()())())(())((()((()))(((()(()))))))())))((((()())))(()(()(())))(()))()()())((())()((())(()(((()((())))())))()()()((()))()()())\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '100\\r\\n()(()(()((()(()(()()()(()((()))())())))()))())()()\\r\\n', 'output': ['711757760']}, {'input': '32\\r\\n()((()()()())())\\r\\n', 'output': ['468509380']}, {'input': '100\\r\\n((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((\\r\\n', 'output': ['0']}, {'input': '3\\r\\n)\\r\\n', 'output': ['5']}, {'input': '10\\r\\n)\\r\\n', 'output': ['16796']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.87,"human_sample_line_coverage_2":94.87,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":95.45,"human_sample_branch_coverage_2":95.45,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":6,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.948,"human_sample_branch_coverage":98.18} {"sample_inputs":"[\"8 1 1\", \"8 1 10\"]","input_specification":"The only line contains three integers n, x and y (1\u2009\u2264\u2009n\u2009\u2264\u2009107, 1\u2009\u2264\u2009x,\u2009y\u2009\u2264\u2009109) \u2014 the number of letters 'a' in the input file and the parameters from the problem statement.","src_uid":"0f270af00be2a523515d5e7bd66800f6","source_code":"#include\n#include\n\nint main()\n{\n unsigned long long n, x, y;\n unsigned long nl, xl, yl;\n\n fscanf(stdin, \"%ld %ld %ld\", &nl, &xl, &yl);\n\n n = (unsigned long long)nl;\n x = (unsigned long long)xl;\n y = (unsigned long long)yl;\n\n unsigned long long* f = malloc(10000001*sizeof(unsigned long long));\n\n f[1] = x;\n f[2] = x < y? x + f[1] : y + f[1];\n\n unsigned long long k;\n\n for (unsigned long long m = 3; m < n+1; m++)\n {\n k = (m+1)\/2;\n if (m % 2 == 1)\n f[2*k-1] = f[k]+y+x < f[2*k-2]+x ? f[k]+y+x : f[2*k-2]+x;\n else\n f[2*k] = f[k]+y < f[2*k-2]+2*x ? f[k]+y : f[2*k-2]+2*x;\n }\n unsigned long pref = f[n] \/ 1000000000Lu;\n unsigned long rest = f[n] % 1000000000Lu;\n int digs = 9;\n int pow10 = 100000000Lu;\n while (digs > 1)\n {\n if (rest >= pow10)\n break;\n pow10 \/= 10;\n digs = digs-1;\n }\n if (pref > 0)\n {\n if (9-digs == 0)\n printf(\"%lu%lu\\n\", pref, rest);\n else\n {\n char* zeros = malloc((9-digs+1)*sizeof(char));\n for (int i = 0; i < 9-digs; i++) zeros[i] = '0';\n zeros[9-digs] = 0;\n printf(\"%lu%s%lu\\n\", pref, zeros, rest);\n }\n }\n else\n printf(\"%lu\\n\", rest);\n}\n","sample_outputs":"[\"4\", \"8\"]","lang_cluster":"C","notes":null,"output_specification":"Print the only integer t \u2014 the minimum amount of time needed to generate the input file.","description":"zscoder wants to generate an input file for some programming competition problem.His input is a string consisting of n letters 'a'. He is too lazy to write a generator so he will manually generate the input in a text editor.Initially, the text editor is empty. It takes him x seconds to insert or delete a letter 'a' from the text file and y seconds to copy the contents of the entire text file, and duplicate it.zscoder wants to find the minimum amount of time needed for him to create the input file of exactly n letters 'a'. Help him to determine the amount of time needed to generate the input.","human_testcases":"[{\"input\": \"8 1 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8 1 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10 62 99\\r\\n\", \"output\": [\"384\"]}, {\"input\": \"88 417 591\\r\\n\", \"output\": [\"4623\"]}, {\"input\": \"57 5289 8444\\r\\n\", \"output\": [\"60221\"]}, {\"input\": \"382 81437847 324871127\\r\\n\", \"output\": [\"2519291691\"]}, {\"input\": \"244 575154303 436759189\\r\\n\", \"output\": [\"5219536421\"]}, {\"input\": \"85 902510038 553915152\\r\\n\", \"output\": [\"6933531064\"]}, {\"input\": \"1926 84641582 820814219\\r\\n\", \"output\": [\"7184606427\"]}, {\"input\": \"3768 561740421 232937477\\r\\n\", \"output\": [\"5042211408\"]}, {\"input\": \"2313 184063453 204869248\\r\\n\", \"output\": [\"2969009745\"]}, {\"input\": \"35896 278270961 253614967\\r\\n\", \"output\": [\"5195579310\"]}, {\"input\": \"483867 138842067 556741142\\r\\n\", \"output\": [\"10712805143\"]}, {\"input\": \"4528217 187553422 956731625\\r\\n\", \"output\": [\"21178755627\"]}, {\"input\": \"10000000 1000000000 1\\r\\n\", \"output\": [\"8000000023\"]}, {\"input\": \"10000000 1 100\\r\\n\", \"output\": [\"1757\"]}, {\"input\": \"10000000 1 1000000000\\r\\n\", \"output\": [\"10000000\"]}, {\"input\": \"10000000 1 1000\\r\\n\", \"output\": [\"14224\"]}, {\"input\": \"10000000 1 10\\r\\n\", \"output\": [\"214\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000000 998 998\\r\\n\", \"output\": [\"30938\"]}, {\"input\": \"9999999 987654321 123456789\\r\\n\", \"output\": [\"11728395036\"]}, {\"input\": \"9999999 1 2\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"10000000 1 1\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"11478 29358 26962\\r\\n\", \"output\": [\"556012\"]}, {\"input\": \"4314870 1000000000 1\\r\\n\", \"output\": [\"7000000022\"]}, {\"input\": \"7186329 608148870 290497442\\r\\n\", \"output\": [\"12762929866\"]}, {\"input\": \"9917781 1 1\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"7789084 807239576 813643932\\r\\n\", \"output\": [\"25165322688\"]}, {\"input\": \"58087 1 100000000\\r\\n\", \"output\": [\"58087\"]}, {\"input\": \"9999991 2 3\\r\\n\", \"output\": [\"88\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '11478 29358 26962\\r\\n', 'output': ['556012']}, {'input': '57 5289 8444\\r\\n', 'output': ['60221']}, {'input': '382 81437847 324871127\\r\\n', 'output': ['2519291691']}, {'input': '10000000 1 100\\r\\n', 'output': ['1757']}, {'input': '10000000 998 998\\r\\n', 'output': ['30938']}]","human_sample_testcases_2":"[{'input': '9917781 1 1\\r\\n', 'output': ['35']}, {'input': '382 81437847 324871127\\r\\n', 'output': ['2519291691']}, {'input': '85 902510038 553915152\\r\\n', 'output': ['6933531064']}, {'input': '8 1 10\\r\\n', 'output': ['8']}, {'input': '10000000 1 1000000000\\r\\n', 'output': ['10000000']}]","human_sample_testcases_3":"[{'input': '7186329 608148870 290497442\\r\\n', 'output': ['12762929866']}, {'input': '4528217 187553422 956731625\\r\\n', 'output': ['21178755627']}, {'input': '9999999 1 2\\r\\n', 'output': ['54']}, {'input': '88 417 591\\r\\n', 'output': ['4623']}, {'input': '1926 84641582 820814219\\r\\n', 'output': ['7184606427']}]","human_sample_testcases_4":"[{'input': '483867 138842067 556741142\\r\\n', 'output': ['10712805143']}, {'input': '8 1 10\\r\\n', 'output': ['8']}, {'input': '10000000 1 1000\\r\\n', 'output': ['14224']}, {'input': '4314870 1000000000 1\\r\\n', 'output': ['7000000022']}, {'input': '9917781 1 1\\r\\n', 'output': ['35']}]","human_sample_testcases_5":"[{'input': '483867 138842067 556741142\\r\\n', 'output': ['10712805143']}, {'input': '10000000 1 10\\r\\n', 'output': ['214']}, {'input': '85 902510038 553915152\\r\\n', 'output': ['6933531064']}, {'input': '3768 561740421 232937477\\r\\n', 'output': ['5042211408']}, {'input': '10000000 1 1\\r\\n', 'output': ['31']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":86.67,"human_sample_line_coverage_2":86.67,"human_sample_line_coverage_3":86.67,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":81.25,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":93.75,"id":7,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.002,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"047\", \"16\", \"472747\"]","input_specification":"The single line contains a non-empty string s whose length can range from 1 to 50, inclusive. The string only contains digits. The string can contain leading zeroes.","src_uid":"639b8b8d0dc42df46b139f0aeb3a7a0a","source_code":"#include \n# include \nint main()\n{\n char ch[100];\n scanf(\"%s\",&ch);\n int i,c1=0,c2=0;\n for(i=0;i=c2)\n printf(\"4\\n\");\n else\n printf(\"7\\n\");\n return 0;\n }","sample_outputs":"[\"4\", \"-1\", \"7\"]","lang_cluster":"C","notes":"NoteThe lexicographical comparison of strings is performed by the < operator in the modern programming languages. String x is lexicographically less than string y either if x is a prefix of y, or exists such i (1\u2009\u2264\u2009i\u2009\u2264\u2009min(|x|,\u2009|y|)), that xi\u2009<\u2009yi and for any j (1\u2009\u2264\u2009j\u2009<\u2009i) xj\u2009=\u2009yj. Here |a| denotes the length of string a.In the first sample three conditions are fulfilled for strings \"4\", \"7\" and \"47\". The lexicographically minimum one is \"4\".In the second sample s has no substrings which are lucky numbers.In the third sample the three conditions are only fulfilled for string \"7\".","output_specification":"In the only line print the answer to Petya's problem. If the sought string does not exist, print \"-1\" (without quotes).","description":"Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.One day Petya was delivered a string s, containing only digits. He needs to find a string that represents a lucky number without leading zeroes, is not empty, is contained in s as a substring the maximum number of times.Among all the strings for which the three conditions given above are fulfilled, Petya only needs the lexicographically minimum one. Find this string for Petya.","human_testcases":"[{\"input\": \"047\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"472747\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1925\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5486846414848445484\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"516160414\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"9458569865994896\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"94894948577777777884888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"00000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"9589\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"7665711\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"538772857\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8679647744\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"23607019991994\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"86145305734278927901987281894864719533015270066521\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22438808523154336905543301642540261833729318191\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"290732082244359495795943967215788554387079\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6363333480463521971676988087733137609715\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"637789221789855555993957058\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"11536708648794535307468278326553811\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"619433861636130069773\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"00000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"0000000000000000000000000000000000000047\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8175012266795100056032281135654854227489558885698\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8862708665262955384044574268728167940741129\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"538772857\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"94872076199824813574576121510803\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"44101164480392494025995467\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0445460407410702955646485\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"91076008557028243309\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"33120039\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74747474747474747474747474747474747474747474747474\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74747474747474747474747774747474747474747474747474\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"74747474747474747474747474747474744474747474747474\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"47474747474747474747474747474747474747474747474747\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"40\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"07\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"007\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"44\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '74747474747474747474747474747474747474747474747474\\r\\n', 'output': ['4']}, {'input': '290732082244359495795943967215788554387079\\r\\n', 'output': ['7']}, {'input': '0000000000000000000000000000000000000047\\r\\n', 'output': ['4']}, {'input': '00000000000000000000000000000000000000000000000000\\r\\n', 'output': ['-1']}, {'input': '91076008557028243309\\r\\n', 'output': ['7']}]","human_sample_testcases_2":"[{'input': '40\\r\\n', 'output': ['4']}, {'input': '047\\r\\n', 'output': ['4']}, {'input': '637789221789855555993957058\\r\\n', 'output': ['7']}, {'input': '44\\r\\n', 'output': ['4']}, {'input': '0445460407410702955646485\\r\\n', 'output': ['4']}]","human_sample_testcases_3":"[{'input': '9589\\r\\n', 'output': ['-1']}, {'input': '74747474747474747474747474747474747474747474747474\\r\\n', 'output': ['4']}, {'input': '44101164480392494025995467\\r\\n', 'output': ['4']}, {'input': '0445460407410702955646485\\r\\n', 'output': ['4']}, {'input': '5486846414848445484\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '0445460407410702955646485\\r\\n', 'output': ['4']}, {'input': '538772857\\r\\n', 'output': ['7']}, {'input': '472747\\r\\n', 'output': ['7']}, {'input': '11536708648794535307468278326553811\\r\\n', 'output': ['7']}, {'input': '637789221789855555993957058\\r\\n', 'output': ['7']}]","human_sample_testcases_5":"[{'input': '07\\r\\n', 'output': ['7']}, {'input': '538772857\\r\\n', 'output': ['7']}, {'input': '74\\r\\n', 'output': ['4']}, {'input': '637789221789855555993957058\\r\\n', 'output': ['7']}, {'input': '23607019991994\\r\\n', 'output': ['4']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":92.86,"human_sample_line_coverage_3":92.86,"human_sample_line_coverage_4":92.86,"human_sample_line_coverage_5":92.86,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":91.67,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":91.67,"human_sample_branch_coverage_5":91.67,"id":8,"human_sample_pass_rate":100.0,"human_sample_line_coverage":94.288,"human_sample_branch_coverage":90.002} {"sample_inputs":"[\"2 2\\nRU\", \"1 2\\nRU\", \"-1 1000000000\\nLRRLU\", \"0 0\\nD\"]","input_specification":"The first line contains two integers a and b, (\u2009-\u2009109\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009109). The second line contains a string s (1\u2009\u2264\u2009|s|\u2009\u2264\u2009100, s only contains characters 'U', 'D', 'L', 'R') \u2014 the command.","src_uid":"5d6212e28c7942e9ff4d096938b782bf","source_code":"#include \n#include \n\nint a,b,l;\nint x,y,xl,yl;\n\nchar s[105];\nint w[105][2];\nint al,bl;\n\nint p(int a1,int b1,int x1,int y1)\n{\n if ((a1<0&&x1>0)||(a1>0&&x1<0))return 0;\n if ((b1<0&&y1>0)||(b1>0&&y1<0))return 0;\n return 1;\n}\nint main()\n{\n int i,j;\n \n scanf (\"%d%d\",&a,&b);\n scanf (\"%s\",s);l=strlen(s);\n if (a==0&&b==0){printf (\"Yes\\n\");return 0;}\n for (i=0;i\\n\",al,bl,x,y);\n if (!p(al,bl,xl,yl))continue;\n if (al==0&&bl==0) {printf (\"Yes\\n\");return 0;}\n if (al==0) {if (xl==0&&yl!=0&&bl%yl==0) {printf (\"Yes\\n\");return 0;}else continue;}\n if (bl==0) {if (yl==0&&xl!=0&&al%xl==0) {printf (\"Yes\\n\");return 0;}else continue;}\n if (xl!=0&&yl!=0&&al%xl==0&&bl%yl==0&&al\/xl==bl\/yl){printf (\"Yes\\n\");return 0;}\n \n }\n printf (\"No\\n\");\n return 0;\n}\n","sample_outputs":"[\"Yes\", \"No\", \"Yes\", \"Yes\"]","lang_cluster":"C","notes":"NoteIn the first and second test case, command string is \"RU\", so the robot will go right, then go up, then right, and then up and so on.The locations of its moves are (0, 0) \u2009\u2192\u2009 (1, 0) \u2009\u2192\u2009 (1, 1) \u2009\u2192\u2009 (2, 1) \u2009\u2192\u2009 (2, 2) \u2009\u2192\u2009 ...So it can reach (2, 2) but not (1, 2).","output_specification":"Print \"Yes\" if the robot will be located at (a,\u2009b), and \"No\" otherwise.","description":"Fox Ciel has a robot on a 2D plane. Initially it is located in (0, 0). Fox Ciel code a command to it. The command was represented by string s. Each character of s is one move operation. There are four move operations at all: 'U': go up, (x, y) \u2009\u2192\u2009 (x, y+1); 'D': go down, (x, y) \u2009\u2192\u2009 (x, y-1); 'L': go left, (x, y) \u2009\u2192\u2009 (x-1, y); 'R': go right, (x, y) \u2009\u2192\u2009 (x+1, y). The robot will do the operations in s from left to right, and repeat it infinite times. Help Fox Ciel to determine if after some steps the robot will located in (a,\u2009b).","human_testcases":"[{\"input\": \"2 2\\r\\nRU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 2\\r\\nRU\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-1 1000000000\\r\\nLRRLU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 0\\r\\nD\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 0\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"987654321 987654321\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 2\\r\\nUURRDL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"4 3\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 4\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 6\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 7\\r\\nUURRDL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1000000000 1000000000\\r\\nUURRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-1 -1\\r\\nUR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1 1\\r\\nUURRDDLL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"987654321 2\\r\\nUURDD\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 123456789\\r\\nRRULL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 4\\r\\nUUUURRRRDDDDLLLL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-491226083 -49122610\\r\\nUDRLDURLDLLLDUDURLRDUUDDUUULUDRDRDUULURDRLLDDDLUDUURLUUDLLDULLLLDDLDDUU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-261597957 418556728\\r\\nLLLDLUDUULLRDDULLRRUDRDLULRLRLLRRUUDRRLRUDLRRLUDRDLLUUDUULRURLDLULUUULDDUURLRUDURRL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-771928144 -3\\r\\nRUDULULDRDLLLULDDUDDDDUDULRULRUULDDDURUDLUURULLLDLLDDRDDRLRURUULRUURRUDLDLDDRLLULRRDRRLLUULUDRUUDRRD\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"397346346 1\\r\\nDDURRUURLDLRRLULD\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-528551525 0\\r\\nUDRLRRLDLDLURRRRULDLRLRLURUUDDLRLLDRRULLUDLURDLUUULLLRUUUDRRURLDUDULDDRDDDRDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"311692421 -129871846\\r\\nLLLDURULDDDDUDDURRLUUDRLDDRDURDDRUDUURLUDUDLDRUDDDUUURDRRUDRDRDURLLDURUUDRLDLDURRRRRRDULURDRU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"485940814 728911221\\r\\nURURU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-843450986 632588242\\r\\nLURLULULRUDUDULRDDLUL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"647999516 -809999401\\r\\nUDLDDLLULUDDLLDUULRRRDLUDDLDDLRLRRDRURURDRRDRULUDRDULRULLRRLLDDRLRRUDRURDUULUDLRRLRDR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"352820537 -764444491\\r\\nRDDUDLUDDUDLRRRDRRRDRRDUDUDDURLRRLDRLLRLLLLUULUDRURRDRLDDLLDRDURDUDRUDDLUDRLURUDRURDRDDLDRLDLDLLU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-284973644 -1\\r\\nDLULLDLRUUDRR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"356922591 -2\\r\\nRRLDLDUDRUUUULUUDDULDDUDD\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"27033101 54066203\\r\\nUDDDRDLLLRUUDDLRDLDRLRUDDULRLLRULR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-199335150 39867031\\r\\nLLURRDUULRUDDRDUUULDLDRDDLURDRLDRLLLRRRRRULRRRUUDD\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"609504072 609504074\\r\\nULRLUDLDDR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"497684357 829473929\\r\\nRRLDUUURULURRLLRRLRLURRLDU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"551922835 183974295\\r\\nDUDUUULDRLRURRDULRRUDDLRLLUULLRLRDRDRR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"825368095 -825368096\\r\\nRD\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-458990423 -229495204\\r\\nDLLDDRLUDLRLUL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"285102789 570205594\\r\\nRRDULRULULRRDUURRLURUDDULLRDUL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"109928480 219856920\\r\\nLRURLRLURDRDLDRDLRDDUUDDLULDRRUUURRUDLLUULUUUR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-532674020 532674026\\r\\nUURLLL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"999999999 0\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 0\\r\\nUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 1\\r\\nUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLRUDLR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-1000000000 -1000000000\\r\\nDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"3 3\\r\\nUURR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-2 -2\\r\\nUR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"5 5\\r\\nUDLR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"0 -1\\r\\nU\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-1 0\\r\\nR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1000000000 1000000000\\r\\nURURURUR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-1 -1\\r\\nRU\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1 1\\r\\nLD\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-2 -2\\r\\nUURR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1000000000 0\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"2 6\\r\\nRUUUURLDDDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 1\\r\\nLUUR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1 1\\r\\nURDLDL\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-10 -10\\r\\nRU\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1000000000 1000000000\\r\\nRURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-1000000000 -500000000\\r\\nURR\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"-2 0\\r\\nULLLDDRRRR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"999999999 -999999999\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLUUUUUUUUUUUUUUUUUUUUUUU\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"-100 -100\\r\\nRU\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"100 100\\r\\nRUL\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"0 1\\r\\nUDLR\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"0 1\\r\\nD\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"0 -3\\r\\nRDDL\\r\\n\", \"output\": [\"No\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '485940814 728911221\\r\\nURURU\\r\\n', 'output': ['Yes']}, {'input': '1000000000 1000000000\\r\\nUURRDL\\r\\n', 'output': ['Yes']}, {'input': '-261597957 418556728\\r\\nLLLDLUDUULLRDDULLRRUDRDLULRLRLLRRUUDRRLRUDLRRLUDRDLLUUDUULRURLDLULUUULDDUURLRUDURRL\\r\\n', 'output': ['Yes']}, {'input': '-1000000000 -1000000000\\r\\nDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDLDL\\r\\n', 'output': ['Yes']}, {'input': '-100 -100\\r\\nRU\\r\\n', 'output': ['No']}]","human_sample_testcases_2":"[{'input': '4 7\\r\\nUURRDL\\r\\n', 'output': ['No']}, {'input': '999999999 -999999999\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLUUUUUUUUUUUUUUUUUUUUUUU\\r\\n', 'output': ['Yes']}, {'input': '4 4\\r\\nUURRDL\\r\\n', 'output': ['Yes']}, {'input': '1 1\\r\\nURDLDL\\r\\n', 'output': ['Yes']}, {'input': '1000000000 1000000000\\r\\nRURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURURU\\r\\n', 'output': ['Yes']}]","human_sample_testcases_3":"[{'input': '0 1\\r\\nUDLR\\r\\n', 'output': ['Yes']}, {'input': '-261597957 418556728\\r\\nLLLDLUDUULLRDDULLRRUDRDLULRLRLLRRUUDRRLRUDLRRLUDRDLLUUDUULRURLDLULUUULDDUURLRUDURRL\\r\\n', 'output': ['Yes']}, {'input': '-2 -2\\r\\nUURR\\r\\n', 'output': ['No']}, {'input': '987654321 987654321\\r\\nUURRDL\\r\\n', 'output': ['Yes']}, {'input': '1 2\\r\\nRU\\r\\n', 'output': ['No']}]","human_sample_testcases_4":"[{'input': '-843450986 632588242\\r\\nLURLULULRUDUDULRDDLUL\\r\\n', 'output': ['Yes']}, {'input': '-100 -100\\r\\nRU\\r\\n', 'output': ['No']}, {'input': '4 6\\r\\nUURRDL\\r\\n', 'output': ['Yes']}, {'input': '3 3\\r\\nUURR\\r\\n', 'output': ['No']}, {'input': '-2 -2\\r\\nUURR\\r\\n', 'output': ['No']}]","human_sample_testcases_5":"[{'input': '999999999 0\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n', 'output': ['Yes']}, {'input': '-1 0\\r\\nR\\r\\n', 'output': ['No']}, {'input': '100 100\\r\\nRUL\\r\\n', 'output': ['No']}, {'input': '-1 1000000000\\r\\nLRRLU\\r\\n', 'output': ['Yes']}, {'input': '999999999 -999999999\\r\\nRRRRRRRRRRRRRRRRRRRRRRRRRDDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLUUUUUUUUUUUUUUUUUUUUUUU\\r\\n', 'output': ['Yes']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":59.09,"human_sample_branch_coverage_2":62.12,"human_sample_branch_coverage_3":71.21,"human_sample_branch_coverage_4":57.58,"human_sample_branch_coverage_5":80.3,"id":9,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":66.06} {"sample_inputs":"[\"5 3\\n0 4 5 6 7\", \"1 0\\n0\", \"5 0\\n1 2 3 4 5\"]","input_specification":"The first line contains two integers n and x (1\u2009\u2264\u2009n\u2009\u2264\u2009100, 0\u2009\u2264\u2009x\u2009\u2264\u2009100)\u00a0\u2014 the size of the set Dr. Evil owns, and the desired MEX. The second line contains n distinct non-negative integers not exceeding 100 that represent the set.","src_uid":"21f579ba807face432a7664091581cd8","source_code":"#include \nint main(){\n\tint n,x,i,t;\n\tscanf(\"%d %d\", &n,&x);\n\tint ans = x;\n \tfor(i = 0; i < n; i++){\n\t\tscanf(\"%d\", &t);\n\t\tif(t < x) ans--;\n else if(t==x)ans++;\n\t}\n\tprintf(\"%d\\n\", ans);\n\treturn 0;\n}","sample_outputs":"[\"2\", \"1\", \"0\"]","lang_cluster":"C","notes":"NoteFor the first test case Dr. Evil should add 1 and 2 to the set performing 2 operations.For the second test case Dr. Evil should erase 0 from the set. After that, the set becomes empty, so the MEX of it is 0.In the third test case the set is already evil.","output_specification":"The only line should contain one integer\u00a0\u2014 the minimal number of operations Dr. Evil should perform.","description":"Dr. Evil kidnapped Mahmoud and Ehab in the evil land because of their performance in the Evil Olympiad in Informatics (EOI). He decided to give them some problems to let them go.Dr. Evil is interested in sets, He has a set of n integers. Dr. Evil calls a set of integers evil if the MEX of it is exactly x. the MEX of a set of integers is the minimum non-negative integer that doesn't exist in it. For example, the MEX of the set {0,\u20092,\u20094} is 1 and the MEX of the set {1,\u20092,\u20093} is 0 .Dr. Evil is going to make his set evil. To do this he can perform some operations. During each operation he can add some non-negative integer to his set or erase some element from it. What is the minimal number of operations Dr. Evil has to perform to make his set evil?","human_testcases":"[{\"input\": \"5 3\\r\\n0 4 5 6 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0\\r\\n0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 0\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 5\\r\\n57 1 47 9 93 37 76 70 78 15\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 5\\r\\n99 98 93 97 95 100 92 94 91 96\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 5\\r\\n1 2 3 4 59 45 0 58 51 91\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n79 13 21 11 3 87 28 40 29 4 96 34 8 78 61 46 33 45 99 30 92 67 22 97 39 86 73 31 74 44 62 55 57 2 54 63 80 69 25 48 77 98 17 93 15 16 89 12 43 23 37 95 14 38 83 90 49 56 72 10 20 0 50 71 70 88 19 1 76 81 52 41 82 68 85 47 6 7 35 60 18 64 75 84 27 9 65 91 94 42 53 24 66 26 59 36 51 32 5 58\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 50\\r\\n95 78 46 92 80 18 79 58 30 72 19 89 39 29 44 65 15 100 59 8 96 9 62 67 41 42 82 14 57 32 71 77 40 5 7 51 28 53 85 23 16 35 3 91 6 11 75 61 17 66 13 47 36 56 10 22 83 60 48 24 26 97 4 33 76 86 70 0 34 64 52 43 21 49 55 74 1 73 81 25 54 63 94 84 20 68 87 12 31 88 38 93 37 90 98 69 99 45 27 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 33\\r\\n28 11 79 92 88 62 77 72 7 41 96 97 67 84 44 8 81 35 38 1 64 68 46 17 98 83 31 12 74 21 2 22 47 6 36 75 65 61 37 26 25 45 59 48 100 51 93 76 78 49 3 57 16 4 87 29 55 82 70 39 53 0 60 15 24 71 58 20 66 89 95 42 13 43 63 90 85 52 50 30 54 40 56 23 27 34 32 18 10 19 69 9 99 73 91 14 5 80 94 86\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99 33\\r\\n25 76 41 95 55 20 47 59 58 84 87 92 16 27 35 65 72 63 93 54 36 96 15 86 5 69 24 46 67 73 48 60 40 6 61 74 97 10 100 8 52 26 77 18 7 62 37 2 14 66 11 56 68 91 0 64 75 99 30 21 53 1 89 81 3 98 12 88 39 38 29 83 22 90 9 28 45 43 78 44 32 57 4 50 70 17 13 51 80 85 71 94 82 19 34 42 23 79 49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 100\\r\\n65 56 84 46 44 33 99 74 62 72 93 67 43 92 75 88 38 34 66 12 55 76 58 90 78 8 14 45 97 59 48 32 64 18 39 89 31 51 54 81 29 36 70 77 40 22 49 27 3 1 73 13 98 42 87 37 2 57 4 6 50 25 23 79 28 86 68 61 80 17 19 10 15 63 52 11 35 60 21 16 24 85 30 91 7 5 69 20 71 82 53 94 41 95 96 9 26 83 0 47\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54 39 15 26 83 44\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"89 100\\r\\n58 96 17 41 86 34 28 84 18 40 8 77 87 89 68 79 33 35 53 49 0 6 22 12 72 90 48 55 21 50 56 62 75 2 37 95 69 74 14 20 44 46 27 32 31 59 63 60 10 85 71 70 38 52 94 30 61 51 80 26 36 23 39 47 76 45 100 57 15 78 97 66 54 13 99 16 93 73 24 4 83 5 98 81 92 25 29 88 65\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"100 50\\r\\n7 95 24 76 81 78 60 69 83 84 100 1 65 31 48 92 73 39 18 89 38 97 10 42 8 55 98 51 21 90 62 77 16 91 0 94 4 37 19 17 67 35 45 41 56 20 15 85 75 28 59 27 12 54 61 68 36 5 79 93 66 11 70 49 50 34 30 25 96 46 64 14 32 22 47 40 58 23 43 9 87 82 26 53 80 52 3 86 13 99 33 71 6 88 57 74 2 44 72 63\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"77 0\\r\\n27 8 20 92 21 41 53 98 17 65 67 35 81 11 55 49 61 44 2 66 51 89 40 28 52 62 86 91 64 24 18 5 94 82 96 99 71 6 39 83 26 29 16 30 45 97 80 90 69 12 13 33 76 73 46 19 78 56 88 38 42 34 57 77 47 4 59 58 7 100 95 72 9 74 15 43 54\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 50\\r\\n55 36 0 32 81 6 17 43 24 13 30 19 8 59 71 45 15 74 3 41 99 42 86 47 2 94 35 1 66 95 38 49 4 27 96 89 34 44 92 25 51 39 54 28 80 77 20 14 48 40 68 56 31 63 33 78 69 37 18 26 83 70 23 82 91 65 67 52 61 53 7 22 60 21 12 73 72 87 75 100 90 29 64 79 98 85 5 62 93 84 50 46 97 58 57 16 9 10 76 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"77 0\\r\\n12 8 19 87 9 54 55 86 97 7 27 85 25 48 94 73 26 1 13 57 72 69 76 39 38 91 75 40 42 28 93 21 70 84 65 11 60 90 20 95 66 89 59 47 34 99 6 61 52 100 50 3 77 81 82 53 15 24 0 45 44 14 68 96 58 5 18 35 10 98 29 74 92 49 83 71 17\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 70\\r\\n25 94 66 65 10 99 89 6 70 31 7 40 20 92 64 27 21 72 77 98 17 43 47 44 48 81 38 56 100 39 90 22 88 76 3 83 86 29 33 55 82 79 49 11 2 16 12 78 85 69 32 97 26 15 53 24 23 91 51 67 34 35 52 5 62 50 95 18 71 13 75 8 30 42 93 36 45 60 63 46 57 41 87 0 84 54 74 37 4 58 28 19 96 61 80 9 1 14 73 68\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"89 19\\r\\n14 77 85 81 79 38 91 45 55 51 50 11 62 67 73 76 2 27 16 23 3 29 65 98 78 17 4 58 22 20 34 66 64 31 72 5 32 44 12 75 80 47 18 25 99 0 61 56 71 84 48 88 10 7 86 8 49 24 43 21 37 28 33 54 46 57 40 89 36 97 6 96 39 95 26 74 1 69 9 100 52 30 83 87 68 60 92 90 35\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"89 100\\r\\n69 61 56 45 11 41 42 32 28 29 0 76 7 65 13 35 36 82 10 39 26 34 38 40 92 12 17 54 24 46 88 70 66 27 100 52 85 62 22 48 86 68 21 49 53 94 67 20 1 90 77 84 31 87 58 47 95 33 4 72 93 83 8 51 91 80 99 43 71 19 44 59 98 97 64 9 81 16 79 63 25 37 3 75 2 55 50 6 18\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"77 0\\r\\n38 76 24 74 42 88 29 75 96 46 90 32 59 97 98 60 41 57 80 37 100 49 25 63 95 31 61 68 53 78 27 66 84 48 94 83 30 26 36 99 71 62 45 47 70 28 35 54 34 85 79 43 91 72 86 33 67 92 77 65 69 52 82 55 87 64 56 40 50 44 51 73 89 81 58 93 39\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"89 100\\r\\n38 90 80 64 35 44 56 11 15 89 23 12 49 70 72 60 63 85 92 10 45 83 8 88 41 33 16 6 61 76 62 71 87 13 25 77 74 0 1 37 96 93 7 94 21 82 34 78 4 73 65 20 81 95 50 32 48 17 69 55 68 5 51 27 53 43 91 67 59 46 86 84 99 24 22 3 97 98 40 36 26 58 57 9 42 30 52 2 47\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"77 0\\r\\n55 71 78 86 68 35 53 10 59 32 81 19 74 97 62 61 93 87 96 44 25 18 43 82 84 16 34 48 92 39 64 36 49 91 45 76 95 31 57 29 75 79 13 2 14 24 52 23 33 20 47 99 63 15 5 80 58 67 12 3 85 6 1 27 73 90 4 42 37 70 8 11 89 77 9 22 94\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"77 0\\r\\n12 75 31 71 44 8 3 82 21 77 50 29 57 74 40 10 15 42 84 2 100 9 28 72 92 0 49 11 90 55 17 36 19 54 68 52 4 69 97 91 5 39 59 45 89 62 53 83 16 94 76 60 95 47 30 51 7 48 20 70 67 32 58 78 63 34 56 93 99 88 24 1 66 22 25 14 13\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 70\\r\\n91 82 8 85 26 25 95 97 40 87 81 93 7 73 38 94 64 96 74 18 90 19 65 68 72 61 23 43 36 41 60 88 30 33 71 24 52 39 15 3 16 89 86 79 55 4 9 58 67 44 46 29 6 48 84 69 27 21 78 54 51 57 80 53 76 50 47 77 45 12 34 10 100 0 17 31 56 99 98 11 92 5 2 42 32 59 66 62 37 63 28 75 35 1 22 13 83 49 20 14\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"77 0\\r\\n51 5 81 62 30 22 11 0 83 16 79 85 52 70 69 10 8 47 58 3 24 34 44 14 82 66 99 17 28 31 64 67 23 49 94 45 4 12 27 15 21 6 43 72 87 2 63 92 35 39 59 9 90 78 93 20 65 36 60 89 50 41 61 84 77 86 76 100 38 68 53 97 96 95 7 19 88\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 100\\r\\n0\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 0\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100\\r\\n100\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"2 100\\r\\n0 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 5\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 3\\r\\n0 3 4 5 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 10\\r\\n0 1 2 3 4 5 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 2\\r\\n0 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1\\r\\n1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 1\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 6\\r\\n0 1 2 3 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2\\r\\n3 4 5\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 5\\r\\n1 2 3 4 5\\r\\n', 'output': ['2']}, {'input': '77 0\\r\\n38 76 24 74 42 88 29 75 96 46 90 32 59 97 98 60 41 57 80 37 100 49 25 63 95 31 61 68 53 78 27 66 84 48 94 83 30 26 36 99 71 62 45 47 70 28 35 54 34 85 79 43 91 72 86 33 67 92 77 65 69 52 82 55 87 64 56 40 50 44 51 73 89 81 58 93 39\\r\\n', 'output': ['0']}, {'input': '5 2\\r\\n1 2 3 4 5\\r\\n', 'output': ['2']}, {'input': '5 3\\r\\n0 4 5 6 7\\r\\n', 'output': ['2']}, {'input': '100 70\\r\\n25 94 66 65 10 99 89 6 70 31 7 40 20 92 64 27 21 72 77 98 17 43 47 44 48 81 38 56 100 39 90 22 88 76 3 83 86 29 33 55 82 79 49 11 2 16 12 78 85 69 32 97 26 15 53 24 23 91 51 67 34 35 52 5 62 50 95 18 71 13 75 8 30 42 93 36 45 60 63 46 57 41 87 0 84 54 74 37 4 58 28 19 96 61 80 9 1 14 73 68\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '100 100\\r\\n79 13 21 11 3 87 28 40 29 4 96 34 8 78 61 46 33 45 99 30 92 67 22 97 39 86 73 31 74 44 62 55 57 2 54 63 80 69 25 48 77 98 17 93 15 16 89 12 43 23 37 95 14 38 83 90 49 56 72 10 20 0 50 71 70 88 19 1 76 81 52 41 82 68 85 47 6 7 35 60 18 64 75 84 27 9 65 91 94 42 53 24 66 26 59 36 51 32 5 58\\r\\n', 'output': ['0']}, {'input': '2 2\\r\\n0 2\\r\\n', 'output': ['2']}, {'input': '100 33\\r\\n28 11 79 92 88 62 77 72 7 41 96 97 67 84 44 8 81 35 38 1 64 68 46 17 98 83 31 12 74 21 2 22 47 6 36 75 65 61 37 26 25 45 59 48 100 51 93 76 78 49 3 57 16 4 87 29 55 82 70 39 53 0 60 15 24 71 58 20 66 89 95 42 13 43 63 90 85 52 50 30 54 40 56 23 27 34 32 18 10 19 69 9 99 73 91 14 5 80 94 86\\r\\n', 'output': ['0']}, {'input': '100 100\\r\\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54 39 15 26 83 44\\r\\n', 'output': ['2']}, {'input': '1 100\\r\\n100\\r\\n', 'output': ['101']}]","human_sample_testcases_3":"[{'input': '5 2\\r\\n1 2 3 4 5\\r\\n', 'output': ['2']}, {'input': '77 0\\r\\n51 5 81 62 30 22 11 0 83 16 79 85 52 70 69 10 8 47 58 3 24 34 44 14 82 66 99 17 28 31 64 67 23 49 94 45 4 12 27 15 21 6 43 72 87 2 63 92 35 39 59 9 90 78 93 20 65 36 60 89 50 41 61 84 77 86 76 100 38 68 53 97 96 95 7 19 88\\r\\n', 'output': ['1']}, {'input': '77 0\\r\\n12 8 19 87 9 54 55 86 97 7 27 85 25 48 94 73 26 1 13 57 72 69 76 39 38 91 75 40 42 28 93 21 70 84 65 11 60 90 20 95 66 89 59 47 34 99 6 61 52 100 50 3 77 81 82 53 15 24 0 45 44 14 68 96 58 5 18 35 10 98 29 74 92 49 83 71 17\\r\\n', 'output': ['1']}, {'input': '89 100\\r\\n58 96 17 41 86 34 28 84 18 40 8 77 87 89 68 79 33 35 53 49 0 6 22 12 72 90 48 55 21 50 56 62 75 2 37 95 69 74 14 20 44 46 27 32 31 59 63 60 10 85 71 70 38 52 94 30 61 51 80 26 36 23 39 47 76 45 100 57 15 78 97 66 54 13 99 16 93 73 24 4 83 5 98 81 92 25 29 88 65\\r\\n', 'output': ['13']}, {'input': '2 100\\r\\n0 100\\r\\n', 'output': ['100']}]","human_sample_testcases_4":"[{'input': '100 100\\r\\n58 88 12 71 22 1 40 19 73 20 67 48 57 17 69 36 100 35 33 37 72 55 52 8 89 85 47 42 78 70 81 86 11 9 68 99 6 16 21 61 53 98 23 62 32 59 51 0 87 24 50 30 65 10 80 95 7 92 25 74 60 79 91 5 13 31 75 38 90 94 46 66 93 34 14 41 28 2 76 84 43 96 3 56 49 82 27 77 64 63 4 45 18 29 54 39 15 26 83 44\\r\\n', 'output': ['2']}, {'input': '5 5\\r\\n1 2 3 4 5\\r\\n', 'output': ['2']}, {'input': '100 70\\r\\n25 94 66 65 10 99 89 6 70 31 7 40 20 92 64 27 21 72 77 98 17 43 47 44 48 81 38 56 100 39 90 22 88 76 3 83 86 29 33 55 82 79 49 11 2 16 12 78 85 69 32 97 26 15 53 24 23 91 51 67 34 35 52 5 62 50 95 18 71 13 75 8 30 42 93 36 45 60 63 46 57 41 87 0 84 54 74 37 4 58 28 19 96 61 80 9 1 14 73 68\\r\\n', 'output': ['2']}, {'input': '89 19\\r\\n14 77 85 81 79 38 91 45 55 51 50 11 62 67 73 76 2 27 16 23 3 29 65 98 78 17 4 58 22 20 34 66 64 31 72 5 32 44 12 75 80 47 18 25 99 0 61 56 71 84 48 88 10 7 86 8 49 24 43 21 37 28 33 54 46 57 40 89 36 97 6 96 39 95 26 74 1 69 9 100 52 30 83 87 68 60 92 90 35\\r\\n', 'output': ['2']}, {'input': '77 0\\r\\n12 75 31 71 44 8 3 82 21 77 50 29 57 74 40 10 15 42 84 2 100 9 28 72 92 0 49 11 90 55 17 36 19 54 68 52 4 69 97 91 5 39 59 45 89 62 53 83 16 94 76 60 95 47 30 51 7 48 20 70 67 32 58 78 63 34 56 93 99 88 24 1 66 22 25 14 13\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '77 0\\r\\n12 75 31 71 44 8 3 82 21 77 50 29 57 74 40 10 15 42 84 2 100 9 28 72 92 0 49 11 90 55 17 36 19 54 68 52 4 69 97 91 5 39 59 45 89 62 53 83 16 94 76 60 95 47 30 51 7 48 20 70 67 32 58 78 63 34 56 93 99 88 24 1 66 22 25 14 13\\r\\n', 'output': ['1']}, {'input': '100 70\\r\\n91 82 8 85 26 25 95 97 40 87 81 93 7 73 38 94 64 96 74 18 90 19 65 68 72 61 23 43 36 41 60 88 30 33 71 24 52 39 15 3 16 89 86 79 55 4 9 58 67 44 46 29 6 48 84 69 27 21 78 54 51 57 80 53 76 50 47 77 45 12 34 10 100 0 17 31 56 99 98 11 92 5 2 42 32 59 66 62 37 63 28 75 35 1 22 13 83 49 20 14\\r\\n', 'output': ['0']}, {'input': '1 0\\r\\n100\\r\\n', 'output': ['0']}, {'input': '77 0\\r\\n38 76 24 74 42 88 29 75 96 46 90 32 59 97 98 60 41 57 80 37 100 49 25 63 95 31 61 68 53 78 27 66 84 48 94 83 30 26 36 99 71 62 45 47 70 28 35 54 34 85 79 43 91 72 86 33 67 92 77 65 69 52 82 55 87 64 56 40 50 44 51 73 89 81 58 93 39\\r\\n', 'output': ['0']}, {'input': '5 3\\r\\n0 4 5 6 7\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":10,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1\\n2\\n1\\n1\\n10\", \"1\\n2\\n1\\n1\\n8\"]","input_specification":"The input data contains integers vp,\u2009vd,\u2009t,\u2009f and c, one per line (1\u2009\u2264\u2009vp,\u2009vd\u2009\u2264\u2009100, 1\u2009\u2264\u2009t,\u2009f\u2009\u2264\u200910, 1\u2009\u2264\u2009c\u2009\u2264\u20091000).","src_uid":"c9c03666278acec35f0e273691fe0fff","source_code":"#include\nint main(){\n float vp,vd,t,f,c;\n float phm,d=0,time=0;\n int bijous=0;\n scanf(\"%f%f%f%f%f\",&vp,&vd,&t,&f,&c);\n for(phm=t*vp;;){\n \/\/printf(\"%f\\n\",phm);\n if(vd<=vp)\n break;\n phm+=phm*vp\/(vd-vp);\n if(phm>=c)\n break;\n else{\n phm+=f*vp+(phm\/vd)*vp;\n bijous++;\n }\n\n }\n printf(\"%d\",bijous);\n return 0;\n}\n","sample_outputs":"[\"2\", \"1\"]","lang_cluster":"C","notes":"NoteIn the first case one hour after the escape the dragon will discover it, and the princess will be 1 mile away from the cave. In two hours the dragon will overtake the princess 2 miles away from the cave, and she will need to drop the first bijou. Return to the cave and fixing the treasury will take the dragon two more hours; meanwhile the princess will be 4 miles away from the cave. Next time the dragon will overtake the princess 8 miles away from the cave, and she will need the second bijou, but after this she will reach the castle without any further trouble.The second case is similar to the first one, but the second time the dragon overtakes the princess when she has reached the castle, and she won't need the second bijou.","output_specification":"Output the minimal number of bijous required for the escape to succeed.","description":"The princess is going to escape the dragon's cave, and she needs to plan it carefully.The princess runs at vp miles per hour, and the dragon flies at vd miles per hour. The dragon will discover the escape after t hours and will chase the princess immediately. Looks like there's no chance to success, but the princess noticed that the dragon is very greedy and not too smart. To delay him, the princess decides to borrow a couple of bijous from his treasury. Once the dragon overtakes the princess, she will drop one bijou to distract him. In this case he will stop, pick up the item, return to the cave and spend f hours to straighten the things out in the treasury. Only after this will he resume the chase again from the very beginning.The princess is going to run on the straight. The distance between the cave and the king's castle she's aiming for is c miles. How many bijous will she need to take from the treasury to be able to reach the castle? If the dragon overtakes the princess at exactly the same moment she has reached the castle, we assume that she reached the castle before the dragon reached her, and doesn't need an extra bijou to hold him off.","human_testcases":"[{\"input\": \"1\\r\\n2\\r\\n1\\r\\n1\\r\\n10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n2\\r\\n1\\r\\n1\\r\\n8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n8\\r\\n1\\r\\n2\\r\\n100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n100\\r\\n10\\r\\n10\\r\\n739\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"17\\r\\n99\\r\\n2\\r\\n3\\r\\n293\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n5\\r\\n1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n99\\r\\n1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n100\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n100\\r\\n1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"152\"]}, {\"input\": \"10\\r\\n1\\r\\n10\\r\\n1\\r\\n11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"98\\r\\n94\\r\\n4\\r\\n3\\r\\n437\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"58\\r\\n4\\r\\n1\\r\\n10\\r\\n392\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"74\\r\\n11\\r\\n8\\r\\n7\\r\\n835\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"86\\r\\n21\\r\\n7\\r\\n2\\r\\n982\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n27\\r\\n4\\r\\n9\\r\\n937\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"62\\r\\n89\\r\\n8\\r\\n1\\r\\n83\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"78\\r\\n7\\r\\n7\\r\\n6\\r\\n38\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"94\\r\\n14\\r\\n2\\r\\n3\\r\\n481\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\n24\\r\\n9\\r\\n8\\r\\n628\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"59\\r\\n7\\r\\n8\\r\\n10\\r\\n357\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75\\r\\n26\\r\\n4\\r\\n3\\r\\n504\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"87\\r\\n32\\r\\n3\\r\\n8\\r\\n754\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"51\\r\\n42\\r\\n10\\r\\n4\\r\\n901\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"63\\r\\n4\\r\\n7\\r\\n1\\r\\n48\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"79\\r\\n10\\r\\n4\\r\\n6\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"95\\r\\n20\\r\\n9\\r\\n3\\r\\n149\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"55\\r\\n35\\r\\n5\\r\\n10\\r\\n592\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"71\\r\\n45\\r\\n2\\r\\n6\\r\\n547\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"83\\r\\n7\\r\\n7\\r\\n7\\r\\n46\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n32\\r\\n1\\r\\n8\\r\\n537\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17\\r\\n42\\r\\n10\\r\\n5\\r\\n684\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"77\\r\\n1\\r\\n6\\r\\n8\\r\\n831\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"93\\r\\n19\\r\\n3\\r\\n3\\r\\n82\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5\\r\\n25\\r\\n8\\r\\n9\\r\\n228\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21\\r\\n35\\r\\n5\\r\\n6\\r\\n535\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"85\\r\\n45\\r\\n2\\r\\n1\\r\\n682\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"97\\r\\n4\\r\\n8\\r\\n8\\r\\n829\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13\\r\\n14\\r\\n3\\r\\n3\\r\\n79\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"25\\r\\n28\\r\\n4\\r\\n9\\r\\n226\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"34\\r\\n9\\r\\n6\\r\\n6\\r\\n70\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50\\r\\n15\\r\\n1\\r\\n3\\r\\n216\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n25\\r\\n9\\r\\n8\\r\\n363\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"26\\r\\n36\\r\\n4\\r\\n7\\r\\n318\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"38\\r\\n50\\r\\n1\\r\\n8\\r\\n761\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n12\\r\\n6\\r\\n4\\r\\n907\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"14\\r\\n18\\r\\n5\\r\\n9\\r\\n862\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"30\\r\\n28\\r\\n4\\r\\n6\\r\\n9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"46\\r\\n39\\r\\n8\\r\\n3\\r\\n964\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\n45\\r\\n7\\r\\n8\\r\\n407\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"67\\r\\n34\\r\\n7\\r\\n4\\r\\n954\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"31\\r\\n40\\r\\n6\\r\\n1\\r\\n397\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"43\\r\\n50\\r\\n1\\r\\n8\\r\\n544\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"59\\r\\n9\\r\\n7\\r\\n3\\r\\n498\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"71\\r\\n19\\r\\n2\\r\\n10\\r\\n645\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"35\\r\\n37\\r\\n9\\r\\n5\\r\\n792\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"47\\r\\n43\\r\\n10\\r\\n9\\r\\n43\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"63\\r\\n53\\r\\n5\\r\\n4\\r\\n189\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"79\\r\\n11\\r\\n2\\r\\n1\\r\\n144\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"39\\r\\n22\\r\\n8\\r\\n6\\r\\n291\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"49\\r\\n7\\r\\n2\\r\\n5\\r\\n326\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n1\\r\\n1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n1\\r\\n1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n1\\r\\n1\\r\\n1\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n1\\r\\n1\\r\\n1\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5\\r\\n3\\r\\n3\\r\\n3\\r\\n999\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '30\\r\\n28\\r\\n4\\r\\n6\\r\\n9\\r\\n', 'output': ['0']}, {'input': '5\\r\\n8\\r\\n1\\r\\n2\\r\\n100\\r\\n', 'output': ['2']}, {'input': '49\\r\\n7\\r\\n2\\r\\n5\\r\\n326\\r\\n', 'output': ['0']}, {'input': '2\\r\\n100\\r\\n10\\r\\n10\\r\\n739\\r\\n', 'output': ['22']}, {'input': '87\\r\\n32\\r\\n3\\r\\n8\\r\\n754\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '50\\r\\n15\\r\\n1\\r\\n3\\r\\n216\\r\\n', 'output': ['0']}, {'input': '13\\r\\n14\\r\\n3\\r\\n3\\r\\n79\\r\\n', 'output': ['0']}, {'input': '85\\r\\n45\\r\\n2\\r\\n1\\r\\n682\\r\\n', 'output': ['0']}, {'input': '35\\r\\n37\\r\\n9\\r\\n5\\r\\n792\\r\\n', 'output': ['0']}, {'input': '2\\r\\n1\\r\\n1\\r\\n1\\r\\n1000\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '2\\r\\n1\\r\\n1\\r\\n1\\r\\n1000\\r\\n', 'output': ['0']}, {'input': '2\\r\\n1\\r\\n1\\r\\n1\\r\\n100\\r\\n', 'output': ['0']}, {'input': '13\\r\\n14\\r\\n3\\r\\n3\\r\\n79\\r\\n', 'output': ['0']}, {'input': '63\\r\\n4\\r\\n7\\r\\n1\\r\\n48\\r\\n', 'output': ['0']}, {'input': '2\\r\\n12\\r\\n6\\r\\n4\\r\\n907\\r\\n', 'output': ['10']}]","human_sample_testcases_4":"[{'input': '93\\r\\n19\\r\\n3\\r\\n3\\r\\n82\\r\\n', 'output': ['0']}, {'input': '1\\r\\n2\\r\\n1\\r\\n1\\r\\n8\\r\\n', 'output': ['1']}, {'input': '31\\r\\n40\\r\\n6\\r\\n1\\r\\n397\\r\\n', 'output': ['0']}, {'input': '51\\r\\n42\\r\\n10\\r\\n4\\r\\n901\\r\\n', 'output': ['0']}, {'input': '50\\r\\n15\\r\\n1\\r\\n3\\r\\n216\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '38\\r\\n50\\r\\n1\\r\\n8\\r\\n761\\r\\n', 'output': ['1']}, {'input': '67\\r\\n34\\r\\n7\\r\\n4\\r\\n954\\r\\n', 'output': ['0']}, {'input': '79\\r\\n11\\r\\n2\\r\\n1\\r\\n144\\r\\n', 'output': ['0']}, {'input': '1\\r\\n100\\r\\n1\\r\\n1\\r\\n1000\\r\\n', 'output': ['152']}, {'input': '79\\r\\n10\\r\\n4\\r\\n6\\r\\n3\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":85.71,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":11,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.142,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"3 2 8\", \"1 2 -18\", \"2 2 -1\"]","input_specification":"The first line contains three space-separated integers: a,\u2009b,\u2009c (1\u2009\u2264\u2009a\u2009\u2264\u20095;\u00a01\u2009\u2264\u2009b\u2009\u2264\u200910000;\u00a0\u2009-\u200910000\u2009\u2264\u2009c\u2009\u2264\u200910000).","src_uid":"e477185b94f93006d7ae84c8f0817009","source_code":"#include \n#include \n\nint chk(long long x)\n{\n\tint ret = 0;\n\twhile(x)\n\t{\n\t\tret += (x%10);\n\t\tx\/=10;\n\t}\n\treturn ret;\n}\n\nlong long po(long long int a,long long x)\n{\n\tif(x == 0)\n\t\treturn 1;\n\tlong long temp;\n\ttemp = po(a,x\/2);\n\ttemp *= temp;\n\tif(x%2)\n\t\ttemp *= a;\n\treturn temp;\n}\n\nint main()\n{\n\tlong long int a,b,c;\n\tscanf(\"%lld %lld %lld\",&a,&b,&c);\n\tlong long int i;\n\tint cnt = 0;\n\tlong long ans[100];\n\tfor(i=1;i<=81;i++)\n\t{\n\t\tlong long temp = b*(po(i,a)) + c;\n\t\tif(temp <= 1000000000 && temp >=0 && chk(temp) == i)\n\t\t\tans[cnt++] = temp;\n\t}\n\n\tprintf(\"%d\\n\",cnt );\n\tfor(i=0;i\n#include \n\nint main()\n{\n int i, j, n, m, x1, y1, x2, y2;\n\n scanf(\"%d %d %d %d %d %d\", &n, &m, &x1, &y1, &x2, &y2);\n\n i = abs(x1 - x2);\n j = abs(y1 - y2);\n\n if (i > j) {\n int aux = i;\n i = j;\n j = aux;\n }\n\n if ((i <= 2 && j <= 4) || (i == 3 && j == 3)) {\n puts(\"First\");\n } else {\n puts(\"Second\");\n }\n\n return 0;\n}\n","sample_outputs":"[\"First\", \"First\", \"Second\"]","lang_cluster":"C","notes":null,"output_specification":"If the first player wins, print \"First\" without the quotes. Otherwise, print \"Second\" without the quotes.","description":"Two players play a game. The game is played on a rectangular board with n\u2009\u00d7\u2009m squares. At the beginning of the game two different squares of the board have two chips. The first player's goal is to shift the chips to the same square. The second player aims to stop the first one with a tube of superglue.We'll describe the rules of the game in more detail.The players move in turns. The first player begins.With every move the first player chooses one of his unglued chips, and shifts it one square to the left, to the right, up or down. It is not allowed to move a chip beyond the board edge. At the beginning of a turn some squares of the board may be covered with a glue. The first player can move the chip to such square, in this case the chip gets tightly glued and cannot move any longer.At each move the second player selects one of the free squares (which do not contain a chip or a glue) and covers it with superglue. The glue dries long and squares covered with it remain sticky up to the end of the game.If, after some move of the first player both chips are in the same square, then the first player wins. If the first player cannot make a move (both of his chips are glued), then the second player wins. Note that the situation where the second player cannot make a move is impossible \u2014 he can always spread the glue on the square from which the first player has just moved the chip.We will further clarify the case where both chips are glued and are in the same square. In this case the first player wins as the game ends as soon as both chips are in the same square, and the condition of the loss (the inability to move) does not arise.You know the board sizes and the positions of the two chips on it. At the beginning of the game all board squares are glue-free. Find out who wins if the players play optimally.","human_testcases":"[{\"input\": \"1 6 1 2 1 6\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"6 5 4 3 2 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"10 10 1 1 10 10\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 2 1 1 1 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"4 4 1 4 4 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"25 32 17 18 20 19\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"30 1 10 1 20 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"28 17 20 10 27 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 5 1 1 5 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 4 1 4 5 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"95 28 50 12 50 13\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"7 41 3 5 3 6\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"45 62 28 48 28 50\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"57 17 12 7 12 10\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"73 88 30 58 30 62\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"33 13 12 1 12 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"49 34 38 19 38 25\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"61 39 14 30 14 37\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 32 71 12 71 22\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"96 54 9 30 9 47\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"57 85 29 40 29 69\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"64 96 4 2 4 80\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"99 100 24 1 24 100\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"18 72 2 71 3 71\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"24 68 19 14 18 15\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"24 32 6 2 7 4\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"28 14 21 2 20 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"30 85 9 45 8 49\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"34 55 7 25 8 30\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"34 39 18 1 17 7\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"21 18 16 6 15 17\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"37 100 33 13 32 30\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"11 97 2 29 1 76\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"89 100 54 1 55 100\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"80 97 70 13 68 13\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"24 97 21 54 19 55\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"76 7 24 4 26 6\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"20 77 5 49 3 52\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"18 18 11 12 13 16\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"60 100 28 80 26 85\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"14 96 3 80 1 86\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"40 43 40 9 38 28\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"44 99 10 5 8 92\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"52 70 26 65 23 65\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"13 25 4 2 7 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"36 76 36 49 33 51\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"64 91 52 64 49 67\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"87 15 56 8 59 12\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"48 53 24 37 21 42\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"71 85 10 14 13 20\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"23 90 6 31 9 88\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"47 95 27 70 23 70\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"63 54 19 22 23 23\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"47 91 36 61 32 63\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"63 22 54 16 58 19\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"15 11 12 5 8 9\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"31 80 28 70 24 75\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"15 48 6 42 10 48\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"21 68 2 13 6 57\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"73 64 63 32 68 32\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"89 81 33 18 28 19\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"13 62 10 13 5 15\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"35 19 4 8 9 11\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"51 8 24 3 19 7\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"73 27 40 8 45 13\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"51 76 50 5 45 76\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"74 88 33 20 39 20\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"28 7 17 5 11 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"8 33 2 21 8 23\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"30 47 9 32 3 35\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 5 10 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"84 43 71 6 77 26\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"87 13 77 7 70 7\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"41 34 27 7 20 8\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"73 79 17 42 10 67\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"48 86 31 36 23 36\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"16 97 7 4 15 94\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"48 11 33 8 24 8\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"39 46 21 22 30 35\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"96 75 15 10 6 65\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"25 68 3 39 20 41\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"41 64 10 21 29 50\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"24 65 23 18 3 64\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"40 100 4 1 30 100\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"73 95 58 11 11 24\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"89 51 76 1 25 51\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"77 99 56 1 3 99\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"97 94 96 2 7 93\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 100 100\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 94 1 30 100 30\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 1 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 5 1 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 5 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 10 10 13 14\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 1 1 5 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 1 1 1 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 3 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"4 5 1 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 5 1 1 3 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"50 50 1 1 5 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 5 1 5 4 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 2 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"50 50 1 1 4 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 5 1 1 5 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 1 1 3 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"6 6 1 1 6 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 4 1 1 5 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"6 2 6 1 1 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 3 4 3 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"10 10 1 1 5 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"10 10 6 1 1 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 10 1 1 6 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"50 50 1 1 5 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"3 5 1 1 3 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"5 5 1 1 5 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"10 10 7 7 3 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1 1 5 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"6 6 1 1 1 6\\r\\n\", \"output\": [\"Second\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 10 1 1 10 10\\r\\n', 'output': ['Second']}, {'input': '13 62 10 13 5 15\\r\\n', 'output': ['Second']}, {'input': '48 53 24 37 21 42\\r\\n', 'output': ['Second']}, {'input': '64 91 52 64 49 67\\r\\n', 'output': ['First']}, {'input': '25 68 3 39 20 41\\r\\n', 'output': ['Second']}]","human_sample_testcases_2":"[{'input': '1 2 1 1 1 2\\r\\n', 'output': ['First']}, {'input': '60 100 28 80 26 85\\r\\n', 'output': ['Second']}, {'input': '89 100 54 1 55 100\\r\\n', 'output': ['Second']}, {'input': '73 27 40 8 45 13\\r\\n', 'output': ['Second']}, {'input': '3 5 1 1 3 5\\r\\n', 'output': ['First']}]","human_sample_testcases_3":"[{'input': '50 50 1 1 5 4\\r\\n', 'output': ['Second']}, {'input': '16 97 7 4 15 94\\r\\n', 'output': ['Second']}, {'input': '10 10 1 1 1 6\\r\\n', 'output': ['Second']}, {'input': '63 22 54 16 58 19\\r\\n', 'output': ['Second']}, {'input': '48 53 24 37 21 42\\r\\n', 'output': ['Second']}]","human_sample_testcases_4":"[{'input': '5 5 1 1 4 5\\r\\n', 'output': ['Second']}, {'input': '47 91 36 61 32 63\\r\\n', 'output': ['First']}, {'input': '95 28 50 12 50 13\\r\\n', 'output': ['First']}, {'input': '10 10 1 1 6 2\\r\\n', 'output': ['Second']}, {'input': '100 100 1 1 3 5\\r\\n', 'output': ['First']}]","human_sample_testcases_5":"[{'input': '7 41 3 5 3 6\\r\\n', 'output': ['First']}, {'input': '61 39 14 30 14 37\\r\\n', 'output': ['Second']}, {'input': '47 95 27 70 23 70\\r\\n', 'output': ['First']}, {'input': '4 4 1 4 4 1\\r\\n', 'output': ['First']}, {'input': '100 100 1 1 3 5\\r\\n', 'output': ['First']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":75.0,"human_sample_line_coverage_3":91.67,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":60.0,"human_sample_branch_coverage_3":80.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":90.0,"id":13,"human_sample_pass_rate":100.0,"human_sample_line_coverage":93.334,"human_sample_branch_coverage":82.0} {"sample_inputs":"[\"2 3\", \"8 2\"]","input_specification":"The first line of the input contains two integers, given in the decimal notation, n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009109)\u00a0\u2014 the number of hours in one day and the number of minutes in one hour, respectively.","src_uid":"0930c75f57dd88a858ba7bb0f11f1b1c","source_code":"#include \n#include \n\nint main() {\n\tint n, m, d;\n\tscanf(\"%d%d\", &n, &m);\n\tint dn = 1, dm = 1;\n\tfor(int k = 7 ; k < n ; k *= 7) dn++;\n\tfor(int k = 7 ; k < m ; k *= 7) dm++;\t\n\td = dn + dm;\n\tif(d > 7) {\n\t\tprintf(\"0\\n\");\n\t\treturn 0;\n\t}\n\tint r = 0;\n\tfor(int i=0 ; i 1) {\n\t\t\t\t\tr--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"%d\\n\", r);\n\treturn 0;\n}","sample_outputs":"[\"4\", \"5\"]","lang_cluster":"C","notes":"NoteIn the first sample, possible pairs are: (0:\u20091), (0:\u20092), (1:\u20090), (1:\u20092).In the second sample, possible pairs are: (02:\u20091), (03:\u20091), (04:\u20091), (05:\u20091), (06:\u20091).","output_specification":"Print one integer in decimal notation\u00a0\u2014 the number of different pairs of hour and minute, such that all digits displayed on the watches are distinct.","description":"Robbers, who attacked the Gerda's cab, are very successful in covering from the kingdom police. To make the goal of catching them even harder, they use their own watches.First, as they know that kingdom police is bad at math, robbers use the positional numeral system with base 7. Second, they divide one day in n hours, and each hour in m minutes. Personal watches of each robber are divided in two parts: first of them has the smallest possible number of places that is necessary to display any integer from 0 to n\u2009-\u20091, while the second has the smallest possible number of places that is necessary to display any integer from 0 to m\u2009-\u20091. Finally, if some value of hours or minutes can be displayed using less number of places in base 7 than this watches have, the required number of zeroes is added at the beginning of notation.Note that to display number 0 section of the watches is required to have at least one place.Little robber wants to know the number of moments of time (particular values of hours and minutes), such that all digits displayed on the watches are distinct. Help her calculate this number.","human_testcases":"[{\"input\": \"2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"344 344\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"282475250 282475250\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 282475250\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16808 7\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"2402 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"343 2401\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"1582 301\\r\\n\", \"output\": [\"2874\"]}, {\"input\": \"421414245 4768815\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2401 343\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"282475250 8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 7\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"50 7\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"16808 8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2402 49\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"123 123\\r\\n\", \"output\": [\"360\"]}, {\"input\": \"123 456\\r\\n\", \"output\": [\"150\"]}, {\"input\": \"1 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 67\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"7 117649\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"2400 342\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"2400 227\\r\\n\", \"output\": [\"3360\"]}, {\"input\": \"117648 5\\r\\n\", \"output\": [\"3600\"]}, {\"input\": \"16808 41\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 16808\\r\\n\", \"output\": [\"240\"]}, {\"input\": \"823542 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 823544\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"117650 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 3\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"2402 343\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2402 50\\r\\n', 'output': ['0']}, {'input': '3 16808\\r\\n', 'output': ['240']}, {'input': '50 7\\r\\n', 'output': ['120']}, {'input': '16808 41\\r\\n', 'output': ['0']}, {'input': '8 282475250\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '8 8\\r\\n', 'output': ['0']}, {'input': '50 7\\r\\n', 'output': ['120']}, {'input': '2402 49\\r\\n', 'output': ['720']}, {'input': '1 1\\r\\n', 'output': ['0']}, {'input': '2 3\\r\\n', 'output': ['4']}]","human_sample_testcases_3":"[{'input': '3 823544\\r\\n', 'output': ['0']}, {'input': '282475250 282475250\\r\\n', 'output': ['0']}, {'input': '8 8\\r\\n', 'output': ['0']}, {'input': '2402 343\\r\\n', 'output': ['0']}, {'input': '1 2\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '8 2\\r\\n', 'output': ['5']}, {'input': '8 8\\r\\n', 'output': ['0']}, {'input': '2402 49\\r\\n', 'output': ['720']}, {'input': '117650 5\\r\\n', 'output': ['0']}, {'input': '343 2401\\r\\n', 'output': ['5040']}]","human_sample_testcases_5":"[{'input': '7 117649\\r\\n', 'output': ['5040']}, {'input': '282475250 8\\r\\n', 'output': ['0']}, {'input': '343 2401\\r\\n', 'output': ['5040']}, {'input': '50 7\\r\\n', 'output': ['120']}, {'input': '344 344\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":92.59,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":94.44,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":14,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.518,"human_sample_branch_coverage":98.888} {"sample_inputs":"[\"500 1000 20 30\", \"1000 1000 1 1\", \"1500 1000 176 177\"]","input_specification":"The first line contains four integers a, b, c, d (250\u2009\u2264\u2009a,\u2009b\u2009\u2264\u20093500, 0\u2009\u2264\u2009c,\u2009d\u2009\u2264\u2009180). It is guaranteed that numbers a and b are divisible by 250 (just like on any real Codeforces round).","src_uid":"95b19d7569d6b70bd97d46a8541060d0","source_code":"#include \nint max(int a, int b){\n int maxim;\n return maxim=(a>=b)?a:b;\n}\n\nint main(void)\n{\n int a,b,c,d, misha, vasya;\n scanf(\"%d %d %d %d\", &a,&b,&c,&d);\n misha = max((3*a)\/10 ,a- ((a*c)\/250));\n vasya = max((3*b)\/10 ,b-((b*d)\/250));\n if(misha>vasya) printf(\"Misha\");\n else if(misha\nint t,T1,T2,s,f,x1,x2,p,d,t1,t2,i;\/\/\/T2 \ufffd\ufffd T1 \ufffd\ufffd\nint main()\n{\n scanf(\"%d %d %d %d %d %d %d\",&s,&x1,&x2,&t1,&t2,&p,&d);\n if(x2-x1>0) f=1;\n else f=-1;\n T2=(x2-x1)*t2*f;\n if(t1x2&&d<0)){\n t=(f*x1-d*p)*t1*t2\/(t2-t1);\n }\n else\n t=(2*s+x1*f-d*p)*t1*t2\/(t2-t1);\n }\n else\n {\n printf(\"%d\",T2);\n return 0;\n }\n if(tx2&&d<0)){\n t=(f*x2-d*p)*t1;\n }\n else\n t=(2*s+x2*f-d*p)*t1;\n printf(\"%d\",t);\n }\n else\n printf(\"%d\",T2);\n return 0;\n}\n","sample_outputs":"[\"8\", \"7\"]","lang_cluster":"C","notes":"NoteIn the first example it is profitable for Igor to go by foot and not to wait the tram. Thus, he has to pass 2 meters and it takes 8 seconds in total, because he passes 1 meter per 4 seconds. In the second example Igor can, for example, go towards the point x2 and get to the point 1 in 6 seconds (because he has to pass 3 meters, but he passes 1 meters per 2 seconds). At that moment the tram will be at the point 1, so Igor can enter the tram and pass 1 meter in 1 second. Thus, Igor will reach the point x2 in 7 seconds in total.","output_specification":"Print the minimum time in seconds which Igor needs to get from the point x1 to the point x2.","description":"The tram in Berland goes along a straight line from the point 0 to the point s and back, passing 1 meter per t1 seconds in both directions. It means that the tram is always in the state of uniform rectilinear motion, instantly turning around at points x\u2009=\u20090 and x\u2009=\u2009s.Igor is at the point x1. He should reach the point x2. Igor passes 1 meter per t2 seconds. Your task is to determine the minimum time Igor needs to get from the point x1 to the point x2, if it is known where the tram is and in what direction it goes at the moment Igor comes to the point x1.Igor can enter the tram unlimited number of times at any moment when his and the tram's positions coincide. It is not obligatory that points in which Igor enter and exit the tram are integers. Assume that any boarding and unboarding happens instantly. Igor can move arbitrary along the line (but not faster than 1 meter per t2 seconds). He can also stand at some point for some time.","human_testcases":"[{\"input\": \"4 2 4\\r\\n3 4\\r\\n1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 4 0\\r\\n1 2\\r\\n3 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5 4 0\\r\\n5 14\\r\\n1 -1\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"10 7 2\\r\\n7 9\\r\\n9 -1\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"20 5 19\\r\\n163 174\\r\\n4 1\\r\\n\", \"output\": [\"2436\"]}, {\"input\": \"1000 610 733\\r\\n226 690\\r\\n357 1\\r\\n\", \"output\": [\"84870\"]}, {\"input\": \"40 31 14\\r\\n628 1000\\r\\n36 1\\r\\n\", \"output\": [\"17000\"]}, {\"input\": \"100 20 83\\r\\n186 434\\r\\n64 -1\\r\\n\", \"output\": [\"27342\"]}, {\"input\": \"200 179 81\\r\\n126 457\\r\\n37 -1\\r\\n\", \"output\": [\"44786\"]}, {\"input\": \"400 30 81\\r\\n193 1000\\r\\n338 1\\r\\n\", \"output\": [\"51000\"]}, {\"input\": \"500 397 440\\r\\n202 1000\\r\\n75 1\\r\\n\", \"output\": [\"43000\"]}, {\"input\": \"600 443 587\\r\\n260 1000\\r\\n548 -1\\r\\n\", \"output\": [\"144000\"]}, {\"input\": \"799 254 294\\r\\n539 1000\\r\\n284 -1\\r\\n\", \"output\": [\"40000\"]}, {\"input\": \"801 489 351\\r\\n86 702\\r\\n125 1\\r\\n\", \"output\": [\"96836\"]}, {\"input\": \"999 951 297\\r\\n62 106\\r\\n574 1\\r\\n\", \"output\": [\"69324\"]}, {\"input\": \"1000 711 437\\r\\n42 126\\r\\n745 1\\r\\n\", \"output\": [\"34356\"]}, {\"input\": \"1000 812 761\\r\\n230 1000\\r\\n696 -1\\r\\n\", \"output\": [\"51000\"]}, {\"input\": \"1000 913 474\\r\\n34 162\\r\\n566 -1\\r\\n\", \"output\": [\"71118\"]}, {\"input\": \"1000 394 798\\r\\n155 673\\r\\n954 -1\\r\\n\", \"output\": [\"271560\"]}, {\"input\": \"1000 876 884\\r\\n299 1000\\r\\n825 1\\r\\n\", \"output\": [\"8000\"]}, {\"input\": \"2 0 2\\r\\n1 1\\r\\n1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 4 2\\r\\n1 2\\r\\n3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 2 4\\r\\n3 4\\r\\n2 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"200 10 100\\r\\n1 100\\r\\n20 1\\r\\n\", \"output\": [\"480\"]}, {\"input\": \"6 4 2\\r\\n1 2\\r\\n3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 1 3\\r\\n1 2\\r\\n1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 3 6\\r\\n1 2\\r\\n3 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000 50 51\\r\\n1 3\\r\\n50 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 1 2\\r\\n1 100\\r\\n1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 1 4\\r\\n1 100\\r\\n1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 0 5\\r\\n1 100\\r\\n7 1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"5 4 1\\r\\n1 100\\r\\n4 -1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 6 9\\r\\n3 100\\r\\n5 1\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"50 10 30\\r\\n1 50\\r\\n10 1\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"4 1 4\\r\\n1 100\\r\\n2 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 5 9\\r\\n1 10\\r\\n5 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"20 15 10\\r\\n5 2\\r\\n3 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2 2 0\\r\\n7 3\\r\\n1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 1 9\\r\\n1 10\\r\\n1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000 2 902\\r\\n1 1000\\r\\n2 1\\r\\n\", \"output\": [\"900\"]}, {\"input\": \"100 9 6\\r\\n3 100\\r\\n5 1\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"10 1 6\\r\\n1 10\\r\\n3 -1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1000 902 2\\r\\n1 1000\\r\\n902 -1\\r\\n\", \"output\": [\"900\"]}, {\"input\": \"100 50 25\\r\\n1 1000\\r\\n10 1\\r\\n\", \"output\": [\"165\"]}, {\"input\": \"5 3 0\\r\\n1 2\\r\\n4 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 1 2\\r\\n1 10\\r\\n3 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10 4 8\\r\\n1 5\\r\\n4 -1\\r\\n\", \"output\": [\"12\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 3 6\\r\\n1 2\\r\\n3 1\\r\\n', 'output': ['3']}, {'input': '100 9 6\\r\\n3 100\\r\\n5 1\\r\\n', 'output': ['300']}, {'input': '1000 876 884\\r\\n299 1000\\r\\n825 1\\r\\n', 'output': ['8000']}, {'input': '10 7 2\\r\\n7 9\\r\\n9 -1\\r\\n', 'output': ['45']}, {'input': '1000 812 761\\r\\n230 1000\\r\\n696 -1\\r\\n', 'output': ['51000']}]","human_sample_testcases_2":"[{'input': '10 0 5\\r\\n1 100\\r\\n7 1\\r\\n', 'output': ['18']}, {'input': '5 3 0\\r\\n1 2\\r\\n4 -1\\r\\n', 'output': ['4']}, {'input': '200 10 100\\r\\n1 100\\r\\n20 1\\r\\n', 'output': ['480']}, {'input': '20 15 10\\r\\n5 2\\r\\n3 1\\r\\n', 'output': ['10']}, {'input': '500 397 440\\r\\n202 1000\\r\\n75 1\\r\\n', 'output': ['43000']}]","human_sample_testcases_3":"[{'input': '5 4 0\\r\\n5 14\\r\\n1 -1\\r\\n', 'output': ['55']}, {'input': '2 2 0\\r\\n7 3\\r\\n1 1\\r\\n', 'output': ['6']}, {'input': '3 1 3\\r\\n1 2\\r\\n1 1\\r\\n', 'output': ['2']}, {'input': '500 397 440\\r\\n202 1000\\r\\n75 1\\r\\n', 'output': ['43000']}, {'input': '999 951 297\\r\\n62 106\\r\\n574 1\\r\\n', 'output': ['69324']}]","human_sample_testcases_4":"[{'input': '999 951 297\\r\\n62 106\\r\\n574 1\\r\\n', 'output': ['69324']}, {'input': '40 31 14\\r\\n628 1000\\r\\n36 1\\r\\n', 'output': ['17000']}, {'input': '600 443 587\\r\\n260 1000\\r\\n548 -1\\r\\n', 'output': ['144000']}, {'input': '100 20 83\\r\\n186 434\\r\\n64 -1\\r\\n', 'output': ['27342']}, {'input': '200 10 100\\r\\n1 100\\r\\n20 1\\r\\n', 'output': ['480']}]","human_sample_testcases_5":"[{'input': '5 4 0\\r\\n5 14\\r\\n1 -1\\r\\n', 'output': ['55']}, {'input': '10 1 9\\r\\n1 10\\r\\n1 1\\r\\n', 'output': ['8']}, {'input': '1000 711 437\\r\\n42 126\\r\\n745 1\\r\\n', 'output': ['34356']}, {'input': '5 3 0\\r\\n1 2\\r\\n4 -1\\r\\n', 'output': ['4']}, {'input': '100 9 6\\r\\n3 100\\r\\n5 1\\r\\n', 'output': ['300']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":83.33,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":56.0,"human_sample_branch_coverage_2":74.0,"human_sample_branch_coverage_3":56.0,"human_sample_branch_coverage_4":60.0,"human_sample_branch_coverage_5":78.0,"id":16,"human_sample_pass_rate":100.0,"human_sample_line_coverage":91.11,"human_sample_branch_coverage":64.8} {"sample_inputs":"[\"4\\n1 3\\n2 3\\n1 4\\n5 3\", \"5\\n1 2\\n2 3\\n3 4\\n4 5\\n5 1\"]","input_specification":"The first line contains an integer m (0\u2009\u2264\u2009m\u2009\u2264\u200910), which is the number of relations of acquaintances among the five friends of Igor's. Each of the following m lines contains two integers ai and bi (1\u2009\u2264\u2009ai,\u2009bi\u2009\u2264\u20095;ai\u2009\u2260\u2009bi), where (ai,\u2009bi) is a pair of acquainted people. It is guaranteed that each pair of the acquaintances is described exactly once. The acquaintance relation is symmetrical, i.e. if x is acquainted with y, then y is also acquainted with x.","src_uid":"2bc18799c85ecaba87564a86a94e0322","source_code":"#include\nint main()\n{\n\tint i,j,k,a[100][100],n,x,y,flag=0;\n\tscanf(\"%d\",&n);\n\tfor(i=0;i<=5;i++)\n\t for(j=0;j<=5;j++)\n\t a[i][j]=0;\n\tfor(i=0;i\nint main()\n{\n int i,j,t,a,b,page, sum =0;\n int day[8];\n\n scanf (\"%d\",&page);\n\n for(i=1; i<8; i++){\n scanf(\"%d\", &day[i]);\n }\n\n j = 0;\n while(1){\n j++;\n sum = sum + day[j];\n if(sum >= page){\n printf(\"%d\\n\", j);\n break;\n }\n else if(j==7){\n j = 0;\n }\n\n\n }\n}\n","sample_outputs":"[\"6\", \"1\"]","lang_cluster":"C","notes":"NoteNote to the first sample:By the end of Monday and therefore, by the beginning of Tuesday Petr has 85 pages left. He has 65 pages left by Wednesday, 45 by Thursday, 30 by Friday, 20 by Saturday and on Saturday Petr finishes reading the book (and he also has time to read 10 pages of something else).Note to the second sample:On Monday of the first week Petr will read the first page. On Monday of the second week Petr will read the second page and will finish reading the book.","output_specification":"Print a single number \u2014 the number of the day of the week, when Petr will finish reading the book. The days of the week are numbered starting with one in the natural order: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.","description":"One Sunday Petr went to a bookshop and bought a new book on sports programming. The book had exactly n pages.Petr decided to start reading it starting from the next day, that is, from Monday. Petr's got a very tight schedule and for each day of the week he knows how many pages he will be able to read on that day. Some days are so busy that Petr will have no time to read whatsoever. However, we know that he will be able to read at least one page a week.Assuming that Petr will not skip days and will read as much as he can every day, determine on which day of the week he will read the last page of the book.","human_testcases":"[{\"input\": \"100\\r\\n15 20 20 15 10 30 45\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2\\r\\n1 0 0 0 0 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n100 200 100 200 300 400 500\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n1 1 1 1 1 1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1\\r\\n1 1 1 1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"20\\r\\n5 3 7 2 1 6 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10\\r\\n5 1 1 1 1 1 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"50\\r\\n10 1 10 1 10 1 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"77\\r\\n11 11 11 11 11 11 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n1000 1000 1000 1000 1000 1000 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n100 100 100 100 100 100 100\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"999\\r\\n10 20 10 20 30 20 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"433\\r\\n109 58 77 10 39 125 15\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n0 0 0 0 0 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n1 0 1 0 1 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"997\\r\\n1 1 0 0 1 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n1 1 1 1 1 1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1000\\r\\n1000 1000 1000 1000 1000 1000 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n1 0 0 0 0 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n0 0 0 0 0 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000\\r\\n1 0 0 1 0 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"509\\r\\n105 23 98 0 7 0 155\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\n1 1 1 1 1 1 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n1 1 0 0 0 0 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n0 0 0 0 0 1 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10\\r\\n0 0 0 0 0 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n0 0 0 0 0 6 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n0 1 0 0 0 0 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n0 0 0 0 0 0 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"28\\r\\n1 2 3 4 5 6 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"100\\r\\n5 5 5 5 5 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4\\r\\n1 0 0 0 0 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n0 0 0 0 0 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7\\r\\n0 0 0 0 0 0 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7\\r\\n2 1 1 1 1 1 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2\\r\\n0 0 1 1 0 0 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\n1 1 1 1 1 1 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5\\r\\n1 1 1 0 0 1 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"100\\r\\n10 20 30 10 10 10 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n0 0 0 1 0 0 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"70\\r\\n10 10 10 10 10 10 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22\\r\\n1 2 3 4 5 6 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n0 0 0 1 0 0 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2\\r\\n0 0 0 1 0 0 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\n1 0 0 0 0 0 2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10\\r\\n1 2 2 1 2 1 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n0 0 0 0 0 0 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"4\\r\\n0 1 1 0 0 0 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n0 0 0 0 0 1 0\\r\\n\", \"output\": [\"6\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3\\r\\n0 1 0 0 0 0 0\\r\\n', 'output': ['2']}, {'input': '997\\r\\n1 1 0 0 1 0 1\\r\\n', 'output': ['1']}, {'input': '3\\r\\n1 1 1 1 1 1 1\\r\\n', 'output': ['3']}, {'input': '4\\r\\n0 1 1 0 0 0 0\\r\\n', 'output': ['3']}, {'input': '5\\r\\n1 0 1 0 1 0 1\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '5\\r\\n0 0 0 0 0 0 10\\r\\n', 'output': ['7']}, {'input': '28\\r\\n1 2 3 4 5 6 7\\r\\n', 'output': ['7']}, {'input': '5\\r\\n1 1 1 0 0 1 1\\r\\n', 'output': ['7']}, {'input': '1\\r\\n1000 1000 1000 1000 1000 1000 1000\\r\\n', 'output': ['1']}, {'input': '10\\r\\n0 0 0 0 0 0 10\\r\\n', 'output': ['7']}]","human_sample_testcases_3":"[{'input': '5\\r\\n0 0 0 1 0 0 0\\r\\n', 'output': ['4']}, {'input': '6\\r\\n1 1 1 1 1 1 0\\r\\n', 'output': ['6']}, {'input': '2\\r\\n0 0 0 0 0 0 1\\r\\n', 'output': ['7']}, {'input': '70\\r\\n10 10 10 10 10 10 10\\r\\n', 'output': ['7']}, {'input': '1000\\r\\n1 1 1 1 1 1 1\\r\\n', 'output': ['6']}]","human_sample_testcases_4":"[{'input': '4\\r\\n1 0 0 0 0 0 1\\r\\n', 'output': ['7']}, {'input': '2\\r\\n0 0 1 1 0 0 0\\r\\n', 'output': ['4']}, {'input': '433\\r\\n109 58 77 10 39 125 15\\r\\n', 'output': ['7']}, {'input': '7\\r\\n1 1 1 1 1 1 1\\r\\n', 'output': ['7']}, {'input': '2\\r\\n1 0 0 0 0 0 0\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '999\\r\\n10 20 10 20 30 20 10\\r\\n', 'output': ['3']}, {'input': '10\\r\\n0 0 0 0 0 0 1\\r\\n', 'output': ['7']}, {'input': '3\\r\\n0 1 0 0 0 0 0\\r\\n', 'output': ['2']}, {'input': '433\\r\\n109 58 77 10 39 125 15\\r\\n', 'output': ['7']}, {'input': '1000\\r\\n0 0 0 0 0 0 1\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":92.31,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":18,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.462,"human_sample_branch_coverage":96.666} {"sample_inputs":"[\"2 2\", \"9 3\"]","input_specification":"The single line contains two integers n and m (1\u2009\u2264\u2009n\u2009\u2264\u2009100;\u00a02\u2009\u2264\u2009m\u2009\u2264\u2009100), separated by a space.","src_uid":"42b25b7335ec01794fbb1d4086aa9dd0","source_code":"#include\nint main() \n{\n int n,m,sum,d;\n scanf(\"%d %d\",&n,&m);\n sum=n;\n rich:\n d=n\/m;\n if(d>0)\n {\n sum=sum+d;\n if(((n%m)+d)>=m)\n {\n n=(n%m)+d;\n goto rich;\n }\n }\n printf(\"%d\",sum);\n return 0;\n}\n","sample_outputs":"[\"3\", \"13\"]","lang_cluster":"C","notes":"NoteIn the first sample Vasya spends the first two days wearing the socks that he had initially. Then on day three he puts on the socks that were bought on day two.In the second sample Vasya spends the first nine days wearing the socks that he had initially. Then he spends three days wearing the socks that were bought on the third, sixth and ninth days. Than he spends another day wearing the socks that were bought on the twelfth day.","output_specification":"Print a single integer \u2014 the answer to the problem.","description":"Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used socks and throws them away. Every m-th day (at days with numbers m,\u20092m,\u20093m,\u2009...) mom buys a pair of socks to Vasya. She does it late in the evening, so that Vasya cannot put on a new pair of socks before the next day. How many consecutive days pass until Vasya runs out of socks?","human_testcases":"[{\"input\": \"2 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9 3\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 2\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"10 9\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"2 27\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"99 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"99 2\\r\\n\", \"output\": [\"197\"]}, {\"input\": \"100 3\\r\\n\", \"output\": [\"149\"]}, {\"input\": \"98 3\\r\\n\", \"output\": [\"146\"]}, {\"input\": \"100 2\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"62 4\\r\\n\", \"output\": [\"82\"]}, {\"input\": \"99 10\\r\\n\", \"output\": [\"109\"]}, {\"input\": \"100 5\\r\\n\", \"output\": [\"124\"]}, {\"input\": \"80 80\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"95 16\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"75 16\\r\\n\", \"output\": [\"79\"]}, {\"input\": \"99 74\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"20 21\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"52 96\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"24 5\\r\\n\", \"output\": [\"29\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '98 3\\r\\n', 'output': ['146']}, {'input': '62 4\\r\\n', 'output': ['82']}, {'input': '1 99\\r\\n', 'output': ['1']}, {'input': '99 100\\r\\n', 'output': ['99']}, {'input': '2 3\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '99 2\\r\\n', 'output': ['197']}, {'input': '99 74\\r\\n', 'output': ['100']}, {'input': '2 2\\r\\n', 'output': ['3']}, {'input': '2 3\\r\\n', 'output': ['2']}, {'input': '100 2\\r\\n', 'output': ['199']}]","human_sample_testcases_3":"[{'input': '20 21\\r\\n', 'output': ['20']}, {'input': '99 10\\r\\n', 'output': ['109']}, {'input': '99 74\\r\\n', 'output': ['100']}, {'input': '10 2\\r\\n', 'output': ['19']}, {'input': '100 3\\r\\n', 'output': ['149']}]","human_sample_testcases_4":"[{'input': '62 4\\r\\n', 'output': ['82']}, {'input': '98 3\\r\\n', 'output': ['146']}, {'input': '1 2\\r\\n', 'output': ['1']}, {'input': '99 74\\r\\n', 'output': ['100']}, {'input': '100 100\\r\\n', 'output': ['101']}]","human_sample_testcases_5":"[{'input': '2 3\\r\\n', 'output': ['2']}, {'input': '100 2\\r\\n', 'output': ['199']}, {'input': '2 27\\r\\n', 'output': ['2']}, {'input': '75 16\\r\\n', 'output': ['79']}, {'input': '100 100\\r\\n', 'output': ['101']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":19,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 1 1\\n1 0 1\\n1 1 0\", \"0 3 6\\n5 0 5\\n4 7 0\"]","input_specification":"The first three lines of the input contain the Little Elephant's notes. The first line contains elements of the first row of the magic square. The second line contains the elements of the second row, the third line is for the third row. The main diagonal elements that have been forgotten by the Elephant are represented by zeroes. It is guaranteed that the notes contain exactly three zeroes and they are all located on the main diagonal. It is guaranteed that all positive numbers in the table do not exceed 105.","src_uid":"0c42eafb73d1e30f168958a06a0f9bca","source_code":"#include\nint main()\n{\n int x,y,z,i,j;\n int a[3][3];\n for(i=0;i<=2;i++)\n for(j=0;j<=2;j++)\n scanf(\"%d\",&a[i][j]);\n y=(a[2][0]+a[2][1]+a[0][1]+a[0][2]-a[1][0]-a[1][2])\/2;\n x=a[2][0]+a[2][1]-y;\n z=a[1][0]+a[1][2]-x;\n a[0][0]=x;\n a[1][1]=y;\n a[2][2]=z;\n for(i=0;i<=2;i++)\n {\n for(j=0;j<=2;j++)\n printf(\"%d \",a[i][j]);\n printf(\"\\n\");\n }\n return 0;\n}","sample_outputs":"[\"1 1 1\\n1 1 1\\n1 1 1\", \"6 3 6\\n5 5 5\\n4 7 4\"]","lang_cluster":"C","notes":null,"output_specification":"Print three lines, in each line print three integers \u2014 the Little Elephant's magic square. If there are multiple magic squares, you are allowed to print any of them. Note that all numbers you print must be positive and not exceed 105. It is guaranteed that there exists at least one magic square that meets the conditions.","description":"Little Elephant loves magic squares very much.A magic square is a 3\u2009\u00d7\u20093 table, each cell contains some positive integer. At that the sums of integers in all rows, columns and diagonals of the table are equal. The figure below shows the magic square, the sum of integers in all its rows, columns and diagonals equals 15. The Little Elephant remembered one magic square. He started writing this square on a piece of paper, but as he wrote, he forgot all three elements of the main diagonal of the magic square. Fortunately, the Little Elephant clearly remembered that all elements of the magic square did not exceed 105. Help the Little Elephant, restore the original magic square, given the Elephant's notes.","human_testcases":"[{\"input\": \"0 1 1\\r\\n1 0 1\\r\\n1 1 0\\r\\n\", \"output\": [\"1 1 1 \\r\\n1 1 1 \\r\\n1 1 1\", \"1 1 1\\r\\n 1 1 1\\r\\n 1 1 1\", \"1 1 1\\r\\n1 1 1\\r\\n1 1 1\"]}, {\"input\": \"0 3 6\\r\\n5 0 5\\r\\n4 7 0\\r\\n\", \"output\": [\"6 3 6\\r\\n 5 5 5\\r\\n 4 7 4\", \"6 3 6\\r\\n5 5 5\\r\\n4 7 4\", \"6 3 6 \\r\\n5 5 5 \\r\\n4 7 4\"]}, {\"input\": \"0 4 4\\r\\n4 0 4\\r\\n4 4 0\\r\\n\", \"output\": [\"4 4 4\\r\\n 4 4 4\\r\\n 4 4 4\", \"4 4 4 \\r\\n4 4 4 \\r\\n4 4 4\", \"4 4 4\\r\\n4 4 4\\r\\n4 4 4\"]}, {\"input\": \"0 54 48\\r\\n36 0 78\\r\\n66 60 0\\r\\n\", \"output\": [\"69 54 48 \\r\\n36 57 78 \\r\\n66 60 45\", \"69 54 48\\r\\n36 57 78\\r\\n66 60 45\", \"69 54 48\\r\\n 36 57 78\\r\\n 66 60 45\"]}, {\"input\": \"0 17 14\\r\\n15 0 15\\r\\n16 13 0\\r\\n\", \"output\": [\"14 17 14\\r\\n 15 15 15\\r\\n 16 13 16\", \"14 17 14\\r\\n15 15 15\\r\\n16 13 16\", \"14 17 14 \\r\\n15 15 15 \\r\\n16 13 16\"]}, {\"input\": \"0 97 56\\r\\n69 0 71\\r\\n84 43 0\\r\\n\", \"output\": [\"57 97 56\\r\\n69 70 71\\r\\n84 43 83\", \"57 97 56\\r\\n 69 70 71\\r\\n 84 43 83\", \"57 97 56 \\r\\n69 70 71 \\r\\n84 43 83\"]}, {\"input\": \"0 1099 1002\\r\\n1027 0 1049\\r\\n1074 977 0\\r\\n\", \"output\": [\"1013 1099 1002 \\r\\n1027 1038 1049 \\r\\n1074 977 1063\", \"1013 1099 1002\\r\\n1027 1038 1049\\r\\n1074 977 1063\", \"1013 1099 1002\\r\\n 1027 1038 1049\\r\\n 1074 977 1063\"]}, {\"input\": \"0 98721 99776\\r\\n99575 0 99123\\r\\n98922 99977 0\\r\\n\", \"output\": [\"99550 98721 99776\\r\\n99575 99349 99123\\r\\n98922 99977 99148\", \"99550 98721 99776\\r\\n 99575 99349 99123\\r\\n 98922 99977 99148\", \"99550 98721 99776 \\r\\n99575 99349 99123 \\r\\n98922 99977 99148\"]}, {\"input\": \"0 6361 2304\\r\\n1433 0 8103\\r\\n7232 3175 0\\r\\n\", \"output\": [\"5639 6361 2304 \\r\\n1433 4768 8103 \\r\\n7232 3175 3897\", \"5639 6361 2304\\r\\n1433 4768 8103\\r\\n7232 3175 3897\", \"5639 6361 2304\\r\\n 1433 4768 8103\\r\\n 7232 3175 3897\"]}, {\"input\": \"0 99626 99582\\r\\n99766 0 99258\\r\\n99442 99398 0\\r\\n\", \"output\": [\"99328 99626 99582 \\r\\n99766 99512 99258 \\r\\n99442 99398 99696\", \"99328 99626 99582\\r\\n99766 99512 99258\\r\\n99442 99398 99696\", \"99328 99626 99582\\r\\n 99766 99512 99258\\r\\n 99442 99398 99696\"]}, {\"input\": \"0 99978 99920\\r\\n99950 0 99918\\r\\n99948 99890 0\\r\\n\", \"output\": [\"99904 99978 99920\\r\\n99950 99934 99918\\r\\n99948 99890 99964\", \"99904 99978 99920\\r\\n 99950 99934 99918\\r\\n 99948 99890 99964\", \"99904 99978 99920 \\r\\n99950 99934 99918 \\r\\n99948 99890 99964\"]}, {\"input\": \"0 840 666\\r\\n612 0 948\\r\\n894 720 0\\r\\n\", \"output\": [\"834 840 666\\r\\n612 780 948\\r\\n894 720 726\", \"834 840 666\\r\\n 612 780 948\\r\\n 894 720 726\", \"834 840 666 \\r\\n612 780 948 \\r\\n894 720 726\"]}, {\"input\": \"0 28 10\\r\\n12 0 24\\r\\n26 8 0\\r\\n\", \"output\": [\"16 28 10 \\r\\n12 18 24 \\r\\n26 8 20\", \"16 28 10\\r\\n12 18 24\\r\\n26 8 20\", \"16 28 10\\r\\n 12 18 24\\r\\n 26 8 20\"]}, {\"input\": \"0 120 83\\r\\n98 0 90\\r\\n105 68 0\\r\\n\", \"output\": [\"79 120 83\\r\\n98 94 90\\r\\n105 68 109\", \"79 120 83\\r\\n 98 94 90\\r\\n 105 68 109\", \"79 120 83 \\r\\n98 94 90 \\r\\n105 68 109\"]}, {\"input\": \"0 86900 85807\\r\\n85836 0 86842\\r\\n86871 85778 0\\r\\n\", \"output\": [\"86310 86900 85807\\r\\n 85836 86339 86842\\r\\n 86871 85778 86368\", \"86310 86900 85807\\r\\n85836 86339 86842\\r\\n86871 85778 86368\", \"86310 86900 85807 \\r\\n85836 86339 86842 \\r\\n86871 85778 86368\"]}, {\"input\": \"0 74 78\\r\\n78 0 74\\r\\n74 78 0\\r\\n\", \"output\": [\"76 74 78 \\r\\n78 76 74 \\r\\n74 78 76\", \"76 74 78\\r\\n 78 76 74\\r\\n 74 78 76\", \"76 74 78\\r\\n78 76 74\\r\\n74 78 76\"]}, {\"input\": \"0 505 681\\r\\n605 0 657\\r\\n581 757 0\\r\\n\", \"output\": [\"707 505 681 \\r\\n605 631 657 \\r\\n581 757 555\", \"707 505 681\\r\\n 605 631 657\\r\\n 581 757 555\", \"707 505 681\\r\\n605 631 657\\r\\n581 757 555\"]}, {\"input\": \"0 662 918\\r\\n822 0 854\\r\\n758 1014 0\\r\\n\", \"output\": [\"934 662 918 \\r\\n822 838 854 \\r\\n758 1014 742\", \"934 662 918\\r\\n 822 838 854\\r\\n 758 1014 742\", \"934 662 918\\r\\n822 838 854\\r\\n758 1014 742\"]}, {\"input\": \"0 93 95\\r\\n93 0 97\\r\\n95 97 0\\r\\n\", \"output\": [\"97 93 95\\r\\n93 95 97\\r\\n95 97 93\", \"97 93 95 \\r\\n93 95 97 \\r\\n95 97 93\", \"97 93 95\\r\\n 93 95 97\\r\\n 95 97 93\"]}, {\"input\": \"0 709 712\\r\\n719 0 695\\r\\n702 705 0\\r\\n\", \"output\": [\"700 709 712\\r\\n 719 707 695\\r\\n 702 705 714\", \"700 709 712\\r\\n719 707 695\\r\\n702 705 714\", \"700 709 712 \\r\\n719 707 695 \\r\\n702 705 714\"]}, {\"input\": \"0 7 6\\r\\n9 0 1\\r\\n4 3 0\\r\\n\", \"output\": [\"2 7 6\\r\\n9 5 1\\r\\n4 3 8\", \"2 7 6 \\r\\n9 5 1 \\r\\n4 3 8\", \"2 7 6\\r\\n 9 5 1\\r\\n 4 3 8\"]}, {\"input\": \"0 9 2\\r\\n3 0 7\\r\\n8 1 0\\r\\n\", \"output\": [\"4 9 2 \\r\\n3 5 7 \\r\\n8 1 6\", \"4 9 2\\r\\n3 5 7\\r\\n8 1 6\", \"4 9 2\\r\\n 3 5 7\\r\\n 8 1 6\"]}, {\"input\": \"0 1 43\\r\\n13 0 61\\r\\n31 73 0\\r\\n\", \"output\": [\"67 1 43\\r\\n 13 37 61\\r\\n 31 73 7\", \"67 1 43\\r\\n13 37 61\\r\\n31 73 7\", \"67 1 43 \\r\\n13 37 61 \\r\\n31 73 7\"]}, {\"input\": \"0 100000 100000\\r\\n100000 0 100000\\r\\n100000 100000 0\\r\\n\", \"output\": [\"100000 100000 100000 \\r\\n100000 100000 100000 \\r\\n100000 100000 100000\", \"100000 100000 100000\\r\\n100000 100000 100000\\r\\n100000 100000 100000\", \"100000 100000 100000\\r\\n 100000 100000 100000\\r\\n 100000 100000 100000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '0 9 2\\r\\n3 0 7\\r\\n8 1 0\\r\\n', 'output': ['4 9 2 \\r\\n3 5 7 \\r\\n8 1 6', '4 9 2\\r\\n3 5 7\\r\\n8 1 6', '4 9 2\\r\\n 3 5 7\\r\\n 8 1 6']}, {'input': '0 120 83\\r\\n98 0 90\\r\\n105 68 0\\r\\n', 'output': ['79 120 83\\r\\n98 94 90\\r\\n105 68 109', '79 120 83\\r\\n 98 94 90\\r\\n 105 68 109', '79 120 83 \\r\\n98 94 90 \\r\\n105 68 109']}, {'input': '0 98721 99776\\r\\n99575 0 99123\\r\\n98922 99977 0\\r\\n', 'output': ['99550 98721 99776\\r\\n99575 99349 99123\\r\\n98922 99977 99148', '99550 98721 99776\\r\\n 99575 99349 99123\\r\\n 98922 99977 99148', '99550 98721 99776 \\r\\n99575 99349 99123 \\r\\n98922 99977 99148']}, {'input': '0 505 681\\r\\n605 0 657\\r\\n581 757 0\\r\\n', 'output': ['707 505 681 \\r\\n605 631 657 \\r\\n581 757 555', '707 505 681\\r\\n 605 631 657\\r\\n 581 757 555', '707 505 681\\r\\n605 631 657\\r\\n581 757 555']}, {'input': '0 1099 1002\\r\\n1027 0 1049\\r\\n1074 977 0\\r\\n', 'output': ['1013 1099 1002 \\r\\n1027 1038 1049 \\r\\n1074 977 1063', '1013 1099 1002\\r\\n1027 1038 1049\\r\\n1074 977 1063', '1013 1099 1002\\r\\n 1027 1038 1049\\r\\n 1074 977 1063']}]","human_sample_testcases_2":"[{'input': '0 99978 99920\\r\\n99950 0 99918\\r\\n99948 99890 0\\r\\n', 'output': ['99904 99978 99920\\r\\n99950 99934 99918\\r\\n99948 99890 99964', '99904 99978 99920\\r\\n 99950 99934 99918\\r\\n 99948 99890 99964', '99904 99978 99920 \\r\\n99950 99934 99918 \\r\\n99948 99890 99964']}, {'input': '0 120 83\\r\\n98 0 90\\r\\n105 68 0\\r\\n', 'output': ['79 120 83\\r\\n98 94 90\\r\\n105 68 109', '79 120 83\\r\\n 98 94 90\\r\\n 105 68 109', '79 120 83 \\r\\n98 94 90 \\r\\n105 68 109']}, {'input': '0 54 48\\r\\n36 0 78\\r\\n66 60 0\\r\\n', 'output': ['69 54 48 \\r\\n36 57 78 \\r\\n66 60 45', '69 54 48\\r\\n36 57 78\\r\\n66 60 45', '69 54 48\\r\\n 36 57 78\\r\\n 66 60 45']}, {'input': '0 97 56\\r\\n69 0 71\\r\\n84 43 0\\r\\n', 'output': ['57 97 56\\r\\n69 70 71\\r\\n84 43 83', '57 97 56\\r\\n 69 70 71\\r\\n 84 43 83', '57 97 56 \\r\\n69 70 71 \\r\\n84 43 83']}, {'input': '0 93 95\\r\\n93 0 97\\r\\n95 97 0\\r\\n', 'output': ['97 93 95\\r\\n93 95 97\\r\\n95 97 93', '97 93 95 \\r\\n93 95 97 \\r\\n95 97 93', '97 93 95\\r\\n 93 95 97\\r\\n 95 97 93']}]","human_sample_testcases_3":"[{'input': '0 28 10\\r\\n12 0 24\\r\\n26 8 0\\r\\n', 'output': ['16 28 10 \\r\\n12 18 24 \\r\\n26 8 20', '16 28 10\\r\\n12 18 24\\r\\n26 8 20', '16 28 10\\r\\n 12 18 24\\r\\n 26 8 20']}, {'input': '0 1 1\\r\\n1 0 1\\r\\n1 1 0\\r\\n', 'output': ['1 1 1 \\r\\n1 1 1 \\r\\n1 1 1', '1 1 1\\r\\n 1 1 1\\r\\n 1 1 1', '1 1 1\\r\\n1 1 1\\r\\n1 1 1']}, {'input': '0 93 95\\r\\n93 0 97\\r\\n95 97 0\\r\\n', 'output': ['97 93 95\\r\\n93 95 97\\r\\n95 97 93', '97 93 95 \\r\\n93 95 97 \\r\\n95 97 93', '97 93 95\\r\\n 93 95 97\\r\\n 95 97 93']}, {'input': '0 86900 85807\\r\\n85836 0 86842\\r\\n86871 85778 0\\r\\n', 'output': ['86310 86900 85807\\r\\n 85836 86339 86842\\r\\n 86871 85778 86368', '86310 86900 85807\\r\\n85836 86339 86842\\r\\n86871 85778 86368', '86310 86900 85807 \\r\\n85836 86339 86842 \\r\\n86871 85778 86368']}, {'input': '0 1099 1002\\r\\n1027 0 1049\\r\\n1074 977 0\\r\\n', 'output': ['1013 1099 1002 \\r\\n1027 1038 1049 \\r\\n1074 977 1063', '1013 1099 1002\\r\\n1027 1038 1049\\r\\n1074 977 1063', '1013 1099 1002\\r\\n 1027 1038 1049\\r\\n 1074 977 1063']}]","human_sample_testcases_4":"[{'input': '0 97 56\\r\\n69 0 71\\r\\n84 43 0\\r\\n', 'output': ['57 97 56\\r\\n69 70 71\\r\\n84 43 83', '57 97 56\\r\\n 69 70 71\\r\\n 84 43 83', '57 97 56 \\r\\n69 70 71 \\r\\n84 43 83']}, {'input': '0 98721 99776\\r\\n99575 0 99123\\r\\n98922 99977 0\\r\\n', 'output': ['99550 98721 99776\\r\\n99575 99349 99123\\r\\n98922 99977 99148', '99550 98721 99776\\r\\n 99575 99349 99123\\r\\n 98922 99977 99148', '99550 98721 99776 \\r\\n99575 99349 99123 \\r\\n98922 99977 99148']}, {'input': '0 28 10\\r\\n12 0 24\\r\\n26 8 0\\r\\n', 'output': ['16 28 10 \\r\\n12 18 24 \\r\\n26 8 20', '16 28 10\\r\\n12 18 24\\r\\n26 8 20', '16 28 10\\r\\n 12 18 24\\r\\n 26 8 20']}, {'input': '0 4 4\\r\\n4 0 4\\r\\n4 4 0\\r\\n', 'output': ['4 4 4\\r\\n 4 4 4\\r\\n 4 4 4', '4 4 4 \\r\\n4 4 4 \\r\\n4 4 4', '4 4 4\\r\\n4 4 4\\r\\n4 4 4']}, {'input': '0 3 6\\r\\n5 0 5\\r\\n4 7 0\\r\\n', 'output': ['6 3 6\\r\\n 5 5 5\\r\\n 4 7 4', '6 3 6\\r\\n5 5 5\\r\\n4 7 4', '6 3 6 \\r\\n5 5 5 \\r\\n4 7 4']}]","human_sample_testcases_5":"[{'input': '0 1 43\\r\\n13 0 61\\r\\n31 73 0\\r\\n', 'output': ['67 1 43\\r\\n 13 37 61\\r\\n 31 73 7', '67 1 43\\r\\n13 37 61\\r\\n31 73 7', '67 1 43 \\r\\n13 37 61 \\r\\n31 73 7']}, {'input': '0 9 2\\r\\n3 0 7\\r\\n8 1 0\\r\\n', 'output': ['4 9 2 \\r\\n3 5 7 \\r\\n8 1 6', '4 9 2\\r\\n3 5 7\\r\\n8 1 6', '4 9 2\\r\\n 3 5 7\\r\\n 8 1 6']}, {'input': '0 7 6\\r\\n9 0 1\\r\\n4 3 0\\r\\n', 'output': ['2 7 6\\r\\n9 5 1\\r\\n4 3 8', '2 7 6 \\r\\n9 5 1 \\r\\n4 3 8', '2 7 6\\r\\n 9 5 1\\r\\n 4 3 8']}, {'input': '0 1099 1002\\r\\n1027 0 1049\\r\\n1074 977 0\\r\\n', 'output': ['1013 1099 1002 \\r\\n1027 1038 1049 \\r\\n1074 977 1063', '1013 1099 1002\\r\\n1027 1038 1049\\r\\n1074 977 1063', '1013 1099 1002\\r\\n 1027 1038 1049\\r\\n 1074 977 1063']}, {'input': '0 662 918\\r\\n822 0 854\\r\\n758 1014 0\\r\\n', 'output': ['934 662 918 \\r\\n822 838 854 \\r\\n758 1014 742', '934 662 918\\r\\n 822 838 854\\r\\n 758 1014 742', '934 662 918\\r\\n822 838 854\\r\\n758 1014 742']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":20,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"8 5\\n10 9 8 7 7 7 5 5\", \"4 2\\n0 0 0 0\"]","input_specification":"The first line of the input contains two integers n and k (1\u2009\u2264\u2009k\u2009\u2264\u2009n\u2009\u2264\u200950) separated by a single space. The second line contains n space-separated integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u2009100), where ai is the score earned by the participant who got the i-th place. The given sequence is non-increasing (that is, for all i from 1 to n\u2009-\u20091 the following condition is fulfilled: ai\u2009\u2265\u2009ai\u2009+\u20091).","src_uid":"193ec1226ffe07522caf63e84a7d007f","source_code":"#include\nint main()\n{\n\tint n, k;\n\tint i, s = 0, a[101];\n\twhile (scanf(\"%d%d\", &n, &k) != EOF)\n\t{\n\t\tfor (i = 1; i <= n; i++)\n\t\t\tscanf(\"%d\", &a[i]);\n\t\tfor (i = 1; i <= n; i++)\n\t\t{\n\t\t\tif (a[i] >= a[k] && a[i] != 0)\n\t\t\t\ts++;\n\t\t}\n\t\tprintf(\"%d\\n\", s);\n\t}\n\treturn 0;\n}\n\t \t \t\t\t \t \t\t\t\t \t \t \t\t","sample_outputs":"[\"6\", \"0\"]","lang_cluster":"C","notes":"NoteIn the first example the participant on the 5th place earned 7 points. As the participant on the 6th place also earned 7 points, there are 6 advancers.In the second example nobody got a positive score.","output_specification":"Output the number of participants who advance to the next round.","description":"\"Contestant who earns a score equal to or greater than the k-th place finisher's score will advance to the next round, as long as the contestant earns a positive score...\" \u2014 an excerpt from contest rules.A total of n participants took part in the contest (n\u2009\u2265\u2009k), and you already know their scores. Calculate how many participants will advance to the next round.","human_testcases":"[{\"input\": \"8 5\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 2\\r\\n0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 1\\r\\n1 1 1 1 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 5\\r\\n1 1 1 1 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 1\\r\\n10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17 14\\r\\n16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"5 5\\r\\n3 2 1 0 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 6\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8 7\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"8 4\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8 3\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 1\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 2\\r\\n10 9 8 7 7 7 5 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1\\r\\n100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 25\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"50 25\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"50 25\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"50 25\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"11 5\\r\\n100 99 98 97 96 95 94 93 92 91 90\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 4\\r\\n100 81 70 69 64 43 34 29 15 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"11 6\\r\\n87 71 62 52 46 46 43 35 32 25 12\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"17 12\\r\\n99 88 86 82 75 75 74 65 58 52 45 30 21 16 7 2 2\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"20 3\\r\\n98 98 96 89 87 82 82 80 76 74 74 68 61 60 43 32 30 22 4 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"36 12\\r\\n90 87 86 85 83 80 79 78 76 70 69 69 61 61 59 58 56 48 45 44 42 41 33 31 27 25 23 21 20 19 15 14 12 7 5 5\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"49 8\\r\\n99 98 98 96 92 92 90 89 89 86 86 85 83 80 79 76 74 69 67 67 58 56 55 51 49 47 47 46 45 41 41 40 39 34 34 33 25 23 18 15 13 13 11 9 5 4 3 3 1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"49 29\\r\\n100 98 98 96 96 96 95 87 85 84 81 76 74 70 63 63 63 62 57 57 56 54 53 52 50 47 45 41 41 39 38 31 30 28 27 26 23 22 20 15 15 11 7 6 6 4 2 1 0\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"49 34\\r\\n99 98 96 96 93 92 90 89 88 86 85 85 82 76 73 69 66 64 63 63 60 59 57 57 56 55 54 54 51 48 47 44 42 42 40 39 38 36 33 26 24 23 19 17 17 14 12 7 4\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"50 44\\r\\n100 100 99 97 95 91 91 84 83 83 79 71 70 69 69 62 61 60 59 59 58 58 58 55 55 54 52 48 47 45 44 44 38 36 32 31 28 28 25 25 24 24 24 22 17 15 14 13 12 4\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"50 13\\r\\n99 95 94 94 88 87 81 79 78 76 74 72 72 69 68 67 67 67 66 63 62 61 58 57 55 55 54 51 50 50 48 48 42 41 38 35 34 32 31 30 26 24 13 13 12 6 5 4 3 3\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"50 30\\r\\n100 98 96 94 91 89 88 81 81 81 81 81 76 73 72 71 70 69 66 64 61 59 59 56 52 50 49 48 43 39 36 35 34 34 31 29 27 26 24 22 16 16 15 14 14 14 9 7 4 3\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"2 1\\r\\n10 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n10 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n10 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n10 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1\\r\\n10 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1\\r\\n10 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 13\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 1\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 50\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 1\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 2\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 3\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 4\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 5\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 6\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 7\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 8\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 9\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 10\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n\", \"output\": [\"6\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '8 4\\r\\n10 9 8 7 7 7 5 5\\r\\n', 'output': ['6']}, {'input': '10 3\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n', 'output': ['3']}, {'input': '49 34\\r\\n99 98 96 96 93 92 90 89 88 86 85 85 82 76 73 69 66 64 63 63 60 59 57 57 56 55 54 54 51 48 47 44 42 42 40 39 38 36 33 26 24 23 19 17 17 14 12 7 4\\r\\n', 'output': ['34']}, {'input': '1 1\\r\\n10\\r\\n', 'output': ['1']}, {'input': '8 1\\r\\n10 9 8 7 7 7 5 5\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '5 5\\r\\n1 1 1 1 1\\r\\n', 'output': ['5']}, {'input': '2 1\\r\\n10 2\\r\\n', 'output': ['1']}, {'input': '11 5\\r\\n100 99 98 97 96 95 94 93 92 91 90\\r\\n', 'output': ['5']}, {'input': '50 30\\r\\n100 98 96 94 91 89 88 81 81 81 81 81 76 73 72 71 70 69 66 64 61 59 59 56 52 50 49 48 43 39 36 35 34 34 31 29 27 26 24 22 16 16 15 14 14 14 9 7 4 3\\r\\n', 'output': ['30']}, {'input': '49 8\\r\\n99 98 98 96 92 92 90 89 89 86 86 85 83 80 79 76 74 69 67 67 58 56 55 51 49 47 47 46 45 41 41 40 39 34 34 33 25 23 18 15 13 13 11 9 5 4 3 3 1\\r\\n', 'output': ['9']}]","human_sample_testcases_3":"[{'input': '2 2\\r\\n10 10\\r\\n', 'output': ['2']}, {'input': '50 50\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['0']}, {'input': '49 29\\r\\n100 98 98 96 96 96 95 87 85 84 81 76 74 70 63 63 63 62 57 57 56 54 53 52 50 47 45 41 41 39 38 31 30 28 27 26 23 22 20 15 15 11 7 6 6 4 2 1 0\\r\\n', 'output': ['29']}, {'input': '36 12\\r\\n90 87 86 85 83 80 79 78 76 70 69 69 61 61 59 58 56 48 45 44 42 41 33 31 27 25 23 21 20 19 15 14 12 7 5 5\\r\\n', 'output': ['12']}, {'input': '50 25\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['50']}]","human_sample_testcases_4":"[{'input': '50 13\\r\\n99 95 94 94 88 87 81 79 78 76 74 72 72 69 68 67 67 67 66 63 62 61 58 57 55 55 54 51 50 50 48 48 42 41 38 35 34 32 31 30 26 24 13 13 12 6 5 4 3 3\\r\\n', 'output': ['13']}, {'input': '50 25\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['50']}, {'input': '10 9\\r\\n5 5 5 3 3 3 0 0 0 0\\r\\n', 'output': ['6']}, {'input': '1 1\\r\\n0\\r\\n', 'output': ['0']}, {'input': '50 1\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '5 1\\r\\n1 1 1 1 1\\r\\n', 'output': ['5']}, {'input': '20 3\\r\\n98 98 96 89 87 82 82 80 76 74 74 68 61 60 43 32 30 22 4 2\\r\\n', 'output': ['3']}, {'input': '2 2\\r\\n10 1\\r\\n', 'output': ['2']}, {'input': '2 1\\r\\n10 10\\r\\n', 'output': ['2']}, {'input': '50 13\\r\\n99 95 94 94 88 87 81 79 78 76 74 72 72 69 68 67 67 67 66 63 62 61 58 57 55 55 54 51 50 50 48 48 42 41 38 35 34 32 31 30 26 24 13 13 12 6 5 4 3 3\\r\\n', 'output': ['13']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":90.0,"id":21,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":94.0} {"sample_inputs":"[\"10 3 2\", \"7 1 2\"]","input_specification":"The first line of the input contains three integers t, w and b (1\u2009\u2264\u2009t,\u2009w,\u2009b\u2009\u2264\u20095\u00b71018) \u2014 the maximum possible length of the racetrack, the length of Willman's steps and the length of Bolt's steps respectively.","src_uid":"7a1d8ca25bce0073c4eb5297b94501b5","source_code":"#include \n#include \n\nunsigned long long int pgcd(unsigned long long int x,unsigned long long int y)\n {\n if (x==0) return y;\n if (y==0) return x;\n if ((x==1) || (y==1)) return 1;\n if (x==y) return x;\n if (x\n\nint main()\n{\n long long int n;\n long long ans = 0, a = 2, b = 1, c = 0;\n scanf(\"%lld\", &n);\n if(n == 2) {printf(\"1\\n\");return 0;}\n else if(n == 3) {printf(\"2\\n\");return 0;}\n else\n while(1)\n {\n if(a > n) break;\n ans++;\n c = b;\n b = a;\n a += c;\n }\n printf(\"%lld\", ans);\n return 0;\n\n}\n","sample_outputs":"[\"1\", \"2\", \"2\", \"4\"]","lang_cluster":"C","notes":"NoteIn all samples we consider that player number 1 is the winner.In the first sample, there would be only one game so the answer is 1.In the second sample, player 1 can consequently beat players 2 and 3. In the third sample, player 1 can't play with each other player as after he plays with players 2 and 3 he can't play against player 4, as he has 0 games played, while player 1 already played 2. Thus, the answer is 2 and to achieve we make pairs (1,\u20092) and (3,\u20094) and then clash the winners.","output_specification":"Print the maximum number of games in which the winner of the tournament can take part.","description":"Famous Brazil city Rio de Janeiro holds a tennis tournament and Ostap Bender doesn't want to miss this event. There will be n players participating, and the tournament will follow knockout rules from the very first game. That means, that if someone loses a game he leaves the tournament immediately.Organizers are still arranging tournament grid (i.e. the order games will happen and who is going to play with whom) but they have already fixed one rule: two players can play against each other only if the number of games one of them has already played differs by no more than one from the number of games the other one has already played. Of course, both players had to win all their games in order to continue participating in the tournament.Tournament hasn't started yet so the audience is a bit bored. Ostap decided to find out what is the maximum number of games the winner of the tournament can take part in (assuming the rule above is used). However, it is unlikely he can deal with this problem without your help.","human_testcases":"[{\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"2500\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"690000\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"3000000000\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"123456789123456789\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"143\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"144\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"145\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"232\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"233\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"234\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"679891637638612257\\r\\n\", \"output\": [\"84\"]}, {\"input\": \"679891637638612258\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"679891637638612259\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"10235439547\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"1240723548\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"92353046212453\\r\\n\", \"output\": [\"66\"]}, {\"input\": \"192403205846532\\r\\n\", \"output\": [\"68\"]}, {\"input\": \"13925230525389\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"12048230592523\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"19204385325853\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"902353283921\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"793056859214355\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"982045466234565\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"126743950353465\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"12405430465\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"10238439257768\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"1728493055346\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"927553829046\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"62735129403\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"71624823950223\\r\\n\", \"output\": [\"65\"]}, {\"input\": \"8902353464851212\\r\\n\", \"output\": [\"75\"]}, {\"input\": \"61824012598535\\r\\n\", \"output\": [\"65\"]}, {\"input\": \"1294902504603347\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"355687428096000\\r\\n\", \"output\": [\"69\"]}, {\"input\": \"576460752303423488\\r\\n\", \"output\": [\"84\"]}, {\"input\": \"32212254719\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"26388279066623\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"618473717761\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"262406072477\\r\\n\", \"output\": [\"54\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '62735129403\\r\\n', 'output': ['51']}, {'input': '8902353464851212\\r\\n', 'output': ['75']}, {'input': '145\\r\\n', 'output': ['10']}, {'input': '19204385325853\\r\\n', 'output': ['63']}, {'input': '679891637638612257\\r\\n', 'output': ['84']}]","human_sample_testcases_2":"[{'input': '902353283921\\r\\n', 'output': ['56']}, {'input': '3000000000\\r\\n', 'output': ['45']}, {'input': '618473717761\\r\\n', 'output': ['56']}, {'input': '10235439547\\r\\n', 'output': ['47']}, {'input': '126743950353465\\r\\n', 'output': ['67']}]","human_sample_testcases_3":"[{'input': '262406072477\\r\\n', 'output': ['54']}, {'input': '19\\r\\n', 'output': ['5']}, {'input': '18\\r\\n', 'output': ['5']}, {'input': '15\\r\\n', 'output': ['5']}, {'input': '902353283921\\r\\n', 'output': ['56']}]","human_sample_testcases_4":"[{'input': '92353046212453\\r\\n', 'output': ['66']}, {'input': '22\\r\\n', 'output': ['6']}, {'input': '3000000000\\r\\n', 'output': ['45']}, {'input': '6\\r\\n', 'output': ['3']}, {'input': '10238439257768\\r\\n', 'output': ['61']}]","human_sample_testcases_5":"[{'input': '20\\r\\n', 'output': ['5']}, {'input': '92353046212453\\r\\n', 'output': ['66']}, {'input': '192403205846532\\r\\n', 'output': ['68']}, {'input': '690000\\r\\n', 'output': ['27']}, {'input': '5\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":66.67,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":66.67,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":66.67,"id":23,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":66.67} {"sample_inputs":"[\"2 3\\nPPW\\nW.P\", \"3 3\\nP.W\\n.P.\\nW.P\"]","input_specification":"The first line contains integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u200910) which denotes the number of rows and columns in our two-dimensional grid, respectively. Then follow n lines containing m characters each \u2014 that is the grid description. \".\" means that this cell is empty. \"P\" means that this cell contains a little pig. \"W\" means that this cell contains a wolf. It is guaranteed that there will be at most one wolf adjacent to any little pig.","src_uid":"969b24ed98d916184821b2b2f8fd3aac","source_code":"#include \n\nint n, m;\nchar map[10][11];\n\nint wolf(int i, int j)\n{\n return (i >= 0 && i < n && j >= 0 && j < m && map[i][j] == 'W');\n}\n\nint main(int argc, char *argv[])\n{\n int i, j, c = 0;\n \n scanf(\"%d %d\", &n, &m);\n for(i = 0; i < n; i ++)\n scanf(\"%s\", map[i]);\n \n for(i = 0; i < n; i ++)\n for(j = 0; j < m; j ++)\n if(map[i][j] == 'P')\n {\n if(wolf(i - 1, j))\n map[i - 1][j] = '.', c ++;\n else if(wolf(i + 1, j))\n map[i + 1][j] = '.', c ++;\n else if(wolf(i, j - 1))\n map[i][j - 1] = '.', c ++;\n else if(wolf(i, j + 1))\n map[i][j + 1] = '.', c ++;\n }\n \n printf(\"%d\\n\", c);\n\n return 0;\n}\n","sample_outputs":"[\"2\", \"0\"]","lang_cluster":"C","notes":"NoteIn the first example, one possible scenario in which two little pigs get eaten by the wolves is as follows. ","output_specification":"Print a single number \u2014 the maximal number of little pigs that may be eaten by the wolves.","description":"Once upon a time there were several little pigs and several wolves on a two-dimensional grid of size n\u2009\u00d7\u2009m. Each cell in this grid was either empty, containing one little pig, or containing one wolf.A little pig and a wolf are adjacent if the cells that they are located at share a side. The little pigs are afraid of wolves, so there will be at most one wolf adjacent to each little pig. But each wolf may be adjacent to any number of little pigs.They have been living peacefully for several years. But today the wolves got hungry. One by one, each wolf will choose one of the little pigs adjacent to it (if any), and eats the poor little pig. This process is not repeated. That is, each wolf will get to eat at most one little pig. Once a little pig gets eaten, it disappears and cannot be eaten by any other wolf.What is the maximum number of little pigs that may be eaten by the wolves?","human_testcases":"[{\"input\": \"2 3\\r\\nPPW\\r\\nW.P\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 3\\r\\nP.W\\r\\n.P.\\r\\nW.P\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 5\\r\\n.....\\r\\n..PW.\\r\\n.....\\r\\n.WP..\\r\\n.....\\r\\n.....\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 5\\r\\n.....\\r\\n..P..\\r\\n.W.W.\\r\\n..P..\\r\\n.....\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n.....\\r\\n..P..\\r\\n..W..\\r\\n..P..\\r\\n.....\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 10\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n....P.....\\r\\n...PWP....\\r\\n....P.....\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\nP\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 6\\r\\nWW..WW\\r\\n.PPPP.\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 2\\r\\n.W\\r\\n.W\\r\\n.P\\r\\nWP\\r\\n.P\\r\\nPW\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 10\\r\\nW..WWP.P.P\\r\\nW..PP.WWP.\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 2\\r\\nP.\\r\\n.W\\r\\nPW\\r\\n..\\r\\nW.\\r\\nW.\\r\\n..\\r\\nP.\\r\\nWP\\r\\nPP\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 4\\r\\nWPPW\\r\\n.P..\\r\\nPWW.\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 3\\r\\n.WW\\r\\n..P\\r\\nP.P\\r\\nPWW\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 10\\r\\nWPPP...PP.\\r\\n.P...WW..W\\r\\n.WWP.PP.PW\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 3\\r\\n...\\r\\nPWW\\r\\n..P\\r\\n..P\\r\\nP.P\\r\\nWP.\\r\\nPPW\\r\\n..W\\r\\nW..\\r\\nWPP\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4 8\\r\\n..PW..WW\\r\\nWWPP.PP.\\r\\nP...PW.P\\r\\nP.WW...P\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 4\\r\\nP.WW\\r\\nW..P\\r\\nP..P\\r\\nP.WW\\r\\n..P.\\r\\nW.P.\\r\\nWP.W\\r\\nP..P\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1\\r\\nW\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 10\\r\\n..P.PW.P.P\\r\\nP.WP.W..WP\\r\\nW..P.P..WP\\r\\nW.PWW.P.P.\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10 4\\r\\nWPPP\\r\\nP.PW\\r\\n...W\\r\\nW..P\\r\\n..W.\\r\\n.PP.\\r\\nW..P\\r\\nW.PW\\r\\n..P.\\r\\nPPW.\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 1\\r\\n.\\r\\nP\\r\\n.\\r\\n.\\r\\nW\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 5\\r\\nPW...\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 10\\r\\nP.PPWWP.PP\\r\\n.W....P.PP\\r\\nPWPP..WW..\\r\\n...W..P.P.\\r\\nWP.W...PWW\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10 5\\r\\n..PWW\\r\\nWWP.P\\r\\n.PP..\\r\\nP..WW\\r\\nPW...\\r\\n.W..P\\r\\n..P.W\\r\\nP.PP.\\r\\nW..WP\\r\\nWPPP.\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6 5\\r\\n..WP.\\r\\nWP..W\\r\\nW.PP.\\r\\n.PWW.\\r\\nP.PPP\\r\\nWP..W\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 6\\r\\nP...PW\\r\\n.WWP.W\\r\\n.P...P\\r\\nWP..W.\\r\\nWPPPWP\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6 10\\r\\nPPP.WW..PW\\r\\n.W.....WP.\\r\\n.W.PP..WP.\\r\\n.PP..WPP.P\\r\\nW.PW.P.PWW\\r\\nWP.P..P.P.\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 6\\r\\n.WW.PW\\r\\n......\\r\\nWP..W.\\r\\nPPWP.P\\r\\n.PW.PW\\r\\nPP.P.W\\r\\nP.PWPP\\r\\nW..W.P\\r\\nWPP..W\\r\\n.PWP.W\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10 10\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 3\\r\\nWPP\\r\\nW.P\\r\\n...\\r\\nPWP\\r\\nPW.\\r\\n..P\\r\\n..W\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 7\\r\\nWP...PW\\r\\n.PW.P..\\r\\nPPW.PW.\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"7 10\\r\\nW..W.PWW.P\\r\\nW.P.P.PP.W\\r\\nP...W.....\\r\\nPWPPW..WW.\\r\\n....PPP..P\\r\\nWP.WPP.P.P\\r\\nPP..PWP.WW\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10 7\\r\\n.PW..WP\\r\\nW...PW.\\r\\n..PW...\\r\\nPW..PP.\\r\\n.W.P.WW\\r\\n.P.P...\\r\\nP.PPW..\\r\\n.PW...P\\r\\nW.P.PPP\\r\\nW.PPWPP\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"8 8\\r\\n.WP....W\\r\\n.W..W.PW\\r\\n.PPPWPP.\\r\\nW..P..W.\\r\\nP.WP...P\\r\\n.P..WPP.\\r\\nP.PPPPWW\\r\\n.PWWP...\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"8 8\\r\\nWP.W...P\\r\\nW.P..WW.\\r\\nP.W.P.P.\\r\\nPPPPPPPP\\r\\nWW..WP.W\\r\\nP.P.PP..\\r\\n..WW..W.\\r\\nPP....W.\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"8 10\\r\\nPWW..P..W.\\r\\nPP.PP...W.\\r\\nWP..PWW.P.\\r\\nP.P.....P.\\r\\nPPW.P.P.WW\\r\\nPPP.WW.PP.\\r\\nW.P....P.P\\r\\n..WWPPW..W\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"10 8\\r\\n.PPW.PWW\\r\\nW.PWP.P.\\r\\nWP..PP..\\r\\n..WP.PPP\\r\\n..PP.WW.\\r\\n.WP...P.\\r\\n..PWW..W\\r\\nW.P..PPW\\r\\n...P...P\\r\\nPWP.WWP.\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"9 8\\r\\nPP..W..W\\r\\n.PP.W..W\\r\\n..W...PP\\r\\nWP.P.WW.\\r\\nW..W.P..\\r\\nP.PP..P.\\r\\n...PW.PP\\r\\n.WPPW..W\\r\\nPWP.PPPP\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"8 9\\r\\nPWWPPW..W\\r\\nP.P..WP.P\\r\\nW..WPP.PP\\r\\nP.PP....W\\r\\n.....WWP.\\r\\nP.WWP.P..\\r\\nW......WW\\r\\nPP.PWPP.P\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"10 10\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 10\\r\\nW.PPWW..P.\\r\\nW.P.....WP\\r\\nP..W......\\r\\n..P.PP.W.P\\r\\n.PW.P..W..\\r\\n..P...PPPP\\r\\nPPP.W..PPP\\r\\nWW.PW...PP\\r\\n.PPP..WW.P\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10 9\\r\\nWWP.P.WPP\\r\\n..PWP.P.W\\r\\n....PWP..\\r\\nWW...P.WP\\r\\n.P.WP..W.\\r\\nPP...W.P.\\r\\nP.W..WP.W\\r\\n.PWPP..P.\\r\\n.PPPPPWW.\\r\\nPW..W..PP\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"10 1\\r\\n.\\r\\nW\\r\\nW\\r\\nP\\r\\nP\\r\\n.\\r\\n.\\r\\n.\\r\\nW\\r\\nP\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 10\\r\\nP.PW.PW..W\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 10\\r\\nPWPP...PPW\\r\\n.P.W...W..\\r\\nW.P.PW....\\r\\nP.P.PW..WP\\r\\nPP.W.PP.P.\\r\\n.P.P..WP.W\\r\\n.WW.PPP..P\\r\\n..P...PPP.\\r\\nP.P..WW..W\\r\\n.WWP...PPW\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"10 10\\r\\n.PW...P.PW\\r\\n....W..PPW\\r\\nWWP.W..P.P\\r\\n.P..PP.P..\\r\\n...W...WW.\\r\\nPWP..W....\\r\\nPW...W..PW\\r\\n.P..P.PP.P\\r\\nPPPPWP..W.\\r\\nPPPPP.W.PP\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10 10\\r\\nPP..PPWPPW\\r\\nPPPPPPPP..\\r\\n.PPPPPPP.P\\r\\nPPPPPPPPPP\\r\\nPWP.PPP.PP\\r\\nPW.PP.PPPP\\r\\nPPPPPP.PPW\\r\\n..PPWPPP.P\\r\\nWPPPPPPPPP\\r\\nWP.WPPPWPP\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 10\\r\\nPPPPPPPPPP\\r\\nPPPPPPPWPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 10\\r\\nPPPPPPPPWP\\r\\nPPPWPPPPPP\\r\\nPPPPPPPPPP\\r\\nPWWPPWPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPWPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPWPPW\\r\\nPPPPPPPPPP\\r\\nPPWPPPPPWP\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 10\\r\\n.PWWP..W..\\r\\n.....W...W\\r\\nWP........\\r\\nW...WP....\\r\\nP.W..P..WW\\r\\n..W...WP.P\\r\\nW...W.....\\r\\n....WP..P.\\r\\n.W....W..W\\r\\n.W....W..W\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10 10\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nW..W..W...\\r\\nW..P..W...\\r\\n..W.....WW\\r\\n....WW....\\r\\nWW.....W..\\r\\n.........W\\r\\n..WW......\\r\\n.......WW.\\r\\nW.........\\r\\nW..WW....W\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 10\\r\\nWP..P....W\\r\\nW...W..P.W\\r\\n....P.WW..\\r\\n..WW......\\r\\n.........W\\r\\nWP....W..W\\r\\nW..W..W...\\r\\n...WP...W.\\r\\n.W.P..P.W.\\r\\nPW...PW...\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10 10\\r\\n..P..WWP.W\\r\\nPP.WPPPPPP\\r\\nWWPP.PPWPP\\r\\nPPPPW..PPW\\r\\nPP.PW.P.PW\\r\\nWW..PPWWP.\\r\\n..PW...PP.\\r\\n.PPPP.PPPW\\r\\nPP.PWP..P.\\r\\nPWPPP..WWP\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"10 10\\r\\n......W...\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n..........\\r\\n........P.\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\n.........P\\r\\n...P.W....\\r\\nPP...WP.WP\\r\\n.W........\\r\\n..........\\r\\n.....WP.W.\\r\\n........WP\\r\\n...P......\\r\\n.......W..\\r\\n.PW..W....\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 10\\r\\n.P.PPPP..W\\r\\nPWW.PPWPPW\\r\\n...PPP.P..\\r\\nW..P...WP.\\r\\n.PPWPP.W..\\r\\n...PPWPPPP\\r\\nWP..PW..W.\\r\\nPPW.....P.\\r\\nP.P...PP.W\\r\\nWPPWW.PPPW\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"10 10\\r\\nW....W...W\\r\\nW....W....\\r\\n..WW...WW.\\r\\n..........\\r\\n.....W...W\\r\\n.....W....\\r\\nWW........\\r\\n........WW\\r\\n..W...W...\\r\\nW...W.....\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nW...W.....\\r\\n..W...WW..\\r\\n.........W\\r\\n...WW....W\\r\\nWW.....W..\\r\\n.....W....\\r\\n..W.....W.\\r\\nW...W.....\\r\\nW.....W..W\\r\\n..WW..W..W\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nWW..W...WW\\r\\n....W.....\\r\\n......WW..\\r\\n.W.....P..\\r\\n.W...W..WW\\r\\n...W......\\r\\nW..W......\\r\\nW....WW..P\\r\\nP.........\\r\\n...WW...WW\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 10\\r\\nP.PPP.PP.P\\r\\nPPP.PPP.P.\\r\\nP.PPPP..PW\\r\\nP.PPP.PP.P\\r\\nPPPPPP.P.P\\r\\nPPPP.PP.P.\\r\\n.PPWPPPPP.\\r\\nPPP...PPPP\\r\\nPPP.PPPP.P\\r\\n.WPPPP.P.P\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 4\\r\\nW..P\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10 10\\r\\nPPPPPPPPPP\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWWWWWWWWWW\\r\\nWWWWWWWWWW\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWWWWWWWWWW\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"4 1\\r\\n.\\r\\nW\\r\\nP\\r\\n.\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 10\\r\\nP..W.PPWW.\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 1\\r\\nP\\r\\nP\\r\\nW\\r\\nW\\r\\n.\\r\\nP\\r\\n.\\r\\n.\\r\\n.\\r\\nW\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n.\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 10\\r\\nPPPWPPPWPP\\r\\nPWPPPWPPPP\\r\\nPPPPPPPPPP\\r\\nWPPWPPWPPW\\r\\nPPPPPPPPPP\\r\\nPWPPWPPWPP\\r\\nPPPPPPPPPP\\r\\nPPWPPWPPWP\\r\\nPPPPPPPPPP\\r\\nWPPWPPWPPW\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"10 10\\r\\nWPPPPWPPWP\\r\\nPPPWPPPPPP\\r\\nPWPPPPWPPP\\r\\nPPPPWPPPWP\\r\\nWPPPPPPPPP\\r\\nPPPWPPWPPP\\r\\nPWPPPPPPWP\\r\\nPPPPWPPPPP\\r\\nWPPPPPWPPP\\r\\nPPPWPPPPWP\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"4 4\\r\\n.P..\\r\\n.W..\\r\\n.P..\\r\\n..W.\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 1\\r\\n.\\r\\n.\\r\\nW\\r\\nP\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3\\r\\nPWP\\r\\n...\\r\\nW..\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\nWWP\\r\\nPPP\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 5\\r\\nPW...\\r\\n', 'output': ['1']}, {'input': '2 3\\r\\nWWP\\r\\nPPP\\r\\n', 'output': ['2']}, {'input': '3 3\\r\\nPWP\\r\\n...\\r\\nW..\\r\\n', 'output': ['1']}, {'input': '10 10\\r\\nPP..PPWPPW\\r\\nPPPPPPPP..\\r\\n.PPPPPPP.P\\r\\nPPPPPPPPPP\\r\\nPWP.PPP.PP\\r\\nPW.PP.PPPP\\r\\nPPPPPP.PPW\\r\\n..PPWPPP.P\\r\\nWPPPPPPPPP\\r\\nWP.WPPPWPP\\r\\n', 'output': ['10']}, {'input': '8 9\\r\\nPWWPPW..W\\r\\nP.P..WP.P\\r\\nW..WPP.PP\\r\\nP.PP....W\\r\\n.....WWP.\\r\\nP.WWP.P..\\r\\nW......WW\\r\\nPP.PWPP.P\\r\\n', 'output': ['13']}]","human_sample_testcases_2":"[{'input': '3 3\\r\\nPWP\\r\\n...\\r\\nW..\\r\\n', 'output': ['1']}, {'input': '6 5\\r\\n..WP.\\r\\nWP..W\\r\\nW.PP.\\r\\n.PWW.\\r\\nP.PPP\\r\\nWP..W\\r\\n', 'output': ['6']}, {'input': '10 1\\r\\nP\\r\\nP\\r\\nW\\r\\nW\\r\\n.\\r\\nP\\r\\n.\\r\\n.\\r\\n.\\r\\nW\\r\\n', 'output': ['1']}, {'input': '10 10\\r\\nW..W..W...\\r\\nW..P..W...\\r\\n..W.....WW\\r\\n....WW....\\r\\nWW.....W..\\r\\n.........W\\r\\n..WW......\\r\\n.......WW.\\r\\nW.........\\r\\nW..WW....W\\r\\n', 'output': ['1']}, {'input': '10 10\\r\\nWW..W...WW\\r\\n....W.....\\r\\n......WW..\\r\\n.W.....P..\\r\\n.W...W..WW\\r\\n...W......\\r\\nW..W......\\r\\nW....WW..P\\r\\nP.........\\r\\n...WW...WW\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '2 3\\r\\nPPW\\r\\nW.P\\r\\n', 'output': ['2']}, {'input': '10 10\\r\\nPPPPPPPPWP\\r\\nPPPWPPPPPP\\r\\nPPPPPPPPPP\\r\\nPWWPPWPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPWPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPWPPW\\r\\nPPPPPPPPPP\\r\\nPPWPPPPPWP\\r\\n', 'output': ['10']}, {'input': '10 10\\r\\n.PWWP..W..\\r\\n.....W...W\\r\\nWP........\\r\\nW...WP....\\r\\nP.W..P..WW\\r\\n..W...WP.P\\r\\nW...W.....\\r\\n....WP..P.\\r\\n.W....W..W\\r\\n.W....W..W\\r\\n', 'output': ['8']}, {'input': '10 10\\r\\nWPPPPWPPWP\\r\\nPPPWPPPPPP\\r\\nPWPPPPWPPP\\r\\nPPPPWPPPWP\\r\\nWPPPPPPPPP\\r\\nPPPWPPWPPP\\r\\nPWPPPPPPWP\\r\\nPPPPWPPPPP\\r\\nWPPPPPWPPP\\r\\nPPPWPPPPWP\\r\\n', 'output': ['18']}, {'input': '10 10\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nPPPPPPPPPP\\r\\nWPPPWPPPWP\\r\\nPPPPPPPPPP\\r\\n', 'output': ['9']}]","human_sample_testcases_4":"[{'input': '10 10\\r\\nW....W...W\\r\\nW....W....\\r\\n..WW...WW.\\r\\n..........\\r\\n.....W...W\\r\\n.....W....\\r\\nWW........\\r\\n........WW\\r\\n..W...W...\\r\\nW...W.....\\r\\n', 'output': ['0']}, {'input': '9 8\\r\\nPP..W..W\\r\\n.PP.W..W\\r\\n..W...PP\\r\\nWP.P.WW.\\r\\nW..W.P..\\r\\nP.PP..P.\\r\\n...PW.PP\\r\\n.WPPW..W\\r\\nPWP.PPPP\\r\\n', 'output': ['12']}, {'input': '6 5\\r\\n.....\\r\\n..PW.\\r\\n.....\\r\\n.WP..\\r\\n.....\\r\\n.....\\r\\n', 'output': ['2']}, {'input': '10 10\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\nP.W.P.W.P.\\r\\n.W.P.W.P.W\\r\\n', 'output': ['0']}, {'input': '10 10\\r\\nW...W.....\\r\\n..W...WW..\\r\\n.........W\\r\\n...WW....W\\r\\nWW.....W..\\r\\n.....W....\\r\\n..W.....W.\\r\\nW...W.....\\r\\nW.....W..W\\r\\n..WW..W..W\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '10 10\\r\\n.........P\\r\\n...P.W....\\r\\nPP...WP.WP\\r\\n.W........\\r\\n..........\\r\\n.....WP.W.\\r\\n........WP\\r\\n...P......\\r\\n.......W..\\r\\n.PW..W....\\r\\n', 'output': ['6']}, {'input': '8 8\\r\\nWP.W...P\\r\\nW.P..WW.\\r\\nP.W.P.P.\\r\\nPPPPPPPP\\r\\nWW..WP.W\\r\\nP.P.PP..\\r\\n..WW..W.\\r\\nPP....W.\\r\\n', 'output': ['9']}, {'input': '3 3\\r\\nPWP\\r\\n...\\r\\nW..\\r\\n', 'output': ['1']}, {'input': '8 4\\r\\nP.WW\\r\\nW..P\\r\\nP..P\\r\\nP.WW\\r\\n..P.\\r\\nW.P.\\r\\nWP.W\\r\\nP..P\\r\\n', 'output': ['6']}, {'input': '6 5\\r\\n.....\\r\\n..PW.\\r\\n.....\\r\\n.WP..\\r\\n.....\\r\\n.....\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":24,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 3 2\", \"3 2 1\"]","input_specification":"The first line contains three integers r, g and b (0\u2009\u2264\u2009r,\u2009g,\u2009b\u2009\u2264\u2009100). It is guaranteed that r\u2009+\u2009g\u2009+\u2009b\u2009>\u20090, it means that the group consists of at least one student. ","src_uid":"a45daac108076102da54e07e1e2a37d7","source_code":"#include \n\nint main()\n{\n int n, sum = 0, i;\n int a[3];\n\n scanf(\"%d %d %d\", &a[0], &a[1], &a[2]);\n\n n = a[0] + a[1] + a[2];\n\n for (i = 0; ; i++) {\n\t if (a[i % 3] >= 2) {\n\t a[i % 3] -= 2;\n\t n -= 2;\n\t } else if (a[i % 3] == 1) {\n\t a[i % 3]--;\n\t n--;\n\t }\n\n\t if (n == 0) break;\n }\n\n printf(\"%d\\n\", i + 30);\n\n return 0;\n}\n","sample_outputs":"[\"34\", \"33\"]","lang_cluster":"C","notes":"NoteLet's analyze the first sample.At the moment of time 0 a red cablecar comes and one student from the r group get on it and ascends to the top at the moment of time 30.At the moment of time 1 a green cablecar arrives and two students from the g group get on it; they get to the top at the moment of time 31.At the moment of time 2 comes the blue cablecar and two students from the b group get on it. They ascend to the top at the moment of time 32.At the moment of time 3 a red cablecar arrives but the only student who is left doesn't like red and the cablecar leaves empty.At the moment of time 4 a green cablecar arrives and one student from the g group gets on it. He ascends to top at the moment of time 34.Thus, all the students are on the top, overall the ascension took exactly 34 minutes.","output_specification":"Print a single number \u2014 the minimal time the students need for the whole group to ascend to the top of the mountain.","description":"A group of university students wants to get to the top of a mountain to have a picnic there. For that they decided to use a cableway.A cableway is represented by some cablecars, hanged onto some cable stations by a cable. A cable is scrolled cyclically between the first and the last cable stations (the first of them is located at the bottom of the mountain and the last one is located at the top). As the cable moves, the cablecar attached to it move as well.The number of cablecars is divisible by three and they are painted three colors: red, green and blue, in such manner that after each red cablecar goes a green one, after each green cablecar goes a blue one and after each blue cablecar goes a red one. Each cablecar can transport no more than two people, the cablecars arrive with the periodicity of one minute (i. e. every minute) and it takes exactly 30 minutes for a cablecar to get to the top.All students are divided into three groups: r of them like to ascend only in the red cablecars, g of them prefer only the green ones and b of them prefer only the blue ones. A student never gets on a cablecar painted a color that he doesn't like,The first cablecar to arrive (at the moment of time 0) is painted red. Determine the least time it will take all students to ascend to the mountain top.","human_testcases":"[{\"input\": \"1 3 2\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"3 2 1\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"3 5 2\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"29 7 24\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"28 94 13\\r\\n\", \"output\": [\"169\"]}, {\"input\": \"90 89 73\\r\\n\", \"output\": [\"163\"]}, {\"input\": \"0 0 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 0 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 1 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 1 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 2 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"0 2 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 2 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 0 0\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"1 0 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 0 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 1 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 1 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 2 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 0 0\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"2 0 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 0 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 1 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"2 1 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 1 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 2 0\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"4 5 2\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"5 7 8\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"13 25 19\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"29 28 30\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"45 52 48\\r\\n\", \"output\": [\"106\"]}, {\"input\": \"68 72 58\\r\\n\", \"output\": [\"136\"]}, {\"input\": \"89 92 90\\r\\n\", \"output\": [\"166\"]}, {\"input\": \"99 97 98\\r\\n\", \"output\": [\"177\"]}, {\"input\": \"89 97 2\\r\\n\", \"output\": [\"175\"]}, {\"input\": \"96 3 92\\r\\n\", \"output\": [\"171\"]}, {\"input\": \"1 99 87\\r\\n\", \"output\": [\"178\"]}, {\"input\": \"95 2 3\\r\\n\", \"output\": [\"171\"]}, {\"input\": \"2 97 3\\r\\n\", \"output\": [\"175\"]}, {\"input\": \"2 2 99\\r\\n\", \"output\": [\"179\"]}, {\"input\": \"100 100 100\\r\\n\", \"output\": [\"179\"]}, {\"input\": \"100 0 100\\r\\n\", \"output\": [\"179\"]}, {\"input\": \"0 100 100\\r\\n\", \"output\": [\"179\"]}, {\"input\": \"100 100 0\\r\\n\", \"output\": [\"178\"]}, {\"input\": \"100 0 0\\r\\n\", \"output\": [\"177\"]}, {\"input\": \"0 100 0\\r\\n\", \"output\": [\"178\"]}, {\"input\": \"0 0 100\\r\\n\", \"output\": [\"179\"]}, {\"input\": \"5 4 5\\r\\n\", \"output\": [\"38\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 2 1\\r\\n', 'output': ['32']}, {'input': '29 28 30\\r\\n', 'output': ['74']}, {'input': '99 97 98\\r\\n', 'output': ['177']}, {'input': '0 2 0\\r\\n', 'output': ['31']}, {'input': '100 0 100\\r\\n', 'output': ['179']}]","human_sample_testcases_2":"[{'input': '95 2 3\\r\\n', 'output': ['171']}, {'input': '2 0 1\\r\\n', 'output': ['32']}, {'input': '0 0 100\\r\\n', 'output': ['179']}, {'input': '1 2 0\\r\\n', 'output': ['31']}, {'input': '100 100 100\\r\\n', 'output': ['179']}]","human_sample_testcases_3":"[{'input': '89 97 2\\r\\n', 'output': ['175']}, {'input': '1 1 0\\r\\n', 'output': ['31']}, {'input': '10 10 10\\r\\n', 'output': ['44']}, {'input': '2 1 2\\r\\n', 'output': ['32']}, {'input': '2 0 2\\r\\n', 'output': ['32']}]","human_sample_testcases_4":"[{'input': '0 1 1\\r\\n', 'output': ['32']}, {'input': '95 2 3\\r\\n', 'output': ['171']}, {'input': '2 2 2\\r\\n', 'output': ['32']}, {'input': '0 0 2\\r\\n', 'output': ['32']}, {'input': '99 97 98\\r\\n', 'output': ['177']}]","human_sample_testcases_5":"[{'input': '1 2 1\\r\\n', 'output': ['32']}, {'input': '2 0 1\\r\\n', 'output': ['32']}, {'input': '89 97 2\\r\\n', 'output': ['175']}, {'input': '1 3 2\\r\\n', 'output': ['34']}, {'input': '1 2 0\\r\\n', 'output': ['31']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":25,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\", \"4\"]","input_specification":"A single line contains one non-negative integer $$$n$$$ ($$$0 \\le n \\leq 10^{18}$$$)\u00a0\u2014 the number of Shiro's friends. The circular pizza has to be sliced into $$$n + 1$$$ pieces.","src_uid":"236177ff30dafe68295b5d33dc501828","source_code":"#include \nint main()\n{\n long long int n;\n scanf(\"%lld\", &n);\n n = n+1;\n if(n%2==0||n-1==0)\n printf(\"%lld\",n\/2);\n else\n printf(\"%lld\",n);\n}","sample_outputs":"[\"2\", \"5\"]","lang_cluster":"C","notes":"NoteTo cut the round pizza into quarters one has to make two cuts through the center with angle $$$90^{\\circ}$$$ between them.To cut the round pizza into five equal parts one has to make five cuts.","output_specification":"A single integer\u00a0\u2014 the number of straight cuts Shiro needs.","description":"Katie, Kuro and Shiro are best friends. They have known each other since kindergarten. That's why they often share everything with each other and work together on some very hard problems.Today is Shiro's birthday. She really loves pizza so she wants to invite her friends to the pizza restaurant near her house to celebrate her birthday, including her best friends Katie and Kuro.She has ordered a very big round pizza, in order to serve her many friends. Exactly $$$n$$$ of Shiro's friends are here. That's why she has to divide the pizza into $$$n + 1$$$ slices (Shiro also needs to eat). She wants the slices to be exactly the same size and shape. If not, some of her friends will get mad and go home early, and the party will be over.Shiro is now hungry. She wants to cut the pizza with minimum of straight cuts. A cut is a straight segment, it might have ends inside or outside the pizza. But she is too lazy to pick up the calculator.As usual, she will ask Katie and Kuro for help. But they haven't come yet. Could you help Shiro with this problem?","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10000000000\\r\\n\", \"output\": [\"10000000001\"]}, {\"input\": \"1234567891\\r\\n\", \"output\": [\"617283946\"]}, {\"input\": \"7509213957\\r\\n\", \"output\": [\"3754606979\"]}, {\"input\": \"99999999999999999\\r\\n\", \"output\": [\"50000000000000000\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"712394453192\\r\\n\", \"output\": [\"712394453193\"]}, {\"input\": \"172212168\\r\\n\", \"output\": [\"172212169\"]}, {\"input\": \"822981260158260519\\r\\n\", \"output\": [\"411490630079130260\"]}, {\"input\": \"28316250877914571\\r\\n\", \"output\": [\"14158125438957286\"]}, {\"input\": \"779547116602436424\\r\\n\", \"output\": [\"779547116602436425\"]}, {\"input\": \"578223540024979436\\r\\n\", \"output\": [\"578223540024979437\"]}, {\"input\": \"335408917861648766\\r\\n\", \"output\": [\"335408917861648767\"]}, {\"input\": \"74859962623690078\\r\\n\", \"output\": [\"74859962623690079\"]}, {\"input\": \"252509054433933439\\r\\n\", \"output\": [\"126254527216966720\"]}, {\"input\": \"760713016476190622\\r\\n\", \"output\": [\"760713016476190623\"]}, {\"input\": \"919845426262703496\\r\\n\", \"output\": [\"919845426262703497\"]}, {\"input\": \"585335723211047194\\r\\n\", \"output\": [\"585335723211047195\"]}, {\"input\": \"522842184971407769\\r\\n\", \"output\": [\"261421092485703885\"]}, {\"input\": \"148049062628894320\\r\\n\", \"output\": [\"148049062628894321\"]}, {\"input\": \"84324828731963974\\r\\n\", \"output\": [\"84324828731963975\"]}, {\"input\": \"354979173822804781\\r\\n\", \"output\": [\"177489586911402391\"]}, {\"input\": \"1312150450968413\\r\\n\", \"output\": [\"656075225484207\"]}, {\"input\": \"269587449430302150\\r\\n\", \"output\": [\"269587449430302151\"]}, {\"input\": \"645762258982631926\\r\\n\", \"output\": [\"645762258982631927\"]}, {\"input\": \"615812229161735895\\r\\n\", \"output\": [\"307906114580867948\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"349993004923078531\\r\\n\", \"output\": [\"174996502461539266\"]}, {\"input\": \"891351282707723851\\r\\n\", \"output\": [\"445675641353861926\"]}, {\"input\": \"563324731189330734\\r\\n\", \"output\": [\"563324731189330735\"]}, {\"input\": \"520974001910286909\\r\\n\", \"output\": [\"260487000955143455\"]}, {\"input\": \"666729339802329204\\r\\n\", \"output\": [\"666729339802329205\"]}, {\"input\": \"856674611404539671\\r\\n\", \"output\": [\"428337305702269836\"]}, {\"input\": \"791809296303238499\\r\\n\", \"output\": [\"395904648151619250\"]}, {\"input\": \"711066337317063338\\r\\n\", \"output\": [\"711066337317063339\"]}, {\"input\": \"931356503492686566\\r\\n\", \"output\": [\"931356503492686567\"]}, {\"input\": \"234122432773361866\\r\\n\", \"output\": [\"234122432773361867\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"1000000000000000001\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"63\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"8\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '712394453192\\r\\n', 'output': ['712394453193']}, {'input': '148049062628894320\\r\\n', 'output': ['148049062628894321']}, {'input': '172212168\\r\\n', 'output': ['172212169']}, {'input': '63\\r\\n', 'output': ['32']}, {'input': '10\\r\\n', 'output': ['11']}]","human_sample_testcases_2":"[{'input': '563324731189330734\\r\\n', 'output': ['563324731189330735']}, {'input': '7\\r\\n', 'output': ['4']}, {'input': '21\\r\\n', 'output': ['11']}, {'input': '666729339802329204\\r\\n', 'output': ['666729339802329205']}, {'input': '615812229161735895\\r\\n', 'output': ['307906114580867948']}]","human_sample_testcases_3":"[{'input': '615812229161735895\\r\\n', 'output': ['307906114580867948']}, {'input': '856674611404539671\\r\\n', 'output': ['428337305702269836']}, {'input': '252509054433933439\\r\\n', 'output': ['126254527216966720']}, {'input': '645762258982631926\\r\\n', 'output': ['645762258982631927']}, {'input': '0\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '354979173822804781\\r\\n', 'output': ['177489586911402391']}, {'input': '563324731189330734\\r\\n', 'output': ['563324731189330735']}, {'input': '0\\r\\n', 'output': ['0']}, {'input': '99999999999999999\\r\\n', 'output': ['50000000000000000']}, {'input': '15\\r\\n', 'output': ['8']}]","human_sample_testcases_5":"[{'input': '21\\r\\n', 'output': ['11']}, {'input': '615812229161735895\\r\\n', 'output': ['307906114580867948']}, {'input': '711066337317063338\\r\\n', 'output': ['711066337317063339']}, {'input': '791809296303238499\\r\\n', 'output': ['395904648151619250']}, {'input': '666729339802329204\\r\\n', 'output': ['666729339802329205']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":75.0,"id":26,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"7 2\", \"59 9\"]","input_specification":"The input consists of two integers n and k, separated by spaces \u2014 the size of the program in lines and the productivity reduction coefficient, 1\u2009\u2264\u2009n\u2009\u2264\u2009109, 2\u2009\u2264\u2009k\u2009\u2264\u200910.","src_uid":"41dfc86d341082dd96e089ac5433dc04","source_code":"#include\ntypedef long long int L;\nint k;\nL i,s,n;\nint check(L m)\n{\n s=0;\n for(i=m;i>0;i=i\/k)\n {\n s=s+i;\n if(s>=n) return 1;\n }\n return 0;\n}\nint main()\n{\n L low=1,high,mid;\n scanf(\"%I64d%d\",&n,&k);\n high=n;\n while(low\n\nint main() {\n\tlong long d, ans, k, a, b, t;\n\n\tscanf(\"%lld%lld%lld%lld%lld\", &d, &k, &a, &b, &t);\n\tif (d < k)\n\t\tans = d * a;\n\telse {\n\t\tans = k * a + (d - k) * b;\n\t\tif (ans > (d \/ k) * (k * a + t) - t + (d % k) * b)\n\t\t\tans = (d \/ k) * (k * a + t) - t + (d % k) * b;\n\t\tif (ans > (d \/ k) * (k * a + t) + (d % k) * a)\n\t\t\tans = (d \/ k) * (k * a + t) + (d % k) * a;\n\t}\n\tprintf(\"%lld\\n\", ans);\n\treturn 0;\n}\n","sample_outputs":"[\"14\", \"13\"]","lang_cluster":"C","notes":"NoteIn the first example Vasiliy needs to drive the first 2 kilometers on the car (in 2 seconds) and then to walk on foot 3 kilometers (in 12 seconds). So the answer equals to 14 seconds.In the second example Vasiliy needs to drive the first 2 kilometers on the car (in 2 seconds), then repair his car (in 5 seconds) and drive 2 kilometers more on the car (in 2 seconds). After that he needs to walk on foot 1 kilometer (in 4 seconds). So the answer equals to 13 seconds.","output_specification":"Print the minimal time after which Vasiliy will be able to reach the post office.","description":"Vasiliy has a car and he wants to get from home to the post office. The distance which he needs to pass equals to d kilometers.Vasiliy's car is not new \u2014 it breaks after driven every k kilometers and Vasiliy needs t seconds to repair it. After repairing his car Vasiliy can drive again (but after k kilometers it will break again, and so on). In the beginning of the trip the car is just from repair station.To drive one kilometer on car Vasiliy spends a seconds, to walk one kilometer on foot he needs b seconds (a\u2009<\u2009b).Your task is to find minimal time after which Vasiliy will be able to reach the post office. Consider that in every moment of time Vasiliy can left his car and start to go on foot.","human_testcases":"[{\"input\": \"5 2 1 4 10\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"5 2 1 4 5\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1 1 1 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000 1000000 999999 1000000 1000000\\r\\n\", \"output\": [\"999999999999000000\"]}, {\"input\": \"997167959139 199252 232602 952690 802746\\r\\n\", \"output\": [\"231947279018960454\"]}, {\"input\": \"244641009859 748096 689016 889744 927808\\r\\n\", \"output\": [\"168561873458925288\"]}, {\"input\": \"483524125987 264237 209883 668942 244358\\r\\n\", \"output\": [\"101483941282301425\"]}, {\"input\": \"726702209411 813081 730750 893907 593611\\r\\n\", \"output\": [\"531038170074636443\"]}, {\"input\": \"965585325539 329221 187165 817564 718673\\r\\n\", \"output\": [\"180725885278576882\"]}, {\"input\": \"213058376259 910770 679622 814124 67926\\r\\n\", \"output\": [\"144799175679959130\"]}, {\"input\": \"451941492387 235422 164446 207726 192988\\r\\n\", \"output\": [\"74320341137487118\"]}, {\"input\": \"690824608515 751563 656903 733131 509537\\r\\n\", \"output\": [\"453805226165077316\"]}, {\"input\": \"934002691939 300407 113318 885765 858791\\r\\n\", \"output\": [\"105841987132852686\"]}, {\"input\": \"375802030518 196518 567765 737596 550121\\r\\n\", \"output\": [\"213368291855090933\"]}, {\"input\": \"614685146646 521171 24179 943227 899375\\r\\n\", \"output\": [\"14863532910609884\"]}, {\"input\": \"857863230070 37311 545046 657309 991732\\r\\n\", \"output\": [\"467597724229950776\"]}, {\"input\": \"101041313494 586155 1461 22992 340986\\r\\n\", \"output\": [\"147680137840428\"]}, {\"input\": \"344219396918 167704 522327 941101 690239\\r\\n\", \"output\": [\"179796501677835485\"]}, {\"input\": \"583102513046 683844 978741 986255 815301\\r\\n\", \"output\": [\"570707031914457669\"]}, {\"input\": \"821985629174 232688 471200 927237 164554\\r\\n\", \"output\": [\"387320209764489810\"]}, {\"input\": \"1000000000000 1 1 2 1000000\\r\\n\", \"output\": [\"1999999999999\"]}, {\"input\": \"1049 593 10 36 7\\r\\n\", \"output\": [\"10497\"]}, {\"input\": \"1 100 1 5 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 1 4 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 20 5 15 50\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"404319 964146 262266 311113 586991\\r\\n\", \"output\": [\"106039126854\"]}, {\"input\": \"1000000000000 1 1 4 1\\r\\n\", \"output\": [\"1999999999999\"]}, {\"input\": \"1000000000000 1 1 10 1\\r\\n\", \"output\": [\"1999999999999\"]}, {\"input\": \"100 123 1 2 1000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 111 1 2 123456\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 110 1 2 100000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 122 1 2 70505\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 300\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 125 1 2 300\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 305\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"10 12 3 4 5\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"100 1000 1 10 1000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 10 1 2 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"11 3 4 5 1\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"100 121 1 2 666\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 10 1 10 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 120 1 2 567\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 2 1 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 120 1 2 306\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 2 1 2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 120 1 2 307\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"3 100 1 2 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"11 12 3 4 5\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"100 120 1 2 399\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 9 54 722 945\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"100 10 1 10 100\\r\\n\", \"output\": [\"910\"]}, {\"input\": \"100 120 1 2 98765\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 101 1 2 3\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1000000000000 1 1 1000000 1\\r\\n\", \"output\": [\"1999999999999\"]}, {\"input\": \"1 100 2 200 900\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 120 1 2 505\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 3\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2 100 1 2 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 10 1 2 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 100 5 6 1000\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"100 120 1 2 506\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 10 1 2 500\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100 120 1 2 507\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 123 1 2 1006\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 509\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 510\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 512\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"4 5 3 4 199\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"100 120 1 2 513\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 123 1 2 1007\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 6 1 2 10000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 10 10 11 12\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100 120 1 2 515\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 120 1 2 516\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 10 1 2000 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000 3 4 5 1\\r\\n\", \"output\": [\"4333333333333\"]}, {\"input\": \"100 5 20 21 50\\r\\n\", \"output\": [\"2095\"]}, {\"input\": \"3 10 3 6 100\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"41 18467 6334 26500 19169\\r\\n\", \"output\": [\"259694\"]}, {\"input\": \"10 20 1 2 100\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 6 1 2 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"270 66 76 82 27\\r\\n\", \"output\": [\"20628\"]}, {\"input\": \"4492 4 3 13 28\\r\\n\", \"output\": [\"44892\"]}, {\"input\": \"28 32 37 38 180\\r\\n\", \"output\": [\"1036\"]}, {\"input\": \"100 120 1 2 520\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 10 2 3 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"66 21 11 21 97\\r\\n\", \"output\": [\"950\"]}, {\"input\": \"549 88 81471 83555 35615\\r\\n\", \"output\": [\"44941269\"]}, {\"input\": \"100 120 1 2 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 999999 1 2 1000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 20 1 100 999999\\r\\n\", \"output\": [\"8020\"]}, {\"input\": \"3 9 8 9 4\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"100 120 1 2 600\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"6 3 4 9 4\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"9 1 1 2 1\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"100 120 1 2 522\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"501 47 789 798 250\\r\\n\", \"output\": [\"397789\"]}, {\"input\": \"3 6 1 6 9\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 5 8 9 4\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"9 1 3 8 2\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"17 42 22 64 14\\r\\n\", \"output\": [\"374\"]}, {\"input\": \"20 5 82 93 50\\r\\n\", \"output\": [\"1790\"]}, {\"input\": \"5 6 2 3 50\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100 120 1 2 525\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"6 3 7 9 1\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"1686604166 451776 534914 885584 885904\\r\\n\", \"output\": [\"902191487931356\"]}, {\"input\": \"1 4 4 6 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 67 61 68 83\\r\\n\", \"output\": [\"305\"]}, {\"input\": \"15 5 11 20 15\\r\\n\", \"output\": [\"195\"]}, {\"input\": \"15 2 9 15 13\\r\\n\", \"output\": [\"213\"]}, {\"input\": \"17 15 9 17 19\\r\\n\", \"output\": [\"169\"]}, {\"input\": \"1 17 9 10 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2 10 10 16 8\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"18419 54 591 791 797\\r\\n\", \"output\": [\"11157406\"]}, {\"input\": \"10 2 1 2 18\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"100 120 1 2 528\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 17 2 3 8\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"63793 358 368 369 367\\r\\n\", \"output\": [\"23539259\"]}, {\"input\": \"7 2 4 16 19\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"3 8 3 5 19\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"17 7 6 9 13\\r\\n\", \"output\": [\"124\"]}, {\"input\": \"14 3 14 16 5\\r\\n\", \"output\": [\"215\"]}, {\"input\": \"2000002 1000000 1 3 1000000\\r\\n\", \"output\": [\"3000006\"]}, {\"input\": \"2 1 3 8 14\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"18 6 8 9 7\\r\\n\", \"output\": [\"156\"]}, {\"input\": \"10 20 10 20 7\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"12 7 8 18 1\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"16 1 3 20 2\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"5 1000 1 4 10\\r\\n\", \"output\": [\"5\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1 1 2 1\\r\\n', 'output': ['1']}, {'input': '100 120 1 2 507\\r\\n', 'output': ['100']}, {'input': '2 100 1 2 10\\r\\n', 'output': ['2']}, {'input': '5 2 1 4 10\\r\\n', 'output': ['14']}, {'input': '1 10 10 11 12\\r\\n', 'output': ['10']}]","human_sample_testcases_2":"[{'input': '5 6 1 2 10000\\r\\n', 'output': ['5']}, {'input': '28 32 37 38 180\\r\\n', 'output': ['1036']}, {'input': '9 1 1 2 1\\r\\n', 'output': ['17']}, {'input': '1 10 10 11 12\\r\\n', 'output': ['10']}, {'input': '100 125 1 2 300\\r\\n', 'output': ['100']}]","human_sample_testcases_3":"[{'input': '100 120 1 2 525\\r\\n', 'output': ['100']}, {'input': '2 3 1 4 10\\r\\n', 'output': ['2']}, {'input': '100 120 1 2 513\\r\\n', 'output': ['100']}, {'input': '2 100 1 2 10\\r\\n', 'output': ['2']}, {'input': '11 12 3 4 5\\r\\n', 'output': ['33']}]","human_sample_testcases_4":"[{'input': '100 5 20 21 50\\r\\n', 'output': ['2095']}, {'input': '1 17 9 10 6\\r\\n', 'output': ['9']}, {'input': '100 120 1 2 306\\r\\n', 'output': ['100']}, {'input': '5 10 1 2000 100000\\r\\n', 'output': ['5']}, {'input': '5 17 2 3 8\\r\\n', 'output': ['10']}]","human_sample_testcases_5":"[{'input': '2 1 3 8 14\\r\\n', 'output': ['11']}, {'input': '15 5 11 20 15\\r\\n', 'output': ['195']}, {'input': '501 47 789 798 250\\r\\n', 'output': ['397789']}, {'input': '100 5 20 21 50\\r\\n', 'output': ['2095']}, {'input': '100 120 1 2 516\\r\\n', 'output': ['100']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":81.82,"human_sample_line_coverage_2":81.82,"human_sample_line_coverage_3":54.55,"human_sample_line_coverage_4":81.82,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":66.67,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":16.67,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":100.0,"id":28,"human_sample_pass_rate":100.0,"human_sample_line_coverage":80.002,"human_sample_branch_coverage":63.336} {"sample_inputs":"[\"5 3 2\\nto head\\n0001001\", \"3 2 1\\nto tail\\n0001\"]","input_specification":"The first line contains three integers n, m and k. They represent the number of wagons in the train, the stowaway's and the controller's initial positions correspondingly (2\u2009\u2264\u2009n\u2009\u2264\u200950, 1\u2009\u2264\u2009m,\u2009k\u2009\u2264\u2009n, m\u2009\u2260\u2009k). The second line contains the direction in which a controller moves. \"to head\" means that the controller moves to the train's head and \"to tail\" means that the controller moves to its tail. It is guaranteed that in the direction in which the controller is moving, there is at least one wagon. Wagon 1 is the head, and wagon n is the tail. The third line has the length from 1 to 200 and consists of symbols \"0\" and \"1\". The i-th symbol contains information about the train's state at the i-th minute of time. \"0\" means that in this very minute the train moves and \"1\" means that the train in this very minute stands idle. The last symbol of the third line is always \"1\" \u2014 that's the terminal train station.","src_uid":"2222ce16926fdc697384add731819f75","source_code":"#include \nint main() {\n\tint n,m,k;\n\tint i;\n\tchar a[3],b[5];\n\tchar c[201];\n\tchar *p;\n\t\/\/ 1-> -1<-\n\tint d;\n\tscanf(\"%d %d %d\", &n, &m, &k);\n\tscanf(\"%s %s\",a,b);\n\tscanf(\"%s\", c);\n\n\tif(b[0] == 'h')\n\t\td = -1;\n\telse\n\t\td = 1;\n\n\tfor(p=c,i=1; *p!='\\0'; p++,i++) {\n\t\tif(*p=='0') {\n\t\t\t\/\/ move stowaway\n\t\t\tif(d == 1 && m-k==1 && m!=n){\n\t\t\t\tm += 1;\n\t\t\t}else if(d == -1 && k-m==1 && m!=1){\n\t\t\t\tm -= 1;\n\t\t\t}\n\t\t\t\/\/ move controller\n\t\t\tk += d;\n\t\t\tif(k == 1)\n\t\t\t\td = 1;\n\t\t\tif(k == n)\n\t\t\t\td = -1;\n\t\t} else {\n\t\t\t\/\/ move controller\n\t\t\tk += d;\n\t\t\tif(k == 1)\n\t\t\t\td = 1;\n\t\t\tif(k == n)\n\t\t\t\td = -1;\n\t\t\t\/\/ move stowaway\n\t\t\tif(d == 1) {\n\t\t\t\tif(n==2)\n\t\t\t\t\tm = 2;\n\t\t\t\telse if(k==1)\n\t\t\t\t\tm = k+2;\n\t\t\t\telse\n\t\t\t\t\tm = k-1;\n\t\t\t}else{\n\t\t\t\tif(n==2)\n\t\t\t\t\tm = 1;\n\t\t\t\telse if(k!=n)\n\t\t\t\t\tm = k+1;\n\t\t\t\telse\n\t\t\t\t\tm = k-2;\n\t\t\t}\n\t\t}\n\n\t\tif(k == m){\n\t\t\tprintf(\"Controller %d\\n\",i);\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tprintf(\"Stowaway\\n\");\n\n\treturn 0;\n}\n","sample_outputs":"[\"Stowaway\", \"Controller 2\"]","lang_cluster":"C","notes":null,"output_specification":"If the stowaway wins, print \"Stowaway\" without quotes. Otherwise, print \"Controller\" again without quotes, then, separated by a space, print the number of a minute, at which the stowaway will be caught.","description":"A stowaway and a controller play the following game. The train is represented by n wagons which are numbered with positive integers from 1 to n from the head to the tail. The stowaway and the controller are initially in some two different wagons. Every minute the train can be in one of two conditions \u2014 moving or idle. Every minute the players move.The controller's move is as follows. The controller has the movement direction \u2014 to the train's head or to its tail. During a move the controller moves to the neighbouring wagon correspondingly to its movement direction. If at the end of his move the controller enters the 1-st or the n-th wagon, that he changes the direction of his movement into the other one. In other words, the controller cyclically goes from the train's head to its tail and back again during all the time of a game, shifting during each move by one wagon. Note, that the controller always have exactly one possible move.The stowaway's move depends from the state of the train. If the train is moving, then the stowaway can shift to one of neighbouring wagons or he can stay where he is without moving. If the train is at a station and is idle, then the stowaway leaves the train (i.e. he is now not present in any train wagon) and then, if it is not the terminal train station, he enters the train again into any of n wagons (not necessarily into the one he's just left and not necessarily into the neighbouring one). If the train is idle for several minutes then each such minute the stowaway leaves the train and enters it back.Let's determine the order of the players' moves. If at the given minute the train is moving, then first the stowaway moves and then the controller does. If at this minute the train is idle, then first the stowaway leaves the train, then the controller moves and then the stowaway enters the train.If at some point in time the stowaway and the controller happen to be in one wagon, then the controller wins: he makes the stowaway pay fine. If after a while the stowaway reaches the terminal train station, then the stowaway wins: he simply leaves the station during his move and never returns there again.At any moment of time the players know each other's positions. The players play in the optimal way. Specifically, if the controller wins, then the stowaway plays so as to lose as late as possible. As all the possible moves for the controller are determined uniquely, then he is considered to play optimally always. Determine the winner.","human_testcases":"[{\"input\": \"5 3 2\\r\\nto head\\r\\n0001001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"3 2 1\\r\\nto tail\\r\\n0001\\r\\n\", \"output\": [\"Controller 2\"]}, {\"input\": \"4 2 1\\r\\nto tail\\r\\n1000001\\r\\n\", \"output\": [\"Controller 6\"]}, {\"input\": \"2 1 2\\r\\nto head\\r\\n111111\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"4 1 4\\r\\nto head\\r\\n010001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"10 2 1\\r\\nto tail\\r\\n000000001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"5 5 3\\r\\nto tail\\r\\n01010000000001\\r\\n\", \"output\": [\"Controller 10\"]}, {\"input\": \"4 3 1\\r\\nto tail\\r\\n1000001001101\\r\\n\", \"output\": [\"Controller 6\"]}, {\"input\": \"4 1 3\\r\\nto head\\r\\n011000011000001\\r\\n\", \"output\": [\"Controller 14\"]}, {\"input\": \"20 13 9\\r\\nto head\\r\\n1111111111111111111111111111111111111111\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"2 1 2\\r\\nto head\\r\\n1101\\r\\n\", \"output\": [\"Controller 3\"]}, {\"input\": \"2 2 1\\r\\nto tail\\r\\n1101\\r\\n\", \"output\": [\"Controller 3\"]}, {\"input\": \"2 1 2\\r\\nto head\\r\\n01\\r\\n\", \"output\": [\"Controller 1\"]}, {\"input\": \"2 2 1\\r\\nto tail\\r\\n01\\r\\n\", \"output\": [\"Controller 1\"]}, {\"input\": \"5 4 2\\r\\nto tail\\r\\n1\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"8 8 7\\r\\nto head\\r\\n0000000000001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"8 8 7\\r\\nto head\\r\\n0000000000000100101000110101011\\r\\n\", \"output\": [\"Controller 13\"]}, {\"input\": \"10 3 8\\r\\nto head\\r\\n01\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"5 1 4\\r\\nto head\\r\\n1000000000001\\r\\n\", \"output\": [\"Controller 7\"]}, {\"input\": \"5 1 3\\r\\nto head\\r\\n1000000000001\\r\\n\", \"output\": [\"Controller 6\"]}, {\"input\": \"3 3 1\\r\\nto tail\\r\\n1001000001\\r\\n\", \"output\": [\"Controller 6\"]}, {\"input\": \"4 3 1\\r\\nto tail\\r\\n00011110000000010001\\r\\n\", \"output\": [\"Controller 3\"]}, {\"input\": \"5 3 4\\r\\nto tail\\r\\n0001000000101000010010010000100110011\\r\\n\", \"output\": [\"Controller 9\"]}, {\"input\": \"6 4 5\\r\\nto tail\\r\\n0010000101101011001000000100111101101001010011001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"7 1 7\\r\\nto head\\r\\n011001001000100000000000000100001100000001100000000010000010011\\r\\n\", \"output\": [\"Controller 24\"]}, {\"input\": \"8 5 6\\r\\nto tail\\r\\n01110101111111111111111111001111111011011111111111101111111111011111101\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"9 7 2\\r\\nto head\\r\\n1000100010110000101010010000000000010010000010100000001001000000001000000101100000000001\\r\\n\", \"output\": [\"Controller 33\"]}, {\"input\": \"10 8 2\\r\\nto tail\\r\\n0000000000000001000000000000000000000000001000000000010000000000001000000000000000100000000000000001\\r\\n\", \"output\": [\"Controller 8\"]}, {\"input\": \"10 1 8\\r\\nto tail\\r\\n0000000000000000001000010000000001000001000000010000000000000000010010001000001000110010000001010011\\r\\n\", \"output\": [\"Controller 11\"]}, {\"input\": \"10 3 6\\r\\nto head\\r\\n0000001001010100000001010001000110001100011100000100100001100000001100000000000010000001000100100011\\r\\n\", \"output\": [\"Controller 5\"]}, {\"input\": \"13 9 8\\r\\nto tail\\r\\n000000000000000000000000000010011100000000000100100000000010000100000000000000000000000000000000000000010000011\\r\\n\", \"output\": [\"Controller 5\"]}, {\"input\": \"17 14 17\\r\\nto head\\r\\n0000001010000000000000100011000000100000001010000001011000000000001000100000000010100000010001000000000000000100000000000001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"20 15 7\\r\\nto head\\r\\n10011111001101010111101110101101101111011110111101001000101111011111011001110010001111111111111101111101011011111010011111111101111011111111\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"26 10 11\\r\\nto head\\r\\n0000000001001000100000010000110000000011100001000010000000000010000000000000110100000001000000010000110011000000100000000010001100010000000100001110001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"31 7 15\\r\\nto tail\\r\\n0010000000000000100000010000010000100000000000000000000001000001100100000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000100001\\r\\n\", \"output\": [\"Controller 106\"]}, {\"input\": \"38 7 18\\r\\nto tail\\r\\n00000000000000000000000000000000000000000000000000000000000000000000000000000001001000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\\r\\n\", \"output\": [\"Controller 57\"]}, {\"input\": \"42 24 17\\r\\nto head\\r\\n00000000000000000000100010000000000000000000001000100000000000000000001000000000000010000100100000100000001000000010010000000000101000000000000000010000000000000000000000000011001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"45 21 37\\r\\nto tail\\r\\n00000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\\r\\n\", \"output\": [\"Controller 96\"]}, {\"input\": \"49 44 14\\r\\nto head\\r\\n0000000000000000000000000000000000100000100000000000000000000000010000000000001000000000000000100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000111001\\r\\n\", \"output\": [\"Controller 157\"]}, {\"input\": \"50 4 12\\r\\nto tail\\r\\n00000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000001000100000000000000000000000000000000000000010000000010000000000000000000000000000000000000000001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"50 9 39\\r\\nto tail\\r\\n00000000000000001000000000000000000000000000000000000000000010000000100000000000000001000100000000000000010000000001000000000000000000000000010000000000000000000000000000000000001000000000000000000101\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"50 43 15\\r\\nto tail\\r\\n00000000000001000000000000000000000000001000000000000000000000001010000000000000000000000010000001000000000000100000000000000000000000000000100000000100000000000001000000000011000000101000010000000001\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"2 2 1\\r\\nto tail\\r\\n11111101111111011111111111111111111111111111110111111110111111111101111111111001111110111111101011101110110011111011111011101011111111101111111110111111011111111111111111110111111111111111101111101111\\r\\n\", \"output\": [\"Controller 7\"]}, {\"input\": \"2 2 1\\r\\nto tail\\r\\n10111111111111111110111011111111111111111111111111111110111111111110111111101111111111111111111111011111111111111011111111110111111101111111111101111111111111111101111111111111111111111111111001111111\\r\\n\", \"output\": [\"Controller 2\"]}, {\"input\": \"3 1 3\\r\\nto head\\r\\n11111111101111101111011011001011101100101101111111111011011111110011110101010111111101101010010111110110111111011111111111111111111110011111011011101110111111111111100111001110111110111011100111111111\\r\\n\", \"output\": [\"Controller 28\"]}, {\"input\": \"3 1 3\\r\\nto head\\r\\n10111111111111111011110110111111110111011111111111111111110101111111111111101111111111011110111110111111111111111111111111111110111111111111111110001011101111101110111111111111111111110101111111110011\\r\\n\", \"output\": [\"Controller 148\"]}, {\"input\": \"4 2 4\\r\\nto head\\r\\n01101111110010111111111111011110111101000011111110111100111010111110111011010111010110011101101010111100000011001011011101101111010111101001001011101111111111100011110110011010111010111011001011111001\\r\\n\", \"output\": [\"Controller 42\"]}, {\"input\": \"50 50 14\\r\\nto head\\r\\n11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"50 42 13\\r\\nto head\\r\\n00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\\r\\n\", \"output\": [\"Controller 61\"]}, {\"input\": \"50 43 39\\r\\nto head\\r\\n01100111001110101111000001011111111100101101011010010001000001110001010011001010010100101100110011010011110110011111011101001111110001111001001100011110000111100100010001000011001001100000000010001111\\r\\n\", \"output\": [\"Stowaway\"]}, {\"input\": \"3 3 2\\r\\nto tail\\r\\n0001\\r\\n\", \"output\": [\"Controller 1\"]}, {\"input\": \"3 2 3\\r\\nto head\\r\\n0000000000000000001\\r\\n\", \"output\": [\"Controller 2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 2 3\\r\\nto head\\r\\n0000000000000000001\\r\\n', 'output': ['Controller 2']}, {'input': '13 9 8\\r\\nto tail\\r\\n000000000000000000000000000010011100000000000100100000000010000100000000000000000000000000000000000000010000011\\r\\n', 'output': ['Controller 5']}, {'input': '31 7 15\\r\\nto tail\\r\\n0010000000000000100000010000010000100000000000000000000001000001100100000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000100001\\r\\n', 'output': ['Controller 106']}, {'input': '50 50 14\\r\\nto head\\r\\n11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n', 'output': ['Stowaway']}, {'input': '3 3 1\\r\\nto tail\\r\\n1001000001\\r\\n', 'output': ['Controller 6']}]","human_sample_testcases_2":"[{'input': '5 1 4\\r\\nto head\\r\\n1000000000001\\r\\n', 'output': ['Controller 7']}, {'input': '3 1 3\\r\\nto head\\r\\n11111111101111101111011011001011101100101101111111111011011111110011110101010111111101101010010111110110111111011111111111111111111110011111011011101110111111111111100111001110111110111011100111111111\\r\\n', 'output': ['Controller 28']}, {'input': '4 1 4\\r\\nto head\\r\\n010001\\r\\n', 'output': ['Stowaway']}, {'input': '2 1 2\\r\\nto head\\r\\n01\\r\\n', 'output': ['Controller 1']}, {'input': '50 43 39\\r\\nto head\\r\\n01100111001110101111000001011111111100101101011010010001000001110001010011001010010100101100110011010011110110011111011101001111110001111001001100011110000111100100010001000011001001100000000010001111\\r\\n', 'output': ['Stowaway']}]","human_sample_testcases_3":"[{'input': '50 9 39\\r\\nto tail\\r\\n00000000000000001000000000000000000000000000000000000000000010000000100000000000000001000100000000000000010000000001000000000000000000000000010000000000000000000000000000000000001000000000000000000101\\r\\n', 'output': ['Stowaway']}, {'input': '2 2 1\\r\\nto tail\\r\\n1101\\r\\n', 'output': ['Controller 3']}, {'input': '10 2 1\\r\\nto tail\\r\\n000000001\\r\\n', 'output': ['Stowaway']}, {'input': '8 8 7\\r\\nto head\\r\\n0000000000000100101000110101011\\r\\n', 'output': ['Controller 13']}, {'input': '42 24 17\\r\\nto head\\r\\n00000000000000000000100010000000000000000000001000100000000000000000001000000000000010000100100000100000001000000010010000000000101000000000000000010000000000000000000000000011001\\r\\n', 'output': ['Stowaway']}]","human_sample_testcases_4":"[{'input': '42 24 17\\r\\nto head\\r\\n00000000000000000000100010000000000000000000001000100000000000000000001000000000000010000100100000100000001000000010010000000000101000000000000000010000000000000000000000000011001\\r\\n', 'output': ['Stowaway']}, {'input': '2 2 1\\r\\nto tail\\r\\n10111111111111111110111011111111111111111111111111111110111111111110111111101111111111111111111111011111111111111011111111110111111101111111111101111111111111111101111111111111111111111111111001111111\\r\\n', 'output': ['Controller 2']}, {'input': '10 1 8\\r\\nto tail\\r\\n0000000000000000001000010000000001000001000000010000000000000000010010001000001000110010000001010011\\r\\n', 'output': ['Controller 11']}, {'input': '50 43 39\\r\\nto head\\r\\n01100111001110101111000001011111111100101101011010010001000001110001010011001010010100101100110011010011110110011111011101001111110001111001001100011110000111100100010001000011001001100000000010001111\\r\\n', 'output': ['Stowaway']}, {'input': '50 50 14\\r\\nto head\\r\\n11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n', 'output': ['Stowaway']}]","human_sample_testcases_5":"[{'input': '10 3 6\\r\\nto head\\r\\n0000001001010100000001010001000110001100011100000100100001100000001100000000000010000001000100100011\\r\\n', 'output': ['Controller 5']}, {'input': '4 1 4\\r\\nto head\\r\\n010001\\r\\n', 'output': ['Stowaway']}, {'input': '5 3 2\\r\\nto head\\r\\n0001001\\r\\n', 'output': ['Stowaway']}, {'input': '6 4 5\\r\\nto tail\\r\\n0010000101101011001000000100111101101001010011001\\r\\n', 'output': ['Stowaway']}, {'input': '10 2 1\\r\\nto tail\\r\\n000000001\\r\\n', 'output': ['Stowaway']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.87,"human_sample_line_coverage_2":92.31,"human_sample_line_coverage_3":97.44,"human_sample_line_coverage_4":94.87,"human_sample_line_coverage_5":94.87,"human_sample_branch_coverage_1":94.74,"human_sample_branch_coverage_2":92.11,"human_sample_branch_coverage_3":94.74,"human_sample_branch_coverage_4":89.47,"human_sample_branch_coverage_5":92.11,"id":29,"human_sample_pass_rate":100.0,"human_sample_line_coverage":94.872,"human_sample_branch_coverage":92.634} {"sample_inputs":"[\"1 1 1\", \"1 2 2\", \"1 3 5\", \"6 2 9\"]","input_specification":"The first and only line of input contains three space-separated integers a, b and c (1\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u20095\u2009000)\u00a0\u2014 the number of islands in the red, blue and purple clusters, respectively.","src_uid":"b6dc5533fbf285d5ef4cf60ef6300383","source_code":"#include \nlong long dp[5001][5001],a,b,c;\nint main()\n{\n scanf(\"%I64d%I64d%I64d\",&a,&b,&c);\n for(int i=0;i<=5000;i++) dp[i][0]=dp[0][i]=1;\n for(int i=1;i<=5000;i++)\n for(int j=1;j<=5000;j++)\n dp[i][j]=(dp[i-1][j]+(dp[i-1][j-1]*j)%998244353)%998244353;\n printf(\"%I64d\\n\",(dp[a][b]*dp[a][c])%998244353*dp[b][c]%998244353);\n}","sample_outputs":"[\"8\", \"63\", \"3264\", \"813023575\"]","lang_cluster":"C","notes":"NoteIn the first example, there are 3 bridges that can possibly be built, and no setup of bridges violates the restrictions. Thus the answer is 23\u2009=\u20098.In the second example, the upper two structures in the figure below are instances of valid ones, while the lower two are invalid due to the blue and purple clusters, respectively. ","output_specification":"Output one line containing an integer\u00a0\u2014 the number of different ways to build bridges, modulo 998\u2009244\u2009353.","description":"\u2014 This is not playing but duty as allies of justice, Nii-chan!\u2014 Not allies but justice itself, Onii-chan!With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters\u00a0\u2014 Karen and Tsukihi\u00a0\u2014 is heading for somewhere they've never reached\u00a0\u2014 water-surrounded islands!There are three clusters of islands, conveniently coloured red, blue and purple. The clusters consist of a, b and c distinct islands respectively.Bridges have been built between some (possibly all or none) of the islands. A bridge bidirectionally connects two different islands and has length 1. For any two islands of the same colour, either they shouldn't be reached from each other through bridges, or the shortest distance between them is at least 3, apparently in order to prevent oddities from spreading quickly inside a cluster.The Fire Sisters are ready for the unknown, but they'd also like to test your courage. And you're here to figure out the number of different ways to build all bridges under the constraints, and give the answer modulo 998\u2009244\u2009353. Two ways are considered different if a pair of islands exist, such that there's a bridge between them in one of them, but not in the other.","human_testcases":"[{\"input\": \"1 1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"1 3 5\\r\\n\", \"output\": [\"3264\"]}, {\"input\": \"6 2 9\\r\\n\", \"output\": [\"813023575\"]}, {\"input\": \"7 3 7\\r\\n\", \"output\": [\"807577560\"]}, {\"input\": \"135 14 39\\r\\n\", \"output\": [\"414849507\"]}, {\"input\": \"5000 5000 5000\\r\\n\", \"output\": [\"986778560\"]}, {\"input\": \"2 1 1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"1 1 3\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"156\"]}, {\"input\": \"4 1 2\\r\\n\", \"output\": [\"315\"]}, {\"input\": \"5 9 4\\r\\n\", \"output\": [\"661093467\"]}, {\"input\": \"4 2 5\\r\\n\", \"output\": [\"326151\"]}, {\"input\": \"9 4 10\\r\\n\", \"output\": [\"391175867\"]}, {\"input\": \"16 8 29\\r\\n\", \"output\": [\"349763770\"]}, {\"input\": \"17 46 45\\r\\n\", \"output\": [\"518654435\"]}, {\"input\": \"28 47 1\\r\\n\", \"output\": [\"517406193\"]}, {\"input\": \"94 87 10\\r\\n\", \"output\": [\"846321893\"]}, {\"input\": \"84 29 61\\r\\n\", \"output\": [\"391253501\"]}, {\"input\": \"179 856 377\\r\\n\", \"output\": [\"518957210\"]}, {\"input\": \"1925 1009 273\\r\\n\", \"output\": [\"207866159\"]}, {\"input\": \"1171 2989 2853\\r\\n\", \"output\": [\"234725427\"]}, {\"input\": \"3238 2923 4661\\r\\n\", \"output\": [\"636587126\"]}, {\"input\": \"1158 506 4676\\r\\n\", \"output\": [\"6109065\"]}, {\"input\": \"4539 2805 2702\\r\\n\", \"output\": [\"356944655\"]}, {\"input\": \"4756 775 3187\\r\\n\", \"output\": [\"56242066\"]}, {\"input\": \"4998 4998 4998\\r\\n\", \"output\": [\"259368717\"]}, {\"input\": \"4996 1 5000\\r\\n\", \"output\": [\"196902859\"]}, {\"input\": \"2048 4096 1024\\r\\n\", \"output\": [\"445542375\"]}, {\"input\": \"5000 1 1\\r\\n\", \"output\": [\"50020002\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '16 8 29\\r\\n', 'output': ['349763770']}, {'input': '2048 4096 1024\\r\\n', 'output': ['445542375']}, {'input': '28 47 1\\r\\n', 'output': ['517406193']}, {'input': '1171 2989 2853\\r\\n', 'output': ['234725427']}, {'input': '4998 4998 4998\\r\\n', 'output': ['259368717']}]","human_sample_testcases_2":"[{'input': '1158 506 4676\\r\\n', 'output': ['6109065']}, {'input': '179 856 377\\r\\n', 'output': ['518957210']}, {'input': '4756 775 3187\\r\\n', 'output': ['56242066']}, {'input': '4996 1 5000\\r\\n', 'output': ['196902859']}, {'input': '1 1 1\\r\\n', 'output': ['8']}]","human_sample_testcases_3":"[{'input': '1171 2989 2853\\r\\n', 'output': ['234725427']}, {'input': '7 3 7\\r\\n', 'output': ['807577560']}, {'input': '28 47 1\\r\\n', 'output': ['517406193']}, {'input': '4 2 5\\r\\n', 'output': ['326151']}, {'input': '3238 2923 4661\\r\\n', 'output': ['636587126']}]","human_sample_testcases_4":"[{'input': '1 2 2\\r\\n', 'output': ['63']}, {'input': '7 3 7\\r\\n', 'output': ['807577560']}, {'input': '4998 4998 4998\\r\\n', 'output': ['259368717']}, {'input': '4 2 5\\r\\n', 'output': ['326151']}, {'input': '135 14 39\\r\\n', 'output': ['414849507']}]","human_sample_testcases_5":"[{'input': '1158 506 4676\\r\\n', 'output': ['6109065']}, {'input': '84 29 61\\r\\n', 'output': ['391253501']}, {'input': '4539 2805 2702\\r\\n', 'output': ['356944655']}, {'input': '1 1 1\\r\\n', 'output': ['8']}, {'input': '4756 775 3187\\r\\n', 'output': ['56242066']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":30,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"a1\\nb2\", \"a8\\nd4\"]","input_specification":"The first input line contains the description of the rook's position on the board. This description is a line which is 2 in length. Its first symbol is a lower-case Latin letter from a to h, and its second symbol is a number from 1 to 8. The second line contains the description of the knight's position in a similar way. It is guaranteed that their positions do not coincide.","src_uid":"073023c6b72ce923df2afd6130719cfc","source_code":"#include\nint board[191][119];\nint main(){\n int a,b,c,d,e;\n char input[50];\n char input1[50];\n int i; int cnt=0;\n scanf(\"%s%s\",input,input1);\n board[input[0]-'a'][(input[1]-'0')-1]=1;\n board[input1[0]-'a'][(input1[1]-'0')-1]=1;\n int rook=input[0]-'a'; int rook1=(input[1]-'0')-1;\n for(i=0;i<8;i++){\n for(a=0;a<8;a++){\n if(board[i][a] != 1 && board[i+2][a+1] != 1 && board[i+2][a-1] != 1 && board[i-2][a+1] != 1 && board[i-2][a-1] != 1 && board[i-1][a+2] != 1 && board[i+1][a+2] != 1 && board[i-1][a-2] != 1 && board[i+1][a-2] != 1 && i!=rook && a!=rook1){\n cnt++;\n board[i][a]=2;\n }\n }\n }\n printf(\"%d\",cnt);\n}\n\n","sample_outputs":"[\"44\", \"38\"]","lang_cluster":"C","notes":null,"output_specification":"Print a single number which is the required number of ways.","description":"Two chess pieces, a rook and a knight, stand on a standard chessboard 8\u2009\u00d7\u20098 in size. The positions in which they are situated are known. It is guaranteed that none of them beats the other one.Your task is to find the number of ways to place another knight on the board so that none of the three pieces on the board beat another one. A new piece can only be placed on an empty square.","human_testcases":"[{\"input\": \"a1\\r\\nb2\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"a8\\r\\nd4\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"a8\\r\\nf1\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"f8\\r\\nh3\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"g8\\r\\nb7\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"h1\\r\\ng5\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"c6\\r\\nb5\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"c1\\r\\nd2\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"g3\\r\\nh4\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"e3\\r\\ng5\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"f8\\r\\na3\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"a2\\r\\nh8\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"a3\\r\\nc5\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"g1\\r\\ne6\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"e1\\r\\na7\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"b5\\r\\nc1\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"b2\\r\\ne1\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"h8\\r\\ng2\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"a3\\r\\nd6\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"g6\\r\\nb7\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"c8\\r\\ne6\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"e6\\r\\nf2\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"b6\\r\\nd8\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"a4\\r\\nd1\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"b5\\r\\nh8\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"h6\\r\\na1\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"c3\\r\\na8\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"g5\\r\\nd2\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"b6\\r\\ng7\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"h6\\r\\na8\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"a8\\r\\nb7\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"c8\\r\\nb2\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"e4\\r\\nc1\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"f1\\r\\nc3\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"a3\\r\\nc8\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"e8\\r\\nb6\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"a1\\r\\nb7\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"g2\\r\\nb7\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"e1\\r\\nd6\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"e5\\r\\nh6\\r\\n\", \"output\": [\"39\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'e1\\r\\nd6\\r\\n', 'output': ['38']}, {'input': 'h8\\r\\ng2\\r\\n', 'output': ['43']}, {'input': 'e1\\r\\na7\\r\\n', 'output': ['41']}, {'input': 'a8\\r\\nb7\\r\\n', 'output': ['44']}, {'input': 'g1\\r\\ne6\\r\\n', 'output': ['39']}]","human_sample_testcases_2":"[{'input': 'a3\\r\\nc8\\r\\n', 'output': ['41']}, {'input': 'a1\\r\\nb2\\r\\n', 'output': ['44']}, {'input': 'a1\\r\\nb7\\r\\n', 'output': ['43']}, {'input': 'g2\\r\\nb7\\r\\n', 'output': ['40']}, {'input': 'a3\\r\\nd6\\r\\n', 'output': ['38']}]","human_sample_testcases_3":"[{'input': 'b5\\r\\nh8\\r\\n', 'output': ['40']}, {'input': 'h6\\r\\na8\\r\\n', 'output': ['43']}, {'input': 'a1\\r\\nb2\\r\\n', 'output': ['44']}, {'input': 'e1\\r\\nd6\\r\\n', 'output': ['38']}, {'input': 'h1\\r\\ng5\\r\\n', 'output': ['42']}]","human_sample_testcases_4":"[{'input': 'g2\\r\\nb7\\r\\n', 'output': ['40']}, {'input': 'e6\\r\\nf2\\r\\n', 'output': ['35']}, {'input': 'h6\\r\\na1\\r\\n', 'output': ['42']}, {'input': 'b5\\r\\nc1\\r\\n', 'output': ['39']}, {'input': 'f8\\r\\na3\\r\\n', 'output': ['40']}]","human_sample_testcases_5":"[{'input': 'c6\\r\\nb5\\r\\n', 'output': ['39']}, {'input': 'a8\\r\\nf1\\r\\n', 'output': ['42']}, {'input': 'b5\\r\\nc1\\r\\n', 'output': ['39']}, {'input': 'g8\\r\\nb7\\r\\n', 'output': ['42']}, {'input': 'f8\\r\\nh3\\r\\n', 'output': ['42']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":31,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1 1\", \"3 1 4\"]","input_specification":"The first line will contain three integers integer k,\u2009pa,\u2009pb (1\u2009\u2264\u2009k\u2009\u2264\u20091\u2009000, 1\u2009\u2264\u2009pa,\u2009pb\u2009\u2264\u20091\u2009000\u2009000).","src_uid":"0dc9f5d75143a2bc744480de859188b4","source_code":"#include \n#define MOD 1000000007\n\nint K;\nlong long PA,PB,ans;\n\nlong long INV1,INV2;\nlong long f[1010][2010];\n\nlong long power(long long a,int b)\n{\n long long y = 1;\n for(;b;b>>=1)\n {\n if(b&1) y = y * a % MOD;\n a = a * a % MOD;\n }\n return y;\n}\n\nint main()\n{\n int i,j;\n long long x,y;\n\n scanf(\"%d%I64d%I64d\",&K,&PA,&PB);\n INV1 = power(PA+PB,MOD-2);\n INV2 = power(PB,MOD-2);\n\n f[1][0] = 1;\n for(i=1;i<=K;i++) for(j=(i==1);j<=2*K;j++)\n {\n if(j < K) f[i][j] = f[i-1][j] * PA % MOD * INV1 % MOD;\n if(j >= i && j-i < K) f[i][j] = (f[i][j] + f[i][j-i] * PB % MOD * INV1) % MOD;\n }\n\n for(i=1;i\n\nint main()\n{\n\tint i = 2, num;\n\t\n\tscanf(\"%d\", &num);\n\tprintf(\"%d \", num);\n\t\n\twhile(num > 1){\n\t\tfor(i = 2; i < num && num % i != 0; i++){}\n\t\tnum \/= i;\n\t\tprintf(\"%d \", num);\n\t}\n\t\n\treturn 0;\n}\n","sample_outputs":"[\"10 5 1\", \"4 2 1\", \"3 1\"]","lang_cluster":"C","notes":null,"output_specification":"Print the denominations of all the coins in the order of decreasing. The number of coins must be the largest possible (with the given denomination n of the most expensive coin). Also, the denomination of every coin must be divisible by the denomination of any cheaper coin. Naturally, the denominations of all the coins should be different. If there are several solutins to that problem, print any of them.","description":"In Berland a money reform is being prepared. New coins are being introduced. After long economic calculations was decided that the most expensive coin should possess the denomination of exactly n Berland dollars. Also the following restriction has been introduced for comfort: the denomination of each coin should be divisible by the denomination of any cheaper coin. It is known that among all the possible variants the variant with the largest number of new coins will be chosen. Find this variant. Print in the order of decreasing of the coins' denominations.","human_testcases":"[{\"input\": \"10\\r\\n\", \"output\": [\"10 5 1\", \"10\\r\\n5\\r\\n1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\\r\\n2\\r\\n1\", \"4 2 1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3 1\", \"3\\r\\n1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2 1\", \"2\\r\\n1\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"5\\r\\n1\", \"5 1\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"6\\r\\n3\\r\\n1\", \"6 3 1\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7 1\", \"7\\r\\n1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"8\\r\\n4\\r\\n2\\r\\n1\", \"8 4 2 1\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"12 6 3 1\", \"12\\r\\n6\\r\\n3\\r\\n1\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"100 50 25 5 1\", \"100\\r\\n50\\r\\n25\\r\\n5\\r\\n1\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"1000 500 250 125 25 5 1\", \"1000\\r\\n500\\r\\n250\\r\\n125\\r\\n25\\r\\n5\\r\\n1\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"10000\\r\\n5000\\r\\n2500\\r\\n1250\\r\\n625\\r\\n125\\r\\n25\\r\\n5\\r\\n1\", \"10000 5000 2500 1250 625 125 25 5 1\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"100000 50000 25000 12500 6250 3125 625 125 25 5 1\", \"100000\\r\\n50000\\r\\n25000\\r\\n12500\\r\\n6250\\r\\n3125\\r\\n625\\r\\n125\\r\\n25\\r\\n5\\r\\n1\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"1000000\\r\\n500000\\r\\n250000\\r\\n125000\\r\\n62500\\r\\n31250\\r\\n15625\\r\\n3125\\r\\n625\\r\\n125\\r\\n25\\r\\n5\\r\\n1\", \"1000000 500000 250000 125000 62500 31250 15625 3125 625 125 25 5 1\"]}, {\"input\": \"509149\\r\\n\", \"output\": [\"509149\\r\\n1\", \"509149 1\"]}, {\"input\": \"572877\\r\\n\", \"output\": [\"572877\\r\\n190959\\r\\n63653\\r\\n1201\\r\\n1\", \"572877 190959 63653 1201 1\"]}, {\"input\": \"152956\\r\\n\", \"output\": [\"152956 76478 38239 1\", \"152956\\r\\n76478\\r\\n38239\\r\\n1\"]}, {\"input\": \"733035\\r\\n\", \"output\": [\"733035 244345 48869 1\", \"733035\\r\\n244345\\r\\n48869\\r\\n1\"]}, {\"input\": \"313114\\r\\n\", \"output\": [\"313114 156557 3331 1\", \"313114\\r\\n156557\\r\\n3331\\r\\n1\"]}, {\"input\": \"893193\\r\\n\", \"output\": [\"893193\\r\\n297731\\r\\n42533\\r\\n1\", \"893193 297731 42533 1\"]}, {\"input\": \"473273\\r\\n\", \"output\": [\"473273\\r\\n2243\\r\\n1\", \"473273 2243 1\"]}, {\"input\": \"537000\\r\\n\", \"output\": [\"537000 268500 134250 67125 22375 4475 895 179 1\", \"537000\\r\\n268500\\r\\n134250\\r\\n67125\\r\\n22375\\r\\n4475\\r\\n895\\r\\n179\\r\\n1\"]}, {\"input\": \"117079\\r\\n\", \"output\": [\"117079 6887 97 1\", \"117079\\r\\n6887\\r\\n97\\r\\n1\"]}, {\"input\": \"784653\\r\\n\", \"output\": [\"784653 261551 9019 311 1\", \"784653\\r\\n261551\\r\\n9019\\r\\n311\\r\\n1\"]}, {\"input\": \"627251\\r\\n\", \"output\": [\"627251 1\", \"627251\\r\\n1\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9 3 1\", \"9\\r\\n3\\r\\n1\"]}, {\"input\": \"999999\\r\\n\", \"output\": [\"999999\\r\\n333333\\r\\n111111\\r\\n37037\\r\\n5291\\r\\n481\\r\\n37\\r\\n1\", \"999999 333333 111111 37037 5291 481 37 1\"]}, {\"input\": \"120\\r\\n\", \"output\": [\"120\\r\\n60\\r\\n30\\r\\n15\\r\\n5\\r\\n1\", \"120 60 30 15 5 1\"]}, {\"input\": \"720\\r\\n\", \"output\": [\"720\\r\\n360\\r\\n180\\r\\n90\\r\\n45\\r\\n15\\r\\n5\\r\\n1\", \"720 360 180 90 45 15 5 1\"]}, {\"input\": \"648\\r\\n\", \"output\": [\"648 324 162 81 27 9 3 1\", \"648\\r\\n324\\r\\n162\\r\\n81\\r\\n27\\r\\n9\\r\\n3\\r\\n1\"]}, {\"input\": \"2430\\r\\n\", \"output\": [\"2430\\r\\n1215\\r\\n405\\r\\n135\\r\\n45\\r\\n15\\r\\n5\\r\\n1\", \"2430 1215 405 135 45 15 5 1\"]}, {\"input\": \"119070\\r\\n\", \"output\": [\"119070\\r\\n59535\\r\\n19845\\r\\n6615\\r\\n2205\\r\\n735\\r\\n245\\r\\n49\\r\\n7\\r\\n1\", \"119070 59535 19845 6615 2205 735 245 49 7 1\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"15\\r\\n5\\r\\n1\", \"15 5 1\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"21 7 1\", \"21\\r\\n7\\r\\n1\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"25 5 1\", \"25\\r\\n5\\r\\n1\"]}, {\"input\": \"524287\\r\\n\", \"output\": [\"524287\\r\\n1\", \"524287 1\"]}, {\"input\": \"600\\r\\n\", \"output\": [\"600\\r\\n300\\r\\n150\\r\\n75\\r\\n25\\r\\n5\\r\\n1\", \"600 300 150 75 25 5 1\"]}, {\"input\": \"36\\r\\n\", \"output\": [\"36 18 9 3 1\", \"36\\r\\n18\\r\\n9\\r\\n3\\r\\n1\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"20 10 5 1\", \"20\\r\\n10\\r\\n5\\r\\n1\"]}, {\"input\": \"999983\\r\\n\", \"output\": [\"999983\\r\\n1\", \"999983 1\"]}, {\"input\": \"121\\r\\n\", \"output\": [\"121 11 1\", \"121\\r\\n11\\r\\n1\"]}, {\"input\": \"1331\\r\\n\", \"output\": [\"1331 121 11 1\", \"1331\\r\\n121\\r\\n11\\r\\n1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000\\r\\n', 'output': ['1000 500 250 125 25 5 1', '1000\\r\\n500\\r\\n250\\r\\n125\\r\\n25\\r\\n5\\r\\n1']}, {'input': '3\\r\\n', 'output': ['3 1', '3\\r\\n1']}, {'input': '537000\\r\\n', 'output': ['537000 268500 134250 67125 22375 4475 895 179 1', '537000\\r\\n268500\\r\\n134250\\r\\n67125\\r\\n22375\\r\\n4475\\r\\n895\\r\\n179\\r\\n1']}, {'input': '784653\\r\\n', 'output': ['784653 261551 9019 311 1', '784653\\r\\n261551\\r\\n9019\\r\\n311\\r\\n1']}, {'input': '648\\r\\n', 'output': ['648 324 162 81 27 9 3 1', '648\\r\\n324\\r\\n162\\r\\n81\\r\\n27\\r\\n9\\r\\n3\\r\\n1']}]","human_sample_testcases_2":"[{'input': '120\\r\\n', 'output': ['120\\r\\n60\\r\\n30\\r\\n15\\r\\n5\\r\\n1', '120 60 30 15 5 1']}, {'input': '6\\r\\n', 'output': ['6\\r\\n3\\r\\n1', '6 3 1']}, {'input': '784653\\r\\n', 'output': ['784653 261551 9019 311 1', '784653\\r\\n261551\\r\\n9019\\r\\n311\\r\\n1']}, {'input': '5\\r\\n', 'output': ['5\\r\\n1', '5 1']}, {'input': '2430\\r\\n', 'output': ['2430\\r\\n1215\\r\\n405\\r\\n135\\r\\n45\\r\\n15\\r\\n5\\r\\n1', '2430 1215 405 135 45 15 5 1']}]","human_sample_testcases_3":"[{'input': '572877\\r\\n', 'output': ['572877\\r\\n190959\\r\\n63653\\r\\n1201\\r\\n1', '572877 190959 63653 1201 1']}, {'input': '4\\r\\n', 'output': ['4\\r\\n2\\r\\n1', '4 2 1']}, {'input': '10\\r\\n', 'output': ['10 5 1', '10\\r\\n5\\r\\n1']}, {'input': '7\\r\\n', 'output': ['7 1', '7\\r\\n1']}, {'input': '1\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '9\\r\\n', 'output': ['9 3 1', '9\\r\\n3\\r\\n1']}, {'input': '473273\\r\\n', 'output': ['473273\\r\\n2243\\r\\n1', '473273 2243 1']}, {'input': '999999\\r\\n', 'output': ['999999\\r\\n333333\\r\\n111111\\r\\n37037\\r\\n5291\\r\\n481\\r\\n37\\r\\n1', '999999 333333 111111 37037 5291 481 37 1']}, {'input': '25\\r\\n', 'output': ['25 5 1', '25\\r\\n5\\r\\n1']}, {'input': '1000\\r\\n', 'output': ['1000 500 250 125 25 5 1', '1000\\r\\n500\\r\\n250\\r\\n125\\r\\n25\\r\\n5\\r\\n1']}]","human_sample_testcases_5":"[{'input': '15\\r\\n', 'output': ['15\\r\\n5\\r\\n1', '15 5 1']}, {'input': '36\\r\\n', 'output': ['36 18 9 3 1', '36\\r\\n18\\r\\n9\\r\\n3\\r\\n1']}, {'input': '473273\\r\\n', 'output': ['473273\\r\\n2243\\r\\n1', '473273 2243 1']}, {'input': '25\\r\\n', 'output': ['25 5 1', '25\\r\\n5\\r\\n1']}, {'input': '119070\\r\\n', 'output': ['119070\\r\\n59535\\r\\n19845\\r\\n6615\\r\\n2205\\r\\n735\\r\\n245\\r\\n49\\r\\n7\\r\\n1', '119070 59535 19845 6615 2205 735 245 49 7 1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":33,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7 1 4\", \"30 20 10\"]","input_specification":"The first line of the input contains three distinct integers x1, x2 and x3 (1\u2009\u2264\u2009x1,\u2009x2,\u2009x3\u2009\u2264\u2009100)\u00a0\u2014 the coordinates of the houses of the first, the second and the third friends respectively. ","src_uid":"7bffa6e8d2d21bbb3b7f4aec109b3319","source_code":"#include \n#include \nint main(){\n int a[3];\n int b;\n scanf(\"%d%d%d\", &a[0], &a[1], &a[2]);\n for (int i = 0; i < 3; i++)\n for (int j = 0; j < 3; j ++)\n if (a[i] < a[j])\n {\n b = a[i];\n a[i] = a[j];\n a[j] = b;\n }\n\n printf(\"%d\", a[2] - a[0]);\n return 0;\n}\n","sample_outputs":"[\"6\", \"20\"]","lang_cluster":"C","notes":"NoteIn the first sample, friends should meet at the point 4. Thus, the first friend has to travel the distance of 3 (from the point 7 to the point 4), the second friend also has to travel the distance of 3 (from the point 1 to the point 4), while the third friend should not go anywhere because he lives at the point 4.","output_specification":"Print one integer\u00a0\u2014 the minimum total distance the friends need to travel in order to meet together.","description":"There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x1, the second friend lives at the point x2, and the third friend lives at the point x3. They plan to celebrate the New Year together, so they need to meet at one point. What is the minimum total distance they have to travel in order to meet at some point and celebrate the New Year?It's guaranteed that the optimal answer is always integer.","human_testcases":"[{\"input\": \"7 1 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"30 20 10\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1 4 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"100 1 91\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 45 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"71 85 88\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"30 38 99\\r\\n\", \"output\": [\"69\"]}, {\"input\": \"23 82 95\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"22 41 47\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"9 94 77\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"1 53 51\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"25 97 93\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"42 53 51\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"81 96 94\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"21 5 93\\r\\n\", \"output\": [\"88\"]}, {\"input\": \"50 13 75\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"41 28 98\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"69 46 82\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"87 28 89\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"44 45 40\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"86 97 68\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"43 92 30\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"16 70 1\\r\\n\", \"output\": [\"69\"]}, {\"input\": \"40 46 19\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"71 38 56\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"82 21 80\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"75 8 35\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"75 24 28\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"78 23 56\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"85 31 10\\r\\n\", \"output\": [\"75\"]}, {\"input\": \"76 50 9\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"95 37 34\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"84 61 35\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"87 85 37\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"1 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 2 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 9 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"12 4 8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"15 10 5\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 50 17\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"10 5 15\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"8 1 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3 5 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 8 2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 100 2\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 4 6\\r\\n\", \"output\": [\"5\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '30 38 99\\r\\n', 'output': ['69']}, {'input': '86 97 68\\r\\n', 'output': ['29']}, {'input': '4 2 6\\r\\n', 'output': ['4']}, {'input': '42 53 51\\r\\n', 'output': ['11']}, {'input': '1 100 2\\r\\n', 'output': ['99']}]","human_sample_testcases_2":"[{'input': '84 61 35\\r\\n', 'output': ['49']}, {'input': '1 3 2\\r\\n', 'output': ['2']}, {'input': '50 13 75\\r\\n', 'output': ['62']}, {'input': '30 38 99\\r\\n', 'output': ['69']}, {'input': '25 97 93\\r\\n', 'output': ['72']}]","human_sample_testcases_3":"[{'input': '41 28 98\\r\\n', 'output': ['70']}, {'input': '43 92 30\\r\\n', 'output': ['62']}, {'input': '15 10 5\\r\\n', 'output': ['10']}, {'input': '7 1 4\\r\\n', 'output': ['6']}, {'input': '75 8 35\\r\\n', 'output': ['67']}]","human_sample_testcases_4":"[{'input': '23 82 95\\r\\n', 'output': ['72']}, {'input': '30 38 99\\r\\n', 'output': ['69']}, {'input': '76 50 9\\r\\n', 'output': ['67']}, {'input': '9 94 77\\r\\n', 'output': ['85']}, {'input': '30 20 10\\r\\n', 'output': ['20']}]","human_sample_testcases_5":"[{'input': '1 45 100\\r\\n', 'output': ['99']}, {'input': '1 2 3\\r\\n', 'output': ['2']}, {'input': '95 37 34\\r\\n', 'output': ['61']}, {'input': '15 10 5\\r\\n', 'output': ['10']}, {'input': '1 4 6\\r\\n', 'output': ['5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":34,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"... ... ...\\n... ... ...\\n... ... ...\\n\\n... ... ...\\n... ... ...\\n... x.. ...\\n\\n... ... ...\\n... ... ...\\n... ... ...\\n6 4\", \"xoo x.. x..\\nooo ... ...\\nooo ... ...\\n\\nx.. x.. x..\\n... ... ...\\n... ... ...\\n\\nx.. x.. x..\\n... ... ...\\n... ... ...\\n7 4\", \"o.. ... ...\\n... ... ...\\n... ... ...\\n\\n... xxx ...\\n... xox ...\\n... ooo ...\\n\\n... ... ...\\n... ... ...\\n... ... ...\\n5 5\"]","input_specification":"First 11 lines contains descriptions of table with 9 rows and 9 columns which are divided into 9 small fields by spaces and empty lines. Each small field is described by 9 characters without spaces and empty lines. character \"x\" (ASCII-code 120) means that the cell is occupied with chip of the first player, character \"o\" (ASCII-code 111) denotes a field occupied with chip of the second player, character \".\" (ASCII-code 46) describes empty cell. The line after the table contains two integers x and y (1\u2009\u2264\u2009x,\u2009y\u2009\u2264\u20099). They describe coordinates of the cell in table where the last move was done. Rows in the table are numbered from up to down and columns are numbered from left to right. It's guaranteed that cell where the last move was done is filled with \"x\" or \"o\". Also, it's guaranteed that there is at least one empty cell. It's not guaranteed that current state of game is reachable.","src_uid":"8f0fad22f629332868c39969492264d3","source_code":"#include \n#include \n#include \n#include \n#define eps 1e-4\n#define PI acos(-1.0)\nchar s[10][15];\nint sti[4]={0,1,4,7},eni[4]={0,3,6,9};\nint stj[4]={0,0,4,8},enj[4]={0,2,6,10};\nvoid printall2()\n{\n\tfor (int i=1;i<=9;i++)\n\t{\n\t\tfor (int j=0;j<=10;j++)\n\t\t\tif (s[i][j]=='.') printf(\"!\");\n\t\t\telse printf(\"%c\",s[i][j]);\n\t\tprintf(\"\\n\");\n\t\tif (!(i%3)) printf(\"\\n\");\n\t}\n}\nvoid printall1()\n{\n\tfor (int i=1;i<=9;i++)\n\t{\n\t\tfor (int j=0;j<=10;j++)\n\t\t\tprintf(\"%c\",s[i][j]);\n\t\tprintf(\"\\n\");\n\t\tif (!(i%3)&&i!=9) printf(\"\\n\");\n\t}\n}\nint main()\n{\n\tfor (int i=1;i<=3;i++) gets(s[i]);\n\tgets(s[0]);\n\tfor (int i=4;i<=6;i++) gets(s[i]);\n\tgets(s[0]);\n\tfor (int i=7;i<=9;i++) gets(s[i]);\n\tint n,m;\n\tscanf(\"%d%d\",&n,&m);\n\tn%=3; m%=3; \n\tif (!n) n=3;\n\tif (!m) m=3;\n\tint flag=0;\n\tfor (int i=sti[n];i<=eni[n];i++)\n\t\tfor (int j=stj[m];j<=enj[m];j++)\n\t\t\tif (s[i][j]=='.')\n\t\t\t{\n\t\t\t\tflag++;\n\t\t\t\ts[i][j]='!';\n\t\t\t}\n\tif (flag) printall1();\n\telse printall2();\n\treturn 0;\n}\n","sample_outputs":"[\"... ... ... \\n... ... ... \\n... ... ... \\n\\n... ... ... \\n... ... ... \\n... x.. ... \\n\\n!!! ... ... \\n!!! ... ... \\n!!! ... ...\", \"xoo x!! x!! \\nooo !!! !!! \\nooo !!! !!! \\n\\nx!! x!! x!! \\n!!! !!! !!! \\n!!! !!! !!! \\n\\nx!! x!! x!! \\n!!! !!! !!! \\n!!! !!! !!!\", \"o!! !!! !!! \\n!!! !!! !!! \\n!!! !!! !!! \\n\\n!!! xxx !!! \\n!!! xox !!! \\n!!! ooo !!! \\n\\n!!! !!! !!! \\n!!! !!! !!! \\n!!! !!! !!!\"]","lang_cluster":"C","notes":"NoteIn the first test case the first player made a move to lower left cell of central field, so the second player can put a chip only to cells of lower left field.In the second test case the last move was done to upper left cell of lower central field, however all cells in upper left field are occupied, so the second player can put his chip to any empty cell.In the third test case the last move was done to central cell of central field, so current player can put his chip to any cell of central field, which is already occupied, so he can move anywhere. Pay attention that this state of the game is unreachable.","output_specification":"Output the field in same format with characters \"!\" (ASCII-code 33) on positions where the current player can put his chip. All other cells should not be modified.","description":"Two bears are playing tic-tac-toe via mail. It's boring for them to play usual tic-tac-toe game, so they are a playing modified version of this game. Here are its rules.The game is played on the following field. Players are making moves by turns. At first move a player can put his chip in any cell of any small field. For following moves, there are some restrictions: if during last move the opposite player put his chip to cell with coordinates (xl,\u2009yl) in some small field, the next move should be done in one of the cells of the small field with coordinates (xl,\u2009yl). For example, if in the first move a player puts his chip to lower left cell of central field, then the second player on his next move should put his chip into some cell of lower left field (pay attention to the first test case). If there are no free cells in the required field, the player can put his chip to any empty cell on any field.You are given current state of the game and coordinates of cell in which the last move was done. You should find all cells in which the current player can put his chip.A hare works as a postman in the forest, he likes to foul bears. Sometimes he changes the game field a bit, so the current state of the game could be unreachable. However, after his changes the cell where the last move was done is not empty. You don't need to find if the state is unreachable or not, just output possible next moves according to the rules.","human_testcases":"[{\"input\": \"... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n6 4\\r\\n\", \"output\": [\"... ... ...\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n ... x.. ...\\r\\n\\r\\n !!! ... ...\\r\\n !!! ... ...\\r\\n !!! ... ...\", \"... ... ... \\r\\n... ... ... \\r\\n... ... ... \\r\\n\\r\\n... ... ... \\r\\n... ... ... \\r\\n... x.. ... \\r\\n\\r\\n!!! ... ... \\r\\n!!! ... ... \\r\\n!!! ... ...\", \"... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n!!! ... ...\\r\\n!!! ... ...\\r\\n!!! ... ...\"]}, {\"input\": \"xoo x.. x..\\r\\nooo ... ...\\r\\nooo ... ...\\r\\n\\r\\nx.. x.. x..\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\nx.. x.. x..\\r\\n... ... ...\\r\\n... ... ...\\r\\n7 4\\r\\n\", \"output\": [\"xoo x!! x!!\\r\\n ooo !!! !!!\\r\\n ooo !!! !!!\\r\\n\\r\\n x!! x!! x!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n\\r\\n x!! x!! x!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\", \"xoo x!! x!!\\r\\nooo !!! !!!\\r\\nooo !!! !!!\\r\\n\\r\\nx!! x!! x!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n\\r\\nx!! x!! x!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\", \"xoo x!! x!! \\r\\nooo !!! !!! \\r\\nooo !!! !!! \\r\\n\\r\\nx!! x!! x!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n\\r\\nx!! x!! x!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!!\"]}, {\"input\": \"o.. ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... xxx ...\\r\\n... xox ...\\r\\n... ooo ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n5 5\\r\\n\", \"output\": [\"o!! !!! !!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n\\r\\n !!! xxx !!!\\r\\n !!! xox !!!\\r\\n !!! ooo !!!\\r\\n\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\", \"o!! !!! !!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n\\r\\n!!! xxx !!!\\r\\n!!! xox !!!\\r\\n!!! ooo !!!\\r\\n\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\", \"o!! !!! !!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n\\r\\n!!! xxx !!! \\r\\n!!! xox !!! \\r\\n!!! ooo !!! \\r\\n\\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!!\"]}, {\"input\": \".o. .o. ..x\\r\\n..x .xx ..o\\r\\n... ... ...\\r\\n\\r\\n... ... xxo\\r\\n..x o.o oxo\\r\\n.x. .o. xoo\\r\\n\\r\\n... o.. ...\\r\\n..o .xx ..x\\r\\n... ... ...\\r\\n5 9\\r\\n\", \"output\": [\"!o! !o! !!x \\r\\n!!x !xx !!o \\r\\n!!! !!! !!! \\r\\n\\r\\n!!! !!! xxo \\r\\n!!x o!o oxo \\r\\n!x! !o! xoo \\r\\n\\r\\n!!! o!! !!! \\r\\n!!o !xx !!x \\r\\n!!! !!! !!!\", \"!o! !o! !!x\\r\\n!!x !xx !!o\\r\\n!!! !!! !!!\\r\\n\\r\\n!!! !!! xxo\\r\\n!!x o!o oxo\\r\\n!x! !o! xoo\\r\\n\\r\\n!!! o!! !!!\\r\\n!!o !xx !!x\\r\\n!!! !!! !!!\", \"!o! !o! !!x\\r\\n !!x !xx !!o\\r\\n !!! !!! !!!\\r\\n\\r\\n !!! !!! xxo\\r\\n !!x o!o oxo\\r\\n !x! !o! xoo\\r\\n\\r\\n !!! o!! !!!\\r\\n !!o !xx !!x\\r\\n !!! !!! !!!\"]}, {\"input\": \"... .o. ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... .x. ..x\\r\\n\\r\\n.x. ... ...\\r\\n..o ... .o.\\r\\n... o.o xx.\\r\\n1 5\\r\\n\", \"output\": [\"... !o! ... \\r\\n... !!! ... \\r\\n... !!! ... \\r\\n\\r\\n... ... ... \\r\\n... ... ... \\r\\n... .x. ..x \\r\\n\\r\\n.x. ... ... \\r\\n..o ... .o. \\r\\n... o.o xx.\", \"... !o! ...\\r\\n... !!! ...\\r\\n... !!! ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... .x. ..x\\r\\n\\r\\n.x. ... ...\\r\\n..o ... .o.\\r\\n... o.o xx.\", \"... !o! ...\\r\\n ... !!! ...\\r\\n ... !!! ...\\r\\n\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n ... .x. ..x\\r\\n\\r\\n .x. ... ...\\r\\n ..o ... .o.\\r\\n ... o.o xx.\"]}, {\"input\": \"ooo oxx xxo\\r\\nx.x oox xox\\r\\noox xo. xxx\\r\\n\\r\\nxxo xxx o.o\\r\\nxoo xo. oxo\\r\\nooo xox ox.\\r\\n\\r\\nxoo xoo .oo\\r\\nxox xox ox.\\r\\noxx xox oxo\\r\\n1 3\\r\\n\", \"output\": [\"ooo oxx xxo \\r\\nx!x oox xox \\r\\noox xo! xxx \\r\\n\\r\\nxxo xxx o!o \\r\\nxoo xo! oxo \\r\\nooo xox ox! \\r\\n\\r\\nxoo xoo !oo \\r\\nxox xox ox! \\r\\noxx xox oxo\", \"ooo oxx xxo\\r\\nx!x oox xox\\r\\noox xo! xxx\\r\\n\\r\\nxxo xxx o!o\\r\\nxoo xo! oxo\\r\\nooo xox ox!\\r\\n\\r\\nxoo xoo !oo\\r\\nxox xox ox!\\r\\noxx xox oxo\", \"ooo oxx xxo\\r\\n x!x oox xox\\r\\n oox xo! xxx\\r\\n\\r\\n xxo xxx o!o\\r\\n xoo xo! oxo\\r\\n ooo xox ox!\\r\\n\\r\\n xoo xoo !oo\\r\\n xox xox ox!\\r\\n oxx xox oxo\"]}, {\"input\": \"... ... ...\\r\\n..o ... ..o\\r\\n... .x. ..x\\r\\n\\r\\nx.. ... ...\\r\\n.x. .ox oo.\\r\\n... .xo ..x\\r\\n\\r\\n... ... .ox\\r\\n... ox. ..x\\r\\n... ..o .o.\\r\\n2 3\\r\\n\", \"output\": [\"... ... ...\\r\\n ..o ... ..o\\r\\n ... .x. ..x\\r\\n\\r\\n x.. ... !!!\\r\\n .x. .ox oo!\\r\\n ... .xo !!x\\r\\n\\r\\n ... ... .ox\\r\\n ... ox. ..x\\r\\n ... ..o .o.\", \"... ... ...\\r\\n..o ... ..o\\r\\n... .x. ..x\\r\\n\\r\\nx.. ... !!!\\r\\n.x. .ox oo!\\r\\n... .xo !!x\\r\\n\\r\\n... ... .ox\\r\\n... ox. ..x\\r\\n... ..o .o.\", \"... ... ... \\r\\n..o ... ..o \\r\\n... .x. ..x \\r\\n\\r\\nx.. ... !!! \\r\\n.x. .ox oo! \\r\\n... .xo !!x \\r\\n\\r\\n... ... .ox \\r\\n... ox. ..x \\r\\n... ..o .o.\"]}, {\"input\": \"xox o.x xxo\\r\\nxox xox oxo\\r\\nxxx .xx xoo\\r\\n\\r\\nooo oox o.x\\r\\n.xx xx. oo.\\r\\nooo xox ooo\\r\\n\\r\\nooo oxo xox\\r\\nx.x xox xox\\r\\noxo x.o xxo\\r\\n1 7\\r\\n\", \"output\": [\"xox o!x xxo\\r\\n xox xox oxo\\r\\n xxx !xx xoo\\r\\n\\r\\n ooo oox o!x\\r\\n !xx xx! oo!\\r\\n ooo xox ooo\\r\\n\\r\\n ooo oxo xox\\r\\n x!x xox xox\\r\\n oxo x!o xxo\", \"xox o!x xxo\\r\\nxox xox oxo\\r\\nxxx !xx xoo\\r\\n\\r\\nooo oox o!x\\r\\n!xx xx! oo!\\r\\nooo xox ooo\\r\\n\\r\\nooo oxo xox\\r\\nx!x xox xox\\r\\noxo x!o xxo\", \"xox o!x xxo \\r\\nxox xox oxo \\r\\nxxx !xx xoo \\r\\n\\r\\nooo oox o!x \\r\\n!xx xx! oo! \\r\\nooo xox ooo \\r\\n\\r\\nooo oxo xox \\r\\nx!x xox xox \\r\\noxo x!o xxo\"]}, {\"input\": \"ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... .x.\\r\\nox. xx. .o.\\r\\n... ... ..o\\r\\n9 9\\r\\n\", \"output\": [\"ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... !x!\\r\\nox. xx. !o!\\r\\n... ... !!o\", \"ox. x.o ..x\\r\\n ... ..o .o.\\r\\n .o. ... x.o\\r\\n\\r\\n x.x .oo ...\\r\\n ..o ox. .xx\\r\\n ..x o.x .o.\\r\\n\\r\\n ... ... !x!\\r\\n ox. xx. !o!\\r\\n ... ... !!o\", \"ox. x.o ..x \\r\\n... ..o .o. \\r\\n.o. ... x.o \\r\\n\\r\\nx.x .oo ... \\r\\n..o ox. .xx \\r\\n..x o.x .o. \\r\\n\\r\\n... ... !x! \\r\\nox. xx. !o! \\r\\n... ... !!o\"]}, {\"input\": \"xx. oxx .xo\\r\\nxxx o.o xox\\r\\nxoo xoo xoo\\r\\n\\r\\nooo o.x xox\\r\\no.. xoo .xo\\r\\noxx .x. xoo\\r\\n\\r\\nooo oxo oxx\\r\\nxxx xox ..o\\r\\noo. oxx xx.\\r\\n3 8\\r\\n\", \"output\": [\"xx! oxx !xo\\r\\n xxx o!o xox\\r\\n xoo xoo xoo\\r\\n\\r\\n ooo o!x xox\\r\\n o!! xoo !xo\\r\\n oxx !x! xoo\\r\\n\\r\\n ooo oxo oxx\\r\\n xxx xox !!o\\r\\n oo! oxx xx!\", \"xx! oxx !xo \\r\\nxxx o!o xox \\r\\nxoo xoo xoo \\r\\n\\r\\nooo o!x xox \\r\\no!! xoo !xo \\r\\noxx !x! xoo \\r\\n\\r\\nooo oxo oxx \\r\\nxxx xox !!o \\r\\noo! oxx xx!\", \"xx! oxx !xo\\r\\nxxx o!o xox\\r\\nxoo xoo xoo\\r\\n\\r\\nooo o!x xox\\r\\no!! xoo !xo\\r\\noxx !x! xoo\\r\\n\\r\\nooo oxo oxx\\r\\nxxx xox !!o\\r\\noo! oxx xx!\"]}, {\"input\": \"... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx ...\\r\\no.x xox xo.\\r\\nxox .xo ..o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\\r\\n8 9\\r\\n\", \"output\": [\"... xo. o.. \\r\\noo. ..o xx. \\r\\n..x x.. ..o \\r\\n\\r\\n.ox .xx !!! \\r\\no.x xox xo! \\r\\nxox .xo !!o \\r\\n\\r\\n..o ... xxo \\r\\no.. .o. oxo \\r\\n..o x.. ..x\", \"... xo. o..\\r\\n oo. ..o xx.\\r\\n ..x x.. ..o\\r\\n\\r\\n .ox .xx !!!\\r\\n o.x xox xo!\\r\\n xox .xo !!o\\r\\n\\r\\n ..o ... xxo\\r\\n o.. .o. oxo\\r\\n ..o x.. ..x\", \"... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx !!!\\r\\no.x xox xo!\\r\\nxox .xo !!o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\"]}, {\"input\": \"oox xoo xxx\\r\\nooo xxo oxo\\r\\nxxx xoo xxo\\r\\n\\r\\noxo oxx xoo\\r\\nxoo oox xox\\r\\nxox oox oox\\r\\n\\r\\nxxo xoo oxo\\r\\noxx xxx xxx\\r\\noxo oxo oo.\\r\\n1 5\\r\\n\", \"output\": [\"oox xoo xxx\\r\\nooo xxo oxo\\r\\nxxx xoo xxo\\r\\n\\r\\noxo oxx xoo\\r\\nxoo oox xox\\r\\nxox oox oox\\r\\n\\r\\nxxo xoo oxo\\r\\noxx xxx xxx\\r\\noxo oxo oo!\", \"oox xoo xxx \\r\\nooo xxo oxo \\r\\nxxx xoo xxo \\r\\n\\r\\noxo oxx xoo \\r\\nxoo oox xox \\r\\nxox oox oox \\r\\n\\r\\nxxo xoo oxo \\r\\noxx xxx xxx \\r\\noxo oxo oo!\", \"oox xoo xxx\\r\\n ooo xxo oxo\\r\\n xxx xoo xxo\\r\\n\\r\\n oxo oxx xoo\\r\\n xoo oox xox\\r\\n xox oox oox\\r\\n\\r\\n xxo xoo oxo\\r\\n oxx xxx xxx\\r\\n oxo oxo oo!\"]}, {\"input\": \".oo x.o xoo\\r\\n.o. xxx .x.\\r\\n..o x.o xxx\\r\\n\\r\\n..o .oo .xx\\r\\n.x. xox o.o\\r\\n.xo o.o .x.\\r\\n\\r\\n.o. xo. xxx\\r\\n.xo o.. .xo\\r\\n..o ..o xox\\r\\n1 8\\r\\n\", \"output\": [\".oo x!o xoo \\r\\n.o. xxx .x. \\r\\n..o x!o xxx \\r\\n\\r\\n..o .oo .xx \\r\\n.x. xox o.o \\r\\n.xo o.o .x. \\r\\n\\r\\n.o. xo. xxx \\r\\n.xo o.. .xo \\r\\n..o ..o xox\", \".oo x!o xoo\\r\\n.o. xxx .x.\\r\\n..o x!o xxx\\r\\n\\r\\n..o .oo .xx\\r\\n.x. xox o.o\\r\\n.xo o.o .x.\\r\\n\\r\\n.o. xo. xxx\\r\\n.xo o.. .xo\\r\\n..o ..o xox\", \".oo x!o xoo\\r\\n .o. xxx .x.\\r\\n ..o x!o xxx\\r\\n\\r\\n ..o .oo .xx\\r\\n .x. xox o.o\\r\\n .xo o.o .x.\\r\\n\\r\\n .o. xo. xxx\\r\\n .xo o.. .xo\\r\\n ..o ..o xox\"]}, {\"input\": \"xxo xoo xxo\\r\\nooo ooo xxx\\r\\noox oxo oxx\\r\\n\\r\\noxo oxo xxx\\r\\nxoo oxx oxo\\r\\nxxx oxx ooo\\r\\n\\r\\noxx xoo xxo\\r\\nxxx oox xox\\r\\nxxo o.o oxo\\r\\n9 6\\r\\n\", \"output\": [\"xxo xoo xxo\\r\\n ooo ooo xxx\\r\\n oox oxo oxx\\r\\n\\r\\n oxo oxo xxx\\r\\n xoo oxx oxo\\r\\n xxx oxx ooo\\r\\n\\r\\n oxx xoo xxo\\r\\n xxx oox xox\\r\\n xxo o!o oxo\", \"xxo xoo xxo \\r\\nooo ooo xxx \\r\\noox oxo oxx \\r\\n\\r\\noxo oxo xxx \\r\\nxoo oxx oxo \\r\\nxxx oxx ooo \\r\\n\\r\\noxx xoo xxo \\r\\nxxx oox xox \\r\\nxxo o!o oxo\", \"xxo xoo xxo\\r\\nooo ooo xxx\\r\\noox oxo oxx\\r\\n\\r\\noxo oxo xxx\\r\\nxoo oxx oxo\\r\\nxxx oxx ooo\\r\\n\\r\\noxx xoo xxo\\r\\nxxx oox xox\\r\\nxxo o!o oxo\"]}, {\"input\": \"ox. o.x .o.\\r\\nxxo xoo .oo\\r\\n.xx oox o..\\r\\n\\r\\nxx. oox oxx\\r\\noox oxx xxo\\r\\nxo. oxo x.x\\r\\n\\r\\no.x .x. xx.\\r\\n.xo ox. ooo\\r\\n.ox xo. ..o\\r\\n6 2\\r\\n\", \"output\": [\"ox. o.x .o. \\r\\nxxo xoo .oo \\r\\n.xx oox o.. \\r\\n\\r\\nxx. oox oxx \\r\\noox oxx xxo \\r\\nxo. oxo x.x \\r\\n\\r\\no.x !x! xx. \\r\\n.xo ox! ooo \\r\\n.ox xo! ..o\", \"ox. o.x .o.\\r\\n xxo xoo .oo\\r\\n .xx oox o..\\r\\n\\r\\n xx. oox oxx\\r\\n oox oxx xxo\\r\\n xo. oxo x.x\\r\\n\\r\\n o.x !x! xx.\\r\\n .xo ox! ooo\\r\\n .ox xo! ..o\", \"ox. o.x .o.\\r\\nxxo xoo .oo\\r\\n.xx oox o..\\r\\n\\r\\nxx. oox oxx\\r\\noox oxx xxo\\r\\nxo. oxo x.x\\r\\n\\r\\no.x !x! xx.\\r\\n.xo ox! ooo\\r\\n.ox xo! ..o\"]}, {\"input\": \"oxo xoo ox.\\r\\nxxx xoo xxo\\r\\nxoo xxx xox\\r\\n\\r\\nxxx xxx xoo\\r\\nooo o.o oxx\\r\\nxxo ooo xxx\\r\\n\\r\\nooo oox ooo\\r\\nooo oxo xxx\\r\\nxxo xox xxo\\r\\n6 1\\r\\n\", \"output\": [\"oxo xoo ox!\\r\\n xxx xoo xxo\\r\\n xoo xxx xox\\r\\n\\r\\n xxx xxx xoo\\r\\n ooo o!o oxx\\r\\n xxo ooo xxx\\r\\n\\r\\n ooo oox ooo\\r\\n ooo oxo xxx\\r\\n xxo xox xxo\", \"oxo xoo ox! \\r\\nxxx xoo xxo \\r\\nxoo xxx xox \\r\\n\\r\\nxxx xxx xoo \\r\\nooo o!o oxx \\r\\nxxo ooo xxx \\r\\n\\r\\nooo oox ooo \\r\\nooo oxo xxx \\r\\nxxo xox xxo\", \"oxo xoo ox!\\r\\nxxx xoo xxo\\r\\nxoo xxx xox\\r\\n\\r\\nxxx xxx xoo\\r\\nooo o!o oxx\\r\\nxxo ooo xxx\\r\\n\\r\\nooo oox ooo\\r\\nooo oxo xxx\\r\\nxxo xox xxo\"]}, {\"input\": \".xo oxx xoo\\r\\nooo .xo xxx\\r\\noxo oox xoo\\r\\n\\r\\nx.o xoo xxx\\r\\nxo. oxo oxx\\r\\nx.x xoo o.o\\r\\n\\r\\nxoo xox oxx\\r\\nooo .x. .xx\\r\\nxox x.. xoo\\r\\n6 5\\r\\n\", \"output\": [\".xo oxx xoo\\r\\n ooo .xo xxx\\r\\n oxo oox xoo\\r\\n\\r\\n x.o xoo xxx\\r\\n xo. oxo oxx\\r\\n x.x xoo o.o\\r\\n\\r\\n xoo xox oxx\\r\\n ooo !x! .xx\\r\\n xox x!! xoo\", \".xo oxx xoo\\r\\nooo .xo xxx\\r\\noxo oox xoo\\r\\n\\r\\nx.o xoo xxx\\r\\nxo. oxo oxx\\r\\nx.x xoo o.o\\r\\n\\r\\nxoo xox oxx\\r\\nooo !x! .xx\\r\\nxox x!! xoo\", \".xo oxx xoo \\r\\nooo .xo xxx \\r\\noxo oox xoo \\r\\n\\r\\nx.o xoo xxx \\r\\nxo. oxo oxx \\r\\nx.x xoo o.o \\r\\n\\r\\nxoo xox oxx \\r\\nooo !x! .xx \\r\\nxox x!! xoo\"]}, {\"input\": \"oxo xox ooo\\r\\n.xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx .xx\\r\\nxo. xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x.o oxo\\r\\n2 2\\r\\n\", \"output\": [\"oxo xox ooo \\r\\n!xo xxo oxx \\r\\nxxx oxo xxx \\r\\n\\r\\nxxo oxx !xx \\r\\nxo! xoo oxx \\r\\noxo oxx xox \\r\\n\\r\\nxoo ooo oox \\r\\nooo ooo xxo \\r\\nxxx x!o oxo\", \"oxo xox ooo\\r\\n !xo xxo oxx\\r\\n xxx oxo xxx\\r\\n\\r\\n xxo oxx !xx\\r\\n xo! xoo oxx\\r\\n oxo oxx xox\\r\\n\\r\\n xoo ooo oox\\r\\n ooo ooo xxo\\r\\n xxx x!o oxo\", \"oxo xox ooo\\r\\n!xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx !xx\\r\\nxo! xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x!o oxo\"]}, {\"input\": \"xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no.o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo\\r\\n3 4\\r\\n\", \"output\": [\"xox xxx xoo\\r\\n xoo xxx oxo\\r\\n xoo oox xoo\\r\\n\\r\\n oxo oox xox\\r\\n oxo xox xox\\r\\n oox xoo oox\\r\\n\\r\\n o!o xox oox\\r\\n oox xxo xxo\\r\\n xox xxx oxo\", \"xox xxx xoo \\r\\nxoo xxx oxo \\r\\nxoo oox xoo \\r\\n\\r\\noxo oox xox \\r\\noxo xox xox \\r\\noox xoo oox \\r\\n\\r\\no!o xox oox \\r\\noox xxo xxo \\r\\nxox xxx oxo\", \"xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no!o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo\"]}, {\"input\": \"ooo xxx .x.\\r\\nxxo oox ooo\\r\\n.o. oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n.oo xoo xo.\\r\\nxxo oox ooo\\r\\nxox xxx xxo\\r\\n5 1\\r\\n\", \"output\": [\"ooo xxx !x! \\r\\nxxo oox ooo \\r\\n!o! oox xxx \\r\\n\\r\\nxox oxx xxo \\r\\nxxx oxx oxx \\r\\noxx ooo ooo \\r\\n\\r\\n!oo xoo xo! \\r\\nxxo oox ooo \\r\\nxox xxx xxo\", \"ooo xxx !x!\\r\\nxxo oox ooo\\r\\n!o! oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n!oo xoo xo!\\r\\nxxo oox ooo\\r\\nxox xxx xxo\", \"ooo xxx !x!\\r\\n xxo oox ooo\\r\\n !o! oox xxx\\r\\n\\r\\n xox oxx xxo\\r\\n xxx oxx oxx\\r\\n oxx ooo ooo\\r\\n\\r\\n !oo xoo xo!\\r\\n xxo oox ooo\\r\\n xox xxx xxo\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'oxo xoo ox.\\r\\nxxx xoo xxo\\r\\nxoo xxx xox\\r\\n\\r\\nxxx xxx xoo\\r\\nooo o.o oxx\\r\\nxxo ooo xxx\\r\\n\\r\\nooo oox ooo\\r\\nooo oxo xxx\\r\\nxxo xox xxo\\r\\n6 1\\r\\n', 'output': ['oxo xoo ox!\\r\\n xxx xoo xxo\\r\\n xoo xxx xox\\r\\n\\r\\n xxx xxx xoo\\r\\n ooo o!o oxx\\r\\n xxo ooo xxx\\r\\n\\r\\n ooo oox ooo\\r\\n ooo oxo xxx\\r\\n xxo xox xxo', 'oxo xoo ox! \\r\\nxxx xoo xxo \\r\\nxoo xxx xox \\r\\n\\r\\nxxx xxx xoo \\r\\nooo o!o oxx \\r\\nxxo ooo xxx \\r\\n\\r\\nooo oox ooo \\r\\nooo oxo xxx \\r\\nxxo xox xxo', 'oxo xoo ox!\\r\\nxxx xoo xxo\\r\\nxoo xxx xox\\r\\n\\r\\nxxx xxx xoo\\r\\nooo o!o oxx\\r\\nxxo ooo xxx\\r\\n\\r\\nooo oox ooo\\r\\nooo oxo xxx\\r\\nxxo xox xxo']}, {'input': '... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n6 4\\r\\n', 'output': ['... ... ...\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n ... x.. ...\\r\\n\\r\\n !!! ... ...\\r\\n !!! ... ...\\r\\n !!! ... ...', '... ... ... \\r\\n... ... ... \\r\\n... ... ... \\r\\n\\r\\n... ... ... \\r\\n... ... ... \\r\\n... x.. ... \\r\\n\\r\\n!!! ... ... \\r\\n!!! ... ... \\r\\n!!! ... ...', '... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n!!! ... ...\\r\\n!!! ... ...\\r\\n!!! ... ...']}, {'input': 'ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... .x.\\r\\nox. xx. .o.\\r\\n... ... ..o\\r\\n9 9\\r\\n', 'output': ['ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... !x!\\r\\nox. xx. !o!\\r\\n... ... !!o', 'ox. x.o ..x\\r\\n ... ..o .o.\\r\\n .o. ... x.o\\r\\n\\r\\n x.x .oo ...\\r\\n ..o ox. .xx\\r\\n ..x o.x .o.\\r\\n\\r\\n ... ... !x!\\r\\n ox. xx. !o!\\r\\n ... ... !!o', 'ox. x.o ..x \\r\\n... ..o .o. \\r\\n.o. ... x.o \\r\\n\\r\\nx.x .oo ... \\r\\n..o ox. .xx \\r\\n..x o.x .o. \\r\\n\\r\\n... ... !x! \\r\\nox. xx. !o! \\r\\n... ... !!o']}, {'input': '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx ...\\r\\no.x xox xo.\\r\\nxox .xo ..o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\\r\\n8 9\\r\\n', 'output': ['... xo. o.. \\r\\noo. ..o xx. \\r\\n..x x.. ..o \\r\\n\\r\\n.ox .xx !!! \\r\\no.x xox xo! \\r\\nxox .xo !!o \\r\\n\\r\\n..o ... xxo \\r\\no.. .o. oxo \\r\\n..o x.. ..x', '... xo. o..\\r\\n oo. ..o xx.\\r\\n ..x x.. ..o\\r\\n\\r\\n .ox .xx !!!\\r\\n o.x xox xo!\\r\\n xox .xo !!o\\r\\n\\r\\n ..o ... xxo\\r\\n o.. .o. oxo\\r\\n ..o x.. ..x', '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx !!!\\r\\no.x xox xo!\\r\\nxox .xo !!o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x']}, {'input': 'ooo oxx xxo\\r\\nx.x oox xox\\r\\noox xo. xxx\\r\\n\\r\\nxxo xxx o.o\\r\\nxoo xo. oxo\\r\\nooo xox ox.\\r\\n\\r\\nxoo xoo .oo\\r\\nxox xox ox.\\r\\noxx xox oxo\\r\\n1 3\\r\\n', 'output': ['ooo oxx xxo \\r\\nx!x oox xox \\r\\noox xo! xxx \\r\\n\\r\\nxxo xxx o!o \\r\\nxoo xo! oxo \\r\\nooo xox ox! \\r\\n\\r\\nxoo xoo !oo \\r\\nxox xox ox! \\r\\noxx xox oxo', 'ooo oxx xxo\\r\\nx!x oox xox\\r\\noox xo! xxx\\r\\n\\r\\nxxo xxx o!o\\r\\nxoo xo! oxo\\r\\nooo xox ox!\\r\\n\\r\\nxoo xoo !oo\\r\\nxox xox ox!\\r\\noxx xox oxo', 'ooo oxx xxo\\r\\n x!x oox xox\\r\\n oox xo! xxx\\r\\n\\r\\n xxo xxx o!o\\r\\n xoo xo! oxo\\r\\n ooo xox ox!\\r\\n\\r\\n xoo xoo !oo\\r\\n xox xox ox!\\r\\n oxx xox oxo']}]","human_sample_testcases_2":"[{'input': '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx ...\\r\\no.x xox xo.\\r\\nxox .xo ..o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\\r\\n8 9\\r\\n', 'output': ['... xo. o.. \\r\\noo. ..o xx. \\r\\n..x x.. ..o \\r\\n\\r\\n.ox .xx !!! \\r\\no.x xox xo! \\r\\nxox .xo !!o \\r\\n\\r\\n..o ... xxo \\r\\no.. .o. oxo \\r\\n..o x.. ..x', '... xo. o..\\r\\n oo. ..o xx.\\r\\n ..x x.. ..o\\r\\n\\r\\n .ox .xx !!!\\r\\n o.x xox xo!\\r\\n xox .xo !!o\\r\\n\\r\\n ..o ... xxo\\r\\n o.. .o. oxo\\r\\n ..o x.. ..x', '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx !!!\\r\\no.x xox xo!\\r\\nxox .xo !!o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x']}, {'input': 'ooo oxx xxo\\r\\nx.x oox xox\\r\\noox xo. xxx\\r\\n\\r\\nxxo xxx o.o\\r\\nxoo xo. oxo\\r\\nooo xox ox.\\r\\n\\r\\nxoo xoo .oo\\r\\nxox xox ox.\\r\\noxx xox oxo\\r\\n1 3\\r\\n', 'output': ['ooo oxx xxo \\r\\nx!x oox xox \\r\\noox xo! xxx \\r\\n\\r\\nxxo xxx o!o \\r\\nxoo xo! oxo \\r\\nooo xox ox! \\r\\n\\r\\nxoo xoo !oo \\r\\nxox xox ox! \\r\\noxx xox oxo', 'ooo oxx xxo\\r\\nx!x oox xox\\r\\noox xo! xxx\\r\\n\\r\\nxxo xxx o!o\\r\\nxoo xo! oxo\\r\\nooo xox ox!\\r\\n\\r\\nxoo xoo !oo\\r\\nxox xox ox!\\r\\noxx xox oxo', 'ooo oxx xxo\\r\\n x!x oox xox\\r\\n oox xo! xxx\\r\\n\\r\\n xxo xxx o!o\\r\\n xoo xo! oxo\\r\\n ooo xox ox!\\r\\n\\r\\n xoo xoo !oo\\r\\n xox xox ox!\\r\\n oxx xox oxo']}, {'input': 'xoo x.. x..\\r\\nooo ... ...\\r\\nooo ... ...\\r\\n\\r\\nx.. x.. x..\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\nx.. x.. x..\\r\\n... ... ...\\r\\n... ... ...\\r\\n7 4\\r\\n', 'output': ['xoo x!! x!!\\r\\n ooo !!! !!!\\r\\n ooo !!! !!!\\r\\n\\r\\n x!! x!! x!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n\\r\\n x!! x!! x!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!', 'xoo x!! x!!\\r\\nooo !!! !!!\\r\\nooo !!! !!!\\r\\n\\r\\nx!! x!! x!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n\\r\\nx!! x!! x!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!', 'xoo x!! x!! \\r\\nooo !!! !!! \\r\\nooo !!! !!! \\r\\n\\r\\nx!! x!! x!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n\\r\\nx!! x!! x!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!!']}, {'input': 'oox xoo xxx\\r\\nooo xxo oxo\\r\\nxxx xoo xxo\\r\\n\\r\\noxo oxx xoo\\r\\nxoo oox xox\\r\\nxox oox oox\\r\\n\\r\\nxxo xoo oxo\\r\\noxx xxx xxx\\r\\noxo oxo oo.\\r\\n1 5\\r\\n', 'output': ['oox xoo xxx\\r\\nooo xxo oxo\\r\\nxxx xoo xxo\\r\\n\\r\\noxo oxx xoo\\r\\nxoo oox xox\\r\\nxox oox oox\\r\\n\\r\\nxxo xoo oxo\\r\\noxx xxx xxx\\r\\noxo oxo oo!', 'oox xoo xxx \\r\\nooo xxo oxo \\r\\nxxx xoo xxo \\r\\n\\r\\noxo oxx xoo \\r\\nxoo oox xox \\r\\nxox oox oox \\r\\n\\r\\nxxo xoo oxo \\r\\noxx xxx xxx \\r\\noxo oxo oo!', 'oox xoo xxx\\r\\n ooo xxo oxo\\r\\n xxx xoo xxo\\r\\n\\r\\n oxo oxx xoo\\r\\n xoo oox xox\\r\\n xox oox oox\\r\\n\\r\\n xxo xoo oxo\\r\\n oxx xxx xxx\\r\\n oxo oxo oo!']}, {'input': 'ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... .x.\\r\\nox. xx. .o.\\r\\n... ... ..o\\r\\n9 9\\r\\n', 'output': ['ox. x.o ..x\\r\\n... ..o .o.\\r\\n.o. ... x.o\\r\\n\\r\\nx.x .oo ...\\r\\n..o ox. .xx\\r\\n..x o.x .o.\\r\\n\\r\\n... ... !x!\\r\\nox. xx. !o!\\r\\n... ... !!o', 'ox. x.o ..x\\r\\n ... ..o .o.\\r\\n .o. ... x.o\\r\\n\\r\\n x.x .oo ...\\r\\n ..o ox. .xx\\r\\n ..x o.x .o.\\r\\n\\r\\n ... ... !x!\\r\\n ox. xx. !o!\\r\\n ... ... !!o', 'ox. x.o ..x \\r\\n... ..o .o. \\r\\n.o. ... x.o \\r\\n\\r\\nx.x .oo ... \\r\\n..o ox. .xx \\r\\n..x o.x .o. \\r\\n\\r\\n... ... !x! \\r\\nox. xx. !o! \\r\\n... ... !!o']}]","human_sample_testcases_3":"[{'input': 'ooo xxx .x.\\r\\nxxo oox ooo\\r\\n.o. oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n.oo xoo xo.\\r\\nxxo oox ooo\\r\\nxox xxx xxo\\r\\n5 1\\r\\n', 'output': ['ooo xxx !x! \\r\\nxxo oox ooo \\r\\n!o! oox xxx \\r\\n\\r\\nxox oxx xxo \\r\\nxxx oxx oxx \\r\\noxx ooo ooo \\r\\n\\r\\n!oo xoo xo! \\r\\nxxo oox ooo \\r\\nxox xxx xxo', 'ooo xxx !x!\\r\\nxxo oox ooo\\r\\n!o! oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n!oo xoo xo!\\r\\nxxo oox ooo\\r\\nxox xxx xxo', 'ooo xxx !x!\\r\\n xxo oox ooo\\r\\n !o! oox xxx\\r\\n\\r\\n xox oxx xxo\\r\\n xxx oxx oxx\\r\\n oxx ooo ooo\\r\\n\\r\\n !oo xoo xo!\\r\\n xxo oox ooo\\r\\n xox xxx xxo']}, {'input': 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no.o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo\\r\\n3 4\\r\\n', 'output': ['xox xxx xoo\\r\\n xoo xxx oxo\\r\\n xoo oox xoo\\r\\n\\r\\n oxo oox xox\\r\\n oxo xox xox\\r\\n oox xoo oox\\r\\n\\r\\n o!o xox oox\\r\\n oox xxo xxo\\r\\n xox xxx oxo', 'xox xxx xoo \\r\\nxoo xxx oxo \\r\\nxoo oox xoo \\r\\n\\r\\noxo oox xox \\r\\noxo xox xox \\r\\noox xoo oox \\r\\n\\r\\no!o xox oox \\r\\noox xxo xxo \\r\\nxox xxx oxo', 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no!o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo']}, {'input': '... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n6 4\\r\\n', 'output': ['... ... ...\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n ... x.. ...\\r\\n\\r\\n !!! ... ...\\r\\n !!! ... ...\\r\\n !!! ... ...', '... ... ... \\r\\n... ... ... \\r\\n... ... ... \\r\\n\\r\\n... ... ... \\r\\n... ... ... \\r\\n... x.. ... \\r\\n\\r\\n!!! ... ... \\r\\n!!! ... ... \\r\\n!!! ... ...', '... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... x.. ...\\r\\n\\r\\n!!! ... ...\\r\\n!!! ... ...\\r\\n!!! ... ...']}, {'input': '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx ...\\r\\no.x xox xo.\\r\\nxox .xo ..o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\\r\\n8 9\\r\\n', 'output': ['... xo. o.. \\r\\noo. ..o xx. \\r\\n..x x.. ..o \\r\\n\\r\\n.ox .xx !!! \\r\\no.x xox xo! \\r\\nxox .xo !!o \\r\\n\\r\\n..o ... xxo \\r\\no.. .o. oxo \\r\\n..o x.. ..x', '... xo. o..\\r\\n oo. ..o xx.\\r\\n ..x x.. ..o\\r\\n\\r\\n .ox .xx !!!\\r\\n o.x xox xo!\\r\\n xox .xo !!o\\r\\n\\r\\n ..o ... xxo\\r\\n o.. .o. oxo\\r\\n ..o x.. ..x', '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx !!!\\r\\no.x xox xo!\\r\\nxox .xo !!o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x']}, {'input': 'oxo xox ooo\\r\\n.xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx .xx\\r\\nxo. xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x.o oxo\\r\\n2 2\\r\\n', 'output': ['oxo xox ooo \\r\\n!xo xxo oxx \\r\\nxxx oxo xxx \\r\\n\\r\\nxxo oxx !xx \\r\\nxo! xoo oxx \\r\\noxo oxx xox \\r\\n\\r\\nxoo ooo oox \\r\\nooo ooo xxo \\r\\nxxx x!o oxo', 'oxo xox ooo\\r\\n !xo xxo oxx\\r\\n xxx oxo xxx\\r\\n\\r\\n xxo oxx !xx\\r\\n xo! xoo oxx\\r\\n oxo oxx xox\\r\\n\\r\\n xoo ooo oox\\r\\n ooo ooo xxo\\r\\n xxx x!o oxo', 'oxo xox ooo\\r\\n!xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx !xx\\r\\nxo! xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x!o oxo']}]","human_sample_testcases_4":"[{'input': 'oxo xox ooo\\r\\n.xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx .xx\\r\\nxo. xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x.o oxo\\r\\n2 2\\r\\n', 'output': ['oxo xox ooo \\r\\n!xo xxo oxx \\r\\nxxx oxo xxx \\r\\n\\r\\nxxo oxx !xx \\r\\nxo! xoo oxx \\r\\noxo oxx xox \\r\\n\\r\\nxoo ooo oox \\r\\nooo ooo xxo \\r\\nxxx x!o oxo', 'oxo xox ooo\\r\\n !xo xxo oxx\\r\\n xxx oxo xxx\\r\\n\\r\\n xxo oxx !xx\\r\\n xo! xoo oxx\\r\\n oxo oxx xox\\r\\n\\r\\n xoo ooo oox\\r\\n ooo ooo xxo\\r\\n xxx x!o oxo', 'oxo xox ooo\\r\\n!xo xxo oxx\\r\\nxxx oxo xxx\\r\\n\\r\\nxxo oxx !xx\\r\\nxo! xoo oxx\\r\\noxo oxx xox\\r\\n\\r\\nxoo ooo oox\\r\\nooo ooo xxo\\r\\nxxx x!o oxo']}, {'input': 'ooo xxx .x.\\r\\nxxo oox ooo\\r\\n.o. oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n.oo xoo xo.\\r\\nxxo oox ooo\\r\\nxox xxx xxo\\r\\n5 1\\r\\n', 'output': ['ooo xxx !x! \\r\\nxxo oox ooo \\r\\n!o! oox xxx \\r\\n\\r\\nxox oxx xxo \\r\\nxxx oxx oxx \\r\\noxx ooo ooo \\r\\n\\r\\n!oo xoo xo! \\r\\nxxo oox ooo \\r\\nxox xxx xxo', 'ooo xxx !x!\\r\\nxxo oox ooo\\r\\n!o! oox xxx\\r\\n\\r\\nxox oxx xxo\\r\\nxxx oxx oxx\\r\\noxx ooo ooo\\r\\n\\r\\n!oo xoo xo!\\r\\nxxo oox ooo\\r\\nxox xxx xxo', 'ooo xxx !x!\\r\\n xxo oox ooo\\r\\n !o! oox xxx\\r\\n\\r\\n xox oxx xxo\\r\\n xxx oxx oxx\\r\\n oxx ooo ooo\\r\\n\\r\\n !oo xoo xo!\\r\\n xxo oox ooo\\r\\n xox xxx xxo']}, {'input': 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no.o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo\\r\\n3 4\\r\\n', 'output': ['xox xxx xoo\\r\\n xoo xxx oxo\\r\\n xoo oox xoo\\r\\n\\r\\n oxo oox xox\\r\\n oxo xox xox\\r\\n oox xoo oox\\r\\n\\r\\n o!o xox oox\\r\\n oox xxo xxo\\r\\n xox xxx oxo', 'xox xxx xoo \\r\\nxoo xxx oxo \\r\\nxoo oox xoo \\r\\n\\r\\noxo oox xox \\r\\noxo xox xox \\r\\noox xoo oox \\r\\n\\r\\no!o xox oox \\r\\noox xxo xxo \\r\\nxox xxx oxo', 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no!o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo']}, {'input': '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx ...\\r\\no.x xox xo.\\r\\nxox .xo ..o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x\\r\\n8 9\\r\\n', 'output': ['... xo. o.. \\r\\noo. ..o xx. \\r\\n..x x.. ..o \\r\\n\\r\\n.ox .xx !!! \\r\\no.x xox xo! \\r\\nxox .xo !!o \\r\\n\\r\\n..o ... xxo \\r\\no.. .o. oxo \\r\\n..o x.. ..x', '... xo. o..\\r\\n oo. ..o xx.\\r\\n ..x x.. ..o\\r\\n\\r\\n .ox .xx !!!\\r\\n o.x xox xo!\\r\\n xox .xo !!o\\r\\n\\r\\n ..o ... xxo\\r\\n o.. .o. oxo\\r\\n ..o x.. ..x', '... xo. o..\\r\\noo. ..o xx.\\r\\n..x x.. ..o\\r\\n\\r\\n.ox .xx !!!\\r\\no.x xox xo!\\r\\nxox .xo !!o\\r\\n\\r\\n..o ... xxo\\r\\no.. .o. oxo\\r\\n..o x.. ..x']}, {'input': 'ox. o.x .o.\\r\\nxxo xoo .oo\\r\\n.xx oox o..\\r\\n\\r\\nxx. oox oxx\\r\\noox oxx xxo\\r\\nxo. oxo x.x\\r\\n\\r\\no.x .x. xx.\\r\\n.xo ox. ooo\\r\\n.ox xo. ..o\\r\\n6 2\\r\\n', 'output': ['ox. o.x .o. \\r\\nxxo xoo .oo \\r\\n.xx oox o.. \\r\\n\\r\\nxx. oox oxx \\r\\noox oxx xxo \\r\\nxo. oxo x.x \\r\\n\\r\\no.x !x! xx. \\r\\n.xo ox! ooo \\r\\n.ox xo! ..o', 'ox. o.x .o.\\r\\n xxo xoo .oo\\r\\n .xx oox o..\\r\\n\\r\\n xx. oox oxx\\r\\n oox oxx xxo\\r\\n xo. oxo x.x\\r\\n\\r\\n o.x !x! xx.\\r\\n .xo ox! ooo\\r\\n .ox xo! ..o', 'ox. o.x .o.\\r\\nxxo xoo .oo\\r\\n.xx oox o..\\r\\n\\r\\nxx. oox oxx\\r\\noox oxx xxo\\r\\nxo. oxo x.x\\r\\n\\r\\no.x !x! xx.\\r\\n.xo ox! ooo\\r\\n.ox xo! ..o']}]","human_sample_testcases_5":"[{'input': 'xxo xoo xxo\\r\\nooo ooo xxx\\r\\noox oxo oxx\\r\\n\\r\\noxo oxo xxx\\r\\nxoo oxx oxo\\r\\nxxx oxx ooo\\r\\n\\r\\noxx xoo xxo\\r\\nxxx oox xox\\r\\nxxo o.o oxo\\r\\n9 6\\r\\n', 'output': ['xxo xoo xxo\\r\\n ooo ooo xxx\\r\\n oox oxo oxx\\r\\n\\r\\n oxo oxo xxx\\r\\n xoo oxx oxo\\r\\n xxx oxx ooo\\r\\n\\r\\n oxx xoo xxo\\r\\n xxx oox xox\\r\\n xxo o!o oxo', 'xxo xoo xxo \\r\\nooo ooo xxx \\r\\noox oxo oxx \\r\\n\\r\\noxo oxo xxx \\r\\nxoo oxx oxo \\r\\nxxx oxx ooo \\r\\n\\r\\noxx xoo xxo \\r\\nxxx oox xox \\r\\nxxo o!o oxo', 'xxo xoo xxo\\r\\nooo ooo xxx\\r\\noox oxo oxx\\r\\n\\r\\noxo oxo xxx\\r\\nxoo oxx oxo\\r\\nxxx oxx ooo\\r\\n\\r\\noxx xoo xxo\\r\\nxxx oox xox\\r\\nxxo o!o oxo']}, {'input': 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no.o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo\\r\\n3 4\\r\\n', 'output': ['xox xxx xoo\\r\\n xoo xxx oxo\\r\\n xoo oox xoo\\r\\n\\r\\n oxo oox xox\\r\\n oxo xox xox\\r\\n oox xoo oox\\r\\n\\r\\n o!o xox oox\\r\\n oox xxo xxo\\r\\n xox xxx oxo', 'xox xxx xoo \\r\\nxoo xxx oxo \\r\\nxoo oox xoo \\r\\n\\r\\noxo oox xox \\r\\noxo xox xox \\r\\noox xoo oox \\r\\n\\r\\no!o xox oox \\r\\noox xxo xxo \\r\\nxox xxx oxo', 'xox xxx xoo\\r\\nxoo xxx oxo\\r\\nxoo oox xoo\\r\\n\\r\\noxo oox xox\\r\\noxo xox xox\\r\\noox xoo oox\\r\\n\\r\\no!o xox oox\\r\\noox xxo xxo\\r\\nxox xxx oxo']}, {'input': '... .o. ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... .x. ..x\\r\\n\\r\\n.x. ... ...\\r\\n..o ... .o.\\r\\n... o.o xx.\\r\\n1 5\\r\\n', 'output': ['... !o! ... \\r\\n... !!! ... \\r\\n... !!! ... \\r\\n\\r\\n... ... ... \\r\\n... ... ... \\r\\n... .x. ..x \\r\\n\\r\\n.x. ... ... \\r\\n..o ... .o. \\r\\n... o.o xx.', '... !o! ...\\r\\n... !!! ...\\r\\n... !!! ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... .x. ..x\\r\\n\\r\\n.x. ... ...\\r\\n..o ... .o.\\r\\n... o.o xx.', '... !o! ...\\r\\n ... !!! ...\\r\\n ... !!! ...\\r\\n\\r\\n ... ... ...\\r\\n ... ... ...\\r\\n ... .x. ..x\\r\\n\\r\\n .x. ... ...\\r\\n ..o ... .o.\\r\\n ... o.o xx.']}, {'input': 'o.. ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n\\r\\n... xxx ...\\r\\n... xox ...\\r\\n... ooo ...\\r\\n\\r\\n... ... ...\\r\\n... ... ...\\r\\n... ... ...\\r\\n5 5\\r\\n', 'output': ['o!! !!! !!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n\\r\\n !!! xxx !!!\\r\\n !!! xox !!!\\r\\n !!! ooo !!!\\r\\n\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!\\r\\n !!! !!! !!!', 'o!! !!! !!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n\\r\\n!!! xxx !!!\\r\\n!!! xox !!!\\r\\n!!! ooo !!!\\r\\n\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!\\r\\n!!! !!! !!!', 'o!! !!! !!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n\\r\\n!!! xxx !!! \\r\\n!!! xox !!! \\r\\n!!! ooo !!! \\r\\n\\r\\n!!! !!! !!! \\r\\n!!! !!! !!! \\r\\n!!! !!! !!!']}, {'input': 'ooo oxx xxo\\r\\nx.x oox xox\\r\\noox xo. xxx\\r\\n\\r\\nxxo xxx o.o\\r\\nxoo xo. oxo\\r\\nooo xox ox.\\r\\n\\r\\nxoo xoo .oo\\r\\nxox xox ox.\\r\\noxx xox oxo\\r\\n1 3\\r\\n', 'output': ['ooo oxx xxo \\r\\nx!x oox xox \\r\\noox xo! xxx \\r\\n\\r\\nxxo xxx o!o \\r\\nxoo xo! oxo \\r\\nooo xox ox! \\r\\n\\r\\nxoo xoo !oo \\r\\nxox xox ox! \\r\\noxx xox oxo', 'ooo oxx xxo\\r\\nx!x oox xox\\r\\noox xo! xxx\\r\\n\\r\\nxxo xxx o!o\\r\\nxoo xo! oxo\\r\\nooo xox ox!\\r\\n\\r\\nxoo xoo !oo\\r\\nxox xox ox!\\r\\noxx xox oxo', 'ooo oxx xxo\\r\\n x!x oox xox\\r\\n oox xo! xxx\\r\\n\\r\\n xxo xxx o!o\\r\\n xoo xo! oxo\\r\\n ooo xox ox!\\r\\n\\r\\n xoo xoo !oo\\r\\n xox xox ox!\\r\\n oxx xox oxo']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":35,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6\\nxxxiii\", \"5\\nxxoxx\", \"10\\nxxxxxxxxxx\"]","input_specification":"The first line contains integer $$$n$$$ $$$(3 \\le n \\le 100)$$$ \u2014 the length of the file name. The second line contains a string of length $$$n$$$ consisting of lowercase Latin letters only \u2014 the file name.","src_uid":"8de14db41d0acee116bd5d8079cb2b02","source_code":"#include\nint main()\n{\n char str[100];\n int i, count = 0, n;\n scanf(\"%d\", &n);\n scanf(\"%s\", str);\n for(i = 0; i < n; i++)\n {\n if(str[i] == 'x' && str[i+1] == 'x' && str[i+2] == 'x')\n count++;\n }\n printf(\"%d\", count);\n}\n","sample_outputs":"[\"1\", \"0\", \"8\"]","lang_cluster":"C","notes":"NoteIn the first example Polycarp tried to send a file with name contains number $$$33$$$, written in Roman numerals. But he can not just send the file, because it name contains three letters \"x\" in a row. To send the file he needs to remove any one of this letters.","output_specification":"Print the minimum number of characters to remove from the file name so after that the name does not contain \"xxx\" as a substring. If initially the file name dost not contain a forbidden substring \"xxx\", print 0.","description":"You can not just take the file and send it. When Polycarp trying to send a file in the social network \"Codehorses\", he encountered an unexpected problem. If the name of the file contains three or more \"x\" (lowercase Latin letters \"x\") in a row, the system considers that the file content does not correspond to the social network topic. In this case, the file is not sent and an error message is displayed.Determine the minimum number of characters to remove from the file name so after that the name does not contain \"xxx\" as a substring. Print 0 if the file name does not initially contain a forbidden substring \"xxx\".You can delete characters in arbitrary positions (not necessarily consecutive). If you delete a character, then the length of a string is reduced by $$$1$$$. For example, if you delete the character in the position $$$2$$$ from the string \"exxxii\", then the resulting string is \"exxii\".","human_testcases":"[{\"input\": \"6\\r\\nxxxiii\\r\\n\", \"output\": [\"1\\r\\n\", \"1\", \"1\\n\"]}, {\"input\": \"5\\r\\nxxoxx\\r\\n\", \"output\": [\"0\\r\\n\", \"0\\n\", \"0\"]}, {\"input\": \"10\\r\\nxxxxxxxxxx\\r\\n\", \"output\": [\"8\\n\", \"8\", \"8\\r\\n\"]}, {\"input\": \"100\\r\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n\", \"output\": [\"98\", \"98\\n\", \"98\\r\\n\"]}, {\"input\": \"99\\r\\nxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxa\\r\\n\", \"output\": [\"0\\r\\n\", \"0\\n\", \"0\"]}, {\"input\": \"3\\r\\nxxx\\r\\n\", \"output\": [\"1\\r\\n\", \"1\", \"1\\n\"]}, {\"input\": \"77\\r\\naaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxyyyzzz\\r\\n\", \"output\": [\"0\\r\\n\", \"0\\n\", \"0\"]}, {\"input\": \"100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx\\r\\n\", \"output\": [\"41\", \"41\\r\\n\", \"41\\n\"]}, {\"input\": \"100\\r\\nxxxxxxxxxxxjtxxxxxxxxcxxxxxxcfxxxxzxxxxxxgxxxxxbxxxxbxxxxxxxxdycxxxxokixxxkizxxgcxxxxxxxxexxxxxfxxxc\\r\\n\", \"output\": [\"49\", \"49\\n\", \"49\\r\\n\"]}, {\"input\": \"100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx\\r\\n\", \"output\": [\"41\", \"41\\r\\n\", \"41\\n\"]}, {\"input\": \"34\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"0\\r\\n\", \"0\\n\", \"0\"]}, {\"input\": \"5\\r\\nfcyju\\r\\n\", \"output\": [\"0\\r\\n\", \"0\\n\", \"0\"]}, {\"input\": \"100\\r\\nihygyvdvyeifomhxhkhdkimquvgallbqharcyriyqkidnwykozuhvkwdldlztpabgyuflikychqpdenwzgtlzotyumjgdsrbxxxx\\r\\n\", \"output\": [\"2\", \"2\\n\", \"2\\r\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10\\r\\nxxxxxxxxxx\\r\\n', 'output': ['8\\n', '8', '8\\r\\n']}, {'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}, {'input': '3\\r\\nxxx\\r\\n', 'output': ['1\\r\\n', '1', '1\\n']}, {'input': '100\\r\\nihygyvdvyeifomhxhkhdkimquvgallbqharcyriyqkidnwykozuhvkwdldlztpabgyuflikychqpdenwzgtlzotyumjgdsrbxxxx\\r\\n', 'output': ['2', '2\\n', '2\\r\\n']}, {'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}]","human_sample_testcases_2":"[{'input': '100\\r\\nihygyvdvyeifomhxhkhdkimquvgallbqharcyriyqkidnwykozuhvkwdldlztpabgyuflikychqpdenwzgtlzotyumjgdsrbxxxx\\r\\n', 'output': ['2', '2\\n', '2\\r\\n']}, {'input': '100\\r\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n', 'output': ['98', '98\\n', '98\\r\\n']}, {'input': '6\\r\\nxxxiii\\r\\n', 'output': ['1\\r\\n', '1', '1\\n']}, {'input': '5\\r\\nxxoxx\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}]","human_sample_testcases_3":"[{'input': '34\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '5\\r\\nfcyju\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '10\\r\\nxxxxxxxxxx\\r\\n', 'output': ['8\\n', '8', '8\\r\\n']}, {'input': '99\\r\\nxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxa\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxxxxmrx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}]","human_sample_testcases_4":"[{'input': '100\\r\\nxxxxxxxxxxxjtxxxxxxxxcxxxxxxcfxxxxzxxxxxxgxxxxxbxxxxbxxxxxxxxdycxxxxokixxxkizxxgcxxxxxxxxexxxxxfxxxc\\r\\n', 'output': ['49', '49\\n', '49\\r\\n']}, {'input': '77\\r\\naaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxyyyzzz\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '99\\r\\nxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxaxxa\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}, {'input': '3\\r\\nxxx\\r\\n', 'output': ['1\\r\\n', '1', '1\\n']}]","human_sample_testcases_5":"[{'input': '100\\r\\nuxxxxxlmexxxxxxxwnxxexxxxxcxxfydxxxxxxvmdxxxxxxisxxxxxxxxidkxxxpxxxxxxxxmnuxxxxjxxxqcxxwmxxxxxwxxxxx\\r\\n', 'output': ['41', '41\\r\\n', '41\\n']}, {'input': '100\\r\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n', 'output': ['98', '98\\n', '98\\r\\n']}, {'input': '10\\r\\nxxxxxxxxxx\\r\\n', 'output': ['8\\n', '8', '8\\r\\n']}, {'input': '5\\r\\nfcyju\\r\\n', 'output': ['0\\r\\n', '0\\n', '0']}, {'input': '6\\r\\nxxxiii\\r\\n', 'output': ['1\\r\\n', '1', '1\\n']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":36,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 50\\n50\", \"3 100\\n50 50 100\", \"2 50\\n50 50\"]","input_specification":"The first line contains two integers n, k (1\u2009\u2264\u2009n\u2009\u2264\u200950,\u20091\u2009\u2264\u2009k\u2009\u2264\u20095000) \u2014 the number of people, including Greg, and the boat's weight limit. The next line contains n integers \u2014 the people's weights. A person's weight is either 50 kilos or 100 kilos. You can consider Greg and his friends indexed in some way.","src_uid":"ebb0323a854e19794c79ab559792a1f7","source_code":"#include \n\n#define mod 1000000007\nlong long dp[55][55][205]={};\nlong long c[55][55]={};\nint n,lim,A=0,B=0,i,j,k,ii,jj;\nint min(int a,int b){return a=0;i--){\n\t\t\tfor(j=B;j>=0;j--){\n\t\t\t\tint s=k%2;\n\t\t\t\tdp[i][j][k]=0;\n\t\t\t\tif(s){\n\t\t\t\t\tfor(ii=i;ii<=A;ii++){\n\t\t\t\t\t\tint f=lim-(ii-i)*50;\n\t\t\t\t\t\tif(f>=0){\n\t\t\t\t\t\t\tf\/=100;\n\t\t\t\t\t\t\tf+=j; f=min(f,B);\n\t\t\t\t\t\t\tfor(jj=j;jj<=f;jj++){\n\t\t\t\t\t\t\t\tif((i!=ii || j!=jj)){\n\t\t\t\t\t\t\t\t\tdp[i][j][k]+=(dp[ii][jj][k-1]*c[ii][ii-i]*c[jj][jj-j])%mod;\n\t\t\t\t\t\t\t\t\tdp[i][j][k]%=mod;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tfor(ii=0;ii<=i;ii++){\n\t\t\t\t\t\tint f=lim-(i-ii)*50;\n\t\t\t\t\t\tif(f>=0){\n\t\t\t\t\t\t\tf\/=100; f=max(j-f,0);\n\t\t\t\t\t\t\tfor(jj=f;jj<=j;jj++){\n\t\t\t\t\t\t\t\tif((i!=ii || j!=jj)){\n\t\t\t\t\t\t\t\t\tdp[i][j][k]+=(dp[ii][jj][k-1]*c[A-ii][i-ii]*c[B-jj][j-jj])%mod;\n\t\t\t\t\t\t\t\t\tdp[i][j][k]%=mod;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(dp[0][0][k]){\n\t\t\t\t\tprintf(\"%d\\n\",k);\n\t\t\t\t\tprintf(\"%lld\\n\",dp[0][0][k]);\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tputs(\"-1\\n0\");\n}\n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ \n\/\/ ","sample_outputs":"[\"1\\n1\", \"5\\n2\", \"-1\\n0\"]","lang_cluster":"C","notes":"NoteIn the first test Greg walks alone and consequently, he needs only one ride across the river.In the second test you should follow the plan: transport two 50 kg. people; transport one 50 kg. person back; transport one 100 kg. person; transport one 50 kg. person back; transport two 50 kg. people. That totals to 5 rides. Depending on which person to choose at step 2, we can get two distinct ways.","output_specification":"In the first line print an integer \u2014 the minimum number of rides. If transporting everyone to the other bank is impossible, print an integer -1. In the second line print the remainder after dividing the number of ways to transport the people in the minimum number of rides by number 1000000007 (109\u2009+\u20097). If transporting everyone to the other bank is impossible, print integer 0.","description":"One day Greg and his friends were walking in the forest. Overall there were n people walking, including Greg. Soon he found himself in front of a river. The guys immediately decided to get across the river. Luckily, there was a boat by the river bank, just where the guys were standing. We know that the boat can hold people with the total weight of at most k kilograms.Greg immediately took a piece of paper and listed there the weights of all people in his group (including himself). It turned out that each person weights either 50 or 100 kilograms. Now Greg wants to know what minimum number of times the boat needs to cross the river to transport the whole group to the other bank. The boat needs at least one person to navigate it from one bank to the other. As the boat crosses the river, it can have any non-zero number of passengers as long as their total weight doesn't exceed k.Also Greg is wondering, how many ways there are to transport everybody to the other side in the minimum number of boat rides. Two ways are considered distinct if during some ride they have distinct sets of people on the boat.Help Greg with this problem. ","human_testcases":"[{\"input\": \"1 50\\r\\n50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"3 100\\r\\n50 50 100\\r\\n\", \"output\": [\"5\\r\\n2\"]}, {\"input\": \"2 50\\r\\n50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"5 258\\r\\n100 100 50 50 50\\r\\n\", \"output\": [\"3\\r\\n72\"]}, {\"input\": \"8 191\\r\\n50 100 50 100 50 100 100 50\\r\\n\", \"output\": [\"11\\r\\n19318272\"]}, {\"input\": \"3 121\\r\\n100 100 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"8 271\\r\\n100 50 100 50 50 50 100 50\\r\\n\", \"output\": [\"5\\r\\n78090\"]}, {\"input\": \"2 233\\r\\n50 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"2 153\\r\\n100 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"5 257\\r\\n50 50 50 50 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"49 290\\r\\n100 100 100 100 100 100 100 100 50 100 50 100 100 100 50 50 100 50 50 100 100 100 100 100 100 50 100 100 50 100 50 50 100 100 100 50 50 50 50 50 100 100 100 50 100 50 100 50 50\\r\\n\", \"output\": [\"39\\r\\n99624366\"]}, {\"input\": \"29 129\\r\\n50 50 50 100 100 100 50 100 50 50 50 100 50 100 100 100 50 100 100 100 50 50 50 50 50 50 50 50 50\\r\\n\", \"output\": [\"77\\r\\n37050209\"]}, {\"input\": \"32 121\\r\\n100 100 100 100 100 50 100 100 50 100 50 100 50 100 50 100 50 50 50 100 100 50 100 100 100 100 50 100 50 100 100 50\\r\\n\", \"output\": [\"101\\r\\n245361086\"]}, {\"input\": \"3 118\\r\\n100 100 100\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"10 4894\\r\\n100 50 50 50 100 50 50 100 50 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"36 250\\r\\n50 100 100 50 100 100 100 50 50 100 50 50 50 50 50 50 100 50 100 100 100 100 100 100 100 50 50 100 50 50 100 100 100 100 100 50\\r\\n\", \"output\": [\"27\\r\\n77447096\"]}, {\"input\": \"31 291\\r\\n50 100 100 50 100 100 100 50 100 100 100 100 50 50 50 100 100 100 50 100 100 50 50 50 50 100 100 50 50 100 100\\r\\n\", \"output\": [\"23\\r\\n393964729\"]}, {\"input\": \"31 161\\r\\n100 50 50 50 50 100 50 100 50 100 100 50 50 100 100 50 100 50 50 100 50 100 100 50 50 100 50 50 100 50 100\\r\\n\", \"output\": [\"43\\r\\n670669365\"]}, {\"input\": \"5 123\\r\\n50 100 50 50 50\\r\\n\", \"output\": [\"9\\r\\n4536\"]}, {\"input\": \"43 293\\r\\n50 50 100 100 50 100 100 50 100 100 50 100 50 100 50 50 50 50 50 100 100 100 50 50 100 50 100 100 100 50 100 100 100 50 50 50 100 50 100 100 50 100 50\\r\\n\", \"output\": [\"31\\r\\n658920847\"]}, {\"input\": \"23 100\\r\\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\\r\\n\", \"output\": [\"43\\r\\n689584957\"]}, {\"input\": \"41 218\\r\\n50 50 100 50 100 100 50 100 100 50 50 100 50 50 50 50 100 50 100 50 50 50 100 50 50 50 50 100 100 100 100 100 100 50 100 50 100 100 100 50 50\\r\\n\", \"output\": [\"39\\r\\n298372053\"]}, {\"input\": \"11 4668\\r\\n50 100 100 100 50 100 50 50 100 100 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"43 178\\r\\n50 50 100 100 100 50 100 100 50 100 100 100 50 100 50 100 50 50 100 100 50 100 100 50 50 50 100 50 50 50 100 50 100 100 100 50 100 50 50 50 50 100 100\\r\\n\", \"output\": [\"63\\r\\n503334985\"]}, {\"input\": \"33 226\\r\\n50 50 50 50 50 100 100 100 100 50 100 50 100 50 100 50 100 100 50 50 50 100 100 50 50 100 50 100 50 100 50 50 50\\r\\n\", \"output\": [\"31\\r\\n370884215\"]}, {\"input\": \"1 2994\\r\\n100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"1 204\\r\\n50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"33 123\\r\\n50 100 100 100 50 100 50 50 50 50 50 100 100 50 100 50 100 50 50 50 50 50 50 50 100 100 50 50 100 100 100 100 100\\r\\n\", \"output\": [\"93\\r\\n337243149\"]}, {\"input\": \"34 2964\\r\\n50 50 50 50 50 100 50 100 50 100 100 50 50 50 50 50 50 100 100 100 50 50 100 100 50 50 50 100 50 100 100 50 100 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"27 200\\r\\n50 50 50 50 100 100 50 50 100 100 100 50 100 50 100 50 50 100 100 100 50 100 100 50 50 50 100\\r\\n\", \"output\": [\"25\\r\\n271877303\"]}, {\"input\": \"31 197\\r\\n50 100 50 50 100 50 100 100 100 50 50 100 50 100 50 50 50 50 100 100 50 50 100 50 50 50 50 50 100 50 100\\r\\n\", \"output\": [\"41\\r\\n24368657\"]}, {\"input\": \"28 183\\r\\n50 100 100 50 100 50 100 100 50 100 50 100 100 100 50 50 100 50 50 50 100 50 100 50 50 100 100 100\\r\\n\", \"output\": [\"41\\r\\n844409785\"]}, {\"input\": \"48 204\\r\\n100 100 100 50 50 50 50 100 100 50 100 100 50 100 50 50 50 100 100 100 50 100 50 50 50 100 50 100 50 100 100 100 50 50 100 100 100 50 100 50 50 50 50 50 100 50 50 50\\r\\n\", \"output\": [\"45\\r\\n538567333\"]}, {\"input\": \"5 188\\r\\n50 50 50 50 50\\r\\n\", \"output\": [\"3\\r\\n30\"]}, {\"input\": \"29 108\\r\\n100 50 100 100 100 100 100 50 50 100 100 100 50 100 50 50 100 50 100 50 50 100 100 50 50 50 100 100 50\\r\\n\", \"output\": [\"87\\r\\n417423429\"]}, {\"input\": \"50 125\\r\\n50 50 50 100 100 50 100 100 50 50 100 100 100 100 100 100 50 50 100 50 100 100 50 50 50 100 100 50 100 100 100 100 100 100 100 50 50 50 100 50 50 50 50 100 100 100 100 100 50 50\\r\\n\", \"output\": [\"153\\r\\n971933773\"]}, {\"input\": \"50 2263\\r\\n50 100 50 100 50 100 100 100 50 50 50 100 100 100 100 100 100 50 50 100 50 100 50 50 100 50 50 100 100 50 100 100 100 50 50 50 100 50 100 50 50 50 50 50 100 100 50 50 100 50\\r\\n\", \"output\": [\"3\\r\\n211048352\"]}, {\"input\": \"50 110\\r\\n50 100 100 50 50 50 50 50 50 50 100 100 50 100 50 50 50 50 100 50 100 100 100 100 50 100 100 100 100 50 50 50 50 50 100 100 50 100 50 100 100 50 50 100 50 100 50 50 100 100\\r\\n\", \"output\": [\"143\\r\\n105841088\"]}, {\"input\": \"50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n\", \"output\": [\"73\\r\\n930170107\"]}, {\"input\": \"50 207\\r\\n50 100 100 100 100 50 100 100 100 50 100 100 100 50 100 100 50 100 50 100 50 100 100 100 50 100 50 50 100 50 100 100 50 100 100 100 100 50 100 100 100 100 50 50 50 100 100 50 100 100\\r\\n\", \"output\": [\"55\\r\\n833060250\"]}, {\"input\": \"3 49\\r\\n50 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"3 50\\r\\n50 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"3 99\\r\\n100 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"4 100\\r\\n100 100 100 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 258\\r\\n100 100 50 50 50\\r\\n', 'output': ['3\\r\\n72']}, {'input': '3 121\\r\\n100 100 50\\r\\n', 'output': ['-1\\r\\n0']}, {'input': '27 200\\r\\n50 50 50 50 100 100 50 50 100 100 100 50 100 50 100 50 50 100 100 100 50 100 100 50 50 50 100\\r\\n', 'output': ['25\\r\\n271877303']}, {'input': '28 183\\r\\n50 100 100 50 100 50 100 100 50 100 50 100 100 100 50 50 100 50 50 50 100 50 100 50 50 100 100 100\\r\\n', 'output': ['41\\r\\n844409785']}, {'input': '31 197\\r\\n50 100 50 50 100 50 100 100 100 50 50 100 50 100 50 50 50 50 100 100 50 50 100 50 50 50 50 50 100 50 100\\r\\n', 'output': ['41\\r\\n24368657']}]","human_sample_testcases_2":"[{'input': '8 271\\r\\n100 50 100 50 50 50 100 50\\r\\n', 'output': ['5\\r\\n78090']}, {'input': '32 121\\r\\n100 100 100 100 100 50 100 100 50 100 50 100 50 100 50 100 50 50 50 100 100 50 100 100 100 100 50 100 50 100 100 50\\r\\n', 'output': ['101\\r\\n245361086']}, {'input': '49 290\\r\\n100 100 100 100 100 100 100 100 50 100 50 100 100 100 50 50 100 50 50 100 100 100 100 100 100 50 100 100 50 100 50 50 100 100 100 50 50 50 50 50 100 100 100 50 100 50 100 50 50\\r\\n', 'output': ['39\\r\\n99624366']}, {'input': '50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n', 'output': ['73\\r\\n930170107']}, {'input': '8 191\\r\\n50 100 50 100 50 100 100 50\\r\\n', 'output': ['11\\r\\n19318272']}]","human_sample_testcases_3":"[{'input': '31 291\\r\\n50 100 100 50 100 100 100 50 100 100 100 100 50 50 50 100 100 100 50 100 100 50 50 50 50 100 100 50 50 100 100\\r\\n', 'output': ['23\\r\\n393964729']}, {'input': '2 153\\r\\n100 50\\r\\n', 'output': ['1\\r\\n1']}, {'input': '50 2263\\r\\n50 100 50 100 50 100 100 100 50 50 50 100 100 100 100 100 100 50 50 100 50 100 50 50 100 50 50 100 100 50 100 100 100 50 50 50 100 50 100 50 50 50 50 50 100 100 50 50 100 50\\r\\n', 'output': ['3\\r\\n211048352']}, {'input': '31 197\\r\\n50 100 50 50 100 50 100 100 100 50 50 100 50 100 50 50 50 50 100 100 50 50 100 50 50 50 50 50 100 50 100\\r\\n', 'output': ['41\\r\\n24368657']}, {'input': '33 123\\r\\n50 100 100 100 50 100 50 50 50 50 50 100 100 50 100 50 100 50 50 50 50 50 50 50 100 100 50 50 100 100 100 100 100\\r\\n', 'output': ['93\\r\\n337243149']}]","human_sample_testcases_4":"[{'input': '36 250\\r\\n50 100 100 50 100 100 100 50 50 100 50 50 50 50 50 50 100 50 100 100 100 100 100 100 100 50 50 100 50 50 100 100 100 100 100 50\\r\\n', 'output': ['27\\r\\n77447096']}, {'input': '33 123\\r\\n50 100 100 100 50 100 50 50 50 50 50 100 100 50 100 50 100 50 50 50 50 50 50 50 100 100 50 50 100 100 100 100 100\\r\\n', 'output': ['93\\r\\n337243149']}, {'input': '29 129\\r\\n50 50 50 100 100 100 50 100 50 50 50 100 50 100 100 100 50 100 100 100 50 50 50 50 50 50 50 50 50\\r\\n', 'output': ['77\\r\\n37050209']}, {'input': '50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n', 'output': ['73\\r\\n930170107']}, {'input': '41 218\\r\\n50 50 100 50 100 100 50 100 100 50 50 100 50 50 50 50 100 50 100 50 50 50 100 50 50 50 50 100 100 100 100 100 100 50 100 50 100 100 100 50 50\\r\\n', 'output': ['39\\r\\n298372053']}]","human_sample_testcases_5":"[{'input': '23 100\\r\\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\\r\\n', 'output': ['43\\r\\n689584957']}, {'input': '43 178\\r\\n50 50 100 100 100 50 100 100 50 100 100 100 50 100 50 100 50 50 100 100 50 100 100 50 50 50 100 50 50 50 100 50 100 100 100 50 100 50 50 50 50 100 100\\r\\n', 'output': ['63\\r\\n503334985']}, {'input': '36 250\\r\\n50 100 100 50 100 100 100 50 50 100 50 50 50 50 50 50 100 50 100 100 100 100 100 100 100 50 50 100 50 50 100 100 100 100 100 50\\r\\n', 'output': ['27\\r\\n77447096']}, {'input': '1 2994\\r\\n100\\r\\n', 'output': ['1\\r\\n1']}, {'input': '50 110\\r\\n50 100 100 50 50 50 50 50 50 50 100 100 50 100 50 50 50 50 100 50 100 100 100 100 50 100 100 100 100 50 50 50 50 50 100 100 50 100 50 100 100 50 50 100 50 100 50 50 100 100\\r\\n', 'output': ['143\\r\\n105841088']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":97.56,"human_sample_line_coverage_3":97.56,"human_sample_line_coverage_4":97.56,"human_sample_line_coverage_5":97.56,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":97.37,"human_sample_branch_coverage_3":97.37,"human_sample_branch_coverage_4":97.37,"human_sample_branch_coverage_5":97.37,"id":37,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.048,"human_sample_branch_coverage":97.896} {"sample_inputs":"[\"7 3 7 3 20\", \"7 9 3 1 8\", \"10 10 10 10 10\"]","input_specification":"The only line of the input contains five integers t1, t2, t3, t4 and t5 (1\u2009\u2264\u2009ti\u2009\u2264\u2009100)\u00a0\u2014 numbers written on cards.","src_uid":"a9c17ce5fd5f39ffd70917127ce3408a","source_code":"#include\nint minimo(int a, int b);\nint main(){\n int v[5], i, j, k, total = 0, min;\n for(i = 0; i < 5; i++){\n scanf(\"%d\", &v[i]);\n total = total + v[i];\n }\n min = total;\n for(i = 0; i < 5; i++){\n for(j = i + 1; j < 5; j++){\n if(v[i] == v[j]){\n if(total - 2*v[i] < min)\n min = total - 2*v[i];\n }\n }\n }\n for(i = 0; i < 5; i++){\n for(j = i + 1; j < 5; j++){\n for(k = j + 1; k < 5; k++){\n if(v[i] == v[j] && v[i] == v[k]){\n if(total - 3*v[i] < min)\n min = total - 3*v[i];\n }\n }\n }\n }\n printf(\"%d\", min);\n}\n","sample_outputs":"[\"26\", \"28\", \"20\"]","lang_cluster":"C","notes":"NoteIn the first sample, Limak has cards with numbers 7, 3, 7, 3 and 20. Limak can do one of the following. Do nothing and the sum would be 7\u2009+\u20093\u2009+\u20097\u2009+\u20093\u2009+\u200920\u2009=\u200940. Remove two cards with a number 7. The remaining sum would be 3\u2009+\u20093\u2009+\u200920\u2009=\u200926. Remove two cards with a number 3. The remaining sum would be 7\u2009+\u20097\u2009+\u200920\u2009=\u200934. You are asked to minimize the sum so the answer is 26.In the second sample, it's impossible to find two or three cards with the same number. Hence, Limak does nothing and the sum is 7\u2009+\u20099\u2009+\u20091\u2009+\u20093\u2009+\u20098\u2009=\u200928.In the third sample, all cards have the same number. It's optimal to discard any three cards. The sum of two remaining numbers is 10\u2009+\u200910\u2009=\u200920.","output_specification":"Print the minimum possible sum of numbers written on remaining cards.","description":"A little bear Limak plays a game. He has five cards. There is one number written on each card. Each number is a positive integer.Limak can discard (throw out) some cards. His goal is to minimize the sum of numbers written on remaining (not discarded) cards.He is allowed to at most once discard two or three cards with the same number. Of course, he won't discard cards if it's impossible to choose two or three cards with the same number.Given five numbers written on cards, cay you find the minimum sum of numbers on remaining cards?","human_testcases":"[{\"input\": \"7 3 7 3 20\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 9 3 1 8\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"10 10 10 10 10\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"8 7 1 8 7\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"7 7 7 8 8\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"8 8 8 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8 8 2 2 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 50 5 5 60\\r\\n\", \"output\": [\"110\"]}, {\"input\": \"100 100 100 100 100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"1 1 1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"29 29 20 20 20\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"20 29 20 29 20\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"31 31 20 20 20\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"20 20 20 31 31\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"20 31 20 31 20\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"20 20 20 30 30\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"30 30 20 20 20\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"8 1 8 8 8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 1 1 8 1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 2 3 4 5\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"100 99 98 97 96\\r\\n\", \"output\": [\"490\"]}, {\"input\": \"1 1 100 100 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 100 99 99 98\\r\\n\", \"output\": [\"296\"]}, {\"input\": \"98 99 100 99 100\\r\\n\", \"output\": [\"296\"]}, {\"input\": \"1 90 1 91 1\\r\\n\", \"output\": [\"181\"]}, {\"input\": \"60 1 75 1 92\\r\\n\", \"output\": [\"227\"]}, {\"input\": \"15 40 90 40 90\\r\\n\", \"output\": [\"95\"]}, {\"input\": \"1 1 15 20 20\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"90 11 11 10 10\\r\\n\", \"output\": [\"110\"]}, {\"input\": \"20 21 22 23 24\\r\\n\", \"output\": [\"110\"]}, {\"input\": \"1 1 2 98 99\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"3 7 7 7 10\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1 3 3 3 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 9 9 9 10\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100 1 1 1 1\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"2 2 2 100 100\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 2 2 2 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1 2 2 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 2 3 4 1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11 10 10 10 10\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2 2 2 10 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1 1 1 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"98 98 98 98 23\\r\\n\", \"output\": [\"121\"]}, {\"input\": \"1 2 3 100 100\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 2 5 10 10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2 2 3 3 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1 1 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"12 12 7 7 7\\r\\n\", \"output\": [\"21\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '20 20 20 30 30\\r\\n', 'output': ['60']}, {'input': '100 99 98 97 96\\r\\n', 'output': ['490']}, {'input': '1 3 3 3 1\\r\\n', 'output': ['2']}, {'input': '20 21 22 23 24\\r\\n', 'output': ['110']}, {'input': '1 9 9 9 10\\r\\n', 'output': ['11']}]","human_sample_testcases_2":"[{'input': '20 21 22 23 24\\r\\n', 'output': ['110']}, {'input': '60 1 75 1 92\\r\\n', 'output': ['227']}, {'input': '2 2 3 3 3\\r\\n', 'output': ['4']}, {'input': '1 3 3 3 1\\r\\n', 'output': ['2']}, {'input': '1 1 2 2 5\\r\\n', 'output': ['7']}]","human_sample_testcases_3":"[{'input': '8 1 8 8 8\\r\\n', 'output': ['9']}, {'input': '7 7 7 8 8\\r\\n', 'output': ['16']}, {'input': '2 2 2 10 10\\r\\n', 'output': ['6']}, {'input': '2 2 5 10 10\\r\\n', 'output': ['9']}, {'input': '8 8 8 2 2\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '8 8 2 2 2\\r\\n', 'output': ['6']}, {'input': '1 2 3 4 5\\r\\n', 'output': ['15']}, {'input': '7 7 7 8 8\\r\\n', 'output': ['16']}, {'input': '7 9 3 1 8\\r\\n', 'output': ['28']}, {'input': '8 1 8 8 8\\r\\n', 'output': ['9']}]","human_sample_testcases_5":"[{'input': '1 2 3 4 5\\r\\n', 'output': ['15']}, {'input': '7 9 3 1 8\\r\\n', 'output': ['28']}, {'input': '7 7 7 8 8\\r\\n', 'output': ['16']}, {'input': '100 99 98 97 96\\r\\n', 'output': ['490']}, {'input': '10 10 10 10 10\\r\\n', 'output': ['20']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":95.45,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":38,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":99.09} {"sample_inputs":"[\"0 2 0 4\", \"0 2 1 1\", \"0 2 0 1\"]","input_specification":"The first line contains four space-separated integers \u2014 x1, x2, a and b (x1\u2009\u2260\u2009x2, a\u2009\u2264\u2009b, \u2009-\u2009109\u2009\u2264\u2009x1,\u2009x2,\u2009a,\u2009b\u2009\u2264\u2009109) \u2014 coordinates of the points where the first and the second participant start, and the numbers that determine the players' moves, correspondingly.","src_uid":"4ea8cc3305a0ee2c1e580b43e5bc46c6","source_code":"#include\n#include\n#include\n#include\n#define REP(i,a,b) for(i=a;i b){\n puts(\"DRAW\");\n continue;\n }\n\n if(stone > b && fgg){\n puts(\"DRAW\");\n continue;\n }\n\n stone -= mod;\n puts(\"FIRST\");\n if(fg==0) printf(\"%d\\n\",x2-stone);\n else printf(\"%d\\n\",x2+stone);\n }\n\n return 0;\n}\n","sample_outputs":"[\"FIRST\\n2\", \"SECOND\", \"DRAW\"]","lang_cluster":"C","notes":"NoteIn the first sample the first player can win in one move.In the second sample the first participant must go to point 1, where the second participant immediately goes and wins. In the third sample changing the position isn't profitable to either participant, so nobody wins.","output_specification":"On the first line print the outcome of the battle as \"FIRST\" (without the quotes), if both players play optimally and the first player wins. Print \"SECOND\" (without the quotes) if the second player wins and print \"DRAW\" (without the quotes), if nobody is able to secure the victory. If the first player wins, print on the next line the single integer x \u2014 the coordinate of the point where the first player should transfer to win. The indicated move should be valid, that is, it should meet the following condition: x1\u2009+\u2009a\u2009\u2264\u2009x\u2009\u2264\u2009x1\u2009+\u2009b. If there are several winning moves, print any of them. If the first participant can't secure the victory, then you do not have to print anything.","description":"The King of Flatland will organize a knights' tournament! The winner will get half the kingdom and the favor of the princess of legendary beauty and wisdom. The final test of the applicants' courage and strength will be a fencing tournament. The tournament is held by the following rules: the participants fight one on one, the winner (or rather, the survivor) transfers to the next round.Before the battle both participants stand at the specified points on the Ox axis with integer coordinates. Then they make moves in turn. The first participant moves first, naturally. During a move, the first participant can transfer from the point x to any integer point of the interval [x\u2009+\u2009a; x\u2009+\u2009b]. The second participant can transfer during a move to any integer point of the interval [x\u2009-\u2009b; x\u2009-\u2009a]. That is, the options for the players' moves are symmetric (note that the numbers a and b are not required to be positive, and if a\u2009\u2264\u20090\u2009\u2264\u2009b, then staying in one place is a correct move). At any time the participants can be located arbitrarily relative to each other, that is, it is allowed to \"jump\" over the enemy in any direction. A participant wins if he uses his move to transfer to the point where his opponent is.Of course, the princess has already chosen a husband and now she wants to make her sweetheart win the tournament. He has already reached the tournament finals and he is facing the last battle. The princess asks the tournament manager to arrange the tournament finalists in such a way that her sweetheart wins the tournament, considering that both players play optimally. However, the initial location of the participants has already been announced, and we can only pull some strings and determine which participant will be first and which one will be second. But how do we know which participant can secure the victory? Alas, the princess is not learned in the military affairs... Therefore, she asks you to determine how the battle will end considering that both opponents play optimally. Also, if the first player wins, your task is to determine his winning move.","human_testcases":"[{\"input\": \"0 2 0 4\\r\\n\", \"output\": [\"FIRST\\r\\n2\"]}, {\"input\": \"0 2 1 1\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"0 2 0 1\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"3 1 -2 2\\r\\n\", \"output\": [\"FIRST\\r\\n1\"]}, {\"input\": \"3 10 1 6\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"1 2 2 2\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"0 10 -1 1\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"0 15 5 5\\r\\n\", \"output\": [\"FIRST\\r\\n5\"]}, {\"input\": \"20 1 -5 -1\\r\\n\", \"output\": [\"FIRST\\r\\n19\"]}, {\"input\": \"0 100 2 31\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"31 39 0 8\\r\\n\", \"output\": [\"FIRST\\r\\n39\"]}, {\"input\": \"75 37 9 33\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-44 -17 12 13\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-80 60 17 23\\r\\n\", \"output\": [\"FIRST\\r\\n-60\"]}, {\"input\": \"-343 -119 -194 -60\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"439 722 206 325\\r\\n\", \"output\": [\"FIRST\\r\\n722\"]}, {\"input\": \"1621 733 -732 -156\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"2062 4167 2 2\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"45390 21963 -2047 -1023\\r\\n\", \"output\": [\"FIRST\\r\\n43453\"]}, {\"input\": \"258358 241272 -2 -1\\r\\n\", \"output\": [\"FIRST\\r\\n258357\"]}, {\"input\": \"965398 678942 -6666 -666\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"1234577 1234573 -3 3\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-186611 -745388 -776721 -308073\\r\\n\", \"output\": [\"FIRST\\r\\n-745388\"]}, {\"input\": \"2408736 -3517525 413342 557733\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-8006393 7731100 -478756 3592795\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-48549196 47782227 17235 109857\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"61190539 -40142693 -666666 -666666\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"25882413 -80674370 -999999 -9\\r\\n\", \"output\": [\"FIRST\\r\\n25326478\"]}, {\"input\": \"48011031 230545656 12345 67890\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"-730305467 -514687698 2 7\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"411443207 739161876 -1 0\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"402211447 260733897 -52 275\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"35406031 214492689 -307333182 -305473200\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"44789577 44789576 -1 0\\r\\n\", \"output\": [\"FIRST\\r\\n44789576\"]}, {\"input\": \"434676805 434676075 -878 345\\r\\n\", \"output\": [\"FIRST\\r\\n434676075\"]}, {\"input\": \"547686188 61562151 -496372503 -115242932\\r\\n\", \"output\": [\"FIRST\\r\\n61562151\"]}, {\"input\": \"775517456 -869957101 -1 -1\\r\\n\", \"output\": [\"FIRST\\r\\n775517455\"]}, {\"input\": \"637107829 -403198378 -2 -2\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-318865784 794140986 2 3\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"999763526 -998481439 -815 -157\\r\\n\", \"output\": [\"FIRST\\r\\n999762965\"]}, {\"input\": \"416100128 -709112339 -190811 -190811\\r\\n\", \"output\": [\"FIRST\\r\\n415909317\"]}, {\"input\": \"183003032 -631999413 -1000002 -1\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"847094637 -152905363 -1000000000 -1000000000\\r\\n\", \"output\": [\"FIRST\\r\\n-152905363\"]}, {\"input\": \"-1000000000 1000000000 1 1\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"-1000000000 1000000000 0 0\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"1000000000 999999999 -1000000000 -2\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"0 1 -1000000000 1000000000\\r\\n\", \"output\": [\"FIRST\\r\\n1\"]}, {\"input\": \"-1000000000 1000000000 1230987 9871231\\r\\n\", \"output\": [\"FIRST\\r\\n-998399240\"]}, {\"input\": \"-1000000000 1000000000 0 1000000000\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-1000000000 1000000000 1 999999999\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"-1000000000 1000000000 499999999 500000000\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"-1000000000 1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"SECOND\"]}, {\"input\": \"1000000000 -1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"DRAW\"]}, {\"input\": \"0 6 2 5\\r\\n\", \"output\": [\"DRAW\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '402211447 260733897 -52 275\\r\\n', 'output': ['DRAW']}, {'input': '-44 -17 12 13\\r\\n', 'output': ['DRAW']}, {'input': '1000000000 999999999 -1000000000 -2\\r\\n', 'output': ['DRAW']}, {'input': '-1000000000 1000000000 1 999999999\\r\\n', 'output': ['SECOND']}, {'input': '434676805 434676075 -878 345\\r\\n', 'output': ['FIRST\\r\\n434676075']}]","human_sample_testcases_2":"[{'input': '0 2 1 1\\r\\n', 'output': ['SECOND']}, {'input': '0 2 0 1\\r\\n', 'output': ['DRAW']}, {'input': '2062 4167 2 2\\r\\n', 'output': ['DRAW']}, {'input': '775517456 -869957101 -1 -1\\r\\n', 'output': ['FIRST\\r\\n775517455']}, {'input': '45390 21963 -2047 -1023\\r\\n', 'output': ['FIRST\\r\\n43453']}]","human_sample_testcases_3":"[{'input': '3 10 1 6\\r\\n', 'output': ['SECOND']}, {'input': '-730305467 -514687698 2 7\\r\\n', 'output': ['DRAW']}, {'input': '3 1 -2 2\\r\\n', 'output': ['FIRST\\r\\n1']}, {'input': '31 39 0 8\\r\\n', 'output': ['FIRST\\r\\n39']}, {'input': '775517456 -869957101 -1 -1\\r\\n', 'output': ['FIRST\\r\\n775517455']}]","human_sample_testcases_4":"[{'input': '-1000000000 1000000000 0 1000000000\\r\\n', 'output': ['DRAW']}, {'input': '61190539 -40142693 -666666 -666666\\r\\n', 'output': ['SECOND']}, {'input': '25882413 -80674370 -999999 -9\\r\\n', 'output': ['FIRST\\r\\n25326478']}, {'input': '35406031 214492689 -307333182 -305473200\\r\\n', 'output': ['DRAW']}, {'input': '402211447 260733897 -52 275\\r\\n', 'output': ['DRAW']}]","human_sample_testcases_5":"[{'input': '434676805 434676075 -878 345\\r\\n', 'output': ['FIRST\\r\\n434676075']}, {'input': '0 1 -1000000000 1000000000\\r\\n', 'output': ['FIRST\\r\\n1']}, {'input': '1621 733 -732 -156\\r\\n', 'output': ['SECOND']}, {'input': '402211447 260733897 -52 275\\r\\n', 'output': ['DRAW']}, {'input': '-1000000000 1000000000 1 999999999\\r\\n', 'output': ['SECOND']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":91.3,"human_sample_line_coverage_3":91.3,"human_sample_line_coverage_4":91.3,"human_sample_line_coverage_5":91.3,"human_sample_branch_coverage_1":77.27,"human_sample_branch_coverage_2":77.27,"human_sample_branch_coverage_3":81.82,"human_sample_branch_coverage_4":77.27,"human_sample_branch_coverage_5":77.27,"id":39,"human_sample_pass_rate":100.0,"human_sample_line_coverage":93.04,"human_sample_branch_coverage":78.18} {"sample_inputs":"[\"1 5\", \"3 6\"]","input_specification":"The first line contains two integers a and m (1\u2009\u2264\u2009a,\u2009m\u2009\u2264\u2009105).","src_uid":"f726133018e2149ec57e113860ec498a","source_code":"#include \nint a,m,k,r;\nint main() {\n\tscanf(\"%d\",&a);\n\tscanf(\"%d\",&m);\n\tr=a%m;\n\twhile(k<20) {\n\t\tif(r%m==0) {\n\t\t\tprintf(\"Yes\\n\");\n\t\t\treturn 0;\n\t\t} \n\t\telse {\n\t\t\tr*=2;\n\t\t\t++k;\n\t\t}\n\t}\n\tprintf(\"No\\n\");\n\treturn 0;\n}","sample_outputs":"[\"No\", \"Yes\"]","lang_cluster":"C","notes":null,"output_specification":"Print \"Yes\" (without quotes) if the production will eventually stop, otherwise print \"No\".","description":"One industrial factory is reforming working plan. The director suggested to set a mythical detail production norm. If at the beginning of the day there were x details in the factory storage, then by the end of the day the factory has to produce (remainder after dividing x by m) more details. Unfortunately, no customer has ever bought any mythical detail, so all the details produced stay on the factory. The board of directors are worried that the production by the given plan may eventually stop (that means that there will be \u0430 moment when the current number of details on the factory is divisible by m). Given the number of details a on the first day and number m check if the production stops at some moment.","human_testcases":"[{\"input\": \"1 5\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"3 6\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 8\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"3 24\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"100000 100000\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 99989\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"512 2\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"100 24\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1 100000\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"3 99929\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"99961 99971\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"1 65536\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"4 65536\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"3 65536\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"32768 65536\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"65535 65536\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"1 65535\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"98812 100000\\r\\n\", \"output\": [\"No\"]}, {\"input\": \"10 5\\r\\n\", \"output\": [\"Yes\"]}, {\"input\": \"6 8\\r\\n\", \"output\": [\"Yes\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '65535 65536\\r\\n', 'output': ['Yes']}, {'input': '1 1\\r\\n', 'output': ['Yes']}, {'input': '100000 100000\\r\\n', 'output': ['Yes']}, {'input': '3 24\\r\\n', 'output': ['Yes']}, {'input': '10 5\\r\\n', 'output': ['Yes']}]","human_sample_testcases_2":"[{'input': '1 65535\\r\\n', 'output': ['No']}, {'input': '3 65536\\r\\n', 'output': ['Yes']}, {'input': '4 65536\\r\\n', 'output': ['Yes']}, {'input': '3 6\\r\\n', 'output': ['Yes']}, {'input': '3 99929\\r\\n', 'output': ['No']}]","human_sample_testcases_3":"[{'input': '100000 1\\r\\n', 'output': ['Yes']}, {'input': '1 99989\\r\\n', 'output': ['No']}, {'input': '98812 100000\\r\\n', 'output': ['No']}, {'input': '3 99929\\r\\n', 'output': ['No']}, {'input': '1 8\\r\\n', 'output': ['Yes']}]","human_sample_testcases_4":"[{'input': '4 65536\\r\\n', 'output': ['Yes']}, {'input': '6 8\\r\\n', 'output': ['Yes']}, {'input': '512 2\\r\\n', 'output': ['Yes']}, {'input': '1 99989\\r\\n', 'output': ['No']}, {'input': '1 100000\\r\\n', 'output': ['No']}]","human_sample_testcases_5":"[{'input': '10 5\\r\\n', 'output': ['Yes']}, {'input': '512 2\\r\\n', 'output': ['Yes']}, {'input': '1 65535\\r\\n', 'output': ['No']}, {'input': '4 65536\\r\\n', 'output': ['Yes']}, {'input': '100000 100000\\r\\n', 'output': ['Yes']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":40,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.666,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"5\", \"1\"]","input_specification":"The input contains the only integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009106).","src_uid":"75739f77378b21c331b46b1427226fa1","source_code":"#include \n\nint gcm(int a, int b) \/\/ a<=b\u3067\u3042\u308b\u3053\u3068\uff0e\n{\n if(a == 0)\n return b;\n else\n return gcm(b%a, a);\n}\n\nint rec(int a, int b) \/\/ a\n#include \n#include \n#include \n\nint main (void) {\n\tint x, y, n, a = 0, b = 1, i, j;\n\tdouble t;\n\tscanf (\"%d %d %d\", &x, &y, &n);\n\tt = (double)x \/ y;\n\tfor (j = 1; j <= n; ++j) {\n\t\tdouble A[] = {floor (t*j), ceil (t*j)};\n\t\tfor (i = 0; (unsigned)i < sizeof A \/ sizeof *A; ++i) {\n\t\t\tif (fabs (t - A[i]\/j) + DBL_EPSILON < fabs (t - (double)a\/b)) {\n\t\t\t\ta = A[i];\n\t\t\t\tb = j;\n\t\t\t}\n\t\t}\n\t}\n\tprintf (\"%d\/%d\\n\", a, b);\n\texit (EXIT_SUCCESS);\n}\n","sample_outputs":"[\"2\/5\", \"7\/2\"]","lang_cluster":"C","notes":null,"output_specification":"Print the required fraction in the format \"a\/b\" (without quotes).","description":"You are given three positive integers x,\u2009y,\u2009n. Your task is to find the nearest fraction to fraction whose denominator is no more than n. Formally, you should find such pair of integers a,\u2009b (1\u2009\u2264\u2009b\u2009\u2264\u2009n;\u00a00\u2009\u2264\u2009a) that the value is as minimal as possible.If there are multiple \"nearest\" fractions, choose the one with the minimum denominator. If there are multiple \"nearest\" fractions with the minimum denominator, choose the one with the minimum numerator.","human_testcases":"[{\"input\": \"3 7 6\\r\\n\", \"output\": [\"2\/5\"]}, {\"input\": \"7 2 4\\r\\n\", \"output\": [\"7\/2\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\/1\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"0\/1\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"1\/2\"]}, {\"input\": \"17708 35362 1558\\r\\n\", \"output\": [\"328\/655\"]}, {\"input\": \"72657 93778 50943\\r\\n\", \"output\": [\"38236\/49351\"]}, {\"input\": \"1000 7 3\\r\\n\", \"output\": [\"143\/1\"]}, {\"input\": \"1000 11 20\\r\\n\", \"output\": [\"1000\/11\"]}, {\"input\": \"100000 2 100000\\r\\n\", \"output\": [\"50000\/1\"]}, {\"input\": \"99999 2 1\\r\\n\", \"output\": [\"49999\/1\"]}, {\"input\": \"38133 49787 9840\\r\\n\", \"output\": [\"3295\/4302\"]}, {\"input\": \"76730 91851 71438\\r\\n\", \"output\": [\"49039\/58703\"]}, {\"input\": \"7487 17563 1102\\r\\n\", \"output\": [\"107\/251\"]}, {\"input\": \"46084 75979 30535\\r\\n\", \"output\": [\"11637\/19186\"]}, {\"input\": \"60489 34395 34632\\r\\n\", \"output\": [\"20163\/11465\"]}, {\"input\": \"91245 43755 27191\\r\\n\", \"output\": [\"6083\/2917\"]}, {\"input\": \"29842 2171 245\\r\\n\", \"output\": [\"811\/59\"]}, {\"input\": \"44247 27883 24673\\r\\n\", \"output\": [\"34667\/21846\"]}, {\"input\": \"89781 34400 19222\\r\\n\", \"output\": [\"49972\/19147\"]}, {\"input\": \"36890 92817 22772\\r\\n\", \"output\": [\"5951\/14973\"]}, {\"input\": \"75486 2177 1983\\r\\n\", \"output\": [\"58877\/1698\"]}, {\"input\": \"6243 60593 42244\\r\\n\", \"output\": [\"3565\/34601\"]}, {\"input\": \"20648 86305 73795\\r\\n\", \"output\": [\"15543\/64967\"]}, {\"input\": \"59245 44721 45425\\r\\n\", \"output\": [\"59245\/44721\"]}, {\"input\": \"90002 86785 57380\\r\\n\", \"output\": [\"23109\/22283\"]}, {\"input\": \"28598 12497 10464\\r\\n\", \"output\": [\"23710\/10361\"]}, {\"input\": \"43003 70913 71178\\r\\n\", \"output\": [\"43003\/70913\"]}, {\"input\": \"14304 96625 53803\\r\\n\", \"output\": [\"7934\/53595\"]}, {\"input\": \"35646 27334 23417\\r\\n\", \"output\": [\"17823\/13667\"]}, {\"input\": \"99997 99999 99996\\r\\n\", \"output\": [\"49999\/50000\"]}, {\"input\": \"100000 10 10\\r\\n\", \"output\": [\"10000\/1\"]}, {\"input\": \"7 6 3\\r\\n\", \"output\": [\"1\/1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '60489 34395 34632\\r\\n', 'output': ['20163\/11465']}, {'input': '17708 35362 1558\\r\\n', 'output': ['328\/655']}, {'input': '20648 86305 73795\\r\\n', 'output': ['15543\/64967']}, {'input': '100000 2 100000\\r\\n', 'output': ['50000\/1']}, {'input': '43003 70913 71178\\r\\n', 'output': ['43003\/70913']}]","human_sample_testcases_2":"[{'input': '99999 2 1\\r\\n', 'output': ['49999\/1']}, {'input': '29842 2171 245\\r\\n', 'output': ['811\/59']}, {'input': '1000 11 20\\r\\n', 'output': ['1000\/11']}, {'input': '35646 27334 23417\\r\\n', 'output': ['17823\/13667']}, {'input': '44247 27883 24673\\r\\n', 'output': ['34667\/21846']}]","human_sample_testcases_3":"[{'input': '75486 2177 1983\\r\\n', 'output': ['58877\/1698']}, {'input': '7 2 4\\r\\n', 'output': ['7\/2']}, {'input': '89781 34400 19222\\r\\n', 'output': ['49972\/19147']}, {'input': '1000 11 20\\r\\n', 'output': ['1000\/11']}, {'input': '7 6 3\\r\\n', 'output': ['1\/1']}]","human_sample_testcases_4":"[{'input': '1 1 1\\r\\n', 'output': ['1\/1']}, {'input': '1 2 2\\r\\n', 'output': ['1\/2']}, {'input': '1000 11 20\\r\\n', 'output': ['1000\/11']}, {'input': '1000 7 3\\r\\n', 'output': ['143\/1']}, {'input': '36890 92817 22772\\r\\n', 'output': ['5951\/14973']}]","human_sample_testcases_5":"[{'input': '14304 96625 53803\\r\\n', 'output': ['7934\/53595']}, {'input': '90002 86785 57380\\r\\n', 'output': ['23109\/22283']}, {'input': '46084 75979 30535\\r\\n', 'output': ['11637\/19186']}, {'input': '100000 2 100000\\r\\n', 'output': ['50000\/1']}, {'input': '29842 2171 245\\r\\n', 'output': ['811\/59']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":42,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"13\\n12\", \"16\\n11311\", \"20\\n999\", \"17\\n2016\"]","input_specification":"The first line contains the integer n (2\u2009\u2264\u2009n\u2009\u2264\u2009109). The second line contains the integer k (0\u2009\u2264\u2009k\u2009<\u20091060), it is guaranteed that the number k contains no more than 60 symbols. All digits in the second line are strictly less than n. Alexander guarantees that the answer exists and does not exceed 1018. The number k doesn't contain leading zeros.","src_uid":"be66399c558c96566a6bb0a63d2503e5","source_code":"#include \n#include \n\n#define INF\t((long long) 1e18)\n\nint main() {\n\tstatic char s[128];\n\tstatic long long dp[128][128];\n\tint n, h, i, j, l;\n\tlong long min;\n\n\tscanf(\"%d\", &n);\n\tscanf(\"%s\", s);\n\tl = strlen(s);\n\tfor (i = 0; i <= l; i++)\n\t\tfor (j = 0; j <= l; j++)\n\t\t\tdp[i][j] = INF;\n\tdp[0][0] = 0;\n\tfor (i = 0; i < l; i++)\n\t\tfor (j = 0; j < l; j++)\n\t\t\tif (dp[i][j] < INF) {\n\t\t\t\tlong long x = dp[i][j];\n\n\t\t\t\tif (s[i] == '0') {\n\t\t\t\t\tif ((double) x * n <= INF)\n\t\t\t\t\t\tif (dp[i + 1][j + 1] > x * n)\n\t\t\t\t\t\t\tdp[i + 1][j + 1] = x * n;\n\t\t\t\t} else {\n\t\t\t\t\tlong long y = 0;\n\n\t\t\t\t\tfor (h = i; h < l; h++) {\n\t\t\t\t\t\ty = y * 10 + (s[h] - '0');\n\t\t\t\t\t\tif (y >= n)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif ((double) x * n + y <= INF)\n\t\t\t\t\t\t\tif (dp[h + 1][j + 1] > x * n + y)\n\t\t\t\t\t\t\t\tdp[h + 1][j + 1] = x * n + y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\tmin = INF;\n\tfor (j = 0; j <= l; j++)\n\t\tif (min > dp[l][j])\n\t\t\tmin = dp[l][j];\n\tprintf(\"%lld\\n\", min);\n\treturn 0;\n}\n","sample_outputs":"[\"12\", \"475\", \"3789\", \"594\"]","lang_cluster":"C","notes":"NoteIn the first example 12 could be obtained by converting two numbers to the system with base 13: 12\u2009=\u200912\u00b7130 or 15\u2009=\u20091\u00b7131\u2009+\u20092\u00b7130.","output_specification":"Print the number x (0\u2009\u2264\u2009x\u2009\u2264\u20091018)\u00a0\u2014 the answer to the problem.","description":"Alexander is learning how to convert numbers from the decimal system to any other, however, he doesn't know English letters, so he writes any number only as a decimal number, it means that instead of the letter A he will write the number 10. Thus, by converting the number 475 from decimal to hexadecimal system, he gets 11311 (475\u2009=\u20091\u00b7162\u2009+\u200913\u00b7161\u2009+\u200911\u00b7160). Alexander lived calmly until he tried to convert the number back to the decimal number system.Alexander remembers that he worked with little numbers so he asks to find the minimum decimal number so that by converting it to the system with the base n he will get the number k.","human_testcases":"[{\"input\": \"13\\r\\n12\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"16\\r\\n11311\\r\\n\", \"output\": [\"475\"]}, {\"input\": \"20\\r\\n999\\r\\n\", \"output\": [\"3789\"]}, {\"input\": \"17\\r\\n2016\\r\\n\", \"output\": [\"594\"]}, {\"input\": \"1000\\r\\n1001\\r\\n\", \"output\": [\"100001\"]}, {\"input\": \"1000\\r\\n1000\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"2\\r\\n110111100000101101101011001110100111011001000000000000000000\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"500\\r\\n29460456244280453288\\r\\n\", \"output\": [\"467528530570226788\"]}, {\"input\": \"1000000000\\r\\n17289468142098080\\r\\n\", \"output\": [\"17289468142098080\"]}, {\"input\": \"123\\r\\n7719\\r\\n\", \"output\": [\"9490\"]}, {\"input\": \"25\\r\\n2172214240\\r\\n\", \"output\": [\"26524975\"]}, {\"input\": \"2\\r\\n1110110101111000010001011110101001011001110000000010111010\\r\\n\", \"output\": [\"267367244641009850\"]}, {\"input\": \"3\\r\\n1210020121011022121222022012121212020\\r\\n\", \"output\": [\"268193483524125978\"]}, {\"input\": \"4\\r\\n32323300000100133222012211322\\r\\n\", \"output\": [\"269019726702209402\"]}, {\"input\": \"5\\r\\n4230423222300004320404110\\r\\n\", \"output\": [\"269845965585325530\"]}, {\"input\": \"6\\r\\n20201051430024130310350\\r\\n\", \"output\": [\"270672213058376250\"]}, {\"input\": \"7\\r\\n325503632564034033331\\r\\n\", \"output\": [\"271498451941492378\"]}, {\"input\": \"8\\r\\n17073735641412635372\\r\\n\", \"output\": [\"272324690824608506\"]}, {\"input\": \"9\\r\\n1733607167155630041\\r\\n\", \"output\": [\"273150934002691930\"]}, {\"input\": \"10\\r\\n996517375802030516\\r\\n\", \"output\": [\"996517375802030516\"]}, {\"input\": \"11\\r\\n1107835458761401923\\r\\n\", \"output\": [\"997343614685146644\"]}, {\"input\": \"20\\r\\n905191218118181710131111\\r\\n\", \"output\": [\"738505167292405431\"]}, {\"input\": \"50\\r\\n303521849112318129\\r\\n\", \"output\": [\"59962796634170079\"]}, {\"input\": \"100\\r\\n7226127039816418\\r\\n\", \"output\": [\"7226127039816418\"]}, {\"input\": \"1000\\r\\n839105509657869885\\r\\n\", \"output\": [\"839105509657869885\"]}, {\"input\": \"7501\\r\\n2542549323761022905\\r\\n\", \"output\": [\"805176557484307547\"]}, {\"input\": \"10981\\r\\n5149151039259677113\\r\\n\", \"output\": [\"748054672922159638\"]}, {\"input\": \"123358\\r\\n458270676485260235\\r\\n\", \"output\": [\"860152492903254335\"]}, {\"input\": \"2567853\\r\\n5247911636981396703\\r\\n\", \"output\": [\"346042641011647808\"]}, {\"input\": \"56132425\\r\\n3102369282985322\\r\\n\", \"output\": [\"10027171005317597\"]}, {\"input\": \"378135456\\r\\n42831383491941211\\r\\n\", \"output\": [\"582652156959951259\"]}, {\"input\": \"3\\r\\n110021012201002100122001102110010002\\r\\n\", \"output\": [\"68193483524125904\"]}, {\"input\": \"23\\r\\n12007622911918220\\r\\n\", \"output\": [\"1781911903273803\"]}, {\"input\": \"456\\r\\n82103391245145170\\r\\n\", \"output\": [\"1621222691867186\"]}, {\"input\": \"7897\\r\\n14412516641926184\\r\\n\", \"output\": [\"6062228032315859\"]}, {\"input\": \"23156\\r\\n27612518525717145\\r\\n\", \"output\": [\"3433598652149101\"]}, {\"input\": \"467879\\r\\n333380108424158040\\r\\n\", \"output\": [\"72980519445207316\"]}, {\"input\": \"7982154\\r\\n129530518193255487\\r\\n\", \"output\": [\"82535003403725833\"]}, {\"input\": \"21354646\\r\\n47160699363858581\\r\\n\", \"output\": [\"21776150370291089\"]}, {\"input\": \"315464878\\r\\n113635473256292967\\r\\n\", \"output\": [\"35848000882710261\"]}, {\"input\": \"1000000000\\r\\n17289468142098026\\r\\n\", \"output\": [\"17289468142098026\"]}, {\"input\": \"4\\r\\n200002312103012003212121020\\r\\n\", \"output\": [\"9019726702208584\"]}, {\"input\": \"46\\r\\n342836241940392925\\r\\n\", \"output\": [\"694167817136539\"]}, {\"input\": \"145\\r\\n357987665524124\\r\\n\", \"output\": [\"330396354354854\"]}, {\"input\": \"1344\\r\\n2498394521019605\\r\\n\", \"output\": [\"814487257688093\"]}, {\"input\": \"57974\\r\\n3619236326439503\\r\\n\", \"output\": [\"7079242212325439\"]}, {\"input\": \"215467\\r\\n2082791630100848\\r\\n\", \"output\": [\"966934630351661\"]}, {\"input\": \"7956123\\r\\n6718643712272358\\r\\n\", \"output\": [\"4255926011071634\"]}, {\"input\": \"13568864\\r\\n2513398972677784\\r\\n\", \"output\": [\"4621032639107192\"]}, {\"input\": \"789765212\\r\\n1039927282755769\\r\\n\", \"output\": [\"821298450375293\"]}, {\"input\": \"1000000000\\r\\n7289468142097485\\r\\n\", \"output\": [\"7289468142097485\"]}, {\"input\": \"5\\r\\n22011100004310232330\\r\\n\", \"output\": [\"45965585242840\"]}, {\"input\": \"98\\r\\n11291073236468\\r\\n\", \"output\": [\"10007394522984\"]}, {\"input\": \"364\\r\\n284155255182196\\r\\n\", \"output\": [\"4993183241788\"]}, {\"input\": \"8742\\r\\n111445644633405\\r\\n\", \"output\": [\"74498130012303\"]}, {\"input\": \"11346\\r\\n573275516211238\\r\\n\", \"output\": [\"83675287784142\"]}, {\"input\": \"442020\\r\\n13825031303078\\r\\n\", \"output\": [\"26973736400898\"]}, {\"input\": \"1740798\\r\\n321470190942028\\r\\n\", \"output\": [\"99531390411376\"]}, {\"input\": \"25623752\\r\\n25636131538378\\r\\n\", \"output\": [\"65689385274354\"]}, {\"input\": \"814730652\\r\\n56899767577002\\r\\n\", \"output\": [\"46358126945150\"]}, {\"input\": \"6\\r\\n5543321344052\\r\\n\", \"output\": [\"12975669536\"]}, {\"input\": \"79\\r\\n9653454753\\r\\n\", \"output\": [\"27953623755\"]}, {\"input\": \"158\\r\\n25832612364\\r\\n\", \"output\": [\"15908078858\"]}, {\"input\": \"1675\\r\\n11480678916\\r\\n\", \"output\": [\"8852883441\"]}, {\"input\": \"12650\\r\\n25380755475\\r\\n\", \"output\": [\"40587846725\"]}, {\"input\": \"165726\\r\\n465015206\\r\\n\", \"output\": [\"770641106\"]}, {\"input\": \"2015054\\r\\n30501583737\\r\\n\", \"output\": [\"6147498437\"]}, {\"input\": \"98000000\\r\\n19440834812\\r\\n\", \"output\": [\"19052834812\"]}, {\"input\": \"157137373\\r\\n525141766938\\r\\n\", \"output\": [\"82638887763\"]}, {\"input\": \"7\\r\\n441214552\\r\\n\", \"output\": [\"26508694\"]}, {\"input\": \"294\\r\\n2251151163\\r\\n\", \"output\": [\"72564361\"]}, {\"input\": \"2707\\r\\n11341512\\r\\n\", \"output\": [\"3071250\"]}, {\"input\": \"76559\\r\\n100147383\\r\\n\", \"output\": [\"76682942\"]}, {\"input\": \"124849\\r\\n6172319\\r\\n\", \"output\": [\"7688108\"]}, {\"input\": \"7014809\\r\\n73084644\\r\\n\", \"output\": [\"52188307\"]}, {\"input\": \"10849219\\r\\n65200749\\r\\n\", \"output\": [\"70296063\"]}, {\"input\": \"905835986\\r\\n371320\\r\\n\", \"output\": [\"371320\"]}, {\"input\": \"1000000000\\r\\n69204007\\r\\n\", \"output\": [\"69204007\"]}, {\"input\": \"8\\r\\n2670\\r\\n\", \"output\": [\"1464\"]}, {\"input\": \"25\\r\\n71610\\r\\n\", \"output\": [\"4785\"]}, {\"input\": \"1468\\r\\n21107\\r\\n\", \"output\": [\"4043\"]}, {\"input\": \"5723\\r\\n4907\\r\\n\", \"output\": [\"4907\"]}, {\"input\": \"251546\\r\\n7278\\r\\n\", \"output\": [\"7278\"]}, {\"input\": \"9\\r\\n78\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"13\\r\\n41\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"34\\r\\n13\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"45\\r\\n22\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"67\\r\\n29\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"130\\r\\n100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"13\\r\\n9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3215\\r\\n3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000000\\r\\n6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"378\\r\\n1378\\r\\n\", \"output\": [\"4992\"]}, {\"input\": \"378\\r\\n380378377\\r\\n\", \"output\": [\"65568783041\"]}, {\"input\": \"2\\r\\n10000000000000000000000000\\r\\n\", \"output\": [\"33554432\"]}, {\"input\": \"2\\r\\n10000000000000000000000000000\\r\\n\", \"output\": [\"268435456\"]}, {\"input\": \"2\\r\\n100000000000000000000000\\r\\n\", \"output\": [\"8388608\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n10000000000000000000000000000\\r\\n', 'output': ['268435456']}, {'input': '130\\r\\n100\\r\\n', 'output': ['100']}, {'input': '7501\\r\\n2542549323761022905\\r\\n', 'output': ['805176557484307547']}, {'input': '11\\r\\n1107835458761401923\\r\\n', 'output': ['997343614685146644']}, {'input': '50\\r\\n303521849112318129\\r\\n', 'output': ['59962796634170079']}]","human_sample_testcases_2":"[{'input': '124849\\r\\n6172319\\r\\n', 'output': ['7688108']}, {'input': '215467\\r\\n2082791630100848\\r\\n', 'output': ['966934630351661']}, {'input': '13\\r\\n41\\r\\n', 'output': ['53']}, {'input': '5\\r\\n22011100004310232330\\r\\n', 'output': ['45965585242840']}, {'input': '315464878\\r\\n113635473256292967\\r\\n', 'output': ['35848000882710261']}]","human_sample_testcases_3":"[{'input': '7501\\r\\n2542549323761022905\\r\\n', 'output': ['805176557484307547']}, {'input': '7014809\\r\\n73084644\\r\\n', 'output': ['52188307']}, {'input': '2\\r\\n1110110101111000010001011110101001011001110000000010111010\\r\\n', 'output': ['267367244641009850']}, {'input': '13\\r\\n12\\r\\n', 'output': ['12']}, {'input': '165726\\r\\n465015206\\r\\n', 'output': ['770641106']}]","human_sample_testcases_4":"[{'input': '9\\r\\n78\\r\\n', 'output': ['71']}, {'input': '9\\r\\n1733607167155630041\\r\\n', 'output': ['273150934002691930']}, {'input': '2\\r\\n100000000000000000000000\\r\\n', 'output': ['8388608']}, {'input': '25\\r\\n71610\\r\\n', 'output': ['4785']}, {'input': '7014809\\r\\n73084644\\r\\n', 'output': ['52188307']}]","human_sample_testcases_5":"[{'input': '67\\r\\n29\\r\\n', 'output': ['29']}, {'input': '6\\r\\n5543321344052\\r\\n', 'output': ['12975669536']}, {'input': '10849219\\r\\n65200749\\r\\n', 'output': ['70296063']}, {'input': '4\\r\\n32323300000100133222012211322\\r\\n', 'output': ['269019726702209402']}, {'input': '25\\r\\n2172214240\\r\\n', 'output': ['26524975']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":96.43,"human_sample_branch_coverage_5":100.0,"id":43,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":99.286} {"sample_inputs":"[\"1 1\", \"1 2\", \"2 1\"]","input_specification":"The single line contains two integers r,\u2009h (1\u2009\u2264\u2009r,\u2009h\u2009\u2264\u2009107).","src_uid":"ae883bf16842c181ea4bd123dee12ef9","source_code":"#include\n#include\nint r,h,vol;\nint main()\n{\n\tscanf(\" %d %d\",&r,&h);\n\n\tvol = h \/ r * 2;\n\th %= r;\n\tif (2*h= sqrt(3)*r)\n\t\tvol += 3;\n\telse\n\t\tvol += 2;\n\tprintf(\"%d\",vol);\n\treturn 0;\n}\n","sample_outputs":"[\"3\", \"5\", \"2\"]","lang_cluster":"C","notes":null,"output_specification":"Print a single integer \u2014 the maximum number of balloons Xenia can put in the cupboard.","description":"A girl named Xenia has a cupboard that looks like an arc from ahead. The arc is made of a semicircle with radius r (the cupboard's top) and two walls of height h (the cupboard's sides). The cupboard's depth is r, that is, it looks like a rectangle with base r and height h\u2009+\u2009r from the sides. The figure below shows what the cupboard looks like (the front view is on the left, the side view is on the right). Xenia got lots of balloons for her birthday. The girl hates the mess, so she wants to store the balloons in the cupboard. Luckily, each balloon is a sphere with radius . Help Xenia calculate the maximum number of balloons she can put in her cupboard. You can say that a balloon is in the cupboard if you can't see any part of the balloon on the left or right view. The balloons in the cupboard can touch each other. It is not allowed to squeeze the balloons or deform them in any way. You can assume that the cupboard's walls are negligibly thin.","human_testcases":"[{\"input\": \"1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 11\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"674098 1358794\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3983458 7761504\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4841874 9131511\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"667586 5534221\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"1526002 6904227\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4835362 5823289\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5693778 7001807\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6552194 8371814\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2377906 4774524\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4365659 4738707\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"98 1358794\\r\\n\", \"output\": [\"27731\"]}, {\"input\": \"458 7761504\\r\\n\", \"output\": [\"33894\"]}, {\"input\": \"874 9131511\\r\\n\", \"output\": [\"20897\"]}, {\"input\": \"586 5534221\\r\\n\", \"output\": [\"18889\"]}, {\"input\": \"2 6904227\\r\\n\", \"output\": [\"6904228\"]}, {\"input\": \"1 10000000\\r\\n\", \"output\": [\"20000001\"]}, {\"input\": \"2 10000000\\r\\n\", \"output\": [\"10000001\"]}, {\"input\": \"3 10000000\\r\\n\", \"output\": [\"6666667\"]}, {\"input\": \"4 10000000\\r\\n\", \"output\": [\"5000001\"]}, {\"input\": \"3 9999999\\r\\n\", \"output\": [\"6666667\"]}, {\"input\": \"10000000 866254\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000000 8660255\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 50\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 199\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10000 9999\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000 1999999\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2000000 1999999\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"18 16\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 87\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 19\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10000 38661\\r\\n\", \"output\": [\"9\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 50\\r\\n', 'output': ['2']}, {'input': '100 199\\r\\n', 'output': ['5']}, {'input': '5 11\\r\\n', 'output': ['5']}, {'input': '2 3\\r\\n', 'output': ['4']}, {'input': '10000000 8660255\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '5 11\\r\\n', 'output': ['5']}, {'input': '667586 5534221\\r\\n', 'output': ['17']}, {'input': '2000000 1999999\\r\\n', 'output': ['3']}, {'input': '1000000 1999999\\r\\n', 'output': ['5']}, {'input': '2 2\\r\\n', 'output': ['3']}]","human_sample_testcases_3":"[{'input': '5 2\\r\\n', 'output': ['1']}, {'input': '2377906 4774524\\r\\n', 'output': ['5']}, {'input': '5 5\\r\\n', 'output': ['3']}, {'input': '5 10\\r\\n', 'output': ['5']}, {'input': '3983458 7761504\\r\\n', 'output': ['5']}]","human_sample_testcases_4":"[{'input': '874 9131511\\r\\n', 'output': ['20897']}, {'input': '1000000 1999999\\r\\n', 'output': ['5']}, {'input': '10 19\\r\\n', 'output': ['5']}, {'input': '5 11\\r\\n', 'output': ['5']}, {'input': '2 2\\r\\n', 'output': ['3']}]","human_sample_testcases_5":"[{'input': '10000000 866254\\r\\n', 'output': ['1']}, {'input': '667586 5534221\\r\\n', 'output': ['17']}, {'input': '874 9131511\\r\\n', 'output': ['20897']}, {'input': '1 1\\r\\n', 'output': ['3']}, {'input': '5 1\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":90.91,"human_sample_line_coverage_3":90.91,"human_sample_line_coverage_4":90.91,"human_sample_line_coverage_5":90.91,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":44,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.728,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"10 30\\n10 35\\n05:20\", \"60 120\\n24 100\\n13:00\"]","input_specification":"The first line contains two integers a,\u2009ta (1\u2009\u2264\u2009a,\u2009ta\u2009\u2264\u2009120) \u2014 the frequency of the buses from the city A to the city B and the travel time. Both values are given in minutes. The second line contains two integers b,\u2009tb (1\u2009\u2264\u2009b,\u2009tb\u2009\u2264\u2009120) \u2014 the frequency of the buses from the city B to the city A and the travel time. Both values are given in minutes. The last line contains the departure time of Simion from the city A in the format hh:mm. It is guaranteed that there are a bus from the city A at that time. Note that the hours and the minutes are given with exactly two digits.","src_uid":"1c4cf1c3cb464a483511a8a61f8685a7","source_code":"#include\nint main()\n{\n\tint a,ta;\n\tscanf(\"%d%d\",&a,&ta);\n\tint b,tb;\n\tscanf(\"%d%d\",&b,&tb);\n\tint h,m;\n\tscanf(\"%d:%d\",&h,&m);\n\tint x,y,w=0,z=300;\n\tx=60*h+m;\n\ty=60*h+m+ta;\n\tjump:\n\t\tif(z+tbx && zy)\n\t\t{\n\t\t\tgoto temp;\n\t\t}\n\t\telse if(z+tb==x || z==y)\n\t\t{\n\t\t\tz=z+b;\n\t\t\tgoto jump;\n\t\t}\n\t\ttemp:\n\t\tprintf(\"%d\\n\",w);\n\treturn 0;\n}","sample_outputs":"[\"5\", \"9\"]","lang_cluster":"C","notes":"NoteIn the first example Simion departs form the city A at 05:20 AM and arrives to the city B at 05:50 AM. He will meet the first 5 buses from the city B that departed in the period [05:00 AM - 05:40 AM]. Also Simion will meet a bus in the city B at 05:50 AM, but he will not count it.Also note that the first encounter will be between 05:26 AM and 05:27 AM (if we suggest that the buses are go with the sustained speed).","output_specification":"Print the only integer z \u2014 the number of buses Simion will meet on the way. Note that you should not count the encounters in cities A and B.","description":"Buses run between the cities A and B, the first one is at 05:00 AM and the last one departs not later than at 11:59 PM. A bus from the city A departs every a minutes and arrives to the city B in a ta minutes, and a bus from the city B departs every b minutes and arrives to the city A in a tb minutes.The driver Simion wants to make his job diverse, so he counts the buses going towards him. Simion doesn't count the buses he meet at the start and finish.You know the time when Simion departed from the city A to the city B. Calculate the number of buses Simion will meet to be sure in his counting.","human_testcases":"[{\"input\": \"10 30\\r\\n10 35\\r\\n05:20\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"60 120\\r\\n24 100\\r\\n13:00\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30 60\\r\\n60 60\\r\\n22:30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"30 60\\r\\n10 60\\r\\n23:30\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 45\\r\\n4 60\\r\\n21:00\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n10:28\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 1\\r\\n5 4\\r\\n18:40\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 8\\r\\n1 1\\r\\n13:24\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"20 4\\r\\n1 20\\r\\n06:20\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"15 24\\r\\n23 6\\r\\n21:15\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"30 19\\r\\n21 4\\r\\n10:30\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31 15\\r\\n36 25\\r\\n07:04\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"24 3\\r\\n54 9\\r\\n18:12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18 69\\r\\n62 54\\r\\n08:00\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33 58\\r\\n70 78\\r\\n22:36\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"68 34\\r\\n84 78\\r\\n10:40\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15 14\\r\\n32 65\\r\\n05:45\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"40 74\\r\\n100 42\\r\\n05:40\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"65 49\\r\\n24 90\\r\\n07:10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n23:59\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"23 118\\r\\n118 20\\r\\n23:24\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 88\\r\\n17 38\\r\\n22:33\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3 1\\r\\n2 3\\r\\n05:03\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n3 2\\r\\n08:44\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3\\r\\n1 2\\r\\n21:43\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 28\\r\\n2 12\\r\\n05:12\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"60 120\\r\\n17 120\\r\\n23:00\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"1 55\\r\\n1 54\\r\\n23:59\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"66 75\\r\\n1 82\\r\\n06:06\\r\\n\", \"output\": [\"141\"]}, {\"input\": \"1 90\\r\\n1 88\\r\\n23:59\\r\\n\", \"output\": [\"88\"]}, {\"input\": \"1 120\\r\\n1 100\\r\\n23:59\\r\\n\", \"output\": [\"100\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '30 60\\r\\n60 60\\r\\n22:30\\r\\n', 'output': ['2']}, {'input': '18 69\\r\\n62 54\\r\\n08:00\\r\\n', 'output': ['2']}, {'input': '5 45\\r\\n4 60\\r\\n21:00\\r\\n', 'output': ['26']}, {'input': '66 75\\r\\n1 82\\r\\n06:06\\r\\n', 'output': ['141']}, {'input': '24 3\\r\\n54 9\\r\\n18:12\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '3 88\\r\\n17 38\\r\\n22:33\\r\\n', 'output': ['8']}, {'input': '24 3\\r\\n54 9\\r\\n18:12\\r\\n', 'output': ['0']}, {'input': '1 120\\r\\n1 100\\r\\n23:59\\r\\n', 'output': ['100']}, {'input': '20 4\\r\\n1 20\\r\\n06:20\\r\\n', 'output': ['23']}, {'input': '8 8\\r\\n1 1\\r\\n13:24\\r\\n', 'output': ['8']}]","human_sample_testcases_3":"[{'input': '1 1\\r\\n1 1\\r\\n23:59\\r\\n', 'output': ['1']}, {'input': '1 1\\r\\n3 2\\r\\n08:44\\r\\n', 'output': ['0']}, {'input': '24 3\\r\\n54 9\\r\\n18:12\\r\\n', 'output': ['0']}, {'input': '60 120\\r\\n17 120\\r\\n23:00\\r\\n', 'output': ['11']}, {'input': '15 24\\r\\n23 6\\r\\n21:15\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '68 34\\r\\n84 78\\r\\n10:40\\r\\n', 'output': ['1']}, {'input': '1 1\\r\\n1 1\\r\\n10:28\\r\\n', 'output': ['1']}, {'input': '30 60\\r\\n60 60\\r\\n22:30\\r\\n', 'output': ['2']}, {'input': '31 15\\r\\n36 25\\r\\n07:04\\r\\n', 'output': ['1']}, {'input': '30 19\\r\\n21 4\\r\\n10:30\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '1 1\\r\\n1 1\\r\\n10:28\\r\\n', 'output': ['1']}, {'input': '33 58\\r\\n70 78\\r\\n22:36\\r\\n', 'output': ['2']}, {'input': '30 60\\r\\n60 60\\r\\n22:30\\r\\n', 'output': ['2']}, {'input': '1 1\\r\\n3 2\\r\\n08:44\\r\\n', 'output': ['0']}, {'input': '3 88\\r\\n17 38\\r\\n22:33\\r\\n', 'output': ['8']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.65,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":95.65,"human_sample_line_coverage_5":95.65,"human_sample_branch_coverage_1":85.71,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":85.71,"human_sample_branch_coverage_5":85.71,"id":45,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.39,"human_sample_branch_coverage":91.426} {"sample_inputs":"[\"........\\n........\\n.B....B.\\n....W...\\n........\\n..W.....\\n........\\n........\", \"..B.....\\n..W.....\\n......B.\\n........\\n.....W..\\n......B.\\n........\\n........\"]","input_specification":"The input consists of the board description given in eight lines, each line contains eight characters. Character 'B' is used to denote a black pawn, and character 'W' represents a white pawn. Empty cell is marked with '.'. It's guaranteed that there will not be white pawns on the first row neither black pawns on the last row.","src_uid":"0ddc839e17dee20e1a954c1289de7fbd","source_code":"#include\ntypedef unsigned u;\nu A[8],B[8];\nint main()\n{\n\tu i,j,a,b;char c;\n\tfor(a=b=i=-1;++i<8;)A[i]=B[i]=-1;\n\tfor(i=-1;++i<8;)for(j=-1;++j<8;)\n\t{\n\t\twhile((c=getchar())<=' ');\n\t\tif(c=='B')B[j]=i;\n\t\tif(c=='W'&&A[j]==-1u)\n\t\t{\n\t\t\tif(B[j]==-1u)A[j]=i;\n\t\t\telse B[j]=-1u;\n\t\t}\n\t}\n\tfor(i=-1;++i<8;)\n\t{\n\t\tif(a>A[i])a=A[i];\n\t\tif(B[i]!=-1u&&b>7-B[i])b=7-B[i];\n\t}\n\tprintf(a>b?\"B\\n\":\"A\\n\");\n\treturn 0;\n}\n","sample_outputs":"[\"A\", \"B\"]","lang_cluster":"C","notes":"NoteIn the first sample player A is able to complete his goal in 3 steps by always moving a pawn initially located at (4,\u20095). Player B needs at least 5 steps for any of his pawns to reach the row 8. Hence, player A will be the winner.","output_specification":"Print 'A' if player A wins the game on the given board, and 'B' if player B will claim the victory. Again, it's guaranteed that there will always be a winner on the given board.","description":"Galois is one of the strongest chess players of Byteforces. He has even invented a new variant of chess, which he named \u00abPawnChess\u00bb.This new game is played on a board consisting of 8 rows and 8 columns. At the beginning of every game some black and white pawns are placed on the board. The number of black pawns placed is not necessarily equal to the number of white pawns placed. Lets enumerate rows and columns with integers from 1 to 8. Rows are numbered from top to bottom, while columns are numbered from left to right. Now we denote as (r,\u2009c) the cell located at the row r and at the column c.There are always two players A and B playing the game. Player A plays with white pawns, while player B plays with black ones. The goal of player A is to put any of his pawns to the row 1, while player B tries to put any of his pawns to the row 8. As soon as any of the players completes his goal the game finishes immediately and the succeeded player is declared a winner.Player A moves first and then they alternate turns. On his move player A must choose exactly one white pawn and move it one step upward and player B (at his turn) must choose exactly one black pawn and move it one step down. Any move is possible only if the targeted cell is empty. It's guaranteed that for any scenario of the game there will always be at least one move available for any of the players.Moving upward means that the pawn located in (r,\u2009c) will go to the cell (r\u2009-\u20091,\u2009c), while moving down means the pawn located in (r,\u2009c) will go to the cell (r\u2009+\u20091,\u2009c). Again, the corresponding cell must be empty, i.e. not occupied by any other pawn of any color.Given the initial disposition of the board, determine who wins the game if both players play optimally. Note that there will always be a winner due to the restriction that for any game scenario both players will have some moves available.","human_testcases":"[{\"input\": \"........\\r\\n........\\r\\n.B....B.\\r\\n....W...\\r\\n........\\r\\n..W.....\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"..B.....\\r\\n..W.....\\r\\n......B.\\r\\n........\\r\\n.....W..\\r\\n......B.\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"B\"]}, {\"input\": \".BB.B.B.\\r\\nB..B..B.\\r\\n.B.BB...\\r\\nBB.....B\\r\\nBBB....B\\r\\nB..BB...\\r\\nBB.B...B\\r\\n....WWW.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"..BB....\\r\\n........\\r\\nWW.W..WW\\r\\nW...W...\\r\\n.W...W..\\r\\n.W..W.WW\\r\\nW.....WW\\r\\nWW......\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"BB....B.\\r\\nB.....B.\\r\\n.....B..\\r\\n..B...BB\\r\\n.W.BWBWB\\r\\n....W...\\r\\nWW.WWW..\\r\\n....W...\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B.B.BB.B\\r\\nW.WWW.WW\\r\\n.WWWWW.W\\r\\nW.BB.WBW\\r\\n.W..BBWB\\r\\nBB.WWBBB\\r\\n.W.W.WWB\\r\\nWWW..WW.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"BB..BB..\\r\\nBW.W.W.B\\r\\n..B.....\\r\\n.....BB.\\r\\n.B..B..B\\r\\n........\\r\\n...BB.B.\\r\\nW.WWWW.W\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"BB......\\r\\nW....BBW\\r\\n........\\r\\n.B.B.BBB\\r\\n....BB..\\r\\nB....BB.\\r\\n...WWWW.\\r\\n....WW..\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".B.B..B.\\r\\nB.B....B\\r\\n...B.B.B\\r\\n..B.W..B\\r\\n.BBB.B.B\\r\\nB.BB.B.B\\r\\nBB..BBBB\\r\\nW.W.W.WW\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"..BB....\\r\\n.B.B.B.B\\r\\n..B.B...\\r\\n..B..B.B\\r\\nWWWBWWB.\\r\\n.BB...B.\\r\\n..BBB...\\r\\n......W.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"..BB....\\r\\n.WBWBWBB\\r\\n.....BBB\\r\\n..WW....\\r\\n.W.W...W\\r\\nWWW...W.\\r\\n.W....W.\\r\\nW...W.W.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B...BB..\\r\\nWWBBW.BB\\r\\n.W.W....\\r\\nWWWW....\\r\\nW....W..\\r\\nW..WW...\\r\\n...W....\\r\\nWW.W....\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B..BB..B\\r\\n..B.B...\\r\\nBW..BBW.\\r\\n...B.BBB\\r\\n.B..BB..\\r\\n..B.B.BB\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"....BB..\\r\\nBB......\\r\\n.B.....B\\r\\nWW..WWW.\\r\\n...BB.B.\\r\\nB...BB..\\r\\n..W..WWW\\r\\n...W...W\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B...BBBB\\r\\n...BBB..\\r\\nBBWBWW.W\\r\\n.B..BB.B\\r\\nW..W..WW\\r\\nW.WW....\\r\\n........\\r\\nWW.....W\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".BB..B..\\r\\n.B.....B\\r\\n.B......\\r\\n.B...B..\\r\\n.......B\\r\\n.WWB.WWB\\r\\nW.....W.\\r\\n...W....\\r\\n\", \"output\": [\"B\"]}, {\"input\": \".B......\\r\\n.B....B.\\r\\n...W....\\r\\n......W.\\r\\nW.WWWW.W\\r\\nW.WW....\\r\\n..WWW...\\r\\n..W...WW\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B.......\\r\\nBBB.....\\r\\n.B....B.\\r\\n.W.BWB.W\\r\\n......B.\\r\\nW..WW...\\r\\n...W....\\r\\nW...W..W\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".B......\\r\\n.B...B.B\\r\\n.B..B.BB\\r\\nW.......\\r\\n..W.....\\r\\n..WWW...\\r\\n.......W\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".....B..\\r\\n........\\r\\n........\\r\\n.BB..B..\\r\\n..BB....\\r\\n........\\r\\n....WWW.\\r\\n......W.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B.B...B.\\r\\n...BBBBB\\r\\n....B...\\r\\n...B...B\\r\\nB.B.B..B\\r\\n........\\r\\n........\\r\\nWWW..WW.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B.B...B.\\r\\n........\\r\\n.......B\\r\\n.BB....B\\r\\n.....W..\\r\\n.W.WW.W.\\r\\n...W.WW.\\r\\nW..WW..W\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"......B.\\r\\nB....B..\\r\\n...B.BB.\\r\\n...B....\\r\\n........\\r\\n..W....W\\r\\nWW......\\r\\n.W....W.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \".BBB....\\r\\nB.B.B...\\r\\nB.BB.B..\\r\\nB.BB.B.B\\r\\n........\\r\\n........\\r\\nW.....W.\\r\\n..WW..W.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"..B..BBB\\r\\n........\\r\\n........\\r\\n........\\r\\n...W.W..\\r\\n...W..W.\\r\\nW.......\\r\\n..W...W.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\n.B.B....\\r\\n...B..BB\\r\\n........\\r\\n........\\r\\nW...W...\\r\\nW...W...\\r\\nW.WW.W..\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"...B..BB\\r\\n.B..B..B\\r\\n........\\r\\n........\\r\\n........\\r\\nW..W....\\r\\n.....WW.\\r\\n.W......\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B....BB.\\r\\n...B...B\\r\\n.B......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n....W..W\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"...BB.BB\\r\\nBB...B..\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n..W..W..\\r\\n......W.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"...BB...\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n......W.\\r\\nWW...WW.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"...B.B..\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nWWW...WW\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"BBBBBBB.\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.WWWWWWW\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".BBBBBB.\\r\\nB.......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.WWWWWWW\\r\\n\", \"output\": [\"B\"]}, {\"input\": \".BBBBBBB\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nWWWWWWW.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".BBBBBB.\\r\\n.......B\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nWWWWWWW.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B..BB...\\r\\n..B...B.\\r\\n.WBB...B\\r\\nBW......\\r\\nW.B...W.\\r\\n..BBW.B.\\r\\nBW..BB..\\r\\n......W.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"BBB.BBBB\\r\\nWB.W..B.\\r\\nBBBB...B\\r\\nB..B....\\r\\n.......W\\r\\n.BWB..BB\\r\\nB..BW.BW\\r\\n.W......\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B.BBBBBB\\r\\nB..BBB.B\\r\\nW.BB.W.B\\r\\nB.BWBB.B\\r\\nBWBWBBBB\\r\\n...BBBBB\\r\\nB.B...BB\\r\\nWW..WW.W\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"BBBB.BBB\\r\\nBBBB.B.B\\r\\nB.B..BBB\\r\\nB.BB.BWW\\r\\nB.BB.BBB\\r\\nB.BB.BBB\\r\\n..BW.BB.\\r\\nW.WWWWWW\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"BBBB.BBB\\r\\n.B....WB\\r\\nBB.B...B\\r\\nWWWW.WWB\\r\\nBB...BWW\\r\\nWWW..BBB\\r\\nW.BW.BB.\\r\\nWWWWWWW.\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"B.BBBBBB\\r\\nW.WWBBBW\\r\\nW.BB.WBB\\r\\nW.W.BBBW\\r\\nW.BWW.WB\\r\\nB..B..BB\\r\\nB.B.W.BB\\r\\nWWWWW.WW\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"BBBBBB.B\\r\\n.BBWBB.B\\r\\nWWW..B.W\\r\\n..WW.W.W\\r\\nBWB..W.W\\r\\n..BW.B.W\\r\\nB..B....\\r\\nWWWW.WWW\\r\\n\", \"output\": [\"B\"]}, {\"input\": \".B...BB.\\r\\nWBB.BWBB\\r\\n.BWBW...\\r\\n..W...B.\\r\\nWB.BWW..\\r\\nWBW.....\\r\\n.W..W.B.\\r\\n.W.W.WW.\\r\\n\", \"output\": [\"A\"]}, {\"input\": \".B..BBBB\\r\\nBB...WWB\\r\\nB..B.W.B\\r\\nWB.W...B\\r\\n...W.WW.\\r\\nW.....W.\\r\\nWB.W.W.W\\r\\n.WW...WW\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"B.BBBBBB\\r\\nW.BB.W.B\\r\\nW.BBW...\\r\\n..WWWW.B\\r\\n....W..B\\r\\n.WW.W..W\\r\\n.W..WW.W\\r\\nW.W....W\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\n.......W\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.......B\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"..B.....\\r\\n..W.....\\r\\n.W....B.\\r\\n........\\r\\n.B...W..\\r\\n......B.\\r\\n.W......\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\nB.......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.......W\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\n........\\r\\n........\\r\\n.W......\\r\\n......B.\\r\\n........\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\nB.......\\r\\nW.......\\r\\n.......B\\r\\n........\\r\\n........\\r\\n........\\r\\n...W....\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"........\\r\\n.B......\\r\\n.W......\\r\\n........\\r\\n....B...\\r\\n........\\r\\n........\\r\\n.......W\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"........\\r\\n..B.....\\r\\n..W...B.\\r\\n........\\r\\n.....W..\\r\\n......B.\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"........\\r\\nW.......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.......B\\r\\n........\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"........\\r\\n........\\r\\n........\\r\\n........\\r\\nW.......\\r\\nB.......\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"........\\r\\n........\\r\\n.W......\\r\\n........\\r\\n........\\r\\n........\\r\\n.B......\\r\\n........\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"........\\r\\nB.......\\r\\nW.......\\r\\n.W......\\r\\n........\\r\\nB.......\\r\\n........\\r\\n........\\r\\n\", \"output\": [\"B\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '........\\r\\n.B.B....\\r\\n...B..BB\\r\\n........\\r\\n........\\r\\nW...W...\\r\\nW...W...\\r\\nW.WW.W..\\r\\n', 'output': ['A']}, {'input': 'B.BBBBBB\\r\\nB..BBB.B\\r\\nW.BB.W.B\\r\\nB.BWBB.B\\r\\nBWBWBBBB\\r\\n...BBBBB\\r\\nB.B...BB\\r\\nWW..WW.W\\r\\n', 'output': ['B']}, {'input': '....BB..\\r\\nBB......\\r\\n.B.....B\\r\\nWW..WWW.\\r\\n...BB.B.\\r\\nB...BB..\\r\\n..W..WWW\\r\\n...W...W\\r\\n', 'output': ['B']}, {'input': '........\\r\\n.......W\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.......B\\r\\n........\\r\\n', 'output': ['A']}, {'input': '.B...BB.\\r\\nWBB.BWBB\\r\\n.BWBW...\\r\\n..W...B.\\r\\nWB.BWW..\\r\\nWBW.....\\r\\n.W..W.B.\\r\\n.W.W.WW.\\r\\n', 'output': ['A']}]","human_sample_testcases_2":"[{'input': 'BBBB.BBB\\r\\nBBBB.B.B\\r\\nB.B..BBB\\r\\nB.BB.BWW\\r\\nB.BB.BBB\\r\\nB.BB.BBB\\r\\n..BW.BB.\\r\\nW.WWWWWW\\r\\n', 'output': ['B']}, {'input': '...BB.BB\\r\\nBB...B..\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n..W..W..\\r\\n......W.\\r\\n', 'output': ['A']}, {'input': '........\\r\\n........\\r\\n.W......\\r\\n........\\r\\n........\\r\\n........\\r\\n.B......\\r\\n........\\r\\n', 'output': ['B']}, {'input': 'B..BB..B\\r\\n..B.B...\\r\\nBW..BBW.\\r\\n...B.BBB\\r\\n.B..BB..\\r\\n..B.B.BB\\r\\n........\\r\\n........\\r\\n', 'output': ['A']}, {'input': '........\\r\\n..B.....\\r\\n..W...B.\\r\\n........\\r\\n.....W..\\r\\n......B.\\r\\n........\\r\\n........\\r\\n', 'output': ['B']}]","human_sample_testcases_3":"[{'input': '..BB....\\r\\n........\\r\\nWW.W..WW\\r\\nW...W...\\r\\n.W...W..\\r\\n.W..W.WW\\r\\nW.....WW\\r\\nWW......\\r\\n', 'output': ['A']}, {'input': '........\\r\\n........\\r\\n........\\r\\n.W......\\r\\n......B.\\r\\n........\\r\\n........\\r\\n........\\r\\n', 'output': ['A']}, {'input': '........\\r\\n.B......\\r\\n.W......\\r\\n........\\r\\n....B...\\r\\n........\\r\\n........\\r\\n.......W\\r\\n', 'output': ['B']}, {'input': 'B.B.BB.B\\r\\nW.WWW.WW\\r\\n.WWWWW.W\\r\\nW.BB.WBW\\r\\n.W..BBWB\\r\\nBB.WWBBB\\r\\n.W.W.WWB\\r\\nWWW..WW.\\r\\n', 'output': ['A']}, {'input': '.B...BB.\\r\\nWBB.BWBB\\r\\n.BWBW...\\r\\n..W...B.\\r\\nWB.BWW..\\r\\nWBW.....\\r\\n.W..W.B.\\r\\n.W.W.WW.\\r\\n', 'output': ['A']}]","human_sample_testcases_4":"[{'input': '...B.B..\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nWWW...WW\\r\\n', 'output': ['A']}, {'input': 'B.B...B.\\r\\n........\\r\\n.......B\\r\\n.BB....B\\r\\n.....W..\\r\\n.W.WW.W.\\r\\n...W.WW.\\r\\nW..WW..W\\r\\n', 'output': ['A']}, {'input': 'BBBB.BBB\\r\\nBBBB.B.B\\r\\nB.B..BBB\\r\\nB.BB.BWW\\r\\nB.BB.BBB\\r\\nB.BB.BBB\\r\\n..BW.BB.\\r\\nW.WWWWWW\\r\\n', 'output': ['B']}, {'input': 'B.B...B.\\r\\n...BBBBB\\r\\n....B...\\r\\n...B...B\\r\\nB.B.B..B\\r\\n........\\r\\n........\\r\\nWWW..WW.\\r\\n', 'output': ['B']}, {'input': 'BB....B.\\r\\nB.....B.\\r\\n.....B..\\r\\n..B...BB\\r\\n.W.BWBWB\\r\\n....W...\\r\\nWW.WWW..\\r\\n....W...\\r\\n', 'output': ['B']}]","human_sample_testcases_5":"[{'input': 'B..BB...\\r\\n..B...B.\\r\\n.WBB...B\\r\\nBW......\\r\\nW.B...W.\\r\\n..BBW.B.\\r\\nBW..BB..\\r\\n......W.\\r\\n', 'output': ['B']}, {'input': 'B....BB.\\r\\n...B...B\\r\\n.B......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n....W..W\\r\\n', 'output': ['B']}, {'input': '........\\r\\nW.......\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.......B\\r\\n........\\r\\n', 'output': ['A']}, {'input': '........\\r\\n........\\r\\n........\\r\\n.W......\\r\\n......B.\\r\\n........\\r\\n........\\r\\n........\\r\\n', 'output': ['A']}, {'input': 'BBBB.BBB\\r\\n.B....WB\\r\\nBB.B...B\\r\\nWWWW.WWB\\r\\nBB...BWW\\r\\nWWW..BBB\\r\\nW.BW.BB.\\r\\nWWWWWWW.\\r\\n', 'output': ['B']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":96.15,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":46,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":99.23} {"sample_inputs":"[\"3\\n141 592 653\", \"5\\n10 21 10 21 10\"]","input_specification":"Input will begin with an integer N (1\u2009\u2264\u2009N\u2009\u2264\u200950), the number of slices of pie. Following this is a line with N integers indicating the sizes of the slices (each between 1 and 100000, inclusive), in the order in which they must be handed out.","src_uid":"414540223db9d4cfcec6a973179a0216","source_code":"#include\n\nint max(int a,int b)\n{\nif(a>=b)return a;\nelse return b;\n}\nint main()\n{\nint ca[52];\nint n;scanf(\"%d\",&n);\nint sumi[52];\nint sum=0;\nint dp[52]={-1};\n\nint i=0;\nfor(i=0;i=0;i--)\n{\ndp[i]=max((ca[i]+(sumi[n-1]-dp[i+1]-sumi[i])),dp[i+1]);\n\n\n}\n\nint ans = dp[0];\nint ans1 = sumi[n-1]-dp[0];\n\nprintf(\"%d %d\\n\",ans1,ans);\n\n\n\nreturn 0;\n}\n","sample_outputs":"[\"653 733\", \"31 41\"]","lang_cluster":"C","notes":"NoteIn the first example, Bob takes the size 141 slice for himself and gives the decider token to Alice. Then Alice gives the size 592 slice to Bob and keeps the decider token for herself, so that she can then give the size 653 slice to herself.","output_specification":"Print two integers. First, the sum of the sizes of slices eaten by Alice, then the sum of the sizes of the slices eaten by Bob, assuming both players make their decisions optimally.","description":"You may have heard of the pie rule before. It states that if two people wish to fairly share a slice of pie, one person should cut the slice in half, and the other person should choose who gets which slice. Alice and Bob have many slices of pie, and rather than cutting the slices in half, each individual slice will be eaten by just one person.The way Alice and Bob decide who eats each slice is as follows. First, the order in which the pies are to be handed out is decided. There is a special token called the \"decider\" token, initially held by Bob. Until all the pie is handed out, whoever has the decider token will give the next slice of pie to one of the participants, and the decider token to the other participant. They continue until no slices of pie are left.All of the slices are of excellent quality, so each participant obviously wants to maximize the total amount of pie they get to eat. Assuming both players make their decisions optimally, how much pie will each participant receive?","human_testcases":"[{\"input\": \"3\\r\\n141 592 653\\r\\n\", \"output\": [\"653 733\"]}, {\"input\": \"5\\r\\n10 21 10 21 10\\r\\n\", \"output\": [\"31 41\"]}, {\"input\": \"1\\r\\n100000\\r\\n\", \"output\": [\"0 100000\"]}, {\"input\": \"50\\r\\n100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000 100000\\r\\n\", \"output\": [\"2500000 2500000\"]}, {\"input\": \"2\\r\\n1 100000\\r\\n\", \"output\": [\"1 100000\"]}, {\"input\": \"17\\r\\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536\\r\\n\", \"output\": [\"65535 65536\"]}, {\"input\": \"15\\r\\n3026 3027 4599 4854 7086 29504 38709 40467 40663 58674 61008 70794 77517 85547 87320\\r\\n\", \"output\": [\"306375 306420\"]}, {\"input\": \"30\\r\\n2351 14876 66138 87327 29940 73204 19925 50198 13441 54751 1383 92120 90236 13525 3920 16669 80637 94428 54890 71321 77670 57080 82145 39778 69967 38722 46902 82127 1142 21792\\r\\n\", \"output\": [\"724302 724303\"]}, {\"input\": \"1\\r\\n59139\\r\\n\", \"output\": [\"0 59139\"]}, {\"input\": \"2\\r\\n9859 48096\\r\\n\", \"output\": [\"9859 48096\"]}, {\"input\": \"3\\r\\n25987 64237 88891\\r\\n\", \"output\": [\"88891 90224\"]}, {\"input\": \"4\\r\\n9411 13081 2149 19907\\r\\n\", \"output\": [\"19907 24641\"]}, {\"input\": \"5\\r\\n25539 29221 6895 82089 18673\\r\\n\", \"output\": [\"80328 82089\"]}, {\"input\": \"6\\r\\n76259 10770 87448 3054 67926 81667\\r\\n\", \"output\": [\"158428 168696\"]}, {\"input\": \"7\\r\\n92387 35422 24898 32532 92988 84636 99872\\r\\n\", \"output\": [\"192724 270011\"]}, {\"input\": \"8\\r\\n8515 51563 5451 94713 9537 30709 63343 41819\\r\\n\", \"output\": [\"138409 167241\"]}, {\"input\": \"9\\r\\n91939 407 10197 24191 58791 9486 68030 25807 11\\r\\n\", \"output\": [\"102429 186430\"]}, {\"input\": \"10\\r\\n30518 96518 74071 59971 50121 4862 43967 73607 19138 90754\\r\\n\", \"output\": [\"252317 291210\"]}, {\"input\": \"11\\r\\n46646 21171 78816 89449 99375 50934 15950 90299 18702 62232 12657\\r\\n\", \"output\": [\"288850 297381\"]}, {\"input\": \"12\\r\\n30070 37311 92074 18927 91732 29711 12126 41583 52857 99118 73097 33928\\r\\n\", \"output\": [\"296580 315954\"]}, {\"input\": \"13\\r\\n13494 86155 96820 72596 40986 99976 16813 25571 87013 3301 832 26376 83769\\r\\n\", \"output\": [\"325890 327812\"]}, {\"input\": \"14\\r\\n96918 67704 10077 34778 90239 11457 80284 42263 53872 74779 93976 53416 83860 74518\\r\\n\", \"output\": [\"414474 453667\"]}, {\"input\": \"15\\r\\n13046 83844 14823 64255 15301 90234 84972 93547 88028 11665 54415 13159 83950 951 42336\\r\\n\", \"output\": [\"362168 392358\"]}, {\"input\": \"16\\r\\n29174 32688 95377 26437 64554 60498 56955 10239 22183 15847 47559 40199 92552 70488 4147 73082\\r\\n\", \"output\": [\"370791 371188\"]}, {\"input\": \"17\\r\\n79894 24637 8634 80107 81104 39275 53130 94227 56339 87326 7999 75751 92642 96921 74470 20999 69688\\r\\n\", \"output\": [\"492038 551105\"]}, {\"input\": \"18\\r\\n96022 73481 13380 42288 6166 85348 25113 78215 23198 24212 44246 35494 92733 66459 44793 68916 82818 3967\\r\\n\", \"output\": [\"436157 470692\"]}, {\"input\": \"19\\r\\n79446 55030 93934 39062 88123 88317 21289 62203 57354 28394 37390 95238 92823 92892 39308 16833 54733 51525 58759\\r\\n\", \"output\": [\"538648 614005\"]}, {\"input\": \"20\\r\\n5440 88704 61481 72140 15810 58854 43034 5150 80684 61360 50516 54301 78790 43678 46138 79893 89899 60260 2881 66499\\r\\n\", \"output\": [\"506639 558873\"]}, {\"input\": \"21\\r\\n21569 37548 74739 25809 65063 37631 71913 89138 47543 65542 10956 14045 78880 70111 73357 27810 70326 40523 899 6547 87440\\r\\n\", \"output\": [\"506467 510922\"]}, {\"input\": \"22\\r\\n72289 86393 79484 55287 14317 83704 11192 73126 81699 2429 4100 41085 87482 72352 10976 75727 42240 79569 31621 3492 51189 25936\\r\\n\", \"output\": [\"513496 572193\"]}, {\"input\": \"23\\r\\n88417 11045 92742 84765 6675 86673 40072 57114 15854 6611 40347 76636 87572 66082 38195 56348 89962 59831 29640 43541 14937 73713 52755\\r\\n\", \"output\": [\"602650 616877\"]}, {\"input\": \"24\\r\\n71841 27185 73295 46946 55928 65450 12055 73806 82714 78089 787 36380 87663 68323 75814 4265 94581 31581 51850 40486 11390 21491 27560 22678\\r\\n\", \"output\": [\"560664 601494\"]}, {\"input\": \"25\\r\\n87969 76030 78041 616 13694 11522 84038 25090 16869 14975 61226 96124 20457 62052 70329 76374 42303 11844 15276 37430 99330 77781 35069 64358 45168\\r\\n\", \"output\": [\"586407 637558\"]}, {\"input\": \"26\\r\\n71393 24874 91299 30093 62947 14491 80214 41782 51025 19158 21666 23163 20547 64293 40653 24291 46922 92106 13294 77479 63079 25559 42579 62933 24433 39507\\r\\n\", \"output\": [\"569885 599895\"]}, {\"input\": \"27\\r\\n54817 73719 96044 92275 12201 60564 84901 25770 17884 90636 14810 82907 20637 58023 10976 72208 94644 63856 11312 74424 26828 40632 58600 37316 38290 82420 48297\\r\\n\", \"output\": [\"716531 728460\"]}, {\"input\": \"28\\r\\n70945 22563 76598 21753 4558 39341 48372 77054 52039 27522 75249 18459 96536 60264 5491 20125 42367 44118 42034 38665 47472 88410 66109 78995 52147 68436 9814 71112\\r\\n\", \"output\": [\"669482 697066\"]}, {\"input\": \"29\\r\\n54369 14511 14048 83934 53812 75014 20356 17938 86195 31704 68393 78202 96626 86697 75814 746 46985 15868 40052 11417 11221 44700 40915 53378 98708 78644 4035 20164 37165\\r\\n\", \"output\": [\"678299 683312\"]}, {\"input\": \"30\\r\\n4555 13594 57403 75796 14203 12847 66292 60885 9525 40478 57327 69970 15297 37483 39540 31102 14855 412 84174 57684 65591 19837 80431 18385 3107 87740 15433 24854 73472 88205\\r\\n\", \"output\": [\"620095 620382\"]}, {\"input\": \"31\\r\\n20683 29734 37957 37978 63456 58920 70980 44873 76385 44661 17767 97009 15387 63916 77159 79019 86770 4866 14897 63141 86236 67614 87940 60064 16964 97948 9654 49714 30888 88075 63792\\r\\n\", \"output\": [\"825663 838784\"]}, {\"input\": \"32\\r\\n71403 78578 75406 67455 12710 37697 67155 28861 10540 48843 10911 56753 15477 33453 4378 26936 34492 19720 12915 27382 49984 91200 95449 34448 63525 83964 3875 98767 77905 63753 83018 58084\\r\\n\", \"output\": [\"770578 774459\"]}, {\"input\": \"33\\r\\n87531 27423 55960 53829 37771 40665 39138 12849 77399 53025 71350 83793 48271 59887 41997 74854 14919 24175 43637 24327 13733 38978 2959 319 10086 26876 65393 56332 68025 63623 93732 68354 83938\\r\\n\", \"output\": [\"741185 823963\"]}, {\"input\": \"34\\r\\n70955 19371 60706 50603 54321 86738 11122 29541 11555 57207 31790 19344 24170 29424 36512 22771 86833 4437 41655 64376 34378 19459 86276 74702 23943 69789 59614 48489 49634 63494 12958 11328 69333 1736\\r\\n\", \"output\": [\"693927 744637\"]}, {\"input\": \"35\\r\\n54379 920 41259 12784 3574 98219 40001 80825 45710 61390 24933 79088 24260 23153 6835 94880 67260 76187 39673 28616 98126 10341 26489 49085 37800 55805 86539 97542 39754 30660 32184 64703 11625 77872 63584\\r\\n\", \"output\": [\"823487 862568\"]}, {\"input\": \"36\\r\\n37803 17060 78709 42262 28636 68484 79280 97517 12570 98276 52669 6128 57054 58098 68646 75501 39174 56449 3099 1369 94579 58119 1295 90764 51657 66013 48056 55107 54066 30530 75602 74973 21212 21304 22589 4895\\r\\n\", \"output\": [\"872694 876851\"]}, {\"input\": \"37\\r\\n53932 65904 91967 4443 77890 47261 8160 81505 46725 69754 21621 65871 24440 51828 71673 23418 86896 4008 1117 65610 82519 5897 8804 65148 98218 76221 42277 79968 68379 30401 62125 61052 96207 64737 24698 99495 70720\\r\\n\", \"output\": [\"989044 1011845\"]}, {\"input\": \"38\\r\\n70060 14749 72520 58113 2951 26037 80143 32789 80881 73936 82060 92911 24531 78261 9292 71335 91515 8462 31839 62555 46268 29482 92121 31019 12075 94942 36498 96317 58499 30271 81351 71322 81602 8169 26807 69903 38154 20539\\r\\n\", \"output\": [\"977736 1012543\"]}, {\"input\": \"39\\r\\n20780 30889 9970 87591 19501 96302 76318 49481 47740 10823 42500 61167 57325 47798 36511 19252 39237 23316 29857 2603 10016 9964 99630 5402 82828 5150 98015 53882 72811 97437 57473 57400 91189 84305 85811 64503 40179 50614 52044\\r\\n\", \"output\": [\"954593 973021\"]}, {\"input\": \"40\\r\\n3670 5779 20621 87964 12595 34136 98063 92429 38366 43789 88330 52934 19100 22776 43342 82312 74404 64756 73980 14278 21283 85101 63339 70409 63034 14245 33606 58571 84927 14931 25355 15452 46072 4671 5838 69121 18243 87783 29748 84047\\r\\n\", \"output\": [\"909877 959523\"]}, {\"input\": \"41\\r\\n87094 21920 58071 41634 29145 45616 94239 76417 5226 47971 48770 79974 19190 25017 37857 30229 11726 12314 71998 54327 85032 8687 46656 12088 9595 24454 27827 7624 66535 14801 44581 25723 55659 48103 75242 39529 52973 17858 16985 41454 44182\\r\\n\", \"output\": [\"799467 864856\"]}, {\"input\": \"42\\r\\n70518 70764 38625 3816 78399 48585 66222 60405 72085 52153 85018 39717 51984 51451 8180 78146 59448 16768 2720 51272 48780 56464 21461 86471 23452 10470 22048 65189 56655 90480 31103 11801 73758 91536 10055 34129 20407 47933 4223 98861 84475 52291\\r\\n\", \"output\": [\"1012190 1036128\"]}, {\"input\": \"43\\r\\n86646 19609 43370 33293 3460 94658 95101 44393 6241 56335 78161 66757 52074 53692 2695 58767 31363 64326 738 15513 69425 4242 28971 60855 37309 53382 16269 57346 70968 90350 74522 22072 83345 67672 69060 4537 55137 78008 91461 32075 33280 70405 71607\\r\\n\", \"output\": [\"1039942 1109548\"]}, {\"input\": \"44\\r\\n70070 68453 23924 95475 52714 73435 34380 61085 40396 60518 38601 26501 52165 47421 73018 6684 79085 68781 31460 88265 33173 52020 44992 2534 8062 96295 77786 39103 85280 24812 93748 75446 92932 11105 71169 66433 89866 75379 11402 22186 73572 31624 70092 10734\\r\\n\", \"output\": [\"1141992 1210184\"]}, {\"input\": \"45\\r\\n53494 93105 37182 24953 1967 43700 39068 12369 7256 64700 31744 62052 84959 49662 34829 78793 51000 16339 29478 52506 96922 75606 52501 1109 21919 6503 72007 63964 75400 24682 45678 18420 67928 87241 73278 69545 24596 29646 65936 55401 89673 49738 35873 45189 3622\\r\\n\", \"output\": [\"1052557 1068976\"]}, {\"input\": \"46\\r\\n36918 9246 74631 78622 94325 22476 35243 96357 41411 68882 92184 21796 28153 43392 37856 26710 64130 20793 60200 16747 84862 23383 60010 42788 68480 92519 66229 56121 57009 24553 89096 4499 53323 30673 75386 31442 92030 59721 53173 45511 29966 67853 77462 12347 61811 81517\\r\\n\", \"output\": [\"1199490 1212346\"]}, {\"input\": \"47\\r\\n53046 58090 55185 8100 43578 1253 7226 13049 75567 73065 19920 48836 28243 45633 75475 74628 11853 68351 90922 89500 81315 71161 34816 49875 82337 2727 27746 37878 79833 24423 75618 82065 95614 82618 34391 1850 94056 57092 73115 70214 46067 29071 75947 46802 95807 42600 11211\\r\\n\", \"output\": [\"1214201 1233568\"]}, {\"input\": \"48\\r\\n69174 6934 59931 70281 68640 47326 3402 64333 42426 77247 13063 8579 61038 39362 2694 22545 83767 15909 88940 86445 45063 27451 18133 91555 28898 45640 21967 62738 61441 24293 19036 68144 5201 26050 69204 29154 85681 19871 60352 36133 86359 47186 74432 5448 53996 27876 58022 80559\\r\\n\", \"output\": [\"1096672 1115247\"]}, {\"input\": \"49\\r\\n19894 55779 73188 99759 17893 50295 8089 81025 76582 81429 73503 35619 61128 41603 40313 3166 31490 87660 19662 59197 8812 75229 25642 65938 42755 31656 16188 87599 51562 91460 38262 11118 90596 69482 71313 66858 87707 17242 14886 93539 35164 32596 83317 72606 12185 21664 80642 72099 7525\\r\\n\", \"output\": [\"1233007 1259909\"]}, {\"input\": \"50\\r\\n70081 97965 40736 24325 2476 20832 54026 23972 91400 47099 95141 27386 79799 49285 4039 818 23552 72203 55273 38168 52783 50365 89351 30945 47154 8047 27586 49184 20573 8953 38849 36466 45479 89848 82827 71475 74283 87115 92590 28903 97800 74550 74140 82514 10849 6786 67881 63456 53022 25051\\r\\n\", \"output\": [\"1251581 1255820\"]}, {\"input\": \"4\\r\\n10 3 2 1\\r\\n\", \"output\": [\"4 12\"]}, {\"input\": \"6\\r\\n5245 1414 21632 12159 31783 7412\\r\\n\", \"output\": [\"38442 41203\"]}, {\"input\": \"46\\r\\n1666 17339 9205 20040 30266 12751 11329 7951 9000 14465 11771 7600 19480 15993 19453 7470 1361 7922 27747 17347 4727 11280 403 16338 6064 11124 25723 18717 26118 271 9242 16952 26381 31795 28226 3646 27589 31472 30108 28354 25281 22429 30956 32264 14729 21685\\r\\n\", \"output\": [\"379808 392222\"]}, {\"input\": \"3\\r\\n100 90 80\\r\\n\", \"output\": [\"90 180\"]}, {\"input\": \"5\\r\\n10 9 8 7 6\\r\\n\", \"output\": [\"16 24\"]}, {\"input\": \"4\\r\\n100 40 50 10\\r\\n\", \"output\": [\"50 150\"]}, {\"input\": \"6\\r\\n5 4 3 2 1 1\\r\\n\", \"output\": [\"7 9\"]}, {\"input\": \"33\\r\\n30274 12228 26670 31244 5457 2643 27275 4380 30954 23407 8387 6669 25229 31591 27518 30261 25670 20962 31316 8992 8324 26216 10812 28467 15401 23077 10311 24975 14046 12010 11406 22841 7593\\r\\n\", \"output\": [\"299163 327443\"]}, {\"input\": \"3\\r\\n4 2 1\\r\\n\", \"output\": [\"2 5\"]}, {\"input\": \"3\\r\\n10 5 5\\r\\n\", \"output\": [\"5 15\"]}, {\"input\": \"6\\r\\n6 5 4 3 2 1\\r\\n\", \"output\": [\"9 12\"]}, {\"input\": \"4\\r\\n5 2 7 3\\r\\n\", \"output\": [\"7 10\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '47\\r\\n53046 58090 55185 8100 43578 1253 7226 13049 75567 73065 19920 48836 28243 45633 75475 74628 11853 68351 90922 89500 81315 71161 34816 49875 82337 2727 27746 37878 79833 24423 75618 82065 95614 82618 34391 1850 94056 57092 73115 70214 46067 29071 75947 46802 95807 42600 11211\\r\\n', 'output': ['1214201 1233568']}, {'input': '28\\r\\n70945 22563 76598 21753 4558 39341 48372 77054 52039 27522 75249 18459 96536 60264 5491 20125 42367 44118 42034 38665 47472 88410 66109 78995 52147 68436 9814 71112\\r\\n', 'output': ['669482 697066']}, {'input': '15\\r\\n13046 83844 14823 64255 15301 90234 84972 93547 88028 11665 54415 13159 83950 951 42336\\r\\n', 'output': ['362168 392358']}, {'input': '27\\r\\n54817 73719 96044 92275 12201 60564 84901 25770 17884 90636 14810 82907 20637 58023 10976 72208 94644 63856 11312 74424 26828 40632 58600 37316 38290 82420 48297\\r\\n', 'output': ['716531 728460']}, {'input': '6\\r\\n5245 1414 21632 12159 31783 7412\\r\\n', 'output': ['38442 41203']}]","human_sample_testcases_2":"[{'input': '49\\r\\n19894 55779 73188 99759 17893 50295 8089 81025 76582 81429 73503 35619 61128 41603 40313 3166 31490 87660 19662 59197 8812 75229 25642 65938 42755 31656 16188 87599 51562 91460 38262 11118 90596 69482 71313 66858 87707 17242 14886 93539 35164 32596 83317 72606 12185 21664 80642 72099 7525\\r\\n', 'output': ['1233007 1259909']}, {'input': '45\\r\\n53494 93105 37182 24953 1967 43700 39068 12369 7256 64700 31744 62052 84959 49662 34829 78793 51000 16339 29478 52506 96922 75606 52501 1109 21919 6503 72007 63964 75400 24682 45678 18420 67928 87241 73278 69545 24596 29646 65936 55401 89673 49738 35873 45189 3622\\r\\n', 'output': ['1052557 1068976']}, {'input': '30\\r\\n2351 14876 66138 87327 29940 73204 19925 50198 13441 54751 1383 92120 90236 13525 3920 16669 80637 94428 54890 71321 77670 57080 82145 39778 69967 38722 46902 82127 1142 21792\\r\\n', 'output': ['724302 724303']}, {'input': '7\\r\\n92387 35422 24898 32532 92988 84636 99872\\r\\n', 'output': ['192724 270011']}, {'input': '48\\r\\n69174 6934 59931 70281 68640 47326 3402 64333 42426 77247 13063 8579 61038 39362 2694 22545 83767 15909 88940 86445 45063 27451 18133 91555 28898 45640 21967 62738 61441 24293 19036 68144 5201 26050 69204 29154 85681 19871 60352 36133 86359 47186 74432 5448 53996 27876 58022 80559\\r\\n', 'output': ['1096672 1115247']}]","human_sample_testcases_3":"[{'input': '30\\r\\n2351 14876 66138 87327 29940 73204 19925 50198 13441 54751 1383 92120 90236 13525 3920 16669 80637 94428 54890 71321 77670 57080 82145 39778 69967 38722 46902 82127 1142 21792\\r\\n', 'output': ['724302 724303']}, {'input': '25\\r\\n87969 76030 78041 616 13694 11522 84038 25090 16869 14975 61226 96124 20457 62052 70329 76374 42303 11844 15276 37430 99330 77781 35069 64358 45168\\r\\n', 'output': ['586407 637558']}, {'input': '43\\r\\n86646 19609 43370 33293 3460 94658 95101 44393 6241 56335 78161 66757 52074 53692 2695 58767 31363 64326 738 15513 69425 4242 28971 60855 37309 53382 16269 57346 70968 90350 74522 22072 83345 67672 69060 4537 55137 78008 91461 32075 33280 70405 71607\\r\\n', 'output': ['1039942 1109548']}, {'input': '21\\r\\n21569 37548 74739 25809 65063 37631 71913 89138 47543 65542 10956 14045 78880 70111 73357 27810 70326 40523 899 6547 87440\\r\\n', 'output': ['506467 510922']}, {'input': '44\\r\\n70070 68453 23924 95475 52714 73435 34380 61085 40396 60518 38601 26501 52165 47421 73018 6684 79085 68781 31460 88265 33173 52020 44992 2534 8062 96295 77786 39103 85280 24812 93748 75446 92932 11105 71169 66433 89866 75379 11402 22186 73572 31624 70092 10734\\r\\n', 'output': ['1141992 1210184']}]","human_sample_testcases_4":"[{'input': '8\\r\\n8515 51563 5451 94713 9537 30709 63343 41819\\r\\n', 'output': ['138409 167241']}, {'input': '9\\r\\n91939 407 10197 24191 58791 9486 68030 25807 11\\r\\n', 'output': ['102429 186430']}, {'input': '40\\r\\n3670 5779 20621 87964 12595 34136 98063 92429 38366 43789 88330 52934 19100 22776 43342 82312 74404 64756 73980 14278 21283 85101 63339 70409 63034 14245 33606 58571 84927 14931 25355 15452 46072 4671 5838 69121 18243 87783 29748 84047\\r\\n', 'output': ['909877 959523']}, {'input': '48\\r\\n69174 6934 59931 70281 68640 47326 3402 64333 42426 77247 13063 8579 61038 39362 2694 22545 83767 15909 88940 86445 45063 27451 18133 91555 28898 45640 21967 62738 61441 24293 19036 68144 5201 26050 69204 29154 85681 19871 60352 36133 86359 47186 74432 5448 53996 27876 58022 80559\\r\\n', 'output': ['1096672 1115247']}, {'input': '45\\r\\n53494 93105 37182 24953 1967 43700 39068 12369 7256 64700 31744 62052 84959 49662 34829 78793 51000 16339 29478 52506 96922 75606 52501 1109 21919 6503 72007 63964 75400 24682 45678 18420 67928 87241 73278 69545 24596 29646 65936 55401 89673 49738 35873 45189 3622\\r\\n', 'output': ['1052557 1068976']}]","human_sample_testcases_5":"[{'input': '45\\r\\n53494 93105 37182 24953 1967 43700 39068 12369 7256 64700 31744 62052 84959 49662 34829 78793 51000 16339 29478 52506 96922 75606 52501 1109 21919 6503 72007 63964 75400 24682 45678 18420 67928 87241 73278 69545 24596 29646 65936 55401 89673 49738 35873 45189 3622\\r\\n', 'output': ['1052557 1068976']}, {'input': '13\\r\\n13494 86155 96820 72596 40986 99976 16813 25571 87013 3301 832 26376 83769\\r\\n', 'output': ['325890 327812']}, {'input': '33\\r\\n30274 12228 26670 31244 5457 2643 27275 4380 30954 23407 8387 6669 25229 31591 27518 30261 25670 20962 31316 8992 8324 26216 10812 28467 15401 23077 10311 24975 14046 12010 11406 22841 7593\\r\\n', 'output': ['299163 327443']}, {'input': '33\\r\\n87531 27423 55960 53829 37771 40665 39138 12849 77399 53025 71350 83793 48271 59887 41997 74854 14919 24175 43637 24327 13733 38978 2959 319 10086 26876 65393 56332 68025 63623 93732 68354 83938\\r\\n', 'output': ['741185 823963']}, {'input': '3\\r\\n100 90 80\\r\\n', 'output': ['90 180']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":47,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1 3 2 0\", \"7\\n1 3 3 2 1 2 3\", \"2\\n2 2\"]","input_specification":"The first line contains a positive integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the number of days of Vasya's vacations. The second line contains the sequence of integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u20093) separated by space, where: ai equals 0, if on the i-th day of vacations the gym is closed and the contest is not carried out; ai equals 1, if on the i-th day of vacations the gym is closed, but the contest is carried out; ai equals 2, if on the i-th day of vacations the gym is open and the contest is not carried out; ai equals 3, if on the i-th day of vacations the gym is open and the contest is carried out.","src_uid":"08f1ba79ced688958695a7cfcfdda035","source_code":"\/\/DURING CONTEST: http:\/\/www.codeforces.com\/contest\/699\/submission\/19246509\n\n#include \n#include \nint main() {\n \/**\n * Variables are stored as follows:\n * whatWeCouldDoYesterday -- data & 0b11\n * whatWeCanDoToday -- (data & 0b1100) >> 2\n * answer -- (data & 0xff00) >> 8\n * numDays -- (data & 0xff0000) >> 16\n * todayCode -- (data & 0xff000000) >> 24\n *\/\n \n \/\/whatWeDidYesterday = whatWeCanDoToday = answer = numDays = todayCode = 0;\n uint32_t data = 0;\n \/\/scanf(\"%i\", &numDays);\n scanf(\"%hhi\", ((signed char*)&data)+2);\n \/\/whatWeCouldDoYesterday = 3;\n data += 3;\n \/\/while ((numDays -= 1), numDays+1) {\n while ((data -= 0x10000), ((data+0x10000) & 0xff0000) >> 16) {\n \/\/scanf(\"%i\", &todayCode);\n scanf(\"%hhi\", ((signed char*)&data)+3);\n \/\/if ((whatWeCouldDoYesterday & 2) && (todayCode & 1)) whatWeCanDoToday += 1;\n if ((data & 2) && (data & 0x1000000) >> 24) data += 1 << 2;\n \/\/if ((whatWeCouldDoYesterday & 1) && (todayCode & 2)) whatWeCanDoToday += 2;\n if ((data & 1) && (data & 0x2000000) >> 24) data += 2 << 2;\n \/\/if (!whatWeCanDoToday) answer += 1, whatWeCanDoToday = 3;\n if (!(data & 0b1100)) data += 1 << 8, data += 3 << 2;\n \/\/whatWeCouldDoYesterday = whatWeCanDoToday, whatWeCanDoToday = 0;\n *((signed char*)&data) >>= 2;\n }\n \/\/printf(\"%i\\n\", answer);\n printf(\"%li\\n\", (data & 0xff00) >> 8);\n}","sample_outputs":"[\"2\", \"0\", \"1\"]","lang_cluster":"C","notes":"NoteIn the first test Vasya can write the contest on the day number 1 and do sport on the day number 3. Thus, he will have a rest for only 2 days.In the second test Vasya should write contests on days number 1, 3, 5 and 7, in other days do sport. Thus, he will not have a rest for a single day.In the third test Vasya can do sport either on a day number 1 or number 2. He can not do sport in two days, because it will be contrary to the his limitation. Thus, he will have a rest for only one day.","output_specification":"Print the minimum possible number of days on which Vasya will have a rest. Remember that Vasya refuses: to do sport on any two consecutive days, to write the contest on any two consecutive days. ","description":"Vasya has n days of vacations! So he decided to improve his IT skills and do sport. Vasya knows the following information about each of this n days: whether that gym opened and whether a contest was carried out in the Internet on that day. For the i-th day there are four options: on this day the gym is closed and the contest is not carried out; on this day the gym is closed and the contest is carried out; on this day the gym is open and the contest is not carried out; on this day the gym is open and the contest is carried out. On each of days Vasya can either have a rest or write the contest (if it is carried out on this day), or do sport (if the gym is open on this day).Find the minimum number of days on which Vasya will have a rest (it means, he will not do sport and write the contest at the same time). The only limitation that Vasya has \u2014 he does not want to do the same activity on two consecutive days: it means, he will not do sport on two consecutive days, and write the contest on two consecutive days.","human_testcases":"[{\"input\": \"4\\r\\n1 3 2 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\n1 3 3 2 1 2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n0 0 1 1 0 0 0 0 1 0\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n3 2 3 3 3 2 3 1 3 2 2 3 2 3 3 3 3 3 3 1 2 2 3 1 3 3 2 2 2 3 1 0 3 3 3 2 3 3 1 1 3 1 3 3 3 1 3 1 3 0 1 3 2 3 2 1 1 3 2 3 3 3 2 3 1 3 3 3 3 2 2 2 1 3 1 3 3 3 3 1 3 2 3 3 0 3 3 3 3 3 1 0 2 1 3 3 0 2 3 3\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"10\\r\\n2 3 0 1 3 1 2 2 1 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"45\\r\\n3 3 2 3 2 3 3 3 0 3 3 3 3 3 3 3 1 3 2 3 2 3 2 2 2 3 2 3 3 3 3 3 1 2 3 3 2 2 2 3 3 3 3 1 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n1 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n0 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n3 3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n3 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n0 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n2 2 3 3 3 3 2 1 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"15\\r\\n0 1 0 0 0 2 0 1 0 0 0 2 0 0 0\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"15\\r\\n1 3 2 2 2 3 3 3 3 2 3 2 2 1 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"15\\r\\n3 1 3 2 3 2 2 2 3 3 3 3 2 3 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"20\\r\\n0 2 0 1 0 0 0 1 2 0 1 1 1 0 1 1 0 1 1 0\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"20\\r\\n2 3 2 3 3 3 3 2 0 3 1 1 2 3 0 3 2 3 0 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"20\\r\\n3 3 3 3 2 3 3 2 1 3 3 2 2 2 3 2 2 2 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"25\\r\\n0 0 1 0 0 1 0 0 1 0 0 1 0 2 0 0 2 0 0 1 0 2 0 1 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"25\\r\\n1 3 3 2 2 3 3 3 3 3 1 2 2 3 2 0 2 1 0 1 3 2 2 3 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"25\\r\\n2 3 1 3 3 2 1 3 3 3 1 3 3 1 3 2 3 3 1 3 3 3 2 3 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"30\\r\\n0 0 1 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 2 0 0 1 1 2 0 0 0\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"30\\r\\n1 1 3 2 2 0 3 2 3 3 1 2 0 1 1 2 3 3 2 3 1 3 2 3 0 2 0 3 3 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30\\r\\n1 2 3 2 2 3 3 3 3 3 3 3 3 3 3 1 2 2 3 2 3 3 3 2 1 3 3 3 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"35\\r\\n0 1 1 0 0 2 0 0 1 0 0 0 1 0 1 0 1 0 0 0 1 2 1 0 2 2 1 0 1 0 1 1 1 0 0\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"35\\r\\n2 2 0 3 2 2 0 3 3 1 1 3 3 1 2 2 0 2 2 2 2 3 1 0 2 1 3 2 2 3 2 3 3 1 2\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"35\\r\\n1 2 2 3 3 3 3 3 2 2 3 3 2 3 3 2 3 2 3 3 2 2 2 3 3 2 3 3 3 1 3 3 2 2 2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"40\\r\\n2 0 1 1 0 0 0 0 2 0 1 1 1 0 0 1 0 0 0 0 0 2 0 0 0 2 1 1 1 3 0 0 0 0 0 0 0 1 1 0\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"40\\r\\n2 2 3 2 0 2 3 2 1 2 3 0 2 3 2 1 1 3 1 1 0 2 3 1 3 3 1 1 3 3 2 2 1 3 3 3 2 3 3 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"40\\r\\n1 3 2 3 3 2 3 3 2 2 3 1 2 1 2 2 3 1 2 2 1 2 2 2 1 2 2 3 2 3 2 3 2 3 3 3 1 3 2 3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"45\\r\\n2 1 0 0 0 2 1 0 1 0 0 2 2 1 1 0 0 2 0 0 0 0 0 0 1 0 0 2 0 0 1 1 0 0 1 0 0 1 1 2 0 0 2 0 2\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"45\\r\\n3 3 2 3 3 3 2 2 3 2 3 1 3 2 3 2 2 1 1 3 2 3 2 1 3 1 2 3 2 2 0 3 3 2 3 2 3 2 3 2 0 3 1 1 3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"50\\r\\n3 0 0 0 2 0 0 0 0 0 0 0 2 1 0 2 0 1 0 1 3 0 2 1 1 0 0 1 1 0 0 1 2 1 1 2 1 1 0 0 0 0 0 0 0 1 2 2 0 0\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"50\\r\\n3 3 3 3 1 0 3 3 0 2 3 1 1 1 3 2 3 3 3 3 3 1 0 1 2 2 3 3 2 3 0 0 0 2 1 0 1 2 2 2 2 0 2 2 2 1 2 3 3 2\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"50\\r\\n3 2 3 1 2 1 2 3 3 2 3 3 2 1 3 3 3 3 3 3 2 3 2 3 2 2 3 3 3 2 3 3 3 3 2 3 1 2 3 3 2 3 3 1 2 2 1 1 3 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"55\\r\\n0 0 1 1 0 1 0 0 1 0 1 0 0 0 2 0 0 1 0 0 0 1 0 0 0 0 3 1 0 0 0 1 0 0 0 0 2 0 0 0 2 0 2 1 0 0 0 0 0 0 0 0 2 0 0\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"55\\r\\n3 0 3 3 3 2 0 2 3 0 3 2 3 3 0 3 3 1 3 3 1 2 3 2 0 3 3 2 1 2 3 2 3 0 3 2 2 1 2 3 2 2 1 3 2 2 3 1 3 2 2 3 3 2 2\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"55\\r\\n3 3 1 3 2 3 2 3 2 2 3 3 3 3 3 1 1 3 3 2 3 2 3 2 0 1 3 3 3 3 2 3 2 3 1 1 2 2 2 3 3 3 3 3 2 2 2 3 2 3 3 3 3 1 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"60\\r\\n0 1 0 0 0 0 0 0 0 2 1 1 3 0 0 0 0 0 1 0 1 1 0 0 0 3 0 1 0 1 0 2 0 0 0 0 0 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"60\\r\\n3 2 1 3 2 2 3 3 3 1 1 3 2 2 3 3 1 3 2 2 3 3 2 2 2 2 0 2 2 3 2 3 0 3 3 3 2 3 3 0 1 3 2 1 3 1 1 2 1 3 1 1 2 2 1 3 3 3 2 2\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"60\\r\\n3 2 2 3 2 3 2 3 3 2 3 2 3 3 2 3 3 3 3 3 3 2 3 3 1 2 3 3 3 2 1 3 3 1 3 1 3 0 3 3 3 2 3 2 3 2 3 3 1 1 2 3 3 3 3 2 1 3 2 3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"65\\r\\n1 0 2 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 2 0 2 1 0 2 1 0 1 0 1 1 0 1 1 1 2 1 0 1 0 0 0 0 1 2 2 1 0 0 1 2 1 2 0 2 0 0 0 1 1\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"65\\r\\n2 2 2 3 0 2 1 2 3 3 1 3 1 2 1 3 2 3 2 2 2 1 2 0 3 1 3 1 1 3 1 3 3 3 3 3 1 3 0 3 1 3 1 2 2 3 2 0 3 1 3 2 1 2 2 2 3 3 2 3 3 3 2 2 3\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"65\\r\\n3 2 3 3 3 2 3 2 3 3 3 3 3 3 3 3 3 2 3 2 3 2 2 3 3 3 3 3 2 2 2 3 3 2 3 3 2 3 3 3 3 2 3 3 3 2 2 3 3 3 3 3 3 2 2 3 3 2 3 3 1 3 3 3 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"70\\r\\n1 0 0 0 1 0 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 0 0 1 1 1 3 1 1 0 1 2 0 2 1 0 0 0 1 1 1 1 1 0 0 1 0 0 0 1 1 1 3 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 1\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"70\\r\\n2 3 3 3 1 3 3 1 2 1 1 2 2 3 0 2 3 3 1 3 3 2 2 3 3 3 2 2 2 2 1 3 3 0 2 1 1 3 2 3 3 2 2 3 1 3 1 2 3 2 3 3 2 2 2 3 1 1 2 1 3 3 2 2 3 3 3 1 1 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"70\\r\\n3 3 2 2 1 2 1 2 2 2 2 2 3 3 2 3 3 3 3 2 2 2 2 3 3 3 1 3 3 3 2 3 3 3 3 2 3 3 1 3 1 3 2 3 3 2 3 3 3 2 3 2 3 3 1 2 3 3 2 2 2 3 2 3 3 3 3 3 3 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"75\\r\\n1 0 0 1 1 0 0 1 0 1 2 0 0 2 1 1 0 0 0 0 0 0 2 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 2 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"75\\r\\n1 3 3 3 1 1 3 2 3 3 1 3 3 3 2 1 3 2 2 3 1 1 1 1 1 1 2 3 3 3 3 3 3 2 3 3 3 3 3 2 3 3 2 2 2 1 2 3 3 2 2 3 0 1 1 3 3 0 0 1 1 3 2 3 3 3 3 1 2 2 3 3 3 3 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"75\\r\\n3 3 3 3 2 2 3 2 2 3 2 2 1 2 3 3 2 2 3 3 1 2 2 2 1 3 3 3 1 2 2 3 3 3 2 3 2 2 2 3 3 1 3 2 2 3 3 3 0 3 2 1 3 3 2 3 3 3 3 1 2 3 3 3 2 2 3 3 3 3 2 2 3 3 1\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"80\\r\\n0 0 0 0 2 0 1 1 1 1 1 0 0 0 0 2 0 0 1 0 0 0 0 1 1 0 2 2 1 1 0 1 0 1 0 1 1 1 0 1 2 1 1 0 0 0 1 1 0 1 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 2 2 0 1 1 0 0 0 0 0 0 0 0 1\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"80\\r\\n2 2 3 3 2 1 0 1 0 3 2 2 3 2 1 3 1 3 3 2 3 3 3 2 3 3 3 2 1 3 3 1 3 3 3 3 3 3 2 2 2 1 3 2 1 3 2 1 1 0 1 1 2 1 3 0 1 2 3 2 2 3 2 3 1 3 3 2 1 1 0 3 3 3 3 1 2 1 2 0\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"80\\r\\n2 3 3 2 2 2 3 3 2 3 3 3 3 3 2 3 2 3 2 3 3 3 3 3 3 3 3 3 2 3 1 3 2 3 3 0 3 1 2 3 3 1 2 3 2 3 3 2 3 3 3 3 3 2 2 3 0 3 3 3 3 3 2 2 3 2 3 3 3 3 3 2 3 2 3 3 3 3 2 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"85\\r\\n0 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 2 0 1 0 0 2 0 1 1 0 0 0 0 2 2 0 0 0 1 0 0 0 1 2 0 1 0 0 0 2 1 1 2 0 3 1 0 2 2 1 0 0 1 1 0 0 0 0 1 0 2 1 1 2 1 0 0 1 2 1 2 0 0 1 0 1 0\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"85\\r\\n2 3 1 3 2 3 1 3 3 2 1 2 1 2 2 3 2 2 3 2 0 3 3 2 1 2 2 2 3 3 2 3 3 3 2 1 1 3 1 3 2 2 2 3 3 2 3 2 3 1 1 3 2 3 1 3 3 2 3 3 2 2 3 0 1 1 2 2 2 2 1 2 3 1 3 3 1 3 2 2 3 2 3 3 3\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"85\\r\\n1 2 1 2 3 2 3 3 3 3 3 3 3 2 1 3 2 3 3 3 3 2 3 3 3 1 3 3 3 3 2 3 3 3 3 3 3 2 2 1 3 3 3 3 2 2 3 1 1 2 3 3 3 2 3 3 3 3 3 2 3 3 3 2 2 3 3 1 1 1 3 3 3 3 1 3 3 3 1 3 3 1 3 2 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"90\\r\\n2 0 1 0 0 0 0 0 0 1 1 2 0 0 0 0 0 0 0 2 2 0 2 0 0 2 1 0 2 0 1 0 1 0 0 1 2 2 0 0 1 0 0 1 0 1 0 2 0 1 1 1 0 1 1 0 1 0 2 0 1 0 1 0 0 0 1 0 0 1 2 0 0 0 1 0 0 2 2 0 0 0 0 0 1 3 1 1 0 1\\r\\n\", \"output\": [\"57\"]}, {\"input\": \"90\\r\\n2 3 3 3 2 3 2 1 3 0 3 2 3 3 2 1 3 3 2 3 2 3 3 2 1 3 1 3 3 1 2 2 3 3 2 1 2 3 2 3 0 3 3 2 2 3 1 0 3 3 1 3 3 3 3 2 1 2 2 1 3 2 1 3 3 1 2 0 2 2 3 2 2 3 3 3 1 3 2 1 2 3 3 2 3 2 3 3 2 1\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"90\\r\\n2 3 2 3 2 2 3 3 2 3 2 1 2 3 3 3 2 3 2 3 3 2 3 3 3 1 3 3 1 3 2 3 2 2 1 3 3 3 3 3 3 3 3 3 3 2 3 2 3 2 1 3 3 3 3 2 2 3 3 3 3 3 3 3 3 3 3 3 3 2 2 3 3 3 3 1 3 2 3 3 3 2 2 3 2 3 2 1 3 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"95\\r\\n0 0 3 0 2 0 1 0 0 2 0 0 0 0 0 0 0 1 0 0 0 2 0 0 0 0 0 1 0 0 2 1 0 0 1 0 0 0 1 0 0 0 0 1 0 1 0 0 1 0 1 2 0 1 2 2 0 0 1 0 2 0 0 0 1 0 2 1 2 1 0 1 0 0 0 1 0 0 1 1 2 1 1 1 1 2 0 0 0 0 0 1 1 0 1\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"95\\r\\n2 3 3 2 1 1 3 3 3 2 3 3 3 2 3 2 3 3 3 2 3 2 2 3 3 2 1 2 3 3 3 1 3 0 3 3 1 3 3 1 0 1 3 3 3 0 2 1 3 3 3 3 0 1 3 2 3 3 2 1 3 1 2 1 1 2 3 0 3 3 2 1 3 2 1 3 3 3 2 2 3 2 3 3 3 2 1 3 3 3 2 3 3 1 2\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"95\\r\\n2 3 3 2 3 2 2 1 3 1 2 1 2 3 1 2 3 3 1 3 3 3 1 2 3 2 2 2 2 3 3 3 2 2 3 3 3 3 3 1 2 2 3 3 3 3 2 3 2 2 2 3 3 2 3 3 3 3 3 3 3 0 3 2 0 3 3 1 3 3 3 2 3 2 3 2 3 3 3 3 2 2 1 1 3 3 3 3 3 1 3 3 3 3 2\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"100\\r\\n1 0 2 0 0 0 0 2 0 0 0 1 0 1 0 0 1 0 1 2 0 1 1 0 0 1 0 1 1 0 0 0 2 0 1 0 0 2 0 0 0 0 0 1 1 1 0 0 1 0 2 0 0 0 0 1 0 1 0 1 0 1 0 1 2 2 0 0 2 0 1 0 1 0 1 0 0 0 1 0 0 2 1 1 1 0 0 1 0 0 0 2 0 0 2 1 1 0 0 2\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"100\\r\\n3 2 1 3 2 3 2 3 2 2 3 1 3 3 3 3 3 2 2 3 2 2 3 2 3 3 3 2 3 1 2 1 3 3 3 3 1 3 3 3 3 3 2 3 2 1 3 3 1 2 2 3 1 3 3 1 2 2 1 3 1 3 2 2 3 3 1 3 2 3 1 2 1 2 3 3 2 2 1 2 3 3 3 3 3 1 3 3 3 3 2 1 3 0 3 3 3 2 3 3\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"100\\r\\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"100\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"99\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"100\\r\\n2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2\\r\\n0 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n2 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n3 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n3 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0 3 0\\r\\n\", \"output\": [\"50\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\\r\\n', 'output': ['0']}, {'input': '85\\r\\n1 2 1 2 3 2 3 3 3 3 3 3 3 2 1 3 2 3 3 3 3 2 3 3 3 1 3 3 3 3 2 3 3 3 3 3 3 2 2 1 3 3 3 3 2 2 3 1 1 2 3 3 3 2 3 3 3 3 3 2 3 3 3 2 2 3 3 1 1 1 3 3 3 3 1 3 3 3 1 3 3 1 3 2 3\\r\\n', 'output': ['9']}, {'input': '25\\r\\n0 0 1 0 0 1 0 0 1 0 0 1 0 2 0 0 2 0 0 1 0 2 0 1 1\\r\\n', 'output': ['16']}, {'input': '75\\r\\n1 0 0 1 1 0 0 1 0 1 2 0 0 2 1 1 0 0 0 0 0 0 2 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 2 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0\\r\\n', 'output': ['51']}, {'input': '80\\r\\n2 2 3 3 2 1 0 1 0 3 2 2 3 2 1 3 1 3 3 2 3 3 3 2 3 3 3 2 1 3 3 1 3 3 3 3 3 3 2 2 2 1 3 2 1 3 2 1 1 0 1 1 2 1 3 0 1 2 3 2 2 3 2 3 1 3 3 2 1 1 0 3 3 3 3 1 2 1 2 0\\r\\n', 'output': ['17']}]","human_sample_testcases_2":"[{'input': '25\\r\\n0 0 1 0 0 1 0 0 1 0 0 1 0 2 0 0 2 0 0 1 0 2 0 1 1\\r\\n', 'output': ['16']}, {'input': '75\\r\\n1 0 0 1 1 0 0 1 0 1 2 0 0 2 1 1 0 0 0 0 0 0 2 1 1 0 0 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 1 2 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0\\r\\n', 'output': ['51']}, {'input': '90\\r\\n2 3 2 3 2 2 3 3 2 3 2 1 2 3 3 3 2 3 2 3 3 2 3 3 3 1 3 3 1 3 2 3 2 2 1 3 3 3 3 3 3 3 3 3 3 2 3 2 3 2 1 3 3 3 3 2 2 3 3 3 3 3 3 3 3 3 3 3 3 2 2 3 3 3 3 1 3 2 3 3 3 2 2 3 2 3 2 1 3 2\\r\\n', 'output': ['9']}, {'input': '1\\r\\n3\\r\\n', 'output': ['0']}, {'input': '95\\r\\n2 3 3 2 3 2 2 1 3 1 2 1 2 3 1 2 3 3 1 3 3 3 1 2 3 2 2 2 2 3 3 3 2 2 3 3 3 3 3 1 2 2 3 3 3 3 2 3 2 2 2 3 3 2 3 3 3 3 3 3 3 0 3 2 0 3 3 1 3 3 3 2 3 2 3 2 3 3 3 3 2 2 1 1 3 3 3 3 3 1 3 3 3 3 2\\r\\n', 'output': ['14']}]","human_sample_testcases_3":"[{'input': '55\\r\\n3 3 1 3 2 3 2 3 2 2 3 3 3 3 3 1 1 3 3 2 3 2 3 2 0 1 3 3 3 3 2 3 2 3 1 1 2 2 2 3 3 3 3 3 2 2 2 3 2 3 3 3 3 1 3\\r\\n', 'output': ['7']}, {'input': '2\\r\\n1 1\\r\\n', 'output': ['1']}, {'input': '20\\r\\n2 3 2 3 3 3 3 2 0 3 1 1 2 3 0 3 2 3 0 3\\r\\n', 'output': ['5']}, {'input': '2\\r\\n2 2\\r\\n', 'output': ['1']}, {'input': '75\\r\\n3 3 3 3 2 2 3 2 2 3 2 2 1 2 3 3 2 2 3 3 1 2 2 2 1 3 3 3 1 2 2 3 3 3 2 3 2 2 2 3 3 1 3 2 2 3 3 3 0 3 2 1 3 3 2 3 3 3 3 1 2 3 3 3 2 2 3 3 3 3 2 2 3 3 1\\r\\n', 'output': ['11']}]","human_sample_testcases_4":"[{'input': '4\\r\\n1 3 2 0\\r\\n', 'output': ['2']}, {'input': '95\\r\\n2 3 3 2 3 2 2 1 3 1 2 1 2 3 1 2 3 3 1 3 3 3 1 2 3 2 2 2 2 3 3 3 2 2 3 3 3 3 3 1 2 2 3 3 3 3 2 3 2 2 2 3 3 2 3 3 3 3 3 3 3 0 3 2 0 3 3 1 3 3 3 2 3 2 3 2 3 3 3 3 2 2 1 1 3 3 3 3 3 1 3 3 3 3 2\\r\\n', 'output': ['14']}, {'input': '2\\r\\n3 3\\r\\n', 'output': ['0']}, {'input': '2\\r\\n1 3\\r\\n', 'output': ['0']}, {'input': '30\\r\\n1 2 3 2 2 3 3 3 3 3 3 3 3 3 3 1 2 2 3 2 3 3 3 2 1 3 3 3 1 3\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '10\\r\\n0 0 1 1 0 0 0 0 1 0\\r\\n', 'output': ['8']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['50']}, {'input': '2\\r\\n3 2\\r\\n', 'output': ['0']}, {'input': '4\\r\\n1 3 2 0\\r\\n', 'output': ['2']}, {'input': '80\\r\\n2 3 3 2 2 2 3 3 2 3 3 3 3 3 2 3 2 3 2 3 3 3 3 3 3 3 3 3 2 3 1 3 2 3 3 0 3 1 2 3 3 1 2 3 2 3 3 2 3 3 3 3 3 2 2 3 0 3 3 3 3 3 2 2 3 2 3 3 3 3 3 2 3 2 3 3 3 3 2 3\\r\\n', 'output': ['9']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":48,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1990 1\", \"300 0\", \"1034 2\", \"9090000078001234 6\"]","input_specification":"The single line contains two integers a and k (1\u2009\u2264\u2009a\u2009\u2264\u20091018;\u00a00\u2009\u2264\u2009k\u2009\u2264\u2009100).","src_uid":"e56f6c343167745821f0b18dcf0d0cde","source_code":"#include\n#include\nint main()\n{\n\tchar a[500],temp,max;\n\tint c,n,i,j,k,x,f=1,h=4,m;\n\tscanf(\"%s\",a);\n\tscanf(\"%d\",&k);\n\tc=0;\n\tn=strlen(a);\n\twhile(c!=n)\n\t{\n\t\tmax='0';\n\t\tfor(j=c;jmax)\n\t\t\t{\n\t\t\t\tmax=a[j];\n\t\t\t\tx=j;\n\t\t\t}\n\t\t}\n\t\tfor(j=x;j>c;j--)\n\t\t{\n\t\t\t\/*if(c==x)\t\t\n\t\t\tbreak;*\/\n\t\t\tif(k==0)\n\t\t\t{\n\t\t\t\tf=0;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttemp=a[j-1];\n\t\t\ta[j-1]=a[j];\n\t\t\ta[j]=temp;\n\t\t\tk--;\n\t\t}\n\t\tc++;\n\t\/\/\tprintf(\"%d \",k);\n\t\tif(f==0)\n\t\tbreak;\n\t}\n\tprintf(\"%s\",a);\n\treturn 0;\n}\n\t\t\n","sample_outputs":"[\"9190\", \"300\", \"3104\", \"9907000008001234\"]","lang_cluster":"C","notes":null,"output_specification":"Print the maximum number that Pasha can get if he makes at most k swaps.","description":"Pasha has a positive integer a without leading zeroes. Today he decided that the number is too small and he should make it larger. Unfortunately, the only operation Pasha can do is to swap two adjacent decimal digits of the integer.Help Pasha count the maximum number he can get if he has the time to make at most k swaps.","human_testcases":"[{\"input\": \"1990 1\\r\\n\", \"output\": [\"9190\"]}, {\"input\": \"300 0\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"1034 2\\r\\n\", \"output\": [\"3104\"]}, {\"input\": \"9090000078001234 6\\r\\n\", \"output\": [\"9907000008001234\"]}, {\"input\": \"1234 3\\r\\n\", \"output\": [\"4123\"]}, {\"input\": \"5 100\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1234 5\\r\\n\", \"output\": [\"4312\"]}, {\"input\": \"1234 6\\r\\n\", \"output\": [\"4321\"]}, {\"input\": \"9022 2\\r\\n\", \"output\": [\"9220\"]}, {\"input\": \"66838 4\\r\\n\", \"output\": [\"86863\"]}, {\"input\": \"39940894417248510 10\\r\\n\", \"output\": [\"99984304417248510\"]}, {\"input\": \"5314 4\\r\\n\", \"output\": [\"5431\"]}, {\"input\": \"1026 9\\r\\n\", \"output\": [\"6210\"]}, {\"input\": \"4529 8\\r\\n\", \"output\": [\"9542\"]}, {\"input\": \"83811284 3\\r\\n\", \"output\": [\"88321184\"]}, {\"input\": \"92153348 6\\r\\n\", \"output\": [\"98215334\"]}, {\"input\": \"5846059 3\\r\\n\", \"output\": [\"8654059\"]}, {\"input\": \"521325125110071928 4\\r\\n\", \"output\": [\"552132125110071928\"]}, {\"input\": \"39940894417248510 10\\r\\n\", \"output\": [\"99984304417248510\"]}, {\"input\": \"77172428736634377 29\\r\\n\", \"output\": [\"87777764122363437\"]}, {\"input\": \"337775999910796051 37\\r\\n\", \"output\": [\"999997733751076051\"]}, {\"input\": \"116995340392134308 27\\r\\n\", \"output\": [\"999654331120134308\"]}, {\"input\": \"10120921290110921 20\\r\\n\", \"output\": [\"99221010120110921\"]}, {\"input\": \"929201010190831892 30\\r\\n\", \"output\": [\"999928201010103182\"]}, {\"input\": \"111111111111111119 8\\r\\n\", \"output\": [\"111111111911111111\"]}, {\"input\": \"219810011901120912 100\\r\\n\", \"output\": [\"999822211111110000\"]}, {\"input\": \"191919191919119911 100\\r\\n\", \"output\": [\"999999991111111111\"]}, {\"input\": \"801211288881101019 22\\r\\n\", \"output\": [\"982111028888110101\"]}, {\"input\": \"619911311932347059 3\\r\\n\", \"output\": [\"969111311932347059\"]}, {\"input\": \"620737553540689123 2\\r\\n\", \"output\": [\"672037553540689123\"]}, {\"input\": \"621563797296514835 3\\r\\n\", \"output\": [\"662153797296514835\"]}, {\"input\": \"915277434701161 9\\r\\n\", \"output\": [\"977541234701161\"]}, {\"input\": \"15603712376708 28\\r\\n\", \"output\": [\"87761503123670\"]}, {\"input\": \"784069392990841 0\\r\\n\", \"output\": [\"784069392990841\"]}, {\"input\": \"787464780004 2\\r\\n\", \"output\": [\"877644780004\"]}, {\"input\": \"74604713975 29\\r\\n\", \"output\": [\"97776544310\"]}, {\"input\": \"901000000954321789 5\\r\\n\", \"output\": [\"910009000054321789\"]}, {\"input\": \"901000000954321789 10\\r\\n\", \"output\": [\"991000000504321789\"]}, {\"input\": \"901000000954321789 28\\r\\n\", \"output\": [\"999100050000432178\"]}, {\"input\": \"901000000954321789 40\\r\\n\", \"output\": [\"999810000050043217\"]}, {\"input\": \"901000000954321789 70\\r\\n\", \"output\": [\"999875410000300021\"]}, {\"input\": \"1234567891234567 99\\r\\n\", \"output\": [\"9877665544332211\"]}, {\"input\": \"123456789123456789 100\\r\\n\", \"output\": [\"998877665544213123\"]}, {\"input\": \"12345670123456789 100\\r\\n\", \"output\": [\"98776655443322101\"]}, {\"input\": \"12 100\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"11223344556677889 47\\r\\n\", \"output\": [\"98821213344556677\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '92153348 6\\r\\n', 'output': ['98215334']}, {'input': '801211288881101019 22\\r\\n', 'output': ['982111028888110101']}, {'input': '66838 4\\r\\n', 'output': ['86863']}, {'input': '620737553540689123 2\\r\\n', 'output': ['672037553540689123']}, {'input': '10120921290110921 20\\r\\n', 'output': ['99221010120110921']}]","human_sample_testcases_2":"[{'input': '10120921290110921 20\\r\\n', 'output': ['99221010120110921']}, {'input': '901000000954321789 70\\r\\n', 'output': ['999875410000300021']}, {'input': '5846059 3\\r\\n', 'output': ['8654059']}, {'input': '11223344556677889 47\\r\\n', 'output': ['98821213344556677']}, {'input': '1034 2\\r\\n', 'output': ['3104']}]","human_sample_testcases_3":"[{'input': '901000000954321789 40\\r\\n', 'output': ['999810000050043217']}, {'input': '901000000954321789 5\\r\\n', 'output': ['910009000054321789']}, {'input': '1034 2\\r\\n', 'output': ['3104']}, {'input': '15603712376708 28\\r\\n', 'output': ['87761503123670']}, {'input': '5 100\\r\\n', 'output': ['5']}]","human_sample_testcases_4":"[{'input': '801211288881101019 22\\r\\n', 'output': ['982111028888110101']}, {'input': '4529 8\\r\\n', 'output': ['9542']}, {'input': '5314 4\\r\\n', 'output': ['5431']}, {'input': '11223344556677889 47\\r\\n', 'output': ['98821213344556677']}, {'input': '10120921290110921 20\\r\\n', 'output': ['99221010120110921']}]","human_sample_testcases_5":"[{'input': '300 0\\r\\n', 'output': ['300']}, {'input': '74604713975 29\\r\\n', 'output': ['97776544310']}, {'input': '77172428736634377 29\\r\\n', 'output': ['87777764122363437']}, {'input': '784069392990841 0\\r\\n', 'output': ['784069392990841']}, {'input': '15603712376708 28\\r\\n', 'output': ['87761503123670']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.89,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":88.89,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":85.71,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":85.71,"human_sample_branch_coverage_5":85.71,"id":49,"human_sample_pass_rate":100.0,"human_sample_line_coverage":93.334,"human_sample_branch_coverage":91.426} {"sample_inputs":"[\"5 2\", \"7 4\"]","input_specification":"The single line contains two space-separated integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u20091000,\u20091\u2009\u2264\u2009k\u2009\u2264\u2009min(8,\u2009n)) \u2014 the number of the houses and the number k from the statement.","src_uid":"cc838bc14408f14f984a349fea9e9694","source_code":"#include\nmain()\n{\n long long i=1000000007;\n long long n,k,j;\n scanf(\"%lld%lld\",&n,&k);\n long long x=n-k,m=1,y=1;\n for(j=1;j<=x;j++)\n m=(m*x)%i;\n for(j=1;j\n#include \n#include \n\n#define MAX 1000010\n#define clr(ar) memset(ar, 0, sizeof(ar))\n#define read() freopen(\"lol.txt\", \"r\", stdin)\n\nlong long len, n, m, k, x, y;\nlong long X[MAX], Y[MAX], counter[1010][1010];\n\nint main(){\n long long i, j, v, min_v, max_v;\n\n while (scanf(\"%lld %lld %lld %lld %lld\", &n, &m, &k, &x, &y) != EOF){\n len = 0;\n clr(counter);\n for (i = 1; i < n; i++){\n for (j = 1; j <= m; j++){\n X[len] = i, Y[len++] = j;\n }\n }\n for (i = n; i > 1; i--){\n for (j = 1; j <= m; j++){\n X[len] = i, Y[len++] = j;\n }\n }\n\n if (n == 1){\n for (i = 1; i <= m; i++) X[len] = 1, Y[len++] = i;\n }\n\n for (i = 0; i < len; i++) counter[X[i]][Y[i]] += (k \/ len);\n k %= len;\n for (i = 0; i < k; i++) counter[X[i]][Y[i]]++;\n\n min_v = max_v = counter[1][1];\n for (i = 1; i <= n; i++){\n for (j = 1; j <= m; j++){\n if (counter[i][j] < min_v) min_v = counter[i][j];\n if (counter[i][j] > max_v) max_v = counter[i][j];\n }\n }\n\n printf(\"%lld %lld %lld\\n\", max_v, min_v, counter[x][y]);\n }\n return 0;\n}\n","sample_outputs":"[\"3 2 3\", \"2 1 1\", \"1 1 1\", \"101010101010101 50505050505051 50505050505051\"]","lang_cluster":"C","notes":"NoteThe order of asking pupils in the first test: the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; the pupil from the first row who seats at the third table; the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; the pupil from the first row who seats at the third table; the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; The order of asking pupils in the second test: the pupil from the first row who seats at the first table; the pupil from the first row who seats at the second table; the pupil from the second row who seats at the first table; the pupil from the second row who seats at the second table; the pupil from the third row who seats at the first table; the pupil from the third row who seats at the second table; the pupil from the fourth row who seats at the first table; the pupil from the fourth row who seats at the second table, it means it is Sergei; the pupil from the third row who seats at the first table; ","output_specification":"Print three integers: the maximum number of questions a particular pupil is asked, the minimum number of questions a particular pupil is asked, how many times the teacher asked Sergei. ","description":"On the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.Seating in the class looks like a rectangle, where n rows with m pupils in each. The teacher asks pupils in the following order: at first, she asks all pupils from the first row in the order of their seating, then she continues to ask pupils from the next row. If the teacher asked the last row, then the direction of the poll changes, it means that she asks the previous row. The order of asking the rows looks as follows: the 1-st row, the 2-nd row, ..., the n\u2009-\u20091-st row, the n-th row, the n\u2009-\u20091-st row, ..., the 2-nd row, the 1-st row, the 2-nd row, ...The order of asking of pupils on the same row is always the same: the 1-st pupil, the 2-nd pupil, ..., the m-th pupil.During the lesson the teacher managed to ask exactly k questions from pupils in order described above. Sergei seats on the x-th row, on the y-th place in the row. Sergei decided to prove to the teacher that pupils are asked irregularly, help him count three values: the maximum number of questions a particular pupil is asked, the minimum number of questions a particular pupil is asked, how many times the teacher asked Sergei. If there is only one row in the class, then the teacher always asks children from this row.","human_testcases":"[{\"input\": \"1 3 8 1 1\\r\\n\", \"output\": [\"3 2 3\", \"3 2 3\"]}, {\"input\": \"4 2 9 4 2\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"5 5 25 4 3\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"100 100 1000000000000000000 100 100\\r\\n\", \"output\": [\"101010101010101 50505050505051 50505050505051\"]}, {\"input\": \"3 2 15 2 2\\r\\n\", \"output\": [\"4 2 3\"]}, {\"input\": \"4 1 8 3 1\\r\\n\", \"output\": [\"3 1 2\"]}, {\"input\": \"3 2 8 2 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"4 2 9 4 1\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"1 3 7 1 1\\r\\n\", \"output\": [\"3 2 3\", \"3 2 3\"]}, {\"input\": \"2 2 8 2 1\\r\\n\", \"output\": [\"2 2 2\"]}, {\"input\": \"3 1 6 2 1\\r\\n\", \"output\": [\"3 1 3\"]}, {\"input\": \"5 6 30 5 4\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"3 8 134010 3 4\\r\\n\", \"output\": [\"8376 4188 4188\"]}, {\"input\": \"10 10 25 5 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"100 100 1000000000 16 32\\r\\n\", \"output\": [\"101011 50505 101010\"]}, {\"input\": \"100 100 1 23 39\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 1 1000000000 1 1\\r\\n\", \"output\": [\"1000000000 1000000000 1000000000\", \"1000000000 1000000000 1000000000\"]}, {\"input\": \"1 1 1 1 1\\r\\n\", \"output\": [\"1 1 1\", \"1 1 1\"]}, {\"input\": \"47 39 1772512 1 37\\r\\n\", \"output\": [\"989 494 495\"]}, {\"input\": \"37 61 421692 24 49\\r\\n\", \"output\": [\"192 96 192\"]}, {\"input\": \"89 97 875341288 89 96\\r\\n\", \"output\": [\"102547 51273 51274\"]}, {\"input\": \"100 1 1000000000000 100 1\\r\\n\", \"output\": [\"10101010101 5050505051 5050505051\"]}, {\"input\": \"1 100 1000000000000 1 100\\r\\n\", \"output\": [\"10000000000 10000000000 10000000000\", \"10000000000 10000000000 10000000000\"]}, {\"input\": \"2 4 6 1 4\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"2 4 6 1 3\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"2 4 49 1 1\\r\\n\", \"output\": [\"7 6 7\"]}, {\"input\": \"3 3 26 1 1\\r\\n\", \"output\": [\"4 2 3\"]}, {\"input\": \"5 2 77 4 2\\r\\n\", \"output\": [\"10 5 10\"]}, {\"input\": \"2 5 73 2 3\\r\\n\", \"output\": [\"8 7 7\"]}, {\"input\": \"5 2 81 5 1\\r\\n\", \"output\": [\"10 5 5\"]}, {\"input\": \"4 5 93 1 2\\r\\n\", \"output\": [\"6 3 4\"]}, {\"input\": \"4 4 74 4 1\\r\\n\", \"output\": [\"6 3 3\"]}, {\"input\": \"5 3 47 2 1\\r\\n\", \"output\": [\"4 2 4\"]}, {\"input\": \"5 4 61 1 1\\r\\n\", \"output\": [\"4 2 2\"]}, {\"input\": \"4 4 95 1 1\\r\\n\", \"output\": [\"8 4 4\"]}, {\"input\": \"2 5 36 1 3\\r\\n\", \"output\": [\"4 3 4\"]}, {\"input\": \"5 2 9 5 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"4 1 50 1 1\\r\\n\", \"output\": [\"17 8 9\"]}, {\"input\": \"3 2 83 1 2\\r\\n\", \"output\": [\"21 10 11\"]}, {\"input\": \"3 5 88 1 5\\r\\n\", \"output\": [\"9 4 5\"]}, {\"input\": \"4 2 89 1 2\\r\\n\", \"output\": [\"15 7 8\"]}, {\"input\": \"2 1 1 1 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"5 3 100 2 1\\r\\n\", \"output\": [\"9 4 9\"]}, {\"input\": \"4 4 53 3 1\\r\\n\", \"output\": [\"5 2 4\"]}, {\"input\": \"4 3 1 3 3\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 5 1 2 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"5 2 2 4 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 3 1 3 2\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 1 100 1 1\\r\\n\", \"output\": [\"100 100 100\", \"100 100 100\"]}, {\"input\": \"4 30 766048376 1 23\\r\\n\", \"output\": [\"8511649 4255824 4255825\"]}, {\"input\": \"3 90 675733187 1 33\\r\\n\", \"output\": [\"3754073 1877036 1877037\"]}, {\"input\": \"11 82 414861345 1 24\\r\\n\", \"output\": [\"505929 252964 252965\"]}, {\"input\": \"92 10 551902461 1 6\\r\\n\", \"output\": [\"606487 303243 303244\"]}, {\"input\": \"18 83 706805205 1 17\\r\\n\", \"output\": [\"500925 250462 250463\"]}, {\"input\": \"1 12 943872212 1 1\\r\\n\", \"output\": [\"78656018 78656017 78656018\", \"78656018 78656017 78656018\"]}, {\"input\": \"91 15 237966754 78 6\\r\\n\", \"output\": [\"176272 88136 176272\"]}, {\"input\": \"58 66 199707458 15 9\\r\\n\", \"output\": [\"53086 26543 53085\"]}, {\"input\": \"27 34 77794947 24 4\\r\\n\", \"output\": [\"88004 44002 88004\"]}, {\"input\": \"22 89 981099971 16 48\\r\\n\", \"output\": [\"524934 262467 524933\"]}, {\"input\": \"10 44 222787770 9 25\\r\\n\", \"output\": [\"562596 281298 562596\"]}, {\"input\": \"9 64 756016805 7 55\\r\\n\", \"output\": [\"1476596 738298 1476595\"]}, {\"input\": \"91 86 96470485 12 43\\r\\n\", \"output\": [\"12464 6232 12464\"]}, {\"input\": \"85 53 576663715 13 1\\r\\n\", \"output\": [\"129530 64765 129529\"]}, {\"input\": \"2 21 196681588 2 18\\r\\n\", \"output\": [\"4682895 4682894 4682895\"]}, {\"input\": \"8 29 388254841 6 29\\r\\n\", \"output\": [\"1912586 956293 1912585\"]}, {\"input\": \"2 59 400923999 2 43\\r\\n\", \"output\": [\"3397662 3397661 3397661\"]}, {\"input\": \"3 71 124911502 1 67\\r\\n\", \"output\": [\"879658 439829 439829\"]}, {\"input\": \"1 17 523664480 1 4\\r\\n\", \"output\": [\"30803793 30803792 30803793\", \"30803793 30803792 30803793\"]}, {\"input\": \"11 27 151005021 3 15\\r\\n\", \"output\": [\"559278 279639 559278\"]}, {\"input\": \"7 32 461672865 4 11\\r\\n\", \"output\": [\"2404547 1202273 2404546\"]}, {\"input\": \"2 90 829288586 1 57\\r\\n\", \"output\": [\"4607159 4607158 4607159\"]}, {\"input\": \"17 5 370710486 2 1\\r\\n\", \"output\": [\"4633882 2316941 4633881\"]}, {\"input\": \"88 91 6317 70 16\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"19 73 1193 12 46\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"84 10 405 68 8\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"92 80 20 9 69\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"69 21 203 13 16\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"63 22 1321 61 15\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"56 83 4572 35 22\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"36 19 684 20 15\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"33 2 1 8 2\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"76 74 1 38 39\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 71 1000000000000000000 1 5\\r\\n\", \"output\": [\"14084507042253522 14084507042253521 14084507042253522\", \"14084507042253522 14084507042253521 14084507042253522\"]}, {\"input\": \"13 89 1000000000000000000 10 14\\r\\n\", \"output\": [\"936329588014982 468164794007491 936329588014982\"]}, {\"input\": \"1 35 1000000000000000000 1 25\\r\\n\", \"output\": [\"28571428571428572 28571428571428571 28571428571428571\", \"28571428571428572 28571428571428571 28571428571428571\"]}, {\"input\": \"81 41 1000000000000000000 56 30\\r\\n\", \"output\": [\"304878048780488 152439024390244 304878048780488\"]}, {\"input\": \"4 39 1000000000000000000 3 32\\r\\n\", \"output\": [\"8547008547008547 4273504273504273 8547008547008547\"]}, {\"input\": \"21 49 1000000000000000000 18 11\\r\\n\", \"output\": [\"1020408163265307 510204081632653 1020408163265306\"]}, {\"input\": \"91 31 1000000000000000000 32 7\\r\\n\", \"output\": [\"358422939068101 179211469534050 358422939068101\"]}, {\"input\": \"51 99 1000000000000000000 48 79\\r\\n\", \"output\": [\"202020202020203 101010101010101 202020202020202\"]}, {\"input\": \"5 99 1000000000000000000 4 12\\r\\n\", \"output\": [\"2525252525252526 1262626262626263 2525252525252525\"]}, {\"input\": \"100 100 1000000000000000000 1 1\\r\\n\", \"output\": [\"101010101010101 50505050505051 50505050505051\"]}, {\"input\": \"100 100 1000000000000000000 31 31\\r\\n\", \"output\": [\"101010101010101 50505050505051 101010101010101\"]}, {\"input\": \"1 100 1000000000000000000 1 1\\r\\n\", \"output\": [\"10000000000000000 10000000000000000 10000000000000000\", \"10000000000000000 10000000000000000 10000000000000000\"]}, {\"input\": \"1 100 1000000000000000000 1 35\\r\\n\", \"output\": [\"10000000000000000 10000000000000000 10000000000000000\", \"10000000000000000 10000000000000000 10000000000000000\"]}, {\"input\": \"100 1 1000000000000000000 1 1\\r\\n\", \"output\": [\"10101010101010101 5050505050505051 5050505050505051\"]}, {\"input\": \"100 1 1000000000000000000 35 1\\r\\n\", \"output\": [\"10101010101010101 5050505050505051 10101010101010101\"]}, {\"input\": \"1 1 1000000000000000000 1 1\\r\\n\", \"output\": [\"1000000000000000000 1000000000000000000 1000000000000000000\", \"1000000000000000000 1000000000000000000 1000000000000000000\"]}, {\"input\": \"3 2 5 1 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"100 100 10001 1 1\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"1 5 7 1 3\\r\\n\", \"output\": [\"2 1 1\", \"2 1 1\"]}, {\"input\": \"2 2 7 1 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"4 1 5 3 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"2 3 4 2 3\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 5 21 1 2\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"2 4 14 1 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"5 9 8 5 4\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"2 6 4 1 3\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"1 5 9 1 1\\r\\n\", \"output\": [\"2 1 2\", \"2 1 2\"]}, {\"input\": \"1 5 3 1 2\\r\\n\", \"output\": [\"1 0 1\", \"1 0 1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 2 9 4 1\\r\\n', 'output': ['2 1 1']}, {'input': '17 5 370710486 2 1\\r\\n', 'output': ['4633882 2316941 4633881']}, {'input': '27 34 77794947 24 4\\r\\n', 'output': ['88004 44002 88004']}, {'input': '92 10 551902461 1 6\\r\\n', 'output': ['606487 303243 303244']}, {'input': '2 3 4 2 3\\r\\n', 'output': ['1 0 0']}]","human_sample_testcases_2":"[{'input': '4 1 8 3 1\\r\\n', 'output': ['3 1 2']}, {'input': '5 2 9 5 1\\r\\n', 'output': ['1 0 1']}, {'input': '63 22 1321 61 15\\r\\n', 'output': ['1 0 0']}, {'input': '1 3 8 1 1\\r\\n', 'output': ['3 2 3', '3 2 3']}, {'input': '1 100 1000000000000 1 100\\r\\n', 'output': ['10000000000 10000000000 10000000000', '10000000000 10000000000 10000000000']}]","human_sample_testcases_3":"[{'input': '1 3 7 1 1\\r\\n', 'output': ['3 2 3', '3 2 3']}, {'input': '5 2 81 5 1\\r\\n', 'output': ['10 5 5']}, {'input': '100 1 1000000000000 100 1\\r\\n', 'output': ['10101010101 5050505051 5050505051']}, {'input': '3 8 134010 3 4\\r\\n', 'output': ['8376 4188 4188']}, {'input': '1 1 1000000000000000000 1 1\\r\\n', 'output': ['1000000000000000000 1000000000000000000 1000000000000000000', '1000000000000000000 1000000000000000000 1000000000000000000']}]","human_sample_testcases_4":"[{'input': '1 3 7 1 1\\r\\n', 'output': ['3 2 3', '3 2 3']}, {'input': '4 3 1 3 3\\r\\n', 'output': ['1 0 0']}, {'input': '3 5 1 2 1\\r\\n', 'output': ['1 0 0']}, {'input': '5 3 100 2 1\\r\\n', 'output': ['9 4 9']}, {'input': '1 3 8 1 1\\r\\n', 'output': ['3 2 3', '3 2 3']}]","human_sample_testcases_5":"[{'input': '5 2 9 5 1\\r\\n', 'output': ['1 0 1']}, {'input': '85 53 576663715 13 1\\r\\n', 'output': ['129530 64765 129529']}, {'input': '1 1 1 1 1\\r\\n', 'output': ['1 1 1', '1 1 1']}, {'input': '5 6 30 5 4\\r\\n', 'output': ['1 1 1']}, {'input': '1 100 1000000000000000000 1 35\\r\\n', 'output': ['10000000000000000 10000000000000000 10000000000000000', '10000000000000000 10000000000000000 10000000000000000']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.45,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":88.46,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":51,"human_sample_pass_rate":100.0,"human_sample_line_coverage":99.09,"human_sample_branch_coverage":97.692} {"sample_inputs":"[\"3 5 6 1\\n1 2 3\", \"4 40 50 10\\n10 20 30 25\", \"5 25 35 10\\n10 10 20 10 20\"]","input_specification":"The first line contains four integers n, l, r, x (1\u2009\u2264\u2009n\u2009\u2264\u200915, 1\u2009\u2264\u2009l\u2009\u2264\u2009r\u2009\u2264\u2009109, 1\u2009\u2264\u2009x\u2009\u2264\u2009106) \u2014 the number of problems you have, the minimum and maximum value of total difficulty of the problemset and the minimum difference in difficulty between the hardest problem in the pack and the easiest one, respectively. The second line contains n integers c1,\u2009c2,\u2009...,\u2009cn (1\u2009\u2264\u2009ci\u2009\u2264\u2009106) \u2014 the difficulty of each problem.","src_uid":"0d43104a0de924cdcf8e4aced5aa825d","source_code":"#include \n\nint main()\n{\n char n,i;\n long l,r,x,j;\n long min,max,sum,count=0;\n char s;\n scanf(\"%d%ld%ld%ld\",&n,&l,&r,&x);\n long c[n];\n for(i=0;imax)max=c[i];\n sum+=c[i];\n s++;\n }\n if(s>1 && sum>=l && sum<=r && (max-min)>=x)\n count++;\n }\n printf(\"%ld\\n\",count);\n return 0;\n}\n","sample_outputs":"[\"2\", \"2\", \"6\"]","lang_cluster":"C","notes":"NoteIn the first example two sets are suitable, one consisting of the second and third problem, another one consisting of all three problems.In the second example, two sets of problems are suitable \u2014 the set of problems with difficulties 10 and 30 as well as the set of problems with difficulties 20 and 30.In the third example any set consisting of one problem of difficulty 10 and one problem of difficulty 20 is suitable.","output_specification":"Print the number of ways to choose a suitable problemset for the contest. ","description":"You have n problems. You have estimated the difficulty of the i-th one as integer ci. Now you want to prepare a problemset for a contest, using some of the problems you've made.A problemset for the contest must consist of at least two problems. You think that the total difficulty of the problems of the contest must be at least l and at most r. Also, you think that the difference between difficulties of the easiest and the hardest of the chosen problems must be at least x.Find the number of ways to choose a problemset for the contest.","human_testcases":"[{\"input\": \"3 5 6 1\\r\\n1 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 40 50 10\\r\\n10 20 30 25\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 25 35 10\\r\\n10 10 20 10 20\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 15 60 10\\r\\n10 20 30 25\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 10 20 1\\r\\n15\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 626451 11471247 246428\\r\\n369649 684428 303821 287098 422756 301599 720377 177567 515216 750602\\r\\n\", \"output\": [\"914\"]}, {\"input\": \"15 1415849 15540979 356865\\r\\n8352 960238 276753 259695 712845 945369 60023 920446 181269 392011 318488 857649 30681 740872 115749\\r\\n\", \"output\": [\"31485\"]}, {\"input\": \"7 1000 2000 1\\r\\n10 20 30 40 50 60 70\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 10 20 1\\r\\n4 6 4 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4 10 20 1\\r\\n5 15 13 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 10 20 5\\r\\n5 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 1098816 3969849 167639\\r\\n85627 615007 794045 530104 7091\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"13 700147 8713522 390093\\r\\n996812 94040 954140 545670 369698 423872 365802 784830 700267 960664 949252 84637 257447\\r\\n\", \"output\": [\"8026\"]}, {\"input\": \"15 4531977 20754263 137419\\r\\n637830 85299 755530 64382 896833 879525 331501 148182 741013 192101 112217 52165 702790 988594 587499\\r\\n\", \"output\": [\"6759\"]}, {\"input\": \"15 2572491 5084070 823435\\r\\n570344 78552 775918 501843 844935 71141 331498 636557 435494 715447 992666 831188 28969 171046 989614\\r\\n\", \"output\": [\"15078\"]}, {\"input\": \"15 4789415 23152928 233992\\r\\n502422 273992 449428 947379 700461 681985 857134 243310 478052 77769 936151 642380 464695 281772 964693\\r\\n\", \"output\": [\"10875\"]}, {\"input\": \"3 390224 390224 1\\r\\n264237 125987 288891\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 1652707 1652707 1\\r\\n492387 684636 235422 332532 924898 499872 192988\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 501107 501107 1\\r\\n843967 30518 196518 619138 204862 690754 274071 550121 173607 359971\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15 6627289 6627289 1\\r\\n683844 183950 184972 764255 211665 842336 790234 815301 914823 513046 93547 713159 554415 200951 388028\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15 5083470 5083470 1\\r\\n978510 643688 591921 723137 573784 346171 920030 352119 528857 365128 627302 308557 716247 263519 654230\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15 6558665 6558665 1\\r\\n572491 435494 916457 775918 823435 78552 501843 331498 71141 844935 636557 992666 570344 831188 715447\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 159699 10967276 3542\\r\\n998862 999751 995306 992648 992661 991407 997503 998809 999740 997669\\r\\n\", \"output\": [\"942\"]}, {\"input\": \"5 2815840 8479687 4082\\r\\n991137 992161 997887 998891 994990\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"15 2898377 6694755 721\\r\\n992733 999159 990076 996808 990975 993338 993234 994757 997873 993303 994409 993801 998027 990495 999287\\r\\n\", \"output\": [\"9819\"]}, {\"input\": \"6 20 70 1\\r\\n10 10 20 20 30 30\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"6 20 70 1\\r\\n10 10 10 10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15 1 1000000000 1\\r\\n10 20 30 40 50 60 70 80 90 100 110 120 130 140 150\\r\\n\", \"output\": [\"32752\"]}, {\"input\": \"6 30 40 1\\r\\n19 20 21 14 15 16\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"4 5 234 2\\r\\n10 9 12 11\\r\\n\", \"output\": [\"8\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '15 6558665 6558665 1\\r\\n572491 435494 916457 775918 823435 78552 501843 331498 71141 844935 636557 992666 570344 831188 715447\\r\\n', 'output': ['1']}, {'input': '15 2572491 5084070 823435\\r\\n570344 78552 775918 501843 844935 71141 331498 636557 435494 715447 992666 831188 28969 171046 989614\\r\\n', 'output': ['15078']}, {'input': '13 700147 8713522 390093\\r\\n996812 94040 954140 545670 369698 423872 365802 784830 700267 960664 949252 84637 257447\\r\\n', 'output': ['8026']}, {'input': '3 390224 390224 1\\r\\n264237 125987 288891\\r\\n', 'output': ['1']}, {'input': '15 1415849 15540979 356865\\r\\n8352 960238 276753 259695 712845 945369 60023 920446 181269 392011 318488 857649 30681 740872 115749\\r\\n', 'output': ['31485']}]","human_sample_testcases_2":"[{'input': '1 10 20 1\\r\\n15\\r\\n', 'output': ['0']}, {'input': '15 1 1000000000 1\\r\\n10 20 30 40 50 60 70 80 90 100 110 120 130 140 150\\r\\n', 'output': ['32752']}, {'input': '3 390224 390224 1\\r\\n264237 125987 288891\\r\\n', 'output': ['1']}, {'input': '6 20 70 1\\r\\n10 10 20 20 30 30\\r\\n', 'output': ['35']}, {'input': '15 2898377 6694755 721\\r\\n992733 999159 990076 996808 990975 993338 993234 994757 997873 993303 994409 993801 998027 990495 999287\\r\\n', 'output': ['9819']}]","human_sample_testcases_3":"[{'input': '3 390224 390224 1\\r\\n264237 125987 288891\\r\\n', 'output': ['1']}, {'input': '7 1652707 1652707 1\\r\\n492387 684636 235422 332532 924898 499872 192988\\r\\n', 'output': ['1']}, {'input': '6 30 40 1\\r\\n19 20 21 14 15 16\\r\\n', 'output': ['13']}, {'input': '4 40 50 10\\r\\n10 20 30 25\\r\\n', 'output': ['2']}, {'input': '15 6558665 6558665 1\\r\\n572491 435494 916457 775918 823435 78552 501843 331498 71141 844935 636557 992666 570344 831188 715447\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '4 40 50 10\\r\\n10 20 30 25\\r\\n', 'output': ['2']}, {'input': '2 10 20 5\\r\\n5 10\\r\\n', 'output': ['1']}, {'input': '10 626451 11471247 246428\\r\\n369649 684428 303821 287098 422756 301599 720377 177567 515216 750602\\r\\n', 'output': ['914']}, {'input': '4 15 60 10\\r\\n10 20 30 25\\r\\n', 'output': ['6']}, {'input': '15 2572491 5084070 823435\\r\\n570344 78552 775918 501843 844935 71141 331498 636557 435494 715447 992666 831188 28969 171046 989614\\r\\n', 'output': ['15078']}]","human_sample_testcases_5":"[{'input': '4 5 234 2\\r\\n10 9 12 11\\r\\n', 'output': ['8']}, {'input': '6 30 40 1\\r\\n19 20 21 14 15 16\\r\\n', 'output': ['13']}, {'input': '5 1098816 3969849 167639\\r\\n85627 615007 794045 530104 7091\\r\\n', 'output': ['15']}, {'input': '7 1652707 1652707 1\\r\\n492387 684636 235422 332532 924898 499872 192988\\r\\n', 'output': ['1']}, {'input': '10 159699 10967276 3542\\r\\n998862 999751 995306 992648 992661 991407 997503 998809 999740 997669\\r\\n', 'output': ['942']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":52,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 2\", \"1 2\"]","input_specification":"The first line contains two integers w and h (1\u2009\u2264\u2009w,\u2009h\u2009\u2264\u20094000) \u2014 the rectangle's sizes.","src_uid":"42454dcf7d073bf12030367eb094eb8c","source_code":"#include\nint main()\n{\n\tlong long int c=0,w,h,n,m;\n\tscanf(\"%lld %lld\",&w,&h);\n\tif(w<2 || h<2)\n\t{\n\t\tprintf(\"0\\n\");\n\t\treturn 0;\n\t}\n\tfor(n=2;w>=n;n=n+2)\n\t{\n\t\tfor(m=2;h>=m;m=m+2)\n\t\t\tc=c+(h-(m-1))*(w-(n-1));\n\t}\n\tprintf(\"%lld\\n\",c);\n\treturn 0;\n}\n","sample_outputs":"[\"1\", \"0\"]","lang_cluster":"C","notes":"NoteIn the first example there exists only one such rhombus. Its vertices are located at points (1,\u20090), (2,\u20091), (1,\u20092), (0,\u20091).","output_specification":"Print a single number \u2014 the number of sought rhombi. Please do not use the %lld specifier to read or write 64-bit integers in \u0421++. It is preferred to use cin, cout streams or the %I64d specifier.","description":"You have two positive integers w and h. Your task is to count the number of rhombi which have the following properties: Have positive area. With vertices at integer points. All vertices of the rhombi are located inside or on the border of the rectangle with vertices at points (0,\u20090), (w,\u20090), (w,\u2009h), (0,\u2009h). In other words, for all vertices (xi,\u2009yi) of the rhombus the following conditions should fulfill: 0\u2009\u2264\u2009xi\u2009\u2264\u2009w and 0\u2009\u2264\u2009yi\u2009\u2264\u2009h. Its diagonals are parallel to the axis. Count the number of such rhombi.Let us remind you that a rhombus is a quadrilateral whose four sides all have the same length.","human_testcases":"[{\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4000 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4000 4000\\r\\n\", \"output\": [\"16000000000000\"]}, {\"input\": \"15 10\\r\\n\", \"output\": [\"1400\"]}, {\"input\": \"7 9\\r\\n\", \"output\": [\"240\"]}, {\"input\": \"17 17\\r\\n\", \"output\": [\"5184\"]}, {\"input\": \"7 13\\r\\n\", \"output\": [\"504\"]}, {\"input\": \"9 14\\r\\n\", \"output\": [\"980\"]}, {\"input\": \"3 10\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"14 2\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"4 6\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"18 2858\\r\\n\", \"output\": [\"165405321\"]}, {\"input\": \"14 1274\\r\\n\", \"output\": [\"19882681\"]}, {\"input\": \"25 2986\\r\\n\", \"output\": [\"347731644\"]}, {\"input\": \"13 1402\\r\\n\", \"output\": [\"20638842\"]}, {\"input\": \"2955 21\\r\\n\", \"output\": [\"240130660\"]}, {\"input\": \"1665 27\\r\\n\", \"output\": [\"126136192\"]}, {\"input\": \"3671 19\\r\\n\", \"output\": [\"303215400\"]}, {\"input\": \"2541 25\\r\\n\", \"output\": [\"251810520\"]}, {\"input\": \"1913 3980\\r\\n\", \"output\": [\"3623063809200\"]}, {\"input\": \"3727 2044\\r\\n\", \"output\": [\"3627108561888\"]}, {\"input\": \"2437 460\\r\\n\", \"output\": [\"78542851800\"]}, {\"input\": \"1499 2172\\r\\n\", \"output\": [\"662525703000\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2541 25\\r\\n', 'output': ['251810520']}, {'input': '2437 460\\r\\n', 'output': ['78542851800']}, {'input': '1665 27\\r\\n', 'output': ['126136192']}, {'input': '4 6\\r\\n', 'output': ['36']}, {'input': '1913 3980\\r\\n', 'output': ['3623063809200']}]","human_sample_testcases_2":"[{'input': '13 1402\\r\\n', 'output': ['20638842']}, {'input': '25 2986\\r\\n', 'output': ['347731644']}, {'input': '14 1274\\r\\n', 'output': ['19882681']}, {'input': '4000 4000\\r\\n', 'output': ['16000000000000']}, {'input': '7 13\\r\\n', 'output': ['504']}]","human_sample_testcases_3":"[{'input': '2955 21\\r\\n', 'output': ['240130660']}, {'input': '9 14\\r\\n', 'output': ['980']}, {'input': '25 2986\\r\\n', 'output': ['347731644']}, {'input': '2437 460\\r\\n', 'output': ['78542851800']}, {'input': '3727 2044\\r\\n', 'output': ['3627108561888']}]","human_sample_testcases_4":"[{'input': '1913 3980\\r\\n', 'output': ['3623063809200']}, {'input': '1499 2172\\r\\n', 'output': ['662525703000']}, {'input': '18 2858\\r\\n', 'output': ['165405321']}, {'input': '9 14\\r\\n', 'output': ['980']}, {'input': '25 2986\\r\\n', 'output': ['347731644']}]","human_sample_testcases_5":"[{'input': '2541 25\\r\\n', 'output': ['251810520']}, {'input': '25 2986\\r\\n', 'output': ['347731644']}, {'input': '13 1402\\r\\n', 'output': ['20638842']}, {'input': '4000 1\\r\\n', 'output': ['0']}, {'input': '7 13\\r\\n', 'output': ['504']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":81.82,"human_sample_line_coverage_2":81.82,"human_sample_line_coverage_3":81.82,"human_sample_line_coverage_4":81.82,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":87.5,"id":53,"human_sample_pass_rate":100.0,"human_sample_line_coverage":85.456,"human_sample_branch_coverage":77.5} {"sample_inputs":"[\"10 3 5 2 3\"]","input_specification":"The single line contains five integers C,\u2009Hr,\u2009Hb,\u2009Wr,\u2009Wb (1\u2009\u2264\u2009C,\u2009Hr,\u2009Hb,\u2009Wr,\u2009Wb\u2009\u2264\u2009109).","src_uid":"eb052ca12ca293479992680581452399","source_code":"#include \n\n#define max(a, b) (((a) > (b)) ? (a) : (b))\n\nint main(void) {\n int i;\n int c, wr, wb;\n long long hr, hb;\n long long ans;\n\n scanf(\"%d %lld %lld %d %d\", &c, &hr, &hb, &wr, &wb);\n\n ans = 0;\n for (i = 0; i <= c \/ wr && i * i <= c; i++)\n ans = max(ans, hr * i + (c - wr * i) \/ wb * hb);\n for (i = 0; i <= c \/ wb && i * i <= c; i++)\n ans = max(ans, hb * i + (c - wb * i) \/ wr * hr);\n\n printf(\"%lld\\n\", ans);\n\n return 0;\n}\n ","sample_outputs":"[\"16\"]","lang_cluster":"C","notes":"NoteIn the sample test Om Nom can eat two candies of each type and thus get 16 joy units.","output_specification":"Print a single integer \u2014 the maximum number of joy units that Om Nom can get.","description":"A sweet little monster Om Nom loves candies very much. One day he found himself in a rather tricky situation that required him to think a bit in order to enjoy candies the most. Would you succeed with the same task if you were on his place? One day, when he came to his friend Evan, Om Nom didn't find him at home but he found two bags with candies. The first was full of blue candies and the second bag was full of red candies. Om Nom knows that each red candy weighs Wr grams and each blue candy weighs Wb grams. Eating a single red candy gives Om Nom Hr joy units and eating a single blue candy gives Om Nom Hb joy units.Candies are the most important thing in the world, but on the other hand overeating is not good. Om Nom knows if he eats more than C grams of candies, he will get sick. Om Nom thinks that it isn't proper to leave candy leftovers, so he can only eat a whole candy. Om Nom is a great mathematician and he quickly determined how many candies of what type he should eat in order to get the maximum number of joy units. Can you repeat his achievement? You can assume that each bag contains more candies that Om Nom can eat.","human_testcases":"[{\"input\": \"10 3 5 2 3\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"5 3 1 6 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"982068341 55 57 106 109\\r\\n\", \"output\": [\"513558662\"]}, {\"input\": \"930064129 32726326 25428197 83013449 64501049\\r\\n\", \"output\": [\"363523396\"]}, {\"input\": \"927155987 21197 15994 54746 41309\\r\\n\", \"output\": [\"358983713\"]}, {\"input\": \"902303498 609628987 152407246 8 2\\r\\n\", \"output\": [\"68758795931537065\"]}, {\"input\": \"942733698 9180 9072 1020 1008\\r\\n\", \"output\": [\"8484603228\"]}, {\"input\": \"951102310 39876134 24967176 70096104 43888451\\r\\n\", \"output\": [\"539219654\"]}, {\"input\": \"910943911 107 105 60 59\\r\\n\", \"output\": [\"1624516635\"]}, {\"input\": \"910943911 38162 31949 67084 56162\\r\\n\", \"output\": [\"518210503\"]}, {\"input\": \"910943911 9063 9045 1007 1005\\r\\n\", \"output\": [\"8198495199\"]}, {\"input\": \"903796108 270891702 270891702 1 1\\r\\n\", \"output\": [\"244830865957095816\"]}, {\"input\": \"936111602 154673223 309346447 1 2\\r\\n\", \"output\": [\"144791399037089047\"]}, {\"input\": \"947370735 115930744 347792233 1 3\\r\\n\", \"output\": [\"109829394468167085\"]}, {\"input\": \"958629867 96557265 386229061 1 4\\r\\n\", \"output\": [\"92562678344491221\"]}, {\"input\": \"969889000 84931386 424656931 1 5\\r\\n\", \"output\": [\"82374017230131800\"]}, {\"input\": \"925819493 47350513 28377591 83230978 49881078\\r\\n\", \"output\": [\"520855643\"]}, {\"input\": \"934395168 119 105 67 59\\r\\n\", \"output\": [\"1662906651\"]}, {\"input\": \"934395168 29208 38362 51342 67432\\r\\n\", \"output\": [\"531576348\"]}, {\"input\": \"934395168 9171 9045 1019 1005\\r\\n\", \"output\": [\"8409556512\"]}, {\"input\": \"946401698 967136832 483568416 2 1\\r\\n\", \"output\": [\"457649970001570368\"]}, {\"input\": \"962693577 967217455 967217455 2 2\\r\\n\", \"output\": [\"465567015261784540\"]}, {\"input\": \"989976325 646076560 969114840 2 3\\r\\n\", \"output\": [\"319800249268721000\"]}, {\"input\": \"901235456 485501645 971003291 2 4\\r\\n\", \"output\": [\"218775648435471424\"]}, {\"input\": \"912494588 389153108 972882772 2 5\\r\\n\", \"output\": [\"177550052841687584\"]}, {\"input\": \"995503930 29205027 18903616 51333090 33226507\\r\\n\", \"output\": [\"565303099\"]}, {\"input\": \"983935533 115 108 65 61\\r\\n\", \"output\": [\"1742049794\"]}, {\"input\": \"983935533 33986 27367 59737 48104\\r\\n\", \"output\": [\"559787479\"]}, {\"input\": \"983935533 7105 7056 1015 1008\\r\\n\", \"output\": [\"6887548731\"]}, {\"input\": \"994040035 740285170 246761723 3 1\\r\\n\", \"output\": [\"245291032098926983\"]}, {\"input\": \"905299166 740361314 493574209 3 2\\r\\n\", \"output\": [\"223416160034288041\"]}, {\"input\": \"911525551 740437472 740437472 3 3\\r\\n\", \"output\": [\"224975891301803200\"]}, {\"input\": \"922784684 566833132 755777509 3 4\\r\\n\", \"output\": [\"174354977531116762\"]}, {\"input\": \"955100178 462665160 771108601 3 5\\r\\n\", \"output\": [\"147297192414486195\"]}, {\"input\": \"949164751 36679609 23634069 64467968 41539167\\r\\n\", \"output\": [\"537909080\"]}, {\"input\": \"928443151 60 63 106 112\\r\\n\", \"output\": [\"525533853\"]}, {\"input\": \"928443151 25031 33442 43995 58778\\r\\n\", \"output\": [\"528241752\"]}, {\"input\": \"928443151 1006 1012 1006 1012\\r\\n\", \"output\": [\"928443150\"]}, {\"input\": \"936645623 540336743 135084185 4 1\\r\\n\", \"output\": [\"126526011319256470\"]}, {\"input\": \"947904756 540408420 270204210 4 2\\r\\n\", \"output\": [\"128063927875111380\"]}, {\"input\": \"959163888 540480074 405360055 4 3\\r\\n\", \"output\": [\"129602242291091928\"]}, {\"input\": \"970423020 540551739 540551739 4 4\\r\\n\", \"output\": [\"131140962756657945\"]}, {\"input\": \"976649406 455467553 569334442 4 5\\r\\n\", \"output\": [\"111208028918928288\"]}, {\"input\": \"923881933 18531902 53987967 32570076 94884602\\r\\n\", \"output\": [\"524563246\"]}, {\"input\": \"977983517 57 63 101 112\\r\\n\", \"output\": [\"551931291\"]}, {\"input\": \"977983517 29808 22786 52389 40047\\r\\n\", \"output\": [\"556454318\"]}, {\"input\": \"977983517 9009 9108 1001 1012\\r\\n\", \"output\": [\"8801851608\"]}, {\"input\": \"984283960 367291526 73458305 5 1\\r\\n\", \"output\": [\"72303831537144592\"]}, {\"input\": \"990510345 367358723 146943489 5 2\\r\\n\", \"output\": [\"72774523091497887\"]}, {\"input\": \"901769477 367425909 220455545 5 3\\r\\n\", \"output\": [\"66266693959035917\"]}, {\"input\": \"907995862 367493085 293994468 5 4\\r\\n\", \"output\": [\"66736440098722854\"]}, {\"input\": \"924287742 367560271 367560271 5 5\\r\\n\", \"output\": [\"67946290439275508\"]}, {\"input\": \"1000000000 1000 999 100 1000000000\\r\\n\", \"output\": [\"10000000000\"]}, {\"input\": \"999999999 10 499999995 2 99999999\\r\\n\", \"output\": [\"4999999995\"]}, {\"input\": \"999999999 1 1000000000 2 1000000000\\r\\n\", \"output\": [\"499999999\"]}, {\"input\": \"999999997 2 999999997 2 999999997\\r\\n\", \"output\": [\"999999997\"]}, {\"input\": \"1000000000 1 1 11 11\\r\\n\", \"output\": [\"90909090\"]}, {\"input\": \"999999999 999999998 5 999999999 5\\r\\n\", \"output\": [\"999999998\"]}, {\"input\": \"100000001 3 100000000 3 100000001\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"999999999 2 3 1 2\\r\\n\", \"output\": [\"1999999998\"]}, {\"input\": \"1000000000 2 1 3 4\\r\\n\", \"output\": [\"666666666\"]}, {\"input\": \"999999999 10000 494999 2 99\\r\\n\", \"output\": [\"4999999994999\"]}, {\"input\": \"1000000000 1 1 1 1\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"998999 1000 999 1000 999\\r\\n\", \"output\": [\"998999\"]}, {\"input\": \"3 100 101 2 3\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"345415838 13999 13997 13999 13997\\r\\n\", \"output\": [\"345415838\"]}, {\"input\": \"5000005 3 2 5 1\\r\\n\", \"output\": [\"10000010\"]}, {\"input\": \"1000000000 1 1 1 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"999999999 3 2 10 3\\r\\n\", \"output\": [\"666666666\"]}, {\"input\": \"1000000000 1000 1000 1 1\\r\\n\", \"output\": [\"1000000000000\"]}, {\"input\": \"200000001 100000002 1 100000001 1\\r\\n\", \"output\": [\"200000002\"]}, {\"input\": \"100000000 1000000000 1 100000001 1\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"1000000000 99 100 1 2\\r\\n\", \"output\": [\"99000000000\"]}, {\"input\": \"1000000000 5 5 1 1\\r\\n\", \"output\": [\"5000000000\"]}, {\"input\": \"1000000000 1 1000000000 1 1000000000\\r\\n\", \"output\": [\"1000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '977983517 9009 9108 1001 1012\\r\\n', 'output': ['8801851608']}, {'input': '962693577 967217455 967217455 2 2\\r\\n', 'output': ['465567015261784540']}, {'input': '983935533 33986 27367 59737 48104\\r\\n', 'output': ['559787479']}, {'input': '200000001 100000002 1 100000001 1\\r\\n', 'output': ['200000002']}, {'input': '999999999 999999998 5 999999999 5\\r\\n', 'output': ['999999998']}]","human_sample_testcases_2":"[{'input': '995503930 29205027 18903616 51333090 33226507\\r\\n', 'output': ['565303099']}, {'input': '1000000000 1 1 1 1000000000\\r\\n', 'output': ['1000000000']}, {'input': '901769477 367425909 220455545 5 3\\r\\n', 'output': ['66266693959035917']}, {'input': '903796108 270891702 270891702 1 1\\r\\n', 'output': ['244830865957095816']}, {'input': '947370735 115930744 347792233 1 3\\r\\n', 'output': ['109829394468167085']}]","human_sample_testcases_3":"[{'input': '910943911 38162 31949 67084 56162\\r\\n', 'output': ['518210503']}, {'input': '942733698 9180 9072 1020 1008\\r\\n', 'output': ['8484603228']}, {'input': '1000000000 2 1 3 4\\r\\n', 'output': ['666666666']}, {'input': '200000001 100000002 1 100000001 1\\r\\n', 'output': ['200000002']}, {'input': '983935533 115 108 65 61\\r\\n', 'output': ['1742049794']}]","human_sample_testcases_4":"[{'input': '911525551 740437472 740437472 3 3\\r\\n', 'output': ['224975891301803200']}, {'input': '1000000000 1000 999 100 1000000000\\r\\n', 'output': ['10000000000']}, {'input': '1000000000 1000 1000 1 1\\r\\n', 'output': ['1000000000000']}, {'input': '977983517 9009 9108 1001 1012\\r\\n', 'output': ['8801851608']}, {'input': '994040035 740285170 246761723 3 1\\r\\n', 'output': ['245291032098926983']}]","human_sample_testcases_5":"[{'input': '1000000000 1 1 11 11\\r\\n', 'output': ['90909090']}, {'input': '949164751 36679609 23634069 64467968 41539167\\r\\n', 'output': ['537909080']}, {'input': '911525551 740437472 740437472 3 3\\r\\n', 'output': ['224975891301803200']}, {'input': '910943911 107 105 60 59\\r\\n', 'output': ['1624516635']}, {'input': '907995862 367493085 293994468 5 4\\r\\n', 'output': ['66736440098722854']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":100.0,"id":54,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":97.5} {"sample_inputs":"[\"1\", \"2\", \"3\", \"8\"]","input_specification":"The first line of the input will contain a single integer, n (1\u2009\u2264\u2009n\u2009\u2264\u2009100\u2009000).","src_uid":"757cd804aba01dc4bc108cb0722f68dc","source_code":"#include \n#include \n\nint main()\n{\n int n;\n scanf(\"%d\",&n);\n int a[110]={0};\n int i;\n for(i=1;;i++)\n {\n if(n==1) {break;}\n int yushu,deshu;\n yushu=n%2;\n n=n\/2;\n a[i]=yushu;\n if(n==1) {i++;break;}\n }\n printf(\"%d\",i);\n i--;\n for(;i>=0;i--)\n if(a[i]) printf(\" %d\",i);\n printf(\"\\n\");\n}\n","sample_outputs":"[\"1\", \"2\", \"2 1\", \"4\"]","lang_cluster":"C","notes":"NoteIn the first sample, we only have a single slime with value 1. The final state of the board is just a single slime with value 1.In the second sample, we perform the following steps:Initially we place a single slime in a row by itself. Thus, row is initially 1.Then, we will add another slime. The row is now 1 1. Since two rightmost slimes have the same values, we should replace these slimes with one with value 2. Thus, the final state of the board is 2.In the third sample, after adding the first two slimes, our row is 2. After adding one more slime, the row becomes 2 1.In the last sample, the steps look as follows: 1 2 2 1 3 3 1 3 2 3 2 1 4 ","output_specification":"Output a single line with k integers, where k is the number of slimes in the row after you've finished the procedure described in the problem statement. The i-th of these numbers should be the value of the i-th slime from the left.","description":"Your friend recently gave you some slimes for your birthday. You have n slimes all initially with value 1.You are going to play a game with these slimes. Initially, you put a single slime by itself in a row. Then, you will add the other n\u2009-\u20091 slimes one by one. When you add a slime, you place it at the right of all already placed slimes. Then, while the last two slimes in the row have the same value v, you combine them together to create a slime with value v\u2009+\u20091.You would like to see what the final state of the row is after you've added all n slimes. Please print the values of the slimes in the row from left to right.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"2 1\", \"2 1\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"17 16 11 10 8 6\", \"17 16 11 10 8 6\"]}, {\"input\": \"12345\\r\\n\", \"output\": [\"14 13 6 5 4 1\", \"14 13 6 5 4 1\"]}, {\"input\": \"32\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"70958\\r\\n\", \"output\": [\"17 13 11 9 6 4 3 2\", \"17 13 11 9 6 4 3 2\"]}, {\"input\": \"97593\\r\\n\", \"output\": [\"17 15 14 13 12 11 9 6 5 4 1\", \"17 15 14 13 12 11 9 6 5 4 1\"]}, {\"input\": \"91706\\r\\n\", \"output\": [\"17 15 14 11 10 6 5 4 2\", \"17 15 14 11 10 6 5 4 2\"]}, {\"input\": \"85371\\r\\n\", \"output\": [\"17 15 12 11 9 7 6 5 4 2 1\", \"17 15 12 11 9 7 6 5 4 2 1\"]}, {\"input\": \"97205\\r\\n\", \"output\": [\"17 15 14 13 12 10 9 8 6 5 3 1\", \"17 15 14 13 12 10 9 8 6 5 3 1\"]}, {\"input\": \"34768\\r\\n\", \"output\": [\"16 11 10 9 8 7 5\", \"16 11 10 9 8 7 5\"]}, {\"input\": \"12705\\r\\n\", \"output\": [\"14 13 9 8 6 1\", \"14 13 9 8 6 1\"]}, {\"input\": \"30151\\r\\n\", \"output\": [\"15 14 13 11 9 8 7 3 2 1\", \"15 14 13 11 9 8 7 3 2 1\"]}, {\"input\": \"4974\\r\\n\", \"output\": [\"13 10 9 7 6 4 3 2\", \"13 10 9 7 6 4 3 2\"]}, {\"input\": \"32728\\r\\n\", \"output\": [\"15 14 13 12 11 10 9 8 7 5 4\", \"15 14 13 12 11 10 9 8 7 5 4\"]}, {\"input\": \"8192\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"65536\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"32\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"256\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4096\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"33301\\r\\n\", \"output\": [\"16 10 5 3 1\", \"16 10 5 3 1\"]}, {\"input\": \"16725\\r\\n\", \"output\": [\"15 9 7 5 3 1\", \"15 9 7 5 3 1\"]}, {\"input\": \"149\\r\\n\", \"output\": [\"8 5 3 1\", \"8 5 3 1\"]}, {\"input\": \"16277\\r\\n\", \"output\": [\"14 13 12 11 10 9 8 5 3 1\", \"14 13 12 11 10 9 8 5 3 1\"]}, {\"input\": \"99701\\r\\n\", \"output\": [\"17 16 11 9 7 6 5 3 1\", \"17 16 11 9 7 6 5 3 1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4974\\r\\n', 'output': ['13 10 9 7 6 4 3 2', '13 10 9 7 6 4 3 2']}, {'input': '70958\\r\\n', 'output': ['17 13 11 9 6 4 3 2', '17 13 11 9 6 4 3 2']}, {'input': '32\\r\\n', 'output': ['6']}, {'input': '3\\r\\n', 'output': ['2 1', '2 1']}, {'input': '8192\\r\\n', 'output': ['14']}]","human_sample_testcases_2":"[{'input': '97593\\r\\n', 'output': ['17 15 14 13 12 11 9 6 5 4 1', '17 15 14 13 12 11 9 6 5 4 1']}, {'input': '32\\r\\n', 'output': ['6']}, {'input': '3\\r\\n', 'output': ['2 1', '2 1']}, {'input': '4096\\r\\n', 'output': ['13']}, {'input': '33301\\r\\n', 'output': ['16 10 5 3 1', '16 10 5 3 1']}]","human_sample_testcases_3":"[{'input': '100000\\r\\n', 'output': ['17 16 11 10 8 6', '17 16 11 10 8 6']}, {'input': '2\\r\\n', 'output': ['2']}, {'input': '32\\r\\n', 'output': ['6']}, {'input': '97205\\r\\n', 'output': ['17 15 14 13 12 10 9 8 6 5 3 1', '17 15 14 13 12 10 9 8 6 5 3 1']}, {'input': '4096\\r\\n', 'output': ['13']}]","human_sample_testcases_4":"[{'input': '1\\r\\n', 'output': ['1']}, {'input': '85371\\r\\n', 'output': ['17 15 12 11 9 7 6 5 4 2 1', '17 15 12 11 9 7 6 5 4 2 1']}, {'input': '34768\\r\\n', 'output': ['16 11 10 9 8 7 5', '16 11 10 9 8 7 5']}, {'input': '16277\\r\\n', 'output': ['14 13 12 11 10 9 8 5 3 1', '14 13 12 11 10 9 8 5 3 1']}, {'input': '97593\\r\\n', 'output': ['17 15 14 13 12 11 9 6 5 4 1', '17 15 14 13 12 11 9 6 5 4 1']}]","human_sample_testcases_5":"[{'input': '3\\r\\n', 'output': ['2 1', '2 1']}, {'input': '100000\\r\\n', 'output': ['17 16 11 10 8 6', '17 16 11 10 8 6']}, {'input': '12705\\r\\n', 'output': ['14 13 9 8 6 1', '14 13 9 8 6 1']}, {'input': '30151\\r\\n', 'output': ['15 14 13 11 9 8 7 3 2 1', '15 14 13 11 9 8 7 3 2 1']}, {'input': '34768\\r\\n', 'output': ['16 11 10 9 8 7 5', '16 11 10 9 8 7 5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":87.5,"id":55,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"2 3\", \"3 1\"]","input_specification":"In the only line you are given two integers a, b (0\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009100) \u2014 the number of even and odd steps, accordingly.","src_uid":"ec5e3b3f5ee6a13eaf01b9a9a66ff037","source_code":"#include \n\nint main(void) {\n\t\/\/ your code goes here\n\tint i,j;\n\tscanf(\"%d%d\",&i,&j);\n\t\n\tif(i==0&&j==0)\n\t{\n\t\tprintf(\"NO\");\n\t\t\n\t\n}\nelse\n{\n\tif((i-j)==1||(j-i)==1||i==j)\n\t{\n\n\n\t\n\t\tprintf(\"YES\");\n\t}\nelse\n{\n\tprintf(\"NO\");\t\n\t}\n}\n\treturn 0;\n\t\n}\n","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"C","notes":"NoteIn the first example one of suitable intervals is from 1 to 5. The interval contains two even steps\u00a0\u2014 2 and 4, and three odd: 1, 3 and 5.","output_specification":"In the only line print \"YES\", if the interval of steps described above exists, and \"NO\" otherwise.","description":"On her way to programming school tiger Dasha faced her first test \u2014 a huge staircase! The steps were numbered from one to infinity. As we know, tigers are very fond of all striped things, it is possible that it has something to do with their color. So on some interval of her way she calculated two values \u2014 the number of steps with even and odd numbers. You need to check whether there is an interval of steps from the l-th to the r-th (1\u2009\u2264\u2009l\u2009\u2264\u2009r), for which values that Dasha has found are correct.","human_testcases":"[{\"input\": \"2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9 9\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"85 95\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"89 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"74 73\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"62 39\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"57 57\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 99\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"98 100\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"99 100\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 100\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 98\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '85 95\\r\\n', 'output': ['NO']}, {'input': '100 0\\r\\n', 'output': ['NO']}, {'input': '100 100\\r\\n', 'output': ['YES']}, {'input': '5 4\\r\\n', 'output': ['YES']}, {'input': '2 3\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '9 9\\r\\n', 'output': ['YES']}, {'input': '100 0\\r\\n', 'output': ['NO']}, {'input': '99 100\\r\\n', 'output': ['YES']}, {'input': '0 1\\r\\n', 'output': ['YES']}, {'input': '5 4\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '100 100\\r\\n', 'output': ['YES']}, {'input': '62 39\\r\\n', 'output': ['NO']}, {'input': '2 2\\r\\n', 'output': ['YES']}, {'input': '100 0\\r\\n', 'output': ['NO']}, {'input': '99 100\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '0 0\\r\\n', 'output': ['NO']}, {'input': '2 2\\r\\n', 'output': ['YES']}, {'input': '89 25\\r\\n', 'output': ['NO']}, {'input': '1 0\\r\\n', 'output': ['YES']}, {'input': '57 57\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '2 3\\r\\n', 'output': ['YES']}, {'input': '9 9\\r\\n', 'output': ['YES']}, {'input': '99 100\\r\\n', 'output': ['YES']}, {'input': '0 0\\r\\n', 'output': ['NO']}, {'input': '85 95\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":70.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":60.0,"human_sample_branch_coverage_4":80.0,"human_sample_branch_coverage_5":80.0,"id":56,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.5,"human_sample_branch_coverage":76.0} {"sample_inputs":"[\"27\", \"4545\"]","input_specification":"The first line contains a single integer x (1\u2009\u2264\u2009x\u2009\u2264\u20091018) \u2014 the number that Luke Skywalker gave to Chewbacca.","src_uid":"d5de5052b4e9bbdb5359ac6e05a18b61","source_code":"#include\n#include\nint main()\n{\nint i;\nchar arr[20];\nint c=0,b[20];\nscanf(\"%s\",arr);\nfor(i=0;i=53)\n{\nb[i]=57-b[i];\nif(b[0]==0)\nb[0]=9;\n}\nelse\n{b[i]=b[i]-48;}\nprintf(\"%d\",b[i]);\n}\n\/\/printf(\"1\");\nreturn 0;\n}\n","sample_outputs":"[\"22\", \"4444\"]","lang_cluster":"C","notes":null,"output_specification":"Print the minimum possible positive number that Chewbacca can obtain after inverting some digits. The number shouldn't contain leading zeroes.","description":"Luke Skywalker gave Chewbacca an integer number x. Chewbacca isn't good at numbers but he loves inverting digits in them. Inverting digit t means replacing it with digit 9\u2009-\u2009t. Help Chewbacca to transform the initial number x to the minimum possible positive number by inverting some (possibly, zero) digits. The decimal representation of the final number shouldn't start with a zero.","human_testcases":"[{\"input\": \"27\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"4545\\r\\n\", \"output\": [\"4444\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"8772\\r\\n\", \"output\": [\"1222\"]}, {\"input\": \"81\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"71723447\\r\\n\", \"output\": [\"21223442\"]}, {\"input\": \"91730629\\r\\n\", \"output\": [\"91230320\"]}, {\"input\": \"420062703497\\r\\n\", \"output\": [\"420032203402\"]}, {\"input\": \"332711047202\\r\\n\", \"output\": [\"332211042202\"]}, {\"input\": \"3395184971407775\\r\\n\", \"output\": [\"3304114021402224\"]}, {\"input\": \"8464062628894325\\r\\n\", \"output\": [\"1434032321104324\"]}, {\"input\": \"164324828731963982\\r\\n\", \"output\": [\"134324121231033012\"]}, {\"input\": \"384979173822804784\\r\\n\", \"output\": [\"314020123122104214\"]}, {\"input\": \"41312150450968417\\r\\n\", \"output\": [\"41312140440031412\"]}, {\"input\": \"2156\\r\\n\", \"output\": [\"2143\"]}, {\"input\": \"1932\\r\\n\", \"output\": [\"1032\"]}, {\"input\": \"5902\\r\\n\", \"output\": [\"4002\"]}, {\"input\": \"5728\\r\\n\", \"output\": [\"4221\"]}, {\"input\": \"8537\\r\\n\", \"output\": [\"1432\"]}, {\"input\": \"55403857\\r\\n\", \"output\": [\"44403142\"]}, {\"input\": \"270739\\r\\n\", \"output\": [\"220230\"]}, {\"input\": \"28746918\\r\\n\", \"output\": [\"21243011\"]}, {\"input\": \"10279211\\r\\n\", \"output\": [\"10220211\"]}, {\"input\": \"40289679\\r\\n\", \"output\": [\"40210320\"]}, {\"input\": \"545203238506\\r\\n\", \"output\": [\"444203231403\"]}, {\"input\": \"461117063340\\r\\n\", \"output\": [\"431112033340\"]}, {\"input\": \"658492686568\\r\\n\", \"output\": [\"341402313431\"]}, {\"input\": \"857373361868\\r\\n\", \"output\": [\"142323331131\"]}, {\"input\": \"429325660016\\r\\n\", \"output\": [\"420324330013\"]}, {\"input\": \"9894448650287940\\r\\n\", \"output\": [\"9104441340212040\"]}, {\"input\": \"6354510839296263\\r\\n\", \"output\": [\"3344410130203233\"]}, {\"input\": \"6873575462224593\\r\\n\", \"output\": [\"3123424432224403\"]}, {\"input\": \"4237951492601449\\r\\n\", \"output\": [\"4232041402301440\"]}, {\"input\": \"2680352384836991\\r\\n\", \"output\": [\"2310342314133001\"]}, {\"input\": \"606187734191890310\\r\\n\", \"output\": [\"303112234101100310\"]}, {\"input\": \"351499943576823355\\r\\n\", \"output\": [\"341400043423123344\"]}, {\"input\": \"180593481782177068\\r\\n\", \"output\": [\"110403411212122031\"]}, {\"input\": \"999999999999999999\\r\\n\", \"output\": [\"900000000000000000\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"9999\\r\\n\", \"output\": [\"9000\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"9991\\r\\n\", \"output\": [\"9001\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '99\\r\\n', 'output': ['90']}, {'input': '81\\r\\n', 'output': ['11']}, {'input': '5902\\r\\n', 'output': ['4002']}, {'input': '71723447\\r\\n', 'output': ['21223442']}, {'input': '429325660016\\r\\n', 'output': ['420324330013']}]","human_sample_testcases_2":"[{'input': '384979173822804784\\r\\n', 'output': ['314020123122104214']}, {'input': '270739\\r\\n', 'output': ['220230']}, {'input': '4237951492601449\\r\\n', 'output': ['4232041402301440']}, {'input': '8464062628894325\\r\\n', 'output': ['1434032321104324']}, {'input': '10279211\\r\\n', 'output': ['10220211']}]","human_sample_testcases_3":"[{'input': '5902\\r\\n', 'output': ['4002']}, {'input': '8537\\r\\n', 'output': ['1432']}, {'input': '545203238506\\r\\n', 'output': ['444203231403']}, {'input': '1000000000000000000\\r\\n', 'output': ['1000000000000000000']}, {'input': '1932\\r\\n', 'output': ['1032']}]","human_sample_testcases_4":"[{'input': '9\\r\\n', 'output': ['9']}, {'input': '857373361868\\r\\n', 'output': ['142323331131']}, {'input': '10279211\\r\\n', 'output': ['10220211']}, {'input': '420062703497\\r\\n', 'output': ['420032203402']}, {'input': '9991\\r\\n', 'output': ['9001']}]","human_sample_testcases_5":"[{'input': '3395184971407775\\r\\n', 'output': ['3304114021402224']}, {'input': '55403857\\r\\n', 'output': ['44403142']}, {'input': '429325660016\\r\\n', 'output': ['420324330013']}, {'input': '164324828731963982\\r\\n', 'output': ['134324121231033012']}, {'input': '9999\\r\\n', 'output': ['9000']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":91.67,"human_sample_line_coverage_3":91.67,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":57,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.668,"human_sample_branch_coverage":93.332} {"sample_inputs":"[\"3 7\", \"100 99\", \"100 50\"]","input_specification":"The first line contains two integers w,\u2009m (2\u2009\u2264\u2009w\u2009\u2264\u2009109, 1\u2009\u2264\u2009m\u2009\u2264\u2009109) \u2014 the number defining the masses of the weights and the mass of the item.","src_uid":"a74adcf0314692f8ac95f54d165d9582","source_code":"#include\ntypedef unsigned u;\nu w,m;\nint main()\n{\n\tscanf(\"%u%u\",&w,&m);\n\twhile(m)\n\t{\n\t\tif(m%w==1)--m;\n\t\tif(m%w==w-1)++m;\n\t\tif(m%w==0)m\/=w;\n\t\telse{printf(\"NO\\n\");return 0;}\n\t}\n\tprintf(\"YES\\n\");\n\treturn 0;\n}\n","sample_outputs":"[\"YES\", \"YES\", \"NO\"]","lang_cluster":"C","notes":"NoteNote to the first sample test. One pan can have an item of mass 7 and a weight of mass 3, and the second pan can have two weights of masses 9 and 1, correspondingly. Then 7\u2009+\u20093\u2009=\u20099\u2009+\u20091.Note to the second sample test. One pan of the scales can have an item of mass 99 and the weight of mass 1, and the second pan can have the weight of mass 100.Note to the third sample test. It is impossible to measure the weight of the item in the manner described in the input. ","output_specification":"Print word 'YES' if the item can be weighted and 'NO' if it cannot.","description":"Vanya has a scales for weighing loads and weights of masses w0,\u2009w1,\u2009w2,\u2009...,\u2009w100 grams where w is some integer not less than 2 (exactly one weight of each nominal value). Vanya wonders whether he can weight an item with mass m using the given weights, if the weights can be put on both pans of the scales. Formally speaking, your task is to determine whether it is possible to place an item of mass m and some weights on the left pan of the scales, and some weights on the right pan of the scales so that the pans of the scales were in balance.","human_testcases":"[{\"input\": \"3 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 99\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 10002\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 11\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 781\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5077 5988\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 9596\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 1069\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 7134\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 9083\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 7927\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 6772\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 782\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 1000000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 357913941\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 357918037\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 12207031\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 41503906\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 90332031\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11 1786324\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 999\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 28087\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 28598\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"32 33586176\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"87 56631258\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19 20\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"58 11316496\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"89 89\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"21 85756882\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"56 540897225\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"91 8189\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"27 14329927\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"58 198535\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"939 938\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"27463 754243832\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"21427 459137757\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"26045 26045\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"25336 25336\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24627 24626\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29245 855299270\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"28536 814274759\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"33154 33155\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"27118 27119\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"70 338171\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24 346226\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"41 2966964\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"31 29792\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"48 2402\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"65 4159\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20 67376840\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"72 5111\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"27 14349609\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"44 89146\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"22787 519292944\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24525 601475624\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3716 13816089\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4020 4020\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13766 13767\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23512 23511\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23816 567225671\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"33562 33564\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"33866 33866\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13057 13059\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"441890232 441890232\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"401739553 401739553\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"285681920 285681919\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"464591587 464591588\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"703722884 703722884\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"982276216 982276216\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"867871061 867871062\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"48433217 48433216\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 324818663\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 898367507\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 471916351\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 45465196\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9 768757144\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"8 342305988\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 114457122\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 688005966\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 556522107\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 130070951\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 558395604\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 131944448\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 22222222\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 100000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 100000001\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 100000002\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 100000003\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 100000004\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 1000000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1000000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"99999 1000000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 1000000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000 1000000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 999999999\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 99999999\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000 999999999\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000 999999998\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 536870912\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 99\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 26\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 8888\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 8\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 984742145\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 43\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4194304 4194305\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 899\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 47\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 822083581\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 999987989\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 31\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 15\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100000000 100000001\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '22787 519292944\\r\\n', 'output': ['NO']}, {'input': '100 99\\r\\n', 'output': ['YES']}, {'input': '3716 13816089\\r\\n', 'output': ['NO']}, {'input': '3 8\\r\\n', 'output': ['YES']}, {'input': '4 7134\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '58 11316496\\r\\n', 'output': ['YES']}, {'input': '7 898367507\\r\\n', 'output': ['NO']}, {'input': '3 100000000\\r\\n', 'output': ['YES']}, {'input': '29245 855299270\\r\\n', 'output': ['YES']}, {'input': '1000 999999998\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '5 782\\r\\n', 'output': ['NO']}, {'input': '4 31\\r\\n', 'output': ['NO']}, {'input': '44 89146\\r\\n', 'output': ['NO']}, {'input': '2 9596\\r\\n', 'output': ['YES']}, {'input': '6 114457122\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '27 14329927\\r\\n', 'output': ['YES']}, {'input': '401739553 401739553\\r\\n', 'output': ['YES']}, {'input': '32 33586176\\r\\n', 'output': ['YES']}, {'input': '4 31\\r\\n', 'output': ['NO']}, {'input': '939 938\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '100000000 100000001\\r\\n', 'output': ['YES']}, {'input': '33562 33564\\r\\n', 'output': ['NO']}, {'input': '6 688005966\\r\\n', 'output': ['NO']}, {'input': '5 90332031\\r\\n', 'output': ['NO']}, {'input': '3 100000003\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":58,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\"]","input_specification":"The first line contains a single integer n (0\u2009\u2264\u2009n\u2009\u2264\u20091000).","src_uid":"1a335a9638523ca0315282a67e18eec7","source_code":"#include\n#define MOD 1000003\n \nint power(int x,int y)\n{\n if(y==0)\n return 1;\n int temp=x;\n while(--y)\n {\n x*=temp;\n x%=MOD;\n }\n return x;\n}\nint main()\n{\n int y;\n scanf(\"%d\",&y);\n if(y==0)\n {\n printf(\"%d\",1);\n return 0;\n }\n int res=power(3,y-1);\n printf(\"%d\\n\",res);\n return 0;\n}","sample_outputs":"[\"9\"]","lang_cluster":"C","notes":"NoteIf the box possesses the base of 23\u2009\u00d7\u200923 (as in the example), then the cookies will be put there in the following manner: ","output_specification":"Print the single number, equal to the number of empty cells in the box. The answer should be printed modulo 106\u2009+\u20093.","description":"Fangy collects cookies. Once he decided to take a box and put cookies into it in some way. If we take a square k\u2009\u00d7\u2009k in size, divided into blocks 1\u2009\u00d7\u20091 in size and paint there the main diagonal together with cells, which lie above it, then the painted area will be equal to the area occupied by one cookie k in size. Fangy also has a box with a square base 2n\u2009\u00d7\u20092n, divided into blocks 1\u2009\u00d7\u20091 in size. In a box the cookies should not overlap, and they should not be turned over or rotated. See cookies of sizes 2 and 4 respectively on the figure: To stack the cookies the little walrus uses the following algorithm. He takes out of the repository the largest cookie which can fit in some place in the box and puts it there. Everything could be perfect but alas, in the repository the little walrus has infinitely many cookies of size 2 and larger, and there are no cookies of size 1, therefore, empty cells will remain in the box. Fangy wants to know how many empty cells will be left in the end.","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"243\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"59049\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"594320\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"782957\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"691074\"]}, {\"input\": \"657\\r\\n\", \"output\": [\"874011\"]}, {\"input\": \"561\\r\\n\", \"output\": [\"842553\"]}, {\"input\": \"823\\r\\n\", \"output\": [\"858672\"]}, {\"input\": \"850\\r\\n\", \"output\": [\"557186\"]}, {\"input\": \"298\\r\\n\", \"output\": [\"999535\"]}, {\"input\": \"262\\r\\n\", \"output\": [\"946384\"]}, {\"input\": \"910\\r\\n\", \"output\": [\"678945\"]}, {\"input\": \"617\\r\\n\", \"output\": [\"247876\"]}, {\"input\": \"857\\r\\n\", \"output\": [\"562128\"]}, {\"input\": \"69\\r\\n\", \"output\": [\"327984\"]}, {\"input\": \"589\\r\\n\", \"output\": [\"889192\"]}, {\"input\": \"928\\r\\n\", \"output\": [\"794863\"]}, {\"input\": \"696\\r\\n\", \"output\": [\"695035\"]}, {\"input\": \"226\\r\\n\", \"output\": [\"376094\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000\\r\\n', 'output': ['691074']}, {'input': '0\\r\\n', 'output': ['1']}, {'input': '11\\r\\n', 'output': ['59049']}, {'input': '226\\r\\n', 'output': ['376094']}, {'input': '617\\r\\n', 'output': ['247876']}]","human_sample_testcases_2":"[{'input': '226\\r\\n', 'output': ['376094']}, {'input': '617\\r\\n', 'output': ['247876']}, {'input': '857\\r\\n', 'output': ['562128']}, {'input': '15\\r\\n', 'output': ['782957']}, {'input': '1000\\r\\n', 'output': ['691074']}]","human_sample_testcases_3":"[{'input': '6\\r\\n', 'output': ['243']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '823\\r\\n', 'output': ['858672']}, {'input': '928\\r\\n', 'output': ['794863']}, {'input': '589\\r\\n', 'output': ['889192']}]","human_sample_testcases_4":"[{'input': '589\\r\\n', 'output': ['889192']}, {'input': '14\\r\\n', 'output': ['594320']}, {'input': '910\\r\\n', 'output': ['678945']}, {'input': '823\\r\\n', 'output': ['858672']}, {'input': '4\\r\\n', 'output': ['27']}]","human_sample_testcases_5":"[{'input': '15\\r\\n', 'output': ['782957']}, {'input': '823\\r\\n', 'output': ['858672']}, {'input': '857\\r\\n', 'output': ['562128']}, {'input': '696\\r\\n', 'output': ['695035']}, {'input': '226\\r\\n', 'output': ['376094']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":93.75,"human_sample_line_coverage_2":81.25,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":81.25,"human_sample_line_coverage_5":81.25,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":66.67,"id":59,"human_sample_pass_rate":100.0,"human_sample_line_coverage":85.0,"human_sample_branch_coverage":73.334} {"sample_inputs":"[\"2 3\\n1 3\", \"2 4\\n2 2\", \"3 5\\n1 3 2\"]","input_specification":"The first line of input contains two space-separated integers n and s (1\u2009\u2264\u2009n\u2009\u2264\u200920, 0\u2009\u2264\u2009s\u2009\u2264\u20091014). The second line contains n space-separated integers f1,\u2009f2,\u2009... fn (0\u2009\u2264\u2009fi\u2009\u2264\u20091012).","src_uid":"8b883011eba9d15d284e54c7a85fcf74","source_code":"#include\nlong long f[23],n,s,sum,inv[25];\nint c[23];\nint function(){\n\tint i,t1,j=0;\n\ti=1;\n\t\n\twhile(1){\n\t\tif(c[i]==0){\n\t\t\tc[i]=1;\n\t\t\tbreak;\n\t\t}else{\n\t\t\tc[i]=0;\n\t\t\ti++;\n\t\t}\n\t}\n}\t\n\nlong long power(long long a, long long b, long long MOD) {\nlong long x = 1, y = a; \n while(b > 0) {\n if(b%2 == 1) {\n x=(x*y);\n if(x>MOD) x%=MOD;\n }\n y = (y*y);\n if(y>MOD) y%=MOD;\n b \/= 2;\n \n }\n return x;\n}\n \nlong long modInverse(long long a,long long m) {\nif(inv[a]==0)\n inv[a]=power(a,m-2,m);\n return inv[a];\n}\n\nlong long binomialCoeff(long long n, long long k)\n{\n long long i,res = 1;\n if (k >( n - k))\n k = n - k;\t\n for ( i = 0; i < k; ++i)\n {\n res =(res* ((n - i)%1000000007))%1000000007;\n res =(res* modInverse((i + 1),1000000007))%1000000007;\n }\n\n return res;\n}\nvoid recursion(int i,long long pow,int fac){\n\tint j;\n\ti=0;\n\twhile(1){\n\t\tfac=1;\n\t\tj=0;\n\t\tpow=0;\n\t\tfor(i=1;i<=n;i++){\n\t\t\tpow=pow+c[i]*(f[i]+1);\n\t\t\tif(c[i]==1){\tfac=fac*-1;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\tif(pow<=s){\t\t\t\t\n\t\t\tsum=(sum+fac*binomialCoeff(n+s-pow-1,s-pow))%1000000007;\n\t\t}\n\t\tif(j==n)\tbreak;\n\t\tfunction();\n\t}\n}\n\nint main(){\n\tlong long i,j,k,l;\n\tscanf(\"%lld %lld\",&n,&s);\n\tfor(i=1;i<=n;i++)\tscanf(\"%lld\",&f[i]);\n\trecursion(1,0,1);\n\tsum=(sum+1000000007)%1000000007;\n\tprintf(\"%lld\\n\",sum);\n\treturn 0;\n}\n","sample_outputs":"[\"2\", \"1\", \"3\"]","lang_cluster":"C","notes":"NoteSample 1. There are two ways of selecting 3 flowers: {1,\u20092} and {0,\u20093}.Sample 2. There is only one way of selecting 4 flowers: {2,\u20092}.Sample 3. There are three ways of selecting 5 flowers: {1,\u20092,\u20092}, {0,\u20093,\u20092}, and {1,\u20093,\u20091}.","output_specification":"Output a single integer \u2014 the number of ways in which Devu can select the flowers modulo (109\u2009+\u20097).","description":"Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of the same color (hence they are indistinguishable). Also, no two boxes have flowers of the same color.Now Devu wants to select exactly s flowers from the boxes to decorate his garden. Devu would like to know, in how many different ways can he select the flowers from each box? Since this number may be very large, he asks you to find the number modulo (109\u2009+\u20097). Devu considers two ways different if there is at least one box from which different number of flowers are selected in these two ways.","human_testcases":"[{\"input\": \"2 3\\r\\n1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 4\\r\\n2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 5\\r\\n1 3 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 270030023747\\r\\n891135146290 437305641972\\r\\n\", \"output\": [\"30021858\"]}, {\"input\": \"20 4385085334307\\r\\n273634411136 208521328637 450482376435 844118010709 197241285878 472126475472 2414038897 672334205413 809269727018 409013884362 739986692075 953956651947 462216461906 388007176838 245504550965 527140291750 632844435887 550532123833 757200390348 944901802640\\r\\n\", \"output\": [\"316418090\"]}, {\"input\": \"20 3752307092657\\r\\n283053521097 653583221811 681984546714 933027822250 487241474739 534269715560 834243597472 848019110117 485265346854 396702345118 408945102153 816559907551 401511139988 367150665755 712567362471 717769226958 548952754032 434801840119 879399744983 324531633609\\r\\n\", \"output\": [\"381258106\"]}, {\"input\": \"20 16619020188439\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"801984344\"]}, {\"input\": \"20 262144\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"725216474\"]}, {\"input\": \"20 5230175580\\r\\n2 8 26 80 242 728 2186 6560 19682 59048 177146 531440 1594322 4782968 14348906 43046720 129140162 387420488 1162261466 3486784400\\r\\n\", \"output\": [\"538211934\"]}, {\"input\": \"20 5230176570\\r\\n2 8 26 80 242 728 2186 6560 19682 59048 177146 531440 1594322 4782968 14348906 43046720 129140162 387420488 1162261466 3486784400\\r\\n\", \"output\": [\"19372190\"]}, {\"input\": \"20 818000201\\r\\n0 2 8 26 80 242 728 2186 6560 19682 59048 177146 531440 1594322 4782968 14348906 43046720 129140162 387420488 1162261466\\r\\n\", \"output\": [\"505949526\"]}, {\"input\": \"1 1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 4\\r\\n3 3 4 4 4\\r\\n\", \"output\": [\"68\"]}, {\"input\": \"3 850878851187\\r\\n599705086316 802990808570 221067397125\\r\\n\", \"output\": [\"334902111\"]}, {\"input\": \"4 731767033652\\r\\n306127542694 172970942464 358017806176 394151815116\\r\\n\", \"output\": [\"418840506\"]}, {\"input\": \"5 1199105497223\\r\\n12549999072 542951076358 494968215227 507969287352 287108873850\\r\\n\", \"output\": [\"997302283\"]}, {\"input\": \"6 2407012786524\\r\\n721119939098 908636242955 629771140630 619639275940 522572133850 990422786968\\r\\n\", \"output\": [\"338886284\"]}, {\"input\": \"7 1658412315976\\r\\n390687619668 278616376849 766721549681 733456748176 716885650745 179493438565 887893058525\\r\\n\", \"output\": [\"227709251\"]}, {\"input\": \"8 3813157100184\\r\\n94962592398 646449027095 903671958732 847274220411 915494134937 336004281651 958773586686 419294404968\\r\\n\", \"output\": [\"789858236\"]}, {\"input\": \"9 3583740972033\\r\\n805680016072 12134193693 38474884135 958944208999 114102619129 486072673792 990651855390 976802100017 464520935171\\r\\n\", \"output\": [\"411195526\"]}, {\"input\": \"10 1303630103199\\r\\n335013516244 958354148440 976543431084 565663694920 818191244892 247036352979 903603155051 844331675449 5958875397 633112048156\\r\\n\", \"output\": [\"130003736\"]}, {\"input\": \"11 3413722756227\\r\\n41435972622 328334282334 113493840135 681628650803 53654504892 397104745120 937628907403 397544403202 978080140924 138793325393 275583919363\\r\\n\", \"output\": [\"481042457\"]}, {\"input\": \"12 3950166899748\\r\\n752153396296 698314416228 246149281890 795446123039 250115505435 549320620909 4214468268 918197322444 952348890098 685624345734 963610131910 998304966486\\r\\n\", \"output\": [\"704755232\"]}, {\"input\": \"13 3231756157805\\r\\n456428369026 63999582826 385247174589 909263595275 444429022331 701536496698 38240220621 473557533845 887615379817 195600590268 694933571209 105486312375 699514624098\\r\\n\", \"output\": [\"21927593\"]}, {\"input\": \"14 5118792034176\\r\\n162850825404 433979716719 522197583640 20933583863 643037506523 851604888839 104825781485 989915485791 859736645343 740284126961 419814559564 214815141912 468744648539 228783909097\\r\\n\", \"output\": [\"80223119\"]}, {\"input\": \"15 1558494741523\\r\\n871420765430 803959850613 654853025395 134751056099 837351023419 8115731924 136704050190 545275697192 831857910870 250260371494 109988255759 324143971449 270534481491 203417577675 71520651905\\r\\n\", \"output\": [\"674766437\"]}, {\"input\": \"16 788453604753\\r\\n577843221808 167497533563 791803434447 283275820494 72814283419 158184124065 203289611054 98488424946 799684209100 792796424539 834869244114 427030350042 39764505931 217053505710 484435378338 862395026264\\r\\n\", \"output\": [\"652797798\"]}, {\"input\": \"17 9007952448244\\r\\n282118194538 537477667457 930901327146 397093292730 264980316667 347254775663 237315363407 616993860539 771805474627 339627444880 525042940309 536359179580 804699563076 230689433744 897350104771 814486287026 524910356697\\r\\n\", \"output\": [\"31329302\"]}, {\"input\": \"18 7999930929823\\r\\n992835618212 907457801350 63556768901 515205732262 463588800858 499470651452 303900924272 170206588293 707071964345 849603689414 249923928664 643540525469 608636879676 207470585970 342824639716 768725031437 470251089472 346311861570\\r\\n\", \"output\": [\"648904203\"]}, {\"input\": \"19 9705775952949\\r\\n662403298782 277437935244 200507177952 626875720850 657902317754 649539043593 337926676624 688712023886 679193229872 394287226107 940097624859 752869355006 377866904116 218959030357 755739366148 759818551656 454594081704 739525703426 242214895448\\r\\n\", \"output\": [\"810780885\"]}, {\"input\": \"2 412849959951\\r\\n186777869134 354554126688\\r\\n\", \"output\": [\"482034976\"]}, {\"input\": \"3 994437863260\\r\\n596847635049 634289413919 671297779787\\r\\n\", \"output\": [\"912049453\"]}, {\"input\": \"4 484402508263\\r\\n19064884611 335165127717 322359010582 281374567239\\r\\n\", \"output\": [\"289015253\"]}, {\"input\": \"5 791953923546\\r\\n435577101470 614900414949 563017233052 356648566543 441001524035\\r\\n\", \"output\": [\"173305014\"]}, {\"input\": \"6 2640586287988\\r\\n845646867385 315776128746 214078463847 838768025119 708835459344 934321520813\\r\\n\", \"output\": [\"795903668\"]}, {\"input\": \"7 2053179920110\\r\\n674709576219 593363932330 454736686317 330887483693 391367370275 279198145307 147889917494\\r\\n\", \"output\": [\"893383692\"]}, {\"input\": \"8 439869733705\\r\\n96926825781 294239646128 105797917112 808711974973 661348789232 209376794178 892923476071 68560519128\\r\\n\", \"output\": [\"158940804\"]}, {\"input\": \"9 1291213158274\\r\\n506996591696 573974933359 753301598853 302978917195 348175667460 544253418672 652252001943 837793929669 992753968527\\r\\n\", \"output\": [\"115213603\"]}, {\"input\": \"10 957014537036\\r\\n817957214028 21216064562 782979338116 99716780532 466634308294 252843354854 653225805495 197215781879 450502843918 936581467941\\r\\n\", \"output\": [\"339756041\"]}, {\"input\": \"11 2523835918230\\r\\n238026979942 300951351794 27195109640 583983722756 153461186521 589867462996 410406847719 383294651690 434136016355 239499156985 605005205631\\r\\n\", \"output\": [\"410668022\"]}, {\"input\": \"12 237485322803\\r\\n654539196801 989679581945 674698791381 76103181330 828140581102 517898628219 165440406295 160380578581 10923729522 532416846030 869246361010 697649464752\\r\\n\", \"output\": [\"882287279\"]}, {\"input\": \"13 3269153679576\\r\\n76756446363 279414869175 913209530202 553927672610 103827032762 854922736361 505775989249 925319021826 982409418312 237885027049 548185492012 981990500354 816927519686\\r\\n\", \"output\": [\"771986243\"]}, {\"input\": \"14 3533400720920\\r\\n486826212278 970290582974 566418244646 46047131184 780653910990 782953901584 265104515121 121397891635 966042590749 530802716094 816721614687 274184052307 410140678523 769875336369\\r\\n\", \"output\": [\"641684934\"]}, {\"input\": \"15 2774417264718\\r\\n899043461842 260025870205 221774442737 121321130489 60635329946 132125493373 24433040993 886336334879 945380795890 823720405139 90962770066 149532144989 995501321008 824453862177 210161921008\\r\\n\", \"output\": [\"36123304\"]}, {\"input\": \"16 6819891369867\\r\\n321260711404 950901584003 458137697911 603440589064 737462208174 469149601515 771614083218 82415204689 522168509057 535631037101 355203925446 429578213295 590861963493 295877847255 313625384311 583033522628\\r\\n\", \"output\": [\"348393153\"]}, {\"input\": \"17 2309534620849\\r\\n148175936589 240636871234 113493896003 95560047639 15296143483 397180766738 530942609090 847353647933 503654197846 828548726146 36290540095 711771765248 184075122329 350456373063 419236331263 152256813920 755146994664\\r\\n\", \"output\": [\"379054730\"]}, {\"input\": \"18 1950920788528\\r\\n560393186152 931512585032 349857151176 577679506214 687828054415 734204874881 285976167666 626587058472 487287370283 127171447894 300531695475 996112800850 765140797519 400739931575 522699794566 124030597188 562898195459 475763385703\\r\\n\", \"output\": [\"698191096\"]}, {\"input\": \"19 4682267377407\\r\\n970462952067 221247872263 995213349269 65503997493 957809473372 662236040104 43157209890 812665928283 64075083449 420089136939 564772850855 288306352803 360501440003 860016433006 626163257870 93656896807 955951420632 637845969941 165819589855\\r\\n\", \"output\": [\"523191343\"]}, {\"input\": \"20 14017821532816\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"347848142\"]}, {\"input\": \"20 16335271760241\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"395113180\"]}, {\"input\": \"20 18060579396941\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"668178260\"]}, {\"input\": \"20 10137806992108\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"357383650\"]}, {\"input\": \"20 17054536210144\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"517516660\"]}, {\"input\": \"20 14387278835382\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"467238355\"]}, {\"input\": \"20 10472667171608\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"868395358\"]}, {\"input\": \"20 9876740295167\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"125737184\"]}, {\"input\": \"20 9502335428550\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"209415674\"]}, {\"input\": \"20 16899776686559\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n\", \"output\": [\"212580649\"]}, {\"input\": \"1 1\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 10043\\r\\n2 8 26 80 242 728 2186 6560 19682 59048 177146 531440 1594322 4782968 14348906 43046720 129140162 387420488 1162261466 3486784400\\r\\n\", \"output\": [\"52142433\"]}, {\"input\": \"1 0\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17 953674316167\\r\\n4 24 124 624 3124 15624 78124 390624 1953124 9765624 48828124 244140624 1220703124 6103515624 30517578124 152587890624 762939453124\\r\\n\", \"output\": [\"197405646\"]}, {\"input\": \"17 953674314899\\r\\n4 24 124 624 3124 15624 78124 390624 1953124 9765624 48828124 244140624 1220703124 6103515624 30517578124 152587890624 762939453124\\r\\n\", \"output\": [\"307042369\"]}, {\"input\": \"17 953674312906\\r\\n4 24 124 624 3124 15624 78124 390624 1953124 9765624 48828124 244140624 1220703124 6103515624 30517578124 152587890624 762939453124\\r\\n\", \"output\": [\"81725967\"]}, {\"input\": \"20 33554432\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 1048554\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"20 1048455\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"461657829\"]}, {\"input\": \"20 1038555\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"216743080\"]}, {\"input\": \"20 64741\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n\", \"output\": [\"181890008\"]}, {\"input\": \"20 125618\\r\\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288\\r\\n\", \"output\": [\"435524008\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '20 17054536210144\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n', 'output': ['517516660']}, {'input': '20 1048455\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n', 'output': ['461657829']}, {'input': '16 788453604753\\r\\n577843221808 167497533563 791803434447 283275820494 72814283419 158184124065 203289611054 98488424946 799684209100 792796424539 834869244114 427030350042 39764505931 217053505710 484435378338 862395026264\\r\\n', 'output': ['652797798']}, {'input': '17 9007952448244\\r\\n282118194538 537477667457 930901327146 397093292730 264980316667 347254775663 237315363407 616993860539 771805474627 339627444880 525042940309 536359179580 804699563076 230689433744 897350104771 814486287026 524910356697\\r\\n', 'output': ['31329302']}, {'input': '9 3583740972033\\r\\n805680016072 12134193693 38474884135 958944208999 114102619129 486072673792 990651855390 976802100017 464520935171\\r\\n', 'output': ['411195526']}]","human_sample_testcases_2":"[{'input': '17 2309534620849\\r\\n148175936589 240636871234 113493896003 95560047639 15296143483 397180766738 530942609090 847353647933 503654197846 828548726146 36290540095 711771765248 184075122329 350456373063 419236331263 152256813920 755146994664\\r\\n', 'output': ['379054730']}, {'input': '17 9007952448244\\r\\n282118194538 537477667457 930901327146 397093292730 264980316667 347254775663 237315363407 616993860539 771805474627 339627444880 525042940309 536359179580 804699563076 230689433744 897350104771 814486287026 524910356697\\r\\n', 'output': ['31329302']}, {'input': '13 3269153679576\\r\\n76756446363 279414869175 913209530202 553927672610 103827032762 854922736361 505775989249 925319021826 982409418312 237885027049 548185492012 981990500354 816927519686\\r\\n', 'output': ['771986243']}, {'input': '5 1199105497223\\r\\n12549999072 542951076358 494968215227 507969287352 287108873850\\r\\n', 'output': ['997302283']}, {'input': '8 3813157100184\\r\\n94962592398 646449027095 903671958732 847274220411 915494134937 336004281651 958773586686 419294404968\\r\\n', 'output': ['789858236']}]","human_sample_testcases_3":"[{'input': '20 1048455\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n', 'output': ['461657829']}, {'input': '2 270030023747\\r\\n891135146290 437305641972\\r\\n', 'output': ['30021858']}, {'input': '7 2053179920110\\r\\n674709576219 593363932330 454736686317 330887483693 391367370275 279198145307 147889917494\\r\\n', 'output': ['893383692']}, {'input': '9 1291213158274\\r\\n506996591696 573974933359 753301598853 302978917195 348175667460 544253418672 652252001943 837793929669 992753968527\\r\\n', 'output': ['115213603']}, {'input': '18 7999930929823\\r\\n992835618212 907457801350 63556768901 515205732262 463588800858 499470651452 303900924272 170206588293 707071964345 849603689414 249923928664 643540525469 608636879676 207470585970 342824639716 768725031437 470251089472 346311861570\\r\\n', 'output': ['648904203']}]","human_sample_testcases_4":"[{'input': '3 5\\r\\n1 3 2\\r\\n', 'output': ['3']}, {'input': '3 850878851187\\r\\n599705086316 802990808570 221067397125\\r\\n', 'output': ['334902111']}, {'input': '6 2640586287988\\r\\n845646867385 315776128746 214078463847 838768025119 708835459344 934321520813\\r\\n', 'output': ['795903668']}, {'input': '20 14017821532816\\r\\n1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000 1000000000000\\r\\n', 'output': ['347848142']}, {'input': '20 1048455\\r\\n0 1 3 7 15 31 63 127 255 511 1023 2047 4095 8191 16383 32767 65535 131071 262143 524287\\r\\n', 'output': ['461657829']}]","human_sample_testcases_5":"[{'input': '17 2309534620849\\r\\n148175936589 240636871234 113493896003 95560047639 15296143483 397180766738 530942609090 847353647933 503654197846 828548726146 36290540095 711771765248 184075122329 350456373063 419236331263 152256813920 755146994664\\r\\n', 'output': ['379054730']}, {'input': '5 1199105497223\\r\\n12549999072 542951076358 494968215227 507969287352 287108873850\\r\\n', 'output': ['997302283']}, {'input': '17 953674312906\\r\\n4 24 124 624 3124 15624 78124 390624 1953124 9765624 48828124 244140624 1220703124 6103515624 30517578124 152587890624 762939453124\\r\\n', 'output': ['81725967']}, {'input': '17 953674314899\\r\\n4 24 124 624 3124 15624 78124 390624 1953124 9765624 48828124 244140624 1220703124 6103515624 30517578124 152587890624 762939453124\\r\\n', 'output': ['307042369']}, {'input': '10 1303630103199\\r\\n335013516244 958354148440 976543431084 565663694920 818191244892 247036352979 903603155051 844331675449 5958875397 633112048156\\r\\n', 'output': ['130003736']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":96.15,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":96.15,"id":60,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":98.46} {"sample_inputs":"[\"1 5\", \"2 3\"]","input_specification":"The first line of input contains two space-separated integers m and b (1\u2009\u2264\u2009m\u2009\u2264\u20091000, 1\u2009\u2264\u2009b\u2009\u2264\u200910000).","src_uid":"9300f1c07dd36e0cf7e6cb7911df4cf2","source_code":"#include \n#include \n\nint main(void){\n\tlong long int m, b;\n\tscanf(\"%lld%lld\", &m, &b);\n\tlong long int i;\n\tlong long int max = INT_MIN;\n\tfor(i=b; i>=0; i--){\n\t\tlong long int x = (b-i)*m;\n\t\tlong long int w = x*(x+1)\/2;\n\t\tlong long int p = i*(i+1)\/2;\n\t\tlong long int val = w*(i+1)+p*(x+1);\n\t\tif(val > max){\n\t\t\tmax = val;\n\t\t}\n\t}\n\tprintf(\"%lld\\n\", max);\n\treturn 0;\n}","sample_outputs":"[\"30\", \"25\"]","lang_cluster":"C","notes":"Note The graph above corresponds to sample test 1. The optimal rectangle is shown in red and has 30 bananas.","output_specification":"Print the maximum number of bananas Okabe can get from the trees he cuts.","description":"Okabe needs bananas for one of his experiments for some strange reason. So he decides to go to the forest and cut banana trees.Consider the point (x,\u2009y) in the 2D plane such that x and y are integers and 0\u2009\u2264\u2009x,\u2009y. There is a tree in such a point, and it has x\u2009+\u2009y bananas. There are no trees nor bananas in other points. Now, Okabe draws a line with equation . Okabe can select a single rectangle with axis aligned sides with all points on or under the line and cut all the trees in all points that are inside or on the border of this rectangle and take their bananas. Okabe's rectangle can be degenerate; that is, it can be a line segment or even a point.Help Okabe and find the maximum number of bananas he can get if he chooses the rectangle wisely.Okabe is sure that the answer does not exceed 1018. You can trust him.","human_testcases":"[{\"input\": \"1 5\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"4 6\\r\\n\", \"output\": [\"459\"]}, {\"input\": \"6 3\\r\\n\", \"output\": [\"171\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 1\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"20 10\\r\\n\", \"output\": [\"40326\"]}, {\"input\": \"1000 10000\\r\\n\", \"output\": [\"74133360011484445\"]}, {\"input\": \"139 9252\\r\\n\", \"output\": [\"1137907933561080\"]}, {\"input\": \"859 8096\\r\\n\", \"output\": [\"29032056230649780\"]}, {\"input\": \"987 4237\\r\\n\", \"output\": [\"5495451829240878\"]}, {\"input\": \"411 3081\\r\\n\", \"output\": [\"366755153481948\"]}, {\"input\": \"539 9221\\r\\n\", \"output\": [\"16893595018603386\"]}, {\"input\": \"259 770\\r\\n\", \"output\": [\"2281741798549\"]}, {\"input\": \"387 5422\\r\\n\", \"output\": [\"1771610559998400\"]}, {\"input\": \"515 1563\\r\\n\", \"output\": [\"75233740231341\"]}, {\"input\": \"939 407\\r\\n\", \"output\": [\"4438222781916\"]}, {\"input\": \"518 6518\\r\\n\", \"output\": [\"5511730799718825\"]}, {\"input\": \"646 1171\\r\\n\", \"output\": [\"49802404050106\"]}, {\"input\": \"70 7311\\r\\n\", \"output\": [\"142915220249910\"]}, {\"input\": \"494 6155\\r\\n\", \"output\": [\"4221391613846823\"]}, {\"input\": \"918 7704\\r\\n\", \"output\": [\"28569727339126165\"]}, {\"input\": \"46 3844\\r\\n\", \"output\": [\"9007500020760\"]}, {\"input\": \"174 2688\\r\\n\", \"output\": [\"43730657099581\"]}, {\"input\": \"894 4637\\r\\n\", \"output\": [\"5909849585253250\"]}, {\"input\": \"22 3481\\r\\n\", \"output\": [\"1548544125646\"]}, {\"input\": \"446 5030\\r\\n\", \"output\": [\"1878390629993745\"]}, {\"input\": \"440 8704\\r\\n\", \"output\": [\"9470470760118060\"]}, {\"input\": \"569 7548\\r\\n\", \"output\": [\"10326205017481606\"]}, {\"input\": \"289 6393\\r\\n\", \"output\": [\"1620061541812350\"]}, {\"input\": \"417 1045\\r\\n\", \"output\": [\"14758909519725\"]}, {\"input\": \"841 7185\\r\\n\", \"output\": [\"19452619774222875\"]}, {\"input\": \"969 6030\\r\\n\", \"output\": [\"15265318959845745\"]}, {\"input\": \"393 4874\\r\\n\", \"output\": [\"1327174123029975\"]}, {\"input\": \"817 3719\\r\\n\", \"output\": [\"2546859449982016\"]}, {\"input\": \"945 2563\\r\\n\", \"output\": [\"1115613396515835\"]}, {\"input\": \"369 4511\\r\\n\", \"output\": [\"927715710215505\"]}, {\"input\": \"555 3594\\r\\n\", \"output\": [\"1061060598862891\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '515 1563\\r\\n', 'output': ['75233740231341']}, {'input': '918 7704\\r\\n', 'output': ['28569727339126165']}, {'input': '446 5030\\r\\n', 'output': ['1878390629993745']}, {'input': '945 2563\\r\\n', 'output': ['1115613396515835']}, {'input': '494 6155\\r\\n', 'output': ['4221391613846823']}]","human_sample_testcases_2":"[{'input': '515 1563\\r\\n', 'output': ['75233740231341']}, {'input': '4 6\\r\\n', 'output': ['459']}, {'input': '259 770\\r\\n', 'output': ['2281741798549']}, {'input': '555 3594\\r\\n', 'output': ['1061060598862891']}, {'input': '387 5422\\r\\n', 'output': ['1771610559998400']}]","human_sample_testcases_3":"[{'input': '393 4874\\r\\n', 'output': ['1327174123029975']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '417 1045\\r\\n', 'output': ['14758909519725']}, {'input': '539 9221\\r\\n', 'output': ['16893595018603386']}, {'input': '70 7311\\r\\n', 'output': ['142915220249910']}]","human_sample_testcases_4":"[{'input': '1000 10000\\r\\n', 'output': ['74133360011484445']}, {'input': '10 1\\r\\n', 'output': ['55']}, {'input': '2 3\\r\\n', 'output': ['25']}, {'input': '894 4637\\r\\n', 'output': ['5909849585253250']}, {'input': '539 9221\\r\\n', 'output': ['16893595018603386']}]","human_sample_testcases_5":"[{'input': '22 3481\\r\\n', 'output': ['1548544125646']}, {'input': '20 10\\r\\n', 'output': ['40326']}, {'input': '446 5030\\r\\n', 'output': ['1878390629993745']}, {'input': '841 7185\\r\\n', 'output': ['19452619774222875']}, {'input': '945 2563\\r\\n', 'output': ['1115613396515835']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":61,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1 2\", \"3 4 5\", \"4 1 1\"]","input_specification":"The single line of the input contains three space-separated integers a, b and c (1\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u2009106) \u2014 the valence numbers of the given atoms.","src_uid":"b3b986fddc3770fed64b878fa42ab1bc","source_code":"#include\n#include\n\nint main()\n{\n int a,b,c;\n\n scanf(\"%d %d %d\",&a,&b,&c);\n\n int K = (a+b-c)\/2;\n int K2 = (b+c-a)\/2;\n if(K >= 0 && K2>= 0 && a- K >=0 && 2*(K + K2 + (a - K)) == (a + b + c))\n {\n printf(\"%d %d %d\\n\",K,K2,a-K);\n }\n else\n {\n printf(\"Impossible\\n\");\n }\n return 0;\n}\n","sample_outputs":"[\"0 1 1\", \"1 3 2\", \"Impossible\"]","lang_cluster":"C","notes":"NoteThe first sample corresponds to the first figure. There are no bonds between atoms 1 and 2 in this case.The second sample corresponds to the second figure. There is one or more bonds between each pair of atoms.The third sample corresponds to the third figure. There is no solution, because an atom cannot form bonds with itself.The configuration in the fourth figure is impossible as each atom must have at least one atomic bond.","output_specification":"If such a molecule can be built, print three space-separated integers \u2014 the number of bonds between the 1-st and the 2-nd, the 2-nd and the 3-rd, the 3-rd and the 1-st atoms, correspondingly. If there are multiple solutions, output any of them. If there is no solution, print \"Impossible\" (without the quotes).","description":"Mad scientist Mike is busy carrying out experiments in chemistry. Today he will attempt to join three atoms into one molecule.A molecule consists of atoms, with some pairs of atoms connected by atomic bonds. Each atom has a valence number \u2014 the number of bonds the atom must form with other atoms. An atom can form one or multiple bonds with any other atom, but it cannot form a bond with itself. The number of bonds of an atom in the molecule must be equal to its valence number. Mike knows valence numbers of the three atoms. Find a molecule that can be built from these atoms according to the stated rules, or determine that it is impossible.","human_testcases":"[{\"input\": \"1 1 2\\r\\n\", \"output\": [\"0 1 1\"]}, {\"input\": \"3 4 5\\r\\n\", \"output\": [\"1 3 2\"]}, {\"input\": \"4 1 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 1000000 1000000\\r\\n\", \"output\": [\"500000 500000 500000\"]}, {\"input\": \"3 11 8\\r\\n\", \"output\": [\"3 8 0\"]}, {\"input\": \"8 5 12\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 500000 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 500000 2\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"2 2 2\"]}, {\"input\": \"2 4 2\\r\\n\", \"output\": [\"2 2 0\"]}, {\"input\": \"10 5 14\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"10 5 15\\r\\n\", \"output\": [\"0 5 10\"]}, {\"input\": \"10 4 16\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"3 3 6\\r\\n\", \"output\": [\"0 3 3\"]}, {\"input\": \"9 95 90\\r\\n\", \"output\": [\"7 88 2\"]}, {\"input\": \"3 5 8\\r\\n\", \"output\": [\"0 5 3\"]}, {\"input\": \"5 8 13\\r\\n\", \"output\": [\"0 8 5\"]}, {\"input\": \"6 1 5\\r\\n\", \"output\": [\"1 0 5\"]}, {\"input\": \"59 54 56\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"246 137 940\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"7357 3578 9123\\r\\n\", \"output\": [\"906 2672 6451\"]}, {\"input\": \"93952 49553 83405\\r\\n\", \"output\": [\"30050 19503 63902\"]}, {\"input\": \"688348 726472 442198\\r\\n\", \"output\": [\"486311 240161 202037\"]}, {\"input\": \"602752 645534 784262\\r\\n\", \"output\": [\"232012 413522 370740\"]}, {\"input\": \"741349 48244 642678\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"655754 418251 468390\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"310703 820961 326806\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1 1 3\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"5 1 4\\r\\n\", \"output\": [\"1 0 4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000 1000000 1000000\\r\\n', 'output': ['500000 500000 500000']}, {'input': '3 3 3\\r\\n', 'output': ['Impossible']}, {'input': '1 1 3\\r\\n', 'output': ['Impossible']}, {'input': '246 137 940\\r\\n', 'output': ['Impossible']}, {'input': '6 1 5\\r\\n', 'output': ['1 0 5']}]","human_sample_testcases_2":"[{'input': '5 1 4\\r\\n', 'output': ['1 0 4']}, {'input': '4 1 1\\r\\n', 'output': ['Impossible']}, {'input': '3 3 3\\r\\n', 'output': ['Impossible']}, {'input': '1 1 2\\r\\n', 'output': ['0 1 1']}, {'input': '602752 645534 784262\\r\\n', 'output': ['232012 413522 370740']}]","human_sample_testcases_3":"[{'input': '1000000 1000000 1000000\\r\\n', 'output': ['500000 500000 500000']}, {'input': '3 5 8\\r\\n', 'output': ['0 5 3']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '4 4 4\\r\\n', 'output': ['2 2 2']}, {'input': '2 4 2\\r\\n', 'output': ['2 2 0']}]","human_sample_testcases_4":"[{'input': '5 1 4\\r\\n', 'output': ['1 0 4']}, {'input': '2 2 2\\r\\n', 'output': ['1 1 1']}, {'input': '4 1 1\\r\\n', 'output': ['Impossible']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '3 3 3\\r\\n', 'output': ['Impossible']}]","human_sample_testcases_5":"[{'input': '10 5 14\\r\\n', 'output': ['Impossible']}, {'input': '5 8 13\\r\\n', 'output': ['0 8 5']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '5 1 4\\r\\n', 'output': ['1 0 4']}, {'input': '310703 820961 326806\\r\\n', 'output': ['Impossible']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":62.5,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":62,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":72.5} {"sample_inputs":"[\"12\\ntoosmallword\", \"35\\nTheQuickBrownFoxJumpsOverTheLazyDog\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100)\u00a0\u2014 the number of characters in the string. The second line contains the string. The string consists only of uppercase and lowercase Latin letters.","src_uid":"f13eba0a0fb86e20495d218fc4ad532d","source_code":"#include\nint main(void)\n{\n int i,j,n,m=0,k=0;\n char a[101];\n while((scanf(\"%d\",&n))!=EOF)\n {\n m=0;\n for(i=0;i\nint main()\n{\n int n,b,p,nb,np,temp,count=0,r;\n scanf(\"%d %d %d\",&n,&b,&p);\n printf(\"%d %d\",(n-1)*(2*b+1),n*p);\n\n return 0;\n}\n\n\n","sample_outputs":"[\"20 15\", \"35 32\"]","lang_cluster":"C","notes":"NoteIn the first example will be three rounds: in the first round will be two matches and for each match 5 bottles of water are needed (two for each of the participants and one for the judge), in the second round will be only one match, so we need another 5 bottles of water, in the third round will also be only one match, so we need another 5 bottles of water. So in total we need 20 bottles of water.In the second example no participant will move on to some round directly.","output_specification":"Print two integers x and y \u2014 the number of bottles and towels need for the tournament.","description":"A tennis tournament with n participants is running. The participants are playing by an olympic system, so the winners move on and the losers drop out.The tournament takes place in the following way (below, m is the number of the participants of the current round): let k be the maximal power of the number 2 such that k\u2009\u2264\u2009m, k participants compete in the current round and a half of them passes to the next round, the other m\u2009-\u2009k participants pass to the next round directly, when only one participant remains, the tournament finishes. Each match requires b bottles of water for each participant and one bottle for the judge. Besides p towels are given to each participant for the whole tournament.Find the number of bottles and towels needed for the tournament.Note that it's a tennis tournament so in each match two participants compete (one of them will win and the other will lose).","human_testcases":"[{\"input\": \"5 2 3\\r\\n\", \"output\": [\"20\\r\\n15\", \"20 15\"]}, {\"input\": \"8 2 4\\r\\n\", \"output\": [\"35\\r\\n32\", \"35 32\"]}, {\"input\": \"10 1 500\\r\\n\", \"output\": [\"27 5000\", \"27\\r\\n5000\"]}, {\"input\": \"20 500 1\\r\\n\", \"output\": [\"19019\\r\\n20\", \"19019 20\"]}, {\"input\": \"100 123 99\\r\\n\", \"output\": [\"24453\\r\\n9900\", \"24453 9900\"]}, {\"input\": \"500 1 1\\r\\n\", \"output\": [\"1497 500\", \"1497\\r\\n500\"]}, {\"input\": \"500 500 500\\r\\n\", \"output\": [\"499499\\r\\n250000\", \"499499 250000\"]}, {\"input\": \"500 237 474\\r\\n\", \"output\": [\"237025 237000\", \"237025\\r\\n237000\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"0\\r\\n3\", \"0 3\"]}, {\"input\": \"1 2 133\\r\\n\", \"output\": [\"0 133\", \"0\\r\\n133\"]}, {\"input\": \"1 2 100\\r\\n\", \"output\": [\"0 100\", \"0\\r\\n100\"]}, {\"input\": \"1 3 4\\r\\n\", \"output\": [\"0\\r\\n4\", \"0 4\"]}, {\"input\": \"1 10 15\\r\\n\", \"output\": [\"0 15\", \"0\\r\\n15\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 2 5\\r\\n\", \"output\": [\"0 5\", \"0\\r\\n5\"]}, {\"input\": \"1 500 500\\r\\n\", \"output\": [\"0\\r\\n500\", \"0 500\"]}, {\"input\": \"1 3 8\\r\\n\", \"output\": [\"0 8\", \"0\\r\\n8\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"189\\r\\n100\", \"189 100\"]}, {\"input\": \"1 3 5\\r\\n\", \"output\": [\"0 5\", \"0\\r\\n5\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 2 4\\r\\n\", \"output\": [\"0\\r\\n4\", \"0 4\"]}, {\"input\": \"1 10 10\\r\\n\", \"output\": [\"0\\r\\n10\", \"0 10\"]}, {\"input\": \"1 345 345\\r\\n\", \"output\": [\"0 345\", \"0\\r\\n345\"]}, {\"input\": \"7 12 13\\r\\n\", \"output\": [\"150\\r\\n91\", \"150 91\"]}, {\"input\": \"1 500 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 12 13\\r\\n\", \"output\": [\"0 13\", \"0\\r\\n13\"]}, {\"input\": \"1 500 499\\r\\n\", \"output\": [\"0\\r\\n499\", \"0 499\"]}, {\"input\": \"1 100 90\\r\\n\", \"output\": [\"0 90\", \"0\\r\\n90\"]}, {\"input\": \"2 100 90\\r\\n\", \"output\": [\"201 180\", \"201\\r\\n180\"]}, {\"input\": \"53 1 1\\r\\n\", \"output\": [\"156\\r\\n53\", \"156 53\"]}, {\"input\": \"73 73 73\\r\\n\", \"output\": [\"10584 5329\", \"10584\\r\\n5329\"]}, {\"input\": \"67 1 1\\r\\n\", \"output\": [\"198 67\", \"198\\r\\n67\"]}, {\"input\": \"63 1 1\\r\\n\", \"output\": [\"186\\r\\n63\", \"186 63\"]}, {\"input\": \"59 1 1\\r\\n\", \"output\": [\"174\\r\\n59\", \"174 59\"]}, {\"input\": \"57 1 1\\r\\n\", \"output\": [\"168 57\", \"168\\r\\n57\"]}, {\"input\": \"13 1 1\\r\\n\", \"output\": [\"36 13\", \"36\\r\\n13\"]}, {\"input\": \"349 2 5\\r\\n\", \"output\": [\"1740\\r\\n1745\", \"1740 1745\"]}, {\"input\": \"456 456 456\\r\\n\", \"output\": [\"415415\\r\\n207936\", \"415415 207936\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 100 90\\r\\n', 'output': ['0 90', '0\\r\\n90']}, {'input': '1 2 100\\r\\n', 'output': ['0 100', '0\\r\\n100']}, {'input': '1 2 3\\r\\n', 'output': ['0\\r\\n3', '0 3']}, {'input': '10 10 10\\r\\n', 'output': ['189\\r\\n100', '189 100']}, {'input': '1 345 345\\r\\n', 'output': ['0 345', '0\\r\\n345']}]","human_sample_testcases_2":"[{'input': '7 12 13\\r\\n', 'output': ['150\\r\\n91', '150 91']}, {'input': '1 500 500\\r\\n', 'output': ['0\\r\\n500', '0 500']}, {'input': '10 1 500\\r\\n', 'output': ['27 5000', '27\\r\\n5000']}, {'input': '1 2 5\\r\\n', 'output': ['0 5', '0\\r\\n5']}, {'input': '1 100 90\\r\\n', 'output': ['0 90', '0\\r\\n90']}]","human_sample_testcases_3":"[{'input': '1 345 345\\r\\n', 'output': ['0 345', '0\\r\\n345']}, {'input': '20 500 1\\r\\n', 'output': ['19019\\r\\n20', '19019 20']}, {'input': '7 12 13\\r\\n', 'output': ['150\\r\\n91', '150 91']}, {'input': '1 2 100\\r\\n', 'output': ['0 100', '0\\r\\n100']}, {'input': '1 3 4\\r\\n', 'output': ['0\\r\\n4', '0 4']}]","human_sample_testcases_4":"[{'input': '500 500 500\\r\\n', 'output': ['499499\\r\\n250000', '499499 250000']}, {'input': '5 2 3\\r\\n', 'output': ['20\\r\\n15', '20 15']}, {'input': '1 2 5\\r\\n', 'output': ['0 5', '0\\r\\n5']}, {'input': '13 1 1\\r\\n', 'output': ['36 13', '36\\r\\n13']}, {'input': '73 73 73\\r\\n', 'output': ['10584 5329', '10584\\r\\n5329']}]","human_sample_testcases_5":"[{'input': '1 2 1\\r\\n', 'output': ['0 1', '0\\r\\n1']}, {'input': '1 100 90\\r\\n', 'output': ['0 90', '0\\r\\n90']}, {'input': '59 1 1\\r\\n', 'output': ['174\\r\\n59', '174 59']}, {'input': '349 2 5\\r\\n', 'output': ['1740\\r\\n1745', '1740 1745']}, {'input': '1 500 500\\r\\n', 'output': ['0\\r\\n500', '0 500']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":64,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1 1 2\", \"1 2 3 1\", \"10 2 1 7\"]","input_specification":"The single line contains 4 integers a,\u2009b,\u2009c,\u2009l (1\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u20093\u00b7105, 0\u2009\u2264\u2009l\u2009\u2264\u20093\u00b7105).","src_uid":"185ff90a8b0ae0e2b75605f772589410","source_code":"#include\n#define min(a,b) ((a\n#define M 1000000007\nint n,k,i,c,d;\nlong long y,z,u,v,r;\nint F(int a,int b){\n int r=1;\n for (;b;b>>=1,a=(long long)a*a%M){\n if (b&1)r=(long long)r*a%M;\n }\n return r;\n}\nint main(){\n scanf(\"%d%d\",&n,&k);\n if (!k)r=n;\n else{\n if (n<=++k){for(i=1;i<=n;i++)r+=F(i,k-1);}\n else{\n for (u=v=1;i<=k;i++){u=(u*(n-i))%M;if (i)v=((v*-i)%M+M)%M;}\n for (i=0,c=1,d=k;i<=k;i++,c++,d--){\n z=(z+F(i,k-1))%M;\n y=u*z%M*F(n-i,M-2)%M*F(v,M-2)%M;\n v=v*c%M*F(d,M-2)%M;\n if(i&1)y=M-y;\n r+=y;\n }\n }\n }\n printf(\"%lld\\n\",r%M);\n}\n","sample_outputs":"[\"10\", \"30\", \"100\", \"4\"]","lang_cluster":"C","notes":null,"output_specification":"Print the only integer a \u2014 the remainder after dividing the value of the sum by the value 109\u2009+\u20097.","description":"There are well-known formulas: , , . Also mathematicians found similar formulas for higher degrees.Find the value of the sum modulo 109\u2009+\u20097 (so you should find the remainder after dividing the answer by the value 109\u2009+\u20097).","human_testcases":"[{\"input\": \"4 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 2\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"4 3\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"4 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 0\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000 0\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"568830579\"]}, {\"input\": \"10000 100\\r\\n\", \"output\": [\"352711099\"]}, {\"input\": \"100 10000\\r\\n\", \"output\": [\"859998022\"]}, {\"input\": \"1000000000 1000000\\r\\n\", \"output\": [\"617381606\"]}, {\"input\": \"1000000 1000000\\r\\n\", \"output\": [\"997878755\"]}, {\"input\": \"999999 1000000\\r\\n\", \"output\": [\"504760730\"]}, {\"input\": \"77674473 447444\\r\\n\", \"output\": [\"838207299\"]}, {\"input\": \"333312494 795258\\r\\n\", \"output\": [\"393290476\"]}, {\"input\": \"761637147 673329\\r\\n\", \"output\": [\"223778667\"]}, {\"input\": \"335185991 514401\\r\\n\", \"output\": [\"412595240\"]}, {\"input\": \"203702132 355473\\r\\n\", \"output\": [\"229710810\"]}, {\"input\": \"1000000000 999935\\r\\n\", \"output\": [\"729344740\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1000000\\r\\n', 'output': ['1']}, {'input': '100 10000\\r\\n', 'output': ['859998022']}, {'input': '10 0\\r\\n', 'output': ['10']}, {'input': '4 0\\r\\n', 'output': ['4']}, {'input': '203702132 355473\\r\\n', 'output': ['229710810']}]","human_sample_testcases_2":"[{'input': '1000000000 999935\\r\\n', 'output': ['729344740']}, {'input': '4 3\\r\\n', 'output': ['100']}, {'input': '333312494 795258\\r\\n', 'output': ['393290476']}, {'input': '1 1000000\\r\\n', 'output': ['1']}, {'input': '4 1\\r\\n', 'output': ['10']}]","human_sample_testcases_3":"[{'input': '4 2\\r\\n', 'output': ['30']}, {'input': '761637147 673329\\r\\n', 'output': ['223778667']}, {'input': '1000000000 999935\\r\\n', 'output': ['729344740']}, {'input': '4 3\\r\\n', 'output': ['100']}, {'input': '10 0\\r\\n', 'output': ['10']}]","human_sample_testcases_4":"[{'input': '761637147 673329\\r\\n', 'output': ['223778667']}, {'input': '1 0\\r\\n', 'output': ['1']}, {'input': '1000000000 999935\\r\\n', 'output': ['729344740']}, {'input': '77674473 447444\\r\\n', 'output': ['838207299']}, {'input': '4 1\\r\\n', 'output': ['10']}]","human_sample_testcases_5":"[{'input': '100 100\\r\\n', 'output': ['568830579']}, {'input': '1000000000 1000000\\r\\n', 'output': ['617381606']}, {'input': '4 2\\r\\n', 'output': ['30']}, {'input': '203702132 355473\\r\\n', 'output': ['229710810']}, {'input': '100 10000\\r\\n', 'output': ['859998022']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":94.44,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":94.44,"id":66,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":94.442} {"sample_inputs":"[\"4 5\\n2 3 1 4 4\", \"3 3\\n3 1 2\"]","input_specification":"The first line contains two integer numbers n, m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009100). The second line contains m integer numbers l1,\u2009l2,\u2009...,\u2009lm (1\u2009\u2264\u2009li\u2009\u2264\u2009n) \u2014 indices of leaders in the beginning of each step.","src_uid":"4a7c959ca279d0a9bd9bbf0ce88cf72b","source_code":"#include\nint arr[101],no[101],l[100];\nint main()\n{\n\tint n,m,source,desti,temp,flag,k,i;\n\tscanf(\"%d %d\",&n,&m);\n\tfor(i=0;i\n#include\nint compare(const void *a,const void *b)\n{\n return ( *(int*)a - *(int *)b );\n}\nint main()\n{\n int n,i,s=0,p=0,j=0;\n scanf(\"%d\",&n);\n int a[12];\n \n for(i=0;i<12;i++)\n scanf(\"%d\",&a[i]);\n \n qsort(a,12,sizeof(int),compare);\n \n if(n!=0)\n{ for(i=11;i>=0;i--)\n {\n \n s=s+a[i];\n if(s\n *\n * @copyright\n *\n * Copyright (c) 2014, Anton Leontiev\n *\n * Redistribution and use in source and binary forms, with or without modification, are permitted\n * provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice, this list of\n * conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright notice, this list of\n * conditions and the following disclaimer in the documentation and\/or other materials\n * provided with the distribution.\n * 3. Neither the name of Anton Leontiev nor the names of its contributors may be used\n * to endorse or promote products derived from this software without specific prior written\n * permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\n * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n *\/\n\n#include \n#include \n#include \n\nint main(int argc, char *argv[]) {\n\tint a, b, c, d, n, k, m, min = INT_MAX;\n\tscanf(\"%u %u %u %u %u\", &c, &d, &n, &m, &k);\n\tfor (a = 0; a <= m; a++) {\n\t\tb = n * (m - a) - k;\n\t\tb = b > 0 ? b : 0;\n\t\tif (min > a * c + b * d) min = a * c + b * d;\n\t}\n\tprintf(\"%u\\n\", min);\n\treturn EXIT_SUCCESS;\n}\n","sample_outputs":"[\"2\", \"0\"]","lang_cluster":"C","notes":null,"output_specification":"In the first line, print a single integer \u2014 the minimum number of problems the jury needs to prepare.","description":"The finalists of the \"Russian Code Cup\" competition in 2214 will be the participants who win in one of the elimination rounds.The elimination rounds are divided into main and additional. Each of the main elimination rounds consists of c problems, the winners of the round are the first n people in the rating list. Each of the additional elimination rounds consists of d problems. The winner of the additional round is one person. Besides, k winners of the past finals are invited to the finals without elimination.As a result of all elimination rounds at least n\u00b7m people should go to the finals. You need to organize elimination rounds in such a way, that at least n\u00b7m people go to the finals, and the total amount of used problems in all rounds is as small as possible.","human_testcases":"[{\"input\": \"1 10\\r\\n7 2\\r\\n1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 9\\r\\n2 2\\r\\n3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 5\\r\\n8 8\\r\\n7\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"1 8\\r\\n8 10\\r\\n8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 7\\r\\n9 1\\r\\n8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"35 28\\r\\n35 60\\r\\n44\\r\\n\", \"output\": [\"2065\"]}, {\"input\": \"19 76\\r\\n91 91\\r\\n87\\r\\n\", \"output\": [\"1729\"]}, {\"input\": \"20 38\\r\\n38 70\\r\\n58\\r\\n\", \"output\": [\"1380\"]}, {\"input\": \"2 81\\r\\n3 39\\r\\n45\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"7 63\\r\\n18 69\\r\\n30\\r\\n\", \"output\": [\"476\"]}, {\"input\": \"89 69\\r\\n57 38\\r\\n15\\r\\n\", \"output\": [\"3382\"]}, {\"input\": \"3 30\\r\\n10 83\\r\\n57\\r\\n\", \"output\": [\"234\"]}, {\"input\": \"100 3\\r\\n93 23\\r\\n98\\r\\n\", \"output\": [\"2200\"]}, {\"input\": \"2 78\\r\\n21 24\\r\\n88\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"40 80\\r\\n4 31\\r\\n63\\r\\n\", \"output\": [\"640\"]}, {\"input\": \"1 48\\r\\n89 76\\r\\n24\\r\\n\", \"output\": [\"76\"]}, {\"input\": \"5 25\\r\\n13 76\\r\\n86\\r\\n\", \"output\": [\"350\"]}, {\"input\": \"23 86\\r\\n83 88\\r\\n62\\r\\n\", \"output\": [\"2024\"]}, {\"input\": \"1 93\\r\\n76 40\\r\\n39\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"53 93\\r\\n10 70\\r\\n9\\r\\n\", \"output\": [\"3710\"]}, {\"input\": \"100 100\\r\\n100 100\\r\\n100\\r\\n\", \"output\": [\"9900\"]}, {\"input\": \"10 100\\r\\n100 100\\r\\n99\\r\\n\", \"output\": [\"1000\"]}, {\"input\": \"1 100\\r\\n99 100\\r\\n1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"10 2\\r\\n7 2\\r\\n3\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"4 1\\r\\n5 3\\r\\n8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 5\\r\\n1 1\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 5\\r\\n9 10\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 1\\r\\n1 2\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"16 6\\r\\n3 12\\r\\n7\\r\\n\", \"output\": [\"156\"]}, {\"input\": \"10 1\\r\\n1 100\\r\\n1\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"2 1\\r\\n3 4\\r\\n2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 1\\r\\n1 1\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 1\\r\\n2 3\\r\\n1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 2\\r\\n1 11\\r\\n1\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"10 10\\r\\n1 1\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 1\\r\\n50 100\\r\\n1\\r\\n\", \"output\": [\"4999\"]}, {\"input\": \"10 1\\r\\n2 2\\r\\n3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 1\\r\\n9 10\\r\\n80\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 1\\r\\n1 100\\r\\n1\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"10 9\\r\\n10 10\\r\\n9\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n99\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 9\\r\\n1 1\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 1\\r\\n5 1\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 1\\r\\n6 3\\r\\n5\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10 1\\r\\n1 1\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n10\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 1\\r\\n2 3\\r\\n1\\r\\n', 'output': ['5']}, {'input': '10 100\\r\\n100 100\\r\\n99\\r\\n', 'output': ['1000']}, {'input': '35 28\\r\\n35 60\\r\\n44\\r\\n', 'output': ['2065']}, {'input': '40 80\\r\\n4 31\\r\\n63\\r\\n', 'output': ['640']}, {'input': '3 1\\r\\n9 10\\r\\n80\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '100 100\\r\\n100 100\\r\\n100\\r\\n', 'output': ['9900']}, {'input': '20 38\\r\\n38 70\\r\\n58\\r\\n', 'output': ['1380']}, {'input': '10 2\\r\\n7 2\\r\\n3\\r\\n', 'output': ['18']}, {'input': '2 2\\r\\n2 1\\r\\n2\\r\\n', 'output': ['0']}, {'input': '5 25\\r\\n13 76\\r\\n86\\r\\n', 'output': ['350']}]","human_sample_testcases_3":"[{'input': '10 9\\r\\n10 10\\r\\n9\\r\\n', 'output': ['99']}, {'input': '5 25\\r\\n13 76\\r\\n86\\r\\n', 'output': ['350']}, {'input': '2 78\\r\\n21 24\\r\\n88\\r\\n', 'output': ['40']}, {'input': '2 2\\r\\n2 1\\r\\n2\\r\\n', 'output': ['0']}, {'input': '10 2\\r\\n1 11\\r\\n1\\r\\n', 'output': ['20']}]","human_sample_testcases_4":"[{'input': '5 1\\r\\n6 3\\r\\n5\\r\\n', 'output': ['11']}, {'input': '10 1\\r\\n1 100\\r\\n1\\r\\n', 'output': ['99']}, {'input': '2 1\\r\\n3 4\\r\\n2\\r\\n', 'output': ['7']}, {'input': '1 8\\r\\n8 10\\r\\n8\\r\\n', 'output': ['9']}, {'input': '35 28\\r\\n35 60\\r\\n44\\r\\n', 'output': ['2065']}]","human_sample_testcases_5":"[{'input': '8 9\\r\\n2 2\\r\\n3\\r\\n', 'output': ['8']}, {'input': '5 1\\r\\n6 3\\r\\n5\\r\\n', 'output': ['11']}, {'input': '100 100\\r\\n100 100\\r\\n100\\r\\n', 'output': ['9900']}, {'input': '10 2\\r\\n7 2\\r\\n3\\r\\n', 'output': ['18']}, {'input': '2 1\\r\\n3 4\\r\\n2\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":69,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"15 20\", \"14 8\", \"6 6\"]","input_specification":"The first line contains two space-separated integers a and b (1\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009109). ","src_uid":"75a97f4d85d50ea0e1af0d46f7565b49","source_code":"#include\n\ntypedef long long ll;\nll fox(ll a,ll b);\nll gcd(ll a,ll b);\n\n\nint main()\n{\n ll a,b,c,d;\n \n scanf(\"%lld%lld\",&a,&b);\n \n d = (a>b)?gcd(a,b):gcd(b,a);\n \n c = fox(a\/d,b\/d);\n \n printf(\"%lld\",c);\n \n return 0;\n\n}\n\n\nll gcd(ll a,ll b)\n{\n if(b==(ll)0)\n return a;\n \n return gcd(b,a%b);\n}\n\n\nll fox(ll a,ll b)\n{\n static ll count = (ll)0;\n ll larger,smaller;\n \n if(a==b)\n return count;\n \n count += (ll)1;\n \n if(a>b)\n {\n larger = a,smaller = b;\n }\n \n else\n {\n smaller = a,larger = b;\n }\n \n if(larger % (ll)2==(ll)0)\n {\n if(larger==a)\n a\/=(ll)2;\n \n else\n b\/=(ll)2;\n \n return fox(a,b);\n }\n \n else if(larger % (ll)3==(ll)0)\n {\n if(larger == a)\n a\/=(ll)3;\n \n else\n b\/=(ll)3;\n \n return fox(a,b);\n }\n \n else if(larger % (ll)5==(ll)0)\n {\n if(larger == a)\n a\/=(ll)5;\n \n else\n b\/=(ll)5;\n \n return fox(a,b);\n }\n \n else\n return -1;\n \n}\n","sample_outputs":"[\"3\", \"-1\", \"0\"]","lang_cluster":"C","notes":null,"output_specification":"If the fox is lying to the little bears and it is impossible to make the pieces equal, print -1. Otherwise, print the required minimum number of operations. If the pieces of the cheese are initially equal, the required number is 0.","description":"Two little greedy bears have found two pieces of cheese in the forest of weight a and b grams, correspondingly. The bears are so greedy that they are ready to fight for the larger piece. That's where the fox comes in and starts the dialog: \"Little bears, wait a little, I want to make your pieces equal\" \"Come off it fox, how are you going to do that?\", the curious bears asked. \"It's easy\", said the fox. \"If the mass of a certain piece is divisible by two, then I can eat exactly a half of the piece. If the mass of a certain piece is divisible by three, then I can eat exactly two-thirds, and if the mass is divisible by five, then I can eat four-fifths. I'll eat a little here and there and make the pieces equal\". The little bears realize that the fox's proposal contains a catch. But at the same time they realize that they can not make the two pieces equal themselves. So they agreed to her proposal, but on one condition: the fox should make the pieces equal as quickly as possible. Find the minimum number of operations the fox needs to make pieces equal.","human_testcases":"[{\"input\": \"15 20\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"14 8\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"6 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1024\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1024 729\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1024 1048576\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"36 30\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21 35\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9900 7128\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"7920 9900\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"576000 972000\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"691200 583200\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"607500 506250\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"881280 765000\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"800000 729000\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"792000 792000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"513600 513600\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"847500 610200\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"522784320 784176480\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"689147136 861433920\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"720212000 864254400\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"673067520 807681024\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"919536000 993098880\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"648293430 540244525\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"537814642 537814642\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000007 800000011\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"900000011 800000011\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"900000011 999900017\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"536870912 387420489\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"820125000 874800000\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"864000000 607500000\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"609120000 913680000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"509607936 306110016\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"445906944 528482304\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"119144448 423624704\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"1000000000 2\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"2 1000000000\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"5 1000000000\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"1000000000 5\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"3 1000000000\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"1000000000 3\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"1000000000 7\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2208870 122715\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4812500 7577955\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"3303936 3097440\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"55404 147744\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10332160 476643528\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"21751200 43502400\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"19500000 140400000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 22\\r\\n\", \"output\": [\"-1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '900000011 999900017\\r\\n', 'output': ['-1']}, {'input': '1000000000 2\\r\\n', 'output': ['17']}, {'input': '15 20\\r\\n', 'output': ['3']}, {'input': '720212000 864254400\\r\\n', 'output': ['3']}, {'input': '1024 729\\r\\n', 'output': ['16']}]","human_sample_testcases_2":"[{'input': '673067520 807681024\\r\\n', 'output': ['3']}, {'input': '36 30\\r\\n', 'output': ['3']}, {'input': '7920 9900\\r\\n', 'output': ['3']}, {'input': '607500 506250\\r\\n', 'output': ['3']}, {'input': '900000011 800000011\\r\\n', 'output': ['-1']}]","human_sample_testcases_3":"[{'input': '100000007 800000011\\r\\n', 'output': ['-1']}, {'input': '4812500 7577955\\r\\n', 'output': ['16']}, {'input': '3 1000000000\\r\\n', 'output': ['19']}, {'input': '2 1000000000\\r\\n', 'output': ['17']}, {'input': '720212000 864254400\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '1 1000000000\\r\\n', 'output': ['18']}, {'input': '1 1\\r\\n', 'output': ['0']}, {'input': '21 35\\r\\n', 'output': ['2']}, {'input': '1000000000 7\\r\\n', 'output': ['-1']}, {'input': '445906944 528482304\\r\\n', 'output': ['8']}]","human_sample_testcases_5":"[{'input': '691200 583200\\r\\n', 'output': ['8']}, {'input': '100 10\\r\\n', 'output': ['2']}, {'input': '3303936 3097440\\r\\n', 'output': ['6']}, {'input': '119144448 423624704\\r\\n', 'output': ['7']}, {'input': '100000007 800000011\\r\\n', 'output': ['-1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":96.97,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":96.97,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":95.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":95.0,"human_sample_branch_coverage_4":95.0,"human_sample_branch_coverage_5":100.0,"id":70,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.788,"human_sample_branch_coverage":97.0} {"sample_inputs":"[\"12\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"e392be5411ffccc1df50e65ec1f5c589","source_code":"#include\nint main()\n{\n\tlong long int n;\n\tscanf(\"%lld\",&n);\n\tn=n-n\/2-n\/3-n\/5-n\/7+n\/6+n\/10+n\/14+n\/15+n\/21+n\/35-n\/30-n\/105-n\/42-n\/70+n\/210;\n\tprintf(\"%lld\\n\",n);\n\treturn 0;\n}\n","sample_outputs":"[\"2\"]","lang_cluster":"C","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are not divisible by any number from 2 to 10.","description":"IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is not divisible by any number from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"576\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"577\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"71807832\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"164178703647781768\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"228571428571428571\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"225749559139329804\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"829440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"115200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '12\\r\\n', 'output': ['2']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '2519\\r\\n', 'output': ['576']}, {'input': '2521\\r\\n', 'output': ['577']}]","human_sample_testcases_2":"[{'input': '314159265\\r\\n', 'output': ['71807832']}, {'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '12\\r\\n', 'output': ['2']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '3628800\\r\\n', 'output': ['829440']}]","human_sample_testcases_3":"[{'input': '1\\r\\n', 'output': ['1']}, {'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '314159265\\r\\n', 'output': ['71807832']}]","human_sample_testcases_4":"[{'input': '2521\\r\\n', 'output': ['577']}, {'input': '2519\\r\\n', 'output': ['576']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '314159265\\r\\n', 'output': ['71807832']}]","human_sample_testcases_5":"[{'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '2519\\r\\n', 'output': ['576']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":71,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"21 5\", \"9435152 272\", \"10 10\"]","input_specification":"In the only line of the input two space-separated integers a and b (0\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009109) are given.","src_uid":"6e0715f9239787e085b294139abb2475","source_code":"#include \n#include \n#include \n\nint main(void)\n{\n int a, b, c, i, ans = 0;\n scanf(\"%d%d\", &a, &b);\n c = a - b;\n if (c == 0)\n {\n printf(\"infinity\");\n return 0;\n }\n\n for (i = 1; i * i <= c; i++)\n {\n if (c % i == 0)\n {\n if (i > b)\n ans++;\n if ((c \/ i != i) && (c \/ i > b))\n ans++;\n }\n }\n\n printf(\"%d\", ans);\n return 0;\n}\n","sample_outputs":"[\"2\", \"282\", \"infinity\"]","lang_cluster":"C","notes":"NoteIn the first sample the answers of the Modular Equation are 8 and 16 since ","output_specification":"If there is an infinite number of answers to our equation, print \"infinity\" (without the quotes). Otherwise print the number of solutions of the Modular Equation .","description":"Last week, Hamed learned about a new type of equations in his math class called Modular Equations. Lets define i modulo j as the remainder of division of i by j and denote it by . A Modular Equation, as Hamed's teacher described, is an equation of the form in which a and b are two non-negative integers and x is a variable. We call a positive integer x for which a solution of our equation.Hamed didn't pay much attention to the class since he was watching a movie. He only managed to understand the definitions of these equations.Now he wants to write his math exercises but since he has no idea how to do that, he asked you for help. He has told you all he knows about Modular Equations and asked you to write a program which given two numbers a and b determines how many answers the Modular Equation has.","human_testcases":"[{\"input\": \"21 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9435152 272\\r\\n\", \"output\": [\"282\"]}, {\"input\": \"10 10\\r\\n\", \"output\": [\"infinity\"]}, {\"input\": \"0 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"infinity\"]}, {\"input\": \"121 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"772930485 686893955\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"257424 24\\r\\n\", \"output\": [\"127\"]}, {\"input\": \"295138437 589952171\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"223093836 966\\r\\n\", \"output\": [\"399\"]}, {\"input\": \"233758336 10665466\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"223092887 17\\r\\n\", \"output\": [\"500\"]}, {\"input\": \"223094728 1858\\r\\n\", \"output\": [\"371\"]}, {\"input\": \"223092899 29\\r\\n\", \"output\": [\"495\"]}, {\"input\": \"997920 0\\r\\n\", \"output\": [\"240\"]}, {\"input\": \"887043 3\\r\\n\", \"output\": [\"213\"]}, {\"input\": \"124 24\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"982901 101\\r\\n\", \"output\": [\"193\"]}, {\"input\": \"357987 35\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"954374 1030\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"49106 46\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"325508499 119510657\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"89768760 885778845\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"944387968 700818251\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"923456789 3\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"1000000000 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1000000000 333333300\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"77 75\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"infinity\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 333333300\\r\\n', 'output': ['2']}, {'input': '223094728 1858\\r\\n', 'output': ['371']}, {'input': '223092887 17\\r\\n', 'output': ['500']}, {'input': '997920 0\\r\\n', 'output': ['240']}, {'input': '11 2\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '997920 0\\r\\n', 'output': ['240']}, {'input': '325508499 119510657\\r\\n', 'output': ['1']}, {'input': '11 2\\r\\n', 'output': ['2']}, {'input': '887043 3\\r\\n', 'output': ['213']}, {'input': '223093836 966\\r\\n', 'output': ['399']}]","human_sample_testcases_3":"[{'input': '982901 101\\r\\n', 'output': ['193']}, {'input': '223092899 29\\r\\n', 'output': ['495']}, {'input': '0 1000000000\\r\\n', 'output': ['0']}, {'input': '1 0\\r\\n', 'output': ['1']}, {'input': '15 3\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '9435152 272\\r\\n', 'output': ['282']}, {'input': '223092899 29\\r\\n', 'output': ['495']}, {'input': '923456789 3\\r\\n', 'output': ['14']}, {'input': '77 75\\r\\n', 'output': ['0']}, {'input': '89768760 885778845\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '9435152 272\\r\\n', 'output': ['282']}, {'input': '5 2\\r\\n', 'output': ['1']}, {'input': '223094728 1858\\r\\n', 'output': ['371']}, {'input': '295138437 589952171\\r\\n', 'output': ['0']}, {'input': '1000000000 1\\r\\n', 'output': ['19']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":86.67,"human_sample_line_coverage_2":86.67,"human_sample_line_coverage_3":86.67,"human_sample_line_coverage_4":86.67,"human_sample_line_coverage_5":86.67,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":91.67,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":75.0,"id":72,"human_sample_pass_rate":100.0,"human_sample_line_coverage":86.67,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"1\", \"10\"]","input_specification":"A single line contains a single integer x (1\u2009\u2264\u2009x\u2009\u2264\u2009109).","src_uid":"ada94770281765f54ab264b4a1ef766e","source_code":"#include \n#include \n#include \n\nint x_digit[10], d_digit[10], count;\n\nvoid find_digits(int *digit, int num) {\n\tint i;\n\tfor (i = 0; i < 10; i++)\n\t\tdigit[i] = 0;\n\twhile (num > 0) {\n\t\tdigit[num%10] = 1;\n\t\tnum \/= 10;\n\t}\n}\n\nvoid check(int d) {\n\tint i;\n\tfind_digits(d_digit, d);\n\tfor (i = 0; i < 10; i++)\n\t\tif (x_digit[i] && d_digit[i]) {\n\t\t\tcount++;\n\t\t\tbreak;\n\t\t}\n}\n\nint main() {\n\tint x, d;\n\tscanf(\" %d\", &x);\n\tfind_digits(x_digit, x);\n\tfor (d = 1; d*d <= x; d++) {\n\t\tif (x%d > 0)\n\t\t\tcontinue;\n\t\tcheck(d);\n\t\tif (x\/d != d)\n\t\t\tcheck(x\/d);\n\t}\n\tprintf(\"%d\\n\", count);\n\treturn 0;\n}\n","sample_outputs":"[\"1\", \"2\"]","lang_cluster":"C","notes":null,"output_specification":"In a single line print an integer \u2014 the answer to the problem.","description":"The Little Elephant loves numbers. He has a positive integer x. The Little Elephant wants to find the number of positive integers d, such that d is the divisor of x, and x and d have at least one common (the same) digit in their decimal representations. Help the Little Elephant to find the described number.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"47\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"128\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"91\"]}, {\"input\": \"4584725\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"48\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2458450\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"97648850\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"96488450\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"879541\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"111111111\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"222222222\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"777777777\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"211768200\\r\\n\", \"output\": [\"244\"]}, {\"input\": \"536870912\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"654885000\\r\\n\", \"output\": [\"698\"]}, {\"input\": \"223092870\\r\\n\", \"output\": [\"479\"]}, {\"input\": \"901800900\\r\\n\", \"output\": [\"639\"]}, {\"input\": \"101871000\\r\\n\", \"output\": [\"460\"]}, {\"input\": \"49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999993\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"999999666\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"999999997\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"960690025\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999000011\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999937\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999998\\r\\n\", \"output\": [\"6\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '17\\r\\n', 'output': ['2']}, {'input': '1000000\\r\\n', 'output': ['41']}, {'input': '960690025\\r\\n', 'output': ['8']}, {'input': '111111111\\r\\n', 'output': ['5']}, {'input': '999000011\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '3\\r\\n', 'output': ['1']}, {'input': '999999937\\r\\n', 'output': ['1']}, {'input': '536870912\\r\\n', 'output': ['29']}, {'input': '901800900\\r\\n', 'output': ['639']}, {'input': '2\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '999000011\\r\\n', 'output': ['2']}, {'input': '999999997\\r\\n', 'output': ['6']}, {'input': '20\\r\\n', 'output': ['3']}, {'input': '901800900\\r\\n', 'output': ['639']}, {'input': '999999666\\r\\n', 'output': ['8']}]","human_sample_testcases_4":"[{'input': '879541\\r\\n', 'output': ['7']}, {'input': '17\\r\\n', 'output': ['2']}, {'input': '47\\r\\n', 'output': ['1']}, {'input': '48\\r\\n', 'output': ['4']}, {'input': '111111111\\r\\n', 'output': ['5']}]","human_sample_testcases_5":"[{'input': '2\\r\\n', 'output': ['1']}, {'input': '211768200\\r\\n', 'output': ['244']}, {'input': '999999666\\r\\n', 'output': ['8']}, {'input': '17\\r\\n', 'output': ['2']}, {'input': '999999998\\r\\n', 'output': ['6']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":93.75,"human_sample_branch_coverage_5":93.75,"id":73,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":97.5} {"sample_inputs":"[\"abcd\", \"ababa\", \"zzz\"]","input_specification":"The first input line contains the string. It's guaranteed, that the string is non-empty, consists of lower-case Latin letters, and its length doesn't exceed 100.","src_uid":"13b5cf94f2fabd053375a5ccf3fd44c7","source_code":"#include\n#include\n#include\n\nint main()\n{\n char s[100];\n scanf(\"%s\",s);\n\n\n\n\n int l = strlen(s);\n int len = 0;\n\n for(int i = 0; ilen)\n len = n;\n }\n }\n\n printf(\"%d\\n\",len);\n\n return 0;\n}\n","sample_outputs":"[\"0\", \"3\", \"2\"]","lang_cluster":"C","notes":null,"output_specification":"Output one number \u2014 length of the longest substring that can be met in the string at least twice.","description":"You're given a string of lower-case Latin letters. Your task is to find the length of its longest substring that can be met in the string at least twice. These occurrences can overlap (see sample test 2).","human_testcases":"[{\"input\": \"abcd\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"ababa\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"zzz\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"kmmm\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"wzznz\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"qlzazaaqll\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"lzggglgpep\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"iegdlraaidefgegiagrdfhihe\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"esxpqmdrtidgtkxojuxyrcwxlycywtzbjzpxvbngnlepgzcaeg\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"garvpaimjdjiivamusjdwfcaoswuhxyyxvrxzajoyihggvuxumaadycfphrzbprraicvjjlsdhojihaw\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"ckvfndqgkmhcyojaqgdkenmbexufryhqejdhctxujmtrwkpbqxufxamgoeigzfyzbhevpbkvviwntdhqscvkmphnkkljizndnbjt\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"ikiikiikikiiikkkkkikkkkiiiiikkiiikkiikiikkkkikkkikikkikiiikkikikiiikikkkiiikkkikkikkikkkkiiikkiiiiii\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"ovovhoovvhohhhvhhvhhvhovoohovhhoooooovohvooooohvvoooohvvovhhvhovhhvoovhvhvoovovvhooovhhooovohvhhovhv\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"ccwckkkycccccckwckwkwkwkkkkyycykcccycyckwywcckwykcycykkkwcycwwcykcwkwkwwykwkwcykywwwyyykckkyycckwcwk\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"ttketfkefktfztezzkzfkkeetkkfktftzktezekkeezkeeetteeteefetefkzzzetekfftkeffzkktffzkzzeftfeezfefzffeef\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"rtharczpfznrgdnkltchafduydgbgkdjqrmjqyfmpwjwphrtsjbmswkanjlprbnduaqbcjqxlxmkspkhkcnzbqwxonzxxdmoigti\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"fplrkfklvwdeiynbjgaypekambmbjfnoknlhczhkdmljicookdywdgpnlnqlpunnkebnikgcgcjefeqhknvlynmvjcegvcdgvvdb\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"txbciieycswqpniwvzipwlottivvnfsysgzvzxwbctcchfpvlbcjikdofhpvsknptpjdbxemtmjcimetkemdbettqnbvzzbdyxxb\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"fmubmfwefikoxtqvmaavwjxmoqltapexkqxcsztpezfcltqavuicefxovuswmqimuikoppgqpiapqutkczgcvxzutavkujxvpklv\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"ipsrjylhpkjvlzncfixipstwcicxqygqcfrawpzzvckoveyqhathglblhpkjvlzncfixipfajaqobtzvthmhgbuawoxoknirclxg\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"kcnjsntjzcbgzjscrsrjkrbytqsrptzspzctjrorsyggrtkcnjsntjzcbgzjscrsrjyqbrtpcgqirsrrjbbbrnyqstnrozcoztt\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"unhcfnrhsqetuerjqcetrhlsqgfnqfntvkgxsscquolxxroqgtchffyccetrhlsqgfnqfntvkgxsscquolxxroqgtchffhfqvx\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"kkcckkccckkcckcccckcckkkkcckkkkckkkcckckkkkkckkkkkcckkccckkcckcccckcckkkkcckkkkckkkcckckkkkkckckckkc\\r\\n\", \"output\": [\"46\"]}, {\"input\": \"mlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydbrxdmlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydik\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"abcdefghijklmnopqrstuvwxyz\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"tttttbttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttmttttttt\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffffffffffffffffffffffffffffffffffff\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"cccccccccccccccccccccccwcccccccccccccccccccccuccccccccccccccnccccccccccccccccccccccccccccccccccccccc\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"ffffffffffffffffffffffffffufffgfffffffffffffffffffffffffffffffffffffffgffffffftffffffgffffffffffffff\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"rrrrrrrrrrrrrrrrrrrlhbrrrrrrrrurrrrrrrfrrqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrewrrrrrrryrrxrrrrrrrrrrr\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"vyvvvvvvvvzvvvvvzvvvwvvvvrvvvvvvvvvvvvvvvrvvvvvvvvvpkvvpvgvvvvvvvvvvvvvgvvvvvvvvvvvvvvvvvvysvvvbvvvv\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"cbubbbbbbbbbbfbbbbbbbbjbobbbbbbbbbbibbubbbbjbbbnzgbbzbbfbbbbbbbbbbbfbpbbbbbbbbbbygbbbgbabbbbbbbhibbb\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"lrqrrrrrrrjrrrrrcdrrgrrmwvrrrrrrrrrxfzrmrmrryrrrurrrdrrrrrrrrrrererrrsrrrrrrrrrrrqrrrrcrrwjsrrlrrrrr\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"ssssusisisosscssssztzessssyspskjssvosiissussszsosssslsssdsssvssvsssslsssmsfjasjsssssowscsjsssszsspss\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"uukuuuumueuuuujuukgdhbztuuuubbguuocuozfaunqufjujuguyuuvkuuauubuubuucuvtjuuuuuusduduuuuuuuueunuuuuuzu\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"jpkkgwklngwqcfzmwkkpcwkkkkkekkkekkkdsykqwjkkkhkkkxdnukkkkkkmkqykkkxqklkskkrkkkkkqqjikkkkkkpknkkkkkoh\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"bmzbbfbbhqxwthtbbisbbbbbtbbfbbpbfbbpbkbjfbcbbbbzbbbdwmbbbrnvqdbbtbbuglrnbbbbvmbyblebbabibrevaxbbjbqb\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"qqqmqqqsbteqqopsuqiqumrqzpqnqgqeniqqkyqqyqqqpxzqeqqquhdqquhqqqfqjirqaqqaquxqoqqjqqqqbjbgqcqqqqicnkqc\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasaaaavaaaaaaauaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"a\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"fg\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"yy\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"abcabcabc\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"qwerqwedqwes\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'fmubmfwefikoxtqvmaavwjxmoqltapexkqxcsztpezfcltqavuicefxovuswmqimuikoppgqpiapqutkczgcvxzutavkujxvpklv\\r\\n', 'output': ['3']}, {'input': 'ttketfkefktfztezzkzfkkeetkkfktftzktezekkeezkeeetteeteefetefkzzzetekfftkeffzkktffzkzzeftfeezfefzffeef\\r\\n', 'output': ['4']}, {'input': 'qqqmqqqsbteqqopsuqiqumrqzpqnqgqeniqqkyqqyqqqpxzqeqqquhdqquhqqqfqjirqaqqaquxqoqqjqqqqbjbgqcqqqqicnkqc\\r\\n', 'output': ['4']}, {'input': 'ccwckkkycccccckwckwkwkwkkkkyycykcccycyckwywcckwykcycykkkwcycwwcykcwkwkwwykwkwcykywwwyyykckkyycckwcwk\\r\\n', 'output': ['5']}, {'input': 'kcnjsntjzcbgzjscrsrjkrbytqsrptzspzctjrorsyggrtkcnjsntjzcbgzjscrsrjyqbrtpcgqirsrrjbbbrnyqstnrozcoztt\\r\\n', 'output': ['20']}]","human_sample_testcases_2":"[{'input': 'mlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydbrxdmlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydik\\r\\n', 'output': ['47']}, {'input': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasaaaavaaaaaaauaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['44']}, {'input': 'abcabcabc\\r\\n', 'output': ['6']}, {'input': 'kmmm\\r\\n', 'output': ['2']}, {'input': 'abcd\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': 'garvpaimjdjiivamusjdwfcaoswuhxyyxvrxzajoyihggvuxumaadycfphrzbprraicvjjlsdhojihaw\\r\\n', 'output': ['2']}, {'input': 'ipsrjylhpkjvlzncfixipstwcicxqygqcfrawpzzvckoveyqhathglblhpkjvlzncfixipfajaqobtzvthmhgbuawoxoknirclxg\\r\\n', 'output': ['15']}, {'input': 'txbciieycswqpniwvzipwlottivvnfsysgzvzxwbctcchfpvlbcjikdofhpvsknptpjdbxemtmjcimetkemdbettqnbvzzbdyxxb\\r\\n', 'output': ['2']}, {'input': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasaaaavaaaaaaauaaeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['44']}, {'input': 'a\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': 'abcd\\r\\n', 'output': ['0']}, {'input': 'ababa\\r\\n', 'output': ['3']}, {'input': 'kcnjsntjzcbgzjscrsrjkrbytqsrptzspzctjrorsyggrtkcnjsntjzcbgzjscrsrjyqbrtpcgqirsrrjbbbrnyqstnrozcoztt\\r\\n', 'output': ['20']}, {'input': 'ttketfkefktfztezzkzfkkeetkkfktftzktezekkeezkeeetteeteefetefkzzzetekfftkeffzkktffzkzzeftfeezfefzffeef\\r\\n', 'output': ['4']}, {'input': 'yy\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': 'rrrrrrrrrrrrrrrrrrrlhbrrrrrrrrurrrrrrrfrrqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrewrrrrrrryrrxrrrrrrrrrrr\\r\\n', 'output': ['33']}, {'input': 'fmubmfwefikoxtqvmaavwjxmoqltapexkqxcsztpezfcltqavuicefxovuswmqimuikoppgqpiapqutkczgcvxzutavkujxvpklv\\r\\n', 'output': ['3']}, {'input': 'qlzazaaqll\\r\\n', 'output': ['2']}, {'input': 'mlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydbrxdmlhsyijxeydqxhtkmpdeqwzogjvxahmssyhfhqessbxzvydik\\r\\n', 'output': ['47']}, {'input': 'cbubbbbbbbbbbfbbbbbbbbjbobbbbbbbbbbibbubbbbjbbbnzgbbzbbfbbbbbbbbbbbfbpbbbbbbbbbbygbbbgbabbbbbbbhibbb\\r\\n', 'output': ['12']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":74,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7 3\\n3 5 7 1 6 2 8\\n1 2 7\", \"4 4\\n3 4 1 0\\n0 1 7 9\"]","input_specification":"The first line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n, m \\le 10$$$) representing the number of digits in the sequence you have and the number of keys on the keypad that have fingerprints. The next line contains $$$n$$$ distinct space-separated integers $$$x_1, x_2, \\ldots, x_n$$$ ($$$0 \\le x_i \\le 9$$$) representing the sequence. The next line contains $$$m$$$ distinct space-separated integers $$$y_1, y_2, \\ldots, y_m$$$ ($$$0 \\le y_i \\le 9$$$) \u2014 the keys with fingerprints.","src_uid":"f9044a4b4c3a0c2751217d9b31cd0c72","source_code":"#include\n#include\n\n\nint main()\n{\n int n1,n2,a1[100],a2[100];\n scanf(\"%d%d\",&n1,&n2);\n for(int i=0;i\n\nint countzeroes(int x, int s[])\n{\n\tint count=0;\n\tfor(int j=0;j<=x;j++){\n\t\tif(s[j]==0)\n\t\t\tcount++;\n\t}\n\treturn count;\n}\n\nint countones(int x, int s[])\n{\n\tint count=0;\n\tfor(int j=0;j<=x;j++){\n\t\tif(s[j]==1)\n\t\t\tcount++;\n\t}\n\treturn count;\n}\n\nint main(void) {\n\tint n,i; \/\/n is the total number of games.\n\tscanf(\"%d\",&n);\n\t\n\tint s[n];\n\tfor(i=0;iones)\n\t\tans=zeroes;\n\telse\n\t\tans=ones;\n\t\n\t\/\/printf(\"ans is %d \\n\", ans);\n\t\t\n\tfor(i=0;ians)\n\t\t\tans=zero[i];\n\t}\n\t\n\tprintf(\"%d\\n\", ans);\n\treturn 0;\n}\n","sample_outputs":"[\"3\", \"4\", \"1\"]","lang_cluster":"C","notes":null,"output_specification":"Print one integer \u2014 the maximum number of games Hideo can leave in his CV so that no unsuccessful game comes after a successful one.","description":"Hideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.During all his career Hideo has produced n games. Some of them were successful, some were not. Hideo wants to remove several of them (possibly zero) from his CV to make a better impression on employers. As a result there should be no unsuccessful game which comes right after successful one in his CV.More formally, you are given an array s1,\u2009s2,\u2009...,\u2009sn of zeros and ones. Zero corresponds to an unsuccessful game, one \u2014 to a successful one. Games are given in order they were produced, and Hideo can't swap these values. He should remove some elements from this array in such a way that no zero comes right after one.Besides that, Hideo still wants to mention as much games in his CV as possible. Help this genius of a man determine the maximum number of games he can leave in his CV.","human_testcases":"[{\"input\": \"4\\r\\n1 1 0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n0 1 0 0 1 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"3\\r\\n1 0 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n1 1 0 0 0 1 1 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"90\\r\\n1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"4\\r\\n1 0 0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n0 1 0 0 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n1 0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n1 1 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"16\\r\\n1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1\\r\\n\", \"output\": [\"9\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1\\r\\n1\\r\\n', 'output': ['1']}, {'input': '4\\r\\n1 1 0 1\\r\\n', 'output': ['3']}, {'input': '3\\r\\n1 0 1\\r\\n', 'output': ['2']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['100']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '100\\r\\n1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1\\r\\n', 'output': ['53']}, {'input': '100\\r\\n0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['80']}, {'input': '78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n', 'output': ['42']}, {'input': '10\\r\\n1 1 0 0 0 1 1 0 0 0\\r\\n', 'output': ['6']}, {'input': '3\\r\\n1 1 0\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '100\\r\\n1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1\\r\\n', 'output': ['53']}, {'input': '6\\r\\n0 1 0 0 1 0\\r\\n', 'output': ['4']}, {'input': '3\\r\\n1 0 1\\r\\n', 'output': ['2']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['2']}, {'input': '4\\r\\n1 1 0 1\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '90\\r\\n1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0\\r\\n', 'output': ['52']}, {'input': '100\\r\\n0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['80']}, {'input': '78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n', 'output': ['42']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['2']}, {'input': '3\\r\\n1 1 0\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '3\\r\\n1 1 0\\r\\n', 'output': ['2']}, {'input': '6\\r\\n0 1 0 0 1 0\\r\\n', 'output': ['4']}, {'input': '16\\r\\n1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1\\r\\n', 'output': ['9']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['2']}, {'input': '3\\r\\n1 0 0\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":97.06,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":95.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":76,"human_sample_pass_rate":100.0,"human_sample_line_coverage":99.412,"human_sample_branch_coverage":99.0} {"sample_inputs":"[\"1\", \"3\"]","input_specification":"The only line contains single integer: 1\u2009\u2264\u2009n\u2009\u2264\u20091000 \u2014 number of hassocks.","src_uid":"4bd174a997707ed3a368bd0f2424590f","source_code":"#include \n#include \n\/\/#include \nint main()\n{\n int n,i,j,f=0;\n\n scanf(\"%d\",&n);\n int *a=(int *)calloc(n+1,sizeof(int));\n a[1]=1;\n j=1;\n for(i=1;i\n\nint main(void)\n{\n int r, g, bb;\n long long int a, b, c;\n \n for (;;) {\n if (scanf(\" %d %d %d\", &r, &g, &bb) != 3)\n return 0;\n if (r >= g && r >= bb) {\n a = r;\n if (g >= bb) {\n b = g;\n c = bb;\n } else {\n b = bb;\n c = g;\n }\n } else if (g >= bb) {\n a = g;\n if (r >= bb) {\n b = r;\n c = bb;\n } else {\n b = bb;\n c = r;\n }\n } else {\n a = bb;\n if (r >= g) {\n b = r;\n c = g;\n } else {\n b = g;\n c = r;\n }\n }\n if (a >= ((b + c) * 2)) {\n printf(\"%ld\\n\", (long int)(b+c));\n } else {\n printf(\"%ld\\n\", (long int)( c + ((a - c) + (b - c)) \/ 3) );\n }\n }\n\n return 0;\n\n}","sample_outputs":"[\"4\", \"1\", \"2\"]","lang_cluster":"C","notes":"NoteIn the first sample you can decorate the tables with the following balloon sets: \"rgg\", \"gbb\", \"brr\", \"rrg\", where \"r\", \"g\" and \"b\" represent the red, green and blue balls, respectively.","output_specification":"Print a single integer t \u2014 the maximum number of tables that can be decorated in the required manner.","description":"You have r red, g green and b blue balloons. To decorate a single table for the banquet you need exactly three balloons. Three balloons attached to some table shouldn't have the same color. What maximum number t of tables can be decorated if we know number of balloons of each color?Your task is to write a program that for given values r, g and b will find the maximum number t of tables, that can be decorated in the required manner.","human_testcases":"[{\"input\": \"5 4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 0 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"100 99 56\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"1000 1000 1002\\r\\n\", \"output\": [\"1000\"]}, {\"input\": \"0 1 1000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"500000000 1000000000 500000000\\r\\n\", \"output\": [\"666666666\"]}, {\"input\": \"1000000000 2000000000 1000000000\\r\\n\", \"output\": [\"1333333333\"]}, {\"input\": \"2000000000 2000000000 2000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2000000000 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"1585222789 1889821127 2000000000\\r\\n\", \"output\": [\"1825014638\"]}, {\"input\": \"10000 7500 7500\\r\\n\", \"output\": [\"8333\"]}, {\"input\": \"150000 75000 75000\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"999288131 55884921 109298382\\r\\n\", \"output\": [\"165183303\"]}, {\"input\": \"100500 100500 3\\r\\n\", \"output\": [\"67001\"]}, {\"input\": \"1463615122 1988383731 837331500\\r\\n\", \"output\": [\"1429776784\"]}, {\"input\": \"1938 8999 1882\\r\\n\", \"output\": [\"3820\"]}, {\"input\": \"45 33 76\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"100000 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"198488 50 18\\r\\n\", \"output\": [\"68\"]}, {\"input\": \"82728372 939848 100139442\\r\\n\", \"output\": [\"61269220\"]}, {\"input\": \"99 5747 5298\\r\\n\", \"output\": [\"3714\"]}, {\"input\": \"3 5 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7511 7512 7513\\r\\n\", \"output\": [\"7512\"]}, {\"input\": \"1234567890 123456789 987654321\\r\\n\", \"output\": [\"781893000\"]}, {\"input\": \"500000000 2000000000 500000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"500000002 2000000000 500000001\\r\\n\", \"output\": [\"1000000001\"]}, {\"input\": \"520000000 1000000033 501000000\\r\\n\", \"output\": [\"673666677\"]}, {\"input\": \"10000 1000 100000\\r\\n\", \"output\": [\"11000\"]}, {\"input\": \"2000000000 500000000 499999999\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"1999999999 500000000 500000000\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"1 1 9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2000000000 1999999999 1999999999\\r\\n\", \"output\": [\"1999999999\"]}, {\"input\": \"3 4 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 3 6\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '500000000 1000000000 500000000\\r\\n', 'output': ['666666666']}, {'input': '1234567890 123456789 987654321\\r\\n', 'output': ['781893000']}, {'input': '100500 100500 3\\r\\n', 'output': ['67001']}, {'input': '999288131 55884921 109298382\\r\\n', 'output': ['165183303']}, {'input': '0 1 0\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '6 1 1\\r\\n', 'output': ['2']}, {'input': '3 5 2\\r\\n', 'output': ['3']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '0 1 1000000000\\r\\n', 'output': ['1']}, {'input': '1 2000000000 1000000000\\r\\n', 'output': ['1000000000']}]","human_sample_testcases_3":"[{'input': '999288131 55884921 109298382\\r\\n', 'output': ['165183303']}, {'input': '82728372 939848 100139442\\r\\n', 'output': ['61269220']}, {'input': '520000000 1000000033 501000000\\r\\n', 'output': ['673666677']}, {'input': '3 0 0\\r\\n', 'output': ['0']}, {'input': '1000000000 2000000000 1000000000\\r\\n', 'output': ['1333333333']}]","human_sample_testcases_4":"[{'input': '2000000000 500000000 499999999\\r\\n', 'output': ['999999999']}, {'input': '150000 75000 75000\\r\\n', 'output': ['100000']}, {'input': '1000000000 2000000000 1000000000\\r\\n', 'output': ['1333333333']}, {'input': '2000000000 2000000000 2000000000\\r\\n', 'output': ['2000000000']}, {'input': '82728372 939848 100139442\\r\\n', 'output': ['61269220']}]","human_sample_testcases_5":"[{'input': '0 0 0\\r\\n', 'output': ['0']}, {'input': '1 2000000000 1000000000\\r\\n', 'output': ['1000000000']}, {'input': '1000 1000 1002\\r\\n', 'output': ['1000']}, {'input': '520000000 1000000033 501000000\\r\\n', 'output': ['673666677']}, {'input': '1585222789 1889821127 2000000000\\r\\n', 'output': ['1825014638']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":69.23,"human_sample_line_coverage_2":84.62,"human_sample_line_coverage_3":84.62,"human_sample_line_coverage_4":76.92,"human_sample_line_coverage_5":92.31,"human_sample_branch_coverage_1":68.75,"human_sample_branch_coverage_2":81.25,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":81.25,"human_sample_branch_coverage_5":93.75,"id":78,"human_sample_pass_rate":100.0,"human_sample_line_coverage":81.54,"human_sample_branch_coverage":82.5} {"sample_inputs":"[\"5 5 3 2\", \"7 5 5 2\"]","input_specification":"The first line contains four space-separated integers n, a, b and c (1\u2009\u2264\u2009n,\u2009a,\u2009b,\u2009c\u2009\u2264\u20094000) \u2014 the length of the original ribbon and the acceptable lengths of the ribbon pieces after the cutting, correspondingly. The numbers a, b and c can coincide.","src_uid":"062a171cc3ea717ea95ede9d7a1c3a43","source_code":"#include \n\n\nint main()\n{\n int n,a[3],i;\n scanf(\"%d %d %d %d\",&n,&a[0],&a[1],&a[2]);\n\n int dp[n];\n for(i=0;i\n#include\n#include\nint main(void)\n{\n\tlong int n;\n\tscanf(\"%ld\",&n);\n\tif(n<=3)\n\tprintf(\"0\");\n\telse\n\t{\n\t\tif(n%2==0)\n\t\t{\n\tn=n\/2;\n\tif(n%2==0)\n\tprintf(\"%d\",(n-2)\/2);\n\telse\n\tprintf(\"%d\",(n-1)\/2);\n}\nelse\nprintf(\"0\");\n}\n\t\n\t\n}\n","sample_outputs":"[\"1\", \"4\"]","lang_cluster":"C","notes":"NoteThere is only one way to divide the stick in the first sample {1, 1, 2, 2}.Four ways to divide the stick in the second sample are {1, 1, 9, 9}, {2, 2, 8, 8}, {3, 3, 7, 7} and {4, 4, 6, 6}. Note that {5, 5, 5, 5} doesn't work.","output_specification":"The output should contain a single integer\u00a0\u2014 the number of ways to split Pasha's stick into four parts of positive integer length so that it's possible to make a rectangle by connecting the ends of these parts, but is impossible to form a square. ","description":"Pasha has a wooden stick of some positive integer length n. He wants to perform exactly three cuts to get four parts of the stick. Each part must have some positive integer length and the sum of these lengths will obviously be n. Pasha likes rectangles but hates squares, so he wonders, how many ways are there to split a stick into four parts so that it's possible to form a rectangle using these parts, but is impossible to form a square.Your task is to help Pasha and count the number of such ways. Two ways to cut the stick are considered distinct if there exists some integer x, such that the number of parts of length x in the first way differ from the number of parts of length x in the second way.","human_testcases":"[{\"input\": \"6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2000000000\\r\\n\", \"output\": [\"499999999\"]}, {\"input\": \"1924704072\\r\\n\", \"output\": [\"481176017\"]}, {\"input\": \"73740586\\r\\n\", \"output\": [\"18435146\"]}, {\"input\": \"1925088820\\r\\n\", \"output\": [\"481272204\"]}, {\"input\": \"593070992\\r\\n\", \"output\": [\"148267747\"]}, {\"input\": \"1925473570\\r\\n\", \"output\": [\"481368392\"]}, {\"input\": \"629490186\\r\\n\", \"output\": [\"157372546\"]}, {\"input\": \"1980649112\\r\\n\", \"output\": [\"495162277\"]}, {\"input\": \"36661322\\r\\n\", \"output\": [\"9165330\"]}, {\"input\": \"1943590793\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"71207034\\r\\n\", \"output\": [\"17801758\"]}, {\"input\": \"1757577394\\r\\n\", \"output\": [\"439394348\"]}, {\"input\": \"168305294\\r\\n\", \"output\": [\"42076323\"]}, {\"input\": \"1934896224\\r\\n\", \"output\": [\"483724055\"]}, {\"input\": \"297149088\\r\\n\", \"output\": [\"74287271\"]}, {\"input\": \"1898001634\\r\\n\", \"output\": [\"474500408\"]}, {\"input\": \"176409698\\r\\n\", \"output\": [\"44102424\"]}, {\"input\": \"1873025522\\r\\n\", \"output\": [\"468256380\"]}, {\"input\": \"5714762\\r\\n\", \"output\": [\"1428690\"]}, {\"input\": \"1829551192\\r\\n\", \"output\": [\"457387797\"]}, {\"input\": \"16269438\\r\\n\", \"output\": [\"4067359\"]}, {\"input\": \"1663283390\\r\\n\", \"output\": [\"415820847\"]}, {\"input\": \"42549941\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1967345604\\r\\n\", \"output\": [\"491836400\"]}, {\"input\": \"854000\\r\\n\", \"output\": [\"213499\"]}, {\"input\": \"1995886626\\r\\n\", \"output\": [\"498971656\"]}, {\"input\": \"10330019\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1996193634\\r\\n\", \"output\": [\"499048408\"]}, {\"input\": \"9605180\\r\\n\", \"output\": [\"2401294\"]}, {\"input\": \"1996459740\\r\\n\", \"output\": [\"499114934\"]}, {\"input\": \"32691948\\r\\n\", \"output\": [\"8172986\"]}, {\"input\": \"1975903308\\r\\n\", \"output\": [\"493975826\"]}, {\"input\": \"1976637136\\r\\n\", \"output\": [\"494159283\"]}, {\"input\": \"29803038\\r\\n\", \"output\": [\"7450759\"]}, {\"input\": \"1977979692\\r\\n\", \"output\": [\"494494922\"]}, {\"input\": \"1978595336\\r\\n\", \"output\": [\"494648833\"]}, {\"input\": \"27379344\\r\\n\", \"output\": [\"6844835\"]}, {\"input\": \"1979729912\\r\\n\", \"output\": [\"494932477\"]}, {\"input\": \"1980253780\\r\\n\", \"output\": [\"495063444\"]}, {\"input\": \"1980751584\\r\\n\", \"output\": [\"495187895\"]}, {\"input\": \"53224878\\r\\n\", \"output\": [\"13306219\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"111\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"55\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"105\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"199\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"151\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1873025522\\r\\n', 'output': ['468256380']}, {'input': '27379344\\r\\n', 'output': ['6844835']}, {'input': '25\\r\\n', 'output': ['0']}, {'input': '593070992\\r\\n', 'output': ['148267747']}, {'input': '1925088820\\r\\n', 'output': ['481272204']}]","human_sample_testcases_2":"[{'input': '17\\r\\n', 'output': ['0']}, {'input': '854000\\r\\n', 'output': ['213499']}, {'input': '111\\r\\n', 'output': ['0']}, {'input': '2\\r\\n', 'output': ['0']}, {'input': '27\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '30\\r\\n', 'output': ['7']}, {'input': '1980253780\\r\\n', 'output': ['495063444']}, {'input': '27\\r\\n', 'output': ['0']}, {'input': '176409698\\r\\n', 'output': ['44102424']}, {'input': '10330019\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '14\\r\\n', 'output': ['3']}, {'input': '151\\r\\n', 'output': ['0']}, {'input': '42549941\\r\\n', 'output': ['0']}, {'input': '168305294\\r\\n', 'output': ['42076323']}, {'input': '1996459740\\r\\n', 'output': ['499114934']}]","human_sample_testcases_5":"[{'input': '10330019\\r\\n', 'output': ['0']}, {'input': '22\\r\\n', 'output': ['5']}, {'input': '25\\r\\n', 'output': ['0']}, {'input': '168305294\\r\\n', 'output': ['42076323']}, {'input': '1925473570\\r\\n', 'output': ['481368392']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":90.0,"human_sample_line_coverage_2":90.0,"human_sample_line_coverage_3":90.0,"human_sample_line_coverage_4":90.0,"human_sample_line_coverage_5":80.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":66.67,"id":80,"human_sample_pass_rate":100.0,"human_sample_line_coverage":88.0,"human_sample_branch_coverage":79.998} {"sample_inputs":"[\"1 0.50 1\", \"1 0.50 4\", \"4 0.20 2\"]","input_specification":"The first line of the input contains three numbers n,\u2009p,\u2009t (1\u2009\u2264\u2009n,\u2009t\u2009\u2264\u20092000, 0\u2009\u2264\u2009p\u2009\u2264\u20091). Numbers n and t are integers, number p is real, given with exactly two digits after the decimal point.","src_uid":"20873b1e802c7aa0e409d9f430516c1e","source_code":"#include\ndouble prob[2005][2005];\nint main()\n{\n int n,t,i,j;\n double p,cp;\n double tmp;\n scanf(\"%d\",&n);\n scanf(\"%lf\",&p);\n scanf(\"%d\",&t);\n cp = 1.0-p;\n prob[0][0] = 1.0;\n for(i=1;i<=t;i++)\n prob[0][i] = 0.0;\n for(i=1;i<=t;i++)\n prob[i][0] = prob[i-1][0]*(cp);\n for(i=1;i<=t;i++)\n {\n for(j=1;j<=t;j++)\n {\n if(j>i||j>n)\n tmp = 0.0;\n else if(j+1<=n)\n tmp = cp*prob[i-1][j] + prob[i-1][j-1]*p;\n else \n tmp = prob[i-1][j] + prob[i-1][j-1]*p;\n prob[i][j] = tmp;\n }\n }\n double res = 0;\n for(i=0;i<=t;i++)\n {\n res+=i*prob[t][i];\n }\n printf(\"%lf\\n\",res);\n return 0;\n}","sample_outputs":"[\"0.5\", \"0.9375\", \"0.4\"]","lang_cluster":"C","notes":null,"output_specification":"Print a single real number \u2014 the expected number of people who will be standing on the escalator after t seconds. The absolute or relative error mustn't exceed 10\u2009-\u20096.","description":"Ilya got tired of sports programming, left university and got a job in the subway. He was given the task to determine the escalator load factor. Let's assume that n people stand in the queue for the escalator. At each second one of the two following possibilities takes place: either the first person in the queue enters the escalator with probability p, or the first person in the queue doesn't move with probability (1\u2009-\u2009p), paralyzed by his fear of escalators and making the whole queue wait behind him.Formally speaking, the i-th person in the queue cannot enter the escalator until people with indices from 1 to i\u2009-\u20091 inclusive enter it. In one second only one person can enter the escalator. The escalator is infinite, so if a person enters it, he never leaves it, that is he will be standing on the escalator at any following second. Ilya needs to count the expected value of the number of people standing on the escalator after t seconds. Your task is to help him solve this complicated task.","human_testcases":"[{\"input\": \"1 0.50 1\\r\\n\", \"output\": [\"0.500000\", \"0.5000000\", \"0.5\", \"0.500000000000\", \"0.50000000000000000000\"]}, {\"input\": \"1 0.50 4\\r\\n\", \"output\": [\"0.9375\", \"0.9375000\", \"0.937500000000\", \"0.937500\", \"0.93750000000000000000\"]}, {\"input\": \"4 0.20 2\\r\\n\", \"output\": [\"0.4\", \"0.400000\", \"0.40000000000000002220\", \"0.400000000000\", \"0.4000000\"]}, {\"input\": \"2000 0.61 2000\\r\\n\", \"output\": [\"1220.000000000000\", \"1220\", \"1219.99999999999977262632\", \"1220.000000\", \"1220.0000000\", \"1220.0\"]}, {\"input\": \"100 1.00 200\\r\\n\", \"output\": [\"100.00000000000000000000\", \"100.0000000\", \"100.0\", \"100.000000\", \"100.000000000000\", \"100\"]}, {\"input\": \"417 0.57 742\\r\\n\", \"output\": [\"414.0744421\", \"414.07444214206202559581\", \"414.074442142062\", \"414.074442142\", \"414.074442\", \"414.0744\"]}, {\"input\": \"100 0.01 53\\r\\n\", \"output\": [\"0.53000000000000002665\", \"0.530000\", \"0.53\", \"0.530000000000\", \"0.5300000\"]}, {\"input\": \"300 0.05 55\\r\\n\", \"output\": [\"2.750000000000\", \"2.75000000000000044409\", \"2.75\", \"2.7500000\", \"2.750000\"]}, {\"input\": \"1400 0.02 200\\r\\n\", \"output\": [\"4.00000000000000000000\", \"4.000000000000\", \"4.0000000\", \"4\", \"4.0\", \"4.000000\"]}, {\"input\": \"2000 0.01 234\\r\\n\", \"output\": [\"2.34\", \"2.340000\", \"2.340000000000\", \"2.33999999999999985789\", \"2.3400000\"]}, {\"input\": \"1 0.01 2000\\r\\n\", \"output\": [\"1\", \"0.999999998136\", \"1.0000000\", \"1.000000\", \"0.99999999813624351752\", \"0.9999999981\"]}, {\"input\": \"300 0.99 1000\\r\\n\", \"output\": [\"300.000000000000\", \"300\", \"300.000000\", \"300.0000000\", \"300.0\", \"300.00000000000005684342\"]}, {\"input\": \"400 0.96 1754\\r\\n\", \"output\": [\"400.000000000000\", \"400.0000000\", \"400.00000000000000000000\", \"400\", \"400.0\", \"400.000000\"]}, {\"input\": \"2000 0.93 100\\r\\n\", \"output\": [\"93.000000\", \"93.0\", \"93.0000000\", \"93\", \"93.000000000000\", \"92.99999999999998578915\"]}, {\"input\": \"1000 0.90 1733\\r\\n\", \"output\": [\"999.99999999999988631316\", \"1000.0000000\", \"1000.000000\", \"1000.000000000000\", \"1000\", \"1000.0\"]}, {\"input\": \"1 1.00 1\\r\\n\", \"output\": [\"1\", \"1.000000000000\", \"1.0000000\", \"1.000000\", \"1.0\", \"1.00000000000000000000\"]}, {\"input\": \"2000 1.00 2000\\r\\n\", \"output\": [\"2000\", \"2000.0000000\", \"2000.00000000000000000000\", \"2000.000000\", \"2000.0\", \"2000.000000000000\"]}, {\"input\": \"2000 0.00 2000\\r\\n\", \"output\": [\"0.000000000000\", \"0\", \"0.0000000\", \"0.00000000000000000000\", \"0.0\", \"0.000000\"]}, {\"input\": \"2000 0.01 2000\\r\\n\", \"output\": [\"20.00000000000000000000\", \"20.000000000000\", \"20.000000\", \"20.0\", \"20.0000000\", \"20\"]}, {\"input\": \"2000 0.99 2000\\r\\n\", \"output\": [\"1980.0\", \"1980\", \"1980.0000000\", \"1980.00000000000000000000\", \"1980.000000\", \"1980.000000000000\"]}, {\"input\": \"654 0.67 999\\r\\n\", \"output\": [\"652.82192512620599700313\", \"652.821925126\", \"652.8219251\", \"652.8219\", \"652.821925\", \"652.821925126206\"]}, {\"input\": \"132 0.34 241\\r\\n\", \"output\": [\"81.940000\", \"81.94\", \"81.939999999978\", \"81.9400000\", \"81.93999999997761563009\"]}, {\"input\": \"984 0.19 1565\\r\\n\", \"output\": [\"297.350000000000\", \"297.34999999999996589395\", \"297.3500000\", \"297.350000\", \"297.35\"]}, {\"input\": \"439 0.83 790\\r\\n\", \"output\": [\"439.00000000000005684342\", \"439\", \"439.000000000000\", \"439.0\", \"439.000000\", \"439.0000000\"]}, {\"input\": \"559 0.92 1006\\r\\n\", \"output\": [\"559\", \"559.0\", \"559.000000000000\", \"559.0000000\", \"559.000000\", \"559.00000000000000000000\"]}, {\"input\": \"887 0.69 1596\\r\\n\", \"output\": [\"886.99999999999988631316\", \"886.999999999999\", \"887.0000000\", \"887\", \"887.000000\", \"887.0\"]}, {\"input\": \"211 0.78 379\\r\\n\", \"output\": [\"211.0000000\", \"211.000000000000\", \"211.00000000000000000000\", \"211\", \"211.000000\", \"211.0\"]}, {\"input\": \"539 0.54 970\\r\\n\", \"output\": [\"522.4592966\", \"522.45929661603338445275\", \"522.459296616034\", \"522.4593\", \"522.459297\", \"522.459296616\"]}, {\"input\": \"659 0.97 1186\\r\\n\", \"output\": [\"659.0000000\", \"659.00000000000034106051\", \"659.000000000000\", \"659.000000\", \"659.0\", \"659\"]}, {\"input\": \"87 0.95 156\\r\\n\", \"output\": [\"87.0000000\", \"87.0\", \"87.000000000000\", \"87.000000\", \"87\", \"86.99999999999998578915\"]}, {\"input\": \"415 0.72 747\\r\\n\", \"output\": [\"415.000000\", \"415\", \"415.0\", \"415.000000000000\", \"414.99999999999977262632\", \"415.0000000\"]}, {\"input\": \"639 0.81 1150\\r\\n\", \"output\": [\"639.00000000000011368684\", \"639.000000\", \"639\", \"639.0\", \"639.000000000000\", \"639.0000000\"]}, {\"input\": \"818 0.99 1472\\r\\n\", \"output\": [\"818.000000000000\", \"818.000000\", \"818\", \"818.0\", \"818.00000000000022737368\", \"818.0000000\"]}, {\"input\": \"246 0.98 442\\r\\n\", \"output\": [\"246\", \"246.000000\", \"246.0\", \"246.00000000000000000000\", \"246.000000000000\", \"246.0000000\"]}, {\"input\": \"470 0.74 846\\r\\n\", \"output\": [\"470.00000000000011368684\", \"470.000000\", \"470.0\", \"470.0000000\", \"470\", \"470.000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 1.00 200\\r\\n', 'output': ['100.00000000000000000000', '100.0000000', '100.0', '100.000000', '100.000000000000', '100']}, {'input': '818 0.99 1472\\r\\n', 'output': ['818.000000000000', '818.000000', '818', '818.0', '818.00000000000022737368', '818.0000000']}, {'input': '415 0.72 747\\r\\n', 'output': ['415.000000', '415', '415.0', '415.000000000000', '414.99999999999977262632', '415.0000000']}, {'input': '2000 0.00 2000\\r\\n', 'output': ['0.000000000000', '0', '0.0000000', '0.00000000000000000000', '0.0', '0.000000']}, {'input': '1 0.01 2000\\r\\n', 'output': ['1', '0.999999998136', '1.0000000', '1.000000', '0.99999999813624351752', '0.9999999981']}]","human_sample_testcases_2":"[{'input': '1400 0.02 200\\r\\n', 'output': ['4.00000000000000000000', '4.000000000000', '4.0000000', '4', '4.0', '4.000000']}, {'input': '211 0.78 379\\r\\n', 'output': ['211.0000000', '211.000000000000', '211.00000000000000000000', '211', '211.000000', '211.0']}, {'input': '246 0.98 442\\r\\n', 'output': ['246', '246.000000', '246.0', '246.00000000000000000000', '246.000000000000', '246.0000000']}, {'input': '1 0.50 4\\r\\n', 'output': ['0.9375', '0.9375000', '0.937500000000', '0.937500', '0.93750000000000000000']}, {'input': '2000 0.00 2000\\r\\n', 'output': ['0.000000000000', '0', '0.0000000', '0.00000000000000000000', '0.0', '0.000000']}]","human_sample_testcases_3":"[{'input': '439 0.83 790\\r\\n', 'output': ['439.00000000000005684342', '439', '439.000000000000', '439.0', '439.000000', '439.0000000']}, {'input': '539 0.54 970\\r\\n', 'output': ['522.4592966', '522.45929661603338445275', '522.459296616034', '522.4593', '522.459297', '522.459296616']}, {'input': '984 0.19 1565\\r\\n', 'output': ['297.350000000000', '297.34999999999996589395', '297.3500000', '297.350000', '297.35']}, {'input': '400 0.96 1754\\r\\n', 'output': ['400.000000000000', '400.0000000', '400.00000000000000000000', '400', '400.0', '400.000000']}, {'input': '2000 0.00 2000\\r\\n', 'output': ['0.000000000000', '0', '0.0000000', '0.00000000000000000000', '0.0', '0.000000']}]","human_sample_testcases_4":"[{'input': '1400 0.02 200\\r\\n', 'output': ['4.00000000000000000000', '4.000000000000', '4.0000000', '4', '4.0', '4.000000']}, {'input': '2000 0.00 2000\\r\\n', 'output': ['0.000000000000', '0', '0.0000000', '0.00000000000000000000', '0.0', '0.000000']}, {'input': '300 0.99 1000\\r\\n', 'output': ['300.000000000000', '300', '300.000000', '300.0000000', '300.0', '300.00000000000005684342']}, {'input': '639 0.81 1150\\r\\n', 'output': ['639.00000000000011368684', '639.000000', '639', '639.0', '639.000000000000', '639.0000000']}, {'input': '1000 0.90 1733\\r\\n', 'output': ['999.99999999999988631316', '1000.0000000', '1000.000000', '1000.000000000000', '1000', '1000.0']}]","human_sample_testcases_5":"[{'input': '1 0.50 1\\r\\n', 'output': ['0.500000', '0.5000000', '0.5', '0.500000000000', '0.50000000000000000000']}, {'input': '100 0.01 53\\r\\n', 'output': ['0.53000000000000002665', '0.530000', '0.53', '0.530000000000', '0.5300000']}, {'input': '132 0.34 241\\r\\n', 'output': ['81.940000', '81.94', '81.939999999978', '81.9400000', '81.93999999997761563009']}, {'input': '439 0.83 790\\r\\n', 'output': ['439.00000000000005684342', '439', '439.000000000000', '439.0', '439.000000', '439.0000000']}, {'input': '415 0.72 747\\r\\n', 'output': ['415.000000', '415', '415.0', '415.000000000000', '414.99999999999977262632', '415.0000000']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":81,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 2 1\", \"2 2 2\", \"3 2 2\"]","input_specification":"The first line contains space-separated integers n, m and k (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u20091000,\u20091\u2009\u2264\u2009k\u2009\u2264\u2009106) \u2014 the board's vertical and horizontal sizes and the number of colors respectively.","src_uid":"f22f28e2d8933f4199ba5ccfc0de8cda","source_code":"#include \n#define mod 1000000007\n\nint f[1001],c[1001][1001],r1[1001],r2[2001];\n\nint mi(int a,long long b)\n{\n int t;\n if (!b)\n return 1;\n t=mi(a,b>>1);\n t=(long long)t*t%mod;\n if (b&1)\n t=(long long)t*a%mod;\n return t;\n}\n\nint main()\n{\n int i,j,n,m,k,x,s=0,t=1;\n scanf(\"%d%d%d\",&n,&m,&k);\n if (m==1)\n s=mi(k,n);\n else\n {\n for (i=0;i<=n;i++)\n {\n c[i][0]=1;\n for (j=1;j<=i;j++)\n c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;\n }\n for (i=1;i<=n;i++)\n {\n f[i]=mi(i,n);\n for (j=1;j\n#include \n\nint main()\n{\n int n,t,k,d;\n scanf(\"%d%d%d%d\",&n,&t,&k,&d);\n int ans=((d\/t)+1)*k;\n if(ans\n\nint main(void){\n int x,y,z,x0,y0,z0;\n int a[6],*p=a-1;\n int i,j,k,num=0;\n\n scanf(\"%d%d%d\",&x,&y,&z);\n scanf(\"%d%d%d\",&x0,&y0,&z0);\n for(i=1;i<=6;i++) scanf(\"%d\",p+i);\n \n if(y<0) num+=p[1];\n else if(y>y0) num+=p[2];\n\n if(z<0) num+=p[3];\n else if(z>z0) num+=p[4];\n\n if(x<0) num+=p[5];\n else if(x>x0) num+=p[6];\n\n printf(\"%d\\n\",num);\n return 0;\n}\n","sample_outputs":"[\"12\", \"4\"]","lang_cluster":"C","notes":"NoteThe first sample corresponds to perspective, depicted on the picture. Vasya sees numbers a2 (on the top face that is the darkest), a6 (on the right face that is the lightest) and a4 (on the left visible face).In the second sample Vasya can only see number a4.","output_specification":"Print a single integer \u2014 the sum of all numbers on the box faces that Vasya sees.","description":"One day Vasya was going home when he saw a box lying on the road. The box can be represented as a rectangular parallelepiped. Vasya needed no time to realize that the box is special, as all its edges are parallel to the coordinate axes, one of its vertices is at point (0,\u20090,\u20090), and the opposite one is at point (x1,\u2009y1,\u2009z1). The six faces of the box contain some numbers a1,\u2009a2,\u2009...,\u2009a6, exactly one number right in the center of each face. The numbers are located on the box like that: number a1 is written on the face that lies on the ZOX plane; a2 is written on the face, parallel to the plane from the previous point; a3 is written on the face that lies on the XOY plane; a4 is written on the face, parallel to the plane from the previous point; a5 is written on the face that lies on the YOZ plane; a6 is written on the face, parallel to the plane from the previous point. At the moment Vasya is looking at the box from point (x,\u2009y,\u2009z). Find the sum of numbers that Vasya sees. Note that all faces of the box are not transparent and Vasya can't see the numbers through the box. The picture contains transparent faces just to make it easier to perceive. You can consider that if Vasya is looking from point, lying on the plane of some face, than he can not see the number that is written on this face. It is enough to see the center of a face to see the corresponding number for Vasya. Also note that Vasya always reads correctly the ai numbers that he sees, independently of their rotation, angle and other factors (that is, for example, if Vasya sees some ai\u2009=\u20096, then he can't mistake this number for 9 and so on). ","human_testcases":"[{\"input\": \"2 2 2\\r\\n1 1 1\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"0 0 10\\r\\n3 2 3\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0 1 2\\r\\n1 1 1\\r\\n634728 627299 454463 927148 298618 186257\\r\\n\", \"output\": [\"927148\"]}, {\"input\": \"5 2 -4\\r\\n1 1 1\\r\\n279519 704273 181008 670653 198973 996401\\r\\n\", \"output\": [\"1881682\"]}, {\"input\": \"5 5 0\\r\\n3 1 3\\r\\n832224 636838 995053 211585 505442 341920\\r\\n\", \"output\": [\"978758\"]}, {\"input\": \"-1 -9 14\\r\\n9 8 10\\r\\n172575 215800 344296 98651 566390 47011\\r\\n\", \"output\": [\"837616\"]}, {\"input\": \"95892 79497 69936\\r\\n7 4 6\\r\\n873850 132840 469930 271591 257864 626722\\r\\n\", \"output\": [\"1031153\"]}, {\"input\": \"-263980 -876063 613611\\r\\n2 3 14\\r\\n63640 300066 460766 222639 51956 412622\\r\\n\", \"output\": [\"338235\"]}, {\"input\": \"30 68 72\\r\\n51 54 95\\r\\n480054 561470 308678 472768 90393 992511\\r\\n\", \"output\": [\"561470\"]}, {\"input\": \"19 60 75\\r\\n11 64 92\\r\\n768641 208726 47379 514231 858941 959876\\r\\n\", \"output\": [\"959876\"]}, {\"input\": \"37 96 41\\r\\n27 74 97\\r\\n747624 148752 730329 406930 814825 993124\\r\\n\", \"output\": [\"1141876\"]}, {\"input\": \"573 79 619\\r\\n36 69 96\\r\\n955743 245262 675667 699027 275227 783730\\r\\n\", \"output\": [\"1728019\"]}, {\"input\": \"34271 -17508 -6147\\r\\n456 567 112\\r\\n804178 307516 306399 18981 989216 228388\\r\\n\", \"output\": [\"1338965\"]}, {\"input\": \"-33064 176437 217190\\r\\n181 507 575\\r\\n161371 827160 733690 99808 584032 954632\\r\\n\", \"output\": [\"1511000\"]}, {\"input\": \"967 -1346 2551\\r\\n769 331 28\\r\\n458319 885170 877010 533360 723416 248230\\r\\n\", \"output\": [\"1239909\"]}, {\"input\": \"46643 53735 -19637\\r\\n3268 9109 5377\\r\\n679826 208720 919306 797520 856404 373419\\r\\n\", \"output\": [\"1501445\"]}, {\"input\": \"7412 -524 9621\\r\\n8748 8870 1521\\r\\n1043 894084 881852 56954 415764 946495\\r\\n\", \"output\": [\"57997\"]}, {\"input\": \"409501 -349039 -285847\\r\\n4386 1034 7566\\r\\n166804 981888 780353 956617 563457 238748\\r\\n\", \"output\": [\"1185905\"]}, {\"input\": \"7669 1619 6208\\r\\n2230 2327 8551\\r\\n28791 762474 463311 687868 175185 383245\\r\\n\", \"output\": [\"383245\"]}, {\"input\": \"2581 12373 -1381\\r\\n2048 8481 7397\\r\\n118694 862180 426553 229109 698247 387794\\r\\n\", \"output\": [\"1676527\"]}, {\"input\": \"35273 82177 67365\\r\\n69755 14857 39718\\r\\n925457 138136 454985 609590 83655 611361\\r\\n\", \"output\": [\"747726\"]}, {\"input\": \"58224 94433 40185\\r\\n55683 99614 33295\\r\\n137430 61976 671256 929825 499631 90071\\r\\n\", \"output\": [\"1019896\"]}, {\"input\": \"-267768 -542892 844309\\r\\n53169 60121 20730\\r\\n760938 814929 213048 452483 867280 110687\\r\\n\", \"output\": [\"2080701\"]}, {\"input\": \"441810 183747 823363\\r\\n945702 484093 693802\\r\\n149570 186362 344439 753794 467269 643649\\r\\n\", \"output\": [\"753794\"]}, {\"input\": \"298742 556311 628232\\r\\n360973 607625 301540\\r\\n278905 531131 923271 701344 873950 969819\\r\\n\", \"output\": [\"701344\"]}, {\"input\": \"366317 904079 468911\\r\\n819427 99580 451147\\r\\n291702 801137 380674 646951 890909 998554\\r\\n\", \"output\": [\"1448088\"]}, {\"input\": \"722477 814197 501318\\r\\n670293 164127 180084\\r\\n665889 389403 663253 449990 909406 240043\\r\\n\", \"output\": [\"1079436\"]}, {\"input\": \"701521 392984 524392\\r\\n462491 968267 126043\\r\\n328074 993331 895443 352976 984911 318865\\r\\n\", \"output\": [\"671841\"]}, {\"input\": \"-827584 -680412 -103147\\r\\n897186 313672 388429\\r\\n892050 717946 505625 200144 311983 606037\\r\\n\", \"output\": [\"1709658\"]}, {\"input\": \"381718 587052 14730\\r\\n290055 960762 231879\\r\\n646112 249417 451908 49140 819134 575870\\r\\n\", \"output\": [\"575870\"]}, {\"input\": \"4 4 4\\r\\n6 3 3\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8 4 4\\r\\n10 3 3\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 10 3\\r\\n6 6 6\\r\\n2 4 8 16 32 64\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 3 1\\r\\n2 2 2\\r\\n1 2 4 8 16 32\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 3\\r\\n2 2 2\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '381718 587052 14730\\r\\n290055 960762 231879\\r\\n646112 249417 451908 49140 819134 575870\\r\\n', 'output': ['575870']}, {'input': '701521 392984 524392\\r\\n462491 968267 126043\\r\\n328074 993331 895443 352976 984911 318865\\r\\n', 'output': ['671841']}, {'input': '298742 556311 628232\\r\\n360973 607625 301540\\r\\n278905 531131 923271 701344 873950 969819\\r\\n', 'output': ['701344']}, {'input': '3 10 3\\r\\n6 6 6\\r\\n2 4 8 16 32 64\\r\\n', 'output': ['4']}, {'input': '409501 -349039 -285847\\r\\n4386 1034 7566\\r\\n166804 981888 780353 956617 563457 238748\\r\\n', 'output': ['1185905']}]","human_sample_testcases_2":"[{'input': '-263980 -876063 613611\\r\\n2 3 14\\r\\n63640 300066 460766 222639 51956 412622\\r\\n', 'output': ['338235']}, {'input': '0 1 2\\r\\n1 1 1\\r\\n634728 627299 454463 927148 298618 186257\\r\\n', 'output': ['927148']}, {'input': '30 68 72\\r\\n51 54 95\\r\\n480054 561470 308678 472768 90393 992511\\r\\n', 'output': ['561470']}, {'input': '298742 556311 628232\\r\\n360973 607625 301540\\r\\n278905 531131 923271 701344 873950 969819\\r\\n', 'output': ['701344']}, {'input': '34271 -17508 -6147\\r\\n456 567 112\\r\\n804178 307516 306399 18981 989216 228388\\r\\n', 'output': ['1338965']}]","human_sample_testcases_3":"[{'input': '0 1 2\\r\\n1 1 1\\r\\n634728 627299 454463 927148 298618 186257\\r\\n', 'output': ['927148']}, {'input': '7412 -524 9621\\r\\n8748 8870 1521\\r\\n1043 894084 881852 56954 415764 946495\\r\\n', 'output': ['57997']}, {'input': '-263980 -876063 613611\\r\\n2 3 14\\r\\n63640 300066 460766 222639 51956 412622\\r\\n', 'output': ['338235']}, {'input': '5 5 0\\r\\n3 1 3\\r\\n832224 636838 995053 211585 505442 341920\\r\\n', 'output': ['978758']}, {'input': '298742 556311 628232\\r\\n360973 607625 301540\\r\\n278905 531131 923271 701344 873950 969819\\r\\n', 'output': ['701344']}]","human_sample_testcases_4":"[{'input': '366317 904079 468911\\r\\n819427 99580 451147\\r\\n291702 801137 380674 646951 890909 998554\\r\\n', 'output': ['1448088']}, {'input': '5 2 -4\\r\\n1 1 1\\r\\n279519 704273 181008 670653 198973 996401\\r\\n', 'output': ['1881682']}, {'input': '3 10 3\\r\\n6 6 6\\r\\n2 4 8 16 32 64\\r\\n', 'output': ['4']}, {'input': '1 1 3\\r\\n2 2 2\\r\\n1 2 3 4 5 6\\r\\n', 'output': ['4']}, {'input': '1 3 1\\r\\n2 2 2\\r\\n1 2 4 8 16 32\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '19 60 75\\r\\n11 64 92\\r\\n768641 208726 47379 514231 858941 959876\\r\\n', 'output': ['959876']}, {'input': '58224 94433 40185\\r\\n55683 99614 33295\\r\\n137430 61976 671256 929825 499631 90071\\r\\n', 'output': ['1019896']}, {'input': '95892 79497 69936\\r\\n7 4 6\\r\\n873850 132840 469930 271591 257864 626722\\r\\n', 'output': ['1031153']}, {'input': '298742 556311 628232\\r\\n360973 607625 301540\\r\\n278905 531131 923271 701344 873950 969819\\r\\n', 'output': ['701344']}, {'input': '722477 814197 501318\\r\\n670293 164127 180084\\r\\n665889 389403 663253 449990 909406 240043\\r\\n', 'output': ['1079436']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":92.86,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":92.86,"human_sample_branch_coverage_4":85.71,"human_sample_branch_coverage_5":78.57,"id":84,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"6\\n1 2 6\", \"10\\n1 2 3 4 5\"]","input_specification":"The first line of the input contains one integer n (2\u2009\u2264\u2009n\u2009\u2264\u2009100, n is even) \u2014 the size of the chessboard. The second line of the input contains integer numbers (1\u2009\u2264\u2009pi\u2009\u2264\u2009n) \u2014 initial positions of the pieces. It is guaranteed that all the positions are distinct.","src_uid":"0efe9afd8e6be9e00f7949be93f0ca1a","source_code":"#include \nint v[51];\nint main(){\n int n, i, aux, f, cn, s, s2;\n s=s2=0;\n scanf(\"%d\", &n);\n cn=n\/2;\n for(i=0; iv[i+1]){\n aux=v[i];\n v[i]=v[i+1];\n v[i+1]=aux;\n f=0;\n }\n }\n for(i=1; i<=n; i+=2)\n s=s+abs(v[(i-1)\/2]-i);\n for(i=2; i<=n; i+=2)\n s2=s2+abs(v[(i-2)\/2]-i);\n if(s>s2)\n printf(\"%d\", s2);\n else\n printf(\"%d\", s);\n return 0;\n}\n","sample_outputs":"[\"2\", \"10\"]","lang_cluster":"C","notes":"NoteIn the first example the only possible strategy is to move the piece at the position 6 to the position 5 and move the piece at the position 2 to the position 3. Notice that if you decide to place the pieces in the white cells the minimum number of moves will be 3.In the second example the possible strategy is to move in 4 moves, then in 3 moves, in 2 moves and in 1 move.","output_specification":"Print one integer \u2014 the minimum number of moves you have to make to place all the pieces in the cells of the same color.","description":"You are given a chessboard of size 1\u2009\u00d7\u2009n. It is guaranteed that n is even. The chessboard is painted like this: \"BWBW...BW\".Some cells of the board are occupied by the chess pieces. Each cell contains no more than one chess piece. It is known that the total number of pieces equals to .In one step you can move one of the pieces one cell to the left or to the right. You cannot move pieces beyond the borders of the board. You also cannot move pieces to the cells that are already occupied.Your task is to place all the pieces in the cells of the same color using the minimum number of moves (all the pieces must occupy only the black cells or only the white cells after all the moves are made).","human_testcases":"[{\"input\": \"6\\r\\n1 2 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n93 54 57 61 68 66 70 96 64 82 80 75 69 77 76 94 67 86 90 73 74 58 100 83 92 89 56 99 88 59 95 72 81 51 85 71 97 60 91 63 65 98 79 84 53 62 87 55 52 78\\r\\n\", \"output\": [\"1225\"]}, {\"input\": \"100\\r\\n41 13 29 11 25 15 6 23 28 50 48 17 3 9 44 24 5 19 34 22 33 32 20 16 35 37 4 10 46 2 39 40 47 49 36 42 1 30 43 21 14 7 18 45 31 8 12 26 27 38\\r\\n\", \"output\": [\"1225\"]}, {\"input\": \"96\\r\\n12 58 70 19 65 61 41 46 15 92 64 72 9 26 53 37 2 3 1 40 10 8 94 66 50 34 36 96 47 78 7 57 5 6 17 69 28 88 89 49 55 81 35 22 25 79 86 59\\r\\n\", \"output\": [\"152\"]}, {\"input\": \"10\\r\\n5 6 7 8 9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"20\\r\\n1 2 3 4 5 6 7 8 9 10\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"10\\r\\n6 7 8 9 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10\\r\\n9 8 7 6 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6\\r\\n1 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"12\\r\\n1 7 8 9 10 12\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6\\r\\n1 4 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"24\\r\\n10 21 15 3 11 4 18 24 16 22 14 9\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"20\\r\\n3 4 6 7 8 10 11 13 14 17\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"10\\r\\n10 9 8 1 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100\\r\\n84 10 26 79 58 93 67 85 7 2 99 4 47 45 75 22 32 82 65 53 63 49 42 52 12 69 86 46 25 76 40 15 13 78 8 81 62 28 60 21 27 80 98 56 3 36 54 16 50 43\\r\\n\", \"output\": [\"104\"]}, {\"input\": \"10\\r\\n1 7 8 9 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10\\r\\n1 4 6 8 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"80\\r\\n41 70 18 53 32 79 51 49 21 27 47 65 50 15 62 60 5 40 14 25 64 9 19 58 38 76 66 52 17 34 13 2 80 43 3 42 33 36 6 72\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"50\\r\\n27 42 41 4 10 45 44 26 49 50 17 28 2 36 18 39 23 12 21 24 19 29 22 40 37\\r\\n\", \"output\": [\"59\"]}, {\"input\": \"10\\r\\n2 3 4 5 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6\\r\\n3 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n9 63 62 88 3 67 54 33 79 51 71 80 37 46 43 57 69 17 34 6 18 40 59 83 76 86 8 55 90 89 45 42 28 98 30 38 77 91 73 58 23 61 41 65 64 93 14 44 16 24\\r\\n\", \"output\": [\"160\"]}, {\"input\": \"10\\r\\n1 6 7 8 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6\\r\\n3 4 5\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10\\r\\n6 7 8 9 10\\r\\n', 'output': ['10']}, {'input': '10\\r\\n10 9 8 1 5\\r\\n', 'output': ['5']}, {'input': '100\\r\\n84 10 26 79 58 93 67 85 7 2 99 4 47 45 75 22 32 82 65 53 63 49 42 52 12 69 86 46 25 76 40 15 13 78 8 81 62 28 60 21 27 80 98 56 3 36 54 16 50 43\\r\\n', 'output': ['104']}, {'input': '24\\r\\n10 21 15 3 11 4 18 24 16 22 14 9\\r\\n', 'output': ['11']}, {'input': '2\\r\\n2\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '6\\r\\n1 2 6\\r\\n', 'output': ['2']}, {'input': '80\\r\\n41 70 18 53 32 79 51 49 21 27 47 65 50 15 62 60 5 40 14 25 64 9 19 58 38 76 66 52 17 34 13 2 80 43 3 42 33 36 6 72\\r\\n', 'output': ['47']}, {'input': '2\\r\\n2\\r\\n', 'output': ['0']}, {'input': '6\\r\\n1 4 5\\r\\n', 'output': ['1']}, {'input': '100\\r\\n93 54 57 61 68 66 70 96 64 82 80 75 69 77 76 94 67 86 90 73 74 58 100 83 92 89 56 99 88 59 95 72 81 51 85 71 97 60 91 63 65 98 79 84 53 62 87 55 52 78\\r\\n', 'output': ['1225']}]","human_sample_testcases_3":"[{'input': '10\\r\\n1 2 3 4 5\\r\\n', 'output': ['10']}, {'input': '100\\r\\n2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100\\r\\n', 'output': ['0']}, {'input': '96\\r\\n12 58 70 19 65 61 41 46 15 92 64 72 9 26 53 37 2 3 1 40 10 8 94 66 50 34 36 96 47 78 7 57 5 6 17 69 28 88 89 49 55 81 35 22 25 79 86 59\\r\\n', 'output': ['152']}, {'input': '24\\r\\n10 21 15 3 11 4 18 24 16 22 14 9\\r\\n', 'output': ['11']}, {'input': '10\\r\\n1 4 6 8 10\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '2\\r\\n2\\r\\n', 'output': ['0']}, {'input': '10\\r\\n1 2 3 4 5\\r\\n', 'output': ['10']}, {'input': '10\\r\\n10 9 8 1 5\\r\\n', 'output': ['5']}, {'input': '10\\r\\n1 4 6 8 10\\r\\n', 'output': ['1']}, {'input': '6\\r\\n3 5 6\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '50\\r\\n27 42 41 4 10 45 44 26 49 50 17 28 2 36 18 39 23 12 21 24 19 29 22 40 37\\r\\n', 'output': ['59']}, {'input': '6\\r\\n3 4 5\\r\\n', 'output': ['2']}, {'input': '2\\r\\n2\\r\\n', 'output': ['0']}, {'input': '10\\r\\n1 7 8 9 10\\r\\n', 'output': ['7']}, {'input': '10\\r\\n2 3 4 5 6\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":85,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 1\", \"4 2\"]","input_specification":"The first line contains a pair of integers n and t (3\u2009\u2264\u2009n\u2009\u2264\u200920, 1\u2009\u2264\u2009t\u2009\u2264\u200910).","src_uid":"6d67559744583229455c5eafe68f7952","source_code":"#include \n\nint dp[21][12][5][5];\n\nint main() {\n\tint i,j,k,l,x,n,t;;\n\tscanf(\"%d %d\\n\",&n,&t);\n\tfor (i=1;i<4;i++)\n\t\tfor (j=i+1;j<=4;j++)\n\t\t\tdp[2][0][i][j]=1;\n\tfor (x=3;x<=n;x++)\n\t\tfor (i=1;i<=4;i++)\n\t\t\tfor (j=1;j<=4;j++)\n\t\t\t\tif (i!=j) for (k=1;k<=4;k++)\n\t\t\t\t\tif (j!=k) for (l=0;l<=t;l++)\n\t\t\t\t\t\tif (ik) dp[x][l+1][j][k]+=dp[x-1][l][i][j];\n\t\t\t\t\t\telse dp[x][l][j][k]+=dp[x-1][l][i][j];\n\tint cnt=0;\n\tfor (i=2;i<=4;i++)\n\t\tfor (j=1;j\nint main()\n{\n\tint r,b,g,mix,a[10],i;\n\tscanf(\"%d %d %d\",&r,&b,&g);\n\tif(r==0 || b==0 || g==0)\n\t{\n\t\tprintf(\"%d\",(r\/3+g\/3+b\/3));\n\t\treturn 0;\t\n\t}\n\tfor(i=0;i<=2;i++)\n\t{\n\t\ta[i]=(i+((r-i)\/3+(b-i)\/3+(g-i)\/3));\n\n\t}\n\tint max=0;\n\tfor(i=0;i<=2;i++)\n\t{\n\t\tif(a[i]>max)\n\t\t\tmax=a[i];\n\t}\n\tprintf(\"%d\",max);\n\treturn 0;\n\n}\n","sample_outputs":"[\"6\", \"4\", \"0\"]","lang_cluster":"C","notes":"NoteIn test case 1, we can make 1 red bouquet, 2 green bouquets and 3 blue bouquets.In test case 2, we can make 1 red, 1 green, 1 blue and 1 mixing bouquet.","output_specification":"Print the maximal number of bouquets Fox Ciel can make.","description":"Fox Ciel has some flowers: r red flowers, g green flowers and b blue flowers. She wants to use these flowers to make several bouquets. There are 4 types of bouquets: To make a \"red bouquet\", it needs 3 red flowers. To make a \"green bouquet\", it needs 3 green flowers. To make a \"blue bouquet\", it needs 3 blue flowers. To make a \"mixing bouquet\", it needs 1 red, 1 green and 1 blue flower. Help Fox Ciel to find the maximal number of bouquets she can make.","human_testcases":"[{\"input\": \"3 6 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 3 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 8 9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8 8 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"15 3 999\\r\\n\", \"output\": [\"339\"]}, {\"input\": \"32 62 92\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"123456789 123456789 123456789\\r\\n\", \"output\": [\"123456789\"]}, {\"input\": \"3 5 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"666806767 385540591 357848286\\r\\n\", \"output\": [\"470065214\"]}, {\"input\": \"80010646 727118126 817880463\\r\\n\", \"output\": [\"541669744\"]}, {\"input\": \"829651016 732259171 572879931\\r\\n\", \"output\": [\"711596705\"]}, {\"input\": \"242854896 442432924 180395753\\r\\n\", \"output\": [\"288561190\"]}, {\"input\": \"139978911 5123031 935395222\\r\\n\", \"output\": [\"360165721\"]}, {\"input\": \"553182792 10264076 395427398\\r\\n\", \"output\": [\"319624755\"]}, {\"input\": \"597790453 720437830 855459575\\r\\n\", \"output\": [\"724562619\"]}, {\"input\": \"494914467 356982656 757942689\\r\\n\", \"output\": [\"536613270\"]}, {\"input\": \"908118348 67156409 217974865\\r\\n\", \"output\": [\"397749873\"]}, {\"input\": \"952726009 629846517 972974334\\r\\n\", \"output\": [\"851848953\"]}, {\"input\": \"775140200 616574841 630329230\\r\\n\", \"output\": [\"674014756\"]}, {\"input\": \"524780569 326748594 90361407\\r\\n\", \"output\": [\"313963523\"]}, {\"input\": \"937984449 184405994 992844522\\r\\n\", \"output\": [\"705078321\"]}, {\"input\": \"835108464 525983528 452876698\\r\\n\", \"output\": [\"604656229\"]}, {\"input\": \"879716125 531124573 207876166\\r\\n\", \"output\": [\"539572288\"]}, {\"input\": \"292920005 241298326 667908343\\r\\n\", \"output\": [\"400708891\"]}, {\"input\": \"1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"1000000000 999999999 999999998\\r\\n\", \"output\": [\"999999998\"]}, {\"input\": \"999999998 999999998 999999999\\r\\n\", \"output\": [\"999999998\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 1000000000 0\\r\\n\", \"output\": [\"333333333\"]}, {\"input\": \"0 1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 3 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 2 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 5 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 0 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9 9 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"65 30 74\\r\\n\", \"output\": [\"56\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '835108464 525983528 452876698\\r\\n', 'output': ['604656229']}, {'input': '0 1 1\\r\\n', 'output': ['0']}, {'input': '0 1 0\\r\\n', 'output': ['0']}, {'input': '952726009 629846517 972974334\\r\\n', 'output': ['851848953']}, {'input': '0 5 5\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '952726009 629846517 972974334\\r\\n', 'output': ['851848953']}, {'input': '0 1 1\\r\\n', 'output': ['0']}, {'input': '3 3 5\\r\\n', 'output': ['3']}, {'input': '597790453 720437830 855459575\\r\\n', 'output': ['724562619']}, {'input': '1000000000 999999999 999999998\\r\\n', 'output': ['999999998']}]","human_sample_testcases_3":"[{'input': '242854896 442432924 180395753\\r\\n', 'output': ['288561190']}, {'input': '0 0 0\\r\\n', 'output': ['0']}, {'input': '0 5 5\\r\\n', 'output': ['2']}, {'input': '1000000000 999999999 999999998\\r\\n', 'output': ['999999998']}, {'input': '3 5 5\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '0 2 2\\r\\n', 'output': ['0']}, {'input': '952726009 629846517 972974334\\r\\n', 'output': ['851848953']}, {'input': '999999998 999999998 999999999\\r\\n', 'output': ['999999998']}, {'input': '0 0 0\\r\\n', 'output': ['0']}, {'input': '123456789 123456789 123456789\\r\\n', 'output': ['123456789']}]","human_sample_testcases_5":"[{'input': '0 1000000000 0\\r\\n', 'output': ['333333333']}, {'input': '3 6 9\\r\\n', 'output': ['6']}, {'input': '32 62 92\\r\\n', 'output': ['62']}, {'input': '0 2 2\\r\\n', 'output': ['0']}, {'input': '139978911 5123031 935395222\\r\\n', 'output': ['360165721']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":83.33,"id":87,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":83.33} {"sample_inputs":"[\"QAQAQYSYIOIWIN\", \"QAQQQZZYNOIWIN\"]","input_specification":"The only line contains a string of length n (1\u2009\u2264\u2009n\u2009\u2264\u2009100). It's guaranteed that the string only contains uppercase English letters.","src_uid":"8aef4947322438664bd8610632fe0947","source_code":"#include\nint main()\n{\n char myarray[1000];\n scanf(\"%s\",&myarray);\n int i,cnt=0,j,k,l,len=0;\n len=strlen(myarray);\n for(i=0; i\nint b;\nint check(int i){\n int temp=0,t=0;\n while(i>0){\n if(i%10==4||i%10==7) temp=temp*10+i%10;\n i\/=10;\n }\n while(temp>0){\n t=t*10+temp%10;\n temp\/=10;\n }\n return t==b;\n}\nint main(){\n int a,i;\n scanf(\"%d%d\",&a,&b);\n for(i=a+1;;i++){\n if(check(i)){\n printf(\"%d\",i);\n return 0;\n }\n }\n return 0;\n}\n","sample_outputs":"[\"7\", \"147\"]","lang_cluster":"C","notes":null,"output_specification":"In the only line print a single number \u2014 the number c that is sought by Petya.","description":"Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.Petya calls a mask of a positive integer n the number that is obtained after successive writing of all lucky digits of number n from the left to the right. For example, the mask of number 72174994 is number 7744, the mask of 7 is 7, the mask of 9999047 is 47. Obviously, mask of any number is always a lucky number.Petya has two numbers \u2014 an arbitrary integer a and a lucky number b. Help him find the minimum number c (c\u2009>\u2009a) such that the mask of number c equals b.","human_testcases":"[{\"input\": \"1 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"100 47\\r\\n\", \"output\": [\"147\"]}, {\"input\": \"458 47\\r\\n\", \"output\": [\"467\"]}, {\"input\": \"7 7\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"547 47\\r\\n\", \"output\": [\"647\"]}, {\"input\": \"77 77\\r\\n\", \"output\": [\"177\"]}, {\"input\": \"44 4\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"740 4\\r\\n\", \"output\": [\"804\"]}, {\"input\": \"100000 77777\\r\\n\", \"output\": [\"177777\"]}, {\"input\": \"77777 77777\\r\\n\", \"output\": [\"177777\"]}, {\"input\": \"47 74\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"74 77\\r\\n\", \"output\": [\"77\"]}, {\"input\": \"77 74\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"98545 7474\\r\\n\", \"output\": [\"107474\"]}, {\"input\": \"99997 4\\r\\n\", \"output\": [\"100004\"]}, {\"input\": \"100000 7\\r\\n\", \"output\": [\"100007\"]}, {\"input\": \"99997 47\\r\\n\", \"output\": [\"100047\"]}, {\"input\": \"47774 774\\r\\n\", \"output\": [\"50774\"]}, {\"input\": \"47744 7\\r\\n\", \"output\": [\"50007\"]}, {\"input\": \"45896 4\\r\\n\", \"output\": [\"45898\"]}, {\"input\": \"45679 77777\\r\\n\", \"output\": [\"77777\"]}, {\"input\": \"99979 77\\r\\n\", \"output\": [\"100077\"]}, {\"input\": \"10 77777\\r\\n\", \"output\": [\"77777\"]}, {\"input\": \"1 47774\\r\\n\", \"output\": [\"47774\"]}, {\"input\": \"47774 47774\\r\\n\", \"output\": [\"147774\"]}, {\"input\": \"47580 47774\\r\\n\", \"output\": [\"47774\"]}, {\"input\": \"55557 74\\r\\n\", \"output\": [\"55574\"]}, {\"input\": \"59765 4774\\r\\n\", \"output\": [\"64774\"]}, {\"input\": \"76492 447\\r\\n\", \"output\": [\"80447\"]}, {\"input\": \"69700 77477\\r\\n\", \"output\": [\"77477\"]}, {\"input\": \"31975 74\\r\\n\", \"output\": [\"32074\"]}, {\"input\": \"369 47\\r\\n\", \"output\": [\"407\"]}, {\"input\": \"39999 4\\r\\n\", \"output\": [\"40000\"]}, {\"input\": \"39999 4774\\r\\n\", \"output\": [\"40774\"]}, {\"input\": \"474 74\\r\\n\", \"output\": [\"574\"]}, {\"input\": \"40007 74444\\r\\n\", \"output\": [\"74444\"]}, {\"input\": \"40007 74\\r\\n\", \"output\": [\"50074\"]}, {\"input\": \"1 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"700 74\\r\\n\", \"output\": [\"704\"]}, {\"input\": \"476 47\\r\\n\", \"output\": [\"478\"]}, {\"input\": \"99999 77\\r\\n\", \"output\": [\"100077\"]}, {\"input\": \"46 7\\r\\n\", \"output\": [\"57\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 7\\r\\n', 'output': ['7']}, {'input': '59765 4774\\r\\n', 'output': ['64774']}, {'input': '31975 74\\r\\n', 'output': ['32074']}, {'input': '100000 77777\\r\\n', 'output': ['177777']}, {'input': '74 77\\r\\n', 'output': ['77']}]","human_sample_testcases_2":"[{'input': '69700 77477\\r\\n', 'output': ['77477']}, {'input': '10 77777\\r\\n', 'output': ['77777']}, {'input': '99997 47\\r\\n', 'output': ['100047']}, {'input': '39999 4774\\r\\n', 'output': ['40774']}, {'input': '100 47\\r\\n', 'output': ['147']}]","human_sample_testcases_3":"[{'input': '40007 74444\\r\\n', 'output': ['74444']}, {'input': '46 7\\r\\n', 'output': ['57']}, {'input': '47744 7\\r\\n', 'output': ['50007']}, {'input': '474 74\\r\\n', 'output': ['574']}, {'input': '10 77777\\r\\n', 'output': ['77777']}]","human_sample_testcases_4":"[{'input': '100000 7\\r\\n', 'output': ['100007']}, {'input': '98545 7474\\r\\n', 'output': ['107474']}, {'input': '10 77777\\r\\n', 'output': ['77777']}, {'input': '47774 774\\r\\n', 'output': ['50774']}, {'input': '7 7\\r\\n', 'output': ['17']}]","human_sample_testcases_5":"[{'input': '74 77\\r\\n', 'output': ['77']}, {'input': '31975 74\\r\\n', 'output': ['32074']}, {'input': '474 74\\r\\n', 'output': ['574']}, {'input': '458 47\\r\\n', 'output': ['467']}, {'input': '700 74\\r\\n', 'output': ['704']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":89,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\\n1 2\", \"3\\n2 4 6\", \"2\\n12 18\", \"5\\n45 12 27 30 18\"]","input_specification":"The first line contains an integer n (2\u2009\u2264\u2009n\u2009\u2264\u2009100). Then the second line contains n integers: x1, x2, ..., xn (1\u2009\u2264\u2009xi\u2009\u2264\u2009100).","src_uid":"042cf938dc4a0f46ff33d47b97dc6ad4","source_code":"#include \nint main(){\n int n,m,a[100],i,j,tr=1,min;\n scanf(\"%d\",&n);\n for(i=0;ia[i])min=a[i];\n for(i=0;imin){\n tr=1;\n a[i]-=min;\n }\n }\n m=0;\n \n for(i=0;i\nint main()\n{\n int n,i,l=0;\n scanf(\"%d\",&n);\n for(i=1;i\n#include \n#include \n#define MAXN 210\n\nint main ()\n{\n static char data[MAXN];\n static int a[MAXN][MAXN];\n memset(a,0,sizeof(a));\n scanf(\"%s\",data);\n int N = strlen(data);\n int x = 105;\n int y = 105;\n a[x][y] = 1;\n int i;\n for (i = 2; i <= (N+1); i++)\n {\n int nx = x;\n int ny = y;\n if (data[i-2] == 'L') nx--;\n else if (data[i-2] == 'R') nx++;\n else if (data[i-2] == 'U') ny++;\n else ny--;\n \n if ((a[nx-1][ny] > 0) && (a[nx-1][ny] < (i-1)))\n {\n printf(\"BUG\\n\");\n return 0;\n }\n if ((a[nx+1][ny] > 0) && (a[nx+1][ny] < (i-1)))\n {\n printf(\"BUG\\n\");\n return 0;\n }\n if ((a[nx][ny-1] > 0) && (a[nx][ny-1] < (i-1)))\n {\n printf(\"BUG\\n\");\n return 0;\n }\n if ((a[nx][ny+1] > 0) && (a[nx][ny+1] < (i-1)))\n {\n printf(\"BUG\\n\");\n return 0;\n }\n if (a[nx][ny] > 0)\n {\n printf(\"BUG\\n\");\n return 0;\n } \n \n a[nx][ny] = i;\n x = nx;\n y = ny;\n }\n printf(\"OK\\n\");\n return 0;\n}\n","sample_outputs":"[\"OK\", \"BUG\"]","lang_cluster":"C","notes":null,"output_specification":"In the first line output the only word OK (if the above described map exists), or BUG (if such a map does not exist).","description":"The whole world got obsessed with robots,and to keep pace with the progress, great Berland's programmer Draude decided to build his own robot. He was working hard at the robot. He taught it to walk the shortest path from one point to another, to record all its movements, but like in many Draude's programs, there was a bug \u2014 the robot didn't always walk the shortest path. Fortunately, the robot recorded its own movements correctly. Now Draude wants to find out when his robot functions wrong. Heh, if Draude only remembered the map of the field, where he tested the robot, he would easily say if the robot walked in the right direction or not. But the field map was lost never to be found, that's why he asks you to find out if there exist at least one map, where the path recorded by the robot is the shortest.The map is an infinite checkered field, where each square is either empty, or contains an obstruction. It is also known that the robot never tries to run into the obstruction. By the recorded robot's movements find out if there exist at least one such map, that it is possible to choose for the robot a starting square (the starting square should be empty) such that when the robot moves from this square its movements coincide with the recorded ones (the robot doesn't run into anything, moving along empty squares only), and the path from the starting square to the end one is the shortest.In one movement the robot can move into the square (providing there are no obstrutions in this square) that has common sides with the square the robot is currently in.","human_testcases":"[{\"input\": \"LLUUUR\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RRUULLDD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"L\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"R\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RR\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"DL\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"LD\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RUL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"ULD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDR\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RRDD\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RRLR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RRDL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LRUD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RDRLL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DRDRD\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"ULURL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LUUDU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RDLUR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DLDLDDRR\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"RDRDDD\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"UULLDLUR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LULU\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"LLDDLDLLDDDLLLDLLLLLUU\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"URRRRRURRURUURRRRRDDDDLDDDRDDDDLLDLL\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"UL\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"UDR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDR\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"UUUDU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LULULL\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"DLURUUU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"UURUURRUUU\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"DDDDRDDLDDDDDDDRDDLD\\r\\n\", \"output\": [\"OK\"]}, {\"input\": \"URRRLULUURURLRLLLLULLRLRURLULRLULLULRRUU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RURRRRLURRRURRUURRRRRRRRDDULULRRURRRDRRRRRRRRRRLDR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RLRRRRRDRRDRRRRDLRRRRRRRDLRLDDLRRRRLDLDRDRRRRDRDRDRDLRRURRLRRRRDRRRRRRRRLDDRLRRDRRRRRRRDRDRLDRDDDRDR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDUL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"UUULLLLRDD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LLLLLLLLRRRRDDDDDDDUUUUUU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDDDDDDDDDUUUUUUUUUUUURRRRRRRRRRRRRLLLLLLLLLLLLLLL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUUUUUUU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DLUR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"UUUURDLLLL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RRRRRRRRRRRURLLLLLLLLLLLL\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LLLLLLLLLLLLLLLLLLLLLLLLLLRUUUUUUUUUUUUUUUUUUUUUUUUU\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUURDRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDLDRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RRUULLD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"LUUUULLLLDDDDRRRD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDLLLDDDRRRUURRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDDDDLLDDRRURRRRRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDDDDDDDLLLLLLLLLLLDDDDDDDDDDDRRRRRRRRRRRUUUUUUUUUURRRRRRRRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDLLLLLLLDDDDDDDRRRRRRRUUUUUURRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RRRUUULLLDD\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLLLLDDDDRRRRUUURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n\", \"output\": [\"BUG\"]}, {\"input\": \"RRRRRRRRRRRDDDDDDDDDDDDDDDDDDDRRRRRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUULLLLLLLLLLLLLLLLLLUUUUUUUUUUU\\r\\n\", \"output\": [\"BUG\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'RURRRRLURRRURRUURRRRRRRRDDULULRRURRRDRRRRRRRRRRLDR\\r\\n', 'output': ['BUG']}, {'input': 'LULU\\r\\n', 'output': ['OK']}, {'input': 'DDLDRRR\\r\\n', 'output': ['BUG']}, {'input': 'LLLLLLLLLLLLLLLLLLLLLLLLLLRUUUUUUUUUUUUUUUUUUUUUUUUU\\r\\n', 'output': ['BUG']}, {'input': 'RRLR\\r\\n', 'output': ['BUG']}]","human_sample_testcases_2":"[{'input': 'RDRLL\\r\\n', 'output': ['BUG']}, {'input': 'LLLLLLLLLLLLLLLLLLLLLLLLLLRUUUUUUUUUUUUUUUUUUUUUUUUU\\r\\n', 'output': ['BUG']}, {'input': 'LUUUULLLLDDDDRRRD\\r\\n', 'output': ['BUG']}, {'input': 'UUUURDLLLL\\r\\n', 'output': ['BUG']}, {'input': 'DDR\\r\\n', 'output': ['OK']}]","human_sample_testcases_3":"[{'input': 'RRDD\\r\\n', 'output': ['OK']}, {'input': 'RRRRRRRRRRRDDDDDDDDDDDDDDDDDDDRRRRRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUULLLLLLLLLLLLLLLLLLUUUUUUUUUUU\\r\\n', 'output': ['BUG']}, {'input': 'DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDLLLLDDDDRRRRUUURRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n', 'output': ['BUG']}, {'input': 'LULULL\\r\\n', 'output': ['OK']}, {'input': 'DDUL\\r\\n', 'output': ['BUG']}]","human_sample_testcases_4":"[{'input': 'DDR\\r\\n', 'output': ['OK']}, {'input': 'DDDDDDDLLDDRRURRRRRRR\\r\\n', 'output': ['BUG']}, {'input': 'DLURUUU\\r\\n', 'output': ['BUG']}, {'input': 'RDRDDD\\r\\n', 'output': ['OK']}, {'input': 'DDDDDDDDDDDDDDDDDDDDDDDDDLLLLLLLLLLLLLLLLLLLLLLLLRRRRRRRRRRRRRRRRRRRRRRRRRRRUUUUUUUUUUUUUUUUUUUUUUUU\\r\\n', 'output': ['BUG']}]","human_sample_testcases_5":"[{'input': 'LD\\r\\n', 'output': ['OK']}, {'input': 'LLUUUR\\r\\n', 'output': ['OK']}, {'input': 'RR\\r\\n', 'output': ['OK']}, {'input': 'DLURUUU\\r\\n', 'output': ['BUG']}, {'input': 'RDRDDD\\r\\n', 'output': ['OK']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.24,"human_sample_line_coverage_2":88.24,"human_sample_line_coverage_3":82.35,"human_sample_line_coverage_4":82.35,"human_sample_line_coverage_5":76.47,"human_sample_branch_coverage_1":92.31,"human_sample_branch_coverage_2":92.31,"human_sample_branch_coverage_3":88.46,"human_sample_branch_coverage_4":88.46,"human_sample_branch_coverage_5":84.62,"id":92,"human_sample_pass_rate":100.0,"human_sample_line_coverage":83.53,"human_sample_branch_coverage":89.232} {"sample_inputs":"[\"2 4\", \"3 3\"]","input_specification":"In a single line you are given two integers M and N \u2014 board sizes in squares (1\u2009\u2264\u2009M\u2009\u2264\u2009N\u2009\u2264\u200916).","src_uid":"e840e7bfe83764bee6186fcf92a1b5cd","source_code":"#include\n#include\nint main ()\n{\n int M,N,X;\n scanf(\"%d %d\", &M, &N);\n X=((M*N)\/2);\n printf(\"%d\\n\", X);\n return 0;\n}\n\n\/* 1490302257089 *\/\n","sample_outputs":"[\"4\", \"4\"]","lang_cluster":"C","notes":null,"output_specification":"Output one number \u2014 the maximal number of dominoes, which can be placed.","description":"You are given a rectangular board of M\u2009\u00d7\u2009N squares. Also you are given an unlimited number of standard domino pieces of 2\u2009\u00d7\u20091 squares. You are allowed to rotate the pieces. You are asked to place as many dominoes as possible on the board so as to meet the following conditions:1. Each domino completely covers two squares.2. No two dominoes overlap.3. Each domino lies entirely inside the board. It is allowed to touch the edges of the board.Find the maximum number of dominoes, which can be placed under these restrictions.","human_testcases":"[{\"input\": \"2 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 15\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 16\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 14\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"2 15\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"1 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 16\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"3 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 10\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"3 14\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"3 15\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"3 16\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"5 7\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"16 16\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"15 16\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"15 15\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"14 16\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"11 13\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"5 16\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"8 15\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"14 15\\r\\n\", \"output\": [\"105\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 4\\r\\n', 'output': ['4']}, {'input': '3 10\\r\\n', 'output': ['15']}, {'input': '14 15\\r\\n', 'output': ['105']}, {'input': '2 5\\r\\n', 'output': ['5']}, {'input': '2 7\\r\\n', 'output': ['7']}]","human_sample_testcases_2":"[{'input': '2 5\\r\\n', 'output': ['5']}, {'input': '1 6\\r\\n', 'output': ['3']}, {'input': '3 5\\r\\n', 'output': ['7']}, {'input': '8 15\\r\\n', 'output': ['60']}, {'input': '3 6\\r\\n', 'output': ['9']}]","human_sample_testcases_3":"[{'input': '1 16\\r\\n', 'output': ['8']}, {'input': '15 15\\r\\n', 'output': ['112']}, {'input': '3 5\\r\\n', 'output': ['7']}, {'input': '1 15\\r\\n', 'output': ['7']}, {'input': '3 14\\r\\n', 'output': ['21']}]","human_sample_testcases_4":"[{'input': '11 13\\r\\n', 'output': ['71']}, {'input': '4 4\\r\\n', 'output': ['8']}, {'input': '2 5\\r\\n', 'output': ['5']}, {'input': '2 14\\r\\n', 'output': ['14']}, {'input': '5 7\\r\\n', 'output': ['17']}]","human_sample_testcases_5":"[{'input': '15 16\\r\\n', 'output': ['120']}, {'input': '2 2\\r\\n', 'output': ['2']}, {'input': '16 16\\r\\n', 'output': ['128']}, {'input': '1 2\\r\\n', 'output': ['1']}, {'input': '5 16\\r\\n', 'output': ['40']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":93,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 7 1 3 2 2\", \"5 5 2 3 1 1\"]","input_specification":"The first line of the input contains six integers n,\u2009m,\u2009i,\u2009j,\u2009a,\u2009b (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009106;\u00a01\u2009\u2264\u2009i\u2009\u2264\u2009n;\u00a01\u2009\u2264\u2009j\u2009\u2264\u2009m;\u00a01\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009106). You can assume that the chessboard rows are numbered from 1 to n from top to bottom and the columns are numbered from 1 to m from left to right. Position (i,\u2009j) in the statement is a chessboard cell on the intersection of the i-th row and the j-th column. You can consider that the corners are: (1,\u2009m), (n,\u20091), (n,\u2009m), (1,\u20091).","src_uid":"51155e9bfa90e0ff29d049cedc3e1862","source_code":"#include\nlong long int n,m,i,j,a,b;\nint ab(int a)\n{\n\tif(a<0)\n\treturn -a;\n\treturn a;\n}\nint max(int a,int b)\n{\n\tif(ab)\n\treturn b;\n\treturn a;\n}\nint func(int u,int v)\n{\t\t\n\t\tif(i==u&&j==v)\n\t\treturn 0;\n\t\tif(i+a>n&&i-a<=0)\n\t\treturn -1;\n\t\tif(j+b>m&&j-b<=0)\n\t\treturn -1;\n\t\tint x=ab(u-i),y=ab(v-j);\n\t\tif(x%a!=0||y%b!=0)\n\t\treturn -1;\n\t\tx=x\/a;y=y\/b;\n\t\tif(x%2!=y%2)\n\t\treturn -1;\n\t\tint t=max(x,y);\n\t\treturn t;\n}\nint main()\n{\n\tscanf(\"%lld%lld%lld%lld%lld%lld\",&n,&m,&i,&j,&a,&b);\n\tint ans=100000000;\n\tint a=func(1,m);\n\tif(a!=-1)\n\t{\n\t\tans=min(ans,a);\n\t}\n\ta=func(n,1);\n\tif(a!=-1)\n\t{\n\t\tans=min(ans,a);\n\t}\n\ta=func(1,1);\n\tif(a!=-1)\n\t{\n\t\tans=min(ans,a);\n\t}\n\ta=func(n,m);\n\tif(a!=-1)\n\t{\n\t\tans=min(ans,a);\n\t}\n\tif(ans<100000000)\n\tprintf(\"%d\",ans);\n\telse\n\tprintf(\"Poor Inna and pony!\");\n\treturn 0;\n}","sample_outputs":"[\"2\", \"Poor Inna and pony!\"]","lang_cluster":"C","notes":"NoteNote to sample 1:Inna and the pony can move the candy to position (1\u2009+\u20092,\u20093\u2009+\u20092)\u2009=\u2009(3,\u20095), from there they can move it to positions (3\u2009-\u20092,\u20095\u2009+\u20092)\u2009=\u2009(1,\u20097) and (3\u2009+\u20092,\u20095\u2009+\u20092)\u2009=\u2009(5,\u20097). These positions correspond to the corner squares of the chess board. Thus, the answer to the test sample equals two.","output_specification":"In a single line print a single integer \u2014 the minimum number of moves needed to get the candy. If Inna and the pony cannot get the candy playing by Dima's rules, print on a single line \"Poor Inna and pony!\" without the quotes.","description":"Dima and Inna are doing so great! At the moment, Inna is sitting on the magic lawn playing with a pink pony. Dima wanted to play too. He brought an n\u2009\u00d7\u2009m chessboard, a very tasty candy and two numbers a and b.Dima put the chessboard in front of Inna and placed the candy in position (i,\u2009j) on the board. The boy said he would give the candy if it reaches one of the corner cells of the board. He's got one more condition. There can only be actions of the following types: move the candy from position (x,\u2009y) on the board to position (x\u2009-\u2009a,\u2009y\u2009-\u2009b); move the candy from position (x,\u2009y) on the board to position (x\u2009+\u2009a,\u2009y\u2009-\u2009b); move the candy from position (x,\u2009y) on the board to position (x\u2009-\u2009a,\u2009y\u2009+\u2009b); move the candy from position (x,\u2009y) on the board to position (x\u2009+\u2009a,\u2009y\u2009+\u2009b). Naturally, Dima doesn't allow to move the candy beyond the chessboard borders.Inna and the pony started shifting the candy around the board. They wonder what is the minimum number of allowed actions that they need to perform to move the candy from the initial position (i,\u2009j) to one of the chessboard corners. Help them cope with the task! ","human_testcases":"[{\"input\": \"5 7 1 3 2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 5 2 3 1 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1 1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"23000 15500 100 333 9 1\\r\\n\", \"output\": [\"15167\"]}, {\"input\": \"33999 99333 33000 99000 3 9\\r\\n\", \"output\": [\"333\"]}, {\"input\": \"5 7 1 3 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 100 1 50 1 50\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1000 1 1 1 1 500\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"304 400 12 20 4 4\\r\\n\", \"output\": [\"95\"]}, {\"input\": \"1000000 1000000 1000000 1000000 1000000 1000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000 99999 12345 23456 23 54\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"50000 100000 500 1000 500 1000\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"50000 100000 500 1000 500 2000\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"50000 100000 500 1000 500 500\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"99999 99999 1 2 1 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"5 4 2 3 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"5 4 2 3 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 5 1 3 1 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"2347 2348 234 48 238 198\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1000000 2 2 2 2 1\\r\\n\", \"output\": [\"499999\"]}, {\"input\": \"100 100 50 50 500 500\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1000 2000 100 200 90 90\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1000 1000 10 15 10 5\\r\\n\", \"output\": [\"197\"]}, {\"input\": \"23000 15500 100 333 9 1\\r\\n\", \"output\": [\"15167\"]}, {\"input\": \"5 5 4 3 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 5 4 4 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 5 4 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3 2 2 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"5 8 4 1 2 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"5 8 4 2 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 8 1 2 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000 1000000 500000 500000 1 1\\r\\n\", \"output\": [\"499999\"]}, {\"input\": \"500000 100000 400 80000 2 2\\r\\n\", \"output\": [\"249800\"]}, {\"input\": \"1004 999004 4 4 5 5\\r\\n\", \"output\": [\"199800\"]}, {\"input\": \"11 11 3 3 4 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 100 70 5 1 1\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"1 5 1 3 1 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1 5 1 3 10 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"6 1 5 1 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"2 10 1 5 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"5 1 3 1 1 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"1000 1000 1 3 10000 1\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"2 6 1 2 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"2 6 1 2 6 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"7 1 5 1 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"2 20 2 5 2 2\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}, {\"input\": \"4 4 3 4 1 5\\r\\n\", \"output\": [\"Poor Inna and pony!\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 4 3 4 1 5\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '23000 15500 100 333 9 1\\r\\n', 'output': ['15167']}, {'input': '304 400 12 20 4 4\\r\\n', 'output': ['95']}, {'input': '1000000 99999 12345 23456 23 54\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '1000000 1000000 500000 500000 1 1\\r\\n', 'output': ['499999']}]","human_sample_testcases_2":"[{'input': '5 5 4 4 1 1\\r\\n', 'output': ['1']}, {'input': '100 100 50 50 500 500\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '1000 1 1 1 1 500\\r\\n', 'output': ['0']}, {'input': '2 8 1 2 1 3\\r\\n', 'output': ['2']}, {'input': '5 5 4 3 1 2\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '1000000 99999 12345 23456 23 54\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '1004 999004 4 4 5 5\\r\\n', 'output': ['199800']}, {'input': '2 8 1 2 1 3\\r\\n', 'output': ['2']}, {'input': '11 11 3 3 4 4\\r\\n', 'output': ['2']}, {'input': '3 3 2 2 2 2\\r\\n', 'output': ['Poor Inna and pony!']}]","human_sample_testcases_4":"[{'input': '11 11 3 3 4 4\\r\\n', 'output': ['2']}, {'input': '50000 100000 500 1000 500 500\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '7 1 5 1 2 2\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '1 100 1 50 1 50\\r\\n', 'output': ['Poor Inna and pony!']}, {'input': '500000 100000 400 80000 2 2\\r\\n', 'output': ['249800']}]","human_sample_testcases_5":"[{'input': '5 7 1 3 1 2\\r\\n', 'output': ['2']}, {'input': '1000000 1000000 1000000 1000000 1000000 1000000\\r\\n', 'output': ['0']}, {'input': '5 5 4 2 1 1\\r\\n', 'output': ['1']}, {'input': '23000 15500 100 333 9 1\\r\\n', 'output': ['15167']}, {'input': '3 3 2 2 2 2\\r\\n', 'output': ['Poor Inna and pony!']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":93.48,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":89.13,"human_sample_line_coverage_4":86.96,"human_sample_line_coverage_5":97.83,"human_sample_branch_coverage_1":76.47,"human_sample_branch_coverage_2":91.18,"human_sample_branch_coverage_3":76.47,"human_sample_branch_coverage_4":76.47,"human_sample_branch_coverage_5":85.29,"id":94,"human_sample_pass_rate":100.0,"human_sample_line_coverage":93.48,"human_sample_branch_coverage":81.176} {"sample_inputs":"[\"42\", \"5\"]","input_specification":"The only line contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u200910000).","src_uid":"5d4f38ffd1849862623325fdbe06cd00","source_code":"#include\nint main()\n{\n int n,feet,tmp,inch;\n scanf(\"%d\",&n);\n inch=n\/3;\n if(n%3==2)\n {\n inch++;\n }\n feet=inch\/12;\n inch=inch%12;\n printf(\"%d %d\\n\",feet,inch);\n return 0;\n}","sample_outputs":"[\"1 2\", \"0 2\"]","lang_cluster":"C","notes":null,"output_specification":"Print two non-negative space-separated integers a and b, where a is the numbers of feet and b is the number of inches.","description":"Lengths are measures in Baden in inches and feet. To a length from centimeters it is enough to know that an inch equals three centimeters in Baden and one foot contains 12 inches.You are given a length equal to n centimeters. Your task is to convert it to feet and inches so that the number of feet was maximum. The result should be an integer rounded to the closest value containing an integral number of inches.Note that when you round up, 1 cm rounds up to 0 inches and 2 cm round up to 1 inch.","human_testcases":"[{\"input\": \"42\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"0 2\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"0 8\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"0 3\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"0 3\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"0 4\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"0 4\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"2 9\"]}, {\"input\": \"120\\r\\n\", \"output\": [\"3 4\"]}, {\"input\": \"199\\r\\n\", \"output\": [\"5 6\"]}, {\"input\": \"501\\r\\n\", \"output\": [\"13 11\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"27 9\"]}, {\"input\": \"1233\\r\\n\", \"output\": [\"34 3\"]}, {\"input\": \"9876\\r\\n\", \"output\": [\"274 4\"]}, {\"input\": \"9999\\r\\n\", \"output\": [\"277 9\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"277 9\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"1 0\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"2 0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n', 'output': ['2 9']}, {'input': '8\\r\\n', 'output': ['0 3']}, {'input': '1233\\r\\n', 'output': ['34 3']}, {'input': '1000\\r\\n', 'output': ['27 9']}, {'input': '10000\\r\\n', 'output': ['277 9']}]","human_sample_testcases_2":"[{'input': '501\\r\\n', 'output': ['13 11']}, {'input': '1000\\r\\n', 'output': ['27 9']}, {'input': '10\\r\\n', 'output': ['0 3']}, {'input': '3\\r\\n', 'output': ['0 1']}, {'input': '24\\r\\n', 'output': ['0 8']}]","human_sample_testcases_3":"[{'input': '199\\r\\n', 'output': ['5 6']}, {'input': '100\\r\\n', 'output': ['2 9']}, {'input': '1\\r\\n', 'output': ['0 0']}, {'input': '4\\r\\n', 'output': ['0 1']}, {'input': '8\\r\\n', 'output': ['0 3']}]","human_sample_testcases_4":"[{'input': '120\\r\\n', 'output': ['3 4']}, {'input': '9999\\r\\n', 'output': ['277 9']}, {'input': '4\\r\\n', 'output': ['0 1']}, {'input': '71\\r\\n', 'output': ['2 0']}, {'input': '9876\\r\\n', 'output': ['274 4']}]","human_sample_testcases_5":"[{'input': '9999\\r\\n', 'output': ['277 9']}, {'input': '120\\r\\n', 'output': ['3 4']}, {'input': '10000\\r\\n', 'output': ['277 9']}, {'input': '10\\r\\n', 'output': ['0 3']}, {'input': '4\\r\\n', 'output': ['0 1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":88.89,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":50.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":50.0,"id":95,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.556,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"0 0 0 0 9\\n0 0 0 0 0\\n0 0 0 0 0\\n0 0 0 0 0\\n7 0 0 0 0\", \"0 43 21 18 2\\n3 0 21 11 65\\n5 2 0 1 4\\n54 62 12 0 99\\n87 64 81 33 0\"]","input_specification":"The input consists of five lines, each line contains five space-separated integers: the j-th number in the i-th line shows gij (0\u2009\u2264\u2009gij\u2009\u2264\u2009105). It is guaranteed that gii\u2009=\u20090 for all i. Assume that the students are numbered from 1 to 5.","src_uid":"be6d4df20e9a48d183dd8f34531df246","source_code":"#include\nint main()\n{\n int x[6][6];\n int i,j,k,l,m;\n for(i=0;i<5;++i)\n {\n for(j=0;j<5;++j)\n scanf(\"%d\",&x[i][j]);\n }\n int max=0;\n for(i=0;i<5;++i)\n {\n for(j=0;j<5;++j)\n {\n if(i==j)\n continue;\n for(k=0;k<5;++k)\n {\n if(k==j || k==i)\n continue;\n for(l=0;l<5;++l)\n {\n if(l==k || l==j || l==i)\n continue;\n for(m=0;m<5;++m)\n {\n int temp=0;\n if(m==l || m==k || m==j || m==i)\n continue;\n temp=x[i][j]+x[j][i]+x[k][l]+x[l][k]+x[j][k]+x[k][j]+x[l][m]+x[m][l]+x[k][l]+x[l][k]+x[l][m]+x[m][l];\n \/\/printf(\"%d\\n\",temp);\n if(max\nint main() {\n\tint M,N,min,max;\n\tscanf(\"%d%d\",&N,&M);\n\tif(M==0 && N==0)\n\t\tprintf(\"0 0\\n\");\n\telse if(N==0)\n\t\tprintf(\"Impossible\\n\");\n\telse {\n\t\tif(M==0) {\n\t\t\tmin=N;\n\t\t\tmax=N;\n\t\t}\n\t\telse {\n\t\t\tif(N>=M) {\n\t\t\t\tmin=N;\n\t\t\t\tmax=N+M-1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmin=M;\n\t\t\t\tmax=N+M-1;\n\t\t\t}\n\t\t}\n\t\tprintf(\"%d %d\\n\",min,max);\n\t}\n\treturn 0;\n}\n","sample_outputs":"[\"2 2\", \"Impossible\", \"2 3\"]","lang_cluster":"C","notes":"NoteIn the first sample a grown-up rides with two children and pays two rubles.In the second sample there are only children in the bus, so the situation is impossible. In the third sample there are two cases: Each of the two grown-ups rides with one children and pays one ruble for the tickets. In this case the passengers pay two rubles in total. One of the grown-ups ride with two children's and pays two rubles, the another one rides alone and pays one ruble for himself. So, they pay three rubles in total. ","output_specification":"If n grown-ups and m children could have ridden in the bus, then print on a single line two space-separated integers \u2014 the minimum and the maximum possible total bus fare, correspondingly. Otherwise, print \"Impossible\" (without the quotes).","description":"One day Vasya heard a story: \"In the city of High Bertown a bus number 62 left from the bus station. It had n grown-ups and m kids...\"The latter events happen to be of no importance to us. Vasya is an accountant and he loves counting money. So he wondered what maximum and minimum sum of money these passengers could have paid for the ride.The bus fare equals one berland ruble in High Bertown. However, not everything is that easy \u2014 no more than one child can ride for free with each grown-up passenger. That means that a grown-up passenger who rides with his k (k\u2009>\u20090) children, pays overall k rubles: a ticket for himself and (k\u2009-\u20091) tickets for his children. Also, a grown-up can ride without children, in this case he only pays one ruble.We know that in High Bertown children can't ride in a bus unaccompanied by grown-ups.Help Vasya count the minimum and the maximum sum in Berland rubles, that all passengers of this bus could have paid in total.","human_testcases":"[{\"input\": \"1 2\\r\\n\", \"output\": [\"2 2\"]}, {\"input\": \"0 5\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2 3\"]}, {\"input\": \"2 7\\r\\n\", \"output\": [\"7 8\"]}, {\"input\": \"4 10\\r\\n\", \"output\": [\"10 13\"]}, {\"input\": \"6 0\\r\\n\", \"output\": [\"6 6\"]}, {\"input\": \"7 1\\r\\n\", \"output\": [\"7 7\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"71 24\\r\\n\", \"output\": [\"71 94\"]}, {\"input\": \"16 70\\r\\n\", \"output\": [\"70 85\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"63 82\\r\\n\", \"output\": [\"82 144\"]}, {\"input\": \"8 26\\r\\n\", \"output\": [\"26 33\"]}, {\"input\": \"21 27\\r\\n\", \"output\": [\"27 47\"]}, {\"input\": \"0 38\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"46 84\\r\\n\", \"output\": [\"84 129\"]}, {\"input\": \"59 96\\r\\n\", \"output\": [\"96 154\"]}, {\"input\": \"63028 0\\r\\n\", \"output\": [\"63028 63028\"]}, {\"input\": \"9458 0\\r\\n\", \"output\": [\"9458 9458\"]}, {\"input\": \"80236 0\\r\\n\", \"output\": [\"80236 80236\"]}, {\"input\": \"26666 0\\r\\n\", \"output\": [\"26666 26666\"]}, {\"input\": \"59617 0\\r\\n\", \"output\": [\"59617 59617\"]}, {\"input\": \"0 6048\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"63028 28217\\r\\n\", \"output\": [\"63028 91244\"]}, {\"input\": \"9458 39163\\r\\n\", \"output\": [\"39163 48620\"]}, {\"input\": \"80236 14868\\r\\n\", \"output\": [\"80236 95103\"]}, {\"input\": \"26666 52747\\r\\n\", \"output\": [\"52747 79412\"]}, {\"input\": \"59617 28452\\r\\n\", \"output\": [\"59617 88068\"]}, {\"input\": \"6048 4158\\r\\n\", \"output\": [\"6048 10205\"]}, {\"input\": \"76826 4210\\r\\n\", \"output\": [\"76826 81035\"]}, {\"input\": \"23256 15156\\r\\n\", \"output\": [\"23256 38411\"]}, {\"input\": \"56207 53035\\r\\n\", \"output\": [\"56207 109241\"]}, {\"input\": \"2637 28740\\r\\n\", \"output\": [\"28740 31376\"]}, {\"input\": \"73415 4445\\r\\n\", \"output\": [\"73415 77859\"]}, {\"input\": \"82019 4498\\r\\n\", \"output\": [\"82019 86516\"]}, {\"input\": \"28449 80204\\r\\n\", \"output\": [\"80204 108652\"]}, {\"input\": \"99227 53323\\r\\n\", \"output\": [\"99227 152549\"]}, {\"input\": \"45657 29028\\r\\n\", \"output\": [\"45657 74684\"]}, {\"input\": \"78608 4733\\r\\n\", \"output\": [\"78608 83340\"]}, {\"input\": \"25038 4786\\r\\n\", \"output\": [\"25038 29823\"]}, {\"input\": \"95816 80492\\r\\n\", \"output\": [\"95816 176307\"]}, {\"input\": \"42246 94024\\r\\n\", \"output\": [\"94024 136269\"]}, {\"input\": \"0 100000\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"100000 0\\r\\n\", \"output\": [\"100000 100000\"]}, {\"input\": \"1 100000\\r\\n\", \"output\": [\"100000 100000\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"100000 100000\"]}, {\"input\": \"63028 63028\\r\\n\", \"output\": [\"63028 126055\"]}, {\"input\": \"9458 9458\\r\\n\", \"output\": [\"9458 18915\"]}, {\"input\": \"80236 80236\\r\\n\", \"output\": [\"80236 160471\"]}, {\"input\": \"26666 26666\\r\\n\", \"output\": [\"26666 53331\"]}, {\"input\": \"59617 59617\\r\\n\", \"output\": [\"59617 119233\"]}, {\"input\": \"100000 100000\\r\\n\", \"output\": [\"100000 199999\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '99227 53323\\r\\n', 'output': ['99227 152549']}, {'input': '1 100000\\r\\n', 'output': ['100000 100000']}, {'input': '63028 63028\\r\\n', 'output': ['63028 126055']}, {'input': '0 100000\\r\\n', 'output': ['Impossible']}, {'input': '71 24\\r\\n', 'output': ['71 94']}]","human_sample_testcases_2":"[{'input': '26666 52747\\r\\n', 'output': ['52747 79412']}, {'input': '1 0\\r\\n', 'output': ['1 1']}, {'input': '73415 4445\\r\\n', 'output': ['73415 77859']}, {'input': '63 82\\r\\n', 'output': ['82 144']}, {'input': '1 100000\\r\\n', 'output': ['100000 100000']}]","human_sample_testcases_3":"[{'input': '21 27\\r\\n', 'output': ['27 47']}, {'input': '45657 29028\\r\\n', 'output': ['45657 74684']}, {'input': '63 82\\r\\n', 'output': ['82 144']}, {'input': '100000 1\\r\\n', 'output': ['100000 100000']}, {'input': '63028 63028\\r\\n', 'output': ['63028 126055']}]","human_sample_testcases_4":"[{'input': '4 10\\r\\n', 'output': ['10 13']}, {'input': '42246 94024\\r\\n', 'output': ['94024 136269']}, {'input': '1 2\\r\\n', 'output': ['2 2']}, {'input': '59617 59617\\r\\n', 'output': ['59617 119233']}, {'input': '25038 4786\\r\\n', 'output': ['25038 29823']}]","human_sample_testcases_5":"[{'input': '23256 15156\\r\\n', 'output': ['23256 38411']}, {'input': '100000 1\\r\\n', 'output': ['100000 100000']}, {'input': '80236 14868\\r\\n', 'output': ['80236 95103']}, {'input': '80236 0\\r\\n', 'output': ['80236 80236']}, {'input': '63028 63028\\r\\n', 'output': ['63028 126055']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":81.25,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":75.0,"human_sample_line_coverage_4":75.0,"human_sample_line_coverage_5":75.0,"human_sample_branch_coverage_1":60.0,"human_sample_branch_coverage_2":80.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":50.0,"human_sample_branch_coverage_5":70.0,"id":97,"human_sample_pass_rate":100.0,"human_sample_line_coverage":78.75,"human_sample_branch_coverage":62.0} {"sample_inputs":"[\"1 1 1\", \"5 2 4\"]","input_specification":"The first and only line contains three integers: n, m and k (1\u2009\u2264\u2009n,\u2009m,\u2009k\u2009\u2264\u20092000).","src_uid":"1f9107e8d1d8aebb1f4a1707a6cdeb6d","source_code":"#include \n\nconst long long int base = 1000000007;\n\nlong long int sq(int x, int y) {\n long long int i, a;\n\n a = 1;\n for (i = 0; i < y; i++) {\n a = (a * x) % base;\n }\n\n return a;\n}\n\nint main() {\n int n, m, k;\n\n scanf(\"%d%d%d\", &n, &m, &k);\n \n if (k == 1 || k > n) printf(\"%I64d\", sq(m, n));\n else if (k == n) printf(\"%I64d\", sq(m, (n+1)\/2));\n else if (k%2 == 1) printf(\"%I64d\", sq(m, 2));\n else printf(\"%d\", m);\n\n return 0;\n}\n","sample_outputs":"[\"1\", \"2\"]","lang_cluster":"C","notes":"NoteIn the first sample only one string is valid: \"a\" (let's denote the only letter of our alphabet as \"a\").In the second sample (if we denote the alphabet letters as \"a\" and \"b\") the following strings are valid: \"aaaaa\" and \"bbbbb\".","output_specification":"Print a single integer \u2014 the number of strings of the described type modulo 1000000007 (109\u2009+\u20097).","description":"Just in case somebody missed it: this winter is totally cold in Nvodsk! It is so cold that one gets funny thoughts. For example, let's say there are strings with the length exactly n, based on the alphabet of size m. Any its substring with length equal to k is a palindrome. How many such strings exist? Your task is to find their quantity modulo 1000000007 (109\u2009+\u20097). Be careful and don't miss a string or two!Let us remind you that a string is a palindrome if it can be read the same way in either direction, from the left to the right and from the right to the left.","human_testcases":"[{\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 4 20\\r\\n\", \"output\": [\"16384\"]}, {\"input\": \"8 13 9\\r\\n\", \"output\": [\"815730721\"]}, {\"input\": \"10 23 9\\r\\n\", \"output\": [\"529\"]}, {\"input\": \"10 25 8\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"997 1752 1000\\r\\n\", \"output\": [\"184834849\"]}, {\"input\": \"784 1 1999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"341 9 342\\r\\n\", \"output\": [\"320920086\"]}, {\"input\": \"777 1 777\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"542 13 542\\r\\n\", \"output\": [\"490685740\"]}, {\"input\": \"1501 893 1501\\r\\n\", \"output\": [\"889854713\"]}, {\"input\": \"1321 95 2\\r\\n\", \"output\": [\"95\"]}, {\"input\": \"2000 1000 3\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"1769 849 1000\\r\\n\", \"output\": [\"849\"]}, {\"input\": \"1000 2 1\\r\\n\", \"output\": [\"688423210\"]}, {\"input\": \"345 1777 1\\r\\n\", \"output\": [\"756253754\"]}, {\"input\": \"1999 2000 2000\\r\\n\", \"output\": [\"675798323\"]}, {\"input\": \"1984 1847 1992\\r\\n\", \"output\": [\"345702953\"]}, {\"input\": \"2000 2000 2000\\r\\n\", \"output\": [\"321179016\"]}, {\"input\": \"1451 239 1451\\r\\n\", \"output\": [\"968856942\"]}, {\"input\": \"2000 2000 1\\r\\n\", \"output\": [\"596636543\"]}, {\"input\": \"1230 987 1\\r\\n\", \"output\": [\"890209975\"]}, {\"input\": \"1764 305 843\\r\\n\", \"output\": [\"93025\"]}, {\"input\": \"1999 98 132\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"2000 2 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2000 1999 1999\\r\\n\", \"output\": [\"3996001\"]}, {\"input\": \"1678 1999 1234\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"7 10 7\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"15 1 15\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2000 2000 1000\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"1 2000 2000\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"10 10 90\\r\\n\", \"output\": [\"999999937\"]}, {\"input\": \"100 100 1\\r\\n\", \"output\": [\"424090053\"]}, {\"input\": \"6 6 6\\r\\n\", \"output\": [\"216\"]}, {\"input\": \"10 10 1\\r\\n\", \"output\": [\"999999937\"]}, {\"input\": \"100 10 100\\r\\n\", \"output\": [\"319300014\"]}, {\"input\": \"5 4 5\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"5 2 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000 1000 1000\\r\\n\", \"output\": [\"850431726\"]}, {\"input\": \"5 5 1\\r\\n\", \"output\": [\"3125\"]}, {\"input\": \"1000 1000 1\\r\\n\", \"output\": [\"524700271\"]}, {\"input\": \"4 256 1\\r\\n\", \"output\": [\"294967268\"]}, {\"input\": \"5 5 5\\r\\n\", \"output\": [\"125\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"100 100 100\\r\\n\", \"output\": [\"226732710\"]}, {\"input\": \"5 2 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"15 5 1\\r\\n\", \"output\": [\"517577915\"]}, {\"input\": \"1000 2 1001\\r\\n\", \"output\": [\"688423210\"]}, {\"input\": \"100 7 3\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"8 2 8\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"200 200 200\\r\\n\", \"output\": [\"104842676\"]}, {\"input\": \"4 4 1\\r\\n\", \"output\": [\"256\"]}, {\"input\": \"1999 1999 1999\\r\\n\", \"output\": [\"21610777\"]}, {\"input\": \"17 5 1\\r\\n\", \"output\": [\"939447791\"]}, {\"input\": \"100 5 1\\r\\n\", \"output\": [\"146981449\"]}, {\"input\": \"10 5 1\\r\\n\", \"output\": [\"9765625\"]}, {\"input\": \"11 2 11\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"100 1000 1\\r\\n\", \"output\": [\"327648028\"]}, {\"input\": \"3 1000 3\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 5 3\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"20 3 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10 2 1\\r\\n\", \"output\": [\"1024\"]}, {\"input\": \"7 2 7\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"13 9 1\\r\\n\", \"output\": [\"865810542\"]}, {\"input\": \"11 2 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"13 13 13\\r\\n\", \"output\": [\"62748517\"]}, {\"input\": \"239 123 239\\r\\n\", \"output\": [\"221051222\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7 4 20\\r\\n', 'output': ['16384']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '8 13 9\\r\\n', 'output': ['815730721']}, {'input': '10 5 1\\r\\n', 'output': ['9765625']}, {'input': '10 10 10\\r\\n', 'output': ['100000']}]","human_sample_testcases_2":"[{'input': '1321 95 2\\r\\n', 'output': ['95']}, {'input': '1451 239 1451\\r\\n', 'output': ['968856942']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '1000 2 1001\\r\\n', 'output': ['688423210']}, {'input': '2000 2 10\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '3 1000 3\\r\\n', 'output': ['1000000']}, {'input': '1000 1000 1\\r\\n', 'output': ['524700271']}, {'input': '1230 987 1\\r\\n', 'output': ['890209975']}, {'input': '1678 1999 1234\\r\\n', 'output': ['1999']}, {'input': '10 10 10\\r\\n', 'output': ['100000']}]","human_sample_testcases_4":"[{'input': '4 4 4\\r\\n', 'output': ['16']}, {'input': '1501 893 1501\\r\\n', 'output': ['889854713']}, {'input': '15 1 15\\r\\n', 'output': ['1']}, {'input': '2000 1000 3\\r\\n', 'output': ['1000000']}, {'input': '4 256 1\\r\\n', 'output': ['294967268']}]","human_sample_testcases_5":"[{'input': '777 1 777\\r\\n', 'output': ['1']}, {'input': '5 2 4\\r\\n', 'output': ['2']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '200 200 200\\r\\n', 'output': ['104842676']}, {'input': '239 123 239\\r\\n', 'output': ['221051222']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":91.67,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":70.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":80.0,"human_sample_branch_coverage_4":80.0,"human_sample_branch_coverage_5":80.0,"id":98,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.0,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"4\"]","input_specification":"The only line contains an integer n (2\u2009\u2264\u2009n\u2009\u2264\u20091012), the number of vertices in the graph.","src_uid":"a98f0d924ea52cafe0048f213f075891","source_code":"#include\n\nint main()\n{\n long long int i=0,n,count=0,temp,mod,M=1;\n scanf(\"%lld\",&n);\n while(1)\n {\n \/\/ printf(\"%lld\\n\", i);\n M=M*2;\n mod=n%M;\n temp=n\/M;\n \/\/ printf(\"%lld %lld %lld\\n\",temp , mod,M);\n if(mod>M\/2)\n count+=(M\/2)*(temp+1);\n else{\n count+=(M\/2)*(temp);\n }\n if(temp<=0)\n break;\n i++;\n }\n printf(\"%lld\\n\", count);\n return 0;\n}\n","sample_outputs":"[\"4\"]","lang_cluster":"C","notes":"NoteIn the first sample: The weight of the minimum spanning tree is 1+2+1=4.","output_specification":"The only line contains an integer x, the weight of the graph's minimum spanning tree.","description":"Ehab is interested in the bitwise-xor operation and the special graphs. Mahmoud gave him a problem that combines both. He has a complete graph consisting of n vertices numbered from 0 to n\u2009-\u20091. For all 0\u2009\u2264\u2009u\u2009<\u2009v\u2009<\u2009n, vertex u and vertex v are connected with an undirected edge that has weight (where is the bitwise-xor operation). Can you find the weight of the minimum spanning tree of that graph?You can read about complete graphs in https:\/\/en.wikipedia.org\/wiki\/Complete_graphYou can read about the minimum spanning tree in https:\/\/en.wikipedia.org\/wiki\/Minimum_spanning_treeThe weight of the minimum spanning tree is the sum of the weights on the edges included in it.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000\\r\\n\", \"output\": [\"20140978692096\"]}, {\"input\": \"999999999999\\r\\n\", \"output\": [\"20140978692095\"]}, {\"input\": \"23131234\\r\\n\", \"output\": [\"293058929\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"877968\"]}, {\"input\": \"1024\\r\\n\", \"output\": [\"5120\"]}, {\"input\": \"536870912\\r\\n\", \"output\": [\"7784628224\"]}, {\"input\": \"536870911\\r\\n\", \"output\": [\"7784628223\"]}, {\"input\": \"536870913\\r\\n\", \"output\": [\"8321499136\"]}, {\"input\": \"123456789\\r\\n\", \"output\": [\"1680249144\"]}, {\"input\": \"200\\r\\n\", \"output\": [\"844\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"5052\"]}, {\"input\": \"12000\\r\\n\", \"output\": [\"84624\"]}, {\"input\": \"65536\\r\\n\", \"output\": [\"524288\"]}, {\"input\": \"1048576\\r\\n\", \"output\": [\"10485760\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"549755813888\\r\\n\", \"output\": [\"10720238370816\"]}, {\"input\": \"549755813887\\r\\n\", \"output\": [\"10720238370815\"]}, {\"input\": \"549755813889\\r\\n\", \"output\": [\"11269994184704\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '65536\\r\\n', 'output': ['524288']}, {'input': '999999999999\\r\\n', 'output': ['20140978692095']}, {'input': '123456789\\r\\n', 'output': ['1680249144']}, {'input': '200\\r\\n', 'output': ['844']}, {'input': '549755813889\\r\\n', 'output': ['11269994184704']}]","human_sample_testcases_2":"[{'input': '23131234\\r\\n', 'output': ['293058929']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '7\\r\\n', 'output': ['11']}, {'input': '8\\r\\n', 'output': ['12']}, {'input': '536870912\\r\\n', 'output': ['7784628224']}]","human_sample_testcases_3":"[{'input': '5\\r\\n', 'output': ['8']}, {'input': '1048576\\r\\n', 'output': ['10485760']}, {'input': '200\\r\\n', 'output': ['844']}, {'input': '12000\\r\\n', 'output': ['84624']}, {'input': '1000\\r\\n', 'output': ['5052']}]","human_sample_testcases_4":"[{'input': '1048576\\r\\n', 'output': ['10485760']}, {'input': '1000000000000\\r\\n', 'output': ['20140978692096']}, {'input': '5\\r\\n', 'output': ['8']}, {'input': '123456789\\r\\n', 'output': ['1680249144']}, {'input': '2\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '999999999999\\r\\n', 'output': ['20140978692095']}, {'input': '123456789\\r\\n', 'output': ['1680249144']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '10\\r\\n', 'output': ['21']}, {'input': '6\\r\\n', 'output': ['9']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":99,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 1\", \"2 2\", \"3 2\", \"11 5\", \"37 63\"]","input_specification":"The first line contains two space-separated integers n and C, 1\u2009\u2264\u2009n\u2009\u2264\u2009500000, 1\u2009\u2264\u2009C\u2009\u2264\u2009200000.","src_uid":"e63c70a9c96a94bce99618f2e695f83a","source_code":"#include \n\nint mod_inv(int a, int p){\n\tint y = p-2;\n\tint res = 1;\n\twhile(y!=0){\n\t\tif(y&1){\n\t\t\tres = ((long long)res * a)%p;\n\t\t}\n\t\ta = ((long long)a*a)%p;\n\t\ty = y>>1;\n\t}\n\treturn res;\n}\n\nint main(void) {\n\t\/\/ your code goes here\n\tint n,c,i;\n\tscanf(\"%d %d\",&n,&c);\n\tint res = c;\n\tint prev = c;\n\tint p = 1000003;\n\tfor(i=2; i<=n ;i++){\n\t\tprev = ((((long long)(c+i-1)*prev)%p)*mod_inv(i,p))%p;\n\t\tres = (res + prev)%p;\n\t}\n\tprintf(\"%d\\n\",res);\n\treturn 0;\n}","sample_outputs":"[\"5\", \"5\", \"9\", \"4367\", \"230574\"]","lang_cluster":"C","notes":"NoteThe number 106\u2009+\u20093 is prime.In the second sample case, the five walls are: B BB., .B, BB, B., and .BIn the third sample case, the nine walls are the five as in the second sample case and in addition the following four: B BB B B BB., .B, BB, and BB","output_specification":"Print the number of different walls that Heidi could build, modulo 106\u2009+\u20093.","description":"Heidi the Cow is aghast: cracks in the northern Wall? Zombies gathering outside, forming groups, preparing their assault? This must not happen! Quickly, she fetches her HC2 (Handbook of Crazy Constructions) and looks for the right chapter:How to build a wall: Take a set of bricks. Select one of the possible wall designs. Computing the number of possible designs is left as an exercise to the reader. Place bricks on top of each other, according to the chosen design. This seems easy enough. But Heidi is a Coding Cow, not a Constructing Cow. Her mind keeps coming back to point 2b. Despite the imminent danger of a zombie onslaught, she wonders just how many possible walls she could build with up to n bricks.A wall is a set of wall segments as defined in the easy version. How many different walls can be constructed such that the wall consists of at least 1 and at most n bricks? Two walls are different if there exist a column c and a row r such that one wall has a brick in this spot, and the other does not.Along with n, you will be given C, the width of the wall (as defined in the easy version). Return the number of different walls modulo 106\u2009+\u20093.","human_testcases":"[{\"input\": \"5 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11 5\\r\\n\", \"output\": [\"4367\"]}, {\"input\": \"37 63\\r\\n\", \"output\": [\"230574\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"350000 140000\\r\\n\", \"output\": [\"453366\"]}, {\"input\": \"350000 160000\\r\\n\", \"output\": [\"155549\"]}, {\"input\": \"350000 180000\\r\\n\", \"output\": [\"708073\"]}, {\"input\": \"350000 200000\\r\\n\", \"output\": [\"504934\"]}, {\"input\": \"400000 140000\\r\\n\", \"output\": [\"956370\"]}, {\"input\": \"400000 160000\\r\\n\", \"output\": [\"480365\"]}, {\"input\": \"400000 180000\\r\\n\", \"output\": [\"376155\"]}, {\"input\": \"400000 200000\\r\\n\", \"output\": [\"388234\"]}, {\"input\": \"450000 140000\\r\\n\", \"output\": [\"175993\"]}, {\"input\": \"450000 160000\\r\\n\", \"output\": [\"926957\"]}, {\"input\": \"450000 180000\\r\\n\", \"output\": [\"135727\"]}, {\"input\": \"450000 200000\\r\\n\", \"output\": [\"997315\"]}, {\"input\": \"500000 140000\\r\\n\", \"output\": [\"775486\"]}, {\"input\": \"500000 160000\\r\\n\", \"output\": [\"298591\"]}, {\"input\": \"500000 180000\\r\\n\", \"output\": [\"901135\"]}, {\"input\": \"500000 200000\\r\\n\", \"output\": [\"781209\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '400000 200000\\r\\n', 'output': ['388234']}, {'input': '350000 180000\\r\\n', 'output': ['708073']}, {'input': '500000 140000\\r\\n', 'output': ['775486']}, {'input': '2 2\\r\\n', 'output': ['5']}, {'input': '350000 160000\\r\\n', 'output': ['155549']}]","human_sample_testcases_2":"[{'input': '450000 180000\\r\\n', 'output': ['135727']}, {'input': '3 2\\r\\n', 'output': ['9']}, {'input': '350000 180000\\r\\n', 'output': ['708073']}, {'input': '500000 160000\\r\\n', 'output': ['298591']}, {'input': '37 63\\r\\n', 'output': ['230574']}]","human_sample_testcases_3":"[{'input': '5 1\\r\\n', 'output': ['5']}, {'input': '2 2\\r\\n', 'output': ['5']}, {'input': '450000 160000\\r\\n', 'output': ['926957']}, {'input': '450000 200000\\r\\n', 'output': ['997315']}, {'input': '500000 180000\\r\\n', 'output': ['901135']}]","human_sample_testcases_4":"[{'input': '500000 160000\\r\\n', 'output': ['298591']}, {'input': '3 2\\r\\n', 'output': ['9']}, {'input': '5 1\\r\\n', 'output': ['5']}, {'input': '2 2\\r\\n', 'output': ['5']}, {'input': '11 5\\r\\n', 'output': ['4367']}]","human_sample_testcases_5":"[{'input': '450000 160000\\r\\n', 'output': ['926957']}, {'input': '350000 180000\\r\\n', 'output': ['708073']}, {'input': '450000 180000\\r\\n', 'output': ['135727']}, {'input': '350000 140000\\r\\n', 'output': ['453366']}, {'input': '11 5\\r\\n', 'output': ['4367']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":100,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4 3\", \"10 1\"]","input_specification":"The first line will contain two integers n, k (1\u2009\u2264\u2009n\u2009\u2264\u200950, 1\u2009\u2264\u2009k\u2009\u2264\u2009min{1018,\u2009l} where l is the length of the Kyoya's list).","src_uid":"e03c6d3bb8cf9119530668765691a346","source_code":"\/\/God & me \/\/ ya mahdi adrekni\n#include \n#include \nusing namespace std;\nlong long int fib[112]={1,1},k;\nint p[112],n;\nint main(){\n for(int i=2;i<=85;i++)\n fib[i]=fib[i-1]+fib[i-2];\n cin>>n>>k;\n for(int i=0;i0){\/\/timed in test 5 :( maby for this.\n int pos=0;\n while(fib[++pos]10)return 0;\n }\n for(int i=0;i\nusing namespace std;\nlong long a,b;\nint main(void)\n{ \n scanf(\"%d%d\",&a,&b); \n while(b--)if(a%10)a--;else a\/=10; \n printf(\"%lld\",a);\n return 0;\n}","sample_outputs":"[\"50\", \"1\"]","lang_cluster":"C++","notes":"NoteThe first example corresponds to the following sequence: $$$512 \\rightarrow 511 \\rightarrow 510 \\rightarrow 51 \\rightarrow 50$$$.","output_specification":"Print one integer number \u2014 the result of the decreasing $$$n$$$ by one $$$k$$$ times. It is guaranteed that the result will be positive integer number. ","description":"Little girl Tanya is learning how to decrease a number by one, but she does it wrong with a number consisting of two or more digits. Tanya subtracts one from a number by the following algorithm: if the last digit of the number is non-zero, she decreases the number by one; if the last digit of the number is zero, she divides the number by 10 (i.e. removes the last digit). You are given an integer number $$$n$$$. Tanya will subtract one from it $$$k$$$ times. Your task is to print the result after all $$$k$$$ subtractions.It is guaranteed that the result will be positive integer number.","human_testcases":"[{\"input\": \"512 4\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"1000000000 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"131203 11\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"999999999 50\\r\\n\", \"output\": [\"9999\"]}, {\"input\": \"999999999 49\\r\\n\", \"output\": [\"99990\"]}, {\"input\": \"131203 9\\r\\n\", \"output\": [\"130\"]}, {\"input\": \"900000000 16\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"909090909 50\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1001 2\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '131203 11\\r\\n', 'output': ['12']}, {'input': '1000000000 9\\r\\n', 'output': ['1']}, {'input': '512 4\\r\\n', 'output': ['50']}, {'input': '2 1\\r\\n', 'output': ['1']}, {'input': '5 2\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '999999999 50\\r\\n', 'output': ['9999']}, {'input': '131203 11\\r\\n', 'output': ['12']}, {'input': '900000000 16\\r\\n', 'output': ['1']}, {'input': '512 4\\r\\n', 'output': ['50']}, {'input': '909090909 50\\r\\n', 'output': ['3']}]","human_sample_testcases_3":"[{'input': '1000000000 9\\r\\n', 'output': ['1']}, {'input': '900000000 16\\r\\n', 'output': ['1']}, {'input': '1001 2\\r\\n', 'output': ['100']}, {'input': '5 2\\r\\n', 'output': ['3']}, {'input': '909090909 50\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '2 1\\r\\n', 'output': ['1']}, {'input': '5 2\\r\\n', 'output': ['3']}, {'input': '131203 9\\r\\n', 'output': ['130']}, {'input': '1001 2\\r\\n', 'output': ['100']}, {'input': '512 4\\r\\n', 'output': ['50']}]","human_sample_testcases_5":"[{'input': '999999999 50\\r\\n', 'output': ['9999']}, {'input': '5 2\\r\\n', 'output': ['3']}, {'input': '131203 11\\r\\n', 'output': ['12']}, {'input': '1001 2\\r\\n', 'output': ['100']}, {'input': '909090909 50\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":102,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4 4 0\\n2 1 2\", \"5 6 1\\n2 7 2\", \"3 3 3\\n2 2 2\"]","input_specification":"The first line of the input contains three integers a, b and c (0\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u20091\u2009000\u2009000)\u00a0\u2014 the number of blue, violet and orange spheres that are in the magician's disposal. The second line of the input contains three integers, x, y and z (0\u2009\u2264\u2009x,\u2009y,\u2009z\u2009\u2264\u20091\u2009000\u2009000)\u00a0\u2014 the number of blue, violet and orange spheres that he needs to get.","src_uid":"1db4ba9dc1000e26532bb73336cf12c3","source_code":" \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n \/\/\/\/\/\/\/\/\/\/\/\/\/ YURKA PRO AZAZAZ \/\/\/\/\/\/\/\/\/\/\n \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n#include \n#define pb push_back\nusing namespace std;\nconst long long INF = 1e9;\n\nlong long n,m,k,ans,sum,mn,pl;\nlong long x,y,z;\nlong long a,b,c,tmp,nd;\nbool na,nb,nc;\nmain()\n{\n cin >> x >> y >> z;\n cin >> a >> b >> c;\n if(x > a) tmp+=((x-a)\/2);\n else nd+= a-x;\n\n if(y > b) tmp+=((y-b)\/2);\n else nd+= b-y;\n\n if(z > c) tmp+=((z-c)\/2);\n else nd+= c-z;\n\n if(tmp >= nd) cout << \"YES\";\n else cout << \"NO\";\n\n\n}\n\n","sample_outputs":"[\"Yes\", \"No\", \"Yes\"]","lang_cluster":"C++","notes":"NoteIn the first sample the wizard has 4 blue and 4 violet spheres. In his first action he can turn two blue spheres into one violet one. After that he will have 2 blue and 5 violet spheres. Then he turns 4 violet spheres into 2 orange spheres and he ends up with 2 blue, 1 violet and 2 orange spheres, which is exactly what he needs.","output_specification":"If the wizard is able to obtain the required numbers of spheres, print \"Yes\". Otherwise, print \"No\".","description":"Carl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen before, he needs at least x blue, y violet and z orange spheres. Can he get them (possible, in multiple actions)?","human_testcases":"[{\"input\": \"4 4 0\\r\\n2 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 6 1\\r\\n2 7 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 3 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 0 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 0 0\\r\\n0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 1 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 0 0\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"2 2 1\\r\\n1 1 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 3 1\\r\\n2 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 1000000 1000000\\r\\n1000000 1000000 1000000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 500000 500000\\r\\n0 750000 750000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"500000 1000000 500000\\r\\n750001 0 750000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"499999 500000 1000000\\r\\n750000 750000 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 500000 0\\r\\n0 0 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 500001 499999\\r\\n500000 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1000000 500000 1000000\\r\\n500000 1000000 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 1000000 499999\\r\\n500000 500000 1000000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 1000000 1000000\\r\\n1000000 500001 500000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1000000 500000 500000\\r\\n0 1000000 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"500000 500000 1000000\\r\\n500001 1000000 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 999999 500000\\r\\n1000000 0 500000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4 0 3\\r\\n2 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 2 4\\r\\n2 0 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3 1 0\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 1\\r\\n1 3 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 2 4\\r\\n2 1 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 1 0\\r\\n0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4 0 0\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 3 0\\r\\n1 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 0 3\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 12 1\\r\\n4 0 4\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 0 4\\r\\n1 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 0\\r\\n1 1 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 9 0\\r\\n2 2 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 10 0\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"9 0 9\\r\\n0 8 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 9 9\\r\\n9 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 10 0\\r\\n0 0 9\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 0 9\\r\\n0 10 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 10 10\\r\\n10 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 10 0\\r\\n0 0 11\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"307075 152060 414033\\r\\n381653 222949 123101\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"569950 228830 153718\\r\\n162186 357079 229352\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"149416 303568 749016\\r\\n238307 493997 190377\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"438332 298094 225324\\r\\n194220 400244 245231\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"293792 300060 511272\\r\\n400687 382150 133304\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"295449 518151 368838\\r\\n382897 137148 471892\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"191789 291147 691092\\r\\n324321 416045 176232\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"286845 704749 266526\\r\\n392296 104421 461239\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"135522 188282 377041\\r\\n245719 212473 108265\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"404239 359124 133292\\r\\n180069 184791 332544\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"191906 624432 244408\\r\\n340002 367217 205432\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"275980 429361 101824\\r\\n274288 302579 166062\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"136092 364927 395302\\r\\n149173 343146 390922\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"613852 334661 146012\\r\\n363786 326286 275233\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"348369 104625 525203\\r\\n285621 215396 366411\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"225307 153572 114545\\r\\n154753 153282 149967\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"438576 124465 629784\\r\\n375118 276028 390116\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"447521 327510 158732\\r\\n395759 178458 259139\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8 5 5\\r\\n5 5 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3 2 3\\r\\n2 3 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 4 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"14 9 8\\r\\n12 5 10\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 10 10\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6 3 3\\r\\n3 3 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 0 4\\r\\n2 4 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 6 0\\r\\n2 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 6 3\\r\\n4 2 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 5 5\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"41 17 34\\r\\n0 19 24\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8 8 8\\r\\n3 3 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"7 7 1\\r\\n1 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6 6 0\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 5 5\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"400 400 400\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 4\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 0 4\\r\\n1 2 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 0 0\\r\\n0 0 0\\r\\n', 'output': ['YES', 'Yes']}, {'input': '100 100 100\\r\\n1 1 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '10 10 10\\r\\n1 1 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '225307 153572 114545\\r\\n154753 153282 149967\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_2":"[{'input': '0 10 0\\r\\n2 2 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 2 4\\r\\n2 0 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '191789 291147 691092\\r\\n324321 416045 176232\\r\\n', 'output': ['YES', 'Yes']}, {'input': '3 3 3\\r\\n2 2 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 0 0\\r\\n0 0 1\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_3":"[{'input': '14 9 8\\r\\n12 5 10\\r\\n', 'output': ['YES', 'Yes']}, {'input': '100 100 100\\r\\n1 1 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '1 2 4\\r\\n2 1 3\\r\\n', 'output': ['No', 'NO']}, {'input': '41 17 34\\r\\n0 19 24\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 9 0\\r\\n2 2 2\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_4":"[{'input': '569950 228830 153718\\r\\n162186 357079 229352\\r\\n', 'output': ['No', 'NO']}, {'input': '7 7 1\\r\\n1 1 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '4 4 0\\r\\n1 1 3\\r\\n', 'output': ['No', 'NO']}, {'input': '4 4 0\\r\\n2 1 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '5 5 5\\r\\n1 1 1\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_5":"[{'input': '9 0 9\\r\\n0 8 0\\r\\n', 'output': ['YES', 'Yes']}, {'input': '149416 303568 749016\\r\\n238307 493997 190377\\r\\n', 'output': ['No', 'NO']}, {'input': '136092 364927 395302\\r\\n149173 343146 390922\\r\\n', 'output': ['No', 'NO']}, {'input': '307075 152060 414033\\r\\n381653 222949 123101\\r\\n', 'output': ['No', 'NO']}, {'input': '100 100 100\\r\\n1 1 1\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":91.67,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":91.67,"human_sample_line_coverage_5":91.67,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":87.5,"id":103,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.002,"human_sample_branch_coverage":92.5} {"sample_inputs":"[\"1\", \"2\", \"3\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u200940).","src_uid":"c2cbc35012c6ff7ab0d6899e6015e4e7","source_code":"\/\/Tornike Mandzulashvili\n\/\/#pragma comment(linker, \"\/STACK:16777216\")\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#define PI 3.14159265\n#define hash1 1000003\n#define hash2 1000033\n#define md 1000000007\n#define INF 1000000000\n\nusing namespace std;\n\nlong long d[41]={2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583};\nlong long n;\nlong long go(long long num)\n{\n if (num==0) return 1;\n long long h=go(num\/2);\n if (num%2) return (h*h%md)*2LL%md;else\n return h*h%md;\n}\nmain()\n{\n\/\/freopen(\"text.in\",\"r\",stdin);freopen(\"text.out\",\"w\",stdout);\n\n cin>>n;\n cout<<(go(d[n-1]-1)+md-1)%md<\n#include\n#include\n#include\n#include\n#include\n#include\n#include\nusing namespace std;\ntypedef long long ll;\nconst ll p = 1e9 + 7;\nll n,m,ans;\nll qp(ll a,ll b){\n\tll ans = 1,base = a;\n\twhile(b != 0){\n\t\tif(b & 1)ans = ans * base % p;\n\t\tbase = base * base % p;\n\t\tb >>= 1;\n\t}\n\treturn ans;\n}\nint main()\n{\n\tscanf(\"%lld%lld\",&n,&m);\n\tans = qp((qp(2,m)%p - 1 + p)%p,n)%p;\n\tcout<\nusing namespace std;\nint i,x,y,n,f,ff;\nint main(){\n f=0;\n cin>>n;\n cin>>y;\n for(i=2;i<=n;i++){\n cin>>x;\n if(x>y)ff=0;\n if(x==y)ff=1;\n if(x\n#include \n#include \nusing namespace std;\nint n,i,j,a[11],m=1e9+7,ans=0;\nlong long c[211][211],F[211][11];\nint f(int n, int t)\n{\n\tif (t==9)\n\t\treturn 1;\n\tif (F[n][t]!=-1) return F[n][t];\n\tint s=0,i;\n\tlong long ans1=0;\n\tfor(i=t;i<10;i++)\n\t\ts+=a[i];\n\tfor(i=a[t];i+s-a[t]<=n;i++)\n\t\tif (t==0)\n\t\t\tans1+=(c[n-1][i]*f(n-i,t+1))%m;\n\t\telse ans1+=(c[n][i]*f(n-i,t+1))%m;\n\tans1%=m;\n\tF[n][t]=ans1;\n\treturn ans1;\n}\nint main ()\n{\n\tcin>>n; int dn=n;\n\tfor(i=0;i<10;i++)\n\t{\n\t\tcin>>a[i];\n\t\tdn-=a[i];\n\t}\n\tfor(i=0;i<=100;i++)\n\t{\n\t\tc[i][0]=1; c[i][i]=1;\n\t\tfor(j=1;j\n#include \n#include \n#include \n\nusing namespace std;\n\nchar s[32768];\nchar ans[32768];\n\nint main() {\n\tios_base::sync_with_stdio(0);\n\tcin.getline(s, sizeof(s));\n\tint n = (int)strlen(s);\n\tint def = 0;\n\tfor (int i = 0; i < n; i++) def += (int)(s[i] - '0');\n\tint ret = def;\n\tstrcpy(ans, s);\n\t\/\/\n\tfor (int i = n - 1; i >= 0; i--) {\n\t\tint cnt = 0;\n\t\tif (s[i] != '0') {\n\t\t\tcnt = def - 1;\n\t\t\tfor (int j = i + 1; j < n; j++) {\n\t\t\t\tcnt += (int)('9' - s[j]);\n\t\t\t}\n\t\t}\n\t\tif (cnt > ret) {\n\t\t\tret = cnt;\n\t\t\tans[i] = s[i] - 1;\n\t\t\tfor (int j = i + 1; j < n; j++) {\n\t\t\t\tans[j] = '9';\n\t\t\t}\n\t\t}\n\t}\n\tint from = 0;\n\twhile (ans[from] == '0') from++;\n\tcout << (ans + from) << \"\\n\";\n\t\/\/\n\treturn 0;\n}","sample_outputs":"[\"99\", \"48\", \"499\"]","lang_cluster":"C++","notes":null,"output_specification":"Print the positive integer which doesn't exceed x and has the maximum sum of digits. If there are several such integers, print the biggest of them. Printed integer must not contain leading zeros.","description":"Anton has the integer x. He is interested what positive integer, which doesn't exceed x, has the maximum sum of digits.Your task is to help Anton and to find the integer that interests him. If there are several such integers, determine the biggest of them. ","human_testcases":"[{\"input\": \"100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"48\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"521\\r\\n\", \"output\": [\"499\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"39188\\r\\n\", \"output\": [\"38999\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"59999154\\r\\n\", \"output\": [\"59998999\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"9999\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"99999\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"999999\"]}, {\"input\": \"10000000\\r\\n\", \"output\": [\"9999999\"]}, {\"input\": \"100000000\\r\\n\", \"output\": [\"99999999\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"10000000000\\r\\n\", \"output\": [\"9999999999\"]}, {\"input\": \"100000000000\\r\\n\", \"output\": [\"99999999999\"]}, {\"input\": \"1000000000000\\r\\n\", \"output\": [\"999999999999\"]}, {\"input\": \"10000000000000\\r\\n\", \"output\": [\"9999999999999\"]}, {\"input\": \"100000000000000\\r\\n\", \"output\": [\"99999999999999\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"999999999999999\"]}, {\"input\": \"10000000000000000\\r\\n\", \"output\": [\"9999999999999999\"]}, {\"input\": \"100000000000000000\\r\\n\", \"output\": [\"99999999999999999\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"999999999999999999\"]}, {\"input\": \"999999990\\r\\n\", \"output\": [\"999999989\"]}, {\"input\": \"666666899789879\\r\\n\", \"output\": [\"599999999999999\"]}, {\"input\": \"65499992294999000\\r\\n\", \"output\": [\"59999999999999999\"]}, {\"input\": \"9879100000000099\\r\\n\", \"output\": [\"8999999999999999\"]}, {\"input\": \"9991919190909919\\r\\n\", \"output\": [\"9989999999999999\"]}, {\"input\": \"978916546899999999\\r\\n\", \"output\": [\"899999999999999999\"]}, {\"input\": \"5684945999999999\\r\\n\", \"output\": [\"4999999999999999\"]}, {\"input\": \"999999999999999999\\r\\n\", \"output\": [\"999999999999999999\"]}, {\"input\": \"999999999999990999\\r\\n\", \"output\": [\"999999999999989999\"]}, {\"input\": \"999999999999999990\\r\\n\", \"output\": [\"999999999999999989\"]}, {\"input\": \"909999999999999999\\r\\n\", \"output\": [\"899999999999999999\"]}, {\"input\": \"199999999999999999\\r\\n\", \"output\": [\"199999999999999999\"]}, {\"input\": \"299999999999999999\\r\\n\", \"output\": [\"299999999999999999\"]}, {\"input\": \"999999990009999999\\r\\n\", \"output\": [\"999999989999999999\"]}, {\"input\": \"999000000001999999\\r\\n\", \"output\": [\"998999999999999999\"]}, {\"input\": \"999999999991\\r\\n\", \"output\": [\"999999999989\"]}, {\"input\": \"999999999992\\r\\n\", \"output\": [\"999999999989\"]}, {\"input\": \"79320\\r\\n\", \"output\": [\"78999\"]}, {\"input\": \"99004\\r\\n\", \"output\": [\"98999\"]}, {\"input\": \"99088\\r\\n\", \"output\": [\"98999\"]}, {\"input\": \"99737\\r\\n\", \"output\": [\"98999\"]}, {\"input\": \"29652\\r\\n\", \"output\": [\"28999\"]}, {\"input\": \"59195\\r\\n\", \"output\": [\"58999\"]}, {\"input\": \"19930\\r\\n\", \"output\": [\"19899\"]}, {\"input\": \"49533\\r\\n\", \"output\": [\"48999\"]}, {\"input\": \"69291\\r\\n\", \"output\": [\"68999\"]}, {\"input\": \"59452\\r\\n\", \"output\": [\"58999\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"110\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"111\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"119\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"118\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1100\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1199\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1109\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1190\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"120\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"121\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"129\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"128\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1200\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1299\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1209\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1290\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"130\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"131\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"139\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"138\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1300\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1399\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1309\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1390\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"140\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"141\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"149\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"148\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1400\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1499\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1409\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1490\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"150\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"151\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"159\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"158\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1500\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1599\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1509\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1590\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"160\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"161\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"169\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"168\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1600\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1699\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1609\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1690\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"170\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"171\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"179\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"178\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1700\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1799\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1709\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1790\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"180\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"181\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"189\\r\\n\", \"output\": [\"189\"]}, {\"input\": \"188\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1800\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1899\\r\\n\", \"output\": [\"1899\"]}, {\"input\": \"1809\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"1890\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"190\\r\\n\", \"output\": [\"189\"]}, {\"input\": \"191\\r\\n\", \"output\": [\"189\"]}, {\"input\": \"199\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"198\\r\\n\", \"output\": [\"198\"]}, {\"input\": \"1900\\r\\n\", \"output\": [\"1899\"]}, {\"input\": \"1999\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"1909\\r\\n\", \"output\": [\"1899\"]}, {\"input\": \"1990\\r\\n\", \"output\": [\"1989\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"200\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"201\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"209\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"208\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2000\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2099\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2009\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2090\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"210\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"211\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"219\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"218\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2100\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2199\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2109\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2190\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"220\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"221\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"229\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"228\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2200\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2299\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2209\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2290\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"230\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"231\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"239\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"238\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2300\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2399\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2309\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2390\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"240\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"241\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"249\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"248\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2400\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2499\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2409\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2490\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"250\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"251\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"259\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"258\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2500\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2599\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2509\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2590\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"260\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"261\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"269\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"268\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2600\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2699\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2609\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2690\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"270\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"271\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"279\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"278\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2700\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2799\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2709\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2790\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"280\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"281\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"289\\r\\n\", \"output\": [\"289\"]}, {\"input\": \"288\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"2800\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2899\\r\\n\", \"output\": [\"2899\"]}, {\"input\": \"2809\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"2890\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"290\\r\\n\", \"output\": [\"289\"]}, {\"input\": \"291\\r\\n\", \"output\": [\"289\"]}, {\"input\": \"299\\r\\n\", \"output\": [\"299\"]}, {\"input\": \"298\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"2900\\r\\n\", \"output\": [\"2899\"]}, {\"input\": \"2999\\r\\n\", \"output\": [\"2999\"]}, {\"input\": \"2909\\r\\n\", \"output\": [\"2899\"]}, {\"input\": \"2990\\r\\n\", \"output\": [\"2989\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"890\\r\\n\", \"output\": [\"889\"]}, {\"input\": \"995\\r\\n\", \"output\": [\"989\"]}, {\"input\": \"989\\r\\n\", \"output\": [\"989\"]}, {\"input\": \"991\\r\\n\", \"output\": [\"989\"]}, {\"input\": \"9929\\r\\n\", \"output\": [\"9899\"]}, {\"input\": \"4999\\r\\n\", \"output\": [\"4999\"]}, {\"input\": \"9690\\r\\n\", \"output\": [\"8999\"]}, {\"input\": \"8990\\r\\n\", \"output\": [\"8989\"]}, {\"input\": \"9982\\r\\n\", \"output\": [\"9899\"]}, {\"input\": \"9999\\r\\n\", \"output\": [\"9999\"]}, {\"input\": \"1993\\r\\n\", \"output\": [\"1989\"]}, {\"input\": \"9367\\r\\n\", \"output\": [\"8999\"]}, {\"input\": \"8939\\r\\n\", \"output\": [\"8899\"]}, {\"input\": \"9899\\r\\n\", \"output\": [\"9899\"]}, {\"input\": \"99999\\r\\n\", \"output\": [\"99999\"]}, {\"input\": \"93929\\r\\n\", \"output\": [\"89999\"]}, {\"input\": \"38579\\r\\n\", \"output\": [\"29999\"]}, {\"input\": \"79096\\r\\n\", \"output\": [\"78999\"]}, {\"input\": \"72694\\r\\n\", \"output\": [\"69999\"]}, {\"input\": \"99992\\r\\n\", \"output\": [\"99989\"]}, {\"input\": \"27998\\r\\n\", \"output\": [\"19999\"]}, {\"input\": \"460999\\r\\n\", \"output\": [\"399999\"]}, {\"input\": \"999999\\r\\n\", \"output\": [\"999999\"]}, {\"input\": \"998999\\r\\n\", \"output\": [\"998999\"]}, {\"input\": \"999929\\r\\n\", \"output\": [\"999899\"]}, {\"input\": \"979199\\r\\n\", \"output\": [\"899999\"]}, {\"input\": \"9899999\\r\\n\", \"output\": [\"9899999\"]}, {\"input\": \"9699959\\r\\n\", \"output\": [\"8999999\"]}, {\"input\": \"9999999\\r\\n\", \"output\": [\"9999999\"]}, {\"input\": \"9997099\\r\\n\", \"output\": [\"9989999\"]}, {\"input\": \"8992091\\r\\n\", \"output\": [\"8989999\"]}, {\"input\": \"9599295\\r\\n\", \"output\": [\"8999999\"]}, {\"input\": \"2999902\\r\\n\", \"output\": [\"2999899\"]}, {\"input\": \"9999953\\r\\n\", \"output\": [\"9999899\"]}, {\"input\": \"9590999\\r\\n\", \"output\": [\"8999999\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100000000000000\\r\\n', 'output': ['99999999999999']}, {'input': '271\\r\\n', 'output': ['199']}, {'input': '2599\\r\\n', 'output': ['1999']}, {'input': '10000000000\\r\\n', 'output': ['9999999999']}, {'input': '229\\r\\n', 'output': ['199']}]","human_sample_testcases_2":"[{'input': '218\\r\\n', 'output': ['199']}, {'input': '9999\\r\\n', 'output': ['9999']}, {'input': '9991919190909919\\r\\n', 'output': ['9989999999999999']}, {'input': '1890\\r\\n', 'output': ['999']}, {'input': '909999999999999999\\r\\n', 'output': ['899999999999999999']}]","human_sample_testcases_3":"[{'input': '2490\\r\\n', 'output': ['1999']}, {'input': '29652\\r\\n', 'output': ['28999']}, {'input': '199999999999999999\\r\\n', 'output': ['199999999999999999']}, {'input': '9879100000000099\\r\\n', 'output': ['8999999999999999']}, {'input': '999\\r\\n', 'output': ['999']}]","human_sample_testcases_4":"[{'input': '1500\\r\\n', 'output': ['999']}, {'input': '1809\\r\\n', 'output': ['999']}, {'input': '2099\\r\\n', 'output': ['1999']}, {'input': '2199\\r\\n', 'output': ['1999']}, {'input': '1000000000000000\\r\\n', 'output': ['999999999999999']}]","human_sample_testcases_5":"[{'input': '1390\\r\\n', 'output': ['999']}, {'input': '270\\r\\n', 'output': ['199']}, {'input': '129\\r\\n', 'output': ['99']}, {'input': '200\\r\\n', 'output': ['199']}, {'input': '151\\r\\n', 'output': ['99']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":92.86,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":108,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":98.572} {"sample_inputs":"[\"4 6\", \"10 1\"]","input_specification":"The first and the only line of the input contains two distinct integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009104), separated by a space .","src_uid":"861f8edd2813d6d3a5ff7193a804486f","source_code":"#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\nusing namespace std;\n\nint ans,l,r;\n\nint main()\n{\n\tcin>>l>>r;\n\twhile(l!=r)\n\t{\n\t\tif(l>r)\n\t\t{\n\t\t\tr++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(r&1)\/\/\u5947\u6570\n\t\t\t{\n\t\t\t\tr++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tr\/=2;\n\t\t\t}\n\t\t}\n\t\tans++;\n\t}\n\tcout<\r\n#define forn(i,s,t) for(register int i=(s);i<=(t);++i)\r\n#define form(i,s,t) for(register int i=(s);i>=(t);--i)\r\nusing namespace std;\r\nconst int N = 2040, Mod = 998244353;\r\nstruct Mint {\r\n\tint res;\r\n\tMint() {res = 0;}\r\n\tMint(int a) : res(a) {}\r\n\tfriend Mint operator + (Mint A, Mint B) {\r\n\t\treturn Mint((A.res + B.res >= Mod) ? (A.res + B.res - Mod) : (A.res + B.res));\r\n\t}\r\n\tfriend Mint& operator += (Mint& A, Mint B) {return A = A + B;}\r\n\tfriend Mint operator - (Mint A, Mint B) {B.res = Mod - B.res; return A + B;}\r\n\tfriend Mint operator - (Mint A) {return Mint(Mod - A.res);}\r\n\tfriend Mint operator + (Mint A) {return A;}\r\n\tfriend Mint& operator -= (Mint& A, Mint B) {return A = A - B;}\r\n\tfriend Mint operator * (Mint A, Mint B) {return 1ll * A.res * B.res %Mod;}\r\n\tfriend Mint& operator *= (Mint& A, Mint B) {return A = A * B;}\r\n\tfriend Mint operator ~ (Mint A) {\r\n\t\tstatic Mint res; res = Mint(1);\r\n\t\tstatic int k; k = Mod - 2;\r\n\t\tfor(;k;k>>=1, A*=A) (k&1) && (res = res * A, 0);\r\n\t\treturn res;\r\n\t}\r\n\tfriend Mint operator \/ (Mint A, Mint B) {return A * (~B);}\r\n\tfriend Mint& operator \/= (Mint& A, Mint B) {return A *= (~B);}\r\n\tfriend Mint operator >> (Mint A, Mint B) {return Mint(A.res \/ B.res);}\r\n\tfriend Mint& operator >>= (Mint& A, Mint B) {return A = A>>B;}\r\n};\r\nint n, m; Mint C[N << 1][N << 1];\r\ninline Mint F(int n, int m) {return C[n + m][n];}\r\nint main() {\r\n\tscanf(\"%d%d\", &n, &m);\r\n\tforn(i,0,n + m) {\r\n\t\tC[i][0] = C[i][i] = Mint(1);\r\n\t\tforn(j,1,i - 1) C[i][j] = C[i - 1][j] + C[i - 1][j - 1];\r\n\t}\r\n\tstatic Mint res, sum;\r\n\tforn(h,1,n - 1) {\r\n\t\tsum = Mint(0);\r\n\t\tforn(i,1,m - 1) {\r\n\t\t\tres += sum * F(i, h - 1) * F(m - i - 1, h);\r\n\t\t\tsum += F(n - h, i - 1) * F(n - h - 1, m - i);\r\n\t\t}\r\n\t}\r\n\tforn(h,1,m - 1) {\r\n\t\tsum = Mint(0);\r\n\t\tforn(i,1,n - 1) {\r\n\t\t\tsum += F(m - h, i - 1) * F(m - h - 1, n - i);\r\n\t\t\tres += sum * F(i, h - 1) * F(n - i - 1, h);\r\n\t\t}\r\n\t}\r\n\tres = res * Mint(2);\r\n\tprintf(\"%d\\n\", res.res);\r\n\treturn 0;\r\n}\/\/ OJ:: LG","sample_outputs":"[\"2\", \"294\", \"50657649\"]","lang_cluster":"C++","notes":"NoteIn the first test case, these are the only two stupid $$$2\\times 2$$$ colorings. ","output_specification":"Output a single integer \u2014 the number of stupid colorings modulo $$$998244353$$$.","description":"There is a grid with $$$n$$$ rows and $$$m$$$ columns. Every cell of the grid should be colored either blue or yellow.A coloring of the grid is called stupid if every row has exactly one segment of blue cells and every column has exactly one segment of yellow cells.In other words, every row must have at least one blue cell, and all blue cells in a row must be consecutive. Similarly, every column must have at least one yellow cell, and all yellow cells in a column must be consecutive. An example of a stupid coloring. Examples of clever colorings. The first coloring is missing a blue cell in the second row, and the second coloring has two yellow segments in the second column. How many stupid colorings of the grid are there? Two colorings are considered different if there is some cell that is colored differently.","human_testcases":"[{\"input\": \"2 2\\n\", \"output\": [\"2\", \"2\\n\", \"2\\n\", \"2 \"]}, {\"input\": \"4 3\\n\", \"output\": [\"294 \", \"294\", \"294\\n\", \"294\\n\"]}, {\"input\": \"2020 2021\\n\", \"output\": [\"50657649\", \"50657649\\n\", \"50657649\\n\"]}, {\"input\": \"2021 2021\\n\", \"output\": [\"138387540\", \"138387540\\n\", \"138387540\\n\"]}, {\"input\": \"2021 1\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"1 2021\\n\", \"output\": [\"0\\n\", \"0\\n\", \"0\"]}, {\"input\": \"1 1\\n\", \"output\": [\"0\\n\", \"0\\n\", \"0\"]}, {\"input\": \"1 2\\n\", \"output\": [\"0\\n\", \"0\\n\", \"0\"]}, {\"input\": \"1 3\\n\", \"output\": [\"0\\n\", \"0\\n\", \"0\"]}, {\"input\": \"3 1\\n\", \"output\": [\"0\\n\", \"0\\n\", \"0\"]}, {\"input\": \"17 13\\n\", \"output\": [\"737338284\\n\", \"737338284\", \"737338284\\n\"]}, {\"input\": \"1848 1937\\n\", \"output\": [\"337952422\\n\", \"337952422\\n\", \"337952422\"]}, {\"input\": \"2019 2018\\n\", \"output\": [\"15395158\", \"15395158\\n\", \"15395158\\n\"]}, {\"input\": \"10 19\\n\", \"output\": [\"272254938\", \"272254938\\n\", \"272254938\\n\"]}, {\"input\": \"2021 2\\n\", \"output\": [\"44330628\\n\", \"44330628\", \"44330628\\n\"]}, {\"input\": \"2021 3\\n\", \"output\": [\"435157523\\n\", \"435157523\", \"435157523\\n\"]}, {\"input\": \"4 2021\\n\", \"output\": [\"102125833\\n\", \"102125833\", \"102125833\\n\"]}, {\"input\": \"5 2021\\n\", \"output\": [\"2872985\", \"2872985\\n\", \"2872985\\n\"]}, {\"input\": \"2000 2000\\n\", \"output\": [\"111024599\", \"111024599\\n\", \"111024599\\n\"]}, {\"input\": \"101 100\\n\", \"output\": [\"137902766\\n\", \"137902766\", \"137902766\\n\"]}, {\"input\": \"104 328\\n\", \"output\": [\"726939953\\n\", \"726939953\", \"726939953\\n\"]}, {\"input\": \"101 101\\n\", \"output\": [\"601990061\", \"601990061\\n\", \"601990061\\n\"]}, {\"input\": \"598 319\\n\", \"output\": [\"420237100\\n\", \"420237100\\n\", \"420237100\"]}, {\"input\": \"1 4\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"1 5\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"2 1\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"2 3\\n\", \"output\": [\"10\\n\", \"10\", \"10\\n\"]}, {\"input\": \"2 4\\n\", \"output\": [\"30\\n\", \"30\\n\", \"30\"]}, {\"input\": \"2 5\\n\", \"output\": [\"70\\n\", \"70\\n\", \"70\"]}, {\"input\": \"1000 1000\\n\", \"output\": [\"72199042\", \"72199042\\n\", \"72199042\\n\"]}, {\"input\": \"999 2013\\n\", \"output\": [\"879862853\\n\", \"879862853\\n\", \"879862853\"]}, {\"input\": \"3 2\\n\", \"output\": [\"10\\n\", \"10\", \"10\\n\"]}, {\"input\": \"3 3\\n\", \"output\": [\"72\\n\", \"72\\n\", \"72\"]}, {\"input\": \"3 4\\n\", \"output\": [\"294\", \"294\\n\", \"294\\n\"]}, {\"input\": \"3 5\\n\", \"output\": [\"896\\n\", \"896\\n\", \"896\"]}, {\"input\": \"4 1\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"4 2\\n\", \"output\": [\"30\\n\", \"30\\n\", \"30\"]}, {\"input\": \"1453 938\\n\", \"output\": [\"379270595\\n\", \"379270595\", \"379270595\\n\"]}, {\"input\": \"4 4\\n\", \"output\": [\"1570\\n\", \"1570\\n\", \"1570\"]}, {\"input\": \"4 5\\n\", \"output\": [\"6066\", \"6066\\n\", \"6066\\n\"]}, {\"input\": \"5 1\\n\", \"output\": [\"0\\n\", \"0\", \"0\\n\"]}, {\"input\": \"5 2\\n\", \"output\": [\"70\\n\", \"70\\n\", \"70\"]}, {\"input\": \"5 3\\n\", \"output\": [\"896\\n\", \"896\\n\", \"896\"]}, {\"input\": \"5 4\\n\", \"output\": [\"6066\", \"6066\\n\", \"6066\\n\"]}, {\"input\": \"5 5\\n\", \"output\": [\"29000\\n\", \"29000\", \"29000\\n\"]}, {\"input\": \"6 6\\n\", \"output\": [\"498764\\n\", \"498764\\n\", \"498764\"]}, {\"input\": \"7 7\\n\", \"output\": [\"8281392\\n\", \"8281392\\n\", \"8281392\"]}, {\"input\": \"8 8\\n\", \"output\": [\"134909730\\n\", \"134909730\", \"134909730\\n\"]}, {\"input\": \"9 9\\n\", \"output\": [\"177198854\\n\", \"177198854\", \"177198854\\n\"]}, {\"input\": \"10 10\\n\", \"output\": [\"848269250\\n\", \"848269250\\n\", \"848269250\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 2\\n', 'output': ['30\\n', '30\\n', '30']}, {'input': '4 3\\n', 'output': ['294 ', '294', '294\\n', '294\\n']}, {'input': '104 328\\n', 'output': ['726939953\\n', '726939953', '726939953\\n']}, {'input': '10 19\\n', 'output': ['272254938', '272254938\\n', '272254938\\n']}, {'input': '1 5\\n', 'output': ['0\\n', '0', '0\\n']}]","human_sample_testcases_2":"[{'input': '5 5\\n', 'output': ['29000\\n', '29000', '29000\\n']}, {'input': '7 7\\n', 'output': ['8281392\\n', '8281392\\n', '8281392']}, {'input': '3 2\\n', 'output': ['10\\n', '10', '10\\n']}, {'input': '5 1\\n', 'output': ['0\\n', '0', '0\\n']}, {'input': '9 9\\n', 'output': ['177198854\\n', '177198854', '177198854\\n']}]","human_sample_testcases_3":"[{'input': '4 5\\n', 'output': ['6066', '6066\\n', '6066\\n']}, {'input': '1 5\\n', 'output': ['0\\n', '0', '0\\n']}, {'input': '6 6\\n', 'output': ['498764\\n', '498764\\n', '498764']}, {'input': '2020 2021\\n', 'output': ['50657649', '50657649\\n', '50657649\\n']}, {'input': '2 5\\n', 'output': ['70\\n', '70\\n', '70']}]","human_sample_testcases_4":"[{'input': '9 9\\n', 'output': ['177198854\\n', '177198854', '177198854\\n']}, {'input': '4 2021\\n', 'output': ['102125833\\n', '102125833', '102125833\\n']}, {'input': '4 1\\n', 'output': ['0\\n', '0', '0\\n']}, {'input': '101 101\\n', 'output': ['601990061', '601990061\\n', '601990061\\n']}, {'input': '4 5\\n', 'output': ['6066', '6066\\n', '6066\\n']}]","human_sample_testcases_5":"[{'input': '598 319\\n', 'output': ['420237100\\n', '420237100\\n', '420237100']}, {'input': '2 5\\n', 'output': ['70\\n', '70\\n', '70']}, {'input': '5 3\\n', 'output': ['896\\n', '896\\n', '896']}, {'input': '1 5\\n', 'output': ['0\\n', '0', '0\\n']}, {'input': '3 1\\n', 'output': ['0\\n', '0\\n', '0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":110,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 222\", \"4 190\", \"7 1\"]","input_specification":"The only line of the input contains two integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u200910, 1\u2009\u2264\u2009k\u2009\u2264\u2009240)\u00a0\u2014 the number of the problems in the contest and the number of minutes Limak needs to get to the party from his house.","src_uid":"41e554bc323857be7b8483ee358a35e2","source_code":"#include \n\nusing namespace std;\nlong n, k, m, kq=0;\nint main()\n{\n cin>>n>>k;\n m=240-k;\n for(int i=1;i<=n;i++)\n {\n if(m-(i*5)>=0) kq++;\n else break;\n m-= i*5;\n }\n cout<\nusing namespace std;\nlong long int i,j=0,n,c,sum=0,x,a,b,f=0;\nint base(int k,int l)\n{\n sum=0;\n while(k!=0)\n {\n sum+=k%l;\n k\/=l;\n\n }\n return sum;\n}\nint gcd(int a,int b)\n{\n return(b==0?a:gcd(b,a%b));\n}\nint main()\n{ f=0;\n cin>>n;\n for(i=2;i\n#include \nusing namespace std;\n\nint n,m,a;\n\nint main()\n{\n int kmin, kmax;\n\n scanf(\"%d\",&n);\n scanf(\"%d\",&m);\n\n int cnt = 0,mx=0;\n\n for (int i=0; i mx) mx = a;\n }\n\n kmin = ceil((float)(cnt+m)\/n);\n if(kmin<=mx) kmin = mx;\n kmax = m + mx;\n\n cout << kmin << \" \" << kmax << endl;\n\n return 0;\n}\n","sample_outputs":"[\"3 7\", \"15 15\", \"6 12\", \"7 13\"]","lang_cluster":"C++","notes":"NoteIn the first example, each of four benches is occupied by a single person. The minimum $$$k$$$ is $$$3$$$. For example, it is possible to achieve if two newcomers occupy the first bench, one occupies the second bench, one occupies the third bench, and two remaining \u2014 the fourth bench. The maximum $$$k$$$ is $$$7$$$. That requires all six new people to occupy the same bench.The second example has its minimum $$$k$$$ equal to $$$15$$$ and maximum $$$k$$$ equal to $$$15$$$, as there is just a single bench in the park and all $$$10$$$ people will occupy it.","output_specification":"Print the minimum possible $$$k$$$ and the maximum possible $$$k$$$, where $$$k$$$ is the maximum number of people sitting on one bench after additional $$$m$$$ people came to the park.","description":"There are $$$n$$$ benches in the Berland Central park. It is known that $$$a_i$$$ people are currently sitting on the $$$i$$$-th bench. Another $$$m$$$ people are coming to the park and each of them is going to have a seat on some bench out of $$$n$$$ available.Let $$$k$$$ be the maximum number of people sitting on one bench after additional $$$m$$$ people came to the park. Calculate the minimum possible $$$k$$$ and the maximum possible $$$k$$$.Nobody leaves the taken seat during the whole process.","human_testcases":"[{\"input\": \"4\\r\\n6\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"3 7\"]}, {\"input\": \"1\\r\\n10\\r\\n5\\r\\n\", \"output\": [\"15 15\"]}, {\"input\": \"3\\r\\n6\\r\\n1\\r\\n6\\r\\n5\\r\\n\", \"output\": [\"6 12\"]}, {\"input\": \"3\\r\\n7\\r\\n1\\r\\n6\\r\\n5\\r\\n\", \"output\": [\"7 13\"]}, {\"input\": \"10\\r\\n1000\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n\", \"output\": [\"200 1100\"]}, {\"input\": \"10\\r\\n1\\r\\n3\\r\\n3\\r\\n2\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n\", \"output\": [\"3 4\"]}, {\"input\": \"51\\r\\n10000\\r\\n54\\r\\n23\\r\\n93\\r\\n86\\r\\n57\\r\\n68\\r\\n42\\r\\n33\\r\\n47\\r\\n18\\r\\n78\\r\\n41\\r\\n35\\r\\n92\\r\\n32\\r\\n97\\r\\n74\\r\\n93\\r\\n27\\r\\n59\\r\\n90\\r\\n23\\r\\n79\\r\\n96\\r\\n77\\r\\n29\\r\\n88\\r\\n83\\r\\n83\\r\\n46\\r\\n94\\r\\n61\\r\\n56\\r\\n68\\r\\n43\\r\\n15\\r\\n79\\r\\n26\\r\\n36\\r\\n99\\r\\n36\\r\\n55\\r\\n77\\r\\n23\\r\\n15\\r\\n12\\r\\n84\\r\\n57\\r\\n82\\r\\n33\\r\\n14\\r\\n\", \"output\": [\"254 10099\"]}, {\"input\": \"100\\r\\n8000\\r\\n88\\r\\n40\\r\\n39\\r\\n88\\r\\n33\\r\\n2\\r\\n60\\r\\n93\\r\\n62\\r\\n18\\r\\n44\\r\\n53\\r\\n79\\r\\n55\\r\\n34\\r\\n71\\r\\n45\\r\\n82\\r\\n97\\r\\n96\\r\\n96\\r\\n25\\r\\n83\\r\\n83\\r\\n54\\r\\n45\\r\\n47\\r\\n59\\r\\n94\\r\\n84\\r\\n12\\r\\n33\\r\\n97\\r\\n24\\r\\n71\\r\\n28\\r\\n81\\r\\n89\\r\\n52\\r\\n87\\r\\n96\\r\\n35\\r\\n34\\r\\n31\\r\\n45\\r\\n42\\r\\n14\\r\\n74\\r\\n8\\r\\n68\\r\\n61\\r\\n36\\r\\n65\\r\\n87\\r\\n31\\r\\n18\\r\\n38\\r\\n84\\r\\n28\\r\\n74\\r\\n98\\r\\n77\\r\\n15\\r\\n85\\r\\n82\\r\\n64\\r\\n2\\r\\n93\\r\\n31\\r\\n78\\r\\n64\\r\\n35\\r\\n6\\r\\n77\\r\\n55\\r\\n70\\r\\n83\\r\\n42\\r\\n98\\r\\n38\\r\\n59\\r\\n99\\r\\n27\\r\\n66\\r\\n10\\r\\n54\\r\\n22\\r\\n94\\r\\n21\\r\\n21\\r\\n89\\r\\n86\\r\\n73\\r\\n12\\r\\n86\\r\\n1\\r\\n98\\r\\n94\\r\\n48\\r\\n51\\r\\n\", \"output\": [\"137 8099\"]}, {\"input\": \"10\\r\\n10\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"2 11\"]}, {\"input\": \"10\\r\\n10\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"3 12\"]}, {\"input\": \"100\\r\\n1000\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"11 1001\"]}, {\"input\": \"1\\r\\n10000\\r\\n57\\r\\n\", \"output\": [\"10057 10057\"]}, {\"input\": \"1\\r\\n1000\\r\\n48\\r\\n\", \"output\": [\"1048 1048\"]}, {\"input\": \"2\\r\\n1000\\r\\n1\\r\\n7\\r\\n\", \"output\": [\"504 1007\"]}, {\"input\": \"5\\r\\n10\\r\\n68\\r\\n87\\r\\n14\\r\\n68\\r\\n23\\r\\n\", \"output\": [\"87 97\"]}, {\"input\": \"10\\r\\n20\\r\\n80\\r\\n41\\r\\n15\\r\\n77\\r\\n91\\r\\n82\\r\\n15\\r\\n83\\r\\n36\\r\\n3\\r\\n\", \"output\": [\"91 111\"]}, {\"input\": \"20\\r\\n3303\\r\\n25\\r\\n14\\r\\n77\\r\\n85\\r\\n66\\r\\n97\\r\\n9\\r\\n60\\r\\n79\\r\\n39\\r\\n47\\r\\n2\\r\\n97\\r\\n71\\r\\n45\\r\\n36\\r\\n92\\r\\n54\\r\\n62\\r\\n53\\r\\n\", \"output\": [\"221 3400\"]}, {\"input\": \"40\\r\\n10000\\r\\n54\\r\\n5\\r\\n23\\r\\n10\\r\\n10\\r\\n77\\r\\n15\\r\\n84\\r\\n92\\r\\n63\\r\\n34\\r\\n21\\r\\n12\\r\\n56\\r\\n25\\r\\n32\\r\\n28\\r\\n50\\r\\n50\\r\\n86\\r\\n3\\r\\n26\\r\\n39\\r\\n69\\r\\n43\\r\\n99\\r\\n71\\r\\n38\\r\\n15\\r\\n33\\r\\n50\\r\\n79\\r\\n54\\r\\n84\\r\\n33\\r\\n47\\r\\n14\\r\\n66\\r\\n99\\r\\n25\\r\\n\", \"output\": [\"296 10099\"]}, {\"input\": \"66\\r\\n1000\\r\\n27\\r\\n10\\r\\n63\\r\\n17\\r\\n28\\r\\n89\\r\\n34\\r\\n86\\r\\n27\\r\\n62\\r\\n26\\r\\n18\\r\\n25\\r\\n31\\r\\n45\\r\\n44\\r\\n92\\r\\n56\\r\\n47\\r\\n18\\r\\n53\\r\\n56\\r\\n79\\r\\n3\\r\\n9\\r\\n32\\r\\n88\\r\\n52\\r\\n21\\r\\n57\\r\\n97\\r\\n84\\r\\n50\\r\\n12\\r\\n6\\r\\n52\\r\\n21\\r\\n37\\r\\n24\\r\\n84\\r\\n44\\r\\n81\\r\\n41\\r\\n47\\r\\n7\\r\\n67\\r\\n93\\r\\n43\\r\\n100\\r\\n64\\r\\n82\\r\\n46\\r\\n28\\r\\n48\\r\\n1\\r\\n34\\r\\n28\\r\\n82\\r\\n15\\r\\n47\\r\\n1\\r\\n19\\r\\n34\\r\\n12\\r\\n48\\r\\n48\\r\\n\", \"output\": [\"100 1100\"]}, {\"input\": \"78\\r\\n9909\\r\\n63\\r\\n38\\r\\n36\\r\\n74\\r\\n56\\r\\n3\\r\\n27\\r\\n99\\r\\n71\\r\\n95\\r\\n81\\r\\n39\\r\\n45\\r\\n75\\r\\n32\\r\\n42\\r\\n5\\r\\n23\\r\\n45\\r\\n46\\r\\n63\\r\\n69\\r\\n75\\r\\n80\\r\\n89\\r\\n48\\r\\n86\\r\\n74\\r\\n18\\r\\n87\\r\\n4\\r\\n55\\r\\n54\\r\\n8\\r\\n15\\r\\n91\\r\\n39\\r\\n13\\r\\n89\\r\\n95\\r\\n75\\r\\n38\\r\\n31\\r\\n27\\r\\n48\\r\\n81\\r\\n47\\r\\n91\\r\\n62\\r\\n88\\r\\n53\\r\\n45\\r\\n73\\r\\n79\\r\\n42\\r\\n57\\r\\n72\\r\\n99\\r\\n16\\r\\n52\\r\\n15\\r\\n52\\r\\n95\\r\\n98\\r\\n26\\r\\n84\\r\\n4\\r\\n88\\r\\n31\\r\\n26\\r\\n9\\r\\n86\\r\\n29\\r\\n45\\r\\n62\\r\\n18\\r\\n99\\r\\n78\\r\\n\", \"output\": [\"182 10008\"]}, {\"input\": \"89\\r\\n9080\\r\\n29\\r\\n88\\r\\n62\\r\\n50\\r\\n63\\r\\n91\\r\\n24\\r\\n3\\r\\n93\\r\\n76\\r\\n73\\r\\n50\\r\\n26\\r\\n32\\r\\n87\\r\\n93\\r\\n48\\r\\n52\\r\\n97\\r\\n68\\r\\n100\\r\\n84\\r\\n42\\r\\n93\\r\\n59\\r\\n68\\r\\n46\\r\\n19\\r\\n53\\r\\n30\\r\\n53\\r\\n20\\r\\n65\\r\\n43\\r\\n22\\r\\n98\\r\\n46\\r\\n45\\r\\n38\\r\\n37\\r\\n45\\r\\n31\\r\\n2\\r\\n24\\r\\n56\\r\\n74\\r\\n93\\r\\n48\\r\\n40\\r\\n68\\r\\n7\\r\\n4\\r\\n68\\r\\n44\\r\\n31\\r\\n63\\r\\n32\\r\\n21\\r\\n94\\r\\n92\\r\\n99\\r\\n93\\r\\n17\\r\\n18\\r\\n18\\r\\n48\\r\\n71\\r\\n38\\r\\n67\\r\\n67\\r\\n29\\r\\n87\\r\\n38\\r\\n66\\r\\n73\\r\\n61\\r\\n59\\r\\n98\\r\\n91\\r\\n33\\r\\n22\\r\\n56\\r\\n75\\r\\n91\\r\\n73\\r\\n83\\r\\n61\\r\\n41\\r\\n70\\r\\n\", \"output\": [\"158 9180\"]}, {\"input\": \"90\\r\\n10000\\r\\n43\\r\\n85\\r\\n87\\r\\n11\\r\\n50\\r\\n66\\r\\n30\\r\\n90\\r\\n23\\r\\n22\\r\\n16\\r\\n20\\r\\n2\\r\\n60\\r\\n8\\r\\n26\\r\\n56\\r\\n89\\r\\n50\\r\\n40\\r\\n3\\r\\n23\\r\\n9\\r\\n66\\r\\n36\\r\\n85\\r\\n19\\r\\n49\\r\\n87\\r\\n97\\r\\n20\\r\\n23\\r\\n75\\r\\n32\\r\\n3\\r\\n38\\r\\n71\\r\\n54\\r\\n79\\r\\n46\\r\\n62\\r\\n27\\r\\n16\\r\\n2\\r\\n24\\r\\n55\\r\\n76\\r\\n83\\r\\n55\\r\\n47\\r\\n46\\r\\n41\\r\\n63\\r\\n30\\r\\n22\\r\\n84\\r\\n70\\r\\n81\\r\\n59\\r\\n44\\r\\n56\\r\\n23\\r\\n67\\r\\n9\\r\\n60\\r\\n54\\r\\n95\\r\\n36\\r\\n73\\r\\n60\\r\\n33\\r\\n20\\r\\n18\\r\\n67\\r\\n20\\r\\n18\\r\\n7\\r\\n65\\r\\n55\\r\\n54\\r\\n45\\r\\n32\\r\\n38\\r\\n52\\r\\n15\\r\\n15\\r\\n88\\r\\n44\\r\\n47\\r\\n88\\r\\n\", \"output\": [\"157 10097\"]}, {\"input\": \"99\\r\\n1092\\r\\n28\\r\\n89\\r\\n65\\r\\n40\\r\\n96\\r\\n47\\r\\n76\\r\\n2\\r\\n62\\r\\n59\\r\\n60\\r\\n90\\r\\n91\\r\\n12\\r\\n10\\r\\n71\\r\\n57\\r\\n97\\r\\n18\\r\\n52\\r\\n82\\r\\n32\\r\\n71\\r\\n77\\r\\n39\\r\\n16\\r\\n84\\r\\n89\\r\\n26\\r\\n95\\r\\n45\\r\\n15\\r\\n93\\r\\n73\\r\\n63\\r\\n32\\r\\n33\\r\\n3\\r\\n64\\r\\n12\\r\\n92\\r\\n12\\r\\n92\\r\\n80\\r\\n3\\r\\n80\\r\\n47\\r\\n26\\r\\n69\\r\\n84\\r\\n96\\r\\n40\\r\\n86\\r\\n95\\r\\n55\\r\\n13\\r\\n64\\r\\n73\\r\\n52\\r\\n37\\r\\n13\\r\\n98\\r\\n86\\r\\n95\\r\\n43\\r\\n67\\r\\n18\\r\\n98\\r\\n100\\r\\n66\\r\\n5\\r\\n25\\r\\n87\\r\\n25\\r\\n37\\r\\n10\\r\\n29\\r\\n43\\r\\n84\\r\\n72\\r\\n17\\r\\n70\\r\\n31\\r\\n96\\r\\n27\\r\\n38\\r\\n1\\r\\n40\\r\\n74\\r\\n17\\r\\n58\\r\\n39\\r\\n18\\r\\n5\\r\\n41\\r\\n15\\r\\n95\\r\\n53\\r\\n77\\r\\n\", \"output\": [\"100 1192\"]}, {\"input\": \"100\\r\\n66\\r\\n95\\r\\n19\\r\\n88\\r\\n15\\r\\n29\\r\\n52\\r\\n37\\r\\n75\\r\\n21\\r\\n90\\r\\n93\\r\\n75\\r\\n91\\r\\n71\\r\\n53\\r\\n55\\r\\n90\\r\\n78\\r\\n19\\r\\n63\\r\\n43\\r\\n25\\r\\n52\\r\\n10\\r\\n55\\r\\n76\\r\\n47\\r\\n42\\r\\n57\\r\\n45\\r\\n35\\r\\n53\\r\\n2\\r\\n62\\r\\n61\\r\\n99\\r\\n59\\r\\n59\\r\\n43\\r\\n45\\r\\n31\\r\\n37\\r\\n50\\r\\n68\\r\\n51\\r\\n91\\r\\n34\\r\\n48\\r\\n40\\r\\n69\\r\\n77\\r\\n33\\r\\n16\\r\\n64\\r\\n19\\r\\n82\\r\\n76\\r\\n35\\r\\n41\\r\\n41\\r\\n79\\r\\n29\\r\\n69\\r\\n100\\r\\n30\\r\\n81\\r\\n47\\r\\n55\\r\\n79\\r\\n21\\r\\n59\\r\\n3\\r\\n11\\r\\n43\\r\\n49\\r\\n100\\r\\n27\\r\\n87\\r\\n64\\r\\n8\\r\\n6\\r\\n7\\r\\n88\\r\\n71\\r\\n98\\r\\n6\\r\\n32\\r\\n53\\r\\n91\\r\\n85\\r\\n60\\r\\n35\\r\\n55\\r\\n5\\r\\n44\\r\\n66\\r\\n76\\r\\n99\\r\\n7\\r\\n58\\r\\n\", \"output\": [\"100 166\"]}, {\"input\": \"100\\r\\n50\\r\\n20\\r\\n63\\r\\n60\\r\\n88\\r\\n7\\r\\n22\\r\\n90\\r\\n15\\r\\n27\\r\\n82\\r\\n37\\r\\n44\\r\\n42\\r\\n50\\r\\n33\\r\\n46\\r\\n7\\r\\n97\\r\\n93\\r\\n5\\r\\n68\\r\\n79\\r\\n76\\r\\n3\\r\\n82\\r\\n5\\r\\n51\\r\\n79\\r\\n17\\r\\n1\\r\\n1\\r\\n93\\r\\n52\\r\\n88\\r\\n23\\r\\n23\\r\\n49\\r\\n86\\r\\n64\\r\\n18\\r\\n36\\r\\n53\\r\\n49\\r\\n47\\r\\n11\\r\\n19\\r\\n6\\r\\n79\\r\\n64\\r\\n59\\r\\n56\\r\\n96\\r\\n15\\r\\n72\\r\\n81\\r\\n45\\r\\n24\\r\\n55\\r\\n31\\r\\n2\\r\\n74\\r\\n64\\r\\n57\\r\\n65\\r\\n71\\r\\n44\\r\\n8\\r\\n7\\r\\n38\\r\\n50\\r\\n67\\r\\n1\\r\\n79\\r\\n89\\r\\n16\\r\\n35\\r\\n10\\r\\n72\\r\\n69\\r\\n8\\r\\n56\\r\\n42\\r\\n44\\r\\n95\\r\\n25\\r\\n26\\r\\n16\\r\\n84\\r\\n36\\r\\n73\\r\\n17\\r\\n61\\r\\n91\\r\\n15\\r\\n19\\r\\n78\\r\\n44\\r\\n77\\r\\n96\\r\\n58\\r\\n\", \"output\": [\"97 147\"]}, {\"input\": \"100\\r\\n100\\r\\n82\\r\\n51\\r\\n81\\r\\n14\\r\\n37\\r\\n17\\r\\n78\\r\\n92\\r\\n64\\r\\n15\\r\\n8\\r\\n86\\r\\n89\\r\\n8\\r\\n87\\r\\n77\\r\\n66\\r\\n10\\r\\n15\\r\\n12\\r\\n100\\r\\n25\\r\\n92\\r\\n47\\r\\n21\\r\\n78\\r\\n20\\r\\n63\\r\\n13\\r\\n49\\r\\n41\\r\\n36\\r\\n41\\r\\n79\\r\\n16\\r\\n87\\r\\n87\\r\\n69\\r\\n3\\r\\n76\\r\\n80\\r\\n60\\r\\n100\\r\\n49\\r\\n70\\r\\n59\\r\\n72\\r\\n8\\r\\n38\\r\\n71\\r\\n45\\r\\n97\\r\\n71\\r\\n14\\r\\n76\\r\\n54\\r\\n81\\r\\n4\\r\\n59\\r\\n46\\r\\n39\\r\\n29\\r\\n92\\r\\n3\\r\\n49\\r\\n22\\r\\n53\\r\\n99\\r\\n59\\r\\n52\\r\\n74\\r\\n31\\r\\n92\\r\\n43\\r\\n42\\r\\n23\\r\\n44\\r\\n9\\r\\n82\\r\\n47\\r\\n7\\r\\n40\\r\\n12\\r\\n9\\r\\n3\\r\\n55\\r\\n37\\r\\n85\\r\\n46\\r\\n22\\r\\n84\\r\\n52\\r\\n98\\r\\n41\\r\\n21\\r\\n77\\r\\n63\\r\\n17\\r\\n62\\r\\n91\\r\\n\", \"output\": [\"100 200\"]}, {\"input\": \"100\\r\\n1000\\r\\n91\\r\\n17\\r\\n88\\r\\n51\\r\\n92\\r\\n47\\r\\n85\\r\\n3\\r\\n82\\r\\n61\\r\\n2\\r\\n48\\r\\n55\\r\\n56\\r\\n71\\r\\n1\\r\\n12\\r\\n78\\r\\n80\\r\\n31\\r\\n42\\r\\n33\\r\\n85\\r\\n99\\r\\n25\\r\\n25\\r\\n37\\r\\n18\\r\\n29\\r\\n53\\r\\n84\\r\\n88\\r\\n4\\r\\n55\\r\\n24\\r\\n3\\r\\n53\\r\\n53\\r\\n1\\r\\n95\\r\\n36\\r\\n84\\r\\n65\\r\\n5\\r\\n40\\r\\n52\\r\\n49\\r\\n77\\r\\n48\\r\\n5\\r\\n77\\r\\n50\\r\\n31\\r\\n80\\r\\n100\\r\\n46\\r\\n28\\r\\n29\\r\\n34\\r\\n83\\r\\n26\\r\\n3\\r\\n100\\r\\n63\\r\\n100\\r\\n23\\r\\n76\\r\\n4\\r\\n70\\r\\n57\\r\\n10\\r\\n58\\r\\n7\\r\\n20\\r\\n84\\r\\n44\\r\\n86\\r\\n54\\r\\n2\\r\\n11\\r\\n85\\r\\n3\\r\\n35\\r\\n83\\r\\n96\\r\\n97\\r\\n55\\r\\n75\\r\\n39\\r\\n39\\r\\n39\\r\\n61\\r\\n19\\r\\n86\\r\\n76\\r\\n72\\r\\n29\\r\\n69\\r\\n20\\r\\n17\\r\\n\", \"output\": [\"100 1100\"]}, {\"input\": \"100\\r\\n2000\\r\\n77\\r\\n39\\r\\n49\\r\\n44\\r\\n85\\r\\n10\\r\\n28\\r\\n49\\r\\n92\\r\\n64\\r\\n67\\r\\n39\\r\\n65\\r\\n53\\r\\n81\\r\\n58\\r\\n63\\r\\n80\\r\\n74\\r\\n27\\r\\n10\\r\\n45\\r\\n9\\r\\n26\\r\\n31\\r\\n98\\r\\n55\\r\\n61\\r\\n51\\r\\n43\\r\\n2\\r\\n95\\r\\n77\\r\\n52\\r\\n79\\r\\n42\\r\\n89\\r\\n99\\r\\n68\\r\\n6\\r\\n29\\r\\n71\\r\\n63\\r\\n96\\r\\n11\\r\\n10\\r\\n77\\r\\n32\\r\\n89\\r\\n28\\r\\n12\\r\\n19\\r\\n84\\r\\n34\\r\\n22\\r\\n69\\r\\n86\\r\\n24\\r\\n35\\r\\n40\\r\\n5\\r\\n100\\r\\n55\\r\\n35\\r\\n69\\r\\n60\\r\\n74\\r\\n72\\r\\n37\\r\\n44\\r\\n82\\r\\n83\\r\\n91\\r\\n1\\r\\n68\\r\\n24\\r\\n79\\r\\n39\\r\\n47\\r\\n57\\r\\n16\\r\\n76\\r\\n64\\r\\n34\\r\\n72\\r\\n3\\r\\n48\\r\\n35\\r\\n15\\r\\n70\\r\\n33\\r\\n78\\r\\n31\\r\\n48\\r\\n10\\r\\n30\\r\\n55\\r\\n43\\r\\n6\\r\\n93\\r\\n\", \"output\": [\"100 2100\"]}, {\"input\": \"100\\r\\n5000\\r\\n30\\r\\n90\\r\\n42\\r\\n18\\r\\n55\\r\\n6\\r\\n50\\r\\n65\\r\\n31\\r\\n89\\r\\n47\\r\\n48\\r\\n76\\r\\n58\\r\\n10\\r\\n18\\r\\n2\\r\\n79\\r\\n39\\r\\n9\\r\\n7\\r\\n89\\r\\n100\\r\\n1\\r\\n44\\r\\n23\\r\\n99\\r\\n12\\r\\n23\\r\\n15\\r\\n55\\r\\n16\\r\\n95\\r\\n40\\r\\n23\\r\\n37\\r\\n87\\r\\n42\\r\\n54\\r\\n51\\r\\n11\\r\\n57\\r\\n44\\r\\n61\\r\\n32\\r\\n74\\r\\n44\\r\\n5\\r\\n1\\r\\n96\\r\\n32\\r\\n30\\r\\n21\\r\\n13\\r\\n77\\r\\n48\\r\\n62\\r\\n6\\r\\n28\\r\\n7\\r\\n49\\r\\n87\\r\\n33\\r\\n60\\r\\n72\\r\\n64\\r\\n88\\r\\n86\\r\\n34\\r\\n13\\r\\n23\\r\\n59\\r\\n46\\r\\n39\\r\\n5\\r\\n45\\r\\n81\\r\\n88\\r\\n75\\r\\n97\\r\\n40\\r\\n88\\r\\n46\\r\\n100\\r\\n87\\r\\n30\\r\\n37\\r\\n13\\r\\n68\\r\\n43\\r\\n9\\r\\n32\\r\\n48\\r\\n28\\r\\n100\\r\\n14\\r\\n28\\r\\n67\\r\\n73\\r\\n26\\r\\n\", \"output\": [\"100 5100\"]}, {\"input\": \"100\\r\\n9990\\r\\n22\\r\\n89\\r\\n54\\r\\n55\\r\\n92\\r\\n20\\r\\n84\\r\\n12\\r\\n93\\r\\n6\\r\\n73\\r\\n50\\r\\n23\\r\\n62\\r\\n97\\r\\n88\\r\\n59\\r\\n87\\r\\n4\\r\\n14\\r\\n49\\r\\n28\\r\\n47\\r\\n93\\r\\n5\\r\\n36\\r\\n50\\r\\n78\\r\\n83\\r\\n99\\r\\n100\\r\\n27\\r\\n24\\r\\n23\\r\\n27\\r\\n84\\r\\n67\\r\\n72\\r\\n45\\r\\n51\\r\\n53\\r\\n32\\r\\n60\\r\\n9\\r\\n77\\r\\n63\\r\\n15\\r\\n98\\r\\n17\\r\\n49\\r\\n58\\r\\n77\\r\\n50\\r\\n31\\r\\n10\\r\\n6\\r\\n16\\r\\n74\\r\\n50\\r\\n99\\r\\n100\\r\\n36\\r\\n51\\r\\n71\\r\\n89\\r\\n65\\r\\n17\\r\\n62\\r\\n32\\r\\n3\\r\\n25\\r\\n39\\r\\n19\\r\\n2\\r\\n25\\r\\n75\\r\\n25\\r\\n89\\r\\n87\\r\\n13\\r\\n96\\r\\n91\\r\\n10\\r\\n1\\r\\n94\\r\\n39\\r\\n10\\r\\n64\\r\\n26\\r\\n28\\r\\n32\\r\\n7\\r\\n16\\r\\n34\\r\\n96\\r\\n28\\r\\n24\\r\\n35\\r\\n82\\r\\n99\\r\\n\", \"output\": [\"150 10090\"]}, {\"input\": \"100\\r\\n10000\\r\\n25\\r\\n90\\r\\n88\\r\\n97\\r\\n71\\r\\n24\\r\\n53\\r\\n4\\r\\n32\\r\\n69\\r\\n53\\r\\n93\\r\\n80\\r\\n14\\r\\n30\\r\\n65\\r\\n9\\r\\n56\\r\\n3\\r\\n23\\r\\n70\\r\\n25\\r\\n31\\r\\n6\\r\\n13\\r\\n19\\r\\n49\\r\\n58\\r\\n95\\r\\n40\\r\\n26\\r\\n72\\r\\n75\\r\\n44\\r\\n86\\r\\n13\\r\\n94\\r\\n11\\r\\n83\\r\\n75\\r\\n26\\r\\n64\\r\\n100\\r\\n84\\r\\n82\\r\\n35\\r\\n80\\r\\n41\\r\\n40\\r\\n8\\r\\n5\\r\\n28\\r\\n3\\r\\n98\\r\\n1\\r\\n22\\r\\n73\\r\\n33\\r\\n44\\r\\n22\\r\\n2\\r\\n72\\r\\n68\\r\\n80\\r\\n39\\r\\n92\\r\\n75\\r\\n67\\r\\n61\\r\\n26\\r\\n89\\r\\n59\\r\\n19\\r\\n29\\r\\n7\\r\\n60\\r\\n91\\r\\n34\\r\\n73\\r\\n53\\r\\n22\\r\\n2\\r\\n85\\r\\n22\\r\\n47\\r\\n92\\r\\n90\\r\\n99\\r\\n100\\r\\n44\\r\\n82\\r\\n19\\r\\n1\\r\\n49\\r\\n100\\r\\n13\\r\\n67\\r\\n32\\r\\n75\\r\\n98\\r\\n\", \"output\": [\"151 10100\"]}, {\"input\": \"100\\r\\n10000\\r\\n45\\r\\n35\\r\\n50\\r\\n78\\r\\n28\\r\\n97\\r\\n37\\r\\n92\\r\\n91\\r\\n51\\r\\n93\\r\\n33\\r\\n70\\r\\n43\\r\\n53\\r\\n78\\r\\n31\\r\\n14\\r\\n29\\r\\n67\\r\\n11\\r\\n7\\r\\n41\\r\\n85\\r\\n70\\r\\n27\\r\\n74\\r\\n15\\r\\n15\\r\\n10\\r\\n52\\r\\n50\\r\\n66\\r\\n81\\r\\n95\\r\\n25\\r\\n28\\r\\n86\\r\\n17\\r\\n89\\r\\n19\\r\\n87\\r\\n85\\r\\n38\\r\\n79\\r\\n19\\r\\n92\\r\\n85\\r\\n62\\r\\n71\\r\\n18\\r\\n72\\r\\n92\\r\\n18\\r\\n93\\r\\n56\\r\\n64\\r\\n54\\r\\n3\\r\\n38\\r\\n18\\r\\n77\\r\\n3\\r\\n54\\r\\n70\\r\\n49\\r\\n56\\r\\n91\\r\\n60\\r\\n56\\r\\n34\\r\\n54\\r\\n42\\r\\n41\\r\\n75\\r\\n90\\r\\n43\\r\\n21\\r\\n18\\r\\n69\\r\\n76\\r\\n51\\r\\n24\\r\\n50\\r\\n82\\r\\n56\\r\\n62\\r\\n45\\r\\n50\\r\\n67\\r\\n20\\r\\n31\\r\\n12\\r\\n10\\r\\n10\\r\\n7\\r\\n75\\r\\n84\\r\\n17\\r\\n18\\r\\n\", \"output\": [\"151 10097\"]}, {\"input\": \"2\\r\\n50\\r\\n1\\r\\n51\\r\\n\", \"output\": [\"51 101\"]}, {\"input\": \"3\\r\\n100\\r\\n52\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"52 152\"]}, {\"input\": \"100\\r\\n300\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"5 302\"]}, {\"input\": \"100\\r\\n3000\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n\", \"output\": [\"130 3100\"]}, {\"input\": \"100\\r\\n10000\\r\\n54\\r\\n54\\r\\n50\\r\\n52\\r\\n55\\r\\n51\\r\\n50\\r\\n53\\r\\n50\\r\\n56\\r\\n50\\r\\n51\\r\\n51\\r\\n52\\r\\n54\\r\\n50\\r\\n54\\r\\n52\\r\\n53\\r\\n56\\r\\n55\\r\\n51\\r\\n52\\r\\n55\\r\\n56\\r\\n52\\r\\n52\\r\\n56\\r\\n51\\r\\n56\\r\\n51\\r\\n51\\r\\n55\\r\\n54\\r\\n52\\r\\n55\\r\\n51\\r\\n55\\r\\n56\\r\\n54\\r\\n55\\r\\n54\\r\\n56\\r\\n56\\r\\n51\\r\\n52\\r\\n52\\r\\n56\\r\\n51\\r\\n52\\r\\n52\\r\\n55\\r\\n53\\r\\n51\\r\\n55\\r\\n51\\r\\n54\\r\\n52\\r\\n56\\r\\n51\\r\\n50\\r\\n52\\r\\n52\\r\\n55\\r\\n53\\r\\n52\\r\\n53\\r\\n53\\r\\n51\\r\\n52\\r\\n54\\r\\n50\\r\\n53\\r\\n53\\r\\n56\\r\\n52\\r\\n52\\r\\n54\\r\\n54\\r\\n52\\r\\n55\\r\\n53\\r\\n54\\r\\n53\\r\\n54\\r\\n55\\r\\n56\\r\\n51\\r\\n54\\r\\n55\\r\\n50\\r\\n56\\r\\n52\\r\\n50\\r\\n55\\r\\n55\\r\\n54\\r\\n55\\r\\n50\\r\\n50\\r\\n\", \"output\": [\"154 10056\"]}, {\"input\": \"100\\r\\n2325\\r\\n78\\r\\n78\\r\\n80\\r\\n78\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n80\\r\\n80\\r\\n80\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n79\\r\\n78\\r\\n79\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n78\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n78\\r\\n78\\r\\n79\\r\\n79\\r\\n78\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n78\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n78\\r\\n79\\r\\n\", \"output\": [\"103 2405\"]}, {\"input\": \"100\\r\\n3241\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n\", \"output\": [\"133 3341\"]}, {\"input\": \"100\\r\\n9675\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"98 9676\"]}, {\"input\": \"100\\r\\n9435\\r\\n36\\r\\n37\\r\\n36\\r\\n36\\r\\n37\\r\\n34\\r\\n35\\r\\n37\\r\\n36\\r\\n34\\r\\n37\\r\\n35\\r\\n34\\r\\n35\\r\\n35\\r\\n36\\r\\n36\\r\\n37\\r\\n37\\r\\n36\\r\\n37\\r\\n34\\r\\n36\\r\\n35\\r\\n37\\r\\n36\\r\\n34\\r\\n35\\r\\n35\\r\\n35\\r\\n34\\r\\n36\\r\\n37\\r\\n36\\r\\n35\\r\\n34\\r\\n35\\r\\n34\\r\\n34\\r\\n34\\r\\n36\\r\\n37\\r\\n37\\r\\n34\\r\\n37\\r\\n34\\r\\n37\\r\\n36\\r\\n35\\r\\n36\\r\\n37\\r\\n35\\r\\n37\\r\\n35\\r\\n36\\r\\n34\\r\\n36\\r\\n35\\r\\n35\\r\\n35\\r\\n37\\r\\n37\\r\\n36\\r\\n34\\r\\n35\\r\\n35\\r\\n36\\r\\n35\\r\\n34\\r\\n35\\r\\n35\\r\\n35\\r\\n37\\r\\n36\\r\\n34\\r\\n35\\r\\n37\\r\\n36\\r\\n36\\r\\n36\\r\\n36\\r\\n35\\r\\n34\\r\\n37\\r\\n35\\r\\n34\\r\\n37\\r\\n37\\r\\n36\\r\\n37\\r\\n37\\r\\n34\\r\\n36\\r\\n35\\r\\n36\\r\\n35\\r\\n34\\r\\n37\\r\\n34\\r\\n35\\r\\n\", \"output\": [\"130 9472\"]}, {\"input\": \"100\\r\\n9999\\r\\n4\\r\\n5\\r\\n1\\r\\n8\\r\\n8\\r\\n2\\r\\n9\\r\\n5\\r\\n8\\r\\n6\\r\\n10\\r\\n8\\r\\n2\\r\\n10\\r\\n5\\r\\n10\\r\\n10\\r\\n3\\r\\n3\\r\\n1\\r\\n9\\r\\n7\\r\\n1\\r\\n5\\r\\n3\\r\\n7\\r\\n1\\r\\n3\\r\\n7\\r\\n3\\r\\n7\\r\\n8\\r\\n8\\r\\n8\\r\\n10\\r\\n3\\r\\n9\\r\\n9\\r\\n5\\r\\n9\\r\\n4\\r\\n7\\r\\n3\\r\\n8\\r\\n8\\r\\n6\\r\\n9\\r\\n4\\r\\n4\\r\\n8\\r\\n3\\r\\n6\\r\\n3\\r\\n3\\r\\n7\\r\\n10\\r\\n4\\r\\n2\\r\\n4\\r\\n3\\r\\n9\\r\\n10\\r\\n2\\r\\n4\\r\\n3\\r\\n1\\r\\n3\\r\\n4\\r\\n4\\r\\n4\\r\\n5\\r\\n8\\r\\n6\\r\\n3\\r\\n9\\r\\n10\\r\\n7\\r\\n7\\r\\n10\\r\\n2\\r\\n6\\r\\n10\\r\\n7\\r\\n7\\r\\n10\\r\\n6\\r\\n2\\r\\n9\\r\\n8\\r\\n1\\r\\n6\\r\\n7\\r\\n3\\r\\n5\\r\\n8\\r\\n6\\r\\n1\\r\\n3\\r\\n8\\r\\n5\\r\\n\", \"output\": [\"106 10009\"]}, {\"input\": \"100\\r\\n2344\\r\\n42\\r\\n40\\r\\n69\\r\\n62\\r\\n79\\r\\n43\\r\\n36\\r\\n55\\r\\n44\\r\\n13\\r\\n48\\r\\n69\\r\\n46\\r\\n61\\r\\n70\\r\\n75\\r\\n51\\r\\n67\\r\\n57\\r\\n35\\r\\n5\\r\\n19\\r\\n6\\r\\n92\\r\\n78\\r\\n59\\r\\n42\\r\\n3\\r\\n81\\r\\n41\\r\\n70\\r\\n90\\r\\n99\\r\\n93\\r\\n44\\r\\n22\\r\\n80\\r\\n62\\r\\n69\\r\\n95\\r\\n12\\r\\n63\\r\\n99\\r\\n42\\r\\n12\\r\\n9\\r\\n72\\r\\n8\\r\\n19\\r\\n33\\r\\n81\\r\\n33\\r\\n66\\r\\n32\\r\\n10\\r\\n50\\r\\n98\\r\\n83\\r\\n11\\r\\n25\\r\\n81\\r\\n13\\r\\n56\\r\\n60\\r\\n4\\r\\n89\\r\\n75\\r\\n59\\r\\n92\\r\\n7\\r\\n55\\r\\n84\\r\\n48\\r\\n85\\r\\n82\\r\\n18\\r\\n29\\r\\n68\\r\\n60\\r\\n25\\r\\n26\\r\\n37\\r\\n12\\r\\n15\\r\\n27\\r\\n17\\r\\n85\\r\\n20\\r\\n16\\r\\n47\\r\\n76\\r\\n55\\r\\n75\\r\\n66\\r\\n47\\r\\n98\\r\\n90\\r\\n32\\r\\n47\\r\\n9\\r\\n\", \"output\": [\"99 2443\"]}, {\"input\": \"100\\r\\n1\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n\", \"output\": [\"101 101\"]}, {\"input\": \"100\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"2 2\"]}, {\"input\": \"100\\r\\n2\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n50\\r\\n\", \"output\": [\"51 52\"]}, {\"input\": \"100\\r\\n300\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n1\\r\\n2\\r\\n2\\r\\n93\\r\\n1\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"93 393\"]}, {\"input\": \"100\\r\\n3000\\r\\n2\\r\\n4\\r\\n4\\r\\n5\\r\\n3\\r\\n3\\r\\n5\\r\\n5\\r\\n2\\r\\n4\\r\\n4\\r\\n2\\r\\n3\\r\\n1\\r\\n5\\r\\n5\\r\\n5\\r\\n3\\r\\n3\\r\\n1\\r\\n2\\r\\n2\\r\\n3\\r\\n3\\r\\n5\\r\\n5\\r\\n3\\r\\n5\\r\\n2\\r\\n1\\r\\n4\\r\\n4\\r\\n5\\r\\n3\\r\\n4\\r\\n3\\r\\n1\\r\\n3\\r\\n5\\r\\n1\\r\\n3\\r\\n3\\r\\n3\\r\\n5\\r\\n3\\r\\n4\\r\\n1\\r\\n3\\r\\n1\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n3\\r\\n5\\r\\n5\\r\\n2\\r\\n1\\r\\n4\\r\\n2\\r\\n5\\r\\n1\\r\\n1\\r\\n5\\r\\n1\\r\\n3\\r\\n3\\r\\n1\\r\\n4\\r\\n2\\r\\n4\\r\\n3\\r\\n4\\r\\n4\\r\\n5\\r\\n2\\r\\n5\\r\\n95\\r\\n1\\r\\n2\\r\\n1\\r\\n2\\r\\n5\\r\\n3\\r\\n3\\r\\n2\\r\\n3\\r\\n4\\r\\n2\\r\\n3\\r\\n3\\r\\n2\\r\\n3\\r\\n4\\r\\n4\\r\\n4\\r\\n4\\r\\n3\\r\\n3\\r\\n2\\r\\n\", \"output\": [\"95 3095\"]}, {\"input\": \"100\\r\\n10000\\r\\n51\\r\\n53\\r\\n53\\r\\n54\\r\\n52\\r\\n52\\r\\n51\\r\\n53\\r\\n52\\r\\n55\\r\\n53\\r\\n51\\r\\n56\\r\\n55\\r\\n55\\r\\n50\\r\\n53\\r\\n53\\r\\n50\\r\\n52\\r\\n53\\r\\n50\\r\\n51\\r\\n56\\r\\n54\\r\\n50\\r\\n53\\r\\n51\\r\\n54\\r\\n50\\r\\n50\\r\\n55\\r\\n50\\r\\n53\\r\\n52\\r\\n52\\r\\n54\\r\\n56\\r\\n56\\r\\n52\\r\\n54\\r\\n56\\r\\n52\\r\\n52\\r\\n55\\r\\n54\\r\\n56\\r\\n53\\r\\n54\\r\\n53\\r\\n55\\r\\n50\\r\\n55\\r\\n54\\r\\n54\\r\\n56\\r\\n50\\r\\n50\\r\\n56\\r\\n55\\r\\n55\\r\\n53\\r\\n52\\r\\n54\\r\\n52\\r\\n53\\r\\n50\\r\\n53\\r\\n54\\r\\n52\\r\\n53\\r\\n52\\r\\n52\\r\\n56\\r\\n51\\r\\n53\\r\\n53\\r\\n55\\r\\n50\\r\\n50\\r\\n51\\r\\n55\\r\\n55\\r\\n51\\r\\n50\\r\\n51\\r\\n50\\r\\n54\\r\\n93\\r\\n50\\r\\n50\\r\\n55\\r\\n55\\r\\n50\\r\\n54\\r\\n55\\r\\n55\\r\\n53\\r\\n53\\r\\n56\\r\\n\", \"output\": [\"154 10093\"]}, {\"input\": \"100\\r\\n2325\\r\\n30\\r\\n18\\r\\n24\\r\\n24\\r\\n23\\r\\n23\\r\\n18\\r\\n28\\r\\n26\\r\\n28\\r\\n29\\r\\n23\\r\\n22\\r\\n19\\r\\n26\\r\\n26\\r\\n29\\r\\n20\\r\\n26\\r\\n30\\r\\n30\\r\\n26\\r\\n27\\r\\n25\\r\\n24\\r\\n25\\r\\n27\\r\\n22\\r\\n22\\r\\n19\\r\\n23\\r\\n22\\r\\n25\\r\\n27\\r\\n25\\r\\n21\\r\\n25\\r\\n26\\r\\n22\\r\\n20\\r\\n29\\r\\n21\\r\\n21\\r\\n22\\r\\n26\\r\\n29\\r\\n18\\r\\n22\\r\\n19\\r\\n23\\r\\n29\\r\\n30\\r\\n25\\r\\n22\\r\\n24\\r\\n30\\r\\n22\\r\\n23\\r\\n22\\r\\n26\\r\\n24\\r\\n19\\r\\n27\\r\\n20\\r\\n27\\r\\n29\\r\\n30\\r\\n22\\r\\n30\\r\\n26\\r\\n22\\r\\n19\\r\\n23\\r\\n20\\r\\n21\\r\\n26\\r\\n20\\r\\n30\\r\\n26\\r\\n24\\r\\n30\\r\\n20\\r\\n26\\r\\n24\\r\\n97\\r\\n25\\r\\n23\\r\\n19\\r\\n22\\r\\n19\\r\\n23\\r\\n29\\r\\n28\\r\\n28\\r\\n26\\r\\n29\\r\\n23\\r\\n26\\r\\n28\\r\\n20\\r\\n\", \"output\": [\"97 2422\"]}, {\"input\": \"100\\r\\n3241\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n93\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n10\\r\\n\", \"output\": [\"93 3334\"]}, {\"input\": \"100\\r\\n9675\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n99\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"99 9774\"]}, {\"input\": \"10\\r\\n1\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n4\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n\", \"output\": [\"5 6\"]}, {\"input\": \"100\\r\\n9435\\r\\n15\\r\\n16\\r\\n21\\r\\n24\\r\\n22\\r\\n27\\r\\n24\\r\\n18\\r\\n26\\r\\n25\\r\\n17\\r\\n25\\r\\n14\\r\\n26\\r\\n15\\r\\n20\\r\\n17\\r\\n21\\r\\n17\\r\\n24\\r\\n26\\r\\n26\\r\\n27\\r\\n21\\r\\n24\\r\\n20\\r\\n26\\r\\n25\\r\\n25\\r\\n20\\r\\n22\\r\\n19\\r\\n14\\r\\n16\\r\\n17\\r\\n27\\r\\n16\\r\\n21\\r\\n16\\r\\n27\\r\\n21\\r\\n14\\r\\n24\\r\\n27\\r\\n24\\r\\n19\\r\\n25\\r\\n23\\r\\n21\\r\\n19\\r\\n16\\r\\n14\\r\\n25\\r\\n18\\r\\n96\\r\\n25\\r\\n24\\r\\n15\\r\\n20\\r\\n21\\r\\n22\\r\\n15\\r\\n24\\r\\n23\\r\\n14\\r\\n22\\r\\n26\\r\\n26\\r\\n16\\r\\n17\\r\\n23\\r\\n17\\r\\n25\\r\\n22\\r\\n21\\r\\n27\\r\\n26\\r\\n19\\r\\n25\\r\\n25\\r\\n23\\r\\n16\\r\\n25\\r\\n19\\r\\n15\\r\\n19\\r\\n18\\r\\n27\\r\\n17\\r\\n21\\r\\n25\\r\\n20\\r\\n27\\r\\n14\\r\\n26\\r\\n15\\r\\n27\\r\\n15\\r\\n24\\r\\n18\\r\\n\", \"output\": [\"117 9531\"]}, {\"input\": \"100\\r\\n9999\\r\\n1\\r\\n10\\r\\n5\\r\\n2\\r\\n9\\r\\n2\\r\\n10\\r\\n10\\r\\n9\\r\\n6\\r\\n10\\r\\n8\\r\\n10\\r\\n2\\r\\n10\\r\\n8\\r\\n5\\r\\n4\\r\\n8\\r\\n6\\r\\n3\\r\\n4\\r\\n8\\r\\n6\\r\\n1\\r\\n3\\r\\n8\\r\\n8\\r\\n7\\r\\n7\\r\\n5\\r\\n3\\r\\n2\\r\\n8\\r\\n4\\r\\n3\\r\\n7\\r\\n9\\r\\n9\\r\\n10\\r\\n7\\r\\n1\\r\\n10\\r\\n6\\r\\n2\\r\\n8\\r\\n7\\r\\n4\\r\\n3\\r\\n5\\r\\n9\\r\\n1\\r\\n10\\r\\n3\\r\\n4\\r\\n10\\r\\n1\\r\\n7\\r\\n1\\r\\n91\\r\\n10\\r\\n4\\r\\n7\\r\\n6\\r\\n4\\r\\n3\\r\\n2\\r\\n6\\r\\n3\\r\\n5\\r\\n5\\r\\n2\\r\\n3\\r\\n3\\r\\n1\\r\\n10\\r\\n10\\r\\n7\\r\\n10\\r\\n7\\r\\n8\\r\\n4\\r\\n6\\r\\n6\\r\\n1\\r\\n10\\r\\n2\\r\\n9\\r\\n6\\r\\n5\\r\\n1\\r\\n10\\r\\n8\\r\\n2\\r\\n10\\r\\n7\\r\\n8\\r\\n5\\r\\n3\\r\\n6\\r\\n\", \"output\": [\"107 10090\"]}, {\"input\": \"100\\r\\n2344\\r\\n23\\r\\n10\\r\\n18\\r\\n15\\r\\n32\\r\\n22\\r\\n10\\r\\n38\\r\\n32\\r\\n31\\r\\n39\\r\\n8\\r\\n26\\r\\n16\\r\\n22\\r\\n10\\r\\n23\\r\\n11\\r\\n25\\r\\n36\\r\\n24\\r\\n40\\r\\n7\\r\\n27\\r\\n43\\r\\n28\\r\\n23\\r\\n25\\r\\n7\\r\\n23\\r\\n22\\r\\n7\\r\\n43\\r\\n6\\r\\n22\\r\\n38\\r\\n7\\r\\n32\\r\\n35\\r\\n12\\r\\n41\\r\\n43\\r\\n97\\r\\n3\\r\\n37\\r\\n29\\r\\n27\\r\\n36\\r\\n17\\r\\n2\\r\\n27\\r\\n35\\r\\n16\\r\\n10\\r\\n3\\r\\n19\\r\\n12\\r\\n20\\r\\n29\\r\\n7\\r\\n14\\r\\n5\\r\\n31\\r\\n26\\r\\n10\\r\\n4\\r\\n3\\r\\n15\\r\\n32\\r\\n42\\r\\n24\\r\\n36\\r\\n41\\r\\n43\\r\\n36\\r\\n23\\r\\n14\\r\\n32\\r\\n3\\r\\n32\\r\\n21\\r\\n30\\r\\n32\\r\\n25\\r\\n32\\r\\n8\\r\\n27\\r\\n11\\r\\n19\\r\\n15\\r\\n34\\r\\n12\\r\\n41\\r\\n11\\r\\n39\\r\\n20\\r\\n14\\r\\n23\\r\\n7\\r\\n43\\r\\n\", \"output\": [\"97 2441\"]}, {\"input\": \"2\\r\\n1\\r\\n5\\r\\n1\\r\\n\", \"output\": [\"5 6\"]}, {\"input\": \"4\\r\\n1\\r\\n1\\r\\n9\\r\\n9\\r\\n9\\r\\n\", \"output\": [\"9 10\"]}, {\"input\": \"2\\r\\n3\\r\\n1\\r\\n100\\r\\n\", \"output\": [\"100 103\"]}, {\"input\": \"2\\r\\n16\\r\\n2\\r\\n100\\r\\n\", \"output\": [\"100 116\"]}, {\"input\": \"2\\r\\n1\\r\\n1\\r\\n100\\r\\n\", \"output\": [\"100 101\"]}, {\"input\": \"3\\r\\n7\\r\\n1\\r\\n6\\r\\n1\\r\\n\", \"output\": [\"6 13\"]}, {\"input\": \"2\\r\\n1\\r\\n10\\r\\n1\\r\\n\", \"output\": [\"10 11\"]}, {\"input\": \"3\\r\\n1\\r\\n1\\r\\n1\\r\\n99\\r\\n\", \"output\": [\"99 100\"]}, {\"input\": \"2\\r\\n2\\r\\n1\\r\\n100\\r\\n\", \"output\": [\"100 102\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n8000\\r\\n88\\r\\n40\\r\\n39\\r\\n88\\r\\n33\\r\\n2\\r\\n60\\r\\n93\\r\\n62\\r\\n18\\r\\n44\\r\\n53\\r\\n79\\r\\n55\\r\\n34\\r\\n71\\r\\n45\\r\\n82\\r\\n97\\r\\n96\\r\\n96\\r\\n25\\r\\n83\\r\\n83\\r\\n54\\r\\n45\\r\\n47\\r\\n59\\r\\n94\\r\\n84\\r\\n12\\r\\n33\\r\\n97\\r\\n24\\r\\n71\\r\\n28\\r\\n81\\r\\n89\\r\\n52\\r\\n87\\r\\n96\\r\\n35\\r\\n34\\r\\n31\\r\\n45\\r\\n42\\r\\n14\\r\\n74\\r\\n8\\r\\n68\\r\\n61\\r\\n36\\r\\n65\\r\\n87\\r\\n31\\r\\n18\\r\\n38\\r\\n84\\r\\n28\\r\\n74\\r\\n98\\r\\n77\\r\\n15\\r\\n85\\r\\n82\\r\\n64\\r\\n2\\r\\n93\\r\\n31\\r\\n78\\r\\n64\\r\\n35\\r\\n6\\r\\n77\\r\\n55\\r\\n70\\r\\n83\\r\\n42\\r\\n98\\r\\n38\\r\\n59\\r\\n99\\r\\n27\\r\\n66\\r\\n10\\r\\n54\\r\\n22\\r\\n94\\r\\n21\\r\\n21\\r\\n89\\r\\n86\\r\\n73\\r\\n12\\r\\n86\\r\\n1\\r\\n98\\r\\n94\\r\\n48\\r\\n51\\r\\n', 'output': ['137 8099']}, {'input': '100\\r\\n9990\\r\\n22\\r\\n89\\r\\n54\\r\\n55\\r\\n92\\r\\n20\\r\\n84\\r\\n12\\r\\n93\\r\\n6\\r\\n73\\r\\n50\\r\\n23\\r\\n62\\r\\n97\\r\\n88\\r\\n59\\r\\n87\\r\\n4\\r\\n14\\r\\n49\\r\\n28\\r\\n47\\r\\n93\\r\\n5\\r\\n36\\r\\n50\\r\\n78\\r\\n83\\r\\n99\\r\\n100\\r\\n27\\r\\n24\\r\\n23\\r\\n27\\r\\n84\\r\\n67\\r\\n72\\r\\n45\\r\\n51\\r\\n53\\r\\n32\\r\\n60\\r\\n9\\r\\n77\\r\\n63\\r\\n15\\r\\n98\\r\\n17\\r\\n49\\r\\n58\\r\\n77\\r\\n50\\r\\n31\\r\\n10\\r\\n6\\r\\n16\\r\\n74\\r\\n50\\r\\n99\\r\\n100\\r\\n36\\r\\n51\\r\\n71\\r\\n89\\r\\n65\\r\\n17\\r\\n62\\r\\n32\\r\\n3\\r\\n25\\r\\n39\\r\\n19\\r\\n2\\r\\n25\\r\\n75\\r\\n25\\r\\n89\\r\\n87\\r\\n13\\r\\n96\\r\\n91\\r\\n10\\r\\n1\\r\\n94\\r\\n39\\r\\n10\\r\\n64\\r\\n26\\r\\n28\\r\\n32\\r\\n7\\r\\n16\\r\\n34\\r\\n96\\r\\n28\\r\\n24\\r\\n35\\r\\n82\\r\\n99\\r\\n', 'output': ['150 10090']}, {'input': '2\\r\\n2\\r\\n1\\r\\n100\\r\\n', 'output': ['100 102']}, {'input': '66\\r\\n1000\\r\\n27\\r\\n10\\r\\n63\\r\\n17\\r\\n28\\r\\n89\\r\\n34\\r\\n86\\r\\n27\\r\\n62\\r\\n26\\r\\n18\\r\\n25\\r\\n31\\r\\n45\\r\\n44\\r\\n92\\r\\n56\\r\\n47\\r\\n18\\r\\n53\\r\\n56\\r\\n79\\r\\n3\\r\\n9\\r\\n32\\r\\n88\\r\\n52\\r\\n21\\r\\n57\\r\\n97\\r\\n84\\r\\n50\\r\\n12\\r\\n6\\r\\n52\\r\\n21\\r\\n37\\r\\n24\\r\\n84\\r\\n44\\r\\n81\\r\\n41\\r\\n47\\r\\n7\\r\\n67\\r\\n93\\r\\n43\\r\\n100\\r\\n64\\r\\n82\\r\\n46\\r\\n28\\r\\n48\\r\\n1\\r\\n34\\r\\n28\\r\\n82\\r\\n15\\r\\n47\\r\\n1\\r\\n19\\r\\n34\\r\\n12\\r\\n48\\r\\n48\\r\\n', 'output': ['100 1100']}, {'input': '100\\r\\n1000\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n', 'output': ['11 1001']}]","human_sample_testcases_2":"[{'input': '100\\r\\n10000\\r\\n54\\r\\n54\\r\\n50\\r\\n52\\r\\n55\\r\\n51\\r\\n50\\r\\n53\\r\\n50\\r\\n56\\r\\n50\\r\\n51\\r\\n51\\r\\n52\\r\\n54\\r\\n50\\r\\n54\\r\\n52\\r\\n53\\r\\n56\\r\\n55\\r\\n51\\r\\n52\\r\\n55\\r\\n56\\r\\n52\\r\\n52\\r\\n56\\r\\n51\\r\\n56\\r\\n51\\r\\n51\\r\\n55\\r\\n54\\r\\n52\\r\\n55\\r\\n51\\r\\n55\\r\\n56\\r\\n54\\r\\n55\\r\\n54\\r\\n56\\r\\n56\\r\\n51\\r\\n52\\r\\n52\\r\\n56\\r\\n51\\r\\n52\\r\\n52\\r\\n55\\r\\n53\\r\\n51\\r\\n55\\r\\n51\\r\\n54\\r\\n52\\r\\n56\\r\\n51\\r\\n50\\r\\n52\\r\\n52\\r\\n55\\r\\n53\\r\\n52\\r\\n53\\r\\n53\\r\\n51\\r\\n52\\r\\n54\\r\\n50\\r\\n53\\r\\n53\\r\\n56\\r\\n52\\r\\n52\\r\\n54\\r\\n54\\r\\n52\\r\\n55\\r\\n53\\r\\n54\\r\\n53\\r\\n54\\r\\n55\\r\\n56\\r\\n51\\r\\n54\\r\\n55\\r\\n50\\r\\n56\\r\\n52\\r\\n50\\r\\n55\\r\\n55\\r\\n54\\r\\n55\\r\\n50\\r\\n50\\r\\n', 'output': ['154 10056']}, {'input': '1\\r\\n10\\r\\n5\\r\\n', 'output': ['15 15']}, {'input': '100\\r\\n3000\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n99\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n100\\r\\n100\\r\\n99\\r\\n100\\r\\n99\\r\\n100\\r\\n', 'output': ['130 3100']}, {'input': '100\\r\\n2325\\r\\n78\\r\\n78\\r\\n80\\r\\n78\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n80\\r\\n80\\r\\n80\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n80\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n79\\r\\n79\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n79\\r\\n78\\r\\n79\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n78\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n80\\r\\n78\\r\\n78\\r\\n79\\r\\n78\\r\\n78\\r\\n79\\r\\n79\\r\\n78\\r\\n80\\r\\n78\\r\\n78\\r\\n80\\r\\n80\\r\\n80\\r\\n78\\r\\n80\\r\\n78\\r\\n79\\r\\n80\\r\\n78\\r\\n80\\r\\n79\\r\\n78\\r\\n79\\r\\n', 'output': ['103 2405']}, {'input': '100\\r\\n2325\\r\\n30\\r\\n18\\r\\n24\\r\\n24\\r\\n23\\r\\n23\\r\\n18\\r\\n28\\r\\n26\\r\\n28\\r\\n29\\r\\n23\\r\\n22\\r\\n19\\r\\n26\\r\\n26\\r\\n29\\r\\n20\\r\\n26\\r\\n30\\r\\n30\\r\\n26\\r\\n27\\r\\n25\\r\\n24\\r\\n25\\r\\n27\\r\\n22\\r\\n22\\r\\n19\\r\\n23\\r\\n22\\r\\n25\\r\\n27\\r\\n25\\r\\n21\\r\\n25\\r\\n26\\r\\n22\\r\\n20\\r\\n29\\r\\n21\\r\\n21\\r\\n22\\r\\n26\\r\\n29\\r\\n18\\r\\n22\\r\\n19\\r\\n23\\r\\n29\\r\\n30\\r\\n25\\r\\n22\\r\\n24\\r\\n30\\r\\n22\\r\\n23\\r\\n22\\r\\n26\\r\\n24\\r\\n19\\r\\n27\\r\\n20\\r\\n27\\r\\n29\\r\\n30\\r\\n22\\r\\n30\\r\\n26\\r\\n22\\r\\n19\\r\\n23\\r\\n20\\r\\n21\\r\\n26\\r\\n20\\r\\n30\\r\\n26\\r\\n24\\r\\n30\\r\\n20\\r\\n26\\r\\n24\\r\\n97\\r\\n25\\r\\n23\\r\\n19\\r\\n22\\r\\n19\\r\\n23\\r\\n29\\r\\n28\\r\\n28\\r\\n26\\r\\n29\\r\\n23\\r\\n26\\r\\n28\\r\\n20\\r\\n', 'output': ['97 2422']}]","human_sample_testcases_3":"[{'input': '100\\r\\n9990\\r\\n22\\r\\n89\\r\\n54\\r\\n55\\r\\n92\\r\\n20\\r\\n84\\r\\n12\\r\\n93\\r\\n6\\r\\n73\\r\\n50\\r\\n23\\r\\n62\\r\\n97\\r\\n88\\r\\n59\\r\\n87\\r\\n4\\r\\n14\\r\\n49\\r\\n28\\r\\n47\\r\\n93\\r\\n5\\r\\n36\\r\\n50\\r\\n78\\r\\n83\\r\\n99\\r\\n100\\r\\n27\\r\\n24\\r\\n23\\r\\n27\\r\\n84\\r\\n67\\r\\n72\\r\\n45\\r\\n51\\r\\n53\\r\\n32\\r\\n60\\r\\n9\\r\\n77\\r\\n63\\r\\n15\\r\\n98\\r\\n17\\r\\n49\\r\\n58\\r\\n77\\r\\n50\\r\\n31\\r\\n10\\r\\n6\\r\\n16\\r\\n74\\r\\n50\\r\\n99\\r\\n100\\r\\n36\\r\\n51\\r\\n71\\r\\n89\\r\\n65\\r\\n17\\r\\n62\\r\\n32\\r\\n3\\r\\n25\\r\\n39\\r\\n19\\r\\n2\\r\\n25\\r\\n75\\r\\n25\\r\\n89\\r\\n87\\r\\n13\\r\\n96\\r\\n91\\r\\n10\\r\\n1\\r\\n94\\r\\n39\\r\\n10\\r\\n64\\r\\n26\\r\\n28\\r\\n32\\r\\n7\\r\\n16\\r\\n34\\r\\n96\\r\\n28\\r\\n24\\r\\n35\\r\\n82\\r\\n99\\r\\n', 'output': ['150 10090']}, {'input': '3\\r\\n100\\r\\n52\\r\\n2\\r\\n2\\r\\n', 'output': ['52 152']}, {'input': '100\\r\\n1000\\r\\n91\\r\\n17\\r\\n88\\r\\n51\\r\\n92\\r\\n47\\r\\n85\\r\\n3\\r\\n82\\r\\n61\\r\\n2\\r\\n48\\r\\n55\\r\\n56\\r\\n71\\r\\n1\\r\\n12\\r\\n78\\r\\n80\\r\\n31\\r\\n42\\r\\n33\\r\\n85\\r\\n99\\r\\n25\\r\\n25\\r\\n37\\r\\n18\\r\\n29\\r\\n53\\r\\n84\\r\\n88\\r\\n4\\r\\n55\\r\\n24\\r\\n3\\r\\n53\\r\\n53\\r\\n1\\r\\n95\\r\\n36\\r\\n84\\r\\n65\\r\\n5\\r\\n40\\r\\n52\\r\\n49\\r\\n77\\r\\n48\\r\\n5\\r\\n77\\r\\n50\\r\\n31\\r\\n80\\r\\n100\\r\\n46\\r\\n28\\r\\n29\\r\\n34\\r\\n83\\r\\n26\\r\\n3\\r\\n100\\r\\n63\\r\\n100\\r\\n23\\r\\n76\\r\\n4\\r\\n70\\r\\n57\\r\\n10\\r\\n58\\r\\n7\\r\\n20\\r\\n84\\r\\n44\\r\\n86\\r\\n54\\r\\n2\\r\\n11\\r\\n85\\r\\n3\\r\\n35\\r\\n83\\r\\n96\\r\\n97\\r\\n55\\r\\n75\\r\\n39\\r\\n39\\r\\n39\\r\\n61\\r\\n19\\r\\n86\\r\\n76\\r\\n72\\r\\n29\\r\\n69\\r\\n20\\r\\n17\\r\\n', 'output': ['100 1100']}, {'input': '100\\r\\n2344\\r\\n42\\r\\n40\\r\\n69\\r\\n62\\r\\n79\\r\\n43\\r\\n36\\r\\n55\\r\\n44\\r\\n13\\r\\n48\\r\\n69\\r\\n46\\r\\n61\\r\\n70\\r\\n75\\r\\n51\\r\\n67\\r\\n57\\r\\n35\\r\\n5\\r\\n19\\r\\n6\\r\\n92\\r\\n78\\r\\n59\\r\\n42\\r\\n3\\r\\n81\\r\\n41\\r\\n70\\r\\n90\\r\\n99\\r\\n93\\r\\n44\\r\\n22\\r\\n80\\r\\n62\\r\\n69\\r\\n95\\r\\n12\\r\\n63\\r\\n99\\r\\n42\\r\\n12\\r\\n9\\r\\n72\\r\\n8\\r\\n19\\r\\n33\\r\\n81\\r\\n33\\r\\n66\\r\\n32\\r\\n10\\r\\n50\\r\\n98\\r\\n83\\r\\n11\\r\\n25\\r\\n81\\r\\n13\\r\\n56\\r\\n60\\r\\n4\\r\\n89\\r\\n75\\r\\n59\\r\\n92\\r\\n7\\r\\n55\\r\\n84\\r\\n48\\r\\n85\\r\\n82\\r\\n18\\r\\n29\\r\\n68\\r\\n60\\r\\n25\\r\\n26\\r\\n37\\r\\n12\\r\\n15\\r\\n27\\r\\n17\\r\\n85\\r\\n20\\r\\n16\\r\\n47\\r\\n76\\r\\n55\\r\\n75\\r\\n66\\r\\n47\\r\\n98\\r\\n90\\r\\n32\\r\\n47\\r\\n9\\r\\n', 'output': ['99 2443']}, {'input': '90\\r\\n10000\\r\\n43\\r\\n85\\r\\n87\\r\\n11\\r\\n50\\r\\n66\\r\\n30\\r\\n90\\r\\n23\\r\\n22\\r\\n16\\r\\n20\\r\\n2\\r\\n60\\r\\n8\\r\\n26\\r\\n56\\r\\n89\\r\\n50\\r\\n40\\r\\n3\\r\\n23\\r\\n9\\r\\n66\\r\\n36\\r\\n85\\r\\n19\\r\\n49\\r\\n87\\r\\n97\\r\\n20\\r\\n23\\r\\n75\\r\\n32\\r\\n3\\r\\n38\\r\\n71\\r\\n54\\r\\n79\\r\\n46\\r\\n62\\r\\n27\\r\\n16\\r\\n2\\r\\n24\\r\\n55\\r\\n76\\r\\n83\\r\\n55\\r\\n47\\r\\n46\\r\\n41\\r\\n63\\r\\n30\\r\\n22\\r\\n84\\r\\n70\\r\\n81\\r\\n59\\r\\n44\\r\\n56\\r\\n23\\r\\n67\\r\\n9\\r\\n60\\r\\n54\\r\\n95\\r\\n36\\r\\n73\\r\\n60\\r\\n33\\r\\n20\\r\\n18\\r\\n67\\r\\n20\\r\\n18\\r\\n7\\r\\n65\\r\\n55\\r\\n54\\r\\n45\\r\\n32\\r\\n38\\r\\n52\\r\\n15\\r\\n15\\r\\n88\\r\\n44\\r\\n47\\r\\n88\\r\\n', 'output': ['157 10097']}]","human_sample_testcases_4":"[{'input': '2\\r\\n2\\r\\n1\\r\\n100\\r\\n', 'output': ['100 102']}, {'input': '2\\r\\n3\\r\\n1\\r\\n100\\r\\n', 'output': ['100 103']}, {'input': '10\\r\\n1\\r\\n3\\r\\n3\\r\\n2\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n3\\r\\n', 'output': ['3 4']}, {'input': '10\\r\\n10\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n', 'output': ['2 11']}, {'input': '100\\r\\n1\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n100\\r\\n', 'output': ['101 101']}]","human_sample_testcases_5":"[{'input': '40\\r\\n10000\\r\\n54\\r\\n5\\r\\n23\\r\\n10\\r\\n10\\r\\n77\\r\\n15\\r\\n84\\r\\n92\\r\\n63\\r\\n34\\r\\n21\\r\\n12\\r\\n56\\r\\n25\\r\\n32\\r\\n28\\r\\n50\\r\\n50\\r\\n86\\r\\n3\\r\\n26\\r\\n39\\r\\n69\\r\\n43\\r\\n99\\r\\n71\\r\\n38\\r\\n15\\r\\n33\\r\\n50\\r\\n79\\r\\n54\\r\\n84\\r\\n33\\r\\n47\\r\\n14\\r\\n66\\r\\n99\\r\\n25\\r\\n', 'output': ['296 10099']}, {'input': '10\\r\\n10\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n1\\r\\n', 'output': ['2 11']}, {'input': '10\\r\\n1\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n4\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n5\\r\\n', 'output': ['5 6']}, {'input': '100\\r\\n50\\r\\n20\\r\\n63\\r\\n60\\r\\n88\\r\\n7\\r\\n22\\r\\n90\\r\\n15\\r\\n27\\r\\n82\\r\\n37\\r\\n44\\r\\n42\\r\\n50\\r\\n33\\r\\n46\\r\\n7\\r\\n97\\r\\n93\\r\\n5\\r\\n68\\r\\n79\\r\\n76\\r\\n3\\r\\n82\\r\\n5\\r\\n51\\r\\n79\\r\\n17\\r\\n1\\r\\n1\\r\\n93\\r\\n52\\r\\n88\\r\\n23\\r\\n23\\r\\n49\\r\\n86\\r\\n64\\r\\n18\\r\\n36\\r\\n53\\r\\n49\\r\\n47\\r\\n11\\r\\n19\\r\\n6\\r\\n79\\r\\n64\\r\\n59\\r\\n56\\r\\n96\\r\\n15\\r\\n72\\r\\n81\\r\\n45\\r\\n24\\r\\n55\\r\\n31\\r\\n2\\r\\n74\\r\\n64\\r\\n57\\r\\n65\\r\\n71\\r\\n44\\r\\n8\\r\\n7\\r\\n38\\r\\n50\\r\\n67\\r\\n1\\r\\n79\\r\\n89\\r\\n16\\r\\n35\\r\\n10\\r\\n72\\r\\n69\\r\\n8\\r\\n56\\r\\n42\\r\\n44\\r\\n95\\r\\n25\\r\\n26\\r\\n16\\r\\n84\\r\\n36\\r\\n73\\r\\n17\\r\\n61\\r\\n91\\r\\n15\\r\\n19\\r\\n78\\r\\n44\\r\\n77\\r\\n96\\r\\n58\\r\\n', 'output': ['97 147']}, {'input': '1\\r\\n10\\r\\n5\\r\\n', 'output': ['15 15']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":113,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\"]","input_specification":"The only line of the input contains a single integer n (2\u2009\u2264\u2009n\u2009\u2264\u20092\u00b71018) \u2014 the power in which you need to raise number 5.","src_uid":"dcaff75492eafaf61d598779d6202c9d","source_code":"#include \nint main(){std::cout<<\"25\\n\";return 0;}\n\/\/1534","sample_outputs":"[\"25\"]","lang_cluster":"C++","notes":null,"output_specification":"Output the last two digits of 5n without spaces between them.","description":"The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. \"Do I give such a hard task?\" \u2014 the HR manager thought. \"Just raise number 5 to the power of n and get last two digits of the number. Yes, of course, n can be rather big, and one cannot find the power using a calculator, but we need people who are able to think, not just follow the instructions.\"Could you pass the interview in the machine vision company in IT City?","human_testcases":"[{\"input\": \"2\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"2000000000000000000\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"987654321012345678\\r\\n\", \"output\": [\"25\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}]","human_sample_testcases_2":"[{'input': '7\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}]","human_sample_testcases_3":"[{'input': '2\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}]","human_sample_testcases_4":"[{'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}]","human_sample_testcases_5":"[{'input': '7\\r\\n', 'output': ['25']}, {'input': '1000000000000000000\\r\\n', 'output': ['25']}, {'input': '2\\r\\n', 'output': ['25']}, {'input': '987654321012345678\\r\\n', 'output': ['25']}, {'input': '2000000000000000000\\r\\n', 'output': ['25']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":114,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4 2 100000007\"]","input_specification":"The first line of input will contain three integers n,\u2009k,\u2009p (1\u2009\u2264\u2009n\u2009\u2264\u2009250\u2009000, 1\u2009\u2264\u2009k\u2009\u2264\u200926, 108\u2009\u2264\u2009p\u2009\u2264\u2009109\u2009+\u2009100, p will be prime).","src_uid":"97f737f59100babe5e45e1a82a1f7d99","source_code":"#include\n#include\n#include\n#include\nusing namespace std;\nint n,k,p;\nint fpow(int a,int b)\n{\n\tint ans=1,t=a;\n\twhile(b)\n\t{\n\t\tif(b&1)ans=1ll*ans*t%p;\n\t\tt=1ll*t*t%p;b>>=1;\n\t}\n\treturn ans;\n}\nint lowbit(int x)\n{\n\treturn x&(-x);\n}\nint f[26][250010];\nint fac[250010],inv[250010];\nvoid init()\n{\n\tfac[0]=1;\n\tfor(int i=1;i<=n;i++)\n\t\tfac[i]=1ll*fac[i-1]*i%p;\n\tinv[n]=fpow(fac[n],p-2);\n\tfor(int i=n;i>=1;i--)\n\t\tinv[i-1]=1ll*inv[i]*i%p;\n\treturn ;\n}\nint solve(int cur,int S)\n{\n\tif(f[cur][S]!=-1)\n\t\treturn f[cur][S];\n\tif(!S){\n\t\tf[cur][S]=fac[n];\n\t\tfor(int i=1;i<=cur;i++)\n\t\t\tf[cur][S]=1ll*f[cur][S]*(k-i+1)%p;\n\t\treturn f[cur][S];\n\t}\n\tf[cur][S]=0;\n\tint U=S-lowbit(S);\n\tfor(int T=U;T;T=(T-1)&U)\n\t\tf[cur][S]=(f[cur][S]+1ll*inv[S-T]*solve(cur+1,T))%p;\n\tf[cur][S]=(f[cur][S]+1ll*inv[S]*solve(cur+1,0))%p;\n\treturn f[cur][S];\n}\nint main()\n{\n\tscanf(\"%d %d %d\",&n,&k,&p);\n\tint ans=1;\n\tfor(int i=1;i<=n;i++)\n\t\tans=1ll*ans*k%p;\n\tif(n%2==0){\n\t\tinit();\n\t\tmemset(f,-1,sizeof(f));\n\t\tans=(ans-solve(0,n)+p)%p;\n\t}\n\tprintf(\"%d\\n\",ans);\n\treturn 0;\n}","sample_outputs":"[\"14\"]","lang_cluster":"C++","notes":"NoteThere are 14 strings that that Alice can win with. For example, some strings are \"bbaa\" and \"baaa\". Alice will lose on strings like \"aaaa\" or \"bbbb\".","output_specification":"Print a single integer, the number of winning words for Alice, modulo p.","description":"Alice and Bob are playing a game with a string of characters, with Alice going first. The string consists n characters, each of which is one of the first k letters of the alphabet. On a player\u2019s turn, they can either arbitrarily permute the characters in the words, or delete exactly one character in the word (if there is at least one character). In addition, their resulting word cannot have appeared before throughout the entire game. The player unable to make a valid move loses the game.Given n,\u2009k,\u2009p, find the number of words with exactly n characters consisting of the first k letters of the alphabet such that Alice will win if both Alice and Bob play optimally. Return this number modulo the prime number p.","human_testcases":"[{\"input\": \"4 2 100000007\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"1 10 100000007\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"5 2 100000007\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"4 1 100000007\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 3 100000007\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"6 3 100000007\\r\\n\", \"output\": [\"636\"]}, {\"input\": \"250000 26 419059819\\r\\n\", \"output\": [\"246743278\"]}, {\"input\": \"250000 21 159237107\\r\\n\", \"output\": [\"124744886\"]}, {\"input\": \"250000 16 690557993\\r\\n\", \"output\": [\"30969019\"]}, {\"input\": \"123456 26 330502547\\r\\n\", \"output\": [\"122021241\"]}, {\"input\": \"232154 3 893627789\\r\\n\", \"output\": [\"492780692\"]}, {\"input\": \"1312 25 425538233\\r\\n\", \"output\": [\"44177569\"]}, {\"input\": \"13132 14 457083337\\r\\n\", \"output\": [\"445627280\"]}, {\"input\": \"13131 14 625308461\\r\\n\", \"output\": [\"313277523\"]}, {\"input\": \"131070 26 550798649\\r\\n\", \"output\": [\"290693777\"]}, {\"input\": \"131070 15 724141441\\r\\n\", \"output\": [\"476164776\"]}, {\"input\": \"245758 26 147046169\\r\\n\", \"output\": [\"128006699\"]}, {\"input\": \"245758 15 662045771\\r\\n\", \"output\": [\"558307367\"]}, {\"input\": \"196606 21 576053623\\r\\n\", \"output\": [\"269130197\"]}, {\"input\": \"249999 25 399293347\\r\\n\", \"output\": [\"66102644\"]}, {\"input\": \"249998 22 318340733\\r\\n\", \"output\": [\"293011292\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 10 100000007\\r\\n', 'output': ['10']}, {'input': '232154 3 893627789\\r\\n', 'output': ['492780692']}, {'input': '250000 21 159237107\\r\\n', 'output': ['124744886']}, {'input': '250000 26 419059819\\r\\n', 'output': ['246743278']}, {'input': '13131 14 625308461\\r\\n', 'output': ['313277523']}]","human_sample_testcases_2":"[{'input': '249998 22 318340733\\r\\n', 'output': ['293011292']}, {'input': '4 3 100000007\\r\\n', 'output': ['78']}, {'input': '245758 15 662045771\\r\\n', 'output': ['558307367']}, {'input': '13132 14 457083337\\r\\n', 'output': ['445627280']}, {'input': '4 2 100000007\\r\\n', 'output': ['14']}]","human_sample_testcases_3":"[{'input': '4 3 100000007\\r\\n', 'output': ['78']}, {'input': '250000 26 419059819\\r\\n', 'output': ['246743278']}, {'input': '131070 15 724141441\\r\\n', 'output': ['476164776']}, {'input': '4 1 100000007\\r\\n', 'output': ['0']}, {'input': '4 2 100000007\\r\\n', 'output': ['14']}]","human_sample_testcases_4":"[{'input': '4 2 100000007\\r\\n', 'output': ['14']}, {'input': '245758 15 662045771\\r\\n', 'output': ['558307367']}, {'input': '232154 3 893627789\\r\\n', 'output': ['492780692']}, {'input': '249998 22 318340733\\r\\n', 'output': ['293011292']}, {'input': '1312 25 425538233\\r\\n', 'output': ['44177569']}]","human_sample_testcases_5":"[{'input': '4 3 100000007\\r\\n', 'output': ['78']}, {'input': '1312 25 425538233\\r\\n', 'output': ['44177569']}, {'input': '4 2 100000007\\r\\n', 'output': ['14']}, {'input': '6 3 100000007\\r\\n', 'output': ['636']}, {'input': '5 2 100000007\\r\\n', 'output': ['32']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":95.0,"human_sample_branch_coverage_3":95.0,"human_sample_branch_coverage_4":95.0,"human_sample_branch_coverage_5":100.0,"id":115,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":97.0} {"sample_inputs":"[\"47\", \"16\", \"78\"]","input_specification":"The single line contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091000) \u2014 the number that needs to be checked.","src_uid":"78cf8bc7660dbd0602bf6e499bc6bb0d","source_code":"#include \n#define op cin.tie(0);ios_base::sync_with_stdio(0);\nusing namespace std;\nint n;\n\nbool lucky(int x)\n{\n while(x)\n {\n if(x%10!= 4 && x%10!=7)\n return false;\n\n x\/=10;\n\n }\n return true;\n}\n\nint main()\n{\n op\n\n cin>>n;\n for(int i=1;i<=n;i++)\n {\n if(n%i==0)\n {\n if(lucky(i))\n {\n cout<<\"YES\";\n return 0;\n }\n\n }\n }\n\n\n cout<<\"NO\";\n return 0;\n}\n","sample_outputs":"[\"YES\", \"YES\", \"NO\"]","lang_cluster":"C++","notes":"NoteNote that all lucky numbers are almost lucky as any number is evenly divisible by itself.In the first sample 47 is a lucky number. In the second sample 16 is divisible by 4.","output_specification":"In the only line print \"YES\" (without the quotes), if number n is almost lucky. Otherwise, print \"NO\" (without the quotes).","description":"Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.Petya calls a number almost lucky if it could be evenly divided by some lucky number. Help him find out if the given number n is almost lucky.","human_testcases":"[{\"input\": \"47\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"78\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"48\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"107\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"77\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"477\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"480\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"49\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"56\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"124\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"298\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"274\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"998\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"42\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"788\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"70\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"444\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"777\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"799\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"882\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"88\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"94\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"141\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1\\r\\n', 'output': ['NO']}, {'input': '999\\r\\n', 'output': ['NO']}, {'input': '1000\\r\\n', 'output': ['YES']}, {'input': '94\\r\\n', 'output': ['YES']}, {'input': '444\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '78\\r\\n', 'output': ['NO']}, {'input': '56\\r\\n', 'output': ['YES']}, {'input': '8\\r\\n', 'output': ['YES']}, {'input': '3\\r\\n', 'output': ['NO']}, {'input': '42\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '1000\\r\\n', 'output': ['YES']}, {'input': '88\\r\\n', 'output': ['YES']}, {'input': '1\\r\\n', 'output': ['NO']}, {'input': '70\\r\\n', 'output': ['YES']}, {'input': '298\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '49\\r\\n', 'output': ['YES']}, {'input': '70\\r\\n', 'output': ['YES']}, {'input': '999\\r\\n', 'output': ['NO']}, {'input': '2\\r\\n', 'output': ['NO']}, {'input': '788\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '4\\r\\n', 'output': ['YES']}, {'input': '7\\r\\n', 'output': ['YES']}, {'input': '88\\r\\n', 'output': ['YES']}, {'input': '298\\r\\n', 'output': ['NO']}, {'input': '77\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":116,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 4 3 1\", \"9 3 8 10\"]","input_specification":"The first line contains four space-separated integers n,\u2009x,\u2009y,\u2009c (1\u2009\u2264\u2009n,\u2009c\u2009\u2264\u2009109;\u00a01\u2009\u2264\u2009x,\u2009y\u2009\u2264\u2009n;\u00a0c\u2009\u2264\u2009n2).","src_uid":"232c5206ee7c1903556c3625e0b0efc6","source_code":"#include \nusing namespace std;\ntypedef long long ll;\n\nll n, x, y, c;\n\nbool ok(ll t) {\n\tll res = 0;\n\tll rowl = max(1ll, y - t), rowh = min(n, y + t);\n\tfor (ll row = rowl; row <= rowh; row++) {\n\t\tll tt = t - abs(y - row);\n\t\tll coll = max(1ll, x - tt), colh = min(n, x + tt);\n\t\tres += colh - coll + 1;\n\t\tif (res >= c) return 1;\n\t}\n\treturn 0;\n}\n\nint main() {\n\tcin >> n >> x >> y >> c;\n\tll lo = 0, hi = 2 * n, mid;\n\twhile (lo <= hi) {\n\t\tmid = (lo + hi) \/ 2;\n\t\tif (ok(mid)) hi = mid - 1;\n\t\telse lo = mid + 1;\n\t}\n\tcout << lo << endl;\n\treturn 0;\n}\n","sample_outputs":"[\"0\", \"2\"]","lang_cluster":"C++","notes":"NoteInitially the first test has one painted cell, so the answer is 0. In the second test all events will go as is shown on the figure. .","output_specification":"In a single line print a single integer \u2014 the answer to the problem.","description":"Mr. Bender has a digital table of size n\u2009\u00d7\u2009n, each cell can be switched on or off. He wants the field to have at least c switched on squares. When this condition is fulfilled, Mr Bender will be happy.We'll consider the table rows numbered from top to bottom from 1 to n, and the columns \u2014 numbered from left to right from 1 to n. Initially there is exactly one switched on cell with coordinates (x,\u2009y) (x is the row number, y is the column number), and all other cells are switched off. Then each second we switch on the cells that are off but have the side-adjacent cells that are on.For a cell with coordinates (x,\u2009y) the side-adjacent cells are cells with coordinates (x\u2009-\u20091,\u2009y), (x\u2009+\u20091,\u2009y), (x,\u2009y\u2009-\u20091), (x,\u2009y\u2009+\u20091).In how many seconds will Mr. Bender get happy?","human_testcases":"[{\"input\": \"6 4 3 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 3 8 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9 4 3 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9 8 2 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 7 2 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 2 6 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 1 2 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6 1 4 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000 951981 612086 60277\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"1000000 587964 232616 62357\\r\\n\", \"output\": [\"177\"]}, {\"input\": \"1000000 948438 69861 89178\\r\\n\", \"output\": [\"211\"]}, {\"input\": \"1000000000 504951981 646612086 602763371\\r\\n\", \"output\": [\"17360\"]}, {\"input\": \"1000000000 81587964 595232616 623563697\\r\\n\", \"output\": [\"17657\"]}, {\"input\": \"1000000000 55 60 715189365\\r\\n\", \"output\": [\"37707\"]}, {\"input\": \"1000000000 85 61 857945620\\r\\n\", \"output\": [\"41279\"]}, {\"input\": \"1000000000 55 85 423654797\\r\\n\", \"output\": [\"28970\"]}, {\"input\": \"1000000000 63 65 384381709\\r\\n\", \"output\": [\"27600\"]}, {\"input\": \"1000000000 44 30 891773002\\r\\n\", \"output\": [\"42159\"]}, {\"input\": \"1000000000 6 97 272656295\\r\\n\", \"output\": [\"23250\"]}, {\"input\": \"1000000000 999999946 999999941 715189365\\r\\n\", \"output\": [\"37707\"]}, {\"input\": \"1000000000 999999916 999999940 857945620\\r\\n\", \"output\": [\"41279\"]}, {\"input\": \"1000000000 999999946 999999916 423654797\\r\\n\", \"output\": [\"28970\"]}, {\"input\": \"1000000000 999999938 999999936 384381709\\r\\n\", \"output\": [\"27600\"]}, {\"input\": \"1000000000 55 999999941 715189365\\r\\n\", \"output\": [\"37707\"]}, {\"input\": \"1000000000 85 999999940 857945620\\r\\n\", \"output\": [\"41279\"]}, {\"input\": \"1000000000 55 999999916 423654797\\r\\n\", \"output\": [\"28970\"]}, {\"input\": \"1000000000 63 999999936 384381709\\r\\n\", \"output\": [\"27600\"]}, {\"input\": \"1000000000 44 999999971 891773002\\r\\n\", \"output\": [\"42159\"]}, {\"input\": \"1000000000 6 999999904 272656295\\r\\n\", \"output\": [\"23250\"]}, {\"input\": \"1000000000 999999946 60 715189365\\r\\n\", \"output\": [\"37707\"]}, {\"input\": \"1000000000 999999916 61 857945620\\r\\n\", \"output\": [\"41279\"]}, {\"input\": \"1000000000 999999946 85 423654797\\r\\n\", \"output\": [\"28970\"]}, {\"input\": \"1000000000 999999938 65 384381709\\r\\n\", \"output\": [\"27600\"]}, {\"input\": \"1000000000 999999957 30 891773002\\r\\n\", \"output\": [\"42159\"]}, {\"input\": \"548813503 532288332 26800940 350552333\\r\\n\", \"output\": [\"13239\"]}, {\"input\": \"847251738 695702891 698306947 648440371\\r\\n\", \"output\": [\"18006\"]}, {\"input\": \"891773002 152235342 682786380 386554406\\r\\n\", \"output\": [\"13902\"]}, {\"input\": \"812168727 57791401 772019566 644719499\\r\\n\", \"output\": [\"17954\"]}, {\"input\": \"71036059 25478942 38920202 19135721\\r\\n\", \"output\": [\"3093\"]}, {\"input\": \"549 198 8 262611\\r\\n\", \"output\": [\"635\"]}, {\"input\": \"848 409 661 620581\\r\\n\", \"output\": [\"771\"]}, {\"input\": \"892 364 824 53858\\r\\n\", \"output\": [\"183\"]}, {\"input\": \"813 154 643 141422\\r\\n\", \"output\": [\"299\"]}, {\"input\": \"72 40 68 849\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"958 768 649 298927\\r\\n\", \"output\": [\"431\"]}, {\"input\": \"800 305 317 414868\\r\\n\", \"output\": [\"489\"]}, {\"input\": \"721 112 687 232556\\r\\n\", \"output\": [\"556\"]}, {\"input\": \"522 228 495 74535\\r\\n\", \"output\": [\"249\"]}, {\"input\": \"737 231 246 79279\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"6 4 3 36\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"9 3 8 55\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"9 4 3 73\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"9 8 2 50\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 7 2 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 2 6 20\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 1 2 64\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"6 1 4 15\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 8 3 1\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 999999938 999999936 384381709\\r\\n', 'output': ['27600']}, {'input': '737 231 246 79279\\r\\n', 'output': ['199']}, {'input': '9 8 2 10\\r\\n', 'output': ['2']}, {'input': '847251738 695702891 698306947 648440371\\r\\n', 'output': ['18006']}, {'input': '10 7 2 7\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '1000000000 999999938 65 384381709\\r\\n', 'output': ['27600']}, {'input': '1 1 1 1\\r\\n', 'output': ['0']}, {'input': '737 231 246 79279\\r\\n', 'output': ['199']}, {'input': '958 768 649 298927\\r\\n', 'output': ['431']}, {'input': '9 3 8 10\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '1000000000 999999946 60 715189365\\r\\n', 'output': ['37707']}, {'input': '813 154 643 141422\\r\\n', 'output': ['299']}, {'input': '1000000000 6 97 272656295\\r\\n', 'output': ['23250']}, {'input': '737 231 246 79279\\r\\n', 'output': ['199']}, {'input': '9 3 8 55\\r\\n', 'output': ['7']}]","human_sample_testcases_4":"[{'input': '8 1 2 64\\r\\n', 'output': ['13']}, {'input': '10 7 2 7\\r\\n', 'output': ['2']}, {'input': '1 1 1 1\\r\\n', 'output': ['0']}, {'input': '71036059 25478942 38920202 19135721\\r\\n', 'output': ['3093']}, {'input': '8 8 3 1\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '1 1 1 1\\r\\n', 'output': ['0']}, {'input': '9 8 2 50\\r\\n', 'output': ['7']}, {'input': '1000000000 999999946 999999916 423654797\\r\\n', 'output': ['28970']}, {'input': '1000000000 999999938 999999936 384381709\\r\\n', 'output': ['27600']}, {'input': '958 768 649 298927\\r\\n', 'output': ['431']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":117,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1\", \"2\", \"3\"]","input_specification":"The only line contains a single integer $$$n$$$ ($$$1 \\le n \\le 1000$$$).","src_uid":"8218255989e5eab73ac7107072c3b2af","source_code":"#include \n#include \nusing namespace std;\nusing namespace __gnu_pbds;\ntypedef tree, rb_tree_tag, tree_order_statistics_node_update> ordered_set;\nusing pii = pair;\nusing vi = vector ;\n#define F first\n#define S second\n#define pb push_back\n#define lb lower_bound\n#define ub upper_bound\n#define ll long long\n#define ook order_of_key\n#define fbo find_by_order\n#define sq(x) (x) * (x)\n#define N 2005\n\nll n, dp[N][N], ans, mod = 1e9 + 7, sum[N];\nint main (){\n\tcin >> n;\n\tn *= 2;\n\tdp[0][0] = 1;\n\tfor (int i = 0;i < n;i++)\n\t\tfor (int j = 0;j <= n - i;j++){\n\t\t\tsum[i] = (sum[i] + dp[i][j]) % mod; \n\t\t\tif (j) dp[i + 1][j - 1] = (dp[i + 1][j - 1] + dp[i][j]) % mod;\n\t\t\tdp[i + 1][j + 1] = (dp[i + 1][j + 1] + dp[i][j]) % mod; \n\t\t}\n\tfor (int i = n - 1;i >= 0;i -= 2)\n\t\tans = (ans + sum[i]) % mod;\n\tcout << ans;\n}","sample_outputs":"[\"1\", \"3\", \"9\"]","lang_cluster":"C++","notes":"NoteThe pictures below illustrate tries in the first two examples (for clarity, the round brackets are replaced with angle brackets). The maximum matching is highlighted with blue. \u00a0 ","output_specification":"Print exactly one integer\u00a0\u2014 the size of the maximum matching in the trie. Since the answer can be quite large, print it modulo $$$10^9 + 7$$$.","description":"Neko is playing with his toys on the backyard of Aki's house. Aki decided to play a prank on him, by secretly putting catnip into Neko's toys. Unfortunately, he went overboard and put an entire bag of catnip into the toys...It took Neko an entire day to turn back to normal. Neko reported to Aki that he saw a lot of weird things, including a trie of all correct bracket sequences of length $$$2n$$$.The definition of correct bracket sequence is as follows: The empty sequence is a correct bracket sequence, If $$$s$$$ is a correct bracket sequence, then $$$(\\,s\\,)$$$ is a correct bracket sequence, If $$$s$$$ and $$$t$$$ are a correct bracket sequence, then $$$st$$$ is also a correct bracket sequence. For example, the strings \"(())\", \"()()\" form a correct bracket sequence, while \")(\" and \"((\" not.Aki then came up with an interesting problem: What is the size of the maximum matching (the largest set of edges such that there are no two edges with a common vertex) in this trie? Since the answer can be quite large, print it modulo $$$10^9 + 7$$$.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"84\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"270\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"892\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"3012\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"10350\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"36074\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"127218\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"453096\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"1627377\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"5887659\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"21436353\"]}, {\"input\": \"450\\r\\n\", \"output\": [\"690479399\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"742390865\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"143886430\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"78484401\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"288779727\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"67263652\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"960081882\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"746806193\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"94725532\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"450571487\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"724717660\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"60828279\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"569244761\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"90251153\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"304700019\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"302293423\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"541190422\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"390449151\"]}, {\"input\": \"900\\r\\n\", \"output\": [\"454329300\"]}, {\"input\": \"500\\r\\n\", \"output\": [\"660474384\"]}, {\"input\": \"996\\r\\n\", \"output\": [\"666557857\"]}, {\"input\": \"997\\r\\n\", \"output\": [\"62038986\"]}, {\"input\": \"998\\r\\n\", \"output\": [\"311781222\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10\\r\\n', 'output': ['36074']}, {'input': '16\\r\\n', 'output': ['78484401']}, {'input': '5\\r\\n', 'output': ['84']}, {'input': '27\\r\\n', 'output': ['304700019']}, {'input': '4\\r\\n', 'output': ['27']}]","human_sample_testcases_2":"[{'input': '1000\\r\\n', 'output': ['143886430']}, {'input': '5\\r\\n', 'output': ['84']}, {'input': '900\\r\\n', 'output': ['454329300']}, {'input': '999\\r\\n', 'output': ['742390865']}, {'input': '9\\r\\n', 'output': ['10350']}]","human_sample_testcases_3":"[{'input': '2\\r\\n', 'output': ['3']}, {'input': '6\\r\\n', 'output': ['270']}, {'input': '25\\r\\n', 'output': ['569244761']}, {'input': '10\\r\\n', 'output': ['36074']}, {'input': '24\\r\\n', 'output': ['60828279']}]","human_sample_testcases_4":"[{'input': '998\\r\\n', 'output': ['311781222']}, {'input': '20\\r\\n', 'output': ['746806193']}, {'input': '24\\r\\n', 'output': ['60828279']}, {'input': '1000\\r\\n', 'output': ['143886430']}, {'input': '22\\r\\n', 'output': ['450571487']}]","human_sample_testcases_5":"[{'input': '23\\r\\n', 'output': ['724717660']}, {'input': '8\\r\\n', 'output': ['3012']}, {'input': '16\\r\\n', 'output': ['78484401']}, {'input': '10\\r\\n', 'output': ['36074']}, {'input': '500\\r\\n', 'output': ['660474384']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":118,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\\n3\\n5\\n1\\n8\", \"3\\n1\\n6\\n7\\n25\", \"6\\n4\\n9\\n10\\n89\"]","input_specification":"The first line contains one integer $$$a_1$$$ $$$(1 \\le a_1 \\le 1\\,000)$$$ \u2014 the number of players in the first team. The second line contains one integer $$$a_2$$$ $$$(1 \\le a_2 \\le 1\\,000)$$$ \u2014 the number of players in the second team. The third line contains one integer $$$k_1$$$ $$$(1 \\le k_1 \\le 1\\,000)$$$ \u2014 the maximum number of yellow cards a player from the first team can receive (after receiving that many yellow cards, he leaves the game). The fourth line contains one integer $$$k_2$$$ $$$(1 \\le k_2 \\le 1\\,000)$$$ \u2014 the maximum number of yellow cards a player from the second team can receive (after receiving that many yellow cards, he leaves the game). The fifth line contains one integer $$$n$$$ $$$(1 \\le n \\le a_1 \\cdot k_1 + a_2 \\cdot k_2)$$$ \u2014 the number of yellow cards that have been shown during the match.","src_uid":"2be8e0b8ad4d3de2930576c0209e8b91","source_code":"#pragma GCC optimize(\"Ofast\", \"unroll-loops\")\n#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native\")\n#include \n#define mp(x, y) make_pair(x, y)\n#define forn(i, a, b) for(size_t i=a; i=a; --i)\n#define all(a) a.begin(), a.end()\n#define sz(a) (size_t)(a).size()\n#define X first\n#define Y second\n#define sqr(x) 1ll*(x)*(x)\n#define pb push_back\n#define fio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)\n\nusing namespace std;\nusing ll = long long;\nusing ull = unsigned long long;\nusing ld = long double;\nusing pii = pair;\nusing pll = pair;\nusing pld = pair;\nusing vint = vector;\nusing vll = vector;\nusing v2int = vector;\nusing v2ll = vector;\n\nint main()\n{\n fio;\n int a1,a2,k1,k2,n;\n int MAX=0;\n cin >>a1>>a2>>k1>>k2>>n;\n\n\n if (k20 && n>=k1)\n {\n n-=k1;\n a1--;\n }\n\n\n while (a2>0 && n>=k2)\n {\n n-=k2;\n a2--;\n }\n\n MAX=(t1-a1)+(t2-a2);\n \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\n\n a1=t1;\n a2=t2;\n n=nn;\n\n\n int tmp=a1*(k1-1)+a2*(k2-1);\n\n\n cout<<(tmp>=n?0:n-tmp)<<\" \"<\n\nusing namespace std;\n\nint mx,b,c;\ndouble arr[15000],a;\nbool chek;\n\nint main()\n{\n\n\n for(int i=1; i<=3; i++){\n cin>>a;\n if(a==1)arr[1]+=(1\/a);\n if(!((int)a%2))arr[2]+=(2\/a);\n if(!((int)a%3))arr[3]+=(3\/a);\n }\n if((arr[1]) || (arr[2]>=2) || (arr[3]>=3)){\n cout<<\"YES\\n\";\n }else{\n cout<<\"NO\\n\";\n }\n \/\/chek= ((b*c)+(a*c)+(b*a))\/(a*b*c);\n \/*if(chek){\n cout<<\"YES\\n\";\n }else{\n cout<<\"NO\\n\";\n }\n cin>>arr[0]>>arr[1]>>arr[2];\n sort(arr,arr+3);\n mx=arr[2]-1;\n if(!mx){\n cout<<\"YES\\n\";\n return 0;\n }\n chek = (mx\/arr[0])+(mx\/arr[1]);\n if(chek>=mx){\n cout<<\"YES\\n\";\n }else{\n cout<<\"NO\\n\";\n }*\/\n return 0;\n}\n","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"C++","notes":"NoteIn the first example Mishka can choose x1\u2009=\u20091, x2\u2009=\u20092, x3\u2009=\u20091. The first garland will be lit during seconds 1,\u20093,\u20095,\u20097,\u2009..., the second \u2014 2,\u20094,\u20096,\u20098,\u2009..., which already cover all the seconds after the 2-nd one. It doesn't even matter what x3 is chosen. Our choice will lead third to be lit during seconds 1,\u20094,\u20097,\u200910,\u2009..., though.In the second example there is no way to choose such moments of time, there always be some seconds when no garland is lit.","output_specification":"If Mishka can choose moments of time to switch on the garlands in such a way that each second after switching the garlands on at least one garland will be lit, print YES. Otherwise, print NO.","description":"Mishka is decorating the Christmas tree. He has got three garlands, and all of them will be put on the tree. After that Mishka will switch these garlands on.When a garland is switched on, it periodically changes its state \u2014 sometimes it is lit, sometimes not. Formally, if i-th garland is switched on during x-th second, then it is lit only during seconds x, x\u2009+\u2009ki, x\u2009+\u20092ki, x\u2009+\u20093ki and so on.Mishka wants to switch on the garlands in such a way that during each second after switching the garlands on there would be at least one lit garland. Formally, Mishka wants to choose three integers x1, x2 and x3 (not necessarily distinct) so that he will switch on the first garland during x1-th second, the second one \u2014 during x2-th second, and the third one \u2014 during x3-th second, respectively, and during each second starting from max(x1,\u2009x2,\u2009x3) at least one garland will be lit.Help Mishka by telling him if it is possible to do this!","human_testcases":"[{\"input\": \"2 2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1499 1498 1500\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1500 1500 1500\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 4 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 3 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 11 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 6 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 10 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 4 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 5 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"228 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 998 1000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 6 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 4 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 5 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 100 100\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 7 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"82 3 82\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 218 924\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 4 123\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 4 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 10 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 5 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 4 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 5 10\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 3 14\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1265 2 593\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2 567\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 6 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 2 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 2 1500\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 6 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 46 79\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1493 1489 1487\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2 8\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 4 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 7 4\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 2 2\\r\\n', 'output': ['YES']}, {'input': '2 3 14\\r\\n', 'output': ['NO']}, {'input': '1 5 5\\r\\n', 'output': ['YES']}, {'input': '7 2 2\\r\\n', 'output': ['YES']}, {'input': '1 1 3\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '2 10 2\\r\\n', 'output': ['YES']}, {'input': '2 10 10\\r\\n', 'output': ['NO']}, {'input': '4 4 123\\r\\n', 'output': ['NO']}, {'input': '2 5 5\\r\\n', 'output': ['NO']}, {'input': '3 3 2\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '1 2 3\\r\\n', 'output': ['YES']}, {'input': '2 3 14\\r\\n', 'output': ['NO']}, {'input': '2 998 1000\\r\\n', 'output': ['NO']}, {'input': '6 4 7\\r\\n', 'output': ['NO']}, {'input': '1 1 3\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '2 998 1000\\r\\n', 'output': ['NO']}, {'input': '1 5 10\\r\\n', 'output': ['YES']}, {'input': '3 4 4\\r\\n', 'output': ['NO']}, {'input': '4 2 3\\r\\n', 'output': ['NO']}, {'input': '2 2 4\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '3 3 6\\r\\n', 'output': ['NO']}, {'input': '15 3 3\\r\\n', 'output': ['NO']}, {'input': '6 7 4\\r\\n', 'output': ['NO']}, {'input': '2 10 2\\r\\n', 'output': ['YES']}, {'input': '3 3 2\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":92.86,"human_sample_branch_coverage_2":78.57,"human_sample_branch_coverage_3":85.71,"human_sample_branch_coverage_4":92.86,"human_sample_branch_coverage_5":78.57,"id":120,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":85.714} {"sample_inputs":"[\"4\\n1 1 1 4\", \"5\\n1 1 5 2 1\"]","input_specification":"The first line of the input contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u200924). Next line contains n positive integers: the i-th number represents ci (1\u2009\u2264\u2009ci\u2009\u2264\u2009n).","src_uid":"ed0925cfaee961a3ceebd13b3c96a15a","source_code":"#include \nusing namespace std;\nint C[25],A[25];\nint N;\nint dfs(int idx,int rem)\n{\n\tif(idx>N)\n\t{\n\t\tfor(int i = 1;i<=N;i++)\n\t\t{\n\t\t\tif(C[i])\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}\n\tif(!A[idx])\n\t\treturn dfs(idx+1,A[idx+1]-1);\n\tfor(int i = min(A[idx],rem);i>0;i--)\n\t{\n\t\tif(C[i])\n\t\t{\n\t\t\tC[i]-=1,A[idx]-=i;\n\t\t\tif(dfs(idx,i))\n\t\t\t\treturn 1;\n\t\t\tA[idx]+=i,C[i]+=1;\n\t\t}\n\t}\n\treturn 0;\n}\nint main()\n{\n\tcin>>N;\n\tC[N] = -1;\n\tfor(int i = 1;i<=N;i++)\n\t{\n\t\tcin>>A[i];\n\t\tC[A[i]]+=1;\n\t\tA[i]-=1;\n\t}\n\tputs(dfs(1,A[1] - 1)?\"YES\":\"NO\");\n\treturn 0;\n}","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"C++","notes":null,"output_specification":"Output on the first line \"YES\" (without quotes) if there exist at least one tree following Iahub's restrictions, otherwise output \"NO\" (without quotes). ","description":"Iahub and Iahubina went to a picnic in a forest full of trees. Less than 5 minutes passed before Iahub remembered of trees from programming. Moreover, he invented a new problem and Iahubina has to solve it, otherwise Iahub won't give her the food. Iahub asks Iahubina: can you build a rooted tree, such that each internal node (a node with at least one son) has at least two sons; node i has ci nodes in its subtree? Iahubina has to guess the tree. Being a smart girl, she realized that it's possible no tree can follow Iahub's restrictions. In this way, Iahub will eat all the food. You need to help Iahubina: determine if there's at least one tree following Iahub's restrictions. The required tree must contain n nodes.","human_testcases":"[{\"input\": \"4\\r\\n1 1 1 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n1 1 5 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13\\r\\n1 1 1 1 1 1 1 1 1 4 4 4 13\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4\\r\\n1 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10\\r\\n1 1 1 1 7 1 1 1 4 10\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24\\r\\n1 1 3 1 1 10 2 9 13 1 8 1 4 1 3 24 1 1 1 1 4 1 3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24\\r\\n2 3 20 1 4 9 1 3 1 2 1 3 1 2 1 1 1 2 1 2 4 24 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24\\r\\n8 5 3 1 1 5 10 1 1 1 1 5 1 2 7 3 4 1 1 24 1 1 2 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24\\r\\n1 1 1 3 4 1 24 1 1 3 1 1 1 5 14 2 17 1 2 2 5 1 1 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"17\\r\\n6 1 1 1 3 1 1 17 6 1 4 1 1 1 3 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23\\r\\n1 1 1 1 3 7 3 1 1 1 3 7 1 3 1 15 1 3 7 3 23 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24\\r\\n1 24 1 1 1 3 8 1 1 3 1 1 6 1 1 1 1 3 5 1 3 7 13 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"16\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"21\\r\\n1 1 1 6 1 1 13 21 1 1 3 1 8 1 19 3 3 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"22\\r\\n1 1 1 6 1 1 13 21 1 1 2 1 8 1 19 3 3 1 1 1 1 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"19\\r\\n9 7 1 8 1 1 1 13 1 1 3 3 19 1 1 1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"18\\r\\n6 1 1 3 1 1 1 1 1 1 4 1 8 1 1 18 1 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14\\r\\n4 1 1 1 3 1 1 1 1 14 1 5 1 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2\\r\\n1 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24\\r\\n3 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"20\\r\\n20 9 4 4 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12\\r\\n12 7 4 3 3 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '24\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '24\\r\\n3 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\\r\\n', 'output': ['NO']}, {'input': '19\\r\\n9 7 1 8 1 1 1 13 1 1 3 3 19 1 1 1 1 1 1\\r\\n', 'output': ['NO']}, {'input': '14\\r\\n4 1 1 1 3 1 1 1 1 14 1 5 1 3\\r\\n', 'output': ['YES']}, {'input': '20\\r\\n20 9 4 4 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '2\\r\\n1 2\\r\\n', 'output': ['NO']}, {'input': '21\\r\\n1 1 1 6 1 1 13 21 1 1 3 1 8 1 19 3 3 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '13\\r\\n1 1 1 1 1 1 1 1 1 4 4 4 13\\r\\n', 'output': ['YES']}, {'input': '10\\r\\n1 1 1 1 7 1 1 1 4 10\\r\\n', 'output': ['YES']}, {'input': '24\\r\\n3 3 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '5\\r\\n1 1 5 2 1\\r\\n', 'output': ['NO']}, {'input': '21\\r\\n1 1 1 6 1 1 13 21 1 1 3 1 8 1 19 3 3 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '22\\r\\n1 1 1 6 1 1 13 21 1 1 2 1 8 1 19 3 3 1 1 1 1 2\\r\\n', 'output': ['NO']}, {'input': '24\\r\\n8 5 3 1 1 5 10 1 1 1 1 5 1 2 7 3 4 1 1 24 1 1 2 8\\r\\n', 'output': ['NO']}, {'input': '10\\r\\n1 1 1 1 7 1 1 1 4 10\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '12\\r\\n12 7 4 3 3 1 1 1 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '2\\r\\n1 2\\r\\n', 'output': ['NO']}, {'input': '21\\r\\n1 1 1 6 1 1 13 21 1 1 3 1 8 1 19 3 3 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '20\\r\\n20 9 4 4 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '4\\r\\n1 1 1 4\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '1\\r\\n1\\r\\n', 'output': ['YES']}, {'input': '16\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1\\r\\n', 'output': ['YES']}, {'input': '19\\r\\n9 7 1 8 1 1 1 13 1 1 3 3 19 1 1 1 1 1 1\\r\\n', 'output': ['NO']}, {'input': '24\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 24 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '4\\r\\n1 1 1 4\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.83,"human_sample_line_coverage_2":91.67,"human_sample_line_coverage_3":95.83,"human_sample_line_coverage_4":95.83,"human_sample_line_coverage_5":95.83,"human_sample_branch_coverage_1":94.44,"human_sample_branch_coverage_2":88.89,"human_sample_branch_coverage_3":94.44,"human_sample_branch_coverage_4":94.44,"human_sample_branch_coverage_5":94.44,"id":121,"human_sample_pass_rate":100.0,"human_sample_line_coverage":94.998,"human_sample_branch_coverage":93.33} {"sample_inputs":"[\"5 2\", \"7 4\"]","input_specification":"The single line contains two space-separated integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u20091000,\u20091\u2009\u2264\u2009k\u2009\u2264\u2009min(8,\u2009n)) \u2014 the number of the houses and the number k from the statement.","src_uid":"cc838bc14408f14f984a349fea9e9694","source_code":"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nusing namespace std;\n\nconst long long MAXN = 2000;\nconst long long mod = 1000000007;\nlong long C[MAXN][MAXN], nn[MAXN], f[MAXN];\nlong long a[MAXN];\nlong long n, k;\nlong long res = 0, s = 0;\n\nlong long next(long long a[], long long l, long long r, long long up)\n{\n\ta[r + 1] = 0;\n\ta[l]++;\n\tfor(long long i = l; i <= r; i++)\n\t\tif (a[i] > up)\n\t\t{\n\t\t\ta[i] = 1;\n\t\t\ta[i + 1]++;\n\t\t}\n\tif (a[r + 1])\n\t\treturn 0;\n\treturn 1;\n}\n\nlong long pow(long long a, long long b)\n{\n\tlong long res = 1;\n\tfor(long long i = 1; i <= b; i++)\n\t\tres = res * a % mod;\n\treturn res;\n}\n\nint main()\n{\n\tcin >> n >> k;\n\tfor(long long i = 0; i <= n; i++)\n\t\tC[i][0] = 1;\n\tfor(long long i = 1; i <= n; i++)\n\t\tfor(long long j = 1; j <= n; j++)\n\t\t\tC[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;\n\tnn[0] = 1;\n\t\/\/for(long long i = 1; i <= n; i++, prlong longf(\"\\n\"))\n\t\/\/\tfor(long long j = 1; j <= n; j++)\n\t\/\/\t\tprlong longf(\"%I64d \", C[i][j]);\n\tfor(long long i = 1; i <= n; i++)\n\t\tnn[i] = nn[i - 1] * i % mod;\n\tres = pow(n - k, n - k);\n\t\n\t\/\/prlong longf(\"%I64d\\n\", res);\n\tfor(long long i = 1; i <= k; i++)\n\t{\n\t\tlong long tmp = C[k - 1][i - 1] * nn[i - 1] % mod;\n\t\tlong long left = k - i;\n\t\tfor(long long j = i + 1; j <= k; j++)\n\t\t\ta[j] = 1;\n\t\tlong long tmp2 = 0;\n\t\twhile(1)\n\t\t{\n\t\t\tlong long flag = 1;\n\t\t\tfor(long long j = i + 1; j <= k; j++)\n\t\t\t{\n\t\t\t\tlong long x = j, ok = 0;\n\t\t\t\tfor(long long l = 1; l <= k; l++)\n\t\t\t\t{\n\t\t\t\t\tx = a[x];\n\t\t\t\t\tif (x <= i)\n\t\t\t\t\t\tok = 1;\n\t\t\t\t}\n\t\t\t\tif (!ok)\n\t\t\t\t{\n\t\t\t\t\tflag = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\ttmp2 += flag;\n\t\t\tif (!next(a, i + 1, k, k))\n\t\t\t\tbreak;\n\t\t}\n\t\ts += tmp2 * tmp % mod;\n\t\ts %= mod;\n\t\t\t\n\t}\n\tcout << res * s % mod << endl;\n\treturn 0;\n}","sample_outputs":"[\"54\", \"1728\"]","lang_cluster":"C++","notes":null,"output_specification":"In a single line print a single integer \u2014 the answer to the problem modulo 1000000007 (109\u2009+\u20097).","description":"Little penguin Polo loves his home village. The village has n houses, indexed by integers from 1 to n. Each house has a plaque containing an integer, the i-th house has a plaque containing integer pi (1\u2009\u2264\u2009pi\u2009\u2264\u2009n).Little penguin Polo loves walking around this village. The walk looks like that. First he stands by a house number x. Then he goes to the house whose number is written on the plaque of house x (that is, to house px), then he goes to the house whose number is written on the plaque of house px (that is, to house ppx), and so on.We know that: When the penguin starts walking from any house indexed from 1 to k, inclusive, he can walk to house number 1. When the penguin starts walking from any house indexed from k\u2009+\u20091 to n, inclusive, he definitely cannot walk to house number 1. When the penguin starts walking from house number 1, he can get back to house number 1 after some non-zero number of walks from a house to a house. You need to find the number of ways you may write the numbers on the houses' plaques so as to fulfill the three above described conditions. Print the remainder after dividing this number by 1000000007 (109\u2009+\u20097).","human_testcases":"[{\"input\": \"5 2\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"7 4\\r\\n\", \"output\": [\"1728\"]}, {\"input\": \"8 5\\r\\n\", \"output\": [\"16875\"]}, {\"input\": \"8 1\\r\\n\", \"output\": [\"823543\"]}, {\"input\": \"10 7\\r\\n\", \"output\": [\"3176523\"]}, {\"input\": \"12 8\\r\\n\", \"output\": [\"536870912\"]}, {\"input\": \"50 2\\r\\n\", \"output\": [\"628702797\"]}, {\"input\": \"100 8\\r\\n\", \"output\": [\"331030906\"]}, {\"input\": \"1000 8\\r\\n\", \"output\": [\"339760446\"]}, {\"input\": \"999 7\\r\\n\", \"output\": [\"490075342\"]}, {\"input\": \"685 7\\r\\n\", \"output\": [\"840866481\"]}, {\"input\": \"975 8\\r\\n\", \"output\": [\"531455228\"]}, {\"input\": \"475 5\\r\\n\", \"output\": [\"449471303\"]}, {\"input\": \"227 6\\r\\n\", \"output\": [\"407444135\"]}, {\"input\": \"876 8\\r\\n\", \"output\": [\"703293724\"]}, {\"input\": \"1000 1\\r\\n\", \"output\": [\"760074701\"]}, {\"input\": \"1000 2\\r\\n\", \"output\": [\"675678679\"]}, {\"input\": \"1000 3\\r\\n\", \"output\": [\"330155123\"]}, {\"input\": \"1000 4\\r\\n\", \"output\": [\"660270610\"]}, {\"input\": \"1000 5\\r\\n\", \"output\": [\"583047503\"]}, {\"input\": \"1000 6\\r\\n\", \"output\": [\"834332109\"]}, {\"input\": \"657 3\\r\\n\", \"output\": [\"771999480\"]}, {\"input\": \"137 5\\r\\n\", \"output\": [\"160909830\"]}, {\"input\": \"8 8\\r\\n\", \"output\": [\"2097152\"]}, {\"input\": \"9 8\\r\\n\", \"output\": [\"2097152\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"473 4\\r\\n\", \"output\": [\"145141007\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '50 2\\r\\n', 'output': ['628702797']}, {'input': '975 8\\r\\n', 'output': ['531455228']}, {'input': '2 2\\r\\n', 'output': ['2']}, {'input': '5 2\\r\\n', 'output': ['54']}, {'input': '7 4\\r\\n', 'output': ['1728']}]","human_sample_testcases_2":"[{'input': '685 7\\r\\n', 'output': ['840866481']}, {'input': '1000 2\\r\\n', 'output': ['675678679']}, {'input': '50 2\\r\\n', 'output': ['628702797']}, {'input': '1000 1\\r\\n', 'output': ['760074701']}, {'input': '1000 8\\r\\n', 'output': ['339760446']}]","human_sample_testcases_3":"[{'input': '876 8\\r\\n', 'output': ['703293724']}, {'input': '10 7\\r\\n', 'output': ['3176523']}, {'input': '7 4\\r\\n', 'output': ['1728']}, {'input': '1000 3\\r\\n', 'output': ['330155123']}, {'input': '475 5\\r\\n', 'output': ['449471303']}]","human_sample_testcases_4":"[{'input': '12 8\\r\\n', 'output': ['536870912']}, {'input': '685 7\\r\\n', 'output': ['840866481']}, {'input': '2 2\\r\\n', 'output': ['2']}, {'input': '473 4\\r\\n', 'output': ['145141007']}, {'input': '50 2\\r\\n', 'output': ['628702797']}]","human_sample_testcases_5":"[{'input': '9 8\\r\\n', 'output': ['2097152']}, {'input': '2 2\\r\\n', 'output': ['2']}, {'input': '50 2\\r\\n', 'output': ['628702797']}, {'input': '227 6\\r\\n', 'output': ['407444135']}, {'input': '975 8\\r\\n', 'output': ['531455228']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":122,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1 1\", \"3 1 0\"]","input_specification":"The first line contains three space-separated integers a, b and c (0\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u2009231;\u00a0a\u2009+\u2009b\u2009+\u2009c\u2009>\u20090) \u2014 the number of red, green and blue pixels, correspondingly.","src_uid":"b8008caf788336775cb8ebb76478b04c","source_code":"#include\nusing namespace std;\nlong long a[3];\nint main()\n{\n\tcin>>a[0]>>a[1]>>a[2];\n\tsort(a,a+3);\n\tif ((a[0]+a[1])%2==0) cout<\n\nusing namespace std;\n\nint k, a, v, b, st, dr, piv;\n\nint check(int x){\n\tint nr = min(x * (k-1), b);\n\treturn ((x + nr) * v); \n}\n\nint main(){\n\/\/\tifstream in(\"tst.in\");\n\/\/\tofstream out(\"tst.out\");\n\tcin >> k >> a >> b >> v;\n\tst = 1;\n\tdr = 10000;\n\twhile(st <= dr){\n\t\tpiv = (st + dr) \/ 2;\n\t\tif(check(piv) >= a) dr = piv - 1;\n\t\telse st = piv + 1;\n\t}\n\tcout << st;\n\treturn 0;\n}\n","sample_outputs":"[\"2\", \"3\", \"1\"]","lang_cluster":"C++","notes":"NoteIn the first sample you can act like this: Put two divisors to the first box. Now the first box has three sections and we can put three nuts into each section. Overall, the first box will have nine nuts. Do not put any divisors into the second box. Thus, the second box has one section for the last nut. In the end we've put all the ten nuts into boxes.The second sample is different as we have exactly one divisor and we put it to the first box. The next two boxes will have one section each.","output_specification":"Print a single integer \u2014 the answer to the problem.","description":"You have a nuts and lots of boxes. The boxes have a wonderful feature: if you put x (x\u2009\u2265\u20090) divisors (the spacial bars that can divide a box) to it, you get a box, divided into x\u2009+\u20091 sections.You are minimalist. Therefore, on the one hand, you are against dividing some box into more than k sections. On the other hand, you are against putting more than v nuts into some section of the box. What is the minimum number of boxes you have to use if you want to put all the nuts in boxes, and you have b divisors?Please note that you need to minimize the number of used boxes, not sections. You do not have to minimize the number of used divisors.","human_testcases":"[{\"input\": \"3 10 3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 10 1 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 100 1 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 347 20 1\\r\\n\", \"output\": [\"327\"]}, {\"input\": \"6 978 10 5\\r\\n\", \"output\": [\"186\"]}, {\"input\": \"6 856 50 35\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 399 13 36\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 787 48 4\\r\\n\", \"output\": [\"149\"]}, {\"input\": \"4 714 7 6\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"7 915 12 24\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"8 995 3 28\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"10 267 4 48\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 697 1 34\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"7 897 49 42\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 849 3 28\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"477 492 438 690\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"461 790 518 105\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"510 996 830 417\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"763 193 388 346\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"958 380 405 434\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"346 991 4 4\\r\\n\", \"output\": [\"244\"]}, {\"input\": \"648 990 5 2\\r\\n\", \"output\": [\"490\"]}, {\"input\": \"810 1000 6 5\\r\\n\", \"output\": [\"194\"]}, {\"input\": \"683 995 10 1\\r\\n\", \"output\": [\"985\"]}, {\"input\": \"307 999 10 7\\r\\n\", \"output\": [\"133\"]}, {\"input\": \"974 999 3 4\\r\\n\", \"output\": [\"247\"]}, {\"input\": \"60 1000 2 2\\r\\n\", \"output\": [\"498\"]}, {\"input\": \"634 993 9 3\\r\\n\", \"output\": [\"322\"]}, {\"input\": \"579 990 8 9\\r\\n\", \"output\": [\"102\"]}, {\"input\": \"306 993 9 9\\r\\n\", \"output\": [\"102\"]}, {\"input\": \"845 996 1 1\\r\\n\", \"output\": [\"995\"]}, {\"input\": \"872 997 1 1\\r\\n\", \"output\": [\"996\"]}, {\"input\": \"2 990 1 1\\r\\n\", \"output\": [\"989\"]}, {\"input\": \"489 992 1 1\\r\\n\", \"output\": [\"991\"]}, {\"input\": \"638 1000 1 1\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"2 4 1000 1\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '763 193 388 346\\r\\n', 'output': ['1']}, {'input': '7 897 49 42\\r\\n', 'output': ['4']}, {'input': '6 856 50 35\\r\\n', 'output': ['5']}, {'input': '10 849 3 28\\r\\n', 'output': ['28']}, {'input': '3 10 1 3\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '5 347 20 1\\r\\n', 'output': ['327']}, {'input': '763 193 388 346\\r\\n', 'output': ['1']}, {'input': '634 993 9 3\\r\\n', 'output': ['322']}, {'input': '461 790 518 105\\r\\n', 'output': ['1']}, {'input': '810 1000 6 5\\r\\n', 'output': ['194']}]","human_sample_testcases_3":"[{'input': '4 787 48 4\\r\\n', 'output': ['149']}, {'input': '477 492 438 690\\r\\n', 'output': ['1']}, {'input': '346 991 4 4\\r\\n', 'output': ['244']}, {'input': '683 995 10 1\\r\\n', 'output': ['985']}, {'input': '461 790 518 105\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '10 849 3 28\\r\\n', 'output': ['28']}, {'input': '10 697 1 34\\r\\n', 'output': ['20']}, {'input': '4 714 7 6\\r\\n', 'output': ['112']}, {'input': '579 990 8 9\\r\\n', 'output': ['102']}, {'input': '8 399 13 36\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '683 995 10 1\\r\\n', 'output': ['985']}, {'input': '5 347 20 1\\r\\n', 'output': ['327']}, {'input': '10 849 3 28\\r\\n', 'output': ['28']}, {'input': '10 697 1 34\\r\\n', 'output': ['20']}, {'input': '6 856 50 35\\r\\n', 'output': ['5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":124,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 10\\n8 9\", \"3 5\\n4 4 4\"]","input_specification":"The first line contains two integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u2009100,\u20091\u2009\u2264\u2009k\u2009\u2264\u2009100) denoting the number of marks, received by Noora and the value of highest possible mark. The second line contains n integers a1,\u2009a2,\u2009...,\u2009an (1\u2009\u2264\u2009ai\u2009\u2264\u2009k) denoting marks received by Noora before Leha's hack.","src_uid":"f22267bf3fad0bf342ecf4c27ad3a900","source_code":"#include\n#include\n#include\n#include\nusing namespace std;\nconst int ok=500;\nint n,k,a[ok];\ndouble sum,cnt;\nint av;\nint main()\n{\n\tscanf(\"%d%d\",&n,&k);\n\tfor(int i=1;i<=n;i++)\n\t{\n\t\tscanf(\"%d\",&a[i]);\n\t\tsum+=a[i];\n\t} \n\tint n1=n;\n\tcnt=sum*1.0\/n;\n\tav=round(cnt);\n\twhile(av!=k)\n\t{\n\t\tsum+=k;\n\t\tn++;\n\t\tcnt=sum*1.0\/n;\n\t\tav=round(cnt);\n\t}\n\tprintf(\"%d\",n-n1); \n\treturn 0;\n}","sample_outputs":"[\"4\", \"3\"]","lang_cluster":"C++","notes":"NoteConsider the first example testcase.Maximal mark is 10, Noora received two marks\u00a0\u2014 8 and 9, so current final mark is 9. To fix it, Leha can add marks [10,\u200910,\u200910,\u200910] (4 marks in total) to the registry, achieving Noora having average mark equal to . Consequently, new final mark is 10. Less number of marks won't fix the situation.In the second example Leha can add [5,\u20095,\u20095] to the registry, so that making average mark equal to 4.5, which is enough to have 5 in the certificate.","output_specification":"Print a single integer\u00a0\u2014 minimal number of additional marks, that Leha has to add in order to change Noora's final mark to k.","description":"Noora is a student of one famous high school. It's her final year in school\u00a0\u2014 she is going to study in university next year. However, she has to get an \u00abA\u00bb graduation certificate in order to apply to a prestigious one.In school, where Noora is studying, teachers are putting down marks to the online class register, which are integers from 1 to k. The worst mark is 1, the best is k. Mark that is going to the certificate, is calculated as an average of all the marks, rounded to the closest integer. If several answers are possible, rounding up is produced. For example, 7.3 is rounded to 7, but 7.5 and 7.8784\u00a0\u2014 to 8. For instance, if Noora has marks [8,\u20099], then the mark to the certificate is 9, because the average is equal to 8.5 and rounded to 9, but if the marks are [8,\u20098,\u20099], Noora will have graduation certificate with 8.To graduate with \u00abA\u00bb certificate, Noora has to have mark k.Noora got n marks in register this year. However, she is afraid that her marks are not enough to get final mark k. Noora decided to ask for help in the internet, where hacker Leha immediately responded to her request. He is ready to hack class register for Noora and to add Noora any number of additional marks from 1 to k. At the same time, Leha want his hack be unseen to everyone, so he decided to add as less as possible additional marks. Please help Leha to calculate the minimal number of marks he has to add, so that final Noora's mark will become equal to k.","human_testcases":"[{\"input\": \"2 10\\r\\n8 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 5\\r\\n4 4 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 10\\r\\n10 8 9\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 23\\r\\n21 23\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 10\\r\\n5 10 10 9 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"12 50\\r\\n18 10 26 22 22 23 14 21 27 18 25 12\\r\\n\", \"output\": [\"712\"]}, {\"input\": \"38 12\\r\\n2 7 10 8 5 3 5 6 3 6 5 1 9 7 7 8 3 4 4 4 5 2 3 6 6 1 6 7 4 4 8 7 4 5 3 6 6 6\\r\\n\", \"output\": [\"482\"]}, {\"input\": \"63 86\\r\\n32 31 36 29 36 26 28 38 39 32 29 26 33 38 36 38 36 28 43 48 28 33 25 39 39 27 34 25 37 28 40 26 30 31 42 32 36 44 29 36 30 35 48 40 26 34 30 33 33 46 42 24 36 38 33 51 33 41 38 29 29 32 28\\r\\n\", \"output\": [\"6469\"]}, {\"input\": \"100 38\\r\\n30 24 38 31 31 33 32 32 29 34 29 22 27 23 34 25 32 30 30 26 16 27 38 33 38 38 37 34 32 27 33 23 33 32 24 24 30 36 29 30 33 30 29 30 36 33 33 35 28 24 30 32 38 29 30 36 31 30 27 38 31 36 15 37 32 27 29 24 38 33 28 29 34 21 37 35 32 31 27 25 27 28 31 31 36 38 35 35 36 29 35 22 38 31 38 28 31 27 34 31\\r\\n\", \"output\": [\"1340\"]}, {\"input\": \"33 69\\r\\n60 69 68 69 69 60 64 60 62 59 54 47 60 62 69 69 69 58 67 69 62 69 68 53 69 69 66 66 57 58 65 69 61\\r\\n\", \"output\": [\"329\"]}, {\"input\": \"39 92\\r\\n19 17 16 19 15 30 21 25 14 17 19 19 23 16 14 15 17 19 29 15 11 25 19 14 18 20 10 16 11 15 18 20 20 17 18 16 12 17 16\\r\\n\", \"output\": [\"5753\"]}, {\"input\": \"68 29\\r\\n29 29 29 29 29 28 29 29 29 27 29 29 29 29 29 29 29 23 29 29 26 29 29 29 29 29 29 29 29 29 29 29 29 29 29 29 26 29 29 29 29 29 29 29 29 29 29 29 29 22 29 29 29 29 29 29 29 29 29 29 29 29 29 28 29 29 29 29\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75 30\\r\\n22 18 21 26 23 18 28 30 24 24 19 25 28 30 23 29 18 23 23 30 26 30 17 30 18 19 25 26 26 15 27 23 30 21 19 26 25 30 25 28 20 22 22 21 26 17 23 23 24 15 25 19 18 22 30 30 29 21 30 28 28 30 27 25 24 15 22 19 30 21 20 30 18 20 25\\r\\n\", \"output\": [\"851\"]}, {\"input\": \"78 43\\r\\n2 7 6 5 5 6 4 5 3 4 6 8 4 5 5 4 3 1 2 4 4 6 5 6 4 4 6 4 8 4 6 5 6 1 4 5 6 3 2 5 2 5 3 4 8 8 3 3 4 4 6 6 5 4 5 5 7 9 3 9 6 4 7 3 6 9 6 5 1 7 2 5 6 3 6 2 5 4\\r\\n\", \"output\": [\"5884\"]}, {\"input\": \"82 88\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1\\r\\n\", \"output\": [\"14170\"]}, {\"input\": \"84 77\\r\\n28 26 36 38 37 44 48 34 40 22 42 35 40 37 30 31 33 35 36 55 47 36 33 47 40 38 27 38 36 33 35 31 47 33 30 38 38 47 49 24 38 37 28 43 39 36 34 33 29 38 36 43 48 38 36 34 33 34 35 31 26 33 39 37 37 37 35 52 47 30 24 46 38 26 43 46 41 50 33 40 36 41 37 30\\r\\n\", \"output\": [\"6650\"]}, {\"input\": \"94 80\\r\\n21 19 15 16 27 16 20 18 19 19 15 15 20 19 19 21 20 19 13 17 15 9 17 15 23 15 12 18 12 13 15 12 14 13 14 17 20 20 14 21 15 6 10 23 24 8 18 18 13 23 17 22 17 19 19 18 17 24 8 16 18 20 24 19 10 19 15 10 13 14 19 15 16 19 20 15 14 21 16 16 14 14 22 19 12 11 14 13 19 32 16 16 13 20\\r\\n\", \"output\": [\"11786\"]}, {\"input\": \"96 41\\r\\n13 32 27 34 28 34 30 26 21 24 29 20 25 34 25 16 27 15 22 22 34 22 25 19 23 17 17 22 26 24 23 20 21 27 19 33 13 24 22 18 30 30 27 14 26 24 20 20 22 11 19 31 19 29 18 28 30 22 17 15 28 32 17 24 17 24 24 19 26 23 22 29 18 22 23 29 19 32 26 23 22 22 24 23 27 30 24 25 21 21 33 19 35 27 34 28\\r\\n\", \"output\": [\"3182\"]}, {\"input\": \"1 26\\r\\n26\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99 39\\r\\n25 28 30 28 32 34 31 28 29 28 29 30 33 19 33 31 27 33 29 24 27 30 25 38 28 34 35 31 34 37 30 22 21 24 34 27 34 33 34 33 26 26 36 19 30 22 35 30 21 28 23 35 33 29 21 22 36 31 34 32 34 32 30 32 27 33 38 25 35 26 39 27 29 29 19 33 28 29 34 38 26 30 36 26 29 30 26 34 22 32 29 38 25 27 24 17 25 28 26\\r\\n\", \"output\": [\"1807\"]}, {\"input\": \"100 12\\r\\n7 6 6 3 5 5 9 8 7 7 4 7 12 6 9 5 6 3 4 7 9 10 7 7 5 3 9 6 9 9 6 7 4 10 4 8 8 6 9 8 6 5 7 4 10 7 5 6 8 9 3 4 8 5 4 8 6 10 5 8 7 5 9 8 5 8 5 6 9 11 4 9 5 5 11 4 6 6 7 3 8 9 6 7 10 4 7 6 9 4 8 11 5 4 10 8 5 10 11 4\\r\\n\", \"output\": [\"946\"]}, {\"input\": \"100 18\\r\\n1 2 2 2 2 2 1 1 1 2 3 1 3 1 1 4 2 4 1 2 1 2 1 3 2 1 2 1 1 1 2 1 2 2 1 1 4 3 1 1 2 1 3 3 2 1 2 2 1 1 1 1 3 1 1 2 2 1 1 1 5 1 2 1 3 2 2 1 4 2 2 1 1 1 1 1 1 1 1 2 2 1 2 1 1 1 2 1 2 2 2 1 1 3 1 1 2 1 1 2\\r\\n\", \"output\": [\"3164\"]}, {\"input\": \"100 27\\r\\n16 20 21 10 16 17 18 25 19 18 20 12 11 21 21 23 20 26 20 21 27 16 25 18 25 21 27 12 20 27 18 17 27 13 21 26 12 22 15 21 25 21 18 27 24 15 16 18 23 21 24 27 19 17 24 14 21 16 24 26 13 14 25 18 27 26 22 16 27 27 17 25 17 12 22 10 19 27 19 20 23 22 25 23 17 25 14 20 22 10 22 27 21 20 15 26 24 27 12 16\\r\\n\", \"output\": [\"1262\"]}, {\"input\": \"100 29\\r\\n20 18 23 24 14 14 16 23 22 17 18 22 21 21 19 19 14 11 18 19 16 22 25 20 14 13 21 24 18 16 18 29 17 25 12 10 18 28 11 16 17 14 15 20 17 20 18 22 10 16 16 20 18 19 29 18 25 27 17 19 24 15 24 25 16 23 19 16 16 20 19 15 12 21 20 13 21 15 15 23 16 23 17 13 17 21 13 18 17 18 18 20 16 12 19 15 27 14 11 18\\r\\n\", \"output\": [\"2024\"]}, {\"input\": \"100 30\\r\\n16 10 20 11 14 27 15 17 22 26 24 17 15 18 19 22 22 15 21 22 14 21 22 22 21 22 15 17 17 22 18 19 26 18 22 20 22 25 18 18 17 23 18 18 20 13 19 30 17 24 22 19 29 20 20 21 17 18 26 25 22 19 15 18 18 20 19 19 18 18 24 16 19 17 12 21 20 16 23 21 16 17 26 23 25 28 22 20 9 21 17 24 15 19 17 21 29 13 18 15\\r\\n\", \"output\": [\"1984\"]}, {\"input\": \"100 59\\r\\n56 58 53 59 59 48 59 54 46 59 59 58 48 59 55 59 59 50 59 56 59 59 59 59 59 59 59 57 59 53 45 53 50 59 50 55 58 54 59 56 54 59 59 59 59 48 56 59 59 57 59 59 48 43 55 57 39 59 46 55 55 52 58 57 51 59 59 59 59 53 59 43 51 54 46 59 57 43 50 59 47 58 59 59 59 55 46 56 55 59 56 47 56 56 46 51 47 48 59 55\\r\\n\", \"output\": [\"740\"]}, {\"input\": \"100 81\\r\\n6 7 6 6 7 6 6 6 3 9 4 5 4 3 4 6 6 6 1 3 9 5 2 3 8 5 6 9 6 6 6 5 4 4 7 7 3 6 11 7 6 4 8 7 12 6 4 10 2 4 9 11 7 4 7 7 8 8 6 7 9 8 4 5 8 13 6 6 6 8 6 2 5 6 7 5 4 4 4 4 2 6 4 8 3 4 7 7 6 7 7 10 5 10 6 7 4 11 8 4\\r\\n\", \"output\": [\"14888\"]}, {\"input\": \"100 100\\r\\n30 35 23 43 28 49 31 32 30 44 32 37 33 34 38 28 43 32 33 32 50 32 41 38 33 20 40 36 29 21 42 25 23 34 43 32 37 31 30 27 36 32 45 37 33 29 38 34 35 33 28 19 37 33 28 41 31 29 41 27 32 39 30 34 37 40 33 38 35 32 32 34 35 34 28 39 28 34 40 45 31 25 42 28 29 31 33 21 36 33 34 37 40 42 39 30 36 34 34 40\\r\\n\", \"output\": [\"13118\"]}, {\"input\": \"100 100\\r\\n71 87 100 85 89 98 90 90 71 65 76 75 85 100 81 100 91 80 73 89 86 78 82 89 77 92 78 90 100 81 85 89 73 100 66 60 72 88 91 73 93 76 88 81 86 78 83 77 74 93 97 94 85 78 82 78 91 91 100 78 89 76 78 82 81 78 83 88 87 83 78 98 85 97 98 89 88 75 76 86 74 81 70 76 86 84 99 100 89 94 72 84 82 88 83 89 78 99 87 76\\r\\n\", \"output\": [\"3030\"]}, {\"input\": \"100 100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"19700\"]}, {\"input\": \"100 100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"19696\"]}, {\"input\": \"100 100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 99\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 98 100 100 100 100 98 100 100 100 100 100 100 99 98 100 100 93 100 100 98 100 100 100 100 93 100 96 100 100 100 94 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 95 88 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n95 100 100 100 100 100 100 100 100 100 100 100 100 100 87 100 100 100 94 100 100 100 100 100 100 100 100 100 100 100 100 99 100 100 100 100 100 100 100 100 100 100 90 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 97 100 100 100 96 100 98 100 100 100 100 100 96 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 97 100 100 100 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 1\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 2\\r\\n2 1 1 2 1 1 1 1 2 2 2 2 1 1 1 2 1 1 1 2 2 2 2 1 1 1 1 2 2 2 1 2 2 2 2 1 2 2 1 1 1 1 1 1 2 2 1 2 1 1 1 2 1 2 2 2 2 1 1 1 2 2 1 2 1 1 1 2 1 2 2 1 1 1 2 2 1 1 2 1 1 2 1 1 1 2 1 1 1 1 2 1 1 1 1 2 1 2 1 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"3 5\\r\\n5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 7\\r\\n1 1 1 1 1 1 1\\r\\n\", \"output\": [\"77\"]}, {\"input\": \"1 1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 10\\r\\n10 10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10\\r\\n10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 1\\r\\n1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 10\\r\\n10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 4\\r\\n3 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 4\\r\\n4 4 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 2\\r\\n2 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n5 5 5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 3\\r\\n3 3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 9\\r\\n8 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 10\\r\\n9 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 10\\r\\n10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"23 14\\r\\n7 11 13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 10\\r\\n9 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 5\\r\\n5 5 5 5 5 5 5 5 5 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 5\\r\\n4 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 4\\r\\n4 4 4 4 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 10\\r\\n10 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 5\\r\\n3 5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 5\\r\\n5 5 5 5 5 5 5 5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 10\\r\\n10 10 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 1\\r\\n1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1\\r\\n1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 10\\r\\n9 10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 2\\r\\n2 2 2 2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 5\\r\\n4 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 10\\r\\n10 10 10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 6\\r\\n6 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 9\\r\\n9 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 10\\r\\n10 9 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 40\\r\\n39 40 40 40\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 4\\r\\n3 4 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 9\\r\\n9 9 9 9 9 9 9 9 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4\\r\\n4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 7\\r\\n1 1 1 1\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"1 5\\r\\n5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 1\\r\\n1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 7\\r\\n3 5\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3 6\\r\\n6 6 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 2\\r\\n1 2 2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 5\\r\\n4 5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n1 1 1 1 1\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"66 2\\r\\n1 2 2 2 2 1 1 2 1 2 2 2 2 2 2 1 2 1 2 1 2 1 2 1 2 1 1 1 1 2 2 1 2 2 1 1 2 1 2 2 1 1 1 2 1 2 1 2 1 2 1 2 2 2 2 1 2 2 1 2 1 1 1 2 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n5 5 5 4 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 7\\r\\n1 1 1\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"2 5\\r\\n5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 7\\r\\n1\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"6 7\\r\\n1 1 1 1 1 1\\r\\n\", \"output\": [\"66\"]}, {\"input\": \"99 97\\r\\n15 80 78 69 12 84 36 51 89 77 88 10 1 19 67 85 6 36 8 70 14 45 88 97 22 13 75 57 83 27 13 97 9 90 68 51 76 37 5 2 16 92 11 48 13 77 35 19 15 74 22 29 21 12 28 42 56 5 32 41 62 75 71 71 68 72 24 77 11 28 78 27 53 88 74 66 1 42 18 16 18 39 75 38 81 5 13 39 40 75 13 36 53 83 9 54 57 63 64\\r\\n\", \"output\": [\"10077\"]}, {\"input\": \"8 7\\r\\n1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"88\"]}, {\"input\": \"3 2\\r\\n2 2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 5\\r\\n5 5 5 5 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 5\\r\\n5 5 5 5 5 5 5 4 1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 5\\r\\n1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10 10\\r\\n10 10 10 10 10 10 10 10 10 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 3\\r\\n2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 9\\r\\n9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"74 2\\r\\n2 2 2 2 1 2 2 1 1 1 2 2 1 2 2 2 2 1 2 1 1 1 2 1 1 2 2 1 2 1 1 2 1 1 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 1 1 2 1 1 1 1 1 1 2 2 2 1 1 1 1 1 2 2 2 2 2 2 1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n5 5 5 5 4\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 10\\r\\n10 10 10 10 10\\r\\n', 'output': ['0']}, {'input': '100 100\\r\\n71 87 100 85 89 98 90 90 71 65 76 75 85 100 81 100 91 80 73 89 86 78 82 89 77 92 78 90 100 81 85 89 73 100 66 60 72 88 91 73 93 76 88 81 86 78 83 77 74 93 97 94 85 78 82 78 91 91 100 78 89 76 78 82 81 78 83 88 87 83 78 98 85 97 98 89 88 75 76 86 74 81 70 76 86 84 99 100 89 94 72 84 82 88 83 89 78 99 87 76\\r\\n', 'output': ['3030']}, {'input': '3 10\\r\\n10 9 10\\r\\n', 'output': ['0']}, {'input': '96 41\\r\\n13 32 27 34 28 34 30 26 21 24 29 20 25 34 25 16 27 15 22 22 34 22 25 19 23 17 17 22 26 24 23 20 21 27 19 33 13 24 22 18 30 30 27 14 26 24 20 20 22 11 19 31 19 29 18 28 30 22 17 15 28 32 17 24 17 24 24 19 26 23 22 29 18 22 23 29 19 32 26 23 22 22 24 23 27 30 24 25 21 21 33 19 35 27 34 28\\r\\n', 'output': ['3182']}, {'input': '100 100\\r\\n30 35 23 43 28 49 31 32 30 44 32 37 33 34 38 28 43 32 33 32 50 32 41 38 33 20 40 36 29 21 42 25 23 34 43 32 37 31 30 27 36 32 45 37 33 29 38 34 35 33 28 19 37 33 28 41 31 29 41 27 32 39 30 34 37 40 33 38 35 32 32 34 35 34 28 39 28 34 40 45 31 25 42 28 29 31 33 21 36 33 34 37 40 42 39 30 36 34 34 40\\r\\n', 'output': ['13118']}]","human_sample_testcases_2":"[{'input': '3 6\\r\\n6 6 6\\r\\n', 'output': ['0']}, {'input': '78 43\\r\\n2 7 6 5 5 6 4 5 3 4 6 8 4 5 5 4 3 1 2 4 4 6 5 6 4 4 6 4 8 4 6 5 6 1 4 5 6 3 2 5 2 5 3 4 8 8 3 3 4 4 6 6 5 4 5 5 7 9 3 9 6 4 7 3 6 9 6 5 1 7 2 5 6 3 6 2 5 4\\r\\n', 'output': ['5884']}, {'input': '12 50\\r\\n18 10 26 22 22 23 14 21 27 18 25 12\\r\\n', 'output': ['712']}, {'input': '99 39\\r\\n25 28 30 28 32 34 31 28 29 28 29 30 33 19 33 31 27 33 29 24 27 30 25 38 28 34 35 31 34 37 30 22 21 24 34 27 34 33 34 33 26 26 36 19 30 22 35 30 21 28 23 35 33 29 21 22 36 31 34 32 34 32 30 32 27 33 38 25 35 26 39 27 29 29 19 33 28 29 34 38 26 30 36 26 29 30 26 34 22 32 29 38 25 27 24 17 25 28 26\\r\\n', 'output': ['1807']}, {'input': '1 5\\r\\n1\\r\\n', 'output': ['7']}]","human_sample_testcases_3":"[{'input': '1 5\\r\\n1\\r\\n', 'output': ['7']}, {'input': '2 1\\r\\n1 1\\r\\n', 'output': ['0']}, {'input': '96 41\\r\\n13 32 27 34 28 34 30 26 21 24 29 20 25 34 25 16 27 15 22 22 34 22 25 19 23 17 17 22 26 24 23 20 21 27 19 33 13 24 22 18 30 30 27 14 26 24 20 20 22 11 19 31 19 29 18 28 30 22 17 15 28 32 17 24 17 24 24 19 26 23 22 29 18 22 23 29 19 32 26 23 22 22 24 23 27 30 24 25 21 21 33 19 35 27 34 28\\r\\n', 'output': ['3182']}, {'input': '2 3\\r\\n2 3\\r\\n', 'output': ['0']}, {'input': '4 40\\r\\n39 40 40 40\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '5 2\\r\\n2 2 2 2 2\\r\\n', 'output': ['0']}, {'input': '7 7\\r\\n1 1 1 1 1 1 1\\r\\n', 'output': ['77']}, {'input': '2 5\\r\\n5 5\\r\\n', 'output': ['0']}, {'input': '1 2\\r\\n2\\r\\n', 'output': ['0']}, {'input': '5 4\\r\\n4 4 4 4 4\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '100 1\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['0']}, {'input': '1 100\\r\\n100\\r\\n', 'output': ['0']}, {'input': '10 5\\r\\n5 5 5 5 5 5 5 4 1 1\\r\\n', 'output': ['8']}, {'input': '1 10\\r\\n10\\r\\n', 'output': ['0']}, {'input': '4 2\\r\\n1 2 2 2\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":125,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"12345\", \"09\"]","input_specification":"The first line contains nonempty sequence consisting of digits from 0 to 9 \u2014 Masha's phone number. The sequence length does not exceed 50.","src_uid":"2dd8bb6e8182278d037aa3a59ca3517b","source_code":" #include \n using namespace std;\n #define MX (int)1e6+1\n #define pb push_back\n #define ip pair\n #define ll long long\n #define INF 70\n const ll mod = 1e9 + 7;\n #define fastIO ios_base::sync_with_stdio(0);cin.tie(0);\n ll dp[55][10][10],n;\n string input;\n \n ll solver(int pos,int fav,int last){\n if(pos==n)return 1;\n \n ll &ret=dp[pos][fav][last];\n if(~ret)return ret;\n ret=0;\n if(pos==0){\n for(int i=0;i<=9;i++){\n ret+=solver(pos+1,i,i);\n }\n return ret;\n }\n \n int choice1=(input[pos]-'0'+last)\/2;\n int choice2=(input[pos]-'0'+last+1)\/2;\n ret+=solver(pos+1,fav,choice1);\n if(choice2!=choice1)ret+=solver(pos+1,fav,choice2);\n return ret;\n }\n \n int main()\n {fastIO\n memset(dp,-1, sizeof(dp));\n cin>>input;\n n=input.length();\n ll ans=solver(0,0,0);\n for(int i=1;i1)return cout<\nusing namespace std;\n#define mod 1000000007\n#define ll long long \n#define N 100005\n#define all(v) v.begin(),v.end()\n#define pii pair\n#define print(x) cout << #x << \"=\" << x << \"\\t\";\n \nll n;\nll k;\nll a;\nll b;\nll ma = -1e18;\nll mi = 1e18;\n \n\nint main() {\n ios::sync_with_stdio(false); cin.tie(NULL);\n \n cin >> n >> k >> a >> b;\n \n for(ll i=0;i<=n;i++) {\n ll l = i * k + b + a;\n if (l <= 0)\n continue;\n ll g = __gcd(n * k, l);\n ll lcm = n * k \/ g;\n ma = max(ma, lcm);\n mi = min(mi, lcm);\n }\n\n for(ll i=0;i<=n;i++) {\n ll l = (i + 1) * k - b + a;\n ll g = __gcd(n * k, l);\n ll lcm = n * k \/ g;\n ma = max(ma, lcm);\n mi = min(mi, lcm);\n }\n\n for(ll i=0;i<=n;i++) {\n ll l = (i + 1) * k - a + b;\n ll g = __gcd(n * k, l);\n ll lcm = n * k \/ g;\n ma = max(ma, lcm);\n mi = min(mi, lcm);\n }\n\n for(ll i=0;i<=n;i++) {\n ll l = (i + 2) * k - a - b;\n ll g = __gcd(n * k, l);\n ll lcm = n * k \/ g;\n ma = max(ma, lcm);\n mi = min(mi, lcm);\n }\n \n cout << mi << \" \" << ma;\n return 0;\n}","sample_outputs":"[\"1 6\", \"1 3\", \"5 5\"]","lang_cluster":"C++","notes":"NoteIn the first example the restaurants are located in the cities $$$1$$$ and $$$4$$$, the initial city $$$s$$$ could be $$$2$$$, $$$3$$$, $$$5$$$, or $$$6$$$. The next city Sergey stopped at could also be at cities $$$2, 3, 5, 6$$$. Let's loop through all possible combinations of these cities. If both $$$s$$$ and the city of the first stop are at the city $$$2$$$ (for example, $$$l = 6$$$), then Sergey is at $$$s$$$ after the first stop already, so $$$x = 1$$$. In other pairs Sergey needs $$$1, 2, 3$$$, or $$$6$$$ stops to return to $$$s$$$, so $$$y = 6$$$.In the second example Sergey was at cities with fast food restaurant both initially and after the first stop, so $$$l$$$ is $$$2$$$, $$$4$$$, or $$$6$$$. Thus $$$x = 1$$$, $$$y = 3$$$.In the third example there is only one restaurant, so the possible locations of $$$s$$$ and the first stop are: $$$(6, 8)$$$ and $$$(6, 4)$$$. For the first option $$$l = 2$$$, for the second $$$l = 8$$$. In both cases Sergey needs $$$x=y=5$$$ stops to go to $$$s$$$.","output_specification":"Print the two integers $$$x$$$ and $$$y$$$.","description":"Recently a Golden Circle of Beetlovers was found in Byteland. It is a circle route going through $$$n \\cdot k$$$ cities. The cities are numerated from $$$1$$$ to $$$n \\cdot k$$$, the distance between the neighboring cities is exactly $$$1$$$ km.Sergey does not like beetles, he loves burgers. Fortunately for him, there are $$$n$$$ fast food restaurants on the circle, they are located in the $$$1$$$-st, the $$$(k + 1)$$$-st, the $$$(2k + 1)$$$-st, and so on, the $$$((n-1)k + 1)$$$-st cities, i.e. the distance between the neighboring cities with fast food restaurants is $$$k$$$ km.Sergey began his journey at some city $$$s$$$ and traveled along the circle, making stops at cities each $$$l$$$ km ($$$l > 0$$$), until he stopped in $$$s$$$ once again. Sergey then forgot numbers $$$s$$$ and $$$l$$$, but he remembers that the distance from the city $$$s$$$ to the nearest fast food restaurant was $$$a$$$ km, and the distance from the city he stopped at after traveling the first $$$l$$$ km from $$$s$$$ to the nearest fast food restaurant was $$$b$$$ km. Sergey always traveled in the same direction along the circle, but when he calculated distances to the restaurants, he considered both directions.Now Sergey is interested in two integers. The first integer $$$x$$$ is the minimum number of stops (excluding the first) Sergey could have done before returning to $$$s$$$. The second integer $$$y$$$ is the maximum number of stops (excluding the first) Sergey could have done before returning to $$$s$$$.","human_testcases":"[{\"input\": \"2 3\\r\\n1 1\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"3 2\\r\\n0 0\\r\\n\", \"output\": [\"1 3\"]}, {\"input\": \"1 10\\r\\n5 3\\r\\n\", \"output\": [\"5 5\"]}, {\"input\": \"3 3\\r\\n1 0\\r\\n\", \"output\": [\"9 9\"]}, {\"input\": \"4 3\\r\\n1 1\\r\\n\", \"output\": [\"1 12\"]}, {\"input\": \"5 5\\r\\n2 2\\r\\n\", \"output\": [\"1 25\"]}, {\"input\": \"6 3\\r\\n1 1\\r\\n\", \"output\": [\"1 18\"]}, {\"input\": \"3 10\\r\\n1 3\\r\\n\", \"output\": [\"5 15\"]}, {\"input\": \"2 1\\r\\n0 0\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"1 100\\r\\n0 0\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"39 17\\r\\n8 5\\r\\n\", \"output\": [\"17 663\"]}, {\"input\": \"147 149\\r\\n74 33\\r\\n\", \"output\": [\"149 21903\"]}, {\"input\": \"100000 100\\r\\n21 29\\r\\n\", \"output\": [\"64 2500000\"]}, {\"input\": \"100000 100000\\r\\n50000 50000\\r\\n\", \"output\": [\"1 100000\"]}, {\"input\": \"16127 18181\\r\\n6581 2408\\r\\n\", \"output\": [\"18181 293204987\"]}, {\"input\": \"96557 28657\\r\\n2964 7036\\r\\n\", \"output\": [\"28657 2767033949\"]}, {\"input\": \"96557 4\\r\\n0 2\\r\\n\", \"output\": [\"2 193114\"]}, {\"input\": \"2 98763\\r\\n10021 19979\\r\\n\", \"output\": [\"32921 197526\"]}, {\"input\": \"10 99990\\r\\n3 7\\r\\n\", \"output\": [\"9999 499950\"]}, {\"input\": \"99999 23782\\r\\n0 0\\r\\n\", \"output\": [\"1 99999\"]}, {\"input\": \"14621 29242\\r\\n7 13\\r\\n\", \"output\": [\"213773641 213773641\"]}, {\"input\": \"23981 21841\\r\\n10376 10637\\r\\n\", \"output\": [\"21841 523769021\"]}, {\"input\": \"21013 45013\\r\\n693 307\\r\\n\", \"output\": [\"45013 945858169\"]}, {\"input\": \"36739 36739\\r\\n18369 18369\\r\\n\", \"output\": [\"1 1349754121\"]}, {\"input\": \"65536 32768\\r\\n6427 13573\\r\\n\", \"output\": [\"67108864 1073741824\"]}, {\"input\": \"99871 99877\\r\\n5273 34727\\r\\n\", \"output\": [\"99877 9974815867\"]}, {\"input\": \"99871 99873\\r\\n2979 17955\\r\\n\", \"output\": [\"11097 1108268487\"]}, {\"input\": \"99873 99876\\r\\n24862 13862\\r\\n\", \"output\": [\"1189 2493728937\"]}, {\"input\": \"99079 99053\\r\\n49479 49521\\r\\n\", \"output\": [\"99053 9814072187\"]}, {\"input\": \"95911 95917\\r\\n47946 47954\\r\\n\", \"output\": [\"95917 9199495387\"]}, {\"input\": \"89527 91159\\r\\n44571 44990\\r\\n\", \"output\": [\"91159 8161191793\"]}, {\"input\": \"98752 97209\\r\\n41218 39020\\r\\n\", \"output\": [\"21427641 3199861056\"]}, {\"input\": \"100000 100000\\r\\n10 1\\r\\n\", \"output\": [\"10000000000 10000000000\"]}, {\"input\": \"100000 100000\\r\\n0 1\\r\\n\", \"output\": [\"10000000000 10000000000\"]}, {\"input\": \"97979 85648\\r\\n41517 20663\\r\\n\", \"output\": [\"21412 4195852696\"]}, {\"input\": \"100000 99737\\r\\n34242 43667\\r\\n\", \"output\": [\"99737 9973700000\"]}, {\"input\": \"806 654\\r\\n118 76\\r\\n\", \"output\": [\"109 263562\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 3\\r\\n1 1\\r\\n', 'output': ['1 12']}, {'input': '36739 36739\\r\\n18369 18369\\r\\n', 'output': ['1 1349754121']}, {'input': '100000 100000\\r\\n0 1\\r\\n', 'output': ['10000000000 10000000000']}, {'input': '2 1\\r\\n0 0\\r\\n', 'output': ['1 2']}, {'input': '3 3\\r\\n1 0\\r\\n', 'output': ['9 9']}]","human_sample_testcases_2":"[{'input': '1 10\\r\\n5 3\\r\\n', 'output': ['5 5']}, {'input': '16127 18181\\r\\n6581 2408\\r\\n', 'output': ['18181 293204987']}, {'input': '1 100\\r\\n0 0\\r\\n', 'output': ['1 1']}, {'input': '3 10\\r\\n1 3\\r\\n', 'output': ['5 15']}, {'input': '99079 99053\\r\\n49479 49521\\r\\n', 'output': ['99053 9814072187']}]","human_sample_testcases_3":"[{'input': '3 2\\r\\n0 0\\r\\n', 'output': ['1 3']}, {'input': '89527 91159\\r\\n44571 44990\\r\\n', 'output': ['91159 8161191793']}, {'input': '98752 97209\\r\\n41218 39020\\r\\n', 'output': ['21427641 3199861056']}, {'input': '23981 21841\\r\\n10376 10637\\r\\n', 'output': ['21841 523769021']}, {'input': '3 10\\r\\n1 3\\r\\n', 'output': ['5 15']}]","human_sample_testcases_4":"[{'input': '4 3\\r\\n1 1\\r\\n', 'output': ['1 12']}, {'input': '95911 95917\\r\\n47946 47954\\r\\n', 'output': ['95917 9199495387']}, {'input': '3 2\\r\\n0 0\\r\\n', 'output': ['1 3']}, {'input': '96557 28657\\r\\n2964 7036\\r\\n', 'output': ['28657 2767033949']}, {'input': '99871 99877\\r\\n5273 34727\\r\\n', 'output': ['99877 9974815867']}]","human_sample_testcases_5":"[{'input': '99999 23782\\r\\n0 0\\r\\n', 'output': ['1 99999']}, {'input': '4 3\\r\\n1 1\\r\\n', 'output': ['1 12']}, {'input': '89527 91159\\r\\n44571 44990\\r\\n', 'output': ['91159 8161191793']}, {'input': '3 10\\r\\n1 3\\r\\n', 'output': ['5 15']}, {'input': '99873 99876\\r\\n24862 13862\\r\\n', 'output': ['1189 2493728937']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":127,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"9 9 5 5 2 1\", \"100 100 52 50 46 56\"]","input_specification":"The first line contains six integers n,\u2009m,\u2009x,\u2009y,\u2009a,\u2009b (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009109,\u20090\u2009\u2264\u2009x\u2009\u2264\u2009n,\u20090\u2009\u2264\u2009y\u2009\u2264\u2009m,\u20091\u2009\u2264\u2009a\u2009\u2264\u2009n,\u20091\u2009\u2264\u2009b\u2009\u2264\u2009m).","src_uid":"8f1211b995f35462ae83b2be27f54585","source_code":"#include \n#include \n#include \n#include \n#include \nusing namespace std;\n#define ll long long\nint n,m,x,y,a,b;\nint main()\n{\n \/\/ freopen(\"in.txt\",\"r\",stdin);\n cin>>n>>m>>x>>y>>a>>b;\n ll t=__gcd(a,b);\n a\/=t;\n b\/=t;\n ll lx,ly;\n lx=n\/a*a;\n ly=m\/b*b;\n if(lx*b>a*ly)\n {\n lx=ly\/b*a;\n }else ly=lx\/a*b;\n\/\/ cout<>1);\n ll y2=y+(ly>>1);\n ll x1=x2-lx;\n ll y1=y2-ly;\n ll mx=x1<0?-x1:x2>n?n-x2:0;\n ll my=y1<0?-y1:y2>m?m-y2:0;\n printf(\"%lld %lld %lld %lld\\n\",x1+mx,y1+my,x2+mx,y2+my);\n\/\/ mx=my=0;\n\/\/ prllf(\"%d %d %d %d\\n\",x1+mx,y1+my,x2+mx,y2+my);\n\n return 0;\n}\n","sample_outputs":"[\"1 3 9 7\", \"17 8 86 92\"]","lang_cluster":"C++","notes":null,"output_specification":"Print four integers x1,\u2009y1,\u2009x2,\u2009y2, which represent the founded sub-rectangle whose left-bottom point is (x1,\u2009y1) and right-up point is (x2,\u2009y2).","description":"You are given a rectangle grid. That grid's size is n\u2009\u00d7\u2009m. Let's denote the coordinate system on the grid. So, each point on the grid will have coordinates \u2014 a pair of integers (x,\u2009y) (0\u2009\u2264\u2009x\u2009\u2264\u2009n,\u20090\u2009\u2264\u2009y\u2009\u2264\u2009m).Your task is to find a maximum sub-rectangle on the grid (x1,\u2009y1,\u2009x2,\u2009y2) so that it contains the given point (x,\u2009y), and its length-width ratio is exactly (a,\u2009b). In other words the following conditions must hold: 0\u2009\u2264\u2009x1\u2009\u2264\u2009x\u2009\u2264\u2009x2\u2009\u2264\u2009n, 0\u2009\u2264\u2009y1\u2009\u2264\u2009y\u2009\u2264\u2009y2\u2009\u2264\u2009m, .The sides of this sub-rectangle should be parallel to the axes. And values x1,\u2009y1,\u2009x2,\u2009y2 should be integers. If there are multiple solutions, find the rectangle which is closest to (x,\u2009y). Here \"closest\" means the Euclid distance between (x,\u2009y) and the center of the rectangle is as small as possible. If there are still multiple solutions, find the lexicographically minimum one. Here \"lexicographically minimum\" means that we should consider the sub-rectangle as sequence of integers (x1,\u2009y1,\u2009x2,\u2009y2), so we can choose the lexicographically minimum one.","human_testcases":"[{\"input\": \"9 9 5 5 2 1\\r\\n\", \"output\": [\"1 3 9 7\"]}, {\"input\": \"100 100 52 50 46 56\\r\\n\", \"output\": [\"17 8 86 92\"]}, {\"input\": \"100 100 16 60 42 75\\r\\n\", \"output\": [\"0 0 56 100\"]}, {\"input\": \"100 100 28 22 47 50\\r\\n\", \"output\": [\"0 0 94 100\"]}, {\"input\": \"100 100 44 36 96 21\\r\\n\", \"output\": [\"0 25 96 46\"]}, {\"input\": \"100 100 56 46 1 47\\r\\n\", \"output\": [\"55 0 57 94\"]}, {\"input\": \"100 100 20 53 6 22\\r\\n\", \"output\": [\"6 1 33 100\"]}, {\"input\": \"100 100 32 63 2 41\\r\\n\", \"output\": [\"30 18 34 100\"]}, {\"input\": \"100 100 48 73 63 16\\r\\n\", \"output\": [\"16 65 79 81\"]}, {\"input\": \"100 100 13 59 14 20\\r\\n\", \"output\": [\"0 0 70 100\"]}, {\"input\": \"36830763 28058366 30827357 20792295 11047103 20670351\\r\\n\", \"output\": [\"25303805 7388015 36350908 28058366\"]}, {\"input\": \"87453374 60940601 74141787 32143714 78082907 33553425\\r\\n\", \"output\": [\"9370467 15367001 87453374 48920426\"]}, {\"input\": \"71265727 62692710 12444778 3479306 21442685 5463351\\r\\n\", \"output\": [\"0 0 64328055 16390053\"]}, {\"input\": \"48445042 43730155 14655564 6244917 43454856 2866363\\r\\n\", \"output\": [\"0 4811735 43454856 7678098\"]}, {\"input\": \"85759276 82316701 8242517 1957176 10225118 547026\\r\\n\", \"output\": [\"0 0 81800944 4376208\"]}, {\"input\": \"64748258 21983760 9107246 2437546 11247507 8924750\\r\\n\", \"output\": [\"0 0 22495014 17849500\"]}, {\"input\": \"6561833 24532010 2773123 457562 6225818 23724637\\r\\n\", \"output\": [\"0 0 6225818 23724637\"]}, {\"input\": \"33417574 19362112 17938303 4013355 10231192 2596692\\r\\n\", \"output\": [\"166200 0 33417574 8439249\"]}, {\"input\": \"98540143 28776614 12080542 1456439 96484500 3125739\\r\\n\", \"output\": [\"0 0 96484500 3125739\"]}, {\"input\": \"75549175 99860242 42423626 6574859 73199290 26030615\\r\\n\", \"output\": [\"2349885 0 75549175 26030615\"]}, {\"input\": \"4309493 76088457 2523467 46484812 909115 53662610\\r\\n\", \"output\": [\"1887086 960803 3159847 76088457\"]}, {\"input\": \"99373741 10548319 82293354 9865357 58059929 5328757\\r\\n\", \"output\": [\"41313812 5219562 99373741 10548319\"]}, {\"input\": \"81460 7041354 53032 1297536 41496 5748697\\r\\n\", \"output\": [\"27916 0 78148 6958949\"]}, {\"input\": \"5664399 63519726 1914884 13554302 2435218 44439020\\r\\n\", \"output\": [\"697275 0 3132493 44439020\"]}, {\"input\": \"19213492 76256257 10302871 19808004 19174729 55280126\\r\\n\", \"output\": [\"38763 0 19213492 55280126\"]}, {\"input\": \"61430678 95017800 11901852 27772249 25202227 87778634\\r\\n\", \"output\": [\"0 0 25202227 87778634\"]}, {\"input\": \"1063740 2675928 277215 2022291 204933 298547\\r\\n\", \"output\": [\"0 1183193 1024665 2675928\"]}, {\"input\": \"71580569 68590917 4383746 13851161 9868376 8579752\\r\\n\", \"output\": [\"0 0 71545726 62203202\"]}, {\"input\": \"17818532 82586436 8482338 54895799 12444902 11112345\\r\\n\", \"output\": [\"2259887 49339626 14704789 60451971\"]}, {\"input\": \"63651025 50179036 16141802 24793214 28944209 13993078\\r\\n\", \"output\": [\"0 10800136 57888418 38786292\"]}, {\"input\": \"11996821 42550832 8901163 19214381 3510233 20406511\\r\\n\", \"output\": [\"4976355 0 11996821 40813022\"]}, {\"input\": \"27048166 72584165 4785744 2001800 24615554 27645416\\r\\n\", \"output\": [\"0 0 24615554 27645416\"]}, {\"input\": \"47001271 53942737 7275347 1652337 33989593 48660013\\r\\n\", \"output\": [\"0 0 33989593 48660013\"]}, {\"input\": \"51396415 50182729 20810973 38206844 17823753 2905275\\r\\n\", \"output\": [\"0 34333144 47530008 42080544\"]}, {\"input\": \"27087649 52123970 20327636 19640608 8481031 14569965\\r\\n\", \"output\": [\"1644556 0 27087649 43709895\"]}, {\"input\": \"41635044 16614992 36335190 11150551 30440245 13728274\\r\\n\", \"output\": [\"11194799 2886718 41635044 16614992\"]}, {\"input\": \"97253692 35192249 21833856 26094161 41611668 32149284\\r\\n\", \"output\": [\"0 363858 45079307 35192249\"]}, {\"input\": \"60300478 3471217 11842517 3192374 27980820 507119\\r\\n\", \"output\": [\"0 2456979 55961640 3471217\"]}, {\"input\": \"69914272 30947694 58532705 25740028 30431847 27728130\\r\\n\", \"output\": [\"39482425 3219564 69914272 30947694\"]}, {\"input\": \"83973381 91192149 19059738 26429459 49573749 78006738\\r\\n\", \"output\": [\"0 0 49573749 78006738\"]}, {\"input\": \"1000000000 1000000000 286536427 579261823 230782719 575570138\\r\\n\", \"output\": [\"171145067 291476754 401927786 867046892\"]}, {\"input\": \"1000000000 1000000000 42362139 725664533 91213476 617352813\\r\\n\", \"output\": [\"0 176862916 121617968 1000000000\"]}, {\"input\": \"1000000000 1000000000 503220555 167034539 244352073 511651840\\r\\n\", \"output\": [\"276322201 0 730118908 950210560\"]}, {\"input\": \"1000000000 1000000000 259046267 313437250 252266478 848401810\\r\\n\", \"output\": [\"132913028 0 385179506 848401810\"]}, {\"input\": \"1000000000 1000000000 867388331 312356312 405405075 887925029\\r\\n\", \"output\": [\"594594925 0 1000000000 887925029\"]}, {\"input\": \"1000000000 1000000000 623214043 753726318 970868535 929707704\\r\\n\", \"output\": [\"29131465 70292296 1000000000 1000000000\"]}, {\"input\": \"1000000000 1000000000 84072459 754904836 124007132 824006731\\r\\n\", \"output\": [\"22068893 175993269 146076025 1000000000\"]}, {\"input\": \"1000000000 1000000000 839898171 196274842 131921537 865789406\\r\\n\", \"output\": [\"773937402 0 905858939 865789406\"]}, {\"input\": \"1000000000 1000000000 448240235 342677552 992352294 907572080\\r\\n\", \"output\": [\"0 0 992352294 907572080\"]}, {\"input\": \"1000000000 1000000000 837887296 643696230 478881476 45404539\\r\\n\", \"output\": [\"42237048 598291691 1000000000 689100769\"]}, {\"input\": \"1000000000 500 1000 400 11 122\\r\\n\", \"output\": [\"978 12 1022 500\"]}, {\"input\": \"1000000000 1000000000 1000000000 1000000000 1 1\\r\\n\", \"output\": [\"0 0 1000000000 1000000000\"]}, {\"input\": \"1000000000 1000000000 1000000000 1000000000 1000000000 1\\r\\n\", \"output\": [\"0 999999999 1000000000 1000000000\"]}, {\"input\": \"1000000000 999999999 1000 1000 1000000000 999999999\\r\\n\", \"output\": [\"0 0 1000000000 999999999\"]}, {\"input\": \"70 10 20 5 5 3\\r\\n\", \"output\": [\"12 0 27 9\"]}, {\"input\": \"1000000000 1000000000 500000000 500000000 500000000 500000001\\r\\n\", \"output\": [\"250000000 249999999 750000000 750000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4309493 76088457 2523467 46484812 909115 53662610\\r\\n', 'output': ['1887086 960803 3159847 76088457']}, {'input': '100 100 32 63 2 41\\r\\n', 'output': ['30 18 34 100']}, {'input': '27087649 52123970 20327636 19640608 8481031 14569965\\r\\n', 'output': ['1644556 0 27087649 43709895']}, {'input': '100 100 16 60 42 75\\r\\n', 'output': ['0 0 56 100']}, {'input': '87453374 60940601 74141787 32143714 78082907 33553425\\r\\n', 'output': ['9370467 15367001 87453374 48920426']}]","human_sample_testcases_2":"[{'input': '100 100 20 53 6 22\\r\\n', 'output': ['6 1 33 100']}, {'input': '81460 7041354 53032 1297536 41496 5748697\\r\\n', 'output': ['27916 0 78148 6958949']}, {'input': '1063740 2675928 277215 2022291 204933 298547\\r\\n', 'output': ['0 1183193 1024665 2675928']}, {'input': '27087649 52123970 20327636 19640608 8481031 14569965\\r\\n', 'output': ['1644556 0 27087649 43709895']}, {'input': '97253692 35192249 21833856 26094161 41611668 32149284\\r\\n', 'output': ['0 363858 45079307 35192249']}]","human_sample_testcases_3":"[{'input': '33417574 19362112 17938303 4013355 10231192 2596692\\r\\n', 'output': ['166200 0 33417574 8439249']}, {'input': '1000000000 1000000000 1000000000 1000000000 1000000000 1\\r\\n', 'output': ['0 999999999 1000000000 1000000000']}, {'input': '48445042 43730155 14655564 6244917 43454856 2866363\\r\\n', 'output': ['0 4811735 43454856 7678098']}, {'input': '100 100 13 59 14 20\\r\\n', 'output': ['0 0 70 100']}, {'input': '1000000000 1000000000 84072459 754904836 124007132 824006731\\r\\n', 'output': ['22068893 175993269 146076025 1000000000']}]","human_sample_testcases_4":"[{'input': '1000000000 1000000000 1000000000 1000000000 1 1\\r\\n', 'output': ['0 0 1000000000 1000000000']}, {'input': '100 100 28 22 47 50\\r\\n', 'output': ['0 0 94 100']}, {'input': '11996821 42550832 8901163 19214381 3510233 20406511\\r\\n', 'output': ['4976355 0 11996821 40813022']}, {'input': '33417574 19362112 17938303 4013355 10231192 2596692\\r\\n', 'output': ['166200 0 33417574 8439249']}, {'input': '1000000000 1000000000 837887296 643696230 478881476 45404539\\r\\n', 'output': ['42237048 598291691 1000000000 689100769']}]","human_sample_testcases_5":"[{'input': '1000000000 1000000000 867388331 312356312 405405075 887925029\\r\\n', 'output': ['594594925 0 1000000000 887925029']}, {'input': '48445042 43730155 14655564 6244917 43454856 2866363\\r\\n', 'output': ['0 4811735 43454856 7678098']}, {'input': '1000000000 1000000000 84072459 754904836 124007132 824006731\\r\\n', 'output': ['22068893 175993269 146076025 1000000000']}, {'input': '41635044 16614992 36335190 11150551 30440245 13728274\\r\\n', 'output': ['11194799 2886718 41635044 16614992']}, {'input': '100 100 44 36 96 21\\r\\n', 'output': ['0 25 96 46']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":100.0,"id":128,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"2 4 2\", \"6 13 1\", \"1 4 3\"]","input_specification":"A single line contains three space-separated integers a,\u2009b,\u2009k (1\u2009\u2264\u2009a,\u2009b,\u2009k\u2009\u2264\u2009106;\u00a0a\u2009\u2264\u2009b).","src_uid":"3e1751a2990134f2132d743afe02a10e","source_code":"#include \nusing namespace std;\nint a,b,k,q[1000006];\nbool pr[1000006];\nint main (){\n cin >> a >> b >> k;\n pr[1] = 1;\n for (int i = 2; i*i <= b; i++){\n if (pr[i] == 0){\n for(int j = i*i; j <= b; j+=i)\n pr[j] = 1;\n }\n }\n \n for (int i = 1; i <= b; i++){\n q[i]+=q[i - 1];\n if (pr[i] == 0) q[i]++;\n }\n \n int x = k,l,y = b - a + 1,ans = -1;\n if (x > y) {cout<<-1; return 0;}\n while (x < y){\n l = (x + y) >> 1;\n int w = 0;\n for (int i = a; i <= b - l + 1; i++)\n if (q[i + l - 1] - q[i - 1] < k) {w = -1; break;}\n \n if (w == 0) {y = l; ans = l;}\n else x = l + 1;\n }\n \n l = x;\n int w = 0;\n for (int i = a; i <= b - l + 1; i++)\n if (q[i + l - 1] - q[i - 1] < k) {w = -1; break;}\n if (w == 0) ans = l;\n \n cout<\nusing namespace std;\nconst int maxn=1005;\nconst int maxd=11;\nlong long n,d,mod,dp[maxn][maxd],pd[maxn][maxd],f,t[maxd];\ninline long long ksm(long long x,long long n) {\n long long ret=1;\n while (n) {\n if (n&1)\n ret=ret*x%mod;\n n>>=1;\n x=x*x%mod;\n }\n return ret;\n}\ninline long long solve() {\n dp[1][0]=1;\n for (int i=1;i<=n\/2;++i) {\/\/if (i%(d-1)==0) {\n f=(i==1)?1:dp[i][d-1];\n for (int j=1;j<=n;++j)\n for (int k=0;k<=d;++k)\n pd[j][k]=0;\n t[0]=1;\n for (int j=1;j<=d;++j)\n t[j]=t[j-1]*(f+j-1)%mod*ksm(j,mod-2)%mod;\n for (int j=0;j<=d;++j)\n for (int k=0;k<=d;++k) if (j+k<=d)\n for (int l=1;l<=n;++l) if (l+i*k<=n)\n pd[l+i*k][j+k]=(pd[l+i*k][j+k]+dp[l][j]*t[k])%mod;\n for (int j=0;j<=n;++j)\n for (int k=0;k<=d;++k)\n \/\/if (pd[j][k])\n dp[j][k]=pd[j][k];\n }\n long long ret=dp[n][d];\n if (n%2==0)\n ret=((ret-dp[n\/2][d-1]*(dp[n\/2][d-1]-1)\/2)%mod+mod)%mod;\n return ret;\n}\nint main()\n{\n scanf(\"%I64d%I64d%I64d\",&n,&d,&mod);\n if (n<=2)\n puts(\"1\");\n else\n printf(\"%I64d\\n\",solve());\n return 0;\n}\n","sample_outputs":"[\"1\", \"2\", \"910726\"]","lang_cluster":"C++","notes":null,"output_specification":"Print the number of trees over the modulo mod.","description":"A tree is a connected graph without cycles.Two trees, consisting of n vertices each, are called isomorphic if there exists a permutation p:\u2009{1,\u2009...,\u2009n}\u2009\u2192\u2009{1,\u2009...,\u2009n} such that the edge (u,\u2009v) is present in the first tree if and only if the edge (pu,\u2009pv) is present in the second tree.Vertex of the tree is called internal if its degree is greater than or equal to two.Count the number of different non-isomorphic trees, consisting of n vertices, such that the degree of each internal vertex is exactly d. Print the answer over the given prime modulo mod.","human_testcases":"[{\"input\": \"5 2 433416647\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 3 409693891\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"65 4 177545087\\r\\n\", \"output\": [\"910726\"]}, {\"input\": \"2 2 434448163\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 434448163\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 4 434448163\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 5 434448163\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"180 3 434448163\\r\\n\", \"output\": [\"106622108\"]}, {\"input\": \"104 7 434448163\\r\\n\", \"output\": [\"47207\"]}, {\"input\": \"106 9 434448163\\r\\n\", \"output\": [\"1296\"]}, {\"input\": \"1 4 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 6 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 7 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 8 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"102 4 904448911\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 9 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 10 904448911\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 2 944036243\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"101 4 944036243\\r\\n\", \"output\": [\"467334192\"]}, {\"input\": \"102 5 944036243\\r\\n\", \"output\": [\"74266477\"]}, {\"input\": \"102 6 944036243\\r\\n\", \"output\": [\"748711\"]}, {\"input\": \"100 8 944036243\\r\\n\", \"output\": [\"3128\"]}, {\"input\": \"101 10 944036243\\r\\n\", \"output\": [\"235\"]}, {\"input\": \"1 2 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 5 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 6 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 7 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 8 727733989\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 9 837744727\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 10 837744727\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999 3 837744727\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 5 970400047\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 6 970400047\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 7 970400047\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 8 750160753\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 9 750160753\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 10 750160753\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 2 750160753\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000 3 750160753\\r\\n\", \"output\": [\"16572167\"]}, {\"input\": \"998 4 817408561\\r\\n\", \"output\": [\"443073705\"]}, {\"input\": \"998 5 680633279\\r\\n\", \"output\": [\"233182629\"]}, {\"input\": \"997 6 680633279\\r\\n\", \"output\": [\"148277591\"]}, {\"input\": \"998 7 930423869\\r\\n\", \"output\": [\"167343048\"]}, {\"input\": \"996 8 990767311\\r\\n\", \"output\": [\"350615945\"]}, {\"input\": \"994 9 390528763\\r\\n\", \"output\": [\"211625777\"]}, {\"input\": \"992 10 762763321\\r\\n\", \"output\": [\"571064998\"]}, {\"input\": \"983 10 762763321\\r\\n\", \"output\": [\"663665406\"]}, {\"input\": \"989 8 990767311\\r\\n\", \"output\": [\"976760285\"]}, {\"input\": \"992 6 680633279\\r\\n\", \"output\": [\"451750559\"]}, {\"input\": \"995 4 817408561\\r\\n\", \"output\": [\"36421881\"]}, {\"input\": \"999 2 750160753\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 2 433416647\\r\\n', 'output': ['1']}, {'input': '104 7 434448163\\r\\n', 'output': ['47207']}, {'input': '996 8 990767311\\r\\n', 'output': ['350615945']}, {'input': '1 2 727733989\\r\\n', 'output': ['1']}, {'input': '995 4 817408561\\r\\n', 'output': ['36421881']}]","human_sample_testcases_2":"[{'input': '1 4 904448911\\r\\n', 'output': ['1']}, {'input': '1000 3 750160753\\r\\n', 'output': ['16572167']}, {'input': '1000 2 750160753\\r\\n', 'output': ['1']}, {'input': '106 9 434448163\\r\\n', 'output': ['1296']}, {'input': '999 2 750160753\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '999 2 750160753\\r\\n', 'output': ['1']}, {'input': '65 4 177545087\\r\\n', 'output': ['910726']}, {'input': '102 4 904448911\\r\\n', 'output': ['0']}, {'input': '5 2 433416647\\r\\n', 'output': ['1']}, {'input': '2 2 434448163\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '1000 5 970400047\\r\\n', 'output': ['0']}, {'input': '1 8 727733989\\r\\n', 'output': ['1']}, {'input': '998 5 680633279\\r\\n', 'output': ['233182629']}, {'input': '989 8 990767311\\r\\n', 'output': ['976760285']}, {'input': '180 3 434448163\\r\\n', 'output': ['106622108']}]","human_sample_testcases_5":"[{'input': '992 10 762763321\\r\\n', 'output': ['571064998']}, {'input': '1 3 727733989\\r\\n', 'output': ['1']}, {'input': '1000 3 750160753\\r\\n', 'output': ['16572167']}, {'input': '102 6 944036243\\r\\n', 'output': ['748711']}, {'input': '2 3 434448163\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":96.88,"id":130,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":99.376} {"sample_inputs":"[\"5 11\", \"6 16\"]","input_specification":"The only line of the input contains two integers $$$n$$$ and $$$S$$$ ($$$1 \\le n \\le 100\\,000$$$, $$$1 \\le S \\le 10^9$$$)","src_uid":"04c067326ec897091c3dbcf4d134df96","source_code":"#include \n#include \n#include \n#define il inline\n#define vd void\n#define rep(i,x,y) for(register int i=x;i<=y;++i)\n#define drp(i,x,y) for(register int i=x;i>=y;--i)\nusing namespace std;\nconst int Len=2333333;\nchar buf[Len],*p1=buf,*p2=buf,duf[Len],*q1=duf;\nil char gc(); il int rd(); il vd pc(char c); il vd rt(int x); il vd flush();\nint n,s;\nint main(){\/\/sjn AK IOI\n\tcin>>n>>s;\n\tint ans=s\/n;\n\tif(s%n) ++ans;\n\tcout<=10?rt(x\/10),x%10:x)+48);}\nil vd flush(){fwrite(duf,1,q1-duf,stdout);}","sample_outputs":"[\"3\", \"3\"]","lang_cluster":"C++","notes":"NoteIn the first example, some of the possible ways to get sum $$$11$$$ with $$$3$$$ coins are: $$$(3, 4, 4)$$$ $$$(2, 4, 5)$$$ $$$(1, 5, 5)$$$ $$$(3, 3, 5)$$$ It is impossible to get sum $$$11$$$ with less than $$$3$$$ coins.In the second example, some of the possible ways to get sum $$$16$$$ with $$$3$$$ coins are: $$$(5, 5, 6)$$$ $$$(4, 6, 6)$$$ It is impossible to get sum $$$16$$$ with less than $$$3$$$ coins.","output_specification":"Print exactly one integer\u00a0\u2014 the minimum number of coins required to obtain sum $$$S$$$.","description":"You have unlimited number of coins with values $$$1, 2, \\ldots, n$$$. You want to select some set of coins having the total value of $$$S$$$. It is allowed to have multiple coins with the same value in the set. What is the minimum number of coins required to get sum $$$S$$$?","human_testcases":"[{\"input\": \"5 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6 16\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"14 28\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 29\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 24\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 30\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"14969 66991573\\r\\n\", \"output\": [\"4476\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 46\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"11 35\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"12 45\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"15 34\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"31859 629091638\\r\\n\", \"output\": [\"19747\"]}, {\"input\": \"15666 689919612\\r\\n\", \"output\": [\"44040\"]}, {\"input\": \"90681 254480989\\r\\n\", \"output\": [\"2807\"]}, {\"input\": \"69018 523197828\\r\\n\", \"output\": [\"7581\"]}, {\"input\": \"1352 434805201\\r\\n\", \"output\": [\"321602\"]}, {\"input\": \"73439 384841883\\r\\n\", \"output\": [\"5241\"]}, {\"input\": \"42482 352232377\\r\\n\", \"output\": [\"8292\"]}, {\"input\": \"57862 374476819\\r\\n\", \"output\": [\"6472\"]}, {\"input\": \"41711 440229650\\r\\n\", \"output\": [\"10555\"]}, {\"input\": \"46602 894472145\\r\\n\", \"output\": [\"19194\"]}, {\"input\": \"47832 942980453\\r\\n\", \"output\": [\"19715\"]}, {\"input\": \"22951 747845288\\r\\n\", \"output\": [\"32585\"]}, {\"input\": \"76998 722886555\\r\\n\", \"output\": [\"9389\"]}, {\"input\": \"68666 512525633\\r\\n\", \"output\": [\"7465\"]}, {\"input\": \"66269 356663481\\r\\n\", \"output\": [\"5383\"]}, {\"input\": \"56624 922065652\\r\\n\", \"output\": [\"16285\"]}, {\"input\": \"31618 26008350\\r\\n\", \"output\": [\"823\"]}, {\"input\": \"90952 904040054\\r\\n\", \"output\": [\"9940\"]}, {\"input\": \"49630 947487392\\r\\n\", \"output\": [\"19092\"]}, {\"input\": \"45084 431878651\\r\\n\", \"output\": [\"9580\"]}, {\"input\": \"7156 806580442\\r\\n\", \"output\": [\"112714\"]}, {\"input\": \"2 193379347\\r\\n\", \"output\": [\"96689674\"]}, {\"input\": \"6 823813339\\r\\n\", \"output\": [\"137302224\"]}, {\"input\": \"5 939845324\\r\\n\", \"output\": [\"187969065\"]}, {\"input\": \"7 236413222\\r\\n\", \"output\": [\"33773318\"]}, {\"input\": \"10 695784696\\r\\n\", \"output\": [\"69578470\"]}, {\"input\": \"3 877026418\\r\\n\", \"output\": [\"292342140\"]}, {\"input\": \"8 550991517\\r\\n\", \"output\": [\"68873940\"]}, {\"input\": \"6 899779610\\r\\n\", \"output\": [\"149963269\"]}, {\"input\": \"12 394018478\\r\\n\", \"output\": [\"32834874\"]}, {\"input\": \"66 63576176\\r\\n\", \"output\": [\"963276\"]}, {\"input\": \"66 982670621\\r\\n\", \"output\": [\"14888949\"]}, {\"input\": \"8 750191967\\r\\n\", \"output\": [\"93773996\"]}, {\"input\": \"10 349992600\\r\\n\", \"output\": [\"34999260\"]}, {\"input\": \"65 281828001\\r\\n\", \"output\": [\"4335816\"]}, {\"input\": \"53 468285594\\r\\n\", \"output\": [\"8835578\"]}, {\"input\": \"83 361125900\\r\\n\", \"output\": [\"4350915\"]}, {\"input\": \"15 191203328\\r\\n\", \"output\": [\"12746889\"]}, {\"input\": \"100000 1000000000\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"2 999999999\\r\\n\", \"output\": [\"500000000\"]}, {\"input\": \"2 1000000000\\r\\n\", \"output\": [\"500000000\"]}, {\"input\": \"4821 917142246\\r\\n\", \"output\": [\"190240\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 11\\r\\n', 'output': ['3']}, {'input': '2 999999999\\r\\n', 'output': ['500000000']}, {'input': '11 35\\r\\n', 'output': ['4']}, {'input': '47832 942980453\\r\\n', 'output': ['19715']}, {'input': '12 45\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '4821 917142246\\r\\n', 'output': ['190240']}, {'input': '12 394018478\\r\\n', 'output': ['32834874']}, {'input': '90952 904040054\\r\\n', 'output': ['9940']}, {'input': '1 1000000000\\r\\n', 'output': ['1000000000']}, {'input': '66269 356663481\\r\\n', 'output': ['5383']}]","human_sample_testcases_3":"[{'input': '73439 384841883\\r\\n', 'output': ['5241']}, {'input': '2 999999999\\r\\n', 'output': ['500000000']}, {'input': '7 236413222\\r\\n', 'output': ['33773318']}, {'input': '45084 431878651\\r\\n', 'output': ['9580']}, {'input': '6 16\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '1 1000000000\\r\\n', 'output': ['1000000000']}, {'input': '45084 431878651\\r\\n', 'output': ['9580']}, {'input': '8 750191967\\r\\n', 'output': ['93773996']}, {'input': '5 11\\r\\n', 'output': ['3']}, {'input': '10 46\\r\\n', 'output': ['5']}]","human_sample_testcases_5":"[{'input': '3 877026418\\r\\n', 'output': ['292342140']}, {'input': '83 361125900\\r\\n', 'output': ['4350915']}, {'input': '8 750191967\\r\\n', 'output': ['93773996']}, {'input': '45084 431878651\\r\\n', 'output': ['9580']}, {'input': '8 550991517\\r\\n', 'output': ['68873940']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":50.0,"id":131,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":70.0} {"sample_inputs":"[\"1 3\", \"3 2\", \"5 0\"]","input_specification":"The first line of the input contains two space-separated integers n and m (0\u2009\u2264\u2009n,\u2009m\u2009\u2264\u20091\u2009000\u2009000, n\u2009+\u2009m\u2009>\u20090)\u00a0\u2014 the number of students using two-block pieces and the number of students using three-block pieces, respectively.","src_uid":"23f2c8cac07403899199abdcfd947a5a","source_code":"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#define sqr(x) (x)*(x)\n#define fi first\n#define se second\n#define ONLINE_JUDGE\nusing namespace std;\ntypedef long long ll;\nconst int mod=int(1e9+7);\nint n,m;\nint main(){\n #ifndef ONLINE_JUDGE\n freopen(\"input.txt\",\"r\",stdin);\n freopen(\"output.txt\",\"w\",stdout);\n #endif \/\/ONLINE_JUDGE\n scanf(\"%d%d\",&n,&m);\n\n for (int i=0; ; i++){\n if (i\/2>=n && i\/3>=m && i\/2+i\/3-i\/6>=n+m){\n printf(\"%d\",i);\n break;\n }\n }\n\n #ifndef ONLINE_JUDGE\n fclose(stdin);\n fclose(stdout);\n #endif \/\/ ONLINE_JUDGE\n return 0;\n}\n","sample_outputs":"[\"9\", \"8\", \"10\"]","lang_cluster":"C++","notes":"NoteIn the first case, the student using two-block pieces can make a tower of height 4, and the students using three-block pieces can make towers of height 3, 6, and 9 blocks. The tallest tower has a height of 9 blocks.In the second case, the students can make towers of heights 2, 4, and 8 with two-block pieces and towers of heights 3 and 6 with three-block pieces, for a maximum height of 8 blocks.","output_specification":"Print a single integer, denoting the minimum possible height of the tallest tower.","description":"Students in a class are making towers of blocks. Each student makes a (non-zero) tower by stacking pieces lengthwise on top of each other. n of the students use pieces made of two blocks and m of the students use pieces made of three blocks.The students don\u2019t want to use too many blocks, but they also want to be unique, so no two students\u2019 towers may contain the same number of blocks. Find the minimum height necessary for the tallest of the students' towers.","human_testcases":"[{\"input\": \"1 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 0\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"0 1000000\\r\\n\", \"output\": [\"3000000\"]}, {\"input\": \"1000000 1\\r\\n\", \"output\": [\"2000000\"]}, {\"input\": \"1083 724\\r\\n\", \"output\": [\"2710\"]}, {\"input\": \"1184 868\\r\\n\", \"output\": [\"3078\"]}, {\"input\": \"1285 877\\r\\n\", \"output\": [\"3243\"]}, {\"input\": \"820189 548173\\r\\n\", \"output\": [\"2052543\"]}, {\"input\": \"968867 651952\\r\\n\", \"output\": [\"2431228\"]}, {\"input\": \"817544 553980\\r\\n\", \"output\": [\"2057286\"]}, {\"input\": \"813242 543613\\r\\n\", \"output\": [\"2035282\"]}, {\"input\": \"961920 647392\\r\\n\", \"output\": [\"2413968\"]}, {\"input\": \"825496 807050\\r\\n\", \"output\": [\"2448819\"]}, {\"input\": \"974174 827926\\r\\n\", \"output\": [\"2703150\"]}, {\"input\": \"969872 899794\\r\\n\", \"output\": [\"2804499\"]}, {\"input\": \"818549 720669\\r\\n\", \"output\": [\"2308827\"]}, {\"input\": \"967227 894524\\r\\n\", \"output\": [\"2792626\"]}, {\"input\": \"185253 152723\\r\\n\", \"output\": [\"506964\"]}, {\"input\": \"195173 150801\\r\\n\", \"output\": [\"518961\"]}, {\"input\": \"129439 98443\\r\\n\", \"output\": [\"341823\"]}, {\"input\": \"163706 157895\\r\\n\", \"output\": [\"482402\"]}, {\"input\": \"197973 140806\\r\\n\", \"output\": [\"508168\"]}, {\"input\": \"1000000 1000000\\r\\n\", \"output\": [\"3000000\"]}, {\"input\": \"1000000 999999\\r\\n\", \"output\": [\"2999998\"]}, {\"input\": \"999999 1000000\\r\\n\", \"output\": [\"3000000\"]}, {\"input\": \"500000 500100\\r\\n\", \"output\": [\"1500300\"]}, {\"input\": \"500000 166000\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"500000 499000\\r\\n\", \"output\": [\"1498500\"]}, {\"input\": \"500000 167000\\r\\n\", \"output\": [\"1000500\"]}, {\"input\": \"1 1000000\\r\\n\", \"output\": [\"3000000\"]}, {\"input\": \"2 999123\\r\\n\", \"output\": [\"2997369\"]}, {\"input\": \"10 988723\\r\\n\", \"output\": [\"2966169\"]}, {\"input\": \"234 298374\\r\\n\", \"output\": [\"895122\"]}, {\"input\": \"2365 981235\\r\\n\", \"output\": [\"2943705\"]}, {\"input\": \"12345 981732\\r\\n\", \"output\": [\"2945196\"]}, {\"input\": \"108752 129872\\r\\n\", \"output\": [\"389616\"]}, {\"input\": \"984327 24352\\r\\n\", \"output\": [\"1968654\"]}, {\"input\": \"928375 1253\\r\\n\", \"output\": [\"1856750\"]}, {\"input\": \"918273 219\\r\\n\", \"output\": [\"1836546\"]}, {\"input\": \"987521 53\\r\\n\", \"output\": [\"1975042\"]}, {\"input\": \"123456 1\\r\\n\", \"output\": [\"246912\"]}, {\"input\": \"789123 0\\r\\n\", \"output\": [\"1578246\"]}, {\"input\": \"143568 628524\\r\\n\", \"output\": [\"1885572\"]}, {\"input\": \"175983 870607\\r\\n\", \"output\": [\"2611821\"]}, {\"input\": \"6 4\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"6 3\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"7 3\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"8 5\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"19170 15725\\r\\n\", \"output\": [\"52342\"]}, {\"input\": \"3000 2000\\r\\n\", \"output\": [\"7500\"]}, {\"input\": \"7 4\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"50 30\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"300 200\\r\\n\", \"output\": [\"750\"]}, {\"input\": \"9 4\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"4 3\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 6\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"10 6\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"65 56\\r\\n\", \"output\": [\"182\"]}, {\"input\": \"13 10\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"14 42\\r\\n\", \"output\": [\"126\"]}, {\"input\": \"651 420\\r\\n\", \"output\": [\"1606\"]}, {\"input\": \"8 9\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"15 10\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"999999 888888\\r\\n\", \"output\": [\"2833330\"]}, {\"input\": \"192056 131545\\r\\n\", \"output\": [\"485402\"]}, {\"input\": \"32 16\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"18 12\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"1000000 666667\\r\\n\", \"output\": [\"2500000\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9 5\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"1515 1415\\r\\n\", \"output\": [\"4395\"]}, {\"input\": \"300000 200000\\r\\n\", \"output\": [\"750000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '500000 499000\\r\\n', 'output': ['1498500']}, {'input': '3 2\\r\\n', 'output': ['8']}, {'input': '999999 1000000\\r\\n', 'output': ['3000000']}, {'input': '300000 200000\\r\\n', 'output': ['750000']}, {'input': '651 420\\r\\n', 'output': ['1606']}]","human_sample_testcases_2":"[{'input': '300000 200000\\r\\n', 'output': ['750000']}, {'input': '10 988723\\r\\n', 'output': ['2966169']}, {'input': '14 42\\r\\n', 'output': ['126']}, {'input': '10 6\\r\\n', 'output': ['24']}, {'input': '918273 219\\r\\n', 'output': ['1836546']}]","human_sample_testcases_3":"[{'input': '163706 157895\\r\\n', 'output': ['482402']}, {'input': '32 16\\r\\n', 'output': ['72']}, {'input': '500000 167000\\r\\n', 'output': ['1000500']}, {'input': '974174 827926\\r\\n', 'output': ['2703150']}, {'input': '967227 894524\\r\\n', 'output': ['2792626']}]","human_sample_testcases_4":"[{'input': '15 10\\r\\n', 'output': ['38']}, {'input': '7 4\\r\\n', 'output': ['16']}, {'input': '300000 200000\\r\\n', 'output': ['750000']}, {'input': '1000000 666667\\r\\n', 'output': ['2500000']}, {'input': '0 1000000\\r\\n', 'output': ['3000000']}]","human_sample_testcases_5":"[{'input': '10 6\\r\\n', 'output': ['24']}, {'input': '4 3\\r\\n', 'output': ['10']}, {'input': '961920 647392\\r\\n', 'output': ['2413968']}, {'input': '651 420\\r\\n', 'output': ['1606']}, {'input': '4 2\\r\\n', 'output': ['9']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":132,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3000\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"8551308e5ff435e0fc507b89a912408a","source_code":"#include\nusing namespace std ;\nlong long n, ans ;\n\nint main()\n{\n cin >> n ;\n if(2520 > n) cout << 0 << endl;\n else\n {\n cout << n \/ 2520 << endl;\n }\n}\n","sample_outputs":"[\"1\"]","lang_cluster":"C++","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.","description":"IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is divisible by all numbers from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"3000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2520\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"124666\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"285032471610732\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"396825396825396\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"391926317950225\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"1440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2521\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '504000000000000000\\r\\n', 'output': ['200000000000000']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}]","human_sample_testcases_2":"[{'input': '2519\\r\\n', 'output': ['0']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2521\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '3000\\r\\n', 'output': ['1']}, {'input': '2520\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '314159265\\r\\n', 'output': ['124666']}]","human_sample_testcases_4":"[{'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2520\\r\\n', 'output': ['1']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '2519\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '2520\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":50.0,"id":133,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"2 4\", \"0 10\", \"107 109\"]","input_specification":"The first and only line of input contains two space-separated integers a and b (0\u2009\u2264\u2009a\u2009\u2264\u2009b\u2009\u2264\u20091018).","src_uid":"2ed5a7a6176ed9b0bda1de21aad13d60","source_code":"#include \n\nusing namespace std ;\ntypedef long long ll;\n\nll a, b, ans;\n\nint main () {\n cin >> a >> b;\n if(a == b) {\n cout << 1;\n return 0;\n }\n long long x = b - a;\n \/\/cout << x << '\\n';\n if (x >= 5){\n cout << 0;\n return 0;\n }\n if (x == 1){\n cout << b % 10;\n return 0;\n }\n ans = 1;\n for (long long i = a + 1; i <= b; ++i){\n ans *= i;\n ans %= 10;\n }\n cout << ans % 10;\n return 0;\n}\n\/*\n998244355 998244359\n*\/\n","sample_outputs":"[\"2\", \"0\", \"2\"]","lang_cluster":"C++","notes":"NoteIn the first example, the last digit of is 2;In the second example, the last digit of is 0;In the third example, the last digit of is 2.","output_specification":"Output one line containing a single decimal digit\u00a0\u2014 the last digit of the value that interests Koyomi.","description":"Even if the world is full of counterfeits, I still regard it as wonderful.Pile up herbs and incense, and arise again from the flames and ashes of its predecessor\u00a0\u2014 as is known to many, the phoenix does it like this.The phoenix has a rather long lifespan, and reincarnates itself once every a! years. Here a! denotes the factorial of integer a, that is, a!\u2009=\u20091\u2009\u00d7\u20092\u2009\u00d7\u2009...\u2009\u00d7\u2009a. Specifically, 0!\u2009=\u20091.Koyomi doesn't care much about this, but before he gets into another mess with oddities, he is interested in the number of times the phoenix will reincarnate in a timespan of b! years, that is, . Note that when b\u2009\u2265\u2009a this value is always integer.As the answer can be quite large, it would be enough for Koyomi just to know the last digit of the answer in decimal representation. And you're here to provide Koyomi with this knowledge.","human_testcases":"[{\"input\": \"2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"107 109\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 13\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"998244355 998244359\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999999999000000000 1000000000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 15\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24 26\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"14 60\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 79\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1230 1232\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2633 2634\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"535 536\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"344319135 396746843\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"696667767 696667767\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"419530302 610096911\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"238965115 821731161\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"414626436 728903812\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"274410639 293308324\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"650636673091305697 650636673091305702\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"651240548333620923 651240548333620924\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"500000000000000000 1000000000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999999999999999 1000000000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000000000 1000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"50000000062000007 50000000062000011\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10000000000012 10000000000015\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12 23\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11111234567890 11111234567898\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999999999997 999999999999999999\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"101 1002\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 100000000000000001\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99999999999999997 99999999999999999\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"14 15\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 19\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12 22\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999999999996 999999999999999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"124 125\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"11 32\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 999999\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"151151151515 151151151526\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 107\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 16\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 16\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 19\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11113111111111 13111111111111\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24 25\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"0 100000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 22\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999999999999996 999999999999999999\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '101 1002\\r\\n', 'output': ['0']}, {'input': '6 107\\r\\n', 'output': ['0']}, {'input': '1 3\\r\\n', 'output': ['6']}, {'input': '11111234567890 11111234567898\\r\\n', 'output': ['0']}, {'input': '1 2\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '1 22\\r\\n', 'output': ['0']}, {'input': '124 125\\r\\n', 'output': ['5']}, {'input': '535 536\\r\\n', 'output': ['6']}, {'input': '999999999999999999 1000000000000000000\\r\\n', 'output': ['0']}, {'input': '10 13\\r\\n', 'output': ['6']}]","human_sample_testcases_3":"[{'input': '0 999999\\r\\n', 'output': ['0']}, {'input': '6 19\\r\\n', 'output': ['0']}, {'input': '0 2\\r\\n', 'output': ['2']}, {'input': '999999999999999997 999999999999999999\\r\\n', 'output': ['2']}, {'input': '50000000062000007 50000000062000011\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '0 2\\r\\n', 'output': ['2']}, {'input': '124 125\\r\\n', 'output': ['5']}, {'input': '50000000062000007 50000000062000011\\r\\n', 'output': ['0']}, {'input': '6 107\\r\\n', 'output': ['0']}, {'input': '1 1000\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '1000000000000000000 1000000000000000000\\r\\n', 'output': ['1']}, {'input': '0 2\\r\\n', 'output': ['2']}, {'input': '124 125\\r\\n', 'output': ['5']}, {'input': '2 3\\r\\n', 'output': ['3']}, {'input': '1 22\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.89,"human_sample_line_coverage_2":88.89,"human_sample_line_coverage_3":77.78,"human_sample_line_coverage_4":88.89,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":100.0,"id":134,"human_sample_pass_rate":100.0,"human_sample_line_coverage":88.89,"human_sample_branch_coverage":87.5} {"sample_inputs":"[\"3 2 1\", \"4 2 2\", \"3 2 2\"]","input_specification":"The single line of the input contains integers n, w and b (3\u2009\u2264\u2009n\u2009\u2264\u20094000, 2\u2009\u2264\u2009w\u2009\u2264\u20094000, 1\u2009\u2264\u2009b\u2009\u2264\u20094000) \u2014 the number of days, the number of good events and the number of not-so-good events. It is guaranteed that w\u2009+\u2009b\u2009\u2265\u2009n.","src_uid":"63e93a161bbff623323e66c98d5e20ac","source_code":"#include \n#include \n#include \n#include \n#define N 4010\n#define mo 1000000009\n#define int64 long long\n#define For(i,x,y) for (i=x;i<=y;i++)\nusing namespace std;\nint i,j,k,n,m,w,b;\nint64 f1[N],f2[N],an;\ninline int64 C(int n,int m) {\n if (m>n) return 0;\n if (!m) return 1;\n return f1[n]*f2[m]%mo*f2[n-m]%mo;\n}\nint main() {\n f1[0]=1;\n For(i,1,N-1) f1[i]=f1[i-1]*i%mo;\n f2[0]=f2[1]=1;\n For(i,2,N-1) f2[i]=(-f2[mo%i]*(mo\/i)%mo+mo)%mo;\n For(i,2,N-1) f2[i]=f2[i]*f2[i-1]%mo;\n scanf(\"%d%d%d\",&n,&w,&b);\n For(i,1,n-2) an=(an+f1[w]*f1[b]%mo*C(b-1,i-1)%mo*C(w-1,n-i-1)%mo*(n-i-1))%mo;\n printf(\"%I64d\",an); return 0;\n}\n","sample_outputs":"[\"2\", \"4\", \"4\"]","lang_cluster":"C++","notes":"NoteWe'll represent the good events by numbers starting from 1 and the not-so-good events \u2014 by letters starting from 'a'. Vertical lines separate days.In the first sample the possible ways are: \"1|a|2\" and \"2|a|1\". In the second sample the possible ways are: \"1|a|b|2\", \"2|a|b|1\", \"1|b|a|2\" and \"2|b|a|1\". In the third sample the possible ways are: \"1|ab|2\", \"2|ab|1\", \"1|ba|2\" and \"2|ba|1\".","output_specification":"Print the required number of ways modulo 1000000009 (109\u2009+\u20099).","description":"Polycarpus is sure that his life fits the description: \"first there is a white stripe, then a black one, then a white one again\". So, Polycarpus is sure that this rule is going to fulfill during the next n days. Polycarpus knows that he is in for w good events and b not-so-good events. At least one event is going to take place during each day. As each day is unequivocally characterizes as a part of a white or a black stripe, then each day is going to have events of the same type only (ether good or not-so-good).What is the number of distinct ways this scenario can develop over the next n days if Polycarpus is in for a white stripe (a stripe that has good events only, the stripe's length is at least 1 day), the a black stripe (a stripe that has not-so-good events only, the stripe's length is at least 1 day) and a white stripe again (a stripe that has good events only, the stripe's length is at least 1 day). Each of n days will belong to one of the three stripes only.Note that even the events of the same type are distinct from each other. Even if some events occur on the same day, they go in some order (there are no simultaneous events).Write a code that prints the number of possible configurations to sort the events into days. See the samples for clarifications on which scenarios should be considered distinct. Print the answer modulo 1000000009 (109\u2009+\u20099).","human_testcases":"[{\"input\": \"3 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 3 1\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"4 2 3\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"4 3 2\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"318389383\"]}, {\"input\": \"10 7 5\\r\\n\", \"output\": [\"130636800\"]}, {\"input\": \"10 4 9\\r\\n\", \"output\": [\"135283173\"]}, {\"input\": \"100 200 300\\r\\n\", \"output\": [\"316471646\"]}, {\"input\": \"200 100 300\\r\\n\", \"output\": [\"949581532\"]}, {\"input\": \"239 300 231\\r\\n\", \"output\": [\"774612666\"]}, {\"input\": \"300 300 300\\r\\n\", \"output\": [\"375912430\"]}, {\"input\": \"300 2 300\\r\\n\", \"output\": [\"775907030\"]}, {\"input\": \"300 300 1\\r\\n\", \"output\": [\"775907030\"]}, {\"input\": \"3 300 300\\r\\n\", \"output\": [\"496527918\"]}, {\"input\": \"3 2 300\\r\\n\", \"output\": [\"196174631\"]}, {\"input\": \"3 300 1\\r\\n\", \"output\": [\"828107078\"]}, {\"input\": \"4000 1000 3000\\r\\n\", \"output\": [\"876839920\"]}, {\"input\": \"4000 2000 2000\\r\\n\", \"output\": [\"310481606\"]}, {\"input\": \"4000 100 3900\\r\\n\", \"output\": [\"221262673\"]}, {\"input\": \"4000 2 3998\\r\\n\", \"output\": [\"686088712\"]}, {\"input\": \"3 2 4000\\r\\n\", \"output\": [\"938379934\"]}, {\"input\": \"3 4000 4000\\r\\n\", \"output\": [\"680114446\"]}, {\"input\": \"4000 4000 1\\r\\n\", \"output\": [\"63263244\"]}, {\"input\": \"4000 3998 2\\r\\n\", \"output\": [\"296557186\"]}, {\"input\": \"4000 4000 4000\\r\\n\", \"output\": [\"997463324\"]}, {\"input\": \"4000 4000 100\\r\\n\", \"output\": [\"994443885\"]}, {\"input\": \"4000 100 4000\\r\\n\", \"output\": [\"908339579\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '300 300 1\\r\\n', 'output': ['775907030']}, {'input': '10 10 10\\r\\n', 'output': ['318389383']}, {'input': '3 3 3\\r\\n', 'output': ['72']}, {'input': '3 300 1\\r\\n', 'output': ['828107078']}, {'input': '4000 1000 3000\\r\\n', 'output': ['876839920']}]","human_sample_testcases_2":"[{'input': '4000 3998 2\\r\\n', 'output': ['296557186']}, {'input': '4000 100 3900\\r\\n', 'output': ['221262673']}, {'input': '4 2 3\\r\\n', 'output': ['24']}, {'input': '300 300 1\\r\\n', 'output': ['775907030']}, {'input': '4000 2 3998\\r\\n', 'output': ['686088712']}]","human_sample_testcases_3":"[{'input': '3 4000 4000\\r\\n', 'output': ['680114446']}, {'input': '4000 100 4000\\r\\n', 'output': ['908339579']}, {'input': '3 3 3\\r\\n', 'output': ['72']}, {'input': '4000 2 3998\\r\\n', 'output': ['686088712']}, {'input': '10 4 9\\r\\n', 'output': ['135283173']}]","human_sample_testcases_4":"[{'input': '300 300 1\\r\\n', 'output': ['775907030']}, {'input': '300 300 300\\r\\n', 'output': ['375912430']}, {'input': '4000 2000 2000\\r\\n', 'output': ['310481606']}, {'input': '3 2 1\\r\\n', 'output': ['2']}, {'input': '10 4 9\\r\\n', 'output': ['135283173']}]","human_sample_testcases_5":"[{'input': '3 2 1\\r\\n', 'output': ['2']}, {'input': '4 2 3\\r\\n', 'output': ['24']}, {'input': '4000 4000 1\\r\\n', 'output': ['63263244']}, {'input': '3 3 1\\r\\n', 'output': ['12']}, {'input': '4000 3998 2\\r\\n', 'output': ['296557186']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":135,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"11\\n00000000008\", \"22\\n0011223344556677889988\", \"11\\n31415926535\"]","input_specification":"The first line contains an integer $$$n$$$\u00a0\u2014 the number of cards with digits that you have ($$$1 \\leq n \\leq 100$$$). The second line contains a string of $$$n$$$ digits (characters \"0\", \"1\", ..., \"9\") $$$s_1, s_2, \\ldots, s_n$$$. The string will not contain any other characters, such as leading or trailing spaces.","src_uid":"259d01b81bef5536b969247ff2c2d776","source_code":"#include\nusing namespace std;\nint num=0,n;\nchar ch;\nint main() {\n scanf(\"%d\\n\",&n);\n for (int i=1;i<=n;i++) {\n scanf(\"%c\",&ch);\n if (ch=='8') num++;\n }\n if (num==0) printf(\"0\");\n else {\n if (num*11<=n) printf(\"%d\",num);\n else printf(\"%d\",n\/11);\n }\n return 0;\n}","sample_outputs":"[\"1\", \"2\", \"0\"]","lang_cluster":"C++","notes":"NoteIn the first example, one phone number, \"8000000000\", can be made from these cards.In the second example, you can make two phone numbers from the cards, for example, \"80123456789\" and \"80123456789\".In the third example you can't make any phone number from the given cards.","output_specification":"If at least one phone number can be made from these cards, output the maximum number of phone numbers that can be made. Otherwise, output 0.","description":"Let's call a string a phone number if it has length 11 and fits the pattern \"8xxxxxxxxxx\", where each \"x\" is replaced by a digit.For example, \"80123456789\" and \"80000000000\" are phone numbers, while \"8012345678\" and \"79000000000\" are not.You have $$$n$$$ cards with digits, and you want to use them to make as many phone numbers as possible. Each card must be used in at most one phone number, and you don't have to use all cards. The phone numbers do not necessarily have to be distinct.","human_testcases":"[{\"input\": \"11\\r\\n00000000008\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22\\r\\n0011223344556677889988\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n31415926535\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99\\r\\n097167815527663544905782574817314139311067328533970663873718450545467450059059869618211361469505108\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"100\\r\\n8820286285185244938452488887088871457098945874486988698468788381417332842888928188688887641132194956\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"99\\r\\n509170332523502565755650047942914747120102240396245453406790272793996913905060450414255616791704320\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n1976473621569903172721407763737179639055561746310369779167351419713916160700096173622427077757986026\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10\\r\\n8888888888\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20\\r\\n88888888888888888888\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"30\\r\\n888888888888888888888888888888\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"40\\r\\n8888888888888888888888888888888888888888\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"50\\r\\n88888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"60\\r\\n888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"70\\r\\n8888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"80\\r\\n88888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"90\\r\\n888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"11\\r\\n24572366390\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21\\r\\n582586788289484878588\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31\\r\\n0868889888343881888987888838808\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"41\\r\\n78888884888874788841882882888088888588888\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"51\\r\\n882889888888689888850888388887688788888888888858888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"61\\r\\n8880888836888988888988888887388888888888868898887888818888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"71\\r\\n88888888888888888888888188888805848888788088888883888883187888838888888\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"81\\r\\n808888883488887888888808888888888888188888888388888888888888868688888488888882888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"91\\r\\n8828880888888884883888488888888888888881888888888884888888848588888808888888888888888880888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8888888888828188888888888888888808888888888888888888891888888768888888888288888885886888838888888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"22\\r\\n4215079217017196952791\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"32\\r\\n88257478884887437239023185588797\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"42\\r\\n885887846290886288816884858898812858495482\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"52\\r\\n8878588869084488848898838898788838337877898817818888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"62\\r\\n18888883884288488882387888486858887882838885288886472818688888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"72\\r\\n888488888888823288848804883838888888887888888888228888218488897809784868\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"82\\r\\n8889809888888888485881851986857288588888888881988888868888836888887858888888888878\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"92\\r\\n86888880558884738878888381088888888895888881888888888368878888888884888768881888888888808888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8881888389882878867888888888888888888886388888888870888884878888089888883898887888808688888487888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"33\\r\\n270375004567749549929235905225024\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"43\\r\\n7404899846883344886153727489084158470112581\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"53\\r\\n85838985300863473289888099788588319484149888886832906\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"63\\r\\n728385948188688801288285888788852829888898565895847689806684688\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"73\\r\\n2185806538483837898808836883483888818818988881880688028788888081888907898\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"83\\r\\n88584458884288808888588388818938838468960248387898182887888867888888888886088895788\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"93\\r\\n888088898748888038885888818882806848806887888888882087481868888888177809288888889648468888188\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8088888818885808888888848829886788884187188858898888888788988688884828586988888888288078638898728181\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"44\\r\\n15920309219313427633220119270900111650391207\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"54\\r\\n438283821340622774637957966575424773837418828888614203\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"64\\r\\n8885984815868480968883818886281846682409262501034555933863969284\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"74\\r\\n70988894874867688968816582886488688881063425288316858438189808828755218508\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"84\\r\\n181288888282608548858058871581888853888486785801381108858832882809848798828837386086\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"94\\r\\n8188948828818938226378510887848897889883818858778688882933888883888898198978868888808082461388\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n2867878187889776883889958480848802884888888878218089281860321588888888987288888884288488988628618888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"55\\r\\n7271714707719515303911625619272900050990324951111943573\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"65\\r\\n44542121362830719677175203560438858260878894083124543850593761845\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"75\\r\\n878909759892888846183608689257806813376950958863798487856148633095072259838\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"85\\r\\n6888887655188885918863889822590788834182048952565514598298586848861396753319582883848\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"95\\r\\n29488352815808808845913584782288724288898869488882098428839370889284838688458247785878848884289\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n2833898888858387469888804083887280788584887487186899808436848018181838884988432785338497585788803883\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"66\\r\\n747099435917145962031075767196746707764157706291155762576312312094\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"76\\r\\n7900795570936733366353829649382870728119825830883973668601071678041634916557\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"86\\r\\n84065885114540280210185082984888812185222886689129308815942798404861082196041321701260\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"96\\r\\n812087553199958040928832802441581868680188987878748641868838838835609806814288472573117388803351\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"77\\r\\n11233392925013001334679215120076714945221576003953746107506364475115045309091\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"87\\r\\n311753415808202195240425076966761033489788093280714672959929008324554784724650182457298\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"97\\r\\n4088468966684435599488804806521288358953088399738904557539253573051442198885776802972628197705081\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n6451941807833681891890004306065158148809856572066617888008875119881621810329816763604830895480467878\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"88\\r\\n2694079127792970410465292300936220976260790323517221561516591792566791677970332966660472\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"98\\r\\n87247250157776241281197787785951754485531639139778166755966603305697265958800376912432893847612736\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n1835563855281170226095294644116563180561156535623048783710060508361834822227075869575873675232708159\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11\\r\\n55814018693\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22\\r\\n6188156585823394680191\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33\\r\\n429980628264468835720540136177288\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"44\\r\\n30153452341853403190257244993442815171970194\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"55\\r\\n3982037603326093160114589190899881252765957832414122484\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"66\\r\\n157941266854773786962397310504192100434183957442977444078457168272\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11\\r\\n80000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"27\\r\\n888000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n8000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50\\r\\n88000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n81234567090\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32\\r\\n88000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"57\\r\\n888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"22\\r\\n8899999999999999999999\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21\\r\\n881234567900123456790\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888888555555555555555\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21\\r\\n888888888888000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8\\r\\n12345678\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21\\r\\n880000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11\\r\\n81234567123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11\\r\\n88888888888\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32\\r\\n88888888888888888888888888888888\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33\\r\\n888800000000000000000000000000000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888111111111111111111\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"77\\r\\n11111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n2833898888858387469888804083887280788584887487186899808436848018181838884988432785338497585788803883\\r\\n', 'output': ['9']}, {'input': '51\\r\\n882889888888689888850888388887688788888888888858888\\r\\n', 'output': ['4']}, {'input': '74\\r\\n70988894874867688968816582886488688881063425288316858438189808828755218508\\r\\n', 'output': ['6']}, {'input': '11\\r\\n80000000000\\r\\n', 'output': ['1']}, {'input': '32\\r\\n88888888888888888888888888888888\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '54\\r\\n438283821340622774637957966575424773837418828888614203\\r\\n', 'output': ['4']}, {'input': '20\\r\\n88888888888888888888\\r\\n', 'output': ['1']}, {'input': '44\\r\\n15920309219313427633220119270900111650391207\\r\\n', 'output': ['0']}, {'input': '84\\r\\n181288888282608548858058871581888853888486785801381108858832882809848798828837386086\\r\\n', 'output': ['7']}, {'input': '63\\r\\n728385948188688801288285888788852829888898565895847689806684688\\r\\n', 'output': ['5']}]","human_sample_testcases_3":"[{'input': '95\\r\\n29488352815808808845913584782288724288898869488882098428839370889284838688458247785878848884289\\r\\n', 'output': ['8']}, {'input': '11\\r\\n00000000008\\r\\n', 'output': ['1']}, {'input': '80\\r\\n88888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n', 'output': ['7']}, {'input': '65\\r\\n44542121362830719677175203560438858260878894083124543850593761845\\r\\n', 'output': ['5']}, {'input': '91\\r\\n8828880888888884883888488888888888888881888888888884888888848588888808888888888888888880888\\r\\n', 'output': ['8']}]","human_sample_testcases_4":"[{'input': '100\\r\\n8820286285185244938452488887088871457098945874486988698468788381417332842888928188688887641132194956\\r\\n', 'output': ['9']}, {'input': '66\\r\\n157941266854773786962397310504192100434183957442977444078457168272\\r\\n', 'output': ['5']}, {'input': '100\\r\\n8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n', 'output': ['2']}, {'input': '60\\r\\n888888888888888888888888888888888888888888888888888888888888\\r\\n', 'output': ['5']}, {'input': '100\\r\\n1835563855281170226095294644116563180561156535623048783710060508361834822227075869575873675232708159\\r\\n', 'output': ['9']}]","human_sample_testcases_5":"[{'input': '99\\r\\n097167815527663544905782574817314139311067328533970663873718450545467450059059869618211361469505108\\r\\n', 'output': ['9']}, {'input': '40\\r\\n8888888888888888888888888888888888888888\\r\\n', 'output': ['3']}, {'input': '81\\r\\n808888883488887888888808888888888888188888888388888888888888868688888488888882888\\r\\n', 'output': ['7']}, {'input': '51\\r\\n882889888888689888850888388887688788888888888858888\\r\\n', 'output': ['4']}, {'input': '43\\r\\n7404899846883344886153727489084158470112581\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":87.5,"id":136,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":87.5} {"sample_inputs":"[\"1 993244853\", \"2 993244853\", \"3 993244853\", \"2019 993244853\", \"2020 437122297\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n \\le 250\\,000$$$, $$$10^8 \\le m \\le 10^9$$$, $$$m$$$ is prime).","src_uid":"020d5dae7157d937c3f58554c9b155f9","source_code":"\/\/#include \n\/\/#include \n\/\/#include\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n\n\/\/using namespace __gnu_pbds;\nusing namespace std;\n\n\n\/*** Optimization ***\/\n#pragma GCC optimize(\"Ofast,no-stack-protector\")\n#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native\")\n#pragma GCC optimize(\"unroll-loops\")\n\n\n\/*** Typedef ***\/\ntypedef long long ll;\ntypedef unsigned long long ull;\n\n\n\/*** Input ***\/\n#define sci1(a) scanf(\"%d\",&a)\n#define sci2(a,b) scanf(\"%d %d\",&a,&b)\n#define scln1(a) scanf(\"%lld\",&a)\n#define scln2(a,b) scanf(\"%lld %lld\",&a,&b)\n#define scln3(a,b,c) scanf(\"%lld %lld %lld\",&a,&b,&c)\n\n\n\/*** Output ***\/\n#define pf1(a) printf(\"%d\\n\",a)\n#define pf2(a,b) printf(\"%d %d\\n\",a,b)\n#define pfln1(a) printf(\"%lld\\n\",a)\n#define pfln2(a,b) printf(\"%lld %lld\\n\",a,b)\n\n\n\/*** Loops ***\/\n#define foR0(num) for(ll i = 0; i < num; i++)\n#define foR1(num) for(ll i = 1; i <= num; i++)\n#define foRev(num) for(ll i = num - 1; i >= 0; i--)\n#define forIn(arr, num) for(ll i = 0; i < num; i++) cin>>arr[i];\n#define forIn1(arr, num) for(ll i = 1; i <= num; i++) cin>>arr[i];\n#define vpnt(ans) for(ll i = 0; i < ans.size(); i++) cout << ans[i] << (i + 1 < ans.size() ? ' ' : '\\n');\n#define apnt(arr, num) for(ll i = 0; i < num; i++) cout << arr[i] << (i + 1 < num ? ' ' : '\\n');\n\n\n\/*** Define Values ***\/\n\n#define ff first\n#define ss second\n#define re return\n#define MP make_pair\n#define pb push_back\n#define SZ(x) ((int) (x).size())\n\n\n#define EPS 10E-10\n#define mxx 100005\n#define MOD 1000000007\n#define iseq(a,b) (fabs(a-b) vll;\ntypedef set sll;\ntypedef multiset msll;\ntypedef queue qll;\ntypedef stack stll;\ntypedef map mll;\ntypedef pair pll;\ntypedef vector > vpll;\n\n\n\/*** BitWise Operations\n\/\/\/int Set(int N,int pos){return N=N | (1<, rb_tree_tag, tree_order_statistics_node_update> ordered_set;\n\/\/\/ll toint(string s){ll n=0,k=1;for(int i=s.size()-1; i>=0; i--){n += ((s[i]-'0')*k);k*=10;}return n;}\n\/\/\/string tostring(ll x){string s=\"\";while(x){s += (x%10)+'0';x\/=10;}reverse(s.begin(),s.end());return s;}\n\/\/\/bool sortinrev(const pair &a,const pair &b)return (a.first > b.first);\n\/\/\/priority_queue< pll ,vector,greater >p;\n\/\/\/cout<<*X.find_by_order(0)<>tst;\n for(ll tt=1;tt<=tst;tt++)\n {\n \/\/code\n ll n,m;\n cin>>n>>m;\n fact(m);\n ll res=(fac[n]*n)%m;\n for(ll i=1;i\nusing namespace std;\nint a[5];\nint u[4];\nbool f[5],falg;\nvoid dfs(int dep)\n{\n if(dep==4)\n {\n if(u[1]+u[2]>u[3]&&u[1]+u[3]>u[2]&&u[2]+u[3]>u[1])\n {\n printf(\"TRIANGLE\");\n exit(0);\n }\n if(u[1]+u[2]>=u[3]&&u[1]+u[3]>=u[2]&&u[2]+u[3]>=u[1])falg=true;\n return;\n }\n for(int i=1;i<=4;i++)\n if(f[i]==false)\n {\n f[i]=true;\n u[dep]=a[i];\n dep++;\n dfs(dep);\n dep--;\n u[dep]=0;\n f[i]=false;\n }\n}\nint main()\n{\n scanf(\"%d%d%d%d\",a+1,a+2,a+3,a+4);\n dfs(1);\n if(falg==true)printf(\"SEGMENT\");\n else printf(\"IMPOSSIBLE\");\nreturn 0;\n}","sample_outputs":"[\"TRIANGLE\", \"SEGMENT\", \"IMPOSSIBLE\"]","lang_cluster":"C++","notes":null,"output_specification":"Output TRIANGLE if it is possible to construct a non-degenerate triangle. Output SEGMENT if the first case cannot take place and it is possible to construct a degenerate triangle. Output IMPOSSIBLE if it is impossible to construct any triangle. Remember that you are to use three sticks. It is not allowed to break the sticks or use their partial length.","description":"Johnny has a younger sister Anne, who is very clever and smart. As she came home from the kindergarten, she told his brother about the task that her kindergartener asked her to solve. The task was just to construct a triangle out of four sticks of different colours. Naturally, one of the sticks is extra. It is not allowed to break the sticks or use their partial length. Anne has perfectly solved this task, now she is asking Johnny to do the same.The boy answered that he would cope with it without any difficulty. However, after a while he found out that different tricky things can occur. It can happen that it is impossible to construct a triangle of a positive area, but it is possible to construct a degenerate triangle. It can be so, that it is impossible to construct a degenerate triangle even. As Johnny is very lazy, he does not want to consider such a big amount of cases, he asks you to help him.","human_testcases":"[{\"input\": \"4 2 1 3\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"7 2 2 4\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 5 9 1\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"3 1 5 1\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"10 10 10 10\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"11 5 6 11\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"10 20 30 40\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"45 25 5 15\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"20 5 8 13\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"10 30 7 20\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 2 3 2\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"70 10 100 30\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"4 8 16 2\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"3 3 3 10\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 5 5 5\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"13 25 12 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"10 100 7 3\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"50 1 50 100\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"50 1 100 49\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"49 51 100 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"5 11 2 25\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"91 50 9 40\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"27 53 7 97\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"51 90 24 8\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"3 5 1 1\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"13 49 69 15\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"16 99 9 35\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"27 6 18 53\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"57 88 17 8\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"95 20 21 43\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"6 19 32 61\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"100 21 30 65\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"85 16 61 9\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"5 6 19 82\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"1 5 1 3\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"65 10 36 17\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"81 64 9 7\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"11 30 79 43\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"1 1 5 3\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"21 94 61 31\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"49 24 9 74\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"11 19 5 77\\r\\n\", \"output\": [\"IMPOSSIBLE\"]}, {\"input\": \"52 10 19 71\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"2 3 7 10\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"1 2 6 3\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"2 6 1 8\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"1 2 4 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"4 10 6 2\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"2 10 7 3\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"5 2 3 9\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"6 1 4 10\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"10 6 4 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 2 9 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"22 80 29 7\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"2 6 3 9\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 1 2 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 4 7 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"8 4 3 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"2 8 3 5\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"4 1 2 1\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"8 1 3 2\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"6 2 1 8\\r\\n\", \"output\": [\"SEGMENT\"]}, {\"input\": \"3 3 3 6\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"3 6 3 3\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"4 10 4 4\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 1 2 1\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"3 3 3 6\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"5 4 5 5\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"8 7 8 8\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"3 3 3 1\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 1 6 6\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 9 1 9\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"7 2 2 7\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"7 2 3 2\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"4 4 10 10\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"7 7 10 7\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"4 4 4 5\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 10 9 2\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"1 8 2 7\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"4 3 2 8\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"5 9 5 3\\r\\n\", \"output\": [\"TRIANGLE\"]}, {\"input\": \"4 10 3 5\\r\\n\", \"output\": [\"TRIANGLE\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '85 16 61 9\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '5 11 2 25\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '45 25 5 15\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '5 4 5 5\\r\\n', 'output': ['TRIANGLE']}, {'input': '1 8 2 7\\r\\n', 'output': ['TRIANGLE']}]","human_sample_testcases_2":"[{'input': '10 30 7 20\\r\\n', 'output': ['SEGMENT']}, {'input': '81 64 9 7\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '27 6 18 53\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '4 10 4 4\\r\\n', 'output': ['TRIANGLE']}, {'input': '51 90 24 8\\r\\n', 'output': ['IMPOSSIBLE']}]","human_sample_testcases_3":"[{'input': '6 19 32 61\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '65 10 36 17\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '22 80 29 7\\r\\n', 'output': ['SEGMENT']}, {'input': '2 3 7 10\\r\\n', 'output': ['SEGMENT']}, {'input': '11 30 79 43\\r\\n', 'output': ['IMPOSSIBLE']}]","human_sample_testcases_4":"[{'input': '45 25 5 15\\r\\n', 'output': ['IMPOSSIBLE']}, {'input': '7 7 10 7\\r\\n', 'output': ['TRIANGLE']}, {'input': '13 25 12 1\\r\\n', 'output': ['SEGMENT']}, {'input': '7 2 2 7\\r\\n', 'output': ['TRIANGLE']}, {'input': '100 21 30 65\\r\\n', 'output': ['IMPOSSIBLE']}]","human_sample_testcases_5":"[{'input': '50 1 50 100\\r\\n', 'output': ['TRIANGLE']}, {'input': '1 9 1 9\\r\\n', 'output': ['TRIANGLE']}, {'input': '3 3 3 1\\r\\n', 'output': ['TRIANGLE']}, {'input': '4 3 2 8\\r\\n', 'output': ['TRIANGLE']}, {'input': '81 64 9 7\\r\\n', 'output': ['IMPOSSIBLE']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":90.91,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":95.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":95.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":90.0,"id":138,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.182,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"1 2\", \"8 16\", \"1 1\"]","input_specification":"The single line contains space-separated integers l and r (1\u2009\u2264\u2009l\u2009\u2264\u2009r\u2009\u2264\u20091018). Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.","src_uid":"d90e99d539b16590c17328d79a5921e0","source_code":"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#define F first\n#define S second\n#define eps 1e-8\n#define pb push_back\n#define ppb pop_back\n#define mp make_pair\n#define lb lower_bound\n#define ub upper_bound\n#define INF 2000000000\n\ntypedef long long ll;\n\nusing namespace std;\nll l, r, ans;\nint q, Q, p; \nbool w[99], W[99];\nint main()\n{\n\tios::sync_with_stdio(0);\n\tcin >> l >> r;\n\twhile(l){\n\t\tw[q++] = l % 2;\n\t\tl >>= 1;\n\t}\n\twhile(r){\n\t\tW[Q++] = r % 2;\n\t\tr >>= 1;\n\t}\n\tfor(int i = Q; i >= 0; i--)\n\t\tif(w[i] != W[i]){\n\t\t\tp = i + 1;\n\t\t\tbreak;\n\t\t}\n\tans = (1ll << p) - 1ll;\n\tcout << ans;\n\t\n\treturn 0;\n}\n","sample_outputs":"[\"3\", \"31\", \"0\"]","lang_cluster":"C++","notes":null,"output_specification":"In a single line print a single integer \u2014 the maximum value of for all pairs of integers a, b (l\u2009\u2264\u2009a\u2009\u2264\u2009b\u2009\u2264\u2009r).","description":"A little girl loves problems on bitwise operations very much. Here's one of them.You are given two integers l and r. Let's consider the values of for all pairs of integers a and b (l\u2009\u2264\u2009a\u2009\u2264\u2009b\u2009\u2264\u2009r). Your task is to find the maximum value among all considered ones.Expression means applying bitwise excluding or operation to integers x and y. The given operation exists in all modern programming languages, for example, in languages C++ and Java it is represented as \"^\", in Pascal \u2014 as \"xor\".","human_testcases":"[{\"input\": \"1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 16\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"506 677\\r\\n\", \"output\": [\"1023\"]}, {\"input\": \"33 910\\r\\n\", \"output\": [\"1023\"]}, {\"input\": \"36 94\\r\\n\", \"output\": [\"127\"]}, {\"input\": \"10000000000 20000000000\\r\\n\", \"output\": [\"34359738367\"]}, {\"input\": \"79242383109441603 533369389165030783\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"797162752288318119 908416915938410706\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"230148668013473494 573330407369354716\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"668869743157683834 805679503731305624\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"32473107276976561 588384394540535099\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"632668612680440378 864824360766754908\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"658472316271074503 728242833853270665\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"289218059048863941 314351197831808685\\r\\n\", \"output\": [\"36028797018963967\"]}, {\"input\": \"54248140375568203 718189790306910368\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"330134158459714054 457118108955760856\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"190442232278841373 980738846929096255\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"203359308073091683 455893840817516371\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"200851182089362664 449305852839820160\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"731792654005832175 789527173439457653\\r\\n\", \"output\": [\"72057594037927935\"]}, {\"input\": \"231465750142682282 276038074124518614\\r\\n\", \"output\": [\"72057594037927935\"]}, {\"input\": \"462451489958473150 957447393463701191\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"68666076639301243 247574109010873331\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"491113582000560303 858928223424873439\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"454452550141901489 843034681327343036\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"43543567767276698 769776048133345296\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"214985598536531449 956713939905291713\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"56445001476501414 706930175458589379\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"666033930784103123 883523065811761270\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"501827377176522663 590153819613032662\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"140216419613864821 362678730465999561\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"23811264031960242 520940113721281721\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"43249439481689805 431488136320817289\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"198909890748296613 528950282310167050\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"190620774979376809 899159649449168622\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"18565852953382418 697862904569985066\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"277046860122752192 828379515775613732\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"25785331761502790 119852560236585580\\r\\n\", \"output\": [\"144115188075855871\"]}, {\"input\": \"363313173638414449 500957528623228245\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"549330032897152846 715374717344043295\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"47456305370335136 388462406071482688\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"125051194948742221 235911208585118006\\r\\n\", \"output\": [\"288230376151711743\"]}, {\"input\": \"780993382943360354 889872865454335075\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"815449097320007662 942453891178865528\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"765369978472937483 796958953973862258\\r\\n\", \"output\": [\"144115188075855871\"]}, {\"input\": \"259703440079833303 857510033561081530\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"181513087965617551 301910258955864271\\r\\n\", \"output\": [\"576460752303423487\"]}, {\"input\": \"28591024119784617 732203343197854927\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"215365547805299155 861595308221385098\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"1 1000000000000000000\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"1000000000000 999999999999999999\\r\\n\", \"output\": [\"1152921504606846975\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9999999999998 9999999999999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9999999999900 9999999999901\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9999999999900 9999999999902\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9999999999900 9999999999903\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5000000 5900000\\r\\n\", \"output\": [\"2097151\"]}, {\"input\": \"8589934592 8989934592\\r\\n\", \"output\": [\"536870911\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '215365547805299155 861595308221385098\\r\\n', 'output': ['1152921504606846975']}, {'input': '259703440079833303 857510033561081530\\r\\n', 'output': ['1152921504606846975']}, {'input': '203359308073091683 455893840817516371\\r\\n', 'output': ['576460752303423487']}, {'input': '1 1000000000000000000\\r\\n', 'output': ['1152921504606846975']}, {'input': '140216419613864821 362678730465999561\\r\\n', 'output': ['576460752303423487']}]","human_sample_testcases_2":"[{'input': '5000000 5900000\\r\\n', 'output': ['2097151']}, {'input': '10000000000 20000000000\\r\\n', 'output': ['34359738367']}, {'input': '203359308073091683 455893840817516371\\r\\n', 'output': ['576460752303423487']}, {'input': '47456305370335136 388462406071482688\\r\\n', 'output': ['576460752303423487']}, {'input': '8 16\\r\\n', 'output': ['31']}]","human_sample_testcases_3":"[{'input': '215365547805299155 861595308221385098\\r\\n', 'output': ['1152921504606846975']}, {'input': '797162752288318119 908416915938410706\\r\\n', 'output': ['576460752303423487']}, {'input': '23811264031960242 520940113721281721\\r\\n', 'output': ['576460752303423487']}, {'input': '501827377176522663 590153819613032662\\r\\n', 'output': ['1152921504606846975']}, {'input': '668869743157683834 805679503731305624\\r\\n', 'output': ['288230376151711743']}]","human_sample_testcases_4":"[{'input': '454452550141901489 843034681327343036\\r\\n', 'output': ['1152921504606846975']}, {'input': '200851182089362664 449305852839820160\\r\\n', 'output': ['576460752303423487']}, {'input': '203359308073091683 455893840817516371\\r\\n', 'output': ['576460752303423487']}, {'input': '765369978472937483 796958953973862258\\r\\n', 'output': ['144115188075855871']}, {'input': '56445001476501414 706930175458589379\\r\\n', 'output': ['1152921504606846975']}]","human_sample_testcases_5":"[{'input': '9999999999998 9999999999999\\r\\n', 'output': ['1']}, {'input': '501827377176522663 590153819613032662\\r\\n', 'output': ['1152921504606846975']}, {'input': '780993382943360354 889872865454335075\\r\\n', 'output': ['576460752303423487']}, {'input': '36 94\\r\\n', 'output': ['127']}, {'input': '363313173638414449 500957528623228245\\r\\n', 'output': ['288230376151711743']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":87.5,"id":139,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":87.5} {"sample_inputs":"[\"1 1 1\", \"5 2 4\"]","input_specification":"The first and only line contains three integers: n, m and k (1\u2009\u2264\u2009n,\u2009m,\u2009k\u2009\u2264\u20092000).","src_uid":"1f9107e8d1d8aebb1f4a1707a6cdeb6d","source_code":"#include \n#include \n#include \n#include \nusing namespace std;\nlong long ans=1,n,m,k;\nint main()\n{\n\tcin >> n >> m >> k;\n\tif (k == 1 || k>n){\n\t\tfor (int i = 1; i <= n; i++){ ans = (ans*m) % 1000000007; }\n\t\tcout << ans;\n\t}\n\telse if (k == n){\n\t\tfor (int i = 1; i <= int((n + 1) \/ 2); i++){\n\t\t\tans = (ans*m) % 1000000007;\n\t\t}\n\t\tcout << ans;\n\t}\n\telse if (k % 2 == 1){\n\t\tcout << m*m;\n\t}\n\telse{\n\t\tcout << m;\n\t}\n\treturn 0;\n}\n\n","sample_outputs":"[\"1\", \"2\"]","lang_cluster":"C++","notes":"NoteIn the first sample only one string is valid: \"a\" (let's denote the only letter of our alphabet as \"a\").In the second sample (if we denote the alphabet letters as \"a\" and \"b\") the following strings are valid: \"aaaaa\" and \"bbbbb\".","output_specification":"Print a single integer \u2014 the number of strings of the described type modulo 1000000007 (109\u2009+\u20097).","description":"Just in case somebody missed it: this winter is totally cold in Nvodsk! It is so cold that one gets funny thoughts. For example, let's say there are strings with the length exactly n, based on the alphabet of size m. Any its substring with length equal to k is a palindrome. How many such strings exist? Your task is to find their quantity modulo 1000000007 (109\u2009+\u20097). Be careful and don't miss a string or two!Let us remind you that a string is a palindrome if it can be read the same way in either direction, from the left to the right and from the right to the left.","human_testcases":"[{\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 4 20\\r\\n\", \"output\": [\"16384\"]}, {\"input\": \"8 13 9\\r\\n\", \"output\": [\"815730721\"]}, {\"input\": \"10 23 9\\r\\n\", \"output\": [\"529\"]}, {\"input\": \"10 25 8\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"997 1752 1000\\r\\n\", \"output\": [\"184834849\"]}, {\"input\": \"784 1 1999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"341 9 342\\r\\n\", \"output\": [\"320920086\"]}, {\"input\": \"777 1 777\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"542 13 542\\r\\n\", \"output\": [\"490685740\"]}, {\"input\": \"1501 893 1501\\r\\n\", \"output\": [\"889854713\"]}, {\"input\": \"1321 95 2\\r\\n\", \"output\": [\"95\"]}, {\"input\": \"2000 1000 3\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"1769 849 1000\\r\\n\", \"output\": [\"849\"]}, {\"input\": \"1000 2 1\\r\\n\", \"output\": [\"688423210\"]}, {\"input\": \"345 1777 1\\r\\n\", \"output\": [\"756253754\"]}, {\"input\": \"1999 2000 2000\\r\\n\", \"output\": [\"675798323\"]}, {\"input\": \"1984 1847 1992\\r\\n\", \"output\": [\"345702953\"]}, {\"input\": \"2000 2000 2000\\r\\n\", \"output\": [\"321179016\"]}, {\"input\": \"1451 239 1451\\r\\n\", \"output\": [\"968856942\"]}, {\"input\": \"2000 2000 1\\r\\n\", \"output\": [\"596636543\"]}, {\"input\": \"1230 987 1\\r\\n\", \"output\": [\"890209975\"]}, {\"input\": \"1764 305 843\\r\\n\", \"output\": [\"93025\"]}, {\"input\": \"1999 98 132\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"2000 2 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2000 1999 1999\\r\\n\", \"output\": [\"3996001\"]}, {\"input\": \"1678 1999 1234\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"7 10 7\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"15 1 15\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2000 2000 1000\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"1 2000 2000\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"10 10 90\\r\\n\", \"output\": [\"999999937\"]}, {\"input\": \"100 100 1\\r\\n\", \"output\": [\"424090053\"]}, {\"input\": \"6 6 6\\r\\n\", \"output\": [\"216\"]}, {\"input\": \"10 10 1\\r\\n\", \"output\": [\"999999937\"]}, {\"input\": \"100 10 100\\r\\n\", \"output\": [\"319300014\"]}, {\"input\": \"5 4 5\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"5 2 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000 1000 1000\\r\\n\", \"output\": [\"850431726\"]}, {\"input\": \"5 5 1\\r\\n\", \"output\": [\"3125\"]}, {\"input\": \"1000 1000 1\\r\\n\", \"output\": [\"524700271\"]}, {\"input\": \"4 256 1\\r\\n\", \"output\": [\"294967268\"]}, {\"input\": \"5 5 5\\r\\n\", \"output\": [\"125\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"100 100 100\\r\\n\", \"output\": [\"226732710\"]}, {\"input\": \"5 2 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"15 5 1\\r\\n\", \"output\": [\"517577915\"]}, {\"input\": \"1000 2 1001\\r\\n\", \"output\": [\"688423210\"]}, {\"input\": \"100 7 3\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"8 2 8\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"200 200 200\\r\\n\", \"output\": [\"104842676\"]}, {\"input\": \"4 4 1\\r\\n\", \"output\": [\"256\"]}, {\"input\": \"1999 1999 1999\\r\\n\", \"output\": [\"21610777\"]}, {\"input\": \"17 5 1\\r\\n\", \"output\": [\"939447791\"]}, {\"input\": \"100 5 1\\r\\n\", \"output\": [\"146981449\"]}, {\"input\": \"10 5 1\\r\\n\", \"output\": [\"9765625\"]}, {\"input\": \"11 2 11\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"100 1000 1\\r\\n\", \"output\": [\"327648028\"]}, {\"input\": \"3 1000 3\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 5 3\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"20 3 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10 2 1\\r\\n\", \"output\": [\"1024\"]}, {\"input\": \"7 2 7\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"13 9 1\\r\\n\", \"output\": [\"865810542\"]}, {\"input\": \"11 2 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"13 13 13\\r\\n\", \"output\": [\"62748517\"]}, {\"input\": \"239 123 239\\r\\n\", \"output\": [\"221051222\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 10 1\\r\\n', 'output': ['999999937']}, {'input': '10 25 8\\r\\n', 'output': ['25']}, {'input': '1501 893 1501\\r\\n', 'output': ['889854713']}, {'input': '3 3 3\\r\\n', 'output': ['9']}, {'input': '1769 849 1000\\r\\n', 'output': ['849']}]","human_sample_testcases_2":"[{'input': '1999 1999 1999\\r\\n', 'output': ['21610777']}, {'input': '777 1 777\\r\\n', 'output': ['1']}, {'input': '1451 239 1451\\r\\n', 'output': ['968856942']}, {'input': '100 10 100\\r\\n', 'output': ['319300014']}, {'input': '1230 987 1\\r\\n', 'output': ['890209975']}]","human_sample_testcases_3":"[{'input': '784 1 1999\\r\\n', 'output': ['1']}, {'input': '1999 1999 1999\\r\\n', 'output': ['21610777']}, {'input': '13 9 1\\r\\n', 'output': ['865810542']}, {'input': '4 4 1\\r\\n', 'output': ['256']}, {'input': '10 23 9\\r\\n', 'output': ['529']}]","human_sample_testcases_4":"[{'input': '11 2 11\\r\\n', 'output': ['64']}, {'input': '11 2 5\\r\\n', 'output': ['4']}, {'input': '10 10 10\\r\\n', 'output': ['100000']}, {'input': '1501 893 1501\\r\\n', 'output': ['889854713']}, {'input': '5 2 5\\r\\n', 'output': ['8']}]","human_sample_testcases_5":"[{'input': '10 2 1\\r\\n', 'output': ['1024']}, {'input': '5 2 1\\r\\n', 'output': ['32']}, {'input': '345 1777 1\\r\\n', 'output': ['756253754']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '13 9 1\\r\\n', 'output': ['865810542']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.31,"human_sample_line_coverage_2":76.92,"human_sample_line_coverage_3":92.31,"human_sample_line_coverage_4":76.92,"human_sample_line_coverage_5":46.15,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":91.67,"human_sample_branch_coverage_4":58.33,"human_sample_branch_coverage_5":25.0,"id":140,"human_sample_pass_rate":100.0,"human_sample_line_coverage":76.922,"human_sample_branch_coverage":65.0} {"sample_inputs":"[\"2 3\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n, m \\le 100\\,000$$$), the number of rows and the number of columns of the field.","src_uid":"0f1ab296cbe0952faa904f2bebe0567b","source_code":"#include \n#include \n#include \nusing namespace std;\ntypedef long long ll;\nconst ll mod=1e9+7;\nll n,m,f[100010][2][2],k,ans;\n\/\/f[\u7b2ci\u4f4d][1\u9ed10\u767d][1\/0\u524d\u4f4d\u4e0e\u8fd9\u4f4d\u662f\u5426\u540c\u8272]\nint main()\n{\n\tscanf(\"%lld%lld\",&n,&m);\n\tk=max(n,m);\n\tf[1][0][0]=1;\n\tf[1][1][0]=1;\n\tfor(int i=2;i<=k;i++)\n\t{\n\t\tf[i][0][0]=(f[i-1][1][0]+f[i-1][1][1])%mod;\n\t\tf[i][1][0]=(f[i-1][0][0]+f[i-1][0][1])%mod;\n\t\tf[i][0][1]=f[i-1][0][0];\n\t\tf[i][1][1]=f[i-1][1][0];\n\t}\n\tans=(ans+f[n][0][0])%mod;\n\tans=(ans+f[n][1][0])%mod;\n\tans=(ans+f[n][0][1])%mod;\n\tans=(ans+f[n][1][1])%mod;\n\tans=(ans+f[m][0][0])%mod;\n\tans=(ans+f[m][1][0])%mod;\n\tans=(ans+f[m][0][1])%mod;\n\tans=(ans+f[m][1][1])%mod;\n\tprintf(\"%lld\\n\",(ans-2+mod)%mod);\n}","sample_outputs":"[\"8\"]","lang_cluster":"C++","notes":"NoteThe picture below shows all possible random pictures of size $$$2$$$ by $$$3$$$. ","output_specification":"Print one integer, the number of random pictures modulo $$$10^9 + 7$$$.","description":"Recently Ivan the Fool decided to become smarter and study the probability theory. He thinks that he understands the subject fairly well, and so he began to behave like he already got PhD in that area.To prove his skills, Ivan decided to demonstrate his friends a concept of random picture. A picture is a field of $$$n$$$ rows and $$$m$$$ columns, where each cell is either black or white. Ivan calls the picture random if for every cell it has at most one adjacent cell of the same color. Two cells are considered adjacent if they share a side.Ivan's brothers spent some time trying to explain that it's not how the randomness usually works. Trying to convince Ivan, they want to count the number of different random (according to Ivan) pictures. Two pictures are considered different if at least one cell on those two picture is colored differently. Since the number of such pictures may be quite large, print it modulo $$$10^9 + 7$$$.","human_testcases":"[{\"input\": \"2 3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 5\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"3 6\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 100000\\r\\n\", \"output\": [\"935236457\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"935236457\"]}, {\"input\": \"91697 91697\\r\\n\", \"output\": [\"999949469\"]}, {\"input\": \"86821 24538\\r\\n\", \"output\": [\"1000000005\"]}, {\"input\": \"100000 100000\\r\\n\", \"output\": [\"870472905\"]}, {\"input\": \"99999 1\\r\\n\", \"output\": [\"822870997\"]}, {\"input\": \"1 99999\\r\\n\", \"output\": [\"822870997\"]}, {\"input\": \"1 99998\\r\\n\", \"output\": [\"112365460\"]}, {\"input\": \"99998 1\\r\\n\", \"output\": [\"112365460\"]}, {\"input\": \"1 88588\\r\\n\", \"output\": [\"153641669\"]}, {\"input\": \"68869 1\\r\\n\", \"output\": [\"840775285\"]}, {\"input\": \"91248 82914\\r\\n\", \"output\": [\"542035391\"]}, {\"input\": \"99999 100000\\r\\n\", \"output\": [\"758107445\"]}, {\"input\": \"100000 99999\\r\\n\", \"output\": [\"758107445\"]}, {\"input\": \"99999 99999\\r\\n\", \"output\": [\"645741985\"]}, {\"input\": \"13771 94814\\r\\n\", \"output\": [\"581579207\"]}, {\"input\": \"99411 90913\\r\\n\", \"output\": [\"189215541\"]}, {\"input\": \"52702 64157\\r\\n\", \"output\": [\"1000000005\"]}, {\"input\": \"24538 86821\\r\\n\", \"output\": [\"1000000005\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1\\r\\n', 'output': ['2']}, {'input': '2 5\\r\\n', 'output': ['18']}, {'input': '1 99999\\r\\n', 'output': ['822870997']}, {'input': '99999 1\\r\\n', 'output': ['822870997']}, {'input': '13771 94814\\r\\n', 'output': ['581579207']}]","human_sample_testcases_2":"[{'input': '2 3\\r\\n', 'output': ['8']}, {'input': '13771 94814\\r\\n', 'output': ['581579207']}, {'input': '52702 64157\\r\\n', 'output': ['1000000005']}, {'input': '2 1\\r\\n', 'output': ['4']}, {'input': '99999 100000\\r\\n', 'output': ['758107445']}]","human_sample_testcases_3":"[{'input': '1 3\\r\\n', 'output': ['6']}, {'input': '91697 91697\\r\\n', 'output': ['999949469']}, {'input': '2 3\\r\\n', 'output': ['8']}, {'input': '1 99998\\r\\n', 'output': ['112365460']}, {'input': '1 88588\\r\\n', 'output': ['153641669']}]","human_sample_testcases_4":"[{'input': '91248 82914\\r\\n', 'output': ['542035391']}, {'input': '1 88588\\r\\n', 'output': ['153641669']}, {'input': '99999 100000\\r\\n', 'output': ['758107445']}, {'input': '2 3\\r\\n', 'output': ['8']}, {'input': '1 2\\r\\n', 'output': ['4']}]","human_sample_testcases_5":"[{'input': '100000 100000\\r\\n', 'output': ['870472905']}, {'input': '1 99998\\r\\n', 'output': ['112365460']}, {'input': '2 2\\r\\n', 'output': ['6']}, {'input': '3 6\\r\\n', 'output': ['30']}, {'input': '99999 99999\\r\\n', 'output': ['645741985']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":141,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"25\\n2 3 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 28\", \"5\\n16 23 8 15 4\", \"3\\n14 15 92\"]","input_specification":"The first line of input contains K (1\u2009\u2264\u2009K\u2009\u2264\u200925), the number of onsite finalists you know. The second line of input contains r1,\u2009r2,\u2009...,\u2009rK (1\u2009\u2264\u2009ri\u2009\u2264\u2009106), the qualifying ranks of the finalists you know. All these ranks are distinct.","src_uid":"ef657588b4f2fe8b2ff5f8edc0ab8afd","source_code":"#include\n#include\nusing namespace std;\nint n;\nint ans;\nconst int maxn=1e6+10;\nint sum[maxn];\nint main()\n{\n\tcin>>n;\n\tfor(int i=1;i<=n;i++)\n\t{\n\t\tcin>>sum[i];\n\t}\n\tsort(sum+1,sum+1+n);\n\tif(sum[n]<=25)\n\t{\n\t\tcout<<\"0\"<\nchar a1,b1,a[23333],b[23333];\nint i,j,n;\nint main()\n{\n\tscanf(\" %c%c\",&a1,&b1);\n\tscanf(\"%d\",&n);\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tscanf(\" %c%c\",&a[i],&b[i]);\n\t}\n\tfor(i=1;i<=n;i++)\n\t{\n\t\tfor(j=1;j<=n;j++)\n\t\t{\n\t\t\tif((b[i]==a1&&a[j]==b1)||(a[i]==a1&&b[i]==b1))\n\t\t\t{\n\t\t\t\tprintf(\"YES\\n\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t}\n\tprintf(\"NO\\n\");\n}\n","sample_outputs":"[\"YES\", \"NO\", \"YES\"]","lang_cluster":"C++","notes":"NoteIn the first example the password is \"ya\", and Kashtanka can bark \"oy\" and then \"ah\", and then \"ha\" to form the string \"oyahha\" which contains the password. So, the answer is \"YES\".In the second example Kashtanka can't produce a string containing password as a substring. Note that it can bark \"ht\" and then \"tp\" producing \"http\", but it doesn't contain the password \"hp\" as a substring.In the third example the string \"hahahaha\" contains \"ah\" as a substring.","output_specification":"Print \"YES\" if Kashtanka can bark several words in a line forming a string containing the password, and \"NO\" otherwise. You can print each letter in arbitrary case (upper or lower).","description":"As technologies develop, manufacturers are making the process of unlocking a phone as user-friendly as possible. To unlock its new phone, Arkady's pet dog Mu-mu has to bark the password once. The phone represents a password as a string of two lowercase English letters.Mu-mu's enemy Kashtanka wants to unlock Mu-mu's phone to steal some sensible information, but it can only bark n distinct words, each of which can be represented as a string of two lowercase English letters. Kashtanka wants to bark several words (not necessarily distinct) one after another to pronounce a string containing the password as a substring. Tell if it's possible to unlock the phone in this way, or not.","human_testcases":"[{\"input\": \"ya\\r\\n4\\r\\nah\\r\\noy\\r\\nto\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"hp\\r\\n2\\r\\nht\\r\\ntp\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ah\\r\\n1\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bb\\r\\n4\\r\\nba\\r\\nab\\r\\naa\\r\\nbb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bc\\r\\n4\\r\\nca\\r\\nba\\r\\nbb\\r\\ncc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ba\\r\\n4\\r\\ncd\\r\\nad\\r\\ncc\\r\\ncb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"pg\\r\\n4\\r\\nzl\\r\\nxs\\r\\ndi\\r\\nxn\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"bn\\r\\n100\\r\\ndf\\r\\nyb\\r\\nze\\r\\nml\\r\\nyr\\r\\nof\\r\\nnw\\r\\nfm\\r\\ndw\\r\\nlv\\r\\nzr\\r\\nhu\\r\\nzt\\r\\nlw\\r\\nld\\r\\nmo\\r\\nxz\\r\\ntp\\r\\nmr\\r\\nou\\r\\nme\\r\\npx\\r\\nvp\\r\\nes\\r\\nxi\\r\\nnr\\r\\nbx\\r\\nqc\\r\\ngm\\r\\njs\\r\\nkn\\r\\ntw\\r\\nrq\\r\\nkz\\r\\nuc\\r\\nvc\\r\\nqr\\r\\nab\\r\\nna\\r\\nro\\r\\nya\\r\\nqy\\r\\ngu\\r\\nvk\\r\\nqk\\r\\ngs\\r\\nyq\\r\\nop\\r\\nhw\\r\\nrj\\r\\neo\\r\\nlz\\r\\nbh\\r\\nkr\\r\\nkb\\r\\nma\\r\\nrd\\r\\nza\\r\\nuf\\r\\nhq\\r\\nmc\\r\\nmn\\r\\nti\\r\\nwn\\r\\nsh\\r\\nax\\r\\nsi\\r\\nnd\\r\\ntz\\r\\ndu\\r\\nfj\\r\\nkl\\r\\nws\\r\\now\\r\\nnf\\r\\nvr\\r\\nye\\r\\nzc\\r\\niw\\r\\nfv\\r\\nkv\\r\\noo\\r\\nsm\\r\\nbc\\r\\nrs\\r\\nau\\r\\nuz\\r\\nuv\\r\\ngh\\r\\nsu\\r\\njn\\r\\ndz\\r\\nrl\\r\\nwj\\r\\nbk\\r\\nzl\\r\\nas\\r\\nms\\r\\nit\\r\\nwu\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bb\\r\\n1\\r\\naa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"qm\\r\\n25\\r\\nqw\\r\\nwe\\r\\ner\\r\\nrt\\r\\nty\\r\\nyu\\r\\nui\\r\\nio\\r\\nop\\r\\npa\\r\\nas\\r\\nsd\\r\\ndf\\r\\nfg\\r\\ngh\\r\\nhj\\r\\njk\\r\\nkl\\r\\nlz\\r\\nzx\\r\\nxc\\r\\ncv\\r\\nvb\\r\\nbn\\r\\nnm\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"mq\\r\\n25\\r\\nqw\\r\\nwe\\r\\ner\\r\\nrt\\r\\nty\\r\\nyu\\r\\nui\\r\\nio\\r\\nop\\r\\npa\\r\\nas\\r\\nsd\\r\\ndf\\r\\nfg\\r\\ngh\\r\\nhj\\r\\njk\\r\\nkl\\r\\nlz\\r\\nzx\\r\\nxc\\r\\ncv\\r\\nvb\\r\\nbn\\r\\nnm\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aa\\r\\n1\\r\\naa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bb\\r\\n1\\r\\nbb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ba\\r\\n1\\r\\ncc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ha\\r\\n1\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ez\\r\\n1\\r\\njl\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"aa\\r\\n2\\r\\nab\\r\\nba\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aa\\r\\n2\\r\\nca\\r\\ncc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"dd\\r\\n2\\r\\nac\\r\\ndc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"qc\\r\\n2\\r\\nyc\\r\\nkr\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"aa\\r\\n3\\r\\nba\\r\\nbb\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ca\\r\\n3\\r\\naa\\r\\nbb\\r\\nab\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ca\\r\\n3\\r\\nbc\\r\\nbd\\r\\nca\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"dd\\r\\n3\\r\\nmt\\r\\nrg\\r\\nxl\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"be\\r\\n20\\r\\nad\\r\\ncd\\r\\ncb\\r\\ndb\\r\\ndd\\r\\naa\\r\\nab\\r\\nca\\r\\nae\\r\\ned\\r\\ndc\\r\\nbb\\r\\nba\\r\\nda\\r\\nee\\r\\nea\\r\\ncc\\r\\nac\\r\\nec\\r\\neb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"fc\\r\\n20\\r\\nca\\r\\nbb\\r\\nce\\r\\nfd\\r\\nde\\r\\nfa\\r\\ncc\\r\\nec\\r\\nfb\\r\\nfc\\r\\nff\\r\\nbe\\r\\ncf\\r\\nba\\r\\ndb\\r\\ned\\r\\naf\\r\\nae\\r\\nda\\r\\nef\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ca\\r\\n20\\r\\ndc\\r\\naf\\r\\ndf\\r\\neg\\r\\naa\\r\\nbc\\r\\nea\\r\\nbd\\r\\nab\\r\\ndb\\r\\ngc\\r\\nfb\\r\\nba\\r\\nbe\\r\\nee\\r\\ngf\\r\\ncf\\r\\nag\\r\\nga\\r\\nca\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ke\\r\\n20\\r\\nzk\\r\\nra\\r\\nbq\\r\\nqz\\r\\nwt\\r\\nzg\\r\\nmz\\r\\nuk\\r\\nge\\r\\nuv\\r\\nud\\r\\nfd\\r\\neh\\r\\ndm\\r\\nsk\\r\\nki\\r\\nfv\\r\\ntp\\r\\nat\\r\\nfb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"hh\\r\\n50\\r\\nag\\r\\nhg\\r\\ndg\\r\\nfh\\r\\neg\\r\\ngh\\r\\ngd\\r\\nda\\r\\nbh\\r\\nab\\r\\nhf\\r\\ndc\\r\\nhb\\r\\nfe\\r\\nad\\r\\nec\\r\\nac\\r\\nfd\\r\\nca\\r\\naf\\r\\ncg\\r\\nhd\\r\\neb\\r\\nce\\r\\nhe\\r\\nha\\r\\ngb\\r\\nea\\r\\nae\\r\\nfb\\r\\nff\\r\\nbe\\r\\nch\\r\\nhh\\r\\nee\\r\\nde\\r\\nge\\r\\ngf\\r\\naa\\r\\ngg\\r\\neh\\r\\ned\\r\\nbf\\r\\nfc\\r\\nah\\r\\nga\\r\\nbd\\r\\ncb\\r\\nbg\\r\\nbc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"id\\r\\n50\\r\\nhi\\r\\ndc\\r\\nfg\\r\\nee\\r\\ngi\\r\\nhc\\r\\nac\\r\\nih\\r\\ndg\\r\\nfc\\r\\nde\\r\\ned\\r\\nie\\r\\neb\\r\\nic\\r\\ncf\\r\\nib\\r\\nfa\\r\\ngc\\r\\nba\\r\\nbe\\r\\nga\\r\\nha\\r\\nhg\\r\\nia\\r\\ndf\\r\\nab\\r\\nei\\r\\neh\\r\\nad\\r\\nii\\r\\nci\\r\\ndh\\r\\nec\\r\\nif\\r\\ndi\\r\\nbg\\r\\nag\\r\\nhe\\r\\neg\\r\\nca\\r\\nae\\r\\ndb\\r\\naa\\r\\nid\\r\\nfh\\r\\nhh\\r\\ncc\\r\\nfb\\r\\ngb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"fe\\r\\n50\\r\\nje\\r\\nbi\\r\\nbg\\r\\ngc\\r\\nfb\\r\\nig\\r\\ndf\\r\\nji\\r\\ndg\\r\\nfe\\r\\nfc\\r\\ncf\\r\\ngf\\r\\nai\\r\\nhe\\r\\nac\\r\\nch\\r\\nja\\r\\ngh\\r\\njf\\r\\nge\\r\\ncb\\r\\nij\\r\\ngb\\r\\ncg\\r\\naf\\r\\neh\\r\\nee\\r\\nhd\\r\\njd\\r\\njb\\r\\nii\\r\\nca\\r\\nci\\r\\nga\\r\\nab\\r\\nhi\\r\\nag\\r\\nfj\\r\\nej\\r\\nfi\\r\\nie\\r\\ndj\\r\\nfg\\r\\nef\\r\\njc\\r\\njg\\r\\njh\\r\\nhf\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"rn\\r\\n50\\r\\nba\\r\\nec\\r\\nwg\\r\\nao\\r\\nlk\\r\\nmz\\r\\njj\\r\\ncf\\r\\nfa\\r\\njk\\r\\ndy\\r\\nsz\\r\\njs\\r\\nzr\\r\\nqv\\r\\ntx\\r\\nwv\\r\\nrd\\r\\nqw\\r\\nls\\r\\nrr\\r\\nvt\\r\\nrx\\r\\nkc\\r\\neh\\r\\nnj\\r\\niq\\r\\nyi\\r\\nkh\\r\\nue\\r\\nnv\\r\\nkz\\r\\nrn\\r\\nes\\r\\nua\\r\\nzf\\r\\nvu\\r\\nll\\r\\neg\\r\\nmj\\r\\ncz\\r\\nzj\\r\\nxz\\r\\net\\r\\neb\\r\\nci\\r\\nih\\r\\nig\\r\\nam\\r\\nvd\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ee\\r\\n100\\r\\nah\\r\\nfb\\r\\ncd\\r\\nbi\\r\\nii\\r\\nai\\r\\nid\\r\\nag\\r\\nie\\r\\nha\\r\\ndi\\r\\nec\\r\\nae\\r\\nce\\r\\njb\\r\\ndg\\r\\njg\\r\\ngd\\r\\ngf\\r\\nda\\r\\nih\\r\\nbd\\r\\nhj\\r\\ngg\\r\\nhb\\r\\ndf\\r\\ned\\r\\nfh\\r\\naf\\r\\nja\\r\\nci\\r\\nfc\\r\\nic\\r\\nji\\r\\nac\\r\\nhi\\r\\nfj\\r\\nch\\r\\nbc\\r\\njd\\r\\naa\\r\\nff\\r\\nad\\r\\ngj\\r\\nej\\r\\nde\\r\\nee\\r\\nhe\\r\\ncf\\r\\nga\\r\\nia\\r\\ncg\\r\\nbb\\r\\nhc\\r\\nbe\\r\\ngi\\r\\njf\\r\\nbg\\r\\naj\\r\\njj\\r\\nbh\\r\\nfe\\r\\ndj\\r\\nef\\r\\ngb\\r\\nge\\r\\ndb\\r\\nig\\r\\ncj\\r\\ndc\\r\\nij\\r\\njh\\r\\nei\\r\\ndd\\r\\nib\\r\\nhf\\r\\neg\\r\\nbf\\r\\nfg\\r\\nab\\r\\ngc\\r\\nfd\\r\\nhd\\r\\ngh\\r\\neh\\r\\njc\\r\\neb\\r\\nhh\\r\\nca\\r\\nje\\r\\nbj\\r\\nif\\r\\nea\\r\\nhg\\r\\nfa\\r\\ncc\\r\\nba\\r\\ndh\\r\\ncb\\r\\nfi\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"if\\r\\n100\\r\\njd\\r\\nbc\\r\\nje\\r\\nhi\\r\\nga\\r\\nde\\r\\nkb\\r\\nfc\\r\\ncd\\r\\ngd\\r\\naj\\r\\ncb\\r\\nei\\r\\nbf\\r\\ncf\\r\\ndk\\r\\ndb\\r\\ncg\\r\\nki\\r\\ngg\\r\\nkg\\r\\nfa\\r\\nkj\\r\\nii\\r\\njf\\r\\njg\\r\\ngb\\r\\nbh\\r\\nbg\\r\\neh\\r\\nhj\\r\\nhb\\r\\ndg\\r\\ndj\\r\\njc\\r\\njb\\r\\nce\\r\\ndi\\r\\nig\\r\\nci\\r\\ndf\\r\\nji\\r\\nhc\\r\\nfk\\r\\naf\\r\\nac\\r\\ngk\\r\\nhd\\r\\nae\\r\\nkd\\r\\nec\\r\\nkc\\r\\neb\\r\\nfh\\r\\nij\\r\\nie\\r\\nca\\r\\nhh\\r\\nkf\\r\\nha\\r\\ndd\\r\\nif\\r\\nef\\r\\nih\\r\\nhg\\r\\nej\\r\\nfe\\r\\njk\\r\\nea\\r\\nib\\r\\nck\\r\\nhf\\r\\nak\\r\\ngi\\r\\nch\\r\\ndc\\r\\nba\\r\\nke\\r\\nad\\r\\nka\\r\\neg\\r\\njh\\r\\nja\\r\\ngc\\r\\nfd\\r\\ncc\\r\\nab\\r\\ngj\\r\\nik\\r\\nfg\\r\\nbj\\r\\nhe\\r\\nfj\\r\\nge\\r\\ngh\\r\\nhk\\r\\nbk\\r\\ned\\r\\nid\\r\\nfi\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"kd\\r\\n100\\r\\nek\\r\\nea\\r\\nha\\r\\nkf\\r\\nkj\\r\\ngh\\r\\ndl\\r\\nfj\\r\\nal\\r\\nga\\r\\nlj\\r\\nik\\r\\ngd\\r\\nid\\r\\ncb\\r\\nfh\\r\\ndk\\r\\nif\\r\\nbh\\r\\nkb\\r\\nhc\\r\\nej\\r\\nhk\\r\\ngc\\r\\ngb\\r\\nef\\r\\nkk\\r\\nll\\r\\nlf\\r\\nkh\\r\\ncl\\r\\nlh\\r\\njj\\r\\nil\\r\\nhh\\r\\nci\\r\\ndb\\r\\ndf\\r\\ngk\\r\\njg\\r\\nch\\r\\nbd\\r\\ncg\\r\\nfg\\r\\nda\\r\\neb\\r\\nlg\\r\\ndg\\r\\nbk\\r\\nje\\r\\nbg\\r\\nbl\\r\\njl\\r\\ncj\\r\\nhb\\r\\nei\\r\\naa\\r\\ngl\\r\\nka\\r\\nfa\\r\\nfi\\r\\naf\\r\\nkc\\r\\nla\\r\\ngi\\r\\nij\\r\\nib\\r\\nle\\r\\ndi\\r\\nck\\r\\nag\\r\\nlc\\r\\nca\\r\\nge\\r\\nie\\r\\nlb\\r\\nke\\r\\nii\\r\\nae\\r\\nig\\r\\nic\\r\\nhe\\r\\ncf\\r\\nhd\\r\\nak\\r\\nfb\\r\\nhi\\r\\ngf\\r\\nad\\r\\nba\\r\\nhg\\r\\nbi\\r\\nkl\\r\\nac\\r\\ngg\\r\\ngj\\r\\nbe\\r\\nlk\\r\\nld\\r\\naj\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n1\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ya\\r\\n1\\r\\nya\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ay\\r\\n1\\r\\nyb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ax\\r\\n2\\r\\nii\\r\\nxa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"hi\\r\\n1\\r\\nhi\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ag\\r\\n1\\r\\nag\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"th\\r\\n1\\r\\nth\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"sb\\r\\n1\\r\\nsb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"hp\\r\\n1\\r\\nhp\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ah\\r\\n1\\r\\nah\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ta\\r\\n1\\r\\nta\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"tb\\r\\n1\\r\\ntb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n5\\r\\nca\\r\\nda\\r\\nea\\r\\nfa\\r\\nka\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ac\\r\\n1\\r\\nac\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ha\\r\\n2\\r\\nha\\r\\nzz\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ok\\r\\n1\\r\\nok\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bc\\r\\n1\\r\\nbc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"az\\r\\n1\\r\\nzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ab\\r\\n2\\r\\nba\\r\\ntt\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ah\\r\\n2\\r\\nap\\r\\nhp\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sh\\r\\n1\\r\\nsh\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"az\\r\\n1\\r\\nby\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"as\\r\\n1\\r\\nas\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n2\\r\\nab\\r\\ncd\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n2\\r\\nxa\\r\\nza\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ab\\r\\n2\\r\\net\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n1\\r\\naa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ab\\r\\n2\\r\\nab\\r\\nde\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ah\\r\\n2\\r\\nba\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ha\\r\\n3\\r\\ndd\\r\\ncc\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"oo\\r\\n1\\r\\nox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ab\\r\\n2\\r\\nax\\r\\nbx\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ww\\r\\n4\\r\\nuw\\r\\now\\r\\npo\\r\\nko\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ay\\r\\n1\\r\\nay\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"yo\\r\\n1\\r\\nyo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ba\\r\\n1\\r\\nba\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"qw\\r\\n1\\r\\nqw\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"la\\r\\n1\\r\\nla\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n2\\r\\nbb\\r\\nbc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"aa\\r\\n2\\r\\nab\\r\\nac\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ah\\r\\n2\\r\\nbb\\r\\nha\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ya\\r\\n42\\r\\nab\\r\\nac\\r\\nad\\r\\nae\\r\\naf\\r\\nag\\r\\nah\\r\\nai\\r\\nak\\r\\naj\\r\\nba\\r\\nbc\\r\\nbd\\r\\nbe\\r\\nbf\\r\\nbg\\r\\nbh\\r\\nbi\\r\\nbk\\r\\nbj\\r\\ncb\\r\\nca\\r\\ncd\\r\\nce\\r\\ncf\\r\\ncg\\r\\nch\\r\\nci\\r\\nck\\r\\ncj\\r\\ndb\\r\\ndc\\r\\nda\\r\\nde\\r\\ndf\\r\\ndg\\r\\ndh\\r\\ndi\\r\\ndk\\r\\ndj\\r\\nef\\r\\nek\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ab\\r\\n3\\r\\nab\\r\\nxx\\r\\nyy\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n2\\r\\nab\\r\\ncc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"sa\\r\\n2\\r\\nxx\\r\\nas\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ma\\r\\n1\\r\\nma\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ba\\r\\n1\\r\\nbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"bc\\r\\n1\\r\\nab\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"fa\\r\\n1\\r\\nfa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ap\\r\\n1\\r\\nap\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n1\\r\\nbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"bk\\r\\n1\\r\\nbk\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xy\\r\\n2\\r\\nxy\\r\\naa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ab\\r\\n2\\r\\nza\\r\\nbz\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'ay\\r\\n1\\r\\nay\\r\\n', 'output': ['YES']}, {'input': 'if\\r\\n100\\r\\njd\\r\\nbc\\r\\nje\\r\\nhi\\r\\nga\\r\\nde\\r\\nkb\\r\\nfc\\r\\ncd\\r\\ngd\\r\\naj\\r\\ncb\\r\\nei\\r\\nbf\\r\\ncf\\r\\ndk\\r\\ndb\\r\\ncg\\r\\nki\\r\\ngg\\r\\nkg\\r\\nfa\\r\\nkj\\r\\nii\\r\\njf\\r\\njg\\r\\ngb\\r\\nbh\\r\\nbg\\r\\neh\\r\\nhj\\r\\nhb\\r\\ndg\\r\\ndj\\r\\njc\\r\\njb\\r\\nce\\r\\ndi\\r\\nig\\r\\nci\\r\\ndf\\r\\nji\\r\\nhc\\r\\nfk\\r\\naf\\r\\nac\\r\\ngk\\r\\nhd\\r\\nae\\r\\nkd\\r\\nec\\r\\nkc\\r\\neb\\r\\nfh\\r\\nij\\r\\nie\\r\\nca\\r\\nhh\\r\\nkf\\r\\nha\\r\\ndd\\r\\nif\\r\\nef\\r\\nih\\r\\nhg\\r\\nej\\r\\nfe\\r\\njk\\r\\nea\\r\\nib\\r\\nck\\r\\nhf\\r\\nak\\r\\ngi\\r\\nch\\r\\ndc\\r\\nba\\r\\nke\\r\\nad\\r\\nka\\r\\neg\\r\\njh\\r\\nja\\r\\ngc\\r\\nfd\\r\\ncc\\r\\nab\\r\\ngj\\r\\nik\\r\\nfg\\r\\nbj\\r\\nhe\\r\\nfj\\r\\nge\\r\\ngh\\r\\nhk\\r\\nbk\\r\\ned\\r\\nid\\r\\nfi\\r\\n', 'output': ['YES']}, {'input': 'ah\\r\\n1\\r\\nah\\r\\n', 'output': ['YES']}, {'input': 'bb\\r\\n1\\r\\naa\\r\\n', 'output': ['NO']}, {'input': 'fa\\r\\n1\\r\\nfa\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': 'ok\\r\\n1\\r\\nok\\r\\n', 'output': ['YES']}, {'input': 'az\\r\\n1\\r\\nby\\r\\n', 'output': ['NO']}, {'input': 'aa\\r\\n2\\r\\nca\\r\\ncc\\r\\n', 'output': ['NO']}, {'input': 'aa\\r\\n1\\r\\naa\\r\\n', 'output': ['YES']}, {'input': 'hp\\r\\n1\\r\\nhp\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': 'aa\\r\\n1\\r\\naa\\r\\n', 'output': ['YES']}, {'input': 'hh\\r\\n50\\r\\nag\\r\\nhg\\r\\ndg\\r\\nfh\\r\\neg\\r\\ngh\\r\\ngd\\r\\nda\\r\\nbh\\r\\nab\\r\\nhf\\r\\ndc\\r\\nhb\\r\\nfe\\r\\nad\\r\\nec\\r\\nac\\r\\nfd\\r\\nca\\r\\naf\\r\\ncg\\r\\nhd\\r\\neb\\r\\nce\\r\\nhe\\r\\nha\\r\\ngb\\r\\nea\\r\\nae\\r\\nfb\\r\\nff\\r\\nbe\\r\\nch\\r\\nhh\\r\\nee\\r\\nde\\r\\nge\\r\\ngf\\r\\naa\\r\\ngg\\r\\neh\\r\\ned\\r\\nbf\\r\\nfc\\r\\nah\\r\\nga\\r\\nbd\\r\\ncb\\r\\nbg\\r\\nbc\\r\\n', 'output': ['YES']}, {'input': 'ah\\r\\n1\\r\\nah\\r\\n', 'output': ['YES']}, {'input': 'az\\r\\n1\\r\\nzz\\r\\n', 'output': ['NO']}, {'input': 'aa\\r\\n2\\r\\nab\\r\\nac\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': 'ah\\r\\n1\\r\\nah\\r\\n', 'output': ['YES']}, {'input': 'fe\\r\\n50\\r\\nje\\r\\nbi\\r\\nbg\\r\\ngc\\r\\nfb\\r\\nig\\r\\ndf\\r\\nji\\r\\ndg\\r\\nfe\\r\\nfc\\r\\ncf\\r\\ngf\\r\\nai\\r\\nhe\\r\\nac\\r\\nch\\r\\nja\\r\\ngh\\r\\njf\\r\\nge\\r\\ncb\\r\\nij\\r\\ngb\\r\\ncg\\r\\naf\\r\\neh\\r\\nee\\r\\nhd\\r\\njd\\r\\njb\\r\\nii\\r\\nca\\r\\nci\\r\\nga\\r\\nab\\r\\nhi\\r\\nag\\r\\nfj\\r\\nej\\r\\nfi\\r\\nie\\r\\ndj\\r\\nfg\\r\\nef\\r\\njc\\r\\njg\\r\\njh\\r\\nhf\\r\\nha\\r\\n', 'output': ['YES']}, {'input': 'ab\\r\\n5\\r\\nca\\r\\nda\\r\\nea\\r\\nfa\\r\\nka\\r\\n', 'output': ['NO']}, {'input': 'aa\\r\\n3\\r\\nba\\r\\nbb\\r\\nab\\r\\n', 'output': ['YES']}, {'input': 'be\\r\\n20\\r\\nad\\r\\ncd\\r\\ncb\\r\\ndb\\r\\ndd\\r\\naa\\r\\nab\\r\\nca\\r\\nae\\r\\ned\\r\\ndc\\r\\nbb\\r\\nba\\r\\nda\\r\\nee\\r\\nea\\r\\ncc\\r\\nac\\r\\nec\\r\\neb\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': 'qc\\r\\n2\\r\\nyc\\r\\nkr\\r\\n', 'output': ['NO']}, {'input': 'sb\\r\\n1\\r\\nsb\\r\\n', 'output': ['YES']}, {'input': 'dd\\r\\n2\\r\\nac\\r\\ndc\\r\\n', 'output': ['NO']}, {'input': 'bb\\r\\n4\\r\\nba\\r\\nab\\r\\naa\\r\\nbb\\r\\n', 'output': ['YES']}, {'input': 'sh\\r\\n1\\r\\nsh\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":92.86,"human_sample_branch_coverage_2":92.86,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":92.86,"id":143,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":95.716} {"sample_inputs":"[\"XX.\\n...\\n.XX\", \"X.X\\nX..\\n...\"]","input_specification":"Input contains the matrix of three rows of three symbols each. Symbol \u00abX\u00bb means that the corresponding button was pressed, and \u00ab.\u00bb means that is was not pressed. The matrix may contain no \u00abX\u00bb, also it may contain no \u00ab.\u00bb.","src_uid":"6a5fe5fac8a4e3993dc3423180cdd6a9","source_code":"#include\nusing namespace std;\nstring s1,s2,s3;\nint main(){\n\tcin>>s1>>s2>>s3;\n\ts1=s1+s2;\n\ts1=s1+s3;\n\tfor(int i=0;i<=3;i++){\n\t\tif(s1[i]!=s1[8-i]){\n\t\t\tprintf(\"NO\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"YES\");\n\treturn 0;\n}","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"C++","notes":"NoteIf you are not familiar with the term \u00abcentral symmetry\u00bb, you may look into http:\/\/en.wikipedia.org\/wiki\/Central_symmetry","output_specification":"Print YES if the password is symmetric with respect to the central button of the terminal and NO otherwise.","description":"There is a very secret base in Potatoland where potato mash is made according to a special recipe. The neighbours from Porridgia decided to seize this recipe and to sell it to Pilauland. For this mission they have been preparing special agent Pearlo for many years. When, finally, Pearlo learned all secrets of espionage, he penetrated into the Potatoland territory and reached the secret base.Now he is standing at the entrance, but to get inside he need to pass combination lock. Minute ago one of the workers entered the password on the terminal and opened the door. The terminal is a square digital keyboard 3\u2009\u00d7\u20093 with digits from 1 to 9.Pearlo knows that the password consists from distinct digits and is probably symmetric with respect to the central button of the terminal. He has heat sensor which allowed him to detect the digits which the worker pressed. Now he wants to check whether the password entered by the worker is symmetric with respect to the central button of the terminal. This fact can Help Pearlo to reduce the number of different possible password combinations.","human_testcases":"[{\"input\": \"XX.\\r\\n...\\r\\n.XX\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"X.X\\r\\nX..\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n...\\r\\n...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".X.\\r\\n.X.\\r\\n.X.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"XXX\\r\\nXXX\\r\\nXXX\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"XXX\\r\\nX.X\\r\\nXXX\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"X..\\r\\n.X.\\r\\n..X\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...\\r\\nX.X\\r\\nX..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".X.\\r\\nX.X\\r\\n.X.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"X.X\\r\\n.X.\\r\\nX.X\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...\\r\\n...\\r\\n..X\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n.X.\\r\\n...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"XXX\\r\\n...\\r\\nXXX\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...\\r\\nXXX\\r\\n...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..X\\r\\nX..\\r\\n..X\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".X.\\r\\n...\\r\\nX.X\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"X.X\\r\\nX.X\\r\\nX.X\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".X.\\r\\nX.X\\r\\nXX.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\nXXX\\r\\nXXX\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\nX.X\\r\\n...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"XXX\\r\\n..X\\r\\nXXX\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"X..\\r\\nX.X\\r\\n.X.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n..X\\r\\nXXX\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"..X\\r\\nX.X\\r\\nX..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..X\\r\\n..X\\r\\nXXX\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"X..\\r\\nX..\\r\\nX..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"XXX\\r\\n.X.\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"XXX\\r\\n.X.\\r\\nXXX\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"X..\\r\\n...\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"..X\\r\\n...\\r\\nX..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".X.\\r\\n...\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"..X\\r\\n...\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\nX..\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n..X\\r\\n...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n...\\r\\nX..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n...\\r\\n.X.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...\\r\\n.X.\\r\\nX..\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '.X.\\r\\n...\\r\\n...\\r\\n', 'output': ['NO']}, {'input': 'XXX\\r\\n...\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': '...\\r\\nX.X\\r\\n...\\r\\n', 'output': ['YES']}, {'input': '..X\\r\\nX.X\\r\\nX..\\r\\n', 'output': ['YES']}, {'input': '.X.\\r\\n...\\r\\nX.X\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': 'X..\\r\\n.X.\\r\\n..X\\r\\n', 'output': ['YES']}, {'input': 'XXX\\r\\n.X.\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': 'X.X\\r\\nX.X\\r\\nX.X\\r\\n', 'output': ['YES']}, {'input': '...\\r\\nX.X\\r\\nX..\\r\\n', 'output': ['NO']}, {'input': 'XXX\\r\\nXXX\\r\\nXXX\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': 'X.X\\r\\nX..\\r\\n...\\r\\n', 'output': ['NO']}, {'input': '..X\\r\\n...\\r\\nX..\\r\\n', 'output': ['YES']}, {'input': '...\\r\\n...\\r\\n..X\\r\\n', 'output': ['NO']}, {'input': 'XXX\\r\\n.X.\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': '..X\\r\\n...\\r\\n...\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': 'XXX\\r\\nX.X\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': 'XXX\\r\\n...\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': '...\\r\\n..X\\r\\nXXX\\r\\n', 'output': ['NO']}, {'input': 'X.X\\r\\nX..\\r\\n...\\r\\n', 'output': ['NO']}, {'input': '.X.\\r\\n.X.\\r\\n.X.\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '...\\r\\n...\\r\\n.X.\\r\\n', 'output': ['NO']}, {'input': 'XXX\\r\\n.X.\\r\\n...\\r\\n', 'output': ['NO']}, {'input': '...\\r\\n...\\r\\n...\\r\\n', 'output': ['YES']}, {'input': 'XXX\\r\\n.X.\\r\\nXXX\\r\\n', 'output': ['YES']}, {'input': 'XXX\\r\\nXXX\\r\\nXXX\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":144,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 5\", \"2 3\"]","input_specification":"The first line of input contains two space-separated integers m and b (1\u2009\u2264\u2009m\u2009\u2264\u20091000, 1\u2009\u2264\u2009b\u2009\u2264\u200910000).","src_uid":"9300f1c07dd36e0cf7e6cb7911df4cf2","source_code":"#include \n#include \n\n#define PB push_back\n#define f(i,a,b) for(int i=a;i vi;\ntypedef vector vll;\n\t\nll m,b;\nll f;\nint main()\n{\n\tcin>>m>>b;\n\tfor(ll x=0;x<=m*b;x++)\n\t{\n\t\tll y= -(x+m-1)\/m+b;\n\t\tf=max(f,(x*(x+1)*(y+1)+y*(y+1)*(x+1))\/2);\n\t}\n\tcout<\nusing namespace std;\n\n#define fst first\n#define snd second\n#define mp make_pair\n#define rep(i,a,n) for(int i=(a);i<(n);++i)\n#define per(i,a,n) for(int i=(n)-1;i>=(a);--i)\n#define all(x) (x).begin(),(x).end()\n\ntemplate \ninline bool umin(T1& x, const T2& y){return x>y ? x=y,true : false;}\n\ntemplate \ninline bool umax(T1& x, const T2& y){return x pii;\n\nconst int N = (int)1e5+5;\nconst int mod = (int)1e9+7;\nconst int INF = (int)1e9+17;\nconst ll LLINF = (ll)1e18+17;\n\n\nint n;\nint ans[N];\nbool dp[53][5001];\n\n\nvoid prepare() {\n dp[0][0] = true;\n rep(i, 0, 5001) {\n rep(j, 0, 51) {\n for(int x:{1, 5, 10, 50}) {\n if (i + x <= 5000) dp[j+1][i+x] |= dp[j][i];\n }\n ans[j] += dp[j][i];\n }\n }\n}\n\nint32_t main() {\n ios_base::sync_with_stdio(false);\n cin.tie(nullptr), cout.tie(nullptr);\n#ifdef LOCAL\n freopen(\"input.txt\", \"r\", stdin);\n freopen(\"output.txt\", \"w\", stdout);\n#else\n\/\/ freopen(\"river.in\", \"r\", stdin);\n\/\/ freopen(\"river.out\", \"w\", stdout);\n#endif\n\n prepare();\n cin >> n;\n if (n <= 50) {\n cout << ans[n] << endl;\n } else {\n cout << ans[50] + 49ll * (n-50) << endl;\n }\n\n return 0;\n}\n","sample_outputs":"[\"4\", \"10\", \"244\"]","lang_cluster":"C++","notes":"NoteIn the first sample there are exactly $$$4$$$ integers which can be represented\u00a0\u2014 I, V, X and L.In the second sample it is possible to represent integers $$$2$$$ (II), $$$6$$$ (VI), $$$10$$$ (VV), $$$11$$$ (XI), $$$15$$$ (XV), $$$20$$$ (XX), $$$51$$$ (IL), $$$55$$$ (VL), $$$60$$$ (XL) and $$$100$$$ (LL).","output_specification":"Output a single integer\u00a0\u2014 the number of distinct integers which can be represented using $$$n$$$ roman digits exactly.","description":"Let's introduce a number system which is based on a roman digits. There are digits I, V, X, L which correspond to the numbers $$$1$$$, $$$5$$$, $$$10$$$ and $$$50$$$ respectively. The use of other roman digits is not allowed.Numbers in this system are written as a sequence of one or more digits. We define the value of the sequence simply as the sum of digits in it.For example, the number XXXV evaluates to $$$35$$$ and the number IXI\u00a0\u2014 to $$$12$$$.Pay attention to the difference to the traditional roman system\u00a0\u2014 in our system any sequence of digits is valid, moreover the order of digits doesn't matter, for example IX means $$$11$$$, not $$$9$$$.One can notice that this system is ambiguous, and some numbers can be written in many different ways. Your goal is to determine how many distinct integers can be represented by exactly $$$n$$$ roman digits I, V, X, L.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"244\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"48753\"]}, {\"input\": \"2000\\r\\n\", \"output\": [\"97753\"]}, {\"input\": \"5000\\r\\n\", \"output\": [\"244753\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"489753\"]}, {\"input\": \"111199\\r\\n\", \"output\": [\"5448504\"]}, {\"input\": \"101232812\\r\\n\", \"output\": [\"4960407541\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"48999999753\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"83\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"116\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"155\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"198\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"292\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"341\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"390\"]}, {\"input\": \"55\\r\\n\", \"output\": [\"2448\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"4653\"]}, {\"input\": \"150\\r\\n\", \"output\": [\"7103\"]}, {\"input\": \"1200\\r\\n\", \"output\": [\"58553\"]}, {\"input\": \"9999999\\r\\n\", \"output\": [\"489999704\"]}, {\"input\": \"100000000\\r\\n\", \"output\": [\"4899999753\"]}, {\"input\": \"500000000\\r\\n\", \"output\": [\"24499999753\"]}, {\"input\": \"600000000\\r\\n\", \"output\": [\"29399999753\"]}, {\"input\": \"709000900\\r\\n\", \"output\": [\"34741043853\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"48999999704\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"733\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"1468\"]}, {\"input\": \"56\\r\\n\", \"output\": [\"2497\"]}, {\"input\": \"83\\r\\n\", \"output\": [\"3820\"]}, {\"input\": \"116\\r\\n\", \"output\": [\"5437\"]}, {\"input\": \"155\\r\\n\", \"output\": [\"7348\"]}, {\"input\": \"198\\r\\n\", \"output\": [\"9455\"]}, {\"input\": \"244\\r\\n\", \"output\": [\"11709\"]}, {\"input\": \"292\\r\\n\", \"output\": [\"14061\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"439\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n', 'output': ['10']}, {'input': '1200\\r\\n', 'output': ['58553']}, {'input': '14\\r\\n', 'output': ['439']}, {'input': '5\\r\\n', 'output': ['56']}, {'input': '600000000\\r\\n', 'output': ['29399999753']}]","human_sample_testcases_2":"[{'input': '20\\r\\n', 'output': ['733']}, {'input': '1\\r\\n', 'output': ['4']}, {'input': '55\\r\\n', 'output': ['2448']}, {'input': '5\\r\\n', 'output': ['56']}, {'input': '101232812\\r\\n', 'output': ['4960407541']}]","human_sample_testcases_3":"[{'input': '9\\r\\n', 'output': ['198']}, {'input': '1200\\r\\n', 'output': ['58553']}, {'input': '6\\r\\n', 'output': ['83']}, {'input': '116\\r\\n', 'output': ['5437']}, {'input': '2\\r\\n', 'output': ['10']}]","human_sample_testcases_4":"[{'input': '5\\r\\n', 'output': ['56']}, {'input': '10\\r\\n', 'output': ['244']}, {'input': '10000\\r\\n', 'output': ['489753']}, {'input': '155\\r\\n', 'output': ['7348']}, {'input': '1000\\r\\n', 'output': ['48753']}]","human_sample_testcases_5":"[{'input': '111199\\r\\n', 'output': ['5448504']}, {'input': '10\\r\\n', 'output': ['244']}, {'input': '12\\r\\n', 'output': ['341']}, {'input': '7\\r\\n', 'output': ['116']}, {'input': '2000\\r\\n', 'output': ['97753']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":146,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1001\", \"1\\n1\"]","input_specification":"The first line contains integer number n (1\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the length of string s. The second line contains the string s consisting of characters \"0\" and \"1\". It is guaranteed that the string s is correct.","src_uid":"ac244791f8b648d672ed3de32ce0074d","source_code":"#include \nusing namespace std;\nstring s;\nint k,i;\nmain(){\n cin>>i>>s;\n for (i=0; i\n#define ll long long\nusing namespace std;\nll ans;\nint n,a,b,s;\nint c[20005];\nbool check(ll m){\n\tint sum=m\/a;\n\tfor (int i=0;i<=s;i++) c[i]=i+1;\n\tfor (int i=1;1ll*i*b<=m&&sum=n; \n}\nvoid calc(ll m){\n\tint sum=m\/a;\n\tans+=1ll*sum*(sum+1)\/2*a;\n\tfor (int i=0;i<=s;i++) c[i]=i+1;\n\tfor (int i=1;1ll*i*b<=m;i++)\n\t\tfor (int j=0;1ll*i*b+1ll*j*a<=m;j++){\n\t\t\tans+=1ll*c[j]*(1ll*i*b+1ll*j*a);\n\t\t\tsum+=c[j],c[j]+=(j?c[j-1]:0);\n\t\t}\n\tans-=m*(sum-n);\n}\nint main(){\n\tscanf(\"%d%d%d\",&n,&a,&b);\n\tif (a>b) swap(a,b);\n\tn--; ans=1ll*n*(a+b);\n\tn--; s=sqrt(n*2)+1;\n\tif (!a){\n\t\tprintf(\"%lld\\n\",ans);\n\t\treturn 0;\n\t}\n\tll l=0,r=1ll*n*a;\n\twhile (l\n#include\n#include\n#include\nusing namespace std;\ntypedef long long ll;\nconst ll Maxn=20+5;\nll n,mul[Maxn];\nint main()\n{ scanf(\"%lld\",&n);\n mul[0]=1;\n for(ll i=1;i<=n;i++)mul[i]=1ll*mul[i-1]*i;\n printf(\"%lld\\n\",mul[n]\/mul[n\/2]\/mul[n\/2]\/2*mul[n\/2-1]*mul[n\/2-1]);\n return 0;\n}\n","sample_outputs":"[\"1\", \"3\", \"1260\", \"12164510040883200\"]","lang_cluster":"C++","notes":null,"output_specification":"Print one integer \u2014 the number of ways to make two round dances. It is guaranteed that the answer fits in the $$$64$$$-bit integer data type.","description":"One day, $$$n$$$ people ($$$n$$$ is an even number) met on a plaza and made two round dances, each round dance consists of exactly $$$\\frac{n}{2}$$$ people. Your task is to find the number of ways $$$n$$$ people can make two round dances if each round dance consists of exactly $$$\\frac{n}{2}$$$ people. Each person should belong to exactly one of these two round dances.Round dance is a dance circle consisting of $$$1$$$ or more people. Two round dances are indistinguishable (equal) if one can be transformed to another by choosing the first participant. For example, round dances $$$[1, 3, 4, 2]$$$, $$$[4, 2, 1, 3]$$$ and $$$[2, 1, 3, 4]$$$ are indistinguishable.For example, if $$$n=2$$$ then the number of ways is $$$1$$$: one round dance consists of the first person and the second one of the second person.For example, if $$$n=4$$$ then the number of ways is $$$3$$$. Possible options: one round dance \u2014 $$$[1,2]$$$, another \u2014 $$$[3,4]$$$; one round dance \u2014 $$$[2,4]$$$, another \u2014 $$$[3,1]$$$; one round dance \u2014 $$$[4,1]$$$, another \u2014 $$$[3,2]$$$. Your task is to find the number of ways $$$n$$$ people can make two round dances if each round dance consists of exactly $$$\\frac{n}{2}$$$ people.","human_testcases":"[{\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"1260\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"12164510040883200\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"72576\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"6652800\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"889574400\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"39520825344000\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"163459296000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6\\r\\n', 'output': ['40']}, {'input': '18\\r\\n', 'output': ['39520825344000']}, {'input': '16\\r\\n', 'output': ['163459296000']}, {'input': '10\\r\\n', 'output': ['72576']}, {'input': '12\\r\\n', 'output': ['6652800']}]","human_sample_testcases_2":"[{'input': '10\\r\\n', 'output': ['72576']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '16\\r\\n', 'output': ['163459296000']}, {'input': '6\\r\\n', 'output': ['40']}, {'input': '20\\r\\n', 'output': ['12164510040883200']}]","human_sample_testcases_3":"[{'input': '12\\r\\n', 'output': ['6652800']}, {'input': '6\\r\\n', 'output': ['40']}, {'input': '10\\r\\n', 'output': ['72576']}, {'input': '8\\r\\n', 'output': ['1260']}, {'input': '14\\r\\n', 'output': ['889574400']}]","human_sample_testcases_4":"[{'input': '20\\r\\n', 'output': ['12164510040883200']}, {'input': '10\\r\\n', 'output': ['72576']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '18\\r\\n', 'output': ['39520825344000']}, {'input': '8\\r\\n', 'output': ['1260']}]","human_sample_testcases_5":"[{'input': '20\\r\\n', 'output': ['12164510040883200']}, {'input': '4\\r\\n', 'output': ['3']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '14\\r\\n', 'output': ['889574400']}, {'input': '6\\r\\n', 'output': ['40']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":149,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1 3 3 2\", \"3\\n1 1 1\", \"4\\n42 0 0 42\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100)\u00a0\u2014 the number of participants. The next line contains a sequence of n integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u2009600)\u00a0\u2014 participants' scores. It's guaranteed that at least one participant has non-zero score.","src_uid":"3b520c15ea9a11b16129da30dcfb5161","source_code":"#include \n#include \n#include \n#include \n#include \n\n\/* A. Olympiad *\/\n\nusing namespace std;\ntypedef long long ll;\n\nint n, a[105], res, vis[605];\n\nint main(int argc, char * argv[]) \n{\n\tscanf(\"%d\", &n);\n for (int i = 0; i < n; i ++)\n scanf(\"%d\", &a[i]);\n sort(a, a + n);\n res = 0;\n memset(vis, 0, sizeof(vis));\n for (int i = 0; i < n; i ++)\n {\n \tif (a[i] != 0 && !vis[a[i]])\n \t{\n \t\tres ++;\n \t\tvis[a[i]] = 1;\n \t}\n }\n cout << res << endl;\n return 0;\n}","sample_outputs":"[\"3\", \"1\", \"1\"]","lang_cluster":"C++","notes":"NoteThere are three ways to choose a subset in sample case one. Only participants with 3 points will get diplomas. Participants with 2 or 3 points will get diplomas. Everyone will get a diploma! The only option in sample case two is to award everyone.Note that in sample case three participants with zero scores cannot get anything.","output_specification":"Print a single integer\u00a0\u2014 the desired number of ways.","description":"The recent All-Berland Olympiad in Informatics featured n participants with each scoring a certain amount of points.As the head of the programming committee, you are to determine the set of participants to be awarded with diplomas with respect to the following criteria: At least one participant should get a diploma. None of those with score equal to zero should get awarded. When someone is awarded, all participants with score not less than his score should also be awarded. Determine the number of ways to choose a subset of participants that will receive the diplomas.","human_testcases":"[{\"input\": \"4\\r\\n1 3 3 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n42 0 0 42\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n1 0 1 0 1 0 0 0 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n572 471 540 163 50 30 561 510 43 200\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100\\r\\n122 575 426 445 172 81 247 429 97 202 175 325 382 384 417 356 132 502 328 537 57 339 518 211 479 306 140 168 268 16 140 263 593 249 391 310 555 468 231 180 157 18 334 328 276 155 21 280 322 545 111 267 467 274 291 304 235 34 365 180 21 95 501 552 325 331 302 353 296 22 289 399 7 466 32 302 568 333 75 192 284 10 94 128 154 512 9 480 243 521 551 492 420 197 207 125 367 117 438 600\\r\\n\", \"output\": [\"94\"]}, {\"input\": \"100\\r\\n600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"78\\r\\n5 4 13 2 5 6 2 10 10 1 2 6 7 9 6 3 5 7 1 10 2 2 7 0 2 11 11 3 1 13 3 10 6 2 0 3 0 5 0 1 4 11 1 1 7 0 12 7 5 12 0 2 12 9 8 3 4 3 4 11 4 10 2 3 10 12 5 6 1 11 2 0 8 7 9 1 3 12\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"34\\r\\n220 387 408 343 184 447 197 307 337 414 251 319 426 322 347 242 208 412 188 185 241 235 216 259 331 372 322 284 444 384 214 297 389 391\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"100\\r\\n1 2 1 0 3 0 2 0 0 1 2 0 1 3 0 3 3 1 3 0 0 2 1 2 2 1 3 3 3 3 3 2 0 0 2 1 2 3 2 3 0 1 1 3 3 2 0 3 1 0 2 2 2 1 2 3 2 1 0 3 0 2 0 3 0 2 1 0 3 1 0 2 2 1 3 1 3 0 2 3 3 1 1 3 1 3 0 3 2 0 2 3 3 0 2 0 2 0 1 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n572 471 540 163 50 30 561 510 43 200 213 387 500 424 113 487 357 333 294 337 435 202 447 494 485 465 161 344 470 559 104 356 393 207 224 213 511 514 60 386 149 216 392 229 429 173 165 401 395 150 127 579 344 390 529 296 225 425 318 79 465 447 177 110 367 212 459 270 41 500 277 567 125 436 178 9 214 342 203 112 144 24 79 155 495 556 40 549 463 281 241 316 2 246 1 396 510 293 332 55\\r\\n\", \"output\": [\"93\"]}, {\"input\": \"99\\r\\n5 4 13 2 5 6 2 10 10 1 2 6 7 9 6 3 5 7 1 10 2 2 7 0 2 11 11 3 1 13 3 10 6 2 0 3 0 5 0 1 4 11 1 1 7 0 12 7 5 12 0 2 12 9 8 3 4 3 4 11 4 10 2 3 10 12 5 6 1 11 2 0 8 7 9 1 3 12 2 3 9 3 7 13 7 13 0 11 8 12 2 5 9 4 0 6 6 2 13\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"99\\r\\n1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"99\\r\\n21 74 25 44 71 80 46 28 96 1 74 24 81 83 16 55 31 1 27 36 56 38 17 10 78 5 39 67 67 15 39 62 92 48 90 9 54 67 30 79 56 17 33 27 75 54 20 79 21 44 10 66 66 73 90 3 34 33 64 79 20 94 0 51 24 30 1 52 95 21 88 98 6 65 31 1 67 32 74 91 83 9 93 27 53 11 8 79 42 20 50 91 19 96 6 24 66 16 37\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"2\\r\\n0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n0 600\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n1 1 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n0 0 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n0 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n1 0 0 1 2\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n0 5\\r\\n', 'output': ['1']}, {'input': '100\\r\\n1 2 1 0 3 0 2 0 0 1 2 0 1 3 0 3 3 1 3 0 0 2 1 2 2 1 3 3 3 3 3 2 0 0 2 1 2 3 2 3 0 1 1 3 3 2 0 3 1 0 2 2 2 1 2 3 2 1 0 3 0 2 0 3 0 2 1 0 3 1 0 2 2 1 3 1 3 0 2 3 3 1 1 3 1 3 0 3 2 0 2 3 3 0 2 0 2 0 1 3\\r\\n', 'output': ['3']}, {'input': '99\\r\\n1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 0 1 0 0 0 1 1 0 0 0 0 0 1\\r\\n', 'output': ['1']}, {'input': '100\\r\\n600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600\\r\\n', 'output': ['1']}, {'input': '78\\r\\n5 4 13 2 5 6 2 10 10 1 2 6 7 9 6 3 5 7 1 10 2 2 7 0 2 11 11 3 1 13 3 10 6 2 0 3 0 5 0 1 4 11 1 1 7 0 12 7 5 12 0 2 12 9 8 3 4 3 4 11 4 10 2 3 10 12 5 6 1 11 2 0 8 7 9 1 3 12\\r\\n', 'output': ['13']}]","human_sample_testcases_2":"[{'input': '100\\r\\n122 575 426 445 172 81 247 429 97 202 175 325 382 384 417 356 132 502 328 537 57 339 518 211 479 306 140 168 268 16 140 263 593 249 391 310 555 468 231 180 157 18 334 328 276 155 21 280 322 545 111 267 467 274 291 304 235 34 365 180 21 95 501 552 325 331 302 353 296 22 289 399 7 466 32 302 568 333 75 192 284 10 94 128 154 512 9 480 243 521 551 492 420 197 207 125 367 117 438 600\\r\\n', 'output': ['94']}, {'input': '2\\r\\n0 5\\r\\n', 'output': ['1']}, {'input': '10\\r\\n1 0 1 0 1 0 0 0 0 1\\r\\n', 'output': ['1']}, {'input': '100\\r\\n600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600\\r\\n', 'output': ['1']}, {'input': '4\\r\\n0 0 1 2\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '99\\r\\n21 74 25 44 71 80 46 28 96 1 74 24 81 83 16 55 31 1 27 36 56 38 17 10 78 5 39 67 67 15 39 62 92 48 90 9 54 67 30 79 56 17 33 27 75 54 20 79 21 44 10 66 66 73 90 3 34 33 64 79 20 94 0 51 24 30 1 52 95 21 88 98 6 65 31 1 67 32 74 91 83 9 93 27 53 11 8 79 42 20 50 91 19 96 6 24 66 16 37\\r\\n', 'output': ['61']}, {'input': '5\\r\\n1 0 0 1 2\\r\\n', 'output': ['2']}, {'input': '1\\r\\n5\\r\\n', 'output': ['1']}, {'input': '2\\r\\n0 5\\r\\n', 'output': ['1']}, {'input': '78\\r\\n5 4 13 2 5 6 2 10 10 1 2 6 7 9 6 3 5 7 1 10 2 2 7 0 2 11 11 3 1 13 3 10 6 2 0 3 0 5 0 1 4 11 1 1 7 0 12 7 5 12 0 2 12 9 8 3 4 3 4 11 4 10 2 3 10 12 5 6 1 11 2 0 8 7 9 1 3 12\\r\\n', 'output': ['13']}]","human_sample_testcases_4":"[{'input': '10\\r\\n1 0 1 0 1 0 0 0 0 1\\r\\n', 'output': ['1']}, {'input': '2\\r\\n0 5\\r\\n', 'output': ['1']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['1']}, {'input': '5\\r\\n1 0 0 1 2\\r\\n', 'output': ['2']}, {'input': '100\\r\\n572 471 540 163 50 30 561 510 43 200 213 387 500 424 113 487 357 333 294 337 435 202 447 494 485 465 161 344 470 559 104 356 393 207 224 213 511 514 60 386 149 216 392 229 429 173 165 401 395 150 127 579 344 390 529 296 225 425 318 79 465 447 177 110 367 212 459 270 41 500 277 567 125 436 178 9 214 342 203 112 144 24 79 155 495 556 40 549 463 281 241 316 2 246 1 396 510 293 332 55\\r\\n', 'output': ['93']}]","human_sample_testcases_5":"[{'input': '78\\r\\n5 4 13 2 5 6 2 10 10 1 2 6 7 9 6 3 5 7 1 10 2 2 7 0 2 11 11 3 1 13 3 10 6 2 0 3 0 5 0 1 4 11 1 1 7 0 12 7 5 12 0 2 12 9 8 3 4 3 4 11 4 10 2 3 10 12 5 6 1 11 2 0 8 7 9 1 3 12\\r\\n', 'output': ['13']}, {'input': '2\\r\\n0 600\\r\\n', 'output': ['1']}, {'input': '100\\r\\n572 471 540 163 50 30 561 510 43 200 213 387 500 424 113 487 357 333 294 337 435 202 447 494 485 465 161 344 470 559 104 356 393 207 224 213 511 514 60 386 149 216 392 229 429 173 165 401 395 150 127 579 344 390 529 296 225 425 318 79 465 447 177 110 367 212 459 270 41 500 277 567 125 436 178 9 214 342 203 112 144 24 79 155 495 556 40 549 463 281 241 316 2 246 1 396 510 293 332 55\\r\\n', 'output': ['93']}, {'input': '100\\r\\n600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600\\r\\n', 'output': ['1']}, {'input': '34\\r\\n220 387 408 343 184 447 197 307 337 414 251 319 426 322 347 242 208 412 188 185 241 235 216 259 331 372 322 284 444 384 214 297 389 391\\r\\n', 'output': ['33']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":150,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\", \"7\", \"12\"]","input_specification":"The only line contains integer n from the problem's statement (1\u2009\u2264\u2009n\u2009\u2264\u2009109).","src_uid":"2468eead8acc5b8f5ddc51bfa2bd4fb7","source_code":"#include\n#include\n#include\n#include\n#include \n#include\nusing namespace std;\ntypedef long long ll;\ntypedef pairpii;\n\/\/typedef bitset<8> mask;\n\/\/int x4[4]={1,0,0,-1};\n\/\/int y4[4]={0,1,-1,0};\nll n,x,y,z,ans1=1e18+20,ans2=-100000000;\nint main()\n{\n \/\/cout<>n;\nfor(int i=1;i<=1000;i++)\n{\n for(int j=i;j*i<=1000000;j++)\n {\n if(n%(i*j)==0&&n\/(i*j)>=j)\n {\n x=i;y=j;z=n\/(x*y);\n ans1=min(ans1,(z+2)*(y+2)*(x+1)-n);\n ans2=max(ans2,(z+1)*(y+2)*(x+2)-n);\n }\n\n\n }\n}\n\/\/cout<> TheCoderJU (BISHAL) *\n ************************************************************* *\/\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nusing namespace std;\nint i,j,k,m,n,tc,sm,cnt=0,tmp,w,b,cs=1,p,q,f=1,g=1;\nstring s,s1,sw[10000];\nint main()\n{\n f=1;\n for(i=1;i<=8;i++)\n {\n cin>>sw[i];\n cnt=0;\n for(j=0;i\n\nusing namespace std;\n\ntypedef long long int ll;\ntypedef long double ld;\n\nconst ll inf = LLONG_MAX;\n\n#define rel( i, a, b) for( ll i = a ; i <= b ; i++ )\n#define rep( k, a, b) for( ll k = a ; k <= b ; k+=2*k )\n#define rev( i, a, b) for( ll i = b ; i >= a ; i-- )\n#define M 1000000007\n#define pll pair\n#define vll vector\n#define vpll vector\n#define mll map\n#define mpll map\n#define sll set\n#define spll set\n#define msll multiset\n#define F first\n#define S second\n#define pb push_back\n#define mp make_pair\n#define FIO ios::sync_with_stdio(false);cin.tie(0);cerr.tie(0)\n#define lb lower_bound\n#define ub upper_bound\n#define fprint(x) cout << fixed << setprecision(10) << (ld)x;\nll n, m;\nll mini, maxi;\n\nint main()\n{\n\tcin >> n >> m;\n\t\n\tll t1, t2;\n\t\n\tt1 = n\/m;\n\t\n\tmini = m*((t1*(t1-1))\/2);\n\t\n\tif( n % m != 0 ){\n\t\tll t = n%m;\n\t\t\n\t\tmini += t1*t;\n\t}\n\t\n\tmaxi = ((n-m+1)*(n-m))\/2;\n\t\n\tcout << mini << \" \" << maxi;\n\t\n\treturn 0;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","sample_outputs":"[\"10 10\", \"1 1\", \"3 6\"]","lang_cluster":"C++","notes":"NoteIn the first sample all the participants get into one team, so there will be exactly ten pairs of friends.In the second sample at any possible arrangement one team will always have two participants and the other team will always have one participant. Thus, the number of pairs of friends will always be equal to one.In the third sample minimum number of newly formed friendships can be achieved if participants were split on teams consisting of 2 people, maximum number can be achieved if participants were split on teams of 1, 1 and 4 people.","output_specification":"The only line of the output should contain two integers kmin and kmax \u2014 the minimum possible number of pairs of friends and the maximum possible number of pairs of friends respectively.","description":"n participants of the competition were split into m teams in some manner so that each team has at least one participant. After the competition each pair of participants from the same team became friends.Your task is to write a program that will find the minimum and the maximum number of pairs of friends that could have formed by the end of the competition.","human_testcases":"[{\"input\": \"5 1\\r\\n\", \"output\": [\"10 10\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"6 3\\r\\n\", \"output\": [\"3 6\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"2 3\"]}, {\"input\": \"10 2\\r\\n\", \"output\": [\"20 36\"]}, {\"input\": \"10 6\\r\\n\", \"output\": [\"4 10\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"499999999500000000 499999999500000000\"]}, {\"input\": \"5000000 12\\r\\n\", \"output\": [\"1041664166668 12499942500066\"]}, {\"input\": \"1833 195\\r\\n\", \"output\": [\"7722 1342341\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1000000000 1000000\\r\\n\", \"output\": [\"499500000000 499000500499500000\"]}, {\"input\": \"1000000000 32170\\r\\n\", \"output\": [\"15541930838100 499967831017438365\"]}, {\"input\": \"1000000 1000\\r\\n\", \"output\": [\"499500000 499000999500\"]}, {\"input\": \"1234 1123\\r\\n\", \"output\": [\"111 6216\"]}, {\"input\": \"599222887 298488\\r\\n\", \"output\": [\"601178656545 179355218158217800\"]}, {\"input\": \"999999999 500000000\\r\\n\", \"output\": [\"499999999 124999999750000000\"]}, {\"input\": \"1000000000 384842119\\r\\n\", \"output\": [\"845473643 189209609585784021\"]}, {\"input\": \"1000000000 2\\r\\n\", \"output\": [\"249999999500000000 499999998500000001\"]}, {\"input\": \"1000000000 999999999\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"38447 383\\r\\n\", \"output\": [\"1910550 724453080\"]}, {\"input\": \"100000000 99999799\\r\\n\", \"output\": [\"201 20301\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"10 10\\r\\n\", \"output\": [\"0 0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 1000000\\r\\n', 'output': ['499500000000 499000500499500000']}, {'input': '5 1\\r\\n', 'output': ['10 10']}, {'input': '5000000 12\\r\\n', 'output': ['1041664166668 12499942500066']}, {'input': '1000000000 1\\r\\n', 'output': ['499999999500000000 499999999500000000']}, {'input': '6 3\\r\\n', 'output': ['3 6']}]","human_sample_testcases_2":"[{'input': '599222887 298488\\r\\n', 'output': ['601178656545 179355218158217800']}, {'input': '5000000 12\\r\\n', 'output': ['1041664166668 12499942500066']}, {'input': '1000000 1000\\r\\n', 'output': ['499500000 499000999500']}, {'input': '999999999 500000000\\r\\n', 'output': ['499999999 124999999750000000']}, {'input': '5 1\\r\\n', 'output': ['10 10']}]","human_sample_testcases_3":"[{'input': '3 2\\r\\n', 'output': ['1 1']}, {'input': '599222887 298488\\r\\n', 'output': ['601178656545 179355218158217800']}, {'input': '1 1\\r\\n', 'output': ['0 0']}, {'input': '1000000000 2\\r\\n', 'output': ['249999999500000000 499999998500000001']}, {'input': '38447 383\\r\\n', 'output': ['1910550 724453080']}]","human_sample_testcases_4":"[{'input': '1000000 1000\\r\\n', 'output': ['499500000 499000999500']}, {'input': '1000000000 384842119\\r\\n', 'output': ['845473643 189209609585784021']}, {'input': '1000000000 1\\r\\n', 'output': ['499999999500000000 499999999500000000']}, {'input': '1000000000 1000000000\\r\\n', 'output': ['0 0']}, {'input': '1000000000 999999999\\r\\n', 'output': ['1 1']}]","human_sample_testcases_5":"[{'input': '1234 1123\\r\\n', 'output': ['111 6216']}, {'input': '38447 383\\r\\n', 'output': ['1910550 724453080']}, {'input': '5000000 12\\r\\n', 'output': ['1041664166668 12499942500066']}, {'input': '1000000000 1000000000\\r\\n', 'output': ['0 0']}, {'input': '1000000 1000\\r\\n', 'output': ['499500000 499000999500']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":153,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\\n8 8\", \"4\\n3 1 4 1\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$2 \\leq n \\leq 50$$$)\u00a0\u2014 the number of piles. It is guaranteed that $$$n$$$ is an even number. The second line contains $$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$ ($$$1 \\leq a_i \\leq 50$$$)\u00a0\u2014 the number of stones in the piles.","src_uid":"4b9cf82967aa8441e9af3db3101161e9","source_code":"#include \nusing namespace std;\n\nconst int N = 1e5 + 5;\n\nint n, a[N], cnt;\n\nint main(){\n\n\n\n ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);\n cin >> n;\n for (int i = 1; i <= n; ++i) cin >> a[i];\n sort(a + 1, a + n + 1);\n for (int i = 1; i <= n; ++i)\n if (a[i] == a[1]) ++cnt;\n if (cnt <= n >> 1) return cout << \"Alice\", 0;\n cout << \"Bob\";\n\n}\n","sample_outputs":"[\"Bob\", \"Alice\"]","lang_cluster":"C++","notes":"NoteIn the first example, each player can only remove stones from one pile ($$$\\frac{2}{2}=1$$$). Alice loses, since Bob can copy whatever Alice does on the other pile, so Alice will run out of moves first.In the second example, Alice can remove $$$2$$$ stones from the first pile and $$$3$$$ stones from the third pile on her first move to guarantee a win.","output_specification":"Print a single string \"Alice\" if Alice wins; otherwise, print \"Bob\" (without double quotes).","description":"Alice and Bob are playing a game with $$$n$$$ piles of stones. It is guaranteed that $$$n$$$ is an even number. The $$$i$$$-th pile has $$$a_i$$$ stones.Alice and Bob will play a game alternating turns with Alice going first.On a player's turn, they must choose exactly $$$\\frac{n}{2}$$$ nonempty piles and independently remove a positive number of stones from each of the chosen piles. They can remove a different number of stones from the piles in a single turn. The first player unable to make a move loses (when there are less than $$$\\frac{n}{2}$$$ nonempty piles).Given the starting configuration, determine who will win the game.","human_testcases":"[{\"input\": \"2\\r\\n8 8\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"4\\r\\n3 1 4 1\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n42 49 42 42\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"8\\r\\n11 21 31 41 41 31 21 11\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"10\\r\\n21 4 7 21 18 38 12 17 21 13\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"12\\r\\n33 26 11 11 32 25 18 24 27 47 28 7\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"14\\r\\n4 10 7 13 27 28 13 34 16 18 39 26 29 22\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"16\\r\\n47 27 33 49 2 47 48 9 37 39 5 24 38 38 4 32\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"18\\r\\n38 48 13 15 18 16 44 46 17 30 16 33 43 12 9 48 31 37\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"20\\r\\n28 10 4 31 4 49 50 1 40 43 31 49 34 16 34 38 50 40 10 10\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"22\\r\\n37 35 37 35 39 42 35 35 49 50 42 35 40 36 35 35 35 43 35 35 35 35\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"24\\r\\n31 6 41 46 36 37 6 50 50 6 6 6 6 6 6 6 39 45 40 6 35 6 6 6\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"26\\r\\n8 47 49 44 33 43 33 8 29 41 8 8 8 8 8 8 41 47 8 8 8 8 43 8 32 8\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"28\\r\\n48 14 22 14 14 14 14 14 47 39 14 36 14 14 49 41 36 45 14 34 14 14 14 14 14 45 25 41\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"30\\r\\n7 47 7 40 35 37 7 42 40 7 7 7 7 7 35 7 47 7 34 7 7 33 7 7 41 7 46 33 44 7\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"50\\r\\n44 25 36 44 25 7 28 33 35 16 31 17 50 48 6 42 47 36 9 11 31 27 28 20 34 47 24 44 38 50 46 9 38 28 9 10 28 42 37 43 29 42 38 43 41 25 12 29 26 36\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n42 4 18 29 37 36 41 41 34 32 1 50 15 25 46 22 9 38 48 49 5 50 2 14 15 10 27 34 46 50 30 6 19 39 45 36 39 50 8 13 13 24 27 5 25 19 42 46 11 30\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n40 9 43 18 39 35 35 46 48 49 26 34 28 50 14 34 17 3 13 8 8 48 17 43 42 21 43 30 45 12 43 13 25 30 39 5 19 3 19 6 12 30 19 46 48 24 14 33 6 19\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n11 6 26 45 49 26 50 31 21 21 10 19 39 50 16 8 39 35 29 14 17 9 34 13 44 28 20 23 32 37 16 4 21 40 10 42 2 2 38 30 9 24 42 30 30 15 18 38 47 12\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n20 12 45 12 15 49 45 7 27 20 32 47 50 16 37 4 9 33 5 27 6 18 42 35 21 9 27 14 50 24 23 5 46 12 29 45 17 38 20 12 32 27 43 49 17 4 45 2 50 4\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"40\\r\\n48 29 48 31 39 16 17 11 20 11 33 29 18 42 39 26 43 43 22 28 1 5 33 49 7 18 6 3 33 41 41 40 25 25 37 47 12 42 23 27\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"40\\r\\n32 32 34 38 1 50 18 26 16 14 13 26 10 15 20 28 19 49 17 14 8 6 45 32 15 37 14 15 21 21 42 33 12 14 34 44 38 25 24 15\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"40\\r\\n36 34 16 47 49 45 46 16 46 2 30 23 2 20 4 8 28 38 20 3 50 40 21 48 45 25 41 14 37 17 5 3 33 33 49 47 48 32 47 2\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"40\\r\\n46 2 26 49 34 10 12 47 36 44 15 36 48 23 30 4 36 26 23 32 31 13 34 15 10 41 17 32 33 25 12 36 9 31 25 9 46 28 6 30\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"40\\r\\n17 8 23 16 25 37 11 16 16 29 25 38 31 45 14 46 40 24 49 44 21 12 29 18 33 35 7 47 41 48 24 39 8 37 29 13 12 21 44 19\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"42\\r\\n13 33 2 18 5 25 29 15 38 11 49 14 38 16 34 3 5 35 1 39 45 4 32 15 30 23 48 22 9 34 42 34 8 36 39 5 27 22 8 38 26 31\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"42\\r\\n7 6 9 5 18 8 16 46 10 48 43 20 14 20 16 24 2 12 26 5 9 48 4 47 39 31 2 30 36 47 10 43 16 19 50 48 18 43 35 38 9 45\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"42\\r\\n49 46 12 3 38 7 32 7 25 40 20 25 2 43 17 28 28 50 35 35 22 42 15 13 44 14 27 30 26 7 29 31 40 39 18 42 11 3 32 48 34 11\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"42\\r\\n3 50 33 31 8 19 3 36 41 50 2 22 9 40 39 22 30 34 43 25 42 39 40 8 18 1 25 13 50 11 48 10 11 4 3 47 2 35 25 39 31 36\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"42\\r\\n20 38 27 15 6 17 21 42 31 38 43 20 31 12 29 3 11 45 44 22 10 2 14 20 39 33 47 6 11 43 41 1 14 27 24 41 9 4 7 26 8 21\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"44\\r\\n50 32 33 26 39 26 26 46 26 28 26 38 26 26 26 32 26 46 26 35 28 26 41 37 26 41 26 26 45 26 44 50 42 26 39 26 46 26 26 28 26 26 26 26\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"44\\r\\n45 18 18 39 35 30 34 18 28 18 47 18 18 18 18 18 40 18 18 49 31 35 18 18 35 36 18 18 28 18 18 42 32 18 18 31 37 27 18 18 18 37 18 37\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"44\\r\\n28 28 36 40 28 28 35 28 28 33 33 28 28 28 28 47 28 43 28 28 35 38 49 40 28 28 34 39 45 32 28 28 28 50 39 28 32 28 50 32 28 33 28 28\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"44\\r\\n27 40 39 38 27 49 27 33 45 34 27 39 49 27 27 27 27 27 27 39 49 27 27 27 27 27 38 39 43 44 45 44 33 27 27 27 27 27 42 27 47 27 42 27\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"44\\r\\n37 43 3 3 36 45 3 3 30 3 30 29 3 3 3 3 36 34 31 38 3 38 3 48 3 3 3 3 46 49 30 50 3 42 3 3 3 37 3 3 41 3 49 3\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"46\\r\\n35 37 27 27 27 33 27 34 32 34 32 38 27 50 27 27 29 27 35 45 27 27 27 32 30 27 27 27 47 27 27 27 27 38 33 27 43 49 29 27 31 27 27 27 38 27\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"46\\r\\n15 15 36 15 30 15 15 45 20 29 41 37 15 15 15 15 22 22 38 15 15 15 15 47 15 39 15 15 15 15 42 15 15 34 24 30 21 39 15 22 15 24 15 35 15 21\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"46\\r\\n39 18 30 18 43 18 18 18 18 18 18 36 18 39 32 46 32 18 18 18 18 18 18 38 43 44 48 18 34 35 18 46 30 18 18 45 43 18 18 18 44 30 18 18 44 33\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"46\\r\\n14 14 14 14 14 14 30 45 42 30 42 14 14 34 14 14 42 28 14 14 37 14 25 49 34 14 46 14 14 40 49 44 40 47 14 14 14 26 14 14 14 46 14 31 30 14\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"46\\r\\n14 14 48 14 14 22 14 14 14 14 40 14 14 33 14 32 49 40 14 34 14 14 14 14 46 42 14 43 14 41 22 50 14 32 14 49 14 31 47 50 47 14 14 14 44 22\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"48\\r\\n9 36 47 31 48 33 39 9 23 3 18 44 33 49 26 10 45 12 28 30 5 22 41 27 19 44 44 27 9 46 24 22 11 28 41 48 45 1 10 42 19 34 40 8 36 48 43 50\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"48\\r\\n12 19 22 48 21 19 18 49 10 50 31 40 19 19 44 33 6 12 31 11 5 47 26 48 2 17 6 37 17 25 20 42 30 35 37 41 32 45 47 38 44 41 20 31 47 39 3 45\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"48\\r\\n33 47 6 10 28 22 41 45 27 19 45 18 29 10 35 18 39 29 8 10 9 1 9 23 10 11 3 14 12 15 35 29 29 18 12 49 27 18 18 45 29 32 15 21 34 1 43 9\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"48\\r\\n13 25 45 45 23 29 11 30 40 10 49 32 44 50 35 7 48 37 17 43 45 50 48 31 41 6 3 32 33 22 41 4 1 30 16 9 48 46 17 29 45 12 49 42 21 1 13 10\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"48\\r\\n47 3 12 9 37 19 8 9 10 11 48 28 6 8 12 48 44 1 15 8 48 10 33 11 42 24 45 27 8 30 48 40 3 15 34 17 2 32 30 50 9 11 7 33 41 33 27 17\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n44 4 19 9 41 48 31 39 30 16 27 38 37 45 12 36 37 25 35 19 43 22 36 26 26 49 23 4 33 2 31 26 36 38 41 30 42 18 45 24 23 14 32 37 44 13 4 39 46 7\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n4 36 10 48 17 28 14 7 47 38 13 3 1 48 28 21 12 49 1 35 16 9 15 42 36 34 10 28 27 23 47 36 33 44 44 26 3 43 31 32 26 36 41 44 10 8 29 1 36 9\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n13 10 50 35 23 34 47 25 39 11 50 41 20 48 10 10 1 2 41 16 14 50 49 42 48 39 16 9 31 30 22 2 25 40 6 8 34 4 2 46 14 6 6 38 45 30 27 36 49 18\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n42 31 49 11 28 38 49 32 15 22 10 18 43 39 46 32 10 19 13 32 19 40 34 28 28 39 19 3 1 47 10 18 19 31 21 7 39 37 34 45 19 21 35 46 10 24 45 33 20 40\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"50\\r\\n28 30 40 25 47 47 3 22 28 10 37 15 11 18 31 36 35 18 34 3 21 16 24 29 12 29 42 23 25 8 7 10 43 24 40 29 3 6 14 28 2 32 29 18 47 4 6 45 42 40\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 4 4 4\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 2 2 2\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"2\\r\\n1 1\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"4\\r\\n3 4 4 4\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n2 2 2 1\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 3 3 3\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"6\\r\\n4 4 4 4 4 1\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 50 50 50\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"6\\r\\n1 2 2 2 2 3\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 2 2 3\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n2 1 1 1\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"6\\r\\n1 1 2 2 3 3\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n1 1 1 4\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"6\\r\\n1 2 2 2 2 2\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"6\\r\\n1 2 2 2 2 4\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"4\\r\\n2 3 3 3\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"6\\r\\n1 1 2 2 2 2\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"8\\r\\n1 1 1 1 1 1 6 6\\r\\n\", \"output\": [\"Bob\"]}, {\"input\": \"8\\r\\n1 1 2 2 2 2 2 2\\r\\n\", \"output\": [\"Alice\"]}, {\"input\": \"8\\r\\n1 1 1 1 1 2 2 2\\r\\n\", \"output\": [\"Bob\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10\\r\\n21 4 7 21 18 38 12 17 21 13\\r\\n', 'output': ['Alice']}, {'input': '46\\r\\n35 37 27 27 27 33 27 34 32 34 32 38 27 50 27 27 29 27 35 45 27 27 27 32 30 27 27 27 47 27 27 27 27 38 33 27 43 49 29 27 31 27 27 27 38 27\\r\\n', 'output': ['Bob']}, {'input': '6\\r\\n1 2 2 2 2 2\\r\\n', 'output': ['Alice']}, {'input': '50\\r\\n20 12 45 12 15 49 45 7 27 20 32 47 50 16 37 4 9 33 5 27 6 18 42 35 21 9 27 14 50 24 23 5 46 12 29 45 17 38 20 12 32 27 43 49 17 4 45 2 50 4\\r\\n', 'output': ['Alice']}, {'input': '50\\r\\n11 6 26 45 49 26 50 31 21 21 10 19 39 50 16 8 39 35 29 14 17 9 34 13 44 28 20 23 32 37 16 4 21 40 10 42 2 2 38 30 9 24 42 30 30 15 18 38 47 12\\r\\n', 'output': ['Alice']}]","human_sample_testcases_2":"[{'input': '6\\r\\n1 1 2 2 3 3\\r\\n', 'output': ['Alice']}, {'input': '22\\r\\n37 35 37 35 39 42 35 35 49 50 42 35 40 36 35 35 35 43 35 35 35 35\\r\\n', 'output': ['Bob']}, {'input': '14\\r\\n4 10 7 13 27 28 13 34 16 18 39 26 29 22\\r\\n', 'output': ['Alice']}, {'input': '8\\r\\n1 1 1 1 1 2 2 2\\r\\n', 'output': ['Bob']}, {'input': '50\\r\\n28 30 40 25 47 47 3 22 28 10 37 15 11 18 31 36 35 18 34 3 21 16 24 29 12 29 42 23 25 8 7 10 43 24 40 29 3 6 14 28 2 32 29 18 47 4 6 45 42 40\\r\\n', 'output': ['Alice']}]","human_sample_testcases_3":"[{'input': '6\\r\\n4 4 4 4 4 1\\r\\n', 'output': ['Alice']}, {'input': '6\\r\\n1 2 2 2 2 4\\r\\n', 'output': ['Alice']}, {'input': '40\\r\\n17 8 23 16 25 37 11 16 16 29 25 38 31 45 14 46 40 24 49 44 21 12 29 18 33 35 7 47 41 48 24 39 8 37 29 13 12 21 44 19\\r\\n', 'output': ['Alice']}, {'input': '48\\r\\n13 25 45 45 23 29 11 30 40 10 49 32 44 50 35 7 48 37 17 43 45 50 48 31 41 6 3 32 33 22 41 4 1 30 16 9 48 46 17 29 45 12 49 42 21 1 13 10\\r\\n', 'output': ['Alice']}, {'input': '46\\r\\n35 37 27 27 27 33 27 34 32 34 32 38 27 50 27 27 29 27 35 45 27 27 27 32 30 27 27 27 47 27 27 27 27 38 33 27 43 49 29 27 31 27 27 27 38 27\\r\\n', 'output': ['Bob']}]","human_sample_testcases_4":"[{'input': '44\\r\\n37 43 3 3 36 45 3 3 30 3 30 29 3 3 3 3 36 34 31 38 3 38 3 48 3 3 3 3 46 49 30 50 3 42 3 3 3 37 3 3 41 3 49 3\\r\\n', 'output': ['Bob']}, {'input': '18\\r\\n38 48 13 15 18 16 44 46 17 30 16 33 43 12 9 48 31 37\\r\\n', 'output': ['Alice']}, {'input': '44\\r\\n27 40 39 38 27 49 27 33 45 34 27 39 49 27 27 27 27 27 27 39 49 27 27 27 27 27 38 39 43 44 45 44 33 27 27 27 27 27 42 27 47 27 42 27\\r\\n', 'output': ['Bob']}, {'input': '50\\r\\n28 30 40 25 47 47 3 22 28 10 37 15 11 18 31 36 35 18 34 3 21 16 24 29 12 29 42 23 25 8 7 10 43 24 40 29 3 6 14 28 2 32 29 18 47 4 6 45 42 40\\r\\n', 'output': ['Alice']}, {'input': '24\\r\\n31 6 41 46 36 37 6 50 50 6 6 6 6 6 6 6 39 45 40 6 35 6 6 6\\r\\n', 'output': ['Bob']}]","human_sample_testcases_5":"[{'input': '6\\r\\n4 4 4 4 4 1\\r\\n', 'output': ['Alice']}, {'input': '6\\r\\n1 2 2 2 2 2\\r\\n', 'output': ['Alice']}, {'input': '4\\r\\n42 49 42 42\\r\\n', 'output': ['Bob']}, {'input': '48\\r\\n33 47 6 10 28 22 41 45 27 19 45 18 29 10 35 18 39 29 8 10 9 1 9 23 10 11 3 14 12 15 35 29 29 18 12 49 27 18 18 45 29 32 15 21 34 1 43 9\\r\\n', 'output': ['Alice']}, {'input': '8\\r\\n1 1 1 1 1 1 6 6\\r\\n', 'output': ['Bob']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":154,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n2 3 1 4\", \"4\\n4 4 4 4\", \"4\\n2 1 4 3\"]","input_specification":"The first line of input contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100)\u00a0\u2014 the number of people in Arpa's land. The second line contains n integers, i-th of them is crushi (1\u2009\u2264\u2009crushi\u2009\u2264\u2009n)\u00a0\u2014 the number of i-th person's crush.","src_uid":"149221131a978298ac56b58438df46c9","source_code":"#include \n\nint n,par[105];\nbool vis[105];\nint gcd(int a,int b){\n\tif(b==0)return a;\n\treturn gcd(b,a%b);\n}\nint main(){\n\tint ans=1;\n\tscanf(\"%i\",&n);\n\tfor(int i=1;i<=n;i++)scanf(\"%i\",&par[i]);\n\tfor(int j=1;j<=n;j++){\n\t\tif(vis[j])continue;\n\t\tbool valid=0;\n\t\tint pos=par[j];\n\t\tfor(int k=1;k<=n+2;k++){\n\t\t\tvis[pos]=1;\n\t\t\tif(pos==j){\n\t\t\t\tvalid=1;\n\t\t\t\tint fpb=gcd(ans,(k&1)?k:k\/2);\n\t\t\t\tans=(ans*((k&1)?k:k\/2))\/fpb;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpos=par[pos];\n\t\t}\n\t\tif(!valid){\n\t\t\tprintf(\"-1\\n\");\n\t\t\treturn 0;\n\t\t}\n\t}\n\tprintf(\"%i\\n\",ans);\n}\n","sample_outputs":"[\"3\", \"-1\", \"1\"]","lang_cluster":"C++","notes":"NoteIn the first sample suppose t\u2009=\u20093. If the first person starts some round:The first person calls the second person and says \"Owwwf\", then the second person calls the third person and says \"Owwf\", then the third person calls the first person and says \"Owf\", so the first person becomes Joon-Joon of the round. So the condition is satisfied if x is 1.The process is similar for the second and the third person.If the fourth person starts some round:The fourth person calls himself and says \"Owwwf\", then he calls himself again and says \"Owwf\", then he calls himself for another time and says \"Owf\", so the fourth person becomes Joon-Joon of the round. So the condition is satisfied when x is 4.In the last example if the first person starts a round, then the second person becomes the Joon-Joon, and vice versa.","output_specification":"If there is no t satisfying the condition, print -1. Otherwise print such smallest t.","description":"As you have noticed, there are lovely girls in Arpa\u2019s land.People in Arpa's land are numbered from 1 to n. Everyone has exactly one crush, i-th person's crush is person with the number crushi. Someday Arpa shouted Owf loudly from the top of the palace and a funny game started in Arpa's land. The rules are as follows.The game consists of rounds. Assume person x wants to start a round, he calls crushx and says: \"Oww...wwf\" (the letter w is repeated t times) and cuts off the phone immediately. If t\u2009>\u20091 then crushx calls crushcrushx and says: \"Oww...wwf\" (the letter w is repeated t\u2009-\u20091 times) and cuts off the phone immediately. The round continues until some person receives an \"Owf\" (t\u2009=\u20091). This person is called the Joon-Joon of the round. There can't be two rounds at the same time.Mehrdad has an evil plan to make the game more funny, he wants to find smallest t (t\u2009\u2265\u20091) such that for each person x, if x starts some round and y becomes the Joon-Joon of the round, then by starting from y, x would become the Joon-Joon of the round. Find such t for Mehrdad if it's possible.Some strange fact in Arpa's land is that someone can be himself's crush (i.e. crushi\u2009=\u2009i).","human_testcases":"[{\"input\": \"4\\r\\n2 3 1 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n4 4 4 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4\\r\\n2 1 4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n2 4 3 1 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5\\r\\n2 2 4 4 5\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5\\r\\n2 4 5 4 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"10\\r\\n8 10 4 3 2 1 9 6 5 7\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"10\\r\\n10 1 4 8 5 2 3 7 9 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n6 4 3 9 5 2 1 10 8 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n95 27 13 62 100 21 48 84 27 41 34 89 21 96 56 10 6 27 9 85 7 85 16 12 80 78 20 79 63 1 74 46 56 59 62 88 59 5 42 13 81 58 49 1 62 51 2 75 92 94 14 32 31 39 34 93 72 18 59 44 11 75 27 36 44 72 63 55 41 63 87 59 54 81 68 39 95 96 99 50 94 5 3 84 59 95 71 44 35 51 73 54 49 98 44 11 52 74 95 48\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n70 49 88 43 66 72 6 6 48 46 59 22 56 86 14 53 50 84 79 76 89 65 10 14 27 43 92 95 98 6 86 6 95 65 91 8 58 33 31 67 75 65 94 75 12 25 37 56 17 79 74 5 94 65 99 75 16 52 19 17 41 39 44 46 51 50 82 90 25 32 83 36 74 49 61 37 8 52 35 28 58 82 76 12 7 66 23 85 53 19 45 8 46 21 62 38 42 48 100 61\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n27 55 94 11 56 59 83 81 79 89 48 89 7 75 70 20 70 76 14 81 61 55 98 76 35 20 79 100 77 12 97 57 16 80 45 75 2 21 44 81 93 75 69 3 87 25 27 25 85 91 96 86 35 85 99 61 70 37 11 27 63 89 62 47 61 10 91 13 90 18 72 47 47 98 93 27 71 37 51 31 80 63 42 88 6 76 11 12 13 7 90 99 100 27 22 66 41 49 12 11\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n98 39 44 79 31 99 96 72 97 54 83 15 81 65 59 75 3 51 83 40 28 54 41 93 56 94 93 58 20 53 21 7 81 17 71 31 31 88 34 22 55 67 57 92 34 88 87 23 36 33 41 33 17 10 71 28 79 6 3 60 67 99 68 8 39 29 49 17 82 43 100 86 64 47 55 66 58 57 50 49 8 11 15 91 42 44 72 28 18 32 81 22 20 78 55 51 37 94 34 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n53 12 13 98 57 83 52 61 69 54 13 92 91 27 16 91 86 75 93 29 16 59 14 2 37 74 34 30 98 17 3 72 83 93 21 72 52 89 57 58 60 29 94 16 45 20 76 64 78 67 76 68 41 47 50 36 9 75 79 11 10 88 71 22 36 60 44 19 79 43 49 24 6 57 8 42 51 58 60 2 84 48 79 55 74 41 89 10 45 70 76 29 53 9 82 93 24 40 94 56\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n33 44 16 91 71 86 84 45 12 97 18 1 42 67 89 45 62 56 72 70 59 62 96 13 24 19 81 61 99 65 12 26 59 61 6 19 71 49 52 17 56 6 8 98 75 83 39 75 45 8 98 35 25 3 51 89 82 50 82 30 74 63 77 60 23 36 55 49 74 73 66 62 100 44 26 72 24 84 100 54 87 65 87 61 54 29 38 99 91 63 47 44 28 11 14 29 51 55 28 95\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n17 14 81 16 30 51 62 47 3 42 71 63 45 67 91 20 35 45 15 94 83 89 7 32 49 68 73 14 94 45 64 64 15 56 46 32 92 92 10 32 58 86 15 17 41 59 95 69 71 74 92 90 82 64 59 93 74 58 84 21 61 51 47 1 93 91 47 61 13 53 97 65 80 78 41 1 89 4 21 27 45 28 21 96 29 96 49 75 41 46 6 33 50 31 30 3 21 8 34 7\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n42 40 91 4 21 49 59 37 1 62 23 2 32 88 48 39 35 50 67 11 20 19 63 98 63 20 63 95 25 82 34 55 6 93 65 40 62 84 84 47 79 22 5 51 5 16 63 43 57 81 76 44 19 61 68 80 47 30 32 72 72 26 76 12 37 2 70 14 86 77 48 26 89 87 25 8 74 18 13 8 1 45 37 10 96 100 80 48 59 73 8 67 18 66 10 26 3 65 22 8\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n49 94 43 50 70 25 37 19 66 89 98 83 57 98 100 61 89 56 75 61 2 14 28 14 60 84 82 89 100 25 57 80 51 37 74 40 90 68 24 56 17 86 87 83 52 65 7 18 5 2 53 79 83 56 55 35 29 79 46 97 25 10 47 1 61 74 4 71 34 85 39 17 7 84 22 80 38 60 89 83 80 81 87 11 41 15 57 53 45 75 58 51 85 12 93 8 90 3 1 59\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n84 94 72 32 61 90 61 2 76 42 35 82 90 29 51 27 65 99 38 41 44 73 100 58 56 64 54 31 14 58 57 64 90 49 73 80 74 19 31 86 73 44 39 43 28 95 23 5 85 5 74 81 34 44 86 30 50 57 94 56 53 42 53 87 92 78 53 49 78 60 37 63 41 19 15 68 25 77 87 48 23 100 54 27 68 84 43 92 76 55 2 94 100 20 92 18 76 83 100 99\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n82 62 73 22 56 69 88 72 76 99 13 30 64 21 89 37 5 7 16 38 42 96 41 6 34 18 35 8 31 92 63 87 58 75 9 53 80 46 33 100 68 36 24 3 77 45 2 51 78 54 67 48 15 1 79 57 71 97 17 52 4 98 85 14 47 83 84 49 27 91 19 29 25 44 11 43 60 86 61 94 32 10 59 93 65 20 50 55 66 95 90 70 39 26 12 74 40 81 23 28\\r\\n\", \"output\": [\"1260\"]}, {\"input\": \"100\\r\\n23 12 62 61 32 22 34 91 49 44 59 26 7 89 98 100 60 21 30 9 68 97 33 71 67 83 45 38 5 8 2 65 16 69 18 82 72 27 78 73 35 48 29 36 66 54 95 37 10 19 20 77 1 17 87 70 42 4 50 53 63 94 93 56 24 88 55 6 11 58 39 75 90 40 57 79 47 31 41 51 52 85 14 13 99 64 25 46 15 92 28 86 43 76 84 96 3 74 81 80\\r\\n\", \"output\": [\"6864\"]}, {\"input\": \"100\\r\\n88 41 92 79 21 91 44 2 27 96 9 64 73 87 45 13 39 43 16 42 99 54 95 5 75 1 48 4 15 47 34 71 76 62 17 70 81 80 53 90 67 3 38 58 32 25 29 63 6 50 51 14 37 97 24 52 65 40 31 98 100 77 8 33 61 11 49 84 89 78 56 20 94 35 86 46 85 36 82 93 7 59 10 60 69 57 12 74 28 22 30 66 18 68 72 19 26 83 23 55\\r\\n\", \"output\": [\"360\"]}, {\"input\": \"100\\r\\n37 60 72 43 66 70 13 6 27 41 36 52 44 92 89 88 64 90 77 32 78 58 35 31 97 50 95 82 7 65 99 22 16 28 85 46 26 38 15 79 34 96 23 39 42 75 51 83 33 57 3 53 4 48 18 8 98 24 55 84 20 30 14 25 40 29 91 69 68 17 54 94 74 49 73 11 62 81 59 86 61 45 19 80 76 67 21 2 71 87 10 1 63 9 100 93 47 56 5 12\\r\\n\", \"output\": [\"1098\"]}, {\"input\": \"100\\r\\n79 95 49 70 84 28 89 18 5 3 57 30 27 19 41 46 12 88 2 75 58 44 31 16 8 83 87 68 90 29 67 13 34 17 1 72 80 15 20 4 22 37 92 7 98 96 69 76 45 91 82 60 93 78 86 39 21 94 77 26 14 59 24 56 35 71 52 38 48 100 32 74 9 54 47 63 23 55 51 81 53 33 6 36 62 11 42 73 43 99 50 97 61 85 66 65 25 10 64 40\\r\\n\", \"output\": [\"13090\"]}, {\"input\": \"100\\r\\n74 71 86 6 75 16 62 25 95 45 29 36 97 5 8 78 26 69 56 57 60 15 55 87 14 23 68 11 31 47 3 24 7 54 49 80 33 76 30 65 4 53 93 20 37 84 35 1 66 40 46 17 12 73 42 96 38 2 32 72 58 51 90 22 99 89 88 21 85 28 63 10 92 18 61 98 27 19 81 48 34 94 50 83 59 77 9 44 79 43 39 100 82 52 70 41 67 13 64 91\\r\\n\", \"output\": [\"4020\"]}, {\"input\": \"100\\r\\n58 65 42 100 48 22 62 16 20 2 19 8 60 28 41 90 39 31 74 99 34 75 38 82 79 29 24 84 6 95 49 43 94 81 51 44 77 72 1 55 47 69 15 33 66 9 53 89 97 67 4 71 57 18 36 88 83 91 5 61 40 70 10 23 26 30 59 25 68 86 85 12 96 46 87 14 32 11 93 27 54 37 78 92 52 21 80 13 50 17 56 35 73 98 63 3 7 45 64 76\\r\\n\", \"output\": [\"1098\"]}, {\"input\": \"100\\r\\n60 68 76 27 73 9 6 10 1 46 3 34 75 11 33 89 59 16 21 50 82 86 28 95 71 31 58 69 20 42 91 79 18 100 8 36 92 25 61 22 45 39 23 66 32 65 80 51 67 84 35 43 98 2 97 4 13 81 24 19 70 7 90 37 62 48 41 94 40 56 93 44 47 83 15 17 74 88 64 30 77 5 26 29 57 12 63 14 38 87 99 52 78 49 96 54 55 53 85 72\\r\\n\", \"output\": [\"132\"]}, {\"input\": \"100\\r\\n72 39 12 50 13 55 4 94 22 61 33 14 29 93 28 53 59 97 2 24 6 98 52 21 62 84 44 41 78 82 71 89 88 63 57 42 67 16 30 1 27 66 35 26 36 90 95 65 7 48 47 11 34 76 69 3 100 60 32 45 40 87 18 81 51 56 73 85 25 31 8 77 37 58 91 20 83 92 38 17 9 64 43 5 10 99 46 23 75 74 80 68 15 19 70 86 79 54 49 96\\r\\n\", \"output\": [\"4620\"]}, {\"input\": \"100\\r\\n91 50 1 37 65 78 73 10 68 84 54 41 80 59 2 96 53 5 19 58 82 3 88 34 100 76 28 8 44 38 17 15 63 94 21 72 57 31 33 40 49 56 6 52 95 66 71 20 12 16 35 75 70 39 4 60 45 9 89 18 87 92 85 46 23 79 22 24 36 81 25 43 11 86 67 27 32 69 77 26 42 98 97 93 51 61 48 47 62 90 74 64 83 30 14 55 13 29 99 7\\r\\n\", \"output\": [\"3498\"]}, {\"input\": \"100\\r\\n40 86 93 77 68 5 32 77 1 79 68 33 29 36 38 3 69 46 72 7 27 27 30 40 21 18 69 69 32 10 82 97 1 34 87 81 92 67 47 3 52 89 25 41 88 79 5 46 41 82 87 1 77 41 54 16 6 92 18 10 37 45 71 25 16 66 39 94 60 13 48 64 28 91 80 36 4 53 50 28 30 45 92 79 93 71 96 66 65 73 57 71 48 78 76 53 96 76 81 89\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n2 35 14 84 13 36 35 50 61 6 85 13 65 12 30 52 25 84 46 28 84 78 45 7 64 47 3 4 89 99 83 92 38 75 25 44 47 55 44 80 20 26 88 37 64 57 81 8 7 28 34 94 9 37 39 54 53 59 3 26 19 40 59 38 54 43 61 67 43 67 6 25 63 54 9 77 73 54 17 40 14 76 51 74 44 56 18 40 31 38 37 11 87 77 92 79 96 22 59 33\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n68 45 33 49 40 52 43 60 71 83 43 47 6 34 5 94 99 74 65 78 31 52 51 72 8 12 70 87 39 68 2 82 90 71 82 44 43 34 50 26 59 62 90 9 52 52 81 5 72 27 71 95 32 6 23 27 26 63 66 3 35 58 62 87 45 16 64 82 62 40 22 15 88 21 50 58 15 49 45 99 78 8 81 55 90 91 32 86 29 30 50 74 96 43 43 6 46 88 59 12\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n83 4 84 100 21 83 47 79 11 78 40 33 97 68 5 46 93 23 54 93 61 67 88 8 91 11 46 10 48 39 95 29 81 36 71 88 45 64 90 43 52 49 59 57 45 83 74 89 22 67 46 2 63 84 20 30 51 26 70 84 35 70 21 86 88 79 7 83 13 56 74 54 83 96 31 57 91 69 60 43 12 34 31 23 70 48 96 58 20 36 87 17 39 100 31 69 21 54 49 42\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n35 12 51 32 59 98 65 84 34 83 75 72 35 31 17 55 35 84 6 46 23 74 81 98 61 9 39 40 6 15 44 79 98 3 45 41 64 56 4 27 62 27 68 80 99 21 32 26 60 82 5 1 98 75 49 26 60 25 57 18 69 88 51 64 74 97 81 78 62 32 68 77 48 71 70 64 17 1 77 25 95 68 33 80 11 55 18 42 24 73 51 55 82 72 53 20 99 15 34 54\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n82 56 26 86 95 27 37 7 8 41 47 87 3 45 27 34 61 95 92 44 85 100 7 36 23 7 43 4 34 48 88 58 26 59 89 46 47 13 6 13 40 16 6 32 76 54 77 3 5 22 96 22 52 30 16 99 90 34 27 14 86 16 7 72 49 82 9 21 32 59 51 90 93 38 54 52 23 13 89 51 18 96 92 71 3 96 31 74 66 20 52 88 55 95 88 90 56 19 62 68\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n58 40 98 67 44 23 88 8 63 52 95 42 28 93 6 24 21 12 94 41 95 65 38 77 17 41 94 99 84 8 5 10 90 48 18 7 72 16 91 82 100 30 73 41 15 70 13 23 39 56 15 74 42 69 10 86 21 91 81 15 86 72 56 19 15 48 28 38 81 96 7 8 90 44 13 99 99 9 70 26 95 95 77 83 78 97 2 74 2 76 97 27 65 68 29 20 97 91 58 28\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n99 7 60 94 9 96 38 44 77 12 75 88 47 42 88 95 59 4 12 96 36 16 71 6 26 19 88 63 25 53 90 18 95 82 63 74 6 60 84 88 80 95 66 50 21 8 61 74 61 38 31 19 28 76 94 48 23 80 83 58 62 6 64 7 72 100 94 90 12 63 44 92 32 12 6 66 49 80 71 1 20 87 96 12 56 23 10 77 98 54 100 77 87 31 74 19 42 88 52 17\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n36 66 56 95 69 49 32 50 93 81 18 6 1 4 78 49 2 1 87 54 78 70 22 26 95 22 30 54 93 65 74 79 48 3 74 21 88 81 98 89 15 80 18 47 27 52 93 97 57 38 38 70 55 26 21 79 43 30 63 25 98 8 18 9 94 36 86 43 24 96 78 43 54 67 32 84 14 75 37 68 18 30 50 37 78 1 98 19 37 84 9 43 4 95 14 38 73 4 78 39\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n37 3 68 45 91 57 90 83 55 17 42 26 23 46 51 43 78 83 12 42 28 17 56 80 71 41 32 82 41 64 56 27 32 40 98 6 60 98 66 82 65 27 69 28 78 57 93 81 3 64 55 85 48 18 73 40 48 50 60 9 63 54 55 7 23 93 22 34 75 18 100 16 44 31 37 85 27 87 69 37 73 89 47 10 34 30 11 80 21 30 24 71 14 28 99 45 68 66 82 81\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n98 62 49 47 84 1 77 88 76 85 21 50 2 92 72 66 100 99 78 58 33 83 27 89 71 97 64 94 4 13 17 8 32 20 79 44 12 56 7 9 43 6 26 57 18 23 39 69 30 55 16 96 35 91 11 68 67 31 38 90 40 48 25 41 54 82 15 22 37 51 81 65 60 34 24 14 5 87 74 19 46 3 80 45 61 86 10 28 52 73 29 42 70 53 93 95 63 75 59 36\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"100\\r\\n57 60 40 66 86 52 88 4 54 31 71 19 37 16 73 95 98 77 92 59 35 90 24 96 10 45 51 43 91 63 1 80 14 82 21 29 2 74 99 8 79 76 56 44 93 17 12 33 87 46 72 83 36 49 69 22 3 38 15 13 34 20 42 48 25 28 18 9 50 32 67 84 62 97 68 5 27 65 30 6 81 26 39 41 55 11 70 23 7 53 64 85 100 58 78 75 94 47 89 61\\r\\n\", \"output\": [\"353430\"]}, {\"input\": \"100\\r\\n60 2 18 55 53 58 44 32 26 70 90 4 41 40 25 69 13 73 22 5 16 23 21 86 48 6 99 78 68 49 63 29 35 76 14 19 97 12 9 51 100 31 81 43 52 91 47 95 96 38 62 10 36 46 87 28 20 93 54 27 94 7 11 37 33 61 24 34 72 3 74 82 77 67 8 88 80 59 92 84 56 57 83 65 50 98 75 17 39 71 42 66 15 45 79 64 1 30 89 85\\r\\n\", \"output\": [\"1235\"]}, {\"input\": \"100\\r\\n9 13 6 72 98 70 5 100 26 75 25 87 35 10 95 31 41 80 91 38 61 64 29 71 52 63 24 74 14 56 92 85 12 73 59 23 3 39 30 42 68 47 16 18 8 93 96 67 48 89 53 77 49 62 44 33 83 57 81 55 28 76 34 36 88 37 17 11 40 90 46 84 94 60 4 51 69 21 50 82 97 1 54 2 65 32 15 22 79 27 99 78 20 43 7 86 45 19 66 58\\r\\n\", \"output\": [\"2376\"]}, {\"input\": \"100\\r\\n84 39 28 52 82 49 47 4 88 15 29 38 92 37 5 16 83 7 11 58 45 71 23 31 89 34 69 100 90 53 66 50 24 27 14 19 98 1 94 81 77 87 70 54 85 26 42 51 99 48 10 57 95 72 3 33 43 41 22 97 62 9 40 32 44 91 76 59 2 65 20 61 60 64 78 86 55 75 80 96 93 73 13 68 74 25 35 30 17 8 46 36 67 79 12 21 56 63 6 18\\r\\n\", \"output\": [\"330\"]}, {\"input\": \"100\\r\\n95 66 71 30 14 70 78 75 20 85 10 90 53 9 56 88 38 89 77 4 34 81 33 41 65 99 27 44 61 21 31 83 50 19 58 40 15 47 76 7 5 74 37 1 86 67 43 96 63 92 97 25 59 42 73 60 57 80 62 6 12 51 16 45 36 82 93 54 46 35 94 3 11 98 87 22 69 100 23 48 2 49 28 55 72 8 91 13 68 39 24 64 17 52 18 26 32 29 84 79\\r\\n\", \"output\": [\"1071\"]}, {\"input\": \"100\\r\\n73 21 39 30 78 79 15 46 18 60 2 1 45 35 74 26 43 49 96 59 89 61 34 50 42 84 16 41 92 31 100 64 25 27 44 98 86 47 29 71 97 11 95 62 48 66 20 53 22 83 76 32 77 63 54 99 87 36 9 70 17 52 72 38 81 19 23 65 82 37 24 10 91 93 56 12 88 58 51 33 4 28 8 3 40 7 67 69 68 6 80 13 5 55 14 85 94 75 90 57\\r\\n\", \"output\": [\"7315\"]}, {\"input\": \"100\\r\\n44 43 76 48 53 13 9 60 20 18 82 31 28 26 58 3 85 93 69 73 100 42 2 12 30 50 84 7 64 66 47 56 89 88 83 37 63 68 27 52 49 91 62 45 67 65 90 75 81 72 87 5 38 33 6 57 35 97 77 22 51 23 80 99 11 8 15 71 16 4 92 1 46 70 54 96 34 19 86 40 39 25 36 78 29 10 95 59 55 61 98 14 79 17 32 24 21 74 41 94\\r\\n\", \"output\": [\"290\"]}, {\"input\": \"100\\r\\n31 77 71 33 94 74 19 20 46 21 14 22 6 93 68 54 55 2 34 25 44 90 91 95 61 51 82 64 99 76 7 11 52 86 50 70 92 66 87 97 45 49 39 79 26 32 75 29 83 47 18 62 28 27 88 60 67 81 4 24 3 80 16 85 35 42 9 65 23 15 36 8 12 13 10 57 73 69 48 78 43 1 58 63 38 84 40 56 98 30 17 72 96 41 53 5 37 89 100 59\\r\\n\", \"output\": [\"708\"]}, {\"input\": \"100\\r\\n49 44 94 57 25 2 97 64 83 14 38 31 88 17 32 33 75 81 15 54 56 30 55 66 60 86 20 5 80 28 67 91 89 71 48 3 23 35 58 7 96 51 13 100 39 37 46 85 99 45 63 16 92 9 41 18 24 84 1 29 72 77 27 70 62 43 69 78 36 53 90 82 74 11 34 19 76 21 8 52 61 98 68 6 40 26 50 93 12 42 87 79 47 4 59 10 73 95 22 65\\r\\n\", \"output\": [\"1440\"]}, {\"input\": \"100\\r\\n81 59 48 7 57 38 19 4 31 33 74 66 9 67 95 91 17 26 23 44 88 35 76 5 2 11 32 41 13 21 80 73 75 22 72 87 65 3 52 61 25 86 43 55 99 62 53 34 85 63 60 71 10 27 29 47 24 42 15 40 16 96 6 45 54 93 8 70 92 12 83 77 64 90 56 28 20 97 36 46 1 49 14 100 68 50 51 98 79 89 78 37 39 82 58 69 30 94 84 18\\r\\n\", \"output\": [\"87\"]}, {\"input\": \"100\\r\\n62 50 16 53 19 18 63 26 47 85 59 39 54 92 95 35 71 69 29 94 98 68 37 75 61 25 88 73 36 89 46 67 96 12 58 41 64 45 34 32 28 74 15 43 66 97 70 90 42 13 56 93 52 21 60 20 17 79 49 5 72 83 23 51 2 77 65 55 11 76 91 81 100 44 30 8 4 10 7 99 31 87 82 86 14 9 40 78 22 48 80 38 57 33 24 6 1 3 27 84\\r\\n\", \"output\": [\"777\"]}, {\"input\": \"100\\r\\n33 66 80 63 41 88 39 48 86 68 76 81 59 99 93 100 43 37 11 64 91 22 7 57 87 58 72 60 35 79 18 94 70 25 69 31 3 27 53 30 29 54 83 36 56 55 84 34 51 73 90 95 92 85 47 44 97 5 10 12 65 61 40 98 17 23 1 82 16 50 74 28 24 4 2 52 67 46 78 13 89 77 6 15 8 62 45 32 21 75 19 14 71 49 26 38 20 42 96 9\\r\\n\", \"output\": [\"175\"]}, {\"input\": \"100\\r\\n66 48 77 30 76 54 64 37 20 40 27 21 89 90 23 55 53 22 81 97 28 63 45 14 38 44 59 6 34 78 10 69 75 79 72 42 99 68 29 83 62 33 26 17 46 35 80 74 50 1 85 16 4 56 43 57 88 5 19 51 73 9 94 47 8 18 91 52 86 98 12 32 3 60 100 36 96 49 24 13 67 25 65 93 95 87 61 92 71 82 31 41 84 70 39 58 7 2 15 11\\r\\n\", \"output\": [\"5187\"]}, {\"input\": \"100\\r\\n2 61 67 86 93 56 83 59 68 43 15 20 49 17 46 60 19 21 24 84 8 81 55 31 73 99 72 41 91 47 85 50 4 90 23 66 95 5 11 79 58 77 26 80 40 52 92 74 100 6 82 57 65 14 96 27 32 3 88 16 97 35 30 51 29 38 13 87 76 63 98 18 25 37 48 62 75 36 94 69 78 39 33 44 42 54 9 53 12 70 22 34 89 7 10 64 45 28 1 71\\r\\n\", \"output\": [\"9765\"]}, {\"input\": \"100\\r\\n84 90 51 80 67 7 43 77 9 72 97 59 44 40 47 14 65 42 35 8 85 56 53 32 58 48 62 29 96 92 18 5 60 98 27 69 25 33 83 30 82 46 87 76 70 73 55 21 31 99 50 13 16 34 81 89 22 10 61 78 4 36 41 19 68 64 17 74 28 11 94 52 6 24 1 12 3 66 38 26 45 54 75 79 95 20 2 71 100 91 23 49 63 86 88 37 93 39 15 57\\r\\n\", \"output\": [\"660\"]}, {\"input\": \"100\\r\\n58 66 46 88 94 95 9 81 61 78 65 19 40 17 20 86 89 62 100 14 73 34 39 35 43 90 69 49 55 74 72 85 63 41 83 36 70 98 11 84 24 26 99 30 68 51 54 31 47 33 10 75 7 77 16 28 1 53 67 91 44 64 45 60 8 27 4 42 6 79 76 22 97 92 29 80 82 96 3 2 71 37 5 52 93 13 87 23 56 50 25 38 18 21 12 57 32 59 15 48\\r\\n\", \"output\": [\"324\"]}, {\"input\": \"100\\r\\n9 94 1 12 46 51 77 59 15 34 45 49 8 80 4 35 91 20 52 27 78 36 73 95 58 61 11 79 42 41 5 7 60 40 70 72 74 17 30 19 3 68 37 67 13 29 54 25 26 63 10 71 32 83 99 88 65 97 39 2 33 43 82 75 62 98 44 66 89 81 76 85 92 87 56 31 14 53 16 96 24 23 64 38 48 55 28 86 69 21 100 84 47 6 57 22 90 93 18 50\\r\\n\", \"output\": [\"12870\"]}, {\"input\": \"100\\r\\n40 97 71 53 25 31 50 62 68 39 17 32 88 81 73 58 36 98 64 6 65 33 91 8 74 51 27 28 89 15 90 84 79 44 41 54 49 3 5 10 99 34 82 48 59 13 69 18 66 67 60 63 4 96 26 95 45 76 57 22 14 72 93 83 11 70 56 35 61 16 19 21 1 52 38 43 85 92 100 37 42 23 2 55 87 75 29 80 30 77 12 78 46 47 20 24 7 86 9 94\\r\\n\", \"output\": [\"825\"]}, {\"input\": \"100\\r\\n85 59 62 27 61 12 80 15 1 100 33 84 79 28 69 11 18 92 2 99 56 81 64 50 3 32 17 7 63 21 53 89 54 46 90 72 86 26 51 23 8 19 44 48 5 25 42 14 29 35 55 82 6 83 88 74 67 66 98 4 70 38 43 37 91 40 78 96 9 75 45 95 93 30 68 47 65 34 58 39 73 16 49 60 76 10 94 87 41 71 13 57 97 20 24 31 22 77 52 36\\r\\n\", \"output\": [\"1650\"]}, {\"input\": \"100\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 57 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 76 99 100\\r\\n\", \"output\": [\"111546435\"]}, {\"input\": \"26\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16\\r\\n\", \"output\": [\"1155\"]}, {\"input\": \"100\\r\\n2 1 4 5 3 7 8 9 10 6 12 13 14 15 16 17 11 19 20 21 22 23 24 25 26 27 28 18 30 31 32 33 34 35 36 37 38 39 40 41 29 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 42 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 59 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 78\\r\\n\", \"output\": [\"111546435\"]}, {\"input\": \"6\\r\\n2 3 4 1 6 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"39\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27\\r\\n\", \"output\": [\"15015\"]}, {\"input\": \"15\\r\\n2 3 4 5 1 7 8 9 10 6 12 13 14 15 11\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"98\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 57 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 76\\r\\n\", \"output\": [\"111546435\"]}, {\"input\": \"100\\r\\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 20 38 39 40 41 42 43 44 45 46 47 48 49 37 51 52 53 54 55 56 57 58 59 60 50 62 63 64 65 66 67 61 69 70 71 72 68 74 75 76 77 78 79 80 81 73 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 82 98 99 100\\r\\n\", \"output\": [\"116396280\"]}, {\"input\": \"4\\r\\n2 3 4 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"93\\r\\n2 3 4 5 1 7 8 9 10 11 12 6 14 15 16 17 18 19 20 21 22 23 13 25 26 27 28 29 30 31 32 33 34 35 36 24 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 37 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 54 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 73\\r\\n\", \"output\": [\"4849845\"]}, {\"input\": \"15\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9\\r\\n\", \"output\": [\"105\"]}, {\"input\": \"41\\r\\n2 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 12 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 25\\r\\n\", \"output\": [\"2431\"]}, {\"input\": \"100\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 57 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 76 100 99\\r\\n\", \"output\": [\"111546435\"]}, {\"input\": \"24\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 16\\r\\n\", \"output\": [\"315\"]}, {\"input\": \"90\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 40 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 55 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 72\\r\\n\", \"output\": [\"4849845\"]}, {\"input\": \"99\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 16 26 27 28 29 30 31 32 33 34 35 25 37 38 39 40 41 42 43 44 45 46 47 48 36 50 51 52 53 54 55 56 57 58 59 60 61 62 63 49 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 64 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 81\\r\\n\", \"output\": [\"14549535\"]}, {\"input\": \"75\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 57\\r\\n\", \"output\": [\"4849845\"]}, {\"input\": \"9\\r\\n2 3 4 5 6 7 8 9 1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"26\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 26 16 17 18 19 20 21 22 23 24 25\\r\\n\", \"output\": [\"1155\"]}, {\"input\": \"99\\r\\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 1 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 51\\r\\n\", \"output\": [\"1225\"]}, {\"input\": \"96\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 40 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 57 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 76\\r\\n\", \"output\": [\"4849845\"]}, {\"input\": \"100\\r\\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 18 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 37 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 57 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 78\\r\\n\", \"output\": [\"1560090\"]}, {\"input\": \"48\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 16 26 27 28 29 30 31 32 33 34 35 25 37 38 39 40 41 42 43 44 45 46 47 48 36\\r\\n\", \"output\": [\"45045\"]}, {\"input\": \"100\\r\\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"12\\r\\n2 3 4 5 1 7 8 9 10 11 12 6\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"12\\r\\n2 3 4 1 6 7 8 9 10 11 12 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100\\r\\n2 1 5 3 4 10 6 7 8 9 17 11 12 13 14 15 16 28 18 19 20 21 22 23 24 25 26 27 41 29 30 31 32 33 34 35 36 37 38 39 40 58 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 77 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 100 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99\\r\\n\", \"output\": [\"111546435\"]}, {\"input\": \"100\\r\\n2 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 12 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 29 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 48 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 71 100\\r\\n\", \"output\": [\"2369851\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n74 71 86 6 75 16 62 25 95 45 29 36 97 5 8 78 26 69 56 57 60 15 55 87 14 23 68 11 31 47 3 24 7 54 49 80 33 76 30 65 4 53 93 20 37 84 35 1 66 40 46 17 12 73 42 96 38 2 32 72 58 51 90 22 99 89 88 21 85 28 63 10 92 18 61 98 27 19 81 48 34 94 50 83 59 77 9 44 79 43 39 100 82 52 70 41 67 13 64 91\\r\\n', 'output': ['4020']}, {'input': '39\\r\\n2 3 1 5 6 7 8 4 10 11 12 13 14 15 9 17 18 19 20 21 22 23 24 25 26 16 28 29 30 31 32 33 34 35 36 37 38 39 27\\r\\n', 'output': ['15015']}, {'input': '100\\r\\n53 12 13 98 57 83 52 61 69 54 13 92 91 27 16 91 86 75 93 29 16 59 14 2 37 74 34 30 98 17 3 72 83 93 21 72 52 89 57 58 60 29 94 16 45 20 76 64 78 67 76 68 41 47 50 36 9 75 79 11 10 88 71 22 36 60 44 19 79 43 49 24 6 57 8 42 51 58 60 2 84 48 79 55 74 41 89 10 45 70 76 29 53 9 82 93 24 40 94 56\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n83 4 84 100 21 83 47 79 11 78 40 33 97 68 5 46 93 23 54 93 61 67 88 8 91 11 46 10 48 39 95 29 81 36 71 88 45 64 90 43 52 49 59 57 45 83 74 89 22 67 46 2 63 84 20 30 51 26 70 84 35 70 21 86 88 79 7 83 13 56 74 54 83 96 31 57 91 69 60 43 12 34 31 23 70 48 96 58 20 36 87 17 39 100 31 69 21 54 49 42\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n40 97 71 53 25 31 50 62 68 39 17 32 88 81 73 58 36 98 64 6 65 33 91 8 74 51 27 28 89 15 90 84 79 44 41 54 49 3 5 10 99 34 82 48 59 13 69 18 66 67 60 63 4 96 26 95 45 76 57 22 14 72 93 83 11 70 56 35 61 16 19 21 1 52 38 43 85 92 100 37 42 23 2 55 87 75 29 80 30 77 12 78 46 47 20 24 7 86 9 94\\r\\n', 'output': ['825']}]","human_sample_testcases_2":"[{'input': '100\\r\\n98 62 49 47 84 1 77 88 76 85 21 50 2 92 72 66 100 99 78 58 33 83 27 89 71 97 64 94 4 13 17 8 32 20 79 44 12 56 7 9 43 6 26 57 18 23 39 69 30 55 16 96 35 91 11 68 67 31 38 90 40 48 25 41 54 82 15 22 37 51 81 65 60 34 24 14 5 87 74 19 46 3 80 45 61 86 10 28 52 73 29 42 70 53 93 95 63 75 59 36\\r\\n', 'output': ['42']}, {'input': '41\\r\\n2 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 12 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 25\\r\\n', 'output': ['2431']}, {'input': '100\\r\\n57 60 40 66 86 52 88 4 54 31 71 19 37 16 73 95 98 77 92 59 35 90 24 96 10 45 51 43 91 63 1 80 14 82 21 29 2 74 99 8 79 76 56 44 93 17 12 33 87 46 72 83 36 49 69 22 3 38 15 13 34 20 42 48 25 28 18 9 50 32 67 84 62 97 68 5 27 65 30 6 81 26 39 41 55 11 70 23 7 53 64 85 100 58 78 75 94 47 89 61\\r\\n', 'output': ['353430']}, {'input': '12\\r\\n2 3 4 5 1 7 8 9 10 11 12 6\\r\\n', 'output': ['35']}, {'input': '9\\r\\n2 3 4 5 6 7 8 9 1\\r\\n', 'output': ['9']}]","human_sample_testcases_3":"[{'input': '100\\r\\n58 40 98 67 44 23 88 8 63 52 95 42 28 93 6 24 21 12 94 41 95 65 38 77 17 41 94 99 84 8 5 10 90 48 18 7 72 16 91 82 100 30 73 41 15 70 13 23 39 56 15 74 42 69 10 86 21 91 81 15 86 72 56 19 15 48 28 38 81 96 7 8 90 44 13 99 99 9 70 26 95 95 77 83 78 97 2 74 2 76 97 27 65 68 29 20 97 91 58 28\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n', 'output': ['1']}, {'input': '100\\r\\n57 60 40 66 86 52 88 4 54 31 71 19 37 16 73 95 98 77 92 59 35 90 24 96 10 45 51 43 91 63 1 80 14 82 21 29 2 74 99 8 79 76 56 44 93 17 12 33 87 46 72 83 36 49 69 22 3 38 15 13 34 20 42 48 25 28 18 9 50 32 67 84 62 97 68 5 27 65 30 6 81 26 39 41 55 11 70 23 7 53 64 85 100 58 78 75 94 47 89 61\\r\\n', 'output': ['353430']}, {'input': '100\\r\\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 18 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 37 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 57 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 78\\r\\n', 'output': ['1560090']}, {'input': '41\\r\\n2 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 12 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 25\\r\\n', 'output': ['2431']}]","human_sample_testcases_4":"[{'input': '100\\r\\n35 12 51 32 59 98 65 84 34 83 75 72 35 31 17 55 35 84 6 46 23 74 81 98 61 9 39 40 6 15 44 79 98 3 45 41 64 56 4 27 62 27 68 80 99 21 32 26 60 82 5 1 98 75 49 26 60 25 57 18 69 88 51 64 74 97 81 78 62 32 68 77 48 71 70 64 17 1 77 25 95 68 33 80 11 55 18 42 24 73 51 55 82 72 53 20 99 15 34 54\\r\\n', 'output': ['-1']}, {'input': '12\\r\\n2 3 4 5 1 7 8 9 10 11 12 6\\r\\n', 'output': ['35']}, {'input': '41\\r\\n2 3 4 5 6 7 8 9 10 11 1 13 14 15 16 17 18 19 20 21 22 23 24 12 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 25\\r\\n', 'output': ['2431']}, {'input': '4\\r\\n2 1 4 3\\r\\n', 'output': ['1']}, {'input': '100\\r\\n88 41 92 79 21 91 44 2 27 96 9 64 73 87 45 13 39 43 16 42 99 54 95 5 75 1 48 4 15 47 34 71 76 62 17 70 81 80 53 90 67 3 38 58 32 25 29 63 6 50 51 14 37 97 24 52 65 40 31 98 100 77 8 33 61 11 49 84 89 78 56 20 94 35 86 46 85 36 82 93 7 59 10 60 69 57 12 74 28 22 30 66 18 68 72 19 26 83 23 55\\r\\n', 'output': ['360']}]","human_sample_testcases_5":"[{'input': '100\\r\\n73 21 39 30 78 79 15 46 18 60 2 1 45 35 74 26 43 49 96 59 89 61 34 50 42 84 16 41 92 31 100 64 25 27 44 98 86 47 29 71 97 11 95 62 48 66 20 53 22 83 76 32 77 63 54 99 87 36 9 70 17 52 72 38 81 19 23 65 82 37 24 10 91 93 56 12 88 58 51 33 4 28 8 3 40 7 67 69 68 6 80 13 5 55 14 85 94 75 90 57\\r\\n', 'output': ['7315']}, {'input': '100\\r\\n40 86 93 77 68 5 32 77 1 79 68 33 29 36 38 3 69 46 72 7 27 27 30 40 21 18 69 69 32 10 82 97 1 34 87 81 92 67 47 3 52 89 25 41 88 79 5 46 41 82 87 1 77 41 54 16 6 92 18 10 37 45 71 25 16 66 39 94 60 13 48 64 28 91 80 36 4 53 50 28 30 45 92 79 93 71 96 66 65 73 57 71 48 78 76 53 96 76 81 89\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n98 39 44 79 31 99 96 72 97 54 83 15 81 65 59 75 3 51 83 40 28 54 41 93 56 94 93 58 20 53 21 7 81 17 71 31 31 88 34 22 55 67 57 92 34 88 87 23 36 33 41 33 17 10 71 28 79 6 3 60 67 99 68 8 39 29 49 17 82 43 100 86 64 47 55 66 58 57 50 49 8 11 15 91 42 44 72 28 18 32 81 22 20 78 55 51 37 94 34 4\\r\\n', 'output': ['-1']}, {'input': '4\\r\\n2 3 4 2\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n60 2 18 55 53 58 44 32 26 70 90 4 41 40 25 69 13 73 22 5 16 23 21 86 48 6 99 78 68 49 63 29 35 76 14 19 97 12 9 51 100 31 81 43 52 91 47 95 96 38 62 10 36 46 87 28 20 93 54 27 94 7 11 37 33 61 24 34 72 3 74 82 77 67 8 88 80 59 92 84 56 57 83 65 50 98 75 17 39 71 42 66 15 45 79 64 1 30 89 85\\r\\n', 'output': ['1235']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":91.67,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":88.89,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":155,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.334,"human_sample_branch_coverage":97.778} {"sample_inputs":"[\"4 4\\n....\\n.S1.\\n....\\n....\\n10\", \"7 7\\n.......\\n.1###2.\\n.#...#.\\n.#.B.#.\\n.3...4.\\n..##...\\n......S\\n100\\n100\\n100\\n100\", \"7 8\\n........\\n........\\n....1B..\\n.S......\\n....2...\\n3.......\\n........\\n100\\n-100\\n100\", \"1 1\\nS\"]","input_specification":"The first line contains two integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u200920) \u2014 the sizes of the table. Next n lines each contains m characters \u2014 the description of the table. The description means the following: character \"B\" is a cell with a bomb; character \"S\" is the starting cell, you can assume that it's empty; digit c (1-8) is treasure with index c; character \".\" is an empty cell; character \"#\" is an obstacle. Assume that the map has t treasures. Next t lines contain the prices of the treasures. The i-th line contains the price of the treasure with index i, vi (\u2009-\u2009200\u2009\u2264\u2009vi\u2009\u2264\u2009200). It is guaranteed that the treasures are numbered from 1 to t. It is guaranteed that the map has not more than 8 objects in total. Objects are bombs and treasures. It is guaranteed that the map has exactly one character \"S\".","src_uid":"624a0d6cf305fcf67d3f1cdc1c5fef8d","source_code":"#include\n#include\n#include\n#include\nusing namespace std;\nconst int dx[]={1,-1,0,0};\nconst int dy[]={0,0,1,-1};\nconst int INF=1000000000;\nint n,m,sx,sy,tx[10],ty[10],tp[10],tn,bx[10],by[10],bn;\nint f[21][21][256][256],pr[256],ans;\nint qx[2000010],qy[2000010],qt[2000010],qb[2000010],l,r;\nchar a[51][51];\nint main()\n{\n\tscanf(\"%d%d\",&n,&m);\n\tfor(int i=1;i<=n;i++) scanf(\"%s\",a[i]+1);\n\tfor(int i=1;i<=n;i++)\n\t\tfor(int j=1;j<=m;j++)\n\t\t{\n\t\t\tif(a[i][j]=='S') sx=i,sy=j;\n\t\t\tif(a[i][j]>='0'&&a[i][j]<='9') tx[a[i][j]-'0']=i,ty[a[i][j]-'0']=j,tn++;\n\t\t\tif(a[i][j]=='B') bx[++bn]=i,by[bn]=j;\n\t\t}\n\tfor(int i=1;i<=tn;i++) scanf(\"%d\",&tp[i]);\n\tfor(int i=1;i<=n;i++)\n\t\tfor(int j=1;j<=m;j++)\n\t\t\tfor(int k=0;k<(1<f[ox][oy][ot][ob]+1)\n\t\t\t\tf[nx][ny][nt][nb]=f[ox][oy][ot][ob]+1,qx[++r]=nx,qy[r]=ny,qt[r]=nt,qb[r]=nb;\n\t\t}\n\t}\n\tfor(int i=0;i<(1<\r\nusing namespace std;\r\n#define int long long\r\n#define lr(a) memset(a,0,sizeof(a))\r\nconst int N=550,mod=998244353;\r\nint n,x,C[N][N],pw[N][N]; \/\/\u7ec4\u5408\u6570&\u5e42 \r\nint dp[N][N],ans; \/\/dp[n][x]\r\nvoid init(){\r\n\tlr(dp),lr(pw),lr(C);\r\n\tfor(int i=0;i<=510;i++)C[i][0]=pw[i][0]=1; \/\/\u8fd8\u6709\u8fd9\u91cc\uff01i\u8981\u4ece0\u5f00\u59cb\uff0c\u4e0d\u7136C[n][n]\u5c31\u7b49\u4e8e0\u9e1fQWQWQWQ \r\n\tfor(int i=1;i<=510;i++)\r\n\tfor(int j=1;j<=510;j++)\r\n\t\tC[i][j]=(C[i-1][j-1]+C[i-1][j]+mod)%mod,\r\n\t\tpw[i][j]=(pw[i][j-1]*i+mod)%mod;\r\n\tscanf(\"%lld%lld\",&n,&x);\r\n}\r\nint solve(){\r\n\tfor(int peo=2;peo<=n;peo++){\r\n\t\tfor(int i=1;i<=x;i++){\r\n\t\t\tif(i<=peo-1)dp[peo][i]=(pw[i][peo]-pw[i-1][peo]+mod)%mod; \/\/\u9519\u5728\u8fd9\u91cc\u4e86\uff01 i\u548cpeo\u521a\u5f00\u59cb\u5199\u53cd\u4e86!qwq \r\n\t\t\telse{\r\n\t\t\t\tfor(int k=2;k<=peo;k++){\r\n\t\t\t\t\tdp[peo][i]=(dp[peo][i]+dp[k][i-(peo-1)]%mod*C[peo][k]%mod*pw[peo-1][peo-k]+mod)%mod;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tfor(int maxn=1;maxn<=x;maxn++){\r\n\t\tans=(ans+dp[n][maxn]+mod)%mod;\r\n\t}\r\n\treturn ans;\r\n}\r\nsigned main(){\r\n\tinit();\r\n\tprintf(\"%lld\\n\",solve());\r\n}\r\n","sample_outputs":"[\"5\", \"15\", \"1024\", \"976890680\"]","lang_cluster":"C++","notes":null,"output_specification":"Print one integer\u00a0\u2014 the number of ways to choose the initial health points for each hero $$$a_i$$$, where $$$1 \\le a_i \\le x$$$, so that there is no winner of the fight, taken modulo $$$998244353$$$. ","description":"There are $$$n$$$ heroes fighting in the arena. Initially, the $$$i$$$-th hero has $$$a_i$$$ health points.The fight in the arena takes place in several rounds. At the beginning of each round, each alive hero deals $$$1$$$ damage to all other heroes. Hits of all heroes occur simultaneously. Heroes whose health is less than $$$1$$$ at the end of the round are considered killed.If exactly $$$1$$$ hero remains alive after a certain round, then he is declared the winner. Otherwise, there is no winner.Your task is to calculate the number of ways to choose the initial health points for each hero $$$a_i$$$, where $$$1 \\le a_i \\le x$$$, so that there is no winner of the fight. The number of ways can be very large, so print it modulo $$$998244353$$$. Two ways are considered different if at least one hero has a different amount of health. For example, $$$[1, 2, 1]$$$ and $$$[2, 1, 1]$$$ are different.","human_testcases":"[{\"input\": \"2 5\\n\", \"output\": [\"5\\n\", \"5 \\n\", \"5\", \"5\\n\\n\", \"5\\n\", \"5 \\n\\n\"]}, {\"input\": \"3 3\\n\", \"output\": [\"15\\n\\n\", \"15 \\n\\n\", \"15\", \"15\\n\", \"15\\n\", \"15 \\n\"]}, {\"input\": \"5 4\\n\", \"output\": [\"1024 \\n\\n\", \"1024\", \"1024\\n\", \"1024\\n\\n\", \"1024\\n\", \"1024 \\n\"]}, {\"input\": \"13 37\\n\", \"output\": [\"976890680\\n\\n\", \"976890680\\n\", \"976890680 \\n\", \"976890680 \\n\\n\", \"976890680\", \"976890680\\n\"]}, {\"input\": \"5 40\\n\", \"output\": [\"6613840 \\n\\n\", \"6613840\", \"6613840\\n\\n\", \"6613840\\n\", \"6613840 \\n\", \"6613840\\n\"]}, {\"input\": \"4 33\\n\", \"output\": [\"74061\\n\", \"74061\", \"74061\\n\", \"74061 \\n\", \"74061 \\n\\n\", \"74061\\n\\n\"]}, {\"input\": \"6 26\\n\", \"output\": [\"37929526\\n\", \"37929526\\n\\n\", \"37929526 \\n\", \"37929526 \\n\\n\", \"37929526\", \"37929526\\n\"]}, {\"input\": \"7 22\\n\", \"output\": [\"433133716\\n\", \"433133716\", \"433133716\\n\\n\", \"433133716 \\n\", \"433133716\\n\", \"433133716 \\n\\n\"]}, {\"input\": \"10 15\\n\", \"output\": [\"801988713 \\n\\n\", \"801988713\\n\", \"801988713\", \"801988713\\n\\n\", \"801988713\\n\", \"801988713 \\n\"]}, {\"input\": \"2 500\\n\", \"output\": [\"500\\n\", \"500\", \"500 \\n\", \"500\\n\", \"500\\n\\n\", \"500 \\n\\n\"]}, {\"input\": \"3 500\\n\", \"output\": [\"375500 \\n\", \"375500\", \"375500\\n\", \"375500\\n\\n\", \"375500\\n\", \"375500 \\n\\n\"]}, {\"input\": \"4 500\\n\", \"output\": [\"250499992 \\n\\n\", \"250499992 \\n\", \"250499992\", \"250499992\\n\", \"250499992\\n\", \"250499992\\n\\n\"]}, {\"input\": \"5 500\\n\", \"output\": [\"940552292\\n\", \"940552292 \\n\\n\", \"940552292\\n\\n\", \"940552292\\n\", \"940552292\", \"940552292 \\n\"]}, {\"input\": \"8 333\\n\", \"output\": [\"97191222 \\n\", \"97191222\", \"97191222\\n\", \"97191222\\n\\n\", \"97191222\\n\", \"97191222 \\n\\n\"]}, {\"input\": \"6 478\\n\", \"output\": [\"28573939\\n\\n\", \"28573939\", \"28573939 \\n\", \"28573939 \\n\\n\", \"28573939\\n\", \"28573939\\n\"]}, {\"input\": \"11 345\\n\", \"output\": [\"932713620\\n\", \"932713620 \\n\", \"932713620 \\n\\n\", \"932713620\\n\", \"932713620\", \"932713620\\n\\n\"]}, {\"input\": \"15 255\\n\", \"output\": [\"259067064 \\n\", \"259067064 \\n\\n\", \"259067064\", \"259067064\\n\\n\", \"259067064\\n\", \"259067064\\n\"]}, {\"input\": \"13 337\\n\", \"output\": [\"434551606 \\n\\n\", \"434551606\", \"434551606\\n\", \"434551606\\n\", \"434551606 \\n\", \"434551606\\n\\n\"]}, {\"input\": \"10 500\\n\", \"output\": [\"263020220 \\n\\n\", \"263020220\", \"263020220\\n\\n\", \"263020220 \\n\", \"263020220\\n\", \"263020220\\n\"]}, {\"input\": \"25 500\\n\", \"output\": [\"571274201\\n\", \"571274201\\n\", \"571274201\", \"571274201 \\n\\n\", \"571274201 \\n\", \"571274201\\n\\n\"]}, {\"input\": \"49 499\\n\", \"output\": [\"816854007\", \"816854007\\n\", \"816854007 \\n\", \"816854007\\n\\n\", \"816854007\\n\", \"816854007 \\n\\n\"]}, {\"input\": \"50 500\\n\", \"output\": [\"165073862\\n\\n\", \"165073862\\n\", \"165073862 \\n\\n\", \"165073862 \\n\", \"165073862\\n\", \"165073862\"]}, {\"input\": \"99 499\\n\", \"output\": [\"796227309\\n\\n\", \"796227309 \\n\", \"796227309 \\n\\n\", \"796227309\\n\", \"796227309\\n\", \"796227309\"]}, {\"input\": \"99 500\\n\", \"output\": [\"424278934 \\n\\n\", \"424278934\\n\", \"424278934 \\n\", \"424278934\\n\", \"424278934\", \"424278934\\n\\n\"]}, {\"input\": \"111 500\\n\", \"output\": [\"802132036\\n\", \"802132036\", \"802132036 \\n\\n\", \"802132036 \\n\", \"802132036\\n\", \"802132036\\n\\n\"]}, {\"input\": \"154 500\\n\", \"output\": [\"924911664\\n\\n\", \"924911664\", \"924911664\\n\", \"924911664\\n\", \"924911664 \\n\", \"924911664 \\n\\n\"]}, {\"input\": \"200 500\\n\", \"output\": [\"458968932\", \"458968932\\n\\n\", \"458968932\\n\", \"458968932 \\n\", \"458968932\\n\", \"458968932 \\n\\n\"]}, {\"input\": \"222 500\\n\", \"output\": [\"382157018\\n\", \"382157018 \\n\", \"382157018\", \"382157018 \\n\\n\", \"382157018\\n\\n\", \"382157018\\n\"]}, {\"input\": \"285 499\\n\", \"output\": [\"987275082 \\n\\n\", \"987275082\\n\\n\", \"987275082 \\n\", \"987275082\\n\", \"987275082\", \"987275082\\n\"]}, {\"input\": \"300 500\\n\", \"output\": [\"567125736\\n\", \"567125736 \\n\\n\", \"567125736\\n\", \"567125736\", \"567125736 \\n\", \"567125736\\n\\n\"]}, {\"input\": \"365 500\\n\", \"output\": [\"552203508\\n\", \"552203508 \\n\", \"552203508 \\n\\n\", \"552203508\\n\", \"552203508\", \"552203508\\n\\n\"]}, {\"input\": \"444 500\\n\", \"output\": [\"563065086\", \"563065086\\n\", \"563065086\\n\\n\", \"563065086 \\n\", \"563065086\\n\", \"563065086 \\n\\n\"]}, {\"input\": \"444 499\\n\", \"output\": [\"835857576 \\n\\n\", \"835857576\\n\", \"835857576 \\n\", \"835857576\\n\", \"835857576\\n\\n\", \"835857576\"]}, {\"input\": \"500 333\\n\", \"output\": [\"736893443\\n\", \"736893443\", \"736893443\\n\\n\", \"736893443\\n\", \"736893443 \\n\", \"736893443 \\n\\n\"]}, {\"input\": \"500 500\\n\", \"output\": [\"587613361\\n\", \"587613361\", \"587613361\\n\\n\", \"587613361 \\n\\n\", \"587613361\\n\", \"587613361 \\n\"]}, {\"input\": \"499 499\\n\", \"output\": [\"772771385\", \"772771385\\n\", \"772771385 \\n\\n\", \"772771385\\n\\n\", \"772771385\\n\", \"772771385 \\n\"]}, {\"input\": \"111 222\\n\", \"output\": [\"460833105 \\n\", \"460833105\\n\", \"460833105\\n\", \"460833105\", \"460833105\\n\\n\", \"460833105 \\n\\n\"]}, {\"input\": \"123 433\\n\", \"output\": [\"632273638\\n\", \"632273638\\n\", \"632273638\", \"632273638 \\n\", \"632273638 \\n\\n\", \"632273638\\n\\n\"]}, {\"input\": \"383 477\\n\", \"output\": [\"158983764\", \"158983764\\n\", \"158983764\\n\\n\", \"158983764\\n\", \"158983764 \\n\\n\", \"158983764 \\n\"]}, {\"input\": \"99 333\\n\", \"output\": [\"897436821\\n\", \"897436821\\n\\n\", \"897436821 \\n\", \"897436821\", \"897436821 \\n\\n\", \"897436821\\n\"]}, {\"input\": \"484 497\\n\", \"output\": [\"320480021 \\n\\n\", \"320480021\", \"320480021\\n\", \"320480021\\n\\n\", \"320480021\\n\", \"320480021 \\n\"]}, {\"input\": \"411 77\\n\", \"output\": [\"525290835 \\n\", \"525290835\", \"525290835\\n\\n\", \"525290835 \\n\\n\", \"525290835\\n\", \"525290835\\n\"]}, {\"input\": \"124 212\\n\", \"output\": [\"806210307\\n\", \"806210307\", \"806210307 \\n\\n\", \"806210307\\n\\n\", \"806210307\\n\", \"806210307 \\n\"]}, {\"input\": \"369 404\\n\", \"output\": [\"345642117 \\n\\n\", \"345642117 \\n\", \"345642117\", \"345642117\\n\\n\", \"345642117\\n\", \"345642117\\n\"]}, {\"input\": \"246 389\\n\", \"output\": [\"778435960\\n\", \"778435960 \\n\", \"778435960\\n\\n\", \"778435960 \\n\\n\", \"778435960\\n\", \"778435960\"]}, {\"input\": \"92 270\\n\", \"output\": [\"125864547\\n\\n\", \"125864547 \\n\\n\", \"125864547 \\n\", \"125864547\", \"125864547\\n\", \"125864547\\n\"]}, {\"input\": \"271 208\\n\", \"output\": [\"80367024\\n\", \"80367024\", \"80367024\\n\\n\", \"80367024 \\n\", \"80367024 \\n\\n\", \"80367024\\n\"]}, {\"input\": \"289 466\\n\", \"output\": [\"807999264\\n\", \"807999264 \\n\\n\", \"807999264 \\n\", \"807999264\", \"807999264\\n\\n\", \"807999264\\n\"]}, {\"input\": \"249 320\\n\", \"output\": [\"405917309 \\n\", \"405917309 \\n\\n\", \"405917309\\n\", \"405917309\\n\", \"405917309\", \"405917309\\n\\n\"]}, {\"input\": \"91 367\\n\", \"output\": [\"369540872\\n\", \"369540872\\n\", \"369540872 \\n\", \"369540872\\n\\n\", \"369540872\", \"369540872 \\n\\n\"]}, {\"input\": \"39 78\\n\", \"output\": [\"146956559 \\n\", \"146956559\\n\", \"146956559\", \"146956559\\n\\n\", \"146956559 \\n\\n\", \"146956559\\n\"]}, {\"input\": \"465 367\\n\", \"output\": [\"135201268\\n\", \"135201268\\n\", \"135201268\", \"135201268 \\n\\n\", \"135201268 \\n\", \"135201268\\n\\n\"]}, {\"input\": \"34 177\\n\", \"output\": [\"771060153 \\n\\n\", \"771060153 \\n\", \"771060153\\n\", \"771060153\\n\", \"771060153\", \"771060153\\n\\n\"]}, {\"input\": \"460 235\\n\", \"output\": [\"27900542\\n\", \"27900542 \\n\\n\", \"27900542\\n\", \"27900542 \\n\", \"27900542\\n\\n\", \"27900542\"]}, {\"input\": \"421 44\\n\", \"output\": [\"312830719\\n\\n\", \"312830719\", \"312830719 \\n\\n\", \"312830719\\n\", \"312830719 \\n\", \"312830719\\n\"]}, {\"input\": \"390 208\\n\", \"output\": [\"709071139\\n\", \"709071139 \\n\\n\", \"709071139\\n\", \"709071139\\n\\n\", \"709071139 \\n\", \"709071139\"]}, {\"input\": \"251 203\\n\", \"output\": [\"921135826\\n\\n\", \"921135826\", \"921135826\\n\", \"921135826 \\n\\n\", \"921135826 \\n\", \"921135826\\n\"]}, {\"input\": \"191 22\\n\", \"output\": [\"285057520\", \"285057520 \\n\", \"285057520\\n\", \"285057520\\n\\n\", \"285057520 \\n\\n\", \"285057520\\n\"]}, {\"input\": \"198 236\\n\", \"output\": [\"93097976\\n\\n\", \"93097976\", \"93097976\\n\", \"93097976 \\n\\n\", \"93097976 \\n\", \"93097976\\n\"]}, {\"input\": \"376 314\\n\", \"output\": [\"795015160\\n\", \"795015160\\n\", \"795015160 \\n\", \"795015160\", \"795015160 \\n\\n\", \"795015160\\n\\n\"]}, {\"input\": \"26 178\\n\", \"output\": [\"373528200\\n\", \"373528200 \\n\", \"373528200\", \"373528200 \\n\\n\", \"373528200\\n\\n\", \"373528200\\n\"]}, {\"input\": \"189 92\\n\", \"output\": [\"283119998\\n\", \"283119998\\n\\n\", \"283119998\\n\", \"283119998\", \"283119998 \\n\\n\", \"283119998 \\n\"]}, {\"input\": \"13 93\\n\", \"output\": [\"962803010 \\n\", \"962803010\\n\", \"962803010\\n\\n\", \"962803010\\n\", \"962803010 \\n\\n\", \"962803010\"]}, {\"input\": \"71 439\\n\", \"output\": [\"299896905 \\n\\n\", \"299896905\", \"299896905\\n\", \"299896905\\n\", \"299896905 \\n\", \"299896905\\n\\n\"]}, {\"input\": \"438 46\\n\", \"output\": [\"312807374 \\n\\n\", \"312807374 \\n\", \"312807374\\n\\n\", \"312807374\\n\", \"312807374\\n\", \"312807374\"]}, {\"input\": \"357 328\\n\", \"output\": [\"186454845\\n\\n\", \"186454845 \\n\\n\", \"186454845\\n\", \"186454845 \\n\", \"186454845\\n\", \"186454845\"]}, {\"input\": \"384 467\\n\", \"output\": [\"946997121\", \"946997121 \\n\\n\", \"946997121\\n\", \"946997121 \\n\", \"946997121\\n\", \"946997121\\n\\n\"]}, {\"input\": \"371 306\\n\", \"output\": [\"512015273 \\n\", \"512015273\\n\\n\", \"512015273 \\n\\n\", \"512015273\", \"512015273\\n\", \"512015273\\n\"]}, {\"input\": \"265 181\\n\", \"output\": [\"178439722\\n\", \"178439722\", \"178439722 \\n\\n\", \"178439722\\n\\n\", \"178439722\\n\", \"178439722 \\n\"]}, {\"input\": \"311 33\\n\", \"output\": [\"836810892\\n\", \"836810892\\n\", \"836810892\", \"836810892 \\n\\n\", \"836810892 \\n\", \"836810892\\n\\n\"]}, {\"input\": \"298 51\\n\", \"output\": [\"631137022\\n\\n\", \"631137022 \\n\\n\", \"631137022\", \"631137022 \\n\", \"631137022\\n\", \"631137022\\n\"]}, {\"input\": \"193 402\\n\", \"output\": [\"490804249\", \"490804249\\n\", \"490804249\\n\", \"490804249 \\n\", \"490804249 \\n\\n\", \"490804249\\n\\n\"]}, {\"input\": \"119 371\\n\", \"output\": [\"207908744 \\n\\n\", \"207908744\", \"207908744\\n\", \"207908744\\n\", \"207908744\\n\\n\", \"207908744 \\n\"]}, {\"input\": \"459 365\\n\", \"output\": [\"266156666\\n\\n\", \"266156666\\n\", \"266156666\", \"266156666\\n\", \"266156666 \\n\", \"266156666 \\n\\n\"]}, {\"input\": \"222 422\\n\", \"output\": [\"858431457 \\n\", \"858431457\\n\", \"858431457\\n\", \"858431457\\n\\n\", \"858431457\", \"858431457 \\n\\n\"]}, {\"input\": \"195 15\\n\", \"output\": [\"518355052\", \"518355052 \\n\\n\", \"518355052 \\n\", \"518355052\\n\\n\", \"518355052\\n\", \"518355052\\n\"]}, {\"input\": \"224 375\\n\", \"output\": [\"555865043 \\n\", \"555865043\\n\", \"555865043\", \"555865043 \\n\\n\", \"555865043\\n\", \"555865043\\n\\n\"]}, {\"input\": \"246 348\\n\", \"output\": [\"875068738\\n\", \"875068738 \\n\", \"875068738\\n\", \"875068738\", \"875068738\\n\\n\", \"875068738 \\n\\n\"]}, {\"input\": \"291 150\\n\", \"output\": [\"491847623 \\n\\n\", \"491847623\", \"491847623\\n\\n\", \"491847623\\n\", \"491847623 \\n\", \"491847623\\n\"]}, {\"input\": \"171 489\\n\", \"output\": [\"316053655\\n\", \"316053655 \\n\\n\", \"316053655 \\n\", \"316053655\", \"316053655\\n\", \"316053655\\n\\n\"]}, {\"input\": \"162 427\\n\", \"output\": [\"10603436\\n\", \"10603436\\n\\n\", \"10603436 \\n\", \"10603436\", \"10603436\\n\", \"10603436 \\n\\n\"]}, {\"input\": \"350 463\\n\", \"output\": [\"580010430\", \"580010430\\n\", \"580010430\\n\", \"580010430 \\n\", \"580010430\\n\\n\", \"580010430 \\n\\n\"]}, {\"input\": \"161 37\\n\", \"output\": [\"141211019 \\n\\n\", \"141211019\", \"141211019\\n\", \"141211019 \\n\", \"141211019\\n\\n\", \"141211019\\n\"]}, {\"input\": \"500 1\\n\", \"output\": [\"1\\n\", \"1\", \"1 \\n\\n\", \"1\\n\\n\", \"1 \\n\", \"1\\n\"]}, {\"input\": \"164 500\\n\", \"output\": [\"411608690\\n\", \"411608690 \\n\", \"411608690\\n\\n\", \"411608690\\n\", \"411608690 \\n\\n\", \"411608690\"]}, {\"input\": \"499 500\\n\", \"output\": [\"724043052\", \"724043052 \\n\", \"724043052\\n\", \"724043052 \\n\\n\", \"724043052\\n\", \"724043052\\n\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '198 236\\n', 'output': ['93097976\\n\\n', '93097976', '93097976\\n', '93097976 \\n\\n', '93097976 \\n', '93097976\\n']}, {'input': '371 306\\n', 'output': ['512015273 \\n', '512015273\\n\\n', '512015273 \\n\\n', '512015273', '512015273\\n', '512015273\\n']}, {'input': '224 375\\n', 'output': ['555865043 \\n', '555865043\\n', '555865043', '555865043 \\n\\n', '555865043\\n', '555865043\\n\\n']}, {'input': '4 500\\n', 'output': ['250499992 \\n\\n', '250499992 \\n', '250499992', '250499992\\n', '250499992\\n', '250499992\\n\\n']}, {'input': '5 40\\n', 'output': ['6613840 \\n\\n', '6613840', '6613840\\n\\n', '6613840\\n', '6613840 \\n', '6613840\\n']}]","human_sample_testcases_2":"[{'input': '500 500\\n', 'output': ['587613361\\n', '587613361', '587613361\\n\\n', '587613361 \\n\\n', '587613361\\n', '587613361 \\n']}, {'input': '13 337\\n', 'output': ['434551606 \\n\\n', '434551606', '434551606\\n', '434551606\\n', '434551606 \\n', '434551606\\n\\n']}, {'input': '11 345\\n', 'output': ['932713620\\n', '932713620 \\n', '932713620 \\n\\n', '932713620\\n', '932713620', '932713620\\n\\n']}, {'input': '164 500\\n', 'output': ['411608690\\n', '411608690 \\n', '411608690\\n\\n', '411608690\\n', '411608690 \\n\\n', '411608690']}, {'input': '111 222\\n', 'output': ['460833105 \\n', '460833105\\n', '460833105\\n', '460833105', '460833105\\n\\n', '460833105 \\n\\n']}]","human_sample_testcases_3":"[{'input': '246 348\\n', 'output': ['875068738\\n', '875068738 \\n', '875068738\\n', '875068738', '875068738\\n\\n', '875068738 \\n\\n']}, {'input': '50 500\\n', 'output': ['165073862\\n\\n', '165073862\\n', '165073862 \\n\\n', '165073862 \\n', '165073862\\n', '165073862']}, {'input': '438 46\\n', 'output': ['312807374 \\n\\n', '312807374 \\n', '312807374\\n\\n', '312807374\\n', '312807374\\n', '312807374']}, {'input': '91 367\\n', 'output': ['369540872\\n', '369540872\\n', '369540872 \\n', '369540872\\n\\n', '369540872', '369540872 \\n\\n']}, {'input': '111 222\\n', 'output': ['460833105 \\n', '460833105\\n', '460833105\\n', '460833105', '460833105\\n\\n', '460833105 \\n\\n']}]","human_sample_testcases_4":"[{'input': '376 314\\n', 'output': ['795015160\\n', '795015160\\n', '795015160 \\n', '795015160', '795015160 \\n\\n', '795015160\\n\\n']}, {'input': '99 333\\n', 'output': ['897436821\\n', '897436821\\n\\n', '897436821 \\n', '897436821', '897436821 \\n\\n', '897436821\\n']}, {'input': '265 181\\n', 'output': ['178439722\\n', '178439722', '178439722 \\n\\n', '178439722\\n\\n', '178439722\\n', '178439722 \\n']}, {'input': '246 389\\n', 'output': ['778435960\\n', '778435960 \\n', '778435960\\n\\n', '778435960 \\n\\n', '778435960\\n', '778435960']}, {'input': '13 93\\n', 'output': ['962803010 \\n', '962803010\\n', '962803010\\n\\n', '962803010\\n', '962803010 \\n\\n', '962803010']}]","human_sample_testcases_5":"[{'input': '5 500\\n', 'output': ['940552292\\n', '940552292 \\n\\n', '940552292\\n\\n', '940552292\\n', '940552292', '940552292 \\n']}, {'input': '71 439\\n', 'output': ['299896905 \\n\\n', '299896905', '299896905\\n', '299896905\\n', '299896905 \\n', '299896905\\n\\n']}, {'input': '3 500\\n', 'output': ['375500 \\n', '375500', '375500\\n', '375500\\n\\n', '375500\\n', '375500 \\n\\n']}, {'input': '99 499\\n', 'output': ['796227309\\n\\n', '796227309 \\n', '796227309 \\n\\n', '796227309\\n', '796227309\\n', '796227309']}, {'input': '154 500\\n', 'output': ['924911664\\n\\n', '924911664', '924911664\\n', '924911664\\n', '924911664 \\n', '924911664 \\n\\n']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":157,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1\", \"2 1\", \"3 2\"]","input_specification":"The first and the only line contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\le n \\le 10^5, 1 \\le k \\le \\min(2^n - 1, 10^9)$$$)\u00a0\u2014 the number of rounds in the tournament and the number of outcomes that sponsors can change.","src_uid":"dc7b887afcc2e95c4e90619ceda63071","source_code":"#include \r\n#include \r\nusing LL = long long;\r\nconst int N = 1e5 + 100, P = 1e9 + 7;\r\nint n, num;\r\nint fac[N], ifac[N];\r\nint ans = 0;\r\nint qpow(int x, int y = P - 2)\r\n{\r\n int res = 1;\r\n for (; y; y >>= 1, x = LL(x) * x % P) if (y & 1) res = LL(x) * res % P;\r\n return res;\r\n}\r\nvoid adj(int &x){ x += (x >> 31) & P; }\r\nint C(int x, int y){ return LL(fac[x]) * ifac[y] % P * ifac[x - y] % P; }\r\nint main()\r\n{\r\n scanf(\"%d %d\", &n, &num);\r\n fac[0] = fac[1] = ifac[0] = ifac[1] = 1;\r\n for (int i = 2; i <= n; ++i) fac[i] = LL(i) * fac[i - 1] % P;\r\n ifac[n] = qpow(fac[n]);\r\n for (int i = n - 1; i > 1; --i) ifac[i] = LL(i + 1) * ifac[i + 1] % P;\r\n num = std::min(n, num);\r\n for (int i = 0; i <= num; ++i) adj(ans += C(n, i) - P);\r\n printf(\"%d\\n\", ans);\r\n return 0;\r\n}","sample_outputs":"[\"2\", \"3\", \"7\"]","lang_cluster":"C++","notes":"NoteIn the first example, there is only one match between players $$$1$$$ and $$$2$$$, so the sponsors can always make player $$$2$$$ wins.The tournament grid from the second example is shown in the picture in the statement.","output_specification":"Print exactly one integer\u00a0\u2014 the minimum number of the winner modulo $$$10^9 + 7$$$","description":"Madoka decided to entrust the organization of a major computer game tournament \"OSU\"!In this tournament, matches are held according to the \"Olympic system\". In other words, there are $$$2^n$$$ participants in the tournament, numbered with integers from $$$1$$$ to $$$2^n$$$. There are $$$n$$$ rounds in total in the tournament. In the $$$i$$$-th round there are $$$2^{n - i}$$$ matches between two players (one of whom is right, the other is left), after which the winners go further along the tournament grid, and the losing participants are eliminated from the tournament. Herewith, the relative order in the next round does not change. And the winner of the tournament\u00a0\u2014 is the last remaining participant.But the smaller the participant's number, the more he will pay Madoka if he wins, so Madoka wants the participant with the lowest number to win. To do this, she can arrange the participants in the first round as she likes, and also determine for each match who will win\u00a0\u2014 the participant on the left or right.But Madoka knows that tournament sponsors can change the winner in matches no more than $$$k$$$ times. (That is, if the participant on the left won before the change, then the participant on the right will win after the change, and if the participant on the right won, then the participant on the left will win after the change). So, the first image shows the tournament grid that Madoka made, where the red lines denote who should win the match. And the second one shows the tournament grid, after one change in the outcome of the match by sponsors (a match between $$$1$$$ and $$$3$$$ players). Print the minimum possible number of the winner in the tournament, which Madoka can get regardless of changes in sponsors. But since the answer can be very large, output it modulo $$$10^9 + 7$$$. Note that we need to minimize the answer, and only then take it modulo.","human_testcases":"[{\"input\": \"1 1\\n\", \"output\": [\"2\\n\", \"2 \", \"2\", \"2 \\n\", \"2\\n\\n\", \"\\n2\", \"2\\n\\n\", \"2\\n\"]}, {\"input\": \"2 1\\n\", \"output\": [\"\\n3\\n\", \"\\n3\", \"3\\n\\n\", \"3 \\n\", \"3\\n\\n\", \"3 \", \"3\\n\", \"3\\n\", \"3\"]}, {\"input\": \"3 2\\n\", \"output\": [\"7\", \"7\\n\\n\", \"\\n7\\n\", \"7\\n\", \"7 \", \"7 \\n\", \"7\\n\\n\", \"\\n7\", \"7\\n\"]}, {\"input\": \"5 3\\n\", \"output\": [\"\\n26\", \"26 \\n\", \"26\", \"26\\n\", \"\\n26\\n\", \"26\\n\\n\", \"26 \", \"26\\n\\n\", \"26\\n\"]}, {\"input\": \"5 5\\n\", \"output\": [\"32 \\n\", \"\\n32\", \"32 \", \"32\\n\\n\", \"32\", \"32\\n\", \"32\\n\\n\", \"32\\n\"]}, {\"input\": \"5 31\\n\", \"output\": [\"32 \\n\", \"\\n32\", \"32 \", \"32\\n\\n\", \"32\", \"32\\n\", \"32\\n\\n\", \"32\\n\"]}, {\"input\": \"11994 11995\\n\", \"output\": [\"685385528 \\n\", \"685385528 \", \"685385528\\n\", \"685385528\\n\", \"685385528\\n\\n\", \"\\n685385528\", \"685385528\\n\\n\", \"685385528\"]}, {\"input\": \"99999 3123\\n\", \"output\": [\"575224395\\n\", \"575224395\\n\\n\", \"575224395 \", \"575224395\\n\", \"\\n575224395\\n\", \"575224395\", \"\\n575224395\", \"575224395 \\n\", \"575224395\\n\\n\"]}, {\"input\": \"100000 1000000000\\n\", \"output\": [\"607723520\\n\", \"607723520\\n\", \"\\n607723520\", \"607723520\\n\\n\", \"607723520\\n\\n\", \"607723520 \", \"607723520\", \"607723520 \\n\"]}, {\"input\": \"100000 1\\n\", \"output\": [\"100001 \\n\", \"100001\", \"\\n100001\", \"100001\\n\\n\", \"100001 \", \"100001\\n\", \"100001\\n\\n\", \"\\n100001\\n\", \"100001\\n\"]}, {\"input\": \"100000 13\\n\", \"output\": [\"185515077\\n\", \"\\n185515077\", \"185515077\", \"185515077\\n\", \"\\n185515077\\n\", \"185515077 \\n\", \"185515077 \", \"185515077\\n\\n\", \"185515077\\n\\n\"]}, {\"input\": \"100000 53228\\n\", \"output\": [\"871774727\", \"871774727\\n\\n\", \"\\n871774727\\n\", \"871774727 \", \"871774727 \\n\", \"871774727\\n\", \"\\n871774727\", \"871774727\\n\\n\", \"871774727\\n\"]}, {\"input\": \"87532 32150\\n\", \"output\": [\"\\n165162987\", \"165162987\\n\", \"165162987\", \"165162987 \\n\", \"165162987\\n\", \"\\n165162987\\n\", \"165162987\\n\\n\", \"165162987\\n\\n\", \"165162987 \"]}, {\"input\": \"30 99999999\\n\", \"output\": [\"73741817\\n\\n\", \"73741817\\n\", \"73741817\\n\\n\", \"73741817\", \"73741817 \", \"\\n73741817\", \"73741817 \\n\", \"73741817\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100000 13\\n', 'output': ['185515077\\n', '\\n185515077', '185515077', '185515077\\n', '\\n185515077\\n', '185515077 \\n', '185515077 ', '185515077\\n\\n', '185515077\\n\\n']}, {'input': '1 1\\n', 'output': ['2\\n', '2 ', '2', '2 \\n', '2\\n\\n', '\\n2', '2\\n\\n', '2\\n']}, {'input': '5 31\\n', 'output': ['32 \\n', '\\n32', '32 ', '32\\n\\n', '32', '32\\n', '32\\n\\n', '32\\n']}, {'input': '3 2\\n', 'output': ['7', '7\\n\\n', '\\n7\\n', '7\\n', '7 ', '7 \\n', '7\\n\\n', '\\n7', '7\\n']}, {'input': '11994 11995\\n', 'output': ['685385528 \\n', '685385528 ', '685385528\\n', '685385528\\n', '685385528\\n\\n', '\\n685385528', '685385528\\n\\n', '685385528']}]","human_sample_testcases_2":"[{'input': '99999 3123\\n', 'output': ['575224395\\n', '575224395\\n\\n', '575224395 ', '575224395\\n', '\\n575224395\\n', '575224395', '\\n575224395', '575224395 \\n', '575224395\\n\\n']}, {'input': '5 5\\n', 'output': ['32 \\n', '\\n32', '32 ', '32\\n\\n', '32', '32\\n', '32\\n\\n', '32\\n']}, {'input': '100000 1\\n', 'output': ['100001 \\n', '100001', '\\n100001', '100001\\n\\n', '100001 ', '100001\\n', '100001\\n\\n', '\\n100001\\n', '100001\\n']}, {'input': '3 2\\n', 'output': ['7', '7\\n\\n', '\\n7\\n', '7\\n', '7 ', '7 \\n', '7\\n\\n', '\\n7', '7\\n']}, {'input': '100000 13\\n', 'output': ['185515077\\n', '\\n185515077', '185515077', '185515077\\n', '\\n185515077\\n', '185515077 \\n', '185515077 ', '185515077\\n\\n', '185515077\\n\\n']}]","human_sample_testcases_3":"[{'input': '5 5\\n', 'output': ['32 \\n', '\\n32', '32 ', '32\\n\\n', '32', '32\\n', '32\\n\\n', '32\\n']}, {'input': '2 1\\n', 'output': ['\\n3\\n', '\\n3', '3\\n\\n', '3 \\n', '3\\n\\n', '3 ', '3\\n', '3\\n', '3']}, {'input': '5 31\\n', 'output': ['32 \\n', '\\n32', '32 ', '32\\n\\n', '32', '32\\n', '32\\n\\n', '32\\n']}, {'input': '100000 13\\n', 'output': ['185515077\\n', '\\n185515077', '185515077', '185515077\\n', '\\n185515077\\n', '185515077 \\n', '185515077 ', '185515077\\n\\n', '185515077\\n\\n']}, {'input': '11994 11995\\n', 'output': ['685385528 \\n', '685385528 ', '685385528\\n', '685385528\\n', '685385528\\n\\n', '\\n685385528', '685385528\\n\\n', '685385528']}]","human_sample_testcases_4":"[{'input': '99999 3123\\n', 'output': ['575224395\\n', '575224395\\n\\n', '575224395 ', '575224395\\n', '\\n575224395\\n', '575224395', '\\n575224395', '575224395 \\n', '575224395\\n\\n']}, {'input': '3 2\\n', 'output': ['7', '7\\n\\n', '\\n7\\n', '7\\n', '7 ', '7 \\n', '7\\n\\n', '\\n7', '7\\n']}, {'input': '11994 11995\\n', 'output': ['685385528 \\n', '685385528 ', '685385528\\n', '685385528\\n', '685385528\\n\\n', '\\n685385528', '685385528\\n\\n', '685385528']}, {'input': '100000 1\\n', 'output': ['100001 \\n', '100001', '\\n100001', '100001\\n\\n', '100001 ', '100001\\n', '100001\\n\\n', '\\n100001\\n', '100001\\n']}, {'input': '100000 1000000000\\n', 'output': ['607723520\\n', '607723520\\n', '\\n607723520', '607723520\\n\\n', '607723520\\n\\n', '607723520 ', '607723520', '607723520 \\n']}]","human_sample_testcases_5":"[{'input': '2 1\\n', 'output': ['\\n3\\n', '\\n3', '3\\n\\n', '3 \\n', '3\\n\\n', '3 ', '3\\n', '3\\n', '3']}, {'input': '5 31\\n', 'output': ['32 \\n', '\\n32', '32 ', '32\\n\\n', '32', '32\\n', '32\\n\\n', '32\\n']}, {'input': '87532 32150\\n', 'output': ['\\n165162987', '165162987\\n', '165162987', '165162987 \\n', '165162987\\n', '\\n165162987\\n', '165162987\\n\\n', '165162987\\n\\n', '165162987 ']}, {'input': '100000 1000000000\\n', 'output': ['607723520\\n', '607723520\\n', '\\n607723520', '607723520\\n\\n', '607723520\\n\\n', '607723520 ', '607723520', '607723520 \\n']}, {'input': '99999 3123\\n', 'output': ['575224395\\n', '575224395\\n\\n', '575224395 ', '575224395\\n', '\\n575224395\\n', '575224395', '\\n575224395', '575224395 \\n', '575224395\\n\\n']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":158,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"12 5\", \"31 12\"]","input_specification":"The only line of the input contains two integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u20091018). n is the initial value of variable a, and m is the initial value of variable b.","src_uid":"1f505e430eb930ea2b495ab531274114","source_code":"#include\nusing namespace std;\nlong long n,m;\nint main()\n{\n cin>>n>>m;\n while(n&&m)\n if(n>=2*m)n%=2*m;\n else if(m>=2*n)m%=2*n;\n else break;\n cout<\nusing namespace std;\nlong long c,wr,wb,hr,hb,ans=0;\nlong long get(int i){\n\treturn i*hr+hb*int((c-i*wr)\/wb);\n}\nint main(){\n\tcin>>c>>hr>>hb>>wr>>wb;\n\tif(hb*wr>hr*wb){\n\t\tswap(hr,hb);\n\t\tswap(wr,wb);\n\t}\n\tif(wr>1e4){\n\t\tfor(int i=0;i*wr<=c;++i)\n\t\t\tans=max(ans,get(i));\n\t}\n\telse if(wb>1e4){\n\t\tfor(int i=0;i*wb<=c;++i)\n\t\t\tans=max(ans,i*hb+hr*int((c-i*wb)\/wr));\n\t}\n\telse{\n\t\tfor(int i=0;i<1e7&&i*wb<=c;i++){\n\t\t\tans=max(ans,i*hb+hr*int((c-i*wb)\/wr));\n\t\t}\n\t}\n\tcout<\n#define ll long long int\nusing namespace std;\nconst int N=1010;\nconst int MOD=(int)1e6+3;\nll n,dp[N],twoPow[2*N];\n\nvoid init() {\n twoPow[0]=1;\n for(int i=1;i<=2*N;i++)\n twoPow[i]=(twoPow[i-1]*2)%MOD;\n memset(dp,-1,sizeof(dp));\n}\n\nll cookie(ll a) {\n return (twoPow[a-1]*(twoPow[a]+1))%MOD;\n}\n\nll solve(ll a) {\n if (a<=0)\n return 0;\n if (dp[a]!=-1)\n return dp[a];\n dp[a]=cookie(a)%MOD;\n for(int i=1;a-i>0;i++) {\n dp[a]=(dp[a]+solve(a-i)*twoPow[i-1])%MOD;\n }\n return dp[a];\n}\n\nint main() {\n init();\n cin >> n;\n cout << (twoPow[2*n]-solve(n)+MOD)%MOD << endl;\n}\n","sample_outputs":"[\"9\"]","lang_cluster":"C++","notes":"NoteIf the box possesses the base of 23\u2009\u00d7\u200923 (as in the example), then the cookies will be put there in the following manner: ","output_specification":"Print the single number, equal to the number of empty cells in the box. The answer should be printed modulo 106\u2009+\u20093.","description":"Fangy collects cookies. Once he decided to take a box and put cookies into it in some way. If we take a square k\u2009\u00d7\u2009k in size, divided into blocks 1\u2009\u00d7\u20091 in size and paint there the main diagonal together with cells, which lie above it, then the painted area will be equal to the area occupied by one cookie k in size. Fangy also has a box with a square base 2n\u2009\u00d7\u20092n, divided into blocks 1\u2009\u00d7\u20091 in size. In a box the cookies should not overlap, and they should not be turned over or rotated. See cookies of sizes 2 and 4 respectively on the figure: To stack the cookies the little walrus uses the following algorithm. He takes out of the repository the largest cookie which can fit in some place in the box and puts it there. Everything could be perfect but alas, in the repository the little walrus has infinitely many cookies of size 2 and larger, and there are no cookies of size 1, therefore, empty cells will remain in the box. Fangy wants to know how many empty cells will be left in the end.","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"243\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"59049\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"594320\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"782957\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"691074\"]}, {\"input\": \"657\\r\\n\", \"output\": [\"874011\"]}, {\"input\": \"561\\r\\n\", \"output\": [\"842553\"]}, {\"input\": \"823\\r\\n\", \"output\": [\"858672\"]}, {\"input\": \"850\\r\\n\", \"output\": [\"557186\"]}, {\"input\": \"298\\r\\n\", \"output\": [\"999535\"]}, {\"input\": \"262\\r\\n\", \"output\": [\"946384\"]}, {\"input\": \"910\\r\\n\", \"output\": [\"678945\"]}, {\"input\": \"617\\r\\n\", \"output\": [\"247876\"]}, {\"input\": \"857\\r\\n\", \"output\": [\"562128\"]}, {\"input\": \"69\\r\\n\", \"output\": [\"327984\"]}, {\"input\": \"589\\r\\n\", \"output\": [\"889192\"]}, {\"input\": \"928\\r\\n\", \"output\": [\"794863\"]}, {\"input\": \"696\\r\\n\", \"output\": [\"695035\"]}, {\"input\": \"226\\r\\n\", \"output\": [\"376094\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '69\\r\\n', 'output': ['327984']}, {'input': '1000\\r\\n', 'output': ['691074']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '589\\r\\n', 'output': ['889192']}, {'input': '6\\r\\n', 'output': ['243']}]","human_sample_testcases_2":"[{'input': '298\\r\\n', 'output': ['999535']}, {'input': '850\\r\\n', 'output': ['557186']}, {'input': '4\\r\\n', 'output': ['27']}, {'input': '910\\r\\n', 'output': ['678945']}, {'input': '69\\r\\n', 'output': ['327984']}]","human_sample_testcases_3":"[{'input': '1\\r\\n', 'output': ['1']}, {'input': '823\\r\\n', 'output': ['858672']}, {'input': '11\\r\\n', 'output': ['59049']}, {'input': '298\\r\\n', 'output': ['999535']}, {'input': '617\\r\\n', 'output': ['247876']}]","human_sample_testcases_4":"[{'input': '7\\r\\n', 'output': ['729']}, {'input': '3\\r\\n', 'output': ['9']}, {'input': '850\\r\\n', 'output': ['557186']}, {'input': '561\\r\\n', 'output': ['842553']}, {'input': '657\\r\\n', 'output': ['874011']}]","human_sample_testcases_5":"[{'input': '823\\r\\n', 'output': ['858672']}, {'input': '0\\r\\n', 'output': ['1']}, {'input': '4\\r\\n', 'output': ['27']}, {'input': '2\\r\\n', 'output': ['3']}, {'input': '298\\r\\n', 'output': ['999535']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.45,"human_sample_line_coverage_2":95.45,"human_sample_line_coverage_3":95.45,"human_sample_line_coverage_4":95.45,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":100.0,"id":161,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.36,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"3 6 100000\", \"6 21 100129\", \"58 787788 50216\"]","input_specification":"The only line contains three integers maxn, maxa and q (1\u2009\u2264\u2009maxn\u2009\u2264\u200930\u2009000; maxn\u2009\u2264\u2009maxa\u2009\u2264\u2009109; 104\u2009\u2264\u2009q\u2009\u2264\u2009105\u2009+\u2009129).","src_uid":"aac481d9e5ea3e3d43b324c8750882be","source_code":"#include \nusing namespace std;\n\nconst int p1 = 998244353, p2 = 469762049, Maxn = 1 << 17 | 5;\nint maxn, maxa, mod, rev[Maxn];\nint tot, l[Maxn];\nconst long long lcm = p1 * (long long) p2;\nvoid get_rev(int len)\n{\n\tfor (int i = 0; i < len; i++)\n\t\trev[i] = (rev[i >> 1] >> 1) | ((i & 1) * (len >> 1));\n}\nlong long fast_pow(long long x, long long y, int p)\n{\n\tlong long ans = 1, now = x;\n\twhile (y)\n\t{\n\t\tif (y & 1) ans = ans * now % p;\n\t\tnow = now * now % p;\n\t\ty >>= 1;\n\t}\n\treturn ans;\n}\nvoid NTT(int now[], int len, int p, bool type = false)\n{\n\tl[0] = 1;\n\tint inv3 = fast_pow(3, p - 2, p);\n\tfor (int i = 0; i < len; i++)\n\t\tif (i < rev[i]) swap(now[i], now[rev[i]]);\n\tfor (int i = 1; i < len; i <<= 1)\n\t{\n\t\tlong long w = fast_pow(type ? inv3 : 3, (p - 1) \/ (i << 1), p);\n\t\tfor (int j = 1; j < i; j++)\n\t\t\tl[j] = l[j - 1] * w % p;\n\t\tfor (int j = 0; j < len; j += (i << 1))\n\t\t\tfor (int k = j; k < i + j; k++)\n\t\t\t{\n\t\t\t\tint x = now[i + k] * (long long) l[k - j] % p, y = now[k];\n\t\t\t\tnow[k] = (x + y) % p;\n\t\t\t\tnow[i + k] = (y - x + p) % p;\n\t\t\t}\n\t}\n\tif (type)\n\t{\n\t\tlong long inv = fast_pow(len, p - 2, p);\n\t\tfor (int i = 0; i < len; i++)\n\t\t\tnow[i] = now[i] * inv % p;\n\t}\n}\nvoid multi(int x[], int y[], int result[], int len, int p)\n{\n\tNTT(x, len, p), NTT(y, len, p);\n\tfor (int i = 0; i < len; i++)\n\t\tresult[i] = x[i] * (long long) y[i] % p;\n\tNTT(result, len, p, true);\n}\nlong long mul(long long x, long long y)\n{\n\treturn ((unsigned long long) x * y - (long long) (x \/ (long double) lcm * y) * lcm + lcm) % lcm;\n}\nvoid multi(int x[], int y[], int result[], int len)\n{\n\tget_rev(len);\n\tstatic int tmp1[Maxn], tmp2[Maxn], tmpx[Maxn], tmpy[Maxn];\n\tfor (int i = 0; i < len; i++)\n\t\ttmpx[i] = x[i], tmpy[i] = y[i];\n\tmulti(tmpx, tmpy, tmp1, len, p1);\n\tfor (int i = 0; i < len; i++)\n\t\ttmpx[i] = x[i], tmpy[i] = y[i];\n\tmulti(tmpx, tmpy, tmp2, len, p2);\n\tlong long P1 = fast_pow(p2, p1 - 2, p1), P2 = fast_pow(p1, p2 - 2, p2);\n\tfor (int i = 0; i < len; i++)\n\t\tresult[i] = (mul(mul(tmp1[i], p2), P1) + mul(mul(tmp2[i], p1), P2)) % lcm % mod;\n}\nvoid poly_pow(int y, int len)\n{\n\tint now = 0;\n\tstatic int ans[2][Maxn];\n\tmemset(ans[0], 0, sizeof(int[len << 1]));\n\tmemset(ans[1], 0, sizeof(int[len << 1]));\n\tstatic int tmp[Maxn], result[2][Maxn];\n\tfor (int j = 30; j >= 0; j--)\n\t{\n\t\tcerr << j << endl;\n\t\tmemset(tmp, 0, sizeof(int[len << 1]));\n\t\tfor (int i = 0; i < len; i++)\n\t\t\ttmp[i] = (ans[0][i] + ans[1][i]) % mod;\n\t\ttmp[0]++;\n\t\tfor (int p = 0; p <= 1; p++)\n\t\t\tmulti(tmp, ans[(now & 1) ^ p], result[p], len << 1);\n\t\tfor (int p = 0; p <= 1; p++)\n\t\t\tfor (int i = 0; i < len; i++)\n\t\t\t\t(ans[p][i] += result[p][i]) %= mod;\n\t\tnow <<= 1;\n\t\tif (y & (1 << j))\n\t\t{\n\t\t\tfor (int i = len - 1; i; i--)\n\t\t\t\t(ans[1][i] += ans[0][i - 1] + ans[1][i - 1]) %= mod;\n\t\t\tans[1][1]++; \n\t\t\tnow++;\n\t\t}\n\t\tif (now != y)\n\t\t\tfor (int i = 1; i <= maxn; i += 2)\n\t\t\t\t(tot += ans[1][i]) %= mod;\n\t}\n}\nint lower(int x)\n{\n\tint tmp = 1;\n\tfor (; tmp < x; tmp <<= 1);\n\treturn tmp;\n}\nint main()\n{\n\tscanf(\"%d%d%d\", &maxn, &maxa, &mod);\n\tpoly_pow(maxa, lower(maxn + 1));\n\tprintf(\"%d\", tot);\n\treturn 0;\n}","sample_outputs":"[\"4\", \"154\", \"46009\"]","lang_cluster":"C++","notes":"NoteIn the first example, interesting test cases look as follows: 1 1 1 32 4 6 2 4 6","output_specification":"Output a single integer\u00a0\u2014 the number of test cases which satisfy the constraints and make both wrong solutions output an incorrect answer, modulo q.","description":"Test data generation is not an easy task! Often, generating big random test cases is not enough to ensure thorough testing of solutions for correctness.For example, consider a problem from an old Codeforces round. Its input format looks roughly as follows:The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009maxn)\u00a0\u2014 the size of the set. The second line contains n distinct integers a1,\u2009a2,\u2009...,\u2009an (1\u2009\u2264\u2009ai\u2009\u2264\u2009maxa)\u00a0\u2014 the elements of the set in increasing order.If you don't pay attention to the problem solution, it looks fairly easy to generate a good test case for this problem. Let n\u2009=\u2009maxn, take random distinct ai from 1 to maxa, sort them... Soon you understand that it's not that easy.Here is the actual problem solution. Let g be the greatest common divisor of a1,\u2009a2,\u2009...,\u2009an. Let x\u2009=\u2009an\u2009\/\u2009g\u2009-\u2009n. Then the correct solution outputs \"Alice\" if x is odd, and \"Bob\" if x is even.Consider two wrong solutions to this problem which differ from the correct one only in the formula for calculating x.The first wrong solution calculates x as x\u2009=\u2009an\u2009\/\u2009g (without subtracting n).The second wrong solution calculates x as x\u2009=\u2009an\u2009-\u2009n (without dividing by g).A test case is interesting if it makes both wrong solutions output an incorrect answer.Given maxn, maxa and q, find the number of interesting test cases satisfying the constraints, and output it modulo q.","human_testcases":"[{\"input\": \"3 6 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 21 100129\\r\\n\", \"output\": [\"154\"]}, {\"input\": \"58 787788 50216\\r\\n\", \"output\": [\"46009\"]}, {\"input\": \"1 1 10000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 20 100000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2 20 100000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100 12345 100000\\r\\n\", \"output\": [\"22765\"]}, {\"input\": \"30000 1000000000 100123\\r\\n\", \"output\": [\"21272\"]}, {\"input\": \"30000 536870911 100123\\r\\n\", \"output\": [\"82802\"]}, {\"input\": \"200 1000000000 100123\\r\\n\", \"output\": [\"88152\"]}, {\"input\": \"200 536870911 100123\\r\\n\", \"output\": [\"11017\"]}, {\"input\": \"200 536870912 100123\\r\\n\", \"output\": [\"11018\"]}, {\"input\": \"1000 536870911 100123\\r\\n\", \"output\": [\"64128\"]}, {\"input\": \"2000 536870911 100123\\r\\n\", \"output\": [\"95429\"]}, {\"input\": \"4000 536870911 100123\\r\\n\", \"output\": [\"9643\"]}, {\"input\": \"8000 536870911 100123\\r\\n\", \"output\": [\"84503\"]}, {\"input\": \"16000 536870911 100123\\r\\n\", \"output\": [\"57489\"]}, {\"input\": \"16000 1000000000 100123\\r\\n\", \"output\": [\"89479\"]}, {\"input\": \"10 20 100000\\r\\n\", \"output\": [\"184\"]}, {\"input\": \"20 25 100000\\r\\n\", \"output\": [\"698\"]}, {\"input\": \"5 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 2 100123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 536870911 100123\\r\\n\", \"output\": [\"5692\"]}, {\"input\": \"1 536870912 100123\\r\\n\", \"output\": [\"5693\"]}, {\"input\": \"1 1000000000 100123\\r\\n\", \"output\": [\"85861\"]}, {\"input\": \"2 1000000000 100123\\r\\n\", \"output\": [\"85861\"]}, {\"input\": \"2 2 100123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 100123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3 100123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"16383 1000000000 100129\\r\\n\", \"output\": [\"92305\"]}, {\"input\": \"16384 1000000000 100129\\r\\n\", \"output\": [\"92305\"]}, {\"input\": \"16385 1000000000 100129\\r\\n\", \"output\": [\"498\"]}, {\"input\": \"30000 999999999 100129\\r\\n\", \"output\": [\"23865\"]}, {\"input\": \"30000 536870912 100129\\r\\n\", \"output\": [\"90668\"]}, {\"input\": \"30000 536870913 100129\\r\\n\", \"output\": [\"90668\"]}, {\"input\": \"29673 671088479 10000\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"29804 939519871 100000\\r\\n\", \"output\": [\"99167\"]}, {\"input\": \"29097 671084543 100123\\r\\n\", \"output\": [\"69927\"]}, {\"input\": \"29364 536805295 100128\\r\\n\", \"output\": [\"55925\"]}, {\"input\": \"29465 805306303 100129\\r\\n\", \"output\": [\"71904\"]}, {\"input\": \"29441 671087487 65535\\r\\n\", \"output\": [\"40129\"]}, {\"input\": \"29923 989593598 65536\\r\\n\", \"output\": [\"7161\"]}, {\"input\": \"29909 794820607 59049\\r\\n\", \"output\": [\"20195\"]}, {\"input\": \"29459 805306359 46656\\r\\n\", \"output\": [\"36813\"]}, {\"input\": \"29521 536575999 30030\\r\\n\", \"output\": [\"13478\"]}, {\"input\": \"29327 771678207 60060\\r\\n\", \"output\": [\"15506\"]}, {\"input\": \"29523 939524027 90090\\r\\n\", \"output\": [\"37791\"]}, {\"input\": \"29182 804781951 10201\\r\\n\", \"output\": [\"8309\"]}, {\"input\": \"29292 671087615 91809\\r\\n\", \"output\": [\"62523\"]}, {\"input\": \"29939 981434367 97969\\r\\n\", \"output\": [\"45387\"]}, {\"input\": \"29928 938995199 96721\\r\\n\", \"output\": [\"17029\"]}, {\"input\": \"29811 803209213 97343\\r\\n\", \"output\": [\"75766\"]}, {\"input\": \"29216 939522047 79507\\r\\n\", \"output\": [\"7416\"]}, {\"input\": \"29622 805175167 83521\\r\\n\", \"output\": [\"30548\"]}, {\"input\": \"29825 201293823 67228\\r\\n\", \"output\": [\"62779\"]}, {\"input\": \"29244 922681341 78125\\r\\n\", \"output\": [\"11842\"]}, {\"input\": \"29782 536870845 100126\\r\\n\", \"output\": [\"74061\"]}, {\"input\": \"29725 535755775 100118\\r\\n\", \"output\": [\"6811\"]}, {\"input\": \"29393 536870879 10001\\r\\n\", \"output\": [\"6365\"]}, {\"input\": \"29875 805036031 10002\\r\\n\", \"output\": [\"3441\"]}, {\"input\": \"29876 804782015 100106\\r\\n\", \"output\": [\"35274\"]}, {\"input\": \"1 1 100000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 4 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 4 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 4 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 4 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 5 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 6 100000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 6 100000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 6 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 6 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 6 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 6 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 7 100000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 7 100000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"7 7 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 8 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 8 100000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"7 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 8 100000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"30000 30000 30000\\r\\n\", \"output\": [\"13816\"]}, {\"input\": \"30000 59999 10000\\r\\n\", \"output\": [\"1987\"]}, {\"input\": \"30000 60000 10000\\r\\n\", \"output\": [\"5379\"]}, {\"input\": \"30000 60001 10000\\r\\n\", \"output\": [\"5379\"]}, {\"input\": \"30000 60002 10000\\r\\n\", \"output\": [\"66\"]}, {\"input\": \"29999 30000 10007\\r\\n\", \"output\": [\"2397\"]}, {\"input\": \"29999 29999 29999\\r\\n\", \"output\": [\"8411\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '29804 939519871 100000\\r\\n', 'output': ['99167']}, {'input': '2 6 100000\\r\\n', 'output': ['3']}, {'input': '4 7 100000\\r\\n', 'output': ['4']}, {'input': '6 7 100000\\r\\n', 'output': ['4']}, {'input': '1000 536870911 100123\\r\\n', 'output': ['64128']}]","human_sample_testcases_2":"[{'input': '29364 536805295 100128\\r\\n', 'output': ['55925']}, {'input': '16000 536870911 100123\\r\\n', 'output': ['57489']}, {'input': '29875 805036031 10002\\r\\n', 'output': ['3441']}, {'input': '29441 671087487 65535\\r\\n', 'output': ['40129']}, {'input': '3 6 100000\\r\\n', 'output': ['4']}]","human_sample_testcases_3":"[{'input': '20 25 100000\\r\\n', 'output': ['698']}, {'input': '2 2 100000\\r\\n', 'output': ['1']}, {'input': '16385 1000000000 100129\\r\\n', 'output': ['498']}, {'input': '30000 60000 10000\\r\\n', 'output': ['5379']}, {'input': '3 6 100000\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '5 5 100000\\r\\n', 'output': ['2']}, {'input': '3 6 100000\\r\\n', 'output': ['4']}, {'input': '5 5 100000\\r\\n', 'output': ['2']}, {'input': '30000 1000000000 100123\\r\\n', 'output': ['21272']}, {'input': '29673 671088479 10000\\r\\n', 'output': ['67']}]","human_sample_testcases_5":"[{'input': '16385 1000000000 100129\\r\\n', 'output': ['498']}, {'input': '4 4 100000\\r\\n', 'output': ['2']}, {'input': '29811 803209213 97343\\r\\n', 'output': ['75766']}, {'input': '2 6 100000\\r\\n', 'output': ['3']}, {'input': '3 5 100000\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":162,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"BBBSSC\\n6 4 1\\n1 2 3\\n4\", \"BBC\\n1 10 1\\n1 10 1\\n21\", \"BSC\\n1 1 1\\n1 1 3\\n1000000000000\"]","input_specification":"The first line of the input contains a non-empty string that describes the recipe of \"Le Hamburger de Polycarpus\". The length of the string doesn't exceed 100, the string contains only letters 'B' (uppercase English B), 'S' (uppercase English S) and 'C' (uppercase English C). The second line contains three integers nb, ns, nc (1\u2009\u2264\u2009nb,\u2009ns,\u2009nc\u2009\u2264\u2009100) \u2014 the number of the pieces of bread, sausage and cheese on Polycarpus' kitchen. The third line contains three integers pb, ps, pc (1\u2009\u2264\u2009pb,\u2009ps,\u2009pc\u2009\u2264\u2009100) \u2014 the price of one piece of bread, sausage and cheese in the shop. Finally, the fourth line contains integer r (1\u2009\u2264\u2009r\u2009\u2264\u20091012) \u2014 the number of rubles Polycarpus has. Please, do not write the %lld specifier to read or write 64-bit integers in \u0421++. It is preferred to use the cin, cout streams or the %I64d specifier.","src_uid":"8126a4232188ae7de8e5a7aedea1a97e","source_code":"#include \n \nusing namespace std;\nstring s;\nint need[3] = {};\nint have[3] = {};\nint price[3] = {};\nlong long r ;\nbool solve(long long m)\n{\n long long p = 0;\n for (int i = 0 ; i < 3 ; i++)\n {\n long long z = m*need[i];\n z = z - have[i];\n if (z > 0)\n {\n p = p + z*price[i];\n }\n }\n return p <= r;\n}\n \nint main()\n{\n cin >> s;\n for (int i = 0 ; i < s.size() ; i++)\n {\n if (s[i] == 'B')need[0]++;\n if (s[i] == 'S')need[1]++;\n if (s[i] == 'C')need[2]++;\n }\n for (int i = 0 ; i < 3 ; i++)\n {\n cin >> have[i];\n }\n for (int i = 0 ; i < 3 ; i++)\n cin >> price[i];\n cin >> r;\n long long s = 0 , e = 1e15;\n long long ans = 0;\n while(s <= e)\n {\n long long middle = (s+e)\/2;\n if (solve(middle))\n {\n \n s = middle+1;\n ans = middle;\n }\n else e = middle - 1;\n \n }\n cout << ans << endl;\n \n return 0;\n}\n","sample_outputs":"[\"2\", \"7\", \"200000000001\"]","lang_cluster":"C++","notes":null,"output_specification":"Print the maximum number of hamburgers Polycarpus can make. If he can't make any hamburger, print 0.","description":"Polycarpus loves hamburgers very much. He especially adores the hamburgers he makes with his own hands. Polycarpus thinks that there are only three decent ingredients to make hamburgers from: a bread, sausage and cheese. He writes down the recipe of his favorite \"Le Hamburger de Polycarpus\" as a string of letters 'B' (bread), 'S' (sausage) \u0438 'C' (cheese). The ingredients in the recipe go from bottom to top, for example, recipe \"\u0412SCBS\" represents the hamburger where the ingredients go from bottom to top as bread, sausage, cheese, bread and sausage again.Polycarpus has nb pieces of bread, ns pieces of sausage and nc pieces of cheese in the kitchen. Besides, the shop nearby has all three ingredients, the prices are pb rubles for a piece of bread, ps for a piece of sausage and pc for a piece of cheese.Polycarpus has r rubles and he is ready to shop on them. What maximum number of hamburgers can he cook? You can assume that Polycarpus cannot break or slice any of the pieces of bread, sausage or cheese. Besides, the shop has an unlimited number of pieces of each ingredient.","human_testcases":"[{\"input\": \"BBBSSC\\r\\n6 4 1\\r\\n1 2 3\\r\\n4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"BBC\\r\\n1 10 1\\r\\n1 10 1\\r\\n21\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"BSC\\r\\n1 1 1\\r\\n1 1 3\\r\\n1000000000000\\r\\n\", \"output\": [\"200000000001\"]}, {\"input\": \"B\\r\\n1 1 1\\r\\n1 1 1\\r\\n381\\r\\n\", \"output\": [\"382\"]}, {\"input\": \"BSC\\r\\n3 5 6\\r\\n7 3 9\\r\\n100\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"BSC\\r\\n100 1 1\\r\\n100 1 1\\r\\n100\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"SBBCCSBB\\r\\n1 50 100\\r\\n31 59 21\\r\\n100000\\r\\n\", \"output\": [\"370\"]}, {\"input\": \"BBBBCCCCCCCCCCCCCCCCCCCCSSSSBBBBBBBBSS\\r\\n100 100 100\\r\\n1 1 1\\r\\n3628800\\r\\n\", \"output\": [\"95502\"]}, {\"input\": \"BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n200\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n2000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n300\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n300000000\\r\\n\", \"output\": [\"42858\"]}, {\"input\": \"BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n914159265358\\r\\n\", \"output\": [\"130594181\"]}, {\"input\": \"SSSSSSSSSSBBBBBBBBBCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSBB\\r\\n31 53 97\\r\\n13 17 31\\r\\n914159265358\\r\\n\", \"output\": [\"647421579\"]}, {\"input\": \"BBBCSBSBBSSSSCCCCBBCSBBBBSSBBBCBSCCSSCSSCSBSSSCCCCBSCSSBSSSCCCBBCCCSCBCBBCCSCCCCSBBCCBBBBCCCCCCBSSCB\\r\\n91 87 17\\r\\n64 44 43\\r\\n958532915587\\r\\n\", \"output\": [\"191668251\"]}, {\"input\": \"CSSCBBCCCSBSCBBBCSBBBCBSBCSCBCSCBCBSBCBCSSBBSBBCBBBBSCSBBCCBCCBCBBSBSBCSCSBBSSBBCSSBCSCSCCSSBCBBCBSB\\r\\n56 34 48\\r\\n78 6 96\\r\\n904174875419\\r\\n\", \"output\": [\"140968956\"]}, {\"input\": \"CCSCCCSBBBSCBSCSCCSSBBBSSBBBSBBBCBCSSBCSCBBCCCBCBCBCCCSSBSBBCCCCCBBSCBSCBCBBCBBCSSBCSBSSCCSCCSCCBBBS\\r\\n33 73 67\\r\\n4 56 42\\r\\n886653164314\\r\\n\", \"output\": [\"277425898\"]}, {\"input\": \"SBCSSCBBSSBCSSBBBSSBSCBSSSCBBSBBBBCSBCSBSCBSCBSCBSBSSCCCCBSBCCBCBSCCCBSCCBSBBCBSSCCCCSBSBBBSSSBCSCBC\\r\\n94 16 85\\r\\n14 18 91\\r\\n836590091442\\r\\n\", \"output\": [\"217522127\"]}, {\"input\": \"BSCSBSCCSCSSCCCSBCSSBCBBSCCBSCCSSSSSSSSSCCSBSCCBBCBBSBSCCCCBCSBSBSSBBBBBSSBSSCBCCSSBSSSCBBCSBBSBCCCB\\r\\n67 54 8\\r\\n36 73 37\\r\\n782232051273\\r\\n\", \"output\": [\"154164772\"]}, {\"input\": \"CBBCBSBCCSCBSSCCBCSBCSBBSCBBCSCCBSCCSCSBBSSBSBSCBBSBBCSSSSBBBBSBBCBCSBBCBCSSBBCSBSCCSCSBCSCBSCCBBCSC\\r\\n71 71 52\\r\\n52 88 3\\r\\n654400055575\\r\\n\", \"output\": [\"137826467\"]}, {\"input\": \"CBBCBSBCCSCBSSCCBCSBCSBBSCBBCSCCBSCCSCSBBSBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCBBCSC\\r\\n100 1 1\\r\\n1 17 23\\r\\n954400055575\\r\\n\", \"output\": [\"1355681897\"]}, {\"input\": \"C\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n\", \"output\": [\"1000000000100\"]}, {\"input\": \"SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n100 100 100\\r\\n100 100 100\\r\\n1000000000000\\r\\n\", \"output\": [\"100000001\"]}, {\"input\": \"B\\r\\n100 100 100\\r\\n1 1 1\\r\\n1\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"SC\\r\\n2 1 1\\r\\n1 1 1\\r\\n100000000000\\r\\n\", \"output\": [\"50000000001\"]}, {\"input\": \"B\\r\\n100 1 1\\r\\n1 1 1\\r\\n1000000000000\\r\\n\", \"output\": [\"1000000000100\"]}, {\"input\": \"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\r\\n1 1 1\\r\\n100 100 100\\r\\n1000000000000\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"CC\\r\\n1 1 1\\r\\n100 100 100\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"B\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n\", \"output\": [\"1000000000100\"]}, {\"input\": \"BSC\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n\", \"output\": [\"333333333433\"]}, {\"input\": \"BSC\\r\\n100 100 100\\r\\n1 1 1\\r\\n1\\r\\n\", \"output\": [\"100\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'CSSCBBCCCSBSCBBBCSBBBCBSBCSCBCSCBCBSBCBCSSBBSBBCBBBBSCSBBCCBCCBCBBSBSBCSCSBBSSBBCSSBCSCSCCSSBCBBCBSB\\r\\n56 34 48\\r\\n78 6 96\\r\\n904174875419\\r\\n', 'output': ['140968956']}, {'input': 'BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n2000\\r\\n', 'output': ['1']}, {'input': 'BSC\\r\\n3 5 6\\r\\n7 3 9\\r\\n100\\r\\n', 'output': ['10']}, {'input': 'SC\\r\\n2 1 1\\r\\n1 1 1\\r\\n100000000000\\r\\n', 'output': ['50000000001']}, {'input': 'C\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n', 'output': ['1000000000100']}]","human_sample_testcases_2":"[{'input': 'BBBCSBSBBSSSSCCCCBBCSBBBBSSBBBCBSCCSSCSSCSBSSSCCCCBSCSSBSSSCCCBBCCCSCBCBBCCSCCCCSBBCCBBBBCCCCCCBSSCB\\r\\n91 87 17\\r\\n64 44 43\\r\\n958532915587\\r\\n', 'output': ['191668251']}, {'input': 'B\\r\\n100 100 100\\r\\n1 1 1\\r\\n1\\r\\n', 'output': ['101']}, {'input': 'SSSSSSSSSSBBBBBBBBBCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSBB\\r\\n31 53 97\\r\\n13 17 31\\r\\n914159265358\\r\\n', 'output': ['647421579']}, {'input': 'CSSCBBCCCSBSCBBBCSBBBCBSBCSCBCSCBCBSBCBCSSBBSBBCBBBBSCSBBCCBCCBCBBSBSBCSCSBBSSBBCSSBCSCSCCSSBCBBCBSB\\r\\n56 34 48\\r\\n78 6 96\\r\\n904174875419\\r\\n', 'output': ['140968956']}, {'input': 'BSC\\r\\n100 1 1\\r\\n100 1 1\\r\\n100\\r\\n', 'output': ['51']}]","human_sample_testcases_3":"[{'input': 'B\\r\\n100 1 1\\r\\n1 1 1\\r\\n1000000000000\\r\\n', 'output': ['1000000000100']}, {'input': 'CBBCBSBCCSCBSSCCBCSBCSBBSCBBCSCCBSCCSCSBBSSBSBSCBBSBBCSSSSBBBBSBBCBCSBBCBCSSBBCSBSCCSCSBCSCBSCCBBCSC\\r\\n71 71 52\\r\\n52 88 3\\r\\n654400055575\\r\\n', 'output': ['137826467']}, {'input': 'BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n2000\\r\\n', 'output': ['1']}, {'input': 'B\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n', 'output': ['1000000000100']}, {'input': 'CSSCBBCCCSBSCBBBCSBBBCBSBCSCBCSCBCBSBCBCSSBBSBBCBBBBSCSBBCCBCCBCBBSBSBCSCSBBSSBBCSSBCSCSCCSSBCBBCBSB\\r\\n56 34 48\\r\\n78 6 96\\r\\n904174875419\\r\\n', 'output': ['140968956']}]","human_sample_testcases_4":"[{'input': 'CBBCBSBCCSCBSSCCBCSBCSBBSCBBCSCCBSCCSCSBBSBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCBBCSC\\r\\n100 1 1\\r\\n1 17 23\\r\\n954400055575\\r\\n', 'output': ['1355681897']}, {'input': 'BBBBCCCCCCCCCCCCCCCCCCCCSSSSBBBBBBBBSS\\r\\n100 100 100\\r\\n1 1 1\\r\\n3628800\\r\\n', 'output': ['95502']}, {'input': 'CSSCBBCCCSBSCBBBCSBBBCBSBCSCBCSCBCBSBCBCSSBBSBBCBBBBSCSBBCCBCCBCBBSBSBCSCSBBSSBBCSSBCSCSCCSSBCBBCBSB\\r\\n56 34 48\\r\\n78 6 96\\r\\n904174875419\\r\\n', 'output': ['140968956']}, {'input': 'C\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n', 'output': ['1000000000100']}, {'input': 'BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n2000\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': 'B\\r\\n1 1 1\\r\\n1 1 1\\r\\n381\\r\\n', 'output': ['382']}, {'input': 'B\\r\\n100 100 100\\r\\n1 1 1\\r\\n1\\r\\n', 'output': ['101']}, {'input': 'BBC\\r\\n1 10 1\\r\\n1 10 1\\r\\n21\\r\\n', 'output': ['7']}, {'input': 'BSC\\r\\n100 100 100\\r\\n1 1 1\\r\\n1000000000000\\r\\n', 'output': ['333333333433']}, {'input': 'BBBBBBBBBBCCCCCCCCCCCCCCCCCCCCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS\\r\\n10 20 40\\r\\n100 100 100\\r\\n300\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":163,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"sumimasen\", \"ninja\", \"codeforces\"]","input_specification":"The first line of the input contains the string $$$s$$$ consisting of $$$|s|$$$ ($$$1\\leq |s|\\leq 100$$$) lowercase Latin letters.","src_uid":"a83144ba7d4906b7692456f27b0ef7d4","source_code":"#include\nusing namespace std;\nstring st;\nbool pd(int i)\n{\n return st[i]=='a'||st[i]=='e'||st[i]=='i'||st[i]=='o'||st[i]=='u';\n}\nint main()\n{\n\tcin>>st;\n\tfor(int i=0;i\n#define ll long long\nconst int maxs=(1<<18)+5;\nconst int maxn=110;\nusing namespace std;\nint cnt=-1,w[20],m;\nll f[maxs][maxn],n;\nbool vis[10];\nint main(){\n\tfor(cin>>n>>m;n;n\/=10)\n\t w[++cnt]=n%10;\n\tf[0][0]=1;\n\tfor(int s=1;s<1<\n#include\n#include\n#include\nusing namespace std;\nconst int maxn = 105;\nint n,m;\nint mp[maxn];\nint a[maxn];\nint main()\n{\n cin>>n>>m;\n \/*int mp[maxn];\n int a[maxn];*\/\n int cnt;\n \/\/memset(mp,0,sizeof(mp));\n for(int i=0;i>a[i];\n mp[a[i]]=1;\n }\n\n cnt=0;\n if(mp[m]==1) cnt++;\n for(int i=0;i\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nusing namespace std;\n\n#define f(i,s,e) for (int i = int(s); i != int(e); i++)\n#define ft(i,c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)\n#define all(c) (c).begin(), (c).end()\n\n\/\/read scanf functions\n#define readI(x) scanf(\"%d\", &x)\n#define readL(x) scanf(\"%I64d\", &x)\n#define readD(x) scanf(\"%f\", &x)\n#define readII(x, y) scanf(\"%d %d\", &x, &y)\n#define readLL(x, y) scanf(\"%I64d %I64d\", &x, &y)\n\ntypedef long long ll;\n\nll l, r;\n\n\nint cntDigits(ll x) {\n int ret =0;\n while (x) ret++, x\/=10;\n return ret;\n}\nll power[20];\n\nll solve(ll x) {\n ll ret;\n if (x <= 9) ret = x;\n else ret = x\/10-1+9;\n\n if (x>9)\n ret += ((x%10)>=x\/(power[cntDigits(x)-1]));\n return ret;\n}\n\nint main() {\n cin >> l >> r;\n power[0]= 1;\n for(int i=1; i<=19; i++) power[i] = power[i-1]*10;\n cout << solve(r) - solve(l-1) << \"\\n\";\n return 0;\n}\n","sample_outputs":"[\"12\", \"98\"]","lang_cluster":"C++","notes":"NoteIn the first sample the answer includes integers 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44. ","output_specification":"On a single line print a single integer \u2014 the answer to the problem.","description":"The Little Elephant very much loves sums on intervals.This time he has a pair of integers l and r (l\u2009\u2264\u2009r). The Little Elephant has to find the number of such integers x (l\u2009\u2264\u2009x\u2009\u2264\u2009r), that the first digit of integer x equals the last one (in decimal notation). For example, such numbers as 101, 477474 or 9 will be included in the answer and 47, 253 or 1020 will not.Help him and count the number of described numbers x for a given pair l and r.","human_testcases":"[{\"input\": \"2 47\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"47 1024\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"1 1000\\r\\n\", \"output\": [\"108\"]}, {\"input\": \"1 10000\\r\\n\", \"output\": [\"1008\"]}, {\"input\": \"47 8545\\r\\n\", \"output\": [\"849\"]}, {\"input\": \"1000 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"47547 4587554587754542\\r\\n\", \"output\": [\"458755458770699\"]}, {\"input\": \"1 1000000\\r\\n\", \"output\": [\"100008\"]}, {\"input\": \"47 74\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10001 10000002\\r\\n\", \"output\": [\"999001\"]}, {\"input\": \"10000 100000\\r\\n\", \"output\": [\"9000\"]}, {\"input\": \"458754 4588754\\r\\n\", \"output\": [\"413001\"]}, {\"input\": \"111 111\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"110 147\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"100000008\"]}, {\"input\": \"12 10000000000\\r\\n\", \"output\": [\"999999998\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000000000000\\r\\n\", \"output\": [\"100000000000000008\"]}, {\"input\": \"11 111111111111111100\\r\\n\", \"output\": [\"11111111111111109\"]}, {\"input\": \"100000000000000000 1000000000000000000\\r\\n\", \"output\": [\"90000000000000000\"]}, {\"input\": \"45481484484 848469844684844\\r\\n\", \"output\": [\"84842436320036\"]}, {\"input\": \"975400104587000 48754000000000001\\r\\n\", \"output\": [\"4777859989541300\"]}, {\"input\": \"11220451511 51511665251233335\\r\\n\", \"output\": [\"5151165403078183\"]}, {\"input\": \"77 77\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"99 102\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9997 87878000008\\r\\n\", \"output\": [\"8787799002\"]}, {\"input\": \"10000000001 111111111111100001\\r\\n\", \"output\": [\"11111110111110001\"]}, {\"input\": \"7777 88888\\r\\n\", \"output\": [\"8112\"]}, {\"input\": \"999999999 10000000000\\r\\n\", \"output\": [\"900000001\"]}, {\"input\": \"235 236\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"7 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 11\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"7 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"88 990\\r\\n\", \"output\": [\"91\"]}, {\"input\": \"458985985498001244 985458425544874008\\r\\n\", \"output\": [\"52647244004687276\"]}, {\"input\": \"115998725487587451 245744899758754501\\r\\n\", \"output\": [\"12974617427116705\"]}, {\"input\": \"595754249475458004 615044544745124547\\r\\n\", \"output\": [\"1929029526966655\"]}, {\"input\": \"9754875457700 1000000000000000000\\r\\n\", \"output\": [\"99999024512454230\"]}, {\"input\": \"8758754570000 999999999999999999\\r\\n\", \"output\": [\"99999124124543000\"]}, {\"input\": \"111111111111111111 333333333444444445\\r\\n\", \"output\": [\"22222222233333334\"]}, {\"input\": \"822981258385599125 841978899930248528\\r\\n\", \"output\": [\"1899764154464941\"]}, {\"input\": \"779547115376367013 980561039207670775\\r\\n\", \"output\": [\"20101392383130376\"]}, {\"input\": \"335408916782916802 416495628489807285\\r\\n\", \"output\": [\"8108671170689049\"]}, {\"input\": \"252509053898415172 285803555062529649\\r\\n\", \"output\": [\"3329450116411448\"]}, {\"input\": \"919845424847912645 970651082117950285\\r\\n\", \"output\": [\"5080565727003764\"]}, {\"input\": \"522842183413115088 853628713003942530\\r\\n\", \"output\": [\"33078652959082744\"]}, {\"input\": \"84324827171274023 607953653548585226\\r\\n\", \"output\": [\"52362882637731121\"]}, {\"input\": \"1312148742261681 277460340506883334\\r\\n\", \"output\": [\"27614819176462166\"]}, {\"input\": \"645762257531682046 885295120956158518\\r\\n\", \"output\": [\"23953286342447648\"]}, {\"input\": \"819875140559301752 946247219812473271\\r\\n\", \"output\": [\"12637207925317152\"]}, {\"input\": \"4 19\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5 45\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"9999999999999987 99999999999999711\\r\\n\", \"output\": [\"8999999999999973\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1827171 232817181719384635\\r\\n\", \"output\": [\"23281718171755747\"]}, {\"input\": \"999999999999999999 1000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"73 678\\r\\n\", \"output\": [\"61\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '45481484484 848469844684844\\r\\n', 'output': ['84842436320036']}, {'input': '595754249475458004 615044544745124547\\r\\n', 'output': ['1929029526966655']}, {'input': '458754 4588754\\r\\n', 'output': ['413001']}, {'input': '47 74\\r\\n', 'output': ['2']}, {'input': '84324827171274023 607953653548585226\\r\\n', 'output': ['52362882637731121']}]","human_sample_testcases_2":"[{'input': '2 3\\r\\n', 'output': ['2']}, {'input': '111 111\\r\\n', 'output': ['1']}, {'input': '335408916782916802 416495628489807285\\r\\n', 'output': ['8108671170689049']}, {'input': '11 111111111111111100\\r\\n', 'output': ['11111111111111109']}, {'input': '1 1000000\\r\\n', 'output': ['100008']}]","human_sample_testcases_3":"[{'input': '100000000000000000 1000000000000000000\\r\\n', 'output': ['90000000000000000']}, {'input': '9999999999999987 99999999999999711\\r\\n', 'output': ['8999999999999973']}, {'input': '7 10\\r\\n', 'output': ['3']}, {'input': '9754875457700 1000000000000000000\\r\\n', 'output': ['99999024512454230']}, {'input': '12 10000000000\\r\\n', 'output': ['999999998']}]","human_sample_testcases_4":"[{'input': '99 102\\r\\n', 'output': ['2']}, {'input': '7 8\\r\\n', 'output': ['2']}, {'input': '999999999 10000000000\\r\\n', 'output': ['900000001']}, {'input': '7 10\\r\\n', 'output': ['3']}, {'input': '77 77\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '1312148742261681 277460340506883334\\r\\n', 'output': ['27614819176462166']}, {'input': '10000 100000\\r\\n', 'output': ['9000']}, {'input': '8758754570000 999999999999999999\\r\\n', 'output': ['99999124124543000']}, {'input': '47 74\\r\\n', 'output': ['2']}, {'input': '10001 10000002\\r\\n', 'output': ['999001']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":75.0,"id":167,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"5 1\\n10 5\", \"4 5\\n3 3\", \"1 2\\n11 6\"]","input_specification":"The first line contains two positive integers not exceeding 100. They are the number of fingers on the Venusian girl's left and right hand correspondingly. The second line contains two integers not exceeding 100. They are the number of fingers on the Marsian boy's left and right hands correspondingly.","src_uid":"36b7478e162be6e985613b2dad0974dd","source_code":"#pragma GCC optimize (\"O3\")\n#include \n\nusing namespace std;\n\n#define ENGZ ios::sync_with_stdio(0);cin.tie(0);ios_base::sync_with_stdio(0);\n#define sfl(x) scanf(\"%I64d\" , &x)\n#define sfl2(x, y) scanf(\"%I64d%I64d\" , &x,&y)\n#define sfi(x) scanf(\"%d\" , &x)\n#define sfi2(x, y) scanf(\"%d%d\" , &x,&y)\n#define sfd(x) scanf(\"%lf\", &x)\n#define sfd2(x) scanf(\"%lf\", &x)\n#define sfc(x) scanf(\"%c\", &x)\n#define sfd2(x, y) scanf(\"%lf%lf\", &x, &y)\n#define mod 1000000007\n#define pi (2*acos(0))\ntypedef long long ll;\n#define endl '\\n'\n\nint main()\n{\n int a, b, x, y;\n cin >> a >> b >> x >> y;\n for (int i = 0; i < b - 1; i++)\n x--;\n if (x < 0)\n {\n for (int i = 0; i < a - 1; i++)\n y--;\n if (y < 0)\n cout << \"NO\";\n else\n {\n y -= 2;\n for (int i = 0; i <= a && y > 0; i++)\n y--;\n if (y <= 0)\n cout << \"YES\";\n else\n cout << \"NO\";\n }\n }\n else\n {\n x -= 2;\n for (int i = 0; i <= b && x > 0; i++)\n x--;\n if (x > 0)\n {\n for (int i = 0; i < a - 1; i++)\n y--;\n if (y < 0)\n cout << \"NO\";\n else\n {\n y -= 2;\n for (int i = 0; i <= a && y > 0; i++)\n y--;\n if (y <= 0)\n cout << \"YES\";\n else\n cout << \"NO\";\n }\n }\n else\n cout << \"YES\";\n }\n return 0;\n}\n","sample_outputs":"[\"YES\", \"YES\", \"NO\"]","lang_cluster":"C++","notes":"NoteThe boy and the girl don't really care who goes to the left.","output_specification":"Print YES or NO, that is, the answer to Petr Palych's question.","description":"Statistics claims that students sleep no more than three hours a day. But even in the world of their dreams, while they are snoring peacefully, the sense of impending doom is still upon them.A poor student is dreaming that he is sitting the mathematical analysis exam. And he is examined by the most formidable professor of all times, a three times Soviet Union Hero, a Noble Prize laureate in student expulsion, venerable Petr Palych.The poor student couldn't answer a single question. Thus, instead of a large spacious office he is going to apply for a job to thorium mines. But wait a minute! Petr Palych decided to give the student the last chance! Yes, that is possible only in dreams. So the professor began: \"Once a Venusian girl and a Marsian boy met on the Earth and decided to take a walk holding hands. But the problem is the girl has al fingers on her left hand and ar fingers on the right one. The boy correspondingly has bl and br fingers. They can only feel comfortable when holding hands, when no pair of the girl's fingers will touch each other. That is, they are comfortable when between any two girl's fingers there is a boy's finger. And in addition, no three fingers of the boy should touch each other. Determine if they can hold hands so that the both were comfortable.\"The boy any the girl don't care who goes to the left and who goes to the right. The difference is only that if the boy goes to the left of the girl, he will take her left hand with his right one, and if he goes to the right of the girl, then it is vice versa.","human_testcases":"[{\"input\": \"5 1\\r\\n10 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 5\\r\\n3 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n11 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 2\\r\\n1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3\\r\\n1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4\\r\\n1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 100\\r\\n50 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 3\\r\\n4 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 5\\r\\n1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 4\\r\\n1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 1\\r\\n4 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 100\\r\\n1 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 100\\r\\n5 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 100\\r\\n1 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"43 100\\r\\n65 24\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\n12 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 11\\r\\n13 11\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n12 12\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14 7\\r\\n2 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 14\\r\\n7 14\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 11\\r\\n2 10\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 12\\r\\n13 11\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15 1\\r\\n11 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 12\\r\\n10 6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15 7\\r\\n15 15\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 5\\r\\n14 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 4\\r\\n6 6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12 8\\r\\n4 12\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 14\\r\\n5 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19 17\\r\\n5 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9 21\\r\\n13 16\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11 2\\r\\n11 22\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15 3\\r\\n12 16\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13 2\\r\\n13 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"21 1\\r\\n5 19\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9 15\\r\\n16 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 18\\r\\n23 19\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13 17\\r\\n19 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 15\\r\\n13 9\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11 17\\r\\n6 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"18 3\\r\\n16 15\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 23\\r\\n12 17\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"25 8\\r\\n14 24\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"18 22\\r\\n22 19\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 25\\r\\n8 24\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 25\\r\\n18 15\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 22\\r\\n2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"25 9\\r\\n16 12\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19 4\\r\\n25 17\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"24 43\\r\\n96 39\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13 23\\r\\n19 63\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"93 12\\r\\n87 54\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"94 35\\r\\n53 79\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"65 8\\r\\n73 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"25 14\\r\\n19 91\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"58 86\\r\\n40 46\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"82 60\\r\\n100 38\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"36 62\\r\\n81 12\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30 38\\r\\n12 100\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 1\\r\\n10 5\\r\\n', 'output': ['YES']}, {'input': '15 7\\r\\n15 15\\r\\n', 'output': ['YES']}, {'input': '65 8\\r\\n73 25\\r\\n', 'output': ['NO']}, {'input': '13 23\\r\\n19 63\\r\\n', 'output': ['NO']}, {'input': '100 3\\r\\n4 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '6 11\\r\\n2 10\\r\\n', 'output': ['YES']}, {'input': '5 12\\r\\n13 11\\r\\n', 'output': ['YES']}, {'input': '4 4\\r\\n1 1\\r\\n', 'output': ['NO']}, {'input': '100 4\\r\\n1 1\\r\\n', 'output': ['NO']}, {'input': '100 5\\r\\n1 1\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '25 8\\r\\n14 24\\r\\n', 'output': ['YES']}, {'input': '25 9\\r\\n16 12\\r\\n', 'output': ['YES']}, {'input': '13 23\\r\\n19 63\\r\\n', 'output': ['NO']}, {'input': '2 6\\r\\n12 12\\r\\n', 'output': ['YES']}, {'input': '15 1\\r\\n11 9\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '19 4\\r\\n25 17\\r\\n', 'output': ['NO']}, {'input': '18 22\\r\\n22 19\\r\\n', 'output': ['YES']}, {'input': '5 12\\r\\n13 11\\r\\n', 'output': ['YES']}, {'input': '15 7\\r\\n15 15\\r\\n', 'output': ['YES']}, {'input': '15 3\\r\\n12 16\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '5 23\\r\\n12 17\\r\\n', 'output': ['NO']}, {'input': '100 3\\r\\n4 1\\r\\n', 'output': ['YES']}, {'input': '43 100\\r\\n65 24\\r\\n', 'output': ['NO']}, {'input': '1 100\\r\\n5 4\\r\\n', 'output': ['YES']}, {'input': '11 17\\r\\n6 4\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":86.67,"human_sample_line_coverage_2":60.0,"human_sample_line_coverage_3":73.33,"human_sample_line_coverage_4":60.0,"human_sample_line_coverage_5":63.33,"human_sample_branch_coverage_1":80.0,"human_sample_branch_coverage_2":50.0,"human_sample_branch_coverage_3":66.67,"human_sample_branch_coverage_4":53.33,"human_sample_branch_coverage_5":53.33,"id":168,"human_sample_pass_rate":100.0,"human_sample_line_coverage":68.666,"human_sample_branch_coverage":60.666} {"sample_inputs":"[\"1 1 0\", \"2 2 0\", \"1 1 1\"]","input_specification":"The first line of the input contains three space-separated integers n,\u2009m,\u2009g (0\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009105,\u2009n\u2009+\u2009m\u2009\u2265\u20091,\u20090\u2009\u2264\u2009g\u2009\u2264\u20091).","src_uid":"066dd9e6091238edf2912a6af4d29e7f","source_code":"#include\n#include\n#include\n#include\n#include\n#define p 1e6+7\n#define N 10010\n#define mc(a,b) memset(a,b,sizeof(a))\n#define close std::ios::sync_with_stdio\nusing namespace std;\nusing namespace std;\nconst double eps(1e-8);\ntypedef long long lint;\nconst lint mod = 1000000007LL;\nint n, m, g;\nlint fac[200010];\nvoid init()\n{\n fac[0] = fac[1] = 1;\n for(int i = 2; i <= 200000; i++)\n fac[i] = fac[i - 1] * i % mod;\n return;\n}\n \nlint quick_pow(lint base, lint pow)\n{\n lint ret = 1;\n while(pow)\n {\n if(pow & 1)\n ret = (ret * base) % mod;\n base = base * base % mod;\n pow >>= 1;\n }\n return ret;\n}\n \nlint C(int r, int k)\/\/C[r][k]\n{\n return fac[r]*quick_pow(fac[k]*fac[r - k] % mod, mod - 2LL) % mod;\n}\n \nint main()\n{\n scanf(\"%d %d %d\", &n, &m, &g);\n if(n == 0)\n {\n if(g == 0)\n {\n if(m == 1)\n printf(\"0\\n\");\n else\n printf(\"1\\n\");\n }\n else\n {\n if(m == 1)\n printf(\"1\\n\");\n else\n printf(\"0\\n\");\n }\n return 0;\n }\n if(m == 0)\n {\n if(g == 0)\n {\n if(n & 1)\n printf(\"1\\n\");\n else\n printf(\"0\\n\");\n }\n else\n {\n if(n & 1)\n printf(\"0\\n\");\n else\n printf(\"1\\n\");\n }\n return 0;\n }\n init();\n lint all = C(n + m, n);\n lint ans = 0;\n for(int t = 0; t <= n; t += 2)\n ans = (ans + C(n + m - 1 - t, m - 1)) % mod;\n if(m == 1 && (n & 1) == 0)\n ans = (ans - 1 + mod) % mod;\n if(m == 1 && (n & 1))\n ans = (ans + 1) % mod;\n if(g == 0)\n printf(\"%I64d\\n\", ans);\n else\n printf(\"%I64d\\n\", (all - ans + mod) % mod);\n return 0;\n}\n","sample_outputs":"[\"2\", \"4\", \"0\"]","lang_cluster":"C++","notes":"NoteIn the first sample the beautiful strings are: \"01\", \"10\".In the second sample the beautiful strings are: \"0011\", \"1001\", \"1010\", \"1100\".In the third sample there are no beautiful strings.","output_specification":"Print a single integer \u2014 the answer to the problem modulo 1000000007 (109\u2009+\u20097).","description":"Vasily the Bear loves beautiful strings. String s is beautiful if it meets the following criteria: String s only consists of characters 0 and 1, at that character 0 must occur in string s exactly n times, and character 1 must occur exactly m times. We can obtain character g from string s with some (possibly, zero) number of modifications. The character g equals either zero or one. A modification of string with length at least two is the following operation: we replace two last characters from the string by exactly one other character. This character equals one if it replaces two zeros, otherwise it equals zero. For example, one modification transforms string \"01010\" into string \"0100\", two modifications transform it to \"011\". It is forbidden to modify a string with length less than two.Help the Bear, count the number of beautiful strings. As the number of beautiful strings can be rather large, print the remainder after dividing the number by 1000000007 (109\u2009+\u20097). ","human_testcases":"[{\"input\": \"1 1 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 100000 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 100000 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100000 100000 0\\r\\n\", \"output\": [\"339533691\"]}, {\"input\": \"100000 1 0\\r\\n\", \"output\": [\"50000\"]}, {\"input\": \"50000 1 1\\r\\n\", \"output\": [\"25001\"]}, {\"input\": \"100000 100000 1\\r\\n\", \"output\": [\"539933642\"]}, {\"input\": \"0 1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 2 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 2500 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 2500 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 9997 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 9997 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 99999 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 99999 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 0 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 324 0\\r\\n\", \"output\": [\"324\"]}, {\"input\": \"1 324 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2500 0\\r\\n\", \"output\": [\"2500\"]}, {\"input\": \"1 2500 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 9997 0\\r\\n\", \"output\": [\"9997\"]}, {\"input\": \"1 9997 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 99999 0\\r\\n\", \"output\": [\"99999\"]}, {\"input\": \"1 99999 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 100000 0\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"1 100000 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 10000 1\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"32 3132 0\\r\\n\", \"output\": [\"256681375\"]}, {\"input\": \"32 3132 1\\r\\n\", \"output\": [\"182437326\"]}, {\"input\": \"32 3333 0\\r\\n\", \"output\": [\"747440836\"]}, {\"input\": \"32 3333 1\\r\\n\", \"output\": [\"54373799\"]}, {\"input\": \"33 3232 0\\r\\n\", \"output\": [\"47846603\"]}, {\"input\": \"33 3232 1\\r\\n\", \"output\": [\"547985141\"]}, {\"input\": \"33 3333 0\\r\\n\", \"output\": [\"37651367\"]}, {\"input\": \"33 3333 1\\r\\n\", \"output\": [\"747440836\"]}, {\"input\": \"321 312 1\\r\\n\", \"output\": [\"994988379\"]}, {\"input\": \"432 432 0\\r\\n\", \"output\": [\"350813304\"]}, {\"input\": \"432 432 1\\r\\n\", \"output\": [\"522392126\"]}, {\"input\": \"654 1 0\\r\\n\", \"output\": [\"327\"]}, {\"input\": \"2500 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2500 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2500 1 0\\r\\n\", \"output\": [\"1250\"]}, {\"input\": \"2500 1 1\\r\\n\", \"output\": [\"1251\"]}, {\"input\": \"2500 2500 0\\r\\n\", \"output\": [\"331895867\"]}, {\"input\": \"2500 2500 1\\r\\n\", \"output\": [\"916450637\"]}, {\"input\": \"2500 9997 0\\r\\n\", \"output\": [\"943644776\"]}, {\"input\": \"2500 9997 1\\r\\n\", \"output\": [\"208015031\"]}, {\"input\": \"2500 99999 0\\r\\n\", \"output\": [\"952185647\"]}, {\"input\": \"2500 99999 1\\r\\n\", \"output\": [\"103989186\"]}, {\"input\": \"2500 100000 0\\r\\n\", \"output\": [\"529882422\"]}, {\"input\": \"2500 100000 1\\r\\n\", \"output\": [\"577696782\"]}, {\"input\": \"9134 5673 0\\r\\n\", \"output\": [\"24899959\"]}, {\"input\": \"9997 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9997 0 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9997 1 0\\r\\n\", \"output\": [\"5000\"]}, {\"input\": \"9997 1 1\\r\\n\", \"output\": [\"4998\"]}, {\"input\": \"9997 2500 0\\r\\n\", \"output\": [\"221563457\"]}, {\"input\": \"9997 2500 1\\r\\n\", \"output\": [\"930096350\"]}, {\"input\": \"9997 9997 0\\r\\n\", \"output\": [\"844903460\"]}, {\"input\": \"9997 9997 1\\r\\n\", \"output\": [\"513521903\"]}, {\"input\": \"9997 99999 0\\r\\n\", \"output\": [\"287015367\"]}, {\"input\": \"9997 99999 1\\r\\n\", \"output\": [\"868424216\"]}, {\"input\": \"9997 100000 0\\r\\n\", \"output\": [\"699517122\"]}, {\"input\": \"9997 100000 1\\r\\n\", \"output\": [\"412501755\"]}, {\"input\": \"34560 99560 1\\r\\n\", \"output\": [\"904236161\"]}, {\"input\": \"67655 1 1\\r\\n\", \"output\": [\"33827\"]}, {\"input\": \"99999 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"99999 0 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99999 1 0\\r\\n\", \"output\": [\"50001\"]}, {\"input\": \"99999 1 1\\r\\n\", \"output\": [\"49999\"]}, {\"input\": \"99999 2500 0\\r\\n\", \"output\": [\"453841822\"]}, {\"input\": \"99999 2500 1\\r\\n\", \"output\": [\"602333011\"]}, {\"input\": \"99999 9997 0\\r\\n\", \"output\": [\"183955706\"]}, {\"input\": \"99999 9997 1\\r\\n\", \"output\": [\"971483877\"]}, {\"input\": \"99999 99999 0\\r\\n\", \"output\": [\"140133614\"]}, {\"input\": \"99999 99999 1\\r\\n\", \"output\": [\"550956678\"]}, {\"input\": \"99999 100000 0\\r\\n\", \"output\": [\"539933642\"]}, {\"input\": \"99999 100000 1\\r\\n\", \"output\": [\"399800028\"]}, {\"input\": \"100000 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000 1 1\\r\\n\", \"output\": [\"50001\"]}, {\"input\": \"100000 2500 0\\r\\n\", \"output\": [\"653737382\"]}, {\"input\": \"100000 2500 1\\r\\n\", \"output\": [\"453841822\"]}, {\"input\": \"100000 9997 0\\r\\n\", \"output\": [\"928063171\"]}, {\"input\": \"100000 9997 1\\r\\n\", \"output\": [\"183955706\"]}, {\"input\": \"100000 99999 0\\r\\n\", \"output\": [\"799600056\"]}, {\"input\": \"100000 99999 1\\r\\n\", \"output\": [\"140133614\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 0 1\\r\\n', 'output': ['1']}, {'input': '2500 0 0\\r\\n', 'output': ['0']}, {'input': '432 432 0\\r\\n', 'output': ['350813304']}, {'input': '9997 100000 1\\r\\n', 'output': ['412501755']}, {'input': '0 1 0\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '100000 100000 1\\r\\n', 'output': ['539933642']}, {'input': '0 100000 0\\r\\n', 'output': ['1']}, {'input': '100000 9997 0\\r\\n', 'output': ['928063171']}, {'input': '100000 1 0\\r\\n', 'output': ['50000']}, {'input': '9997 99999 0\\r\\n', 'output': ['287015367']}]","human_sample_testcases_3":"[{'input': '100000 99999 1\\r\\n', 'output': ['140133614']}, {'input': '9997 9997 0\\r\\n', 'output': ['844903460']}, {'input': '100000 1 1\\r\\n', 'output': ['50001']}, {'input': '100000 1 0\\r\\n', 'output': ['50000']}, {'input': '100000 99999 0\\r\\n', 'output': ['799600056']}]","human_sample_testcases_4":"[{'input': '0 99999 0\\r\\n', 'output': ['1']}, {'input': '100000 99999 1\\r\\n', 'output': ['140133614']}, {'input': '0 2 0\\r\\n', 'output': ['1']}, {'input': '2 10000 1\\r\\n', 'output': ['10000']}, {'input': '2500 99999 1\\r\\n', 'output': ['103989186']}]","human_sample_testcases_5":"[{'input': '0 99999 1\\r\\n', 'output': ['0']}, {'input': '2 10000 1\\r\\n', 'output': ['10000']}, {'input': '0 1 1\\r\\n', 'output': ['1']}, {'input': '9997 1 0\\r\\n', 'output': ['5000']}, {'input': '99999 1 0\\r\\n', 'output': ['50001']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":72.92,"human_sample_line_coverage_3":64.58,"human_sample_line_coverage_4":68.75,"human_sample_line_coverage_5":75.0,"human_sample_branch_coverage_1":64.71,"human_sample_branch_coverage_2":61.76,"human_sample_branch_coverage_3":52.94,"human_sample_branch_coverage_4":47.06,"human_sample_branch_coverage_5":64.71,"id":169,"human_sample_pass_rate":100.0,"human_sample_line_coverage":72.916,"human_sample_branch_coverage":58.236} {"sample_inputs":"[\"7 2 5\", \"10 3 10\"]","input_specification":"The first line contains three integers n, l, r (0\u2009\u2264\u2009n\u2009<\u2009250, 0\u2009\u2264\u2009r\u2009-\u2009l\u2009\u2264\u2009105, r\u2009\u2265\u20091, l\u2009\u2265\u20091) \u2013 initial element and the range l to r. It is guaranteed that r is not greater than the length of the final list.","src_uid":"3ac61b1f8deee7911b1055c243f5eb6a","source_code":"#include =\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#define ll long long\nusing namespace std;\nconst int inf = 0x3f3f3f3f;\nconst ll mod = 1000000007;\nconst double pi = acos(1.0*(-1));\ntypedef pair P;\nint num[300010];\nll n, l, r, s = 1, ans;\nvoid solve(ll a, ll b, ll l, ll r, ll d)\/\/\u4e8c\u5206\u7684\u601d\u60f3\n{\n\tif (a > b || l > r) return;\n\telse\n\t{\n\t\tll mid = (a + b) \/ 2;\n\t\tif (r < mid)solve(a, mid - 1, l, r, d \/ 2);\n\t\telse if (mid < l)solve(mid + 1, b, l, r, d \/ 2);\n\t\telse {\n\t\t\tans += d % 2;\n\t\t\tsolve(a, mid - 1, l, mid - 1, d \/ 2);\n\t\t\tsolve(mid + 1, b, mid + 1, r, d \/ 2);\n\t\t}\n\t}\n}\nint main()\n{\n\tcin >> n >> l >> r;\n\tlong long p = n;\n\twhile (p >= 2)\n\t{\n\t\tp \/= 2;\n\t\ts = s * 2 + 1;\n\t}\n\tsolve(1, s, l, r, n);\n\tcout << ans << endl;\n\treturn 0;\n}","sample_outputs":"[\"4\", \"5\"]","lang_cluster":"C++","notes":"NoteConsider first example:Elements on positions from 2-nd to 5-th in list is [1,\u20091,\u20091,\u20091]. The number of ones is 4.For the second example:Elements on positions from 3-rd to 10-th in list is [1,\u20091,\u20091,\u20090,\u20091,\u20090,\u20091,\u20090]. The number of ones is 5.","output_specification":"Output the total number of 1s in the range l to r in the final sequence.","description":"Jon fought bravely to rescue the wildlings who were attacked by the white-walkers at Hardhome. On his arrival, Sam tells him that he wants to go to Oldtown to train at the Citadel to become a maester, so he can return and take the deceased Aemon's place as maester of Castle Black. Jon agrees to Sam's proposal and Sam sets off his journey to the Citadel. However becoming a trainee at the Citadel is not a cakewalk and hence the maesters at the Citadel gave Sam a problem to test his eligibility. Initially Sam has a list with a single element n. Then he has to perform certain operations on this list. In each operation Sam must remove any element x, such that x\u2009>\u20091, from the list and insert at the same position , , sequentially. He must continue with these operations until all the elements in the list are either 0 or 1.Now the masters want the total number of 1s in the range l to r (1-indexed). Sam wants to become a maester but unfortunately he cannot solve this problem. Can you help Sam to pass the eligibility test?","human_testcases":"[{\"input\": \"7 2 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 3 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"56 18 40\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"203 40 124\\r\\n\", \"output\": [\"67\"]}, {\"input\": \"903316762502 354723010040 354723105411\\r\\n\", \"output\": [\"78355\"]}, {\"input\": \"33534354842198 32529564319236 32529564342569\\r\\n\", \"output\": [\"22239\"]}, {\"input\": \"62518534961045 50734311240112 50734311287877\\r\\n\", \"output\": [\"42439\"]}, {\"input\": \"95173251245550 106288351347530 106288351372022\\r\\n\", \"output\": [\"16565\"]}, {\"input\": \"542 321 956\\r\\n\", \"output\": [\"336\"]}, {\"input\": \"3621 237 2637\\r\\n\", \"output\": [\"2124\"]}, {\"input\": \"9056 336 896\\r\\n\", \"output\": [\"311\"]}, {\"input\": \"36007 368 24490\\r\\n\", \"output\": [\"13253\"]}, {\"input\": \"244269 149154 244246\\r\\n\", \"output\": [\"88609\"]}, {\"input\": \"880234 669493 757150\\r\\n\", \"output\": [\"73585\"]}, {\"input\": \"3740160 1031384 1104236\\r\\n\", \"output\": [\"64965\"]}, {\"input\": \"11586121 15337246 15397874\\r\\n\", \"output\": [\"41868\"]}, {\"input\": \"38658997 35923164 35985664\\r\\n\", \"output\": [\"36004\"]}, {\"input\": \"192308932 207804787 207866400\\r\\n\", \"output\": [\"44142\"]}, {\"input\": \"950099012 175922161 176000556\\r\\n\", \"output\": [\"69369\"]}, {\"input\": \"2787326787 3799676481 3799680514\\r\\n\", \"output\": [\"2618\"]}, {\"input\": \"14417262581 8527979363 8528075536\\r\\n\", \"output\": [\"80707\"]}, {\"input\": \"39889373539 7747197212 7747278363\\r\\n\", \"output\": [\"47105\"]}, {\"input\": \"251772781087 70597428577 70597479816\\r\\n\", \"output\": [\"46933\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"14 7 12\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1125899906842623 1 100001\\r\\n\", \"output\": [\"100001\"]}, {\"input\": \"1125899906842623 1125899906742623 1125899906842623\\r\\n\", \"output\": [\"100001\"]}, {\"input\": \"1000 1 1023\\r\\n\", \"output\": [\"1000\"]}, {\"input\": \"281474976710656 17179869184 17179869186\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 2 2\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7 2 5\\r\\n', 'output': ['4']}, {'input': '3621 237 2637\\r\\n', 'output': ['2124']}, {'input': '14 7 12\\r\\n', 'output': ['5']}, {'input': '281474976710656 17179869184 17179869186\\r\\n', 'output': ['1']}, {'input': '3 2 2\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '56 18 40\\r\\n', 'output': ['20']}, {'input': '1125899906842623 1125899906742623 1125899906842623\\r\\n', 'output': ['100001']}, {'input': '192308932 207804787 207866400\\r\\n', 'output': ['44142']}, {'input': '903316762502 354723010040 354723105411\\r\\n', 'output': ['78355']}, {'input': '3740160 1031384 1104236\\r\\n', 'output': ['64965']}]","human_sample_testcases_3":"[{'input': '3740160 1031384 1104236\\r\\n', 'output': ['64965']}, {'input': '281474976710656 17179869184 17179869186\\r\\n', 'output': ['1']}, {'input': '62518534961045 50734311240112 50734311287877\\r\\n', 'output': ['42439']}, {'input': '38658997 35923164 35985664\\r\\n', 'output': ['36004']}, {'input': '880234 669493 757150\\r\\n', 'output': ['73585']}]","human_sample_testcases_4":"[{'input': '1000 1 1023\\r\\n', 'output': ['1000']}, {'input': '542 321 956\\r\\n', 'output': ['336']}, {'input': '2787326787 3799676481 3799680514\\r\\n', 'output': ['2618']}, {'input': '14417262581 8527979363 8528075536\\r\\n', 'output': ['80707']}, {'input': '1 1 1\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '542 321 956\\r\\n', 'output': ['336']}, {'input': '244269 149154 244246\\r\\n', 'output': ['88609']}, {'input': '251772781087 70597428577 70597479816\\r\\n', 'output': ['46933']}, {'input': '11586121 15337246 15397874\\r\\n', 'output': ['41868']}, {'input': '880234 669493 757150\\r\\n', 'output': ['73585']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":170,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6\\nbaabbb\", \"10\\nooopppssss\", \"1\\nz\"]","input_specification":"The first line contains integer $$$n$$$ ($$$1 \\le n \\le 55$$$) \u2014 the length of the encrypted string. The second line of the input contains $$$t$$$ \u2014 the result of encryption of some string $$$s$$$. It contains only lowercase Latin letters. The length of $$$t$$$ is exactly $$$n$$$. It is guaranteed that the answer to the test exists.","src_uid":"08e8c0c37b223f6aae01d5609facdeaf","source_code":"#include\nusing namespace std;\n\nint i,l,n;\nchar s[60];\nint main()\n{\n\tcin>>l>>s;\n\tfor(;i\n#include \nusing namespace std;\n#define int long long\n\nint a , b , cnt = 1;\n\nvoid cul ( )\n{\n\tif ( a > b ) swap ( a , b );\n\twhile ( a != 1 ) {\n\t\tcnt *= a;\n\t\ta--;\n\t}\n}\n\nsigned main ( void )\n{\n\tcin >> a >> b;\n\tcul ( );\n\tcout << cnt << endl;\n\treturn 0;\n}","sample_outputs":"[\"6\"]","lang_cluster":"C++","notes":"NoteConsider the sample.4!\u2009=\u20091\u00b72\u00b73\u00b74\u2009=\u200924. 3!\u2009=\u20091\u00b72\u00b73\u2009=\u20096. The greatest common divisor of integers 24 and 6 is exactly 6.","output_specification":"Print a single integer denoting the greatest common divisor of integers A! and B!.","description":"Holidays have finished. Thanks to the help of the hacker Leha, Noora managed to enter the university of her dreams which is located in a town Pavlopolis. It's well known that universities provide students with dormitory for the period of university studies. Consequently Noora had to leave Vi\u010dkopolis and move to Pavlopolis. Thus Leha was left completely alone in a quiet town Vi\u010dkopolis. He almost even fell into a depression from boredom!Leha came up with a task for himself to relax a little. He chooses two integers A and B and then calculates the greatest common divisor of integers \"A factorial\" and \"B factorial\". Formally the hacker wants to find out GCD(A!,\u2009B!). It's well known that the factorial of an integer x is a product of all positive integers less than or equal to x. Thus x!\u2009=\u20091\u00b72\u00b73\u00b7...\u00b7(x\u2009-\u20091)\u00b7x. For example 4!\u2009=\u20091\u00b72\u00b73\u00b74\u2009=\u200924. Recall that GCD(x,\u2009y) is the largest positive integer q that divides (without a remainder) both x and y.Leha has learned how to solve this task very effective. You are able to cope with it not worse, aren't you?","human_testcases":"[{\"input\": \"4 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 399603090\\r\\n\", \"output\": [\"3628800\"]}, {\"input\": \"6 973151934\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"2 841668075\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 415216919\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"3 283733059\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"11 562314608\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"3 990639260\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"11 859155400\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"1 12\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 7\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 11\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"6 7\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"11 11\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"4 999832660\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"7 999228288\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"11 999257105\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"11 999286606\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"3 999279109\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"999632727 11\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"999625230 7\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"999617047 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"999646548 7\\r\\n\", \"output\": [\"5040\"]}, {\"input\": \"999639051 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"12 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"12 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1213 5\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"8 9\\r\\n\", \"output\": [\"40320\"]}, {\"input\": \"12 9\\r\\n\", \"output\": [\"362880\"]}, {\"input\": \"12 1000000000\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12 13\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"2 29845\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 21\\r\\n\", \"output\": [\"3628800\"]}, {\"input\": \"12 20\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"15 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"1000000000 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"11 30\\r\\n\", \"output\": [\"39916800\"]}, {\"input\": \"17 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"4 19\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"12 15\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"20 6\\r\\n\", \"output\": [\"720\"]}, {\"input\": \"10 20\\r\\n\", \"output\": [\"3628800\"]}, {\"input\": \"10 10\\r\\n\", \"output\": [\"3628800\"]}, {\"input\": \"22 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"20 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"12 23\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"12 22\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"18 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"14 10\\r\\n\", \"output\": [\"3628800\"]}, {\"input\": \"14 12\\r\\n\", \"output\": [\"479001600\"]}, {\"input\": \"8 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"120\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 20\\r\\n', 'output': ['3628800']}, {'input': '1 12\\r\\n', 'output': ['1']}, {'input': '2 29845\\r\\n', 'output': ['2']}, {'input': '11 999257105\\r\\n', 'output': ['39916800']}, {'input': '7 415216919\\r\\n', 'output': ['5040']}]","human_sample_testcases_2":"[{'input': '12 15\\r\\n', 'output': ['479001600']}, {'input': '12 20\\r\\n', 'output': ['479001600']}, {'input': '1213 5\\r\\n', 'output': ['120']}, {'input': '4 999832660\\r\\n', 'output': ['24']}, {'input': '6 7\\r\\n', 'output': ['720']}]","human_sample_testcases_3":"[{'input': '11 859155400\\r\\n', 'output': ['39916800']}, {'input': '12 20\\r\\n', 'output': ['479001600']}, {'input': '12 1\\r\\n', 'output': ['1']}, {'input': '10 20\\r\\n', 'output': ['3628800']}, {'input': '3 990639260\\r\\n', 'output': ['6']}]","human_sample_testcases_4":"[{'input': '4 19\\r\\n', 'output': ['24']}, {'input': '11 562314608\\r\\n', 'output': ['39916800']}, {'input': '5 5\\r\\n', 'output': ['120']}, {'input': '3 283733059\\r\\n', 'output': ['6']}, {'input': '999617047 3\\r\\n', 'output': ['6']}]","human_sample_testcases_5":"[{'input': '18 3\\r\\n', 'output': ['6']}, {'input': '7 999228288\\r\\n', 'output': ['5040']}, {'input': '5 5\\r\\n', 'output': ['120']}, {'input': '4 19\\r\\n', 'output': ['24']}, {'input': '2 841668075\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":172,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"2 2 2\\n1 1 1\\n1 2 3 4 5 6\", \"0 0 10\\n3 2 3\\n1 2 3 4 5 6\"]","input_specification":"The fist input line contains three space-separated integers x, y and z (|x|,\u2009|y|,\u2009|z|\u2009\u2264\u2009106) \u2014 the coordinates of Vasya's position in space. The second line contains three space-separated integers x1, y1, z1 (1\u2009\u2264\u2009x1,\u2009y1,\u2009z1\u2009\u2264\u2009106) \u2014 the coordinates of the box's vertex that is opposite to the vertex at point (0,\u20090,\u20090). The third line contains six space-separated integers a1,\u2009a2,\u2009...,\u2009a6 (1\u2009\u2264\u2009ai\u2009\u2264\u2009106) \u2014 the numbers that are written on the box faces. It is guaranteed that point (x,\u2009y,\u2009z) is located strictly outside the box.","src_uid":"c7889a8f64c57cf7be4df870f68f749e","source_code":"#include\n#include\n#define ll long long\n#define fr first\n#define sc second\n#define mod 1000000007\n#define pii pair\n#define pdd pair\n#define mp make_pair\nusing namespace std;\n\nstruct pt{\n double x,y,z;\n void read(){\n cin>>x>>y>>z;\n }\n double dis(pt d){\n return (x - d.x)*(x - d.x) + (y - d.y)*(y - d.y) + (z - d.z)*(z - d.z);\n }\n};\nint a[6];\npt eyee;\npt s;\npt c[6];\n\n\nint main(){\n\n eyee.read();\n s.read();\n\n for(int i=0 ; i<6 ; i++)cin>>a[i];\n\n int res =0 ;\n\n if(eyee.y < 0)res += a[0];\n if(eyee.y > s.y)res += a[1];\n if(eyee.z < 0)res += a[2];\n if(eyee.z > s.z)res += a[3];\n if(eyee.x < 0)res += a[4];\n if(eyee.x > s.x)res += a[5];\n\n\n cout<\nusing namespace std;\nchar c[10][10];\nint main() {\n\tfor(int i=0; i<4; i++)\n\t\tfor(int j=0; j<4; j++)\n\t\t\tcin>>c[i][j];\n\tbool flag=0;\n\tfor(int i=0; i<4; i++) {\n\t\tfor(int j=0; j<4; j++)\n\t\t\tif(c[i][j]=='.') {\n\t\t\t\tif(i>0 && i<3 && c[i-1][j]=='x' && c[i+1][j]=='x') flag=1;\n\t\t\t\telse if(j>0 && j<3 && c[i][j-1]=='x' && c[i][j+1]=='x') flag=1;\n\t\t\t\telse if(j>0 && i>0 && j<3 && i<3 && c[i-1][j-1]=='x' && c[i+1][j+1]=='x') flag=1;\n\t\t\t\telse if(j>0 && i>0 && j<3 && i<3 && c[i-1][j+1]=='x' && c[i+1][j-1]=='x') flag=1;\n\t\t\t\telse if(i>1 && c[i-1][j]=='x' && c[i-2][j]=='x') flag=1;\n\t\t\t\telse if(j>1 && c[i][j-1]=='x' && c[i][j-2]=='x') flag=1;\n\t\t\t\telse if(i<2 && c[i+1][j]=='x' && c[i+2][j]=='x') flag=1;\n\t\t\t\telse if(j<2 && c[i][j+1]=='x' && c[i][j+2]=='x') flag=1;\n\t\t\t\telse if(i>1 && j>1 && c[i-1][j-1]=='x' && c[i-2][j-2]=='x') flag=1;\n\t\t\t\telse if(i<2 && j<2 && c[i+1][j+1]=='x' && c[i+2][j+2]=='x') flag=1;\n\t\t\t\telse if(i>1 && j<2 && c[i-1][j+1]=='x' && c[i-2][j+2]=='x') flag=1;\n\t\t\t\telse if(i<2 && j>1 && c[i+1][j-1]=='x' && c[i+2][j-2]=='x') flag=1;\n\t\t\t\tif(flag) break;\n\t\t\t}\n\t\tif(flag) break;\n\t}\n\tif(flag) printf(\"YES\");\n\telse printf(\"NO\");\n\treturn 0;\n}","sample_outputs":"[\"YES\", \"NO\", \"YES\", \"NO\"]","lang_cluster":"C++","notes":"NoteIn the first example Ilya had two winning moves: to the empty cell in the left column and to the leftmost empty cell in the first row.In the second example it wasn't possible to win by making single turn.In the third example Ilya could have won by placing X in the last row between two existing Xs.In the fourth example it wasn't possible to win by making single turn.","output_specification":"Print single line: \"YES\" in case Ilya could have won by making single turn, and \"NO\" otherwise.","description":"Ilya is an experienced player in tic-tac-toe on the 4\u2009\u00d7\u20094 field. He always starts and plays with Xs. He played a lot of games today with his friend Arseny. The friends became tired and didn't finish the last game. It was Ilya's turn in the game when they left it. Determine whether Ilya could have won the game by making single turn or not. The rules of tic-tac-toe on the 4\u2009\u00d7\u20094 field are as follows. Before the first turn all the field cells are empty. The two players take turns placing their signs into empty cells (the first player places Xs, the second player places Os). The player who places Xs goes first, the another one goes second. The winner is the player who first gets three of his signs in a row next to each other (horizontal, vertical or diagonal).","human_testcases":"[{\"input\": \"xx..\\r\\n.oo.\\r\\nx...\\r\\noox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x.ox\\r\\nox..\\r\\nx.o.\\r\\noo.x\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"x..x\\r\\n..oo\\r\\no...\\r\\nx.xo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o.x.\\r\\no...\\r\\n.x..\\r\\nooxx\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".xox\\r\\no.x.\\r\\nx.o.\\r\\n..o.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o.oo\\r\\n.x.o\\r\\nx.x.\\r\\n.x..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".xx.\\r\\n.xoo\\r\\n.oox\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xxox\\r\\no.x.\\r\\nx.oo\\r\\nxo.o\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".xox\\r\\n.x..\\r\\nxoo.\\r\\noox.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".oxx\\r\\nx...\\r\\n.o..\\r\\no...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"...x\\r\\n.x.o\\r\\n.o..\\r\\n.x.o\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"oo.x\\r\\nxo.o\\r\\no.xx\\r\\n.oxx\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".x.o\\r\\n..o.\\r\\n..ox\\r\\nxox.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"....\\r\\n.x..\\r\\nx...\\r\\n..oo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n....\\r\\n.x.o\\r\\n..xo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xo.x\\r\\n...o\\r\\n.oox\\r\\nx...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"o..o\\r\\nx..x\\r\\n.o.x\\r\\nxo..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ox.o\\r\\nx..x\\r\\nx..o\\r\\noo.x\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".xox\\r\\n.x.o\\r\\nooxo\\r\\n..x.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x..o\\r\\no..o\\r\\n..x.\\r\\nx.xo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xxoo\\r\\no.oo\\r\\n...x\\r\\nx..x\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xoox\\r\\n.xx.\\r\\no..o\\r\\n..xo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..o.\\r\\nxxox\\r\\n....\\r\\n.oxo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xoox\\r\\nxxox\\r\\noo..\\r\\n.ox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..ox\\r\\n.o..\\r\\nx..o\\r\\n.oxx\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".oo.\\r\\n.x..\\r\\nx...\\r\\nox..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o.xx\\r\\nxo.o\\r\\n...o\\r\\n..x.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x...\\r\\n.ox.\\r\\n.oo.\\r\\n.xox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xoxx\\r\\n..x.\\r\\no.oo\\r\\nx.o.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".x.x\\r\\n.o.o\\r\\no.xx\\r\\nx.oo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...o\\r\\nxo.x\\r\\n.x..\\r\\nxoo.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o...\\r\\n...o\\r\\noxx.\\r\\n.xxo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xxox\\r\\no..o\\r\\nx..o\\r\\noxox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"x...\\r\\no.ox\\r\\nxo..\\r\\n....\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"x.x.\\r\\nox.o\\r\\n.o.o\\r\\nxox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".oxx\\r\\n..xo\\r\\n.oox\\r\\n....\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xxo.\\r\\n...x\\r\\nooxx\\r\\n.o.o\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xoxo\\r\\no..x\\r\\n.xo.\\r\\nox..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".o..\\r\\nox..\\r\\n.o.x\\r\\n.x..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".oxo\\r\\nx...\\r\\n.o..\\r\\n.xox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".oxx\\r\\n..o.\\r\\n.o.x\\r\\n.ox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".xxo\\r\\n...o\\r\\n..ox\\r\\nox..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x...\\r\\nxo..\\r\\noxo.\\r\\n..ox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xoxo\\r\\nx.ox\\r\\n....\\r\\noxo.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x..o\\r\\nxo.x\\r\\no.xo\\r\\nxoox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".x..\\r\\no..x\\r\\n.oo.\\r\\nxox.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xxox\\r\\no.x.\\r\\nxo.o\\r\\nxo.o\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".xo.\\r\\nx.oo\\r\\n...x\\r\\n.o.x\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ox.o\\r\\n...x\\r\\n..oo\\r\\nxxox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"oox.\\r\\nxoo.\\r\\no.x.\\r\\nx..x\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"oxox\\r\\nx.oo\\r\\nooxx\\r\\nxxo.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"....\\r\\nxo.x\\r\\n..x.\\r\\noo..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".ox.\\r\\nx..o\\r\\nxo.x\\r\\noxo.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".xox\\r\\nxo..\\r\\n..oo\\r\\n.x..\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xxo.\\r\\n.oo.\\r\\n..x.\\r\\n..xo\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ox..\\r\\n..oo\\r\\n..x.\\r\\nxxo.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"xxo.\\r\\nx..x\\r\\noo.o\\r\\noxox\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xx..\\r\\noxxo\\r\\nxo.o\\r\\noox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xox.\\r\\noox.\\r\\n....\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x..o\\r\\no..o\\r\\no..x\\r\\nxxox\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"oxo.\\r\\nxx.x\\r\\nooxx\\r\\n.o.o\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".o.x\\r\\no..o\\r\\nx..x\\r\\n..xo\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"x.x.\\r\\n...o\\r\\n.o..\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xo..\\r\\n....\\r\\nx...\\r\\n..o.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xo..\\r\\n....\\r\\n..xo\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ox.x\\r\\n...o\\r\\n....\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".x..\\r\\no.o.\\r\\n.x..\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".x..\\r\\no...\\r\\n...x\\r\\n.o..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..xo\\r\\n....\\r\\nx.o.\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o.x.\\r\\n....\\r\\n.ox.\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...x\\r\\n....\\r\\n.x.o\\r\\n..o.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o..x\\r\\n....\\r\\n...x\\r\\n..o.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o...\\r\\nx.x.\\r\\no...\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\nxo..\\r\\n..o.\\r\\nx...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".oo.\\r\\nx...\\r\\n....\\r\\n..x.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n.x.x\\r\\no.o.\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".o..\\r\\n.x..\\r\\n..o.\\r\\n.x..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..o.\\r\\n.x..\\r\\n....\\r\\no..x\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n.oxo\\r\\n....\\r\\nx...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..o.\\r\\n..x.\\r\\n....\\r\\n.ox.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".o..\\r\\no..x\\r\\n....\\r\\n.x..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n..ox\\r\\n....\\r\\n.o.x\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"o...\\r\\n.o..\\r\\nx.x.\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n..oo\\r\\n.x.x\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".o..\\r\\n....\\r\\no...\\r\\nx.x.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n.o..\\r\\n....\\r\\nox.x\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"oxo.\\r\\nxxox\\r\\noo.o\\r\\nxoxx\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"..xx\\r\\noo..\\r\\n....\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".xx.\\r\\n...x\\r\\noo.o\\r\\no..x\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"x...\\r\\n.x..\\r\\n....\\r\\noo..\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".oox\\r\\n..x.\\r\\n....\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"...x\\r\\no..x\\r\\n.o..\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"oxox\\r\\n..ox\\r\\nxoxo\\r\\nxoxo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n.ox.\\r\\n.o..\\r\\nx...\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"....\\r\\n...x\\r\\n...x\\r\\noo..\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '....\\r\\nxo.x\\r\\n..x.\\r\\noo..\\r\\n', 'output': ['NO']}, {'input': '.xxo\\r\\n...o\\r\\n..ox\\r\\nox..\\r\\n', 'output': ['YES']}, {'input': '.oo.\\r\\nx...\\r\\n....\\r\\n..x.\\r\\n', 'output': ['YES']}, {'input': 'oo.x\\r\\nxo.o\\r\\no.xx\\r\\n.oxx\\r\\n', 'output': ['YES']}, {'input': 'x..o\\r\\no..o\\r\\no..x\\r\\nxxox\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': 'x..o\\r\\nxo.x\\r\\no.xo\\r\\nxoox\\r\\n', 'output': ['NO']}, {'input': '....\\r\\nxo..\\r\\n..o.\\r\\nx...\\r\\n', 'output': ['YES']}, {'input': '..o.\\r\\n.x..\\r\\n....\\r\\no..x\\r\\n', 'output': ['YES']}, {'input': '.oox\\r\\n..x.\\r\\n....\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '....\\r\\nxo.x\\r\\n..x.\\r\\noo..\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '.oo.\\r\\n.x..\\r\\nx...\\r\\nox..\\r\\n', 'output': ['YES']}, {'input': '..xo\\r\\n....\\r\\nx.o.\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '....\\r\\n.ox.\\r\\n.o..\\r\\nx...\\r\\n', 'output': ['NO']}, {'input': '.oox\\r\\n..x.\\r\\n....\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '....\\r\\n.x.x\\r\\no.o.\\r\\n....\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': 'o.xx\\r\\nxo.o\\r\\n...o\\r\\n..x.\\r\\n', 'output': ['YES']}, {'input': '...x\\r\\no..x\\r\\n.o..\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '..ox\\r\\n.o..\\r\\nx..o\\r\\n.oxx\\r\\n', 'output': ['NO']}, {'input': '.x.x\\r\\n.o.o\\r\\no.xx\\r\\nx.oo\\r\\n', 'output': ['YES']}, {'input': '...x\\r\\n.x.o\\r\\n.o..\\r\\n.x.o\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': 'xxo.\\r\\nx..x\\r\\noo.o\\r\\noxox\\r\\n', 'output': ['YES']}, {'input': '.o..\\r\\n.x..\\r\\n..o.\\r\\n.x..\\r\\n', 'output': ['YES']}, {'input': 'ox..\\r\\n..oo\\r\\n..x.\\r\\nxxo.\\r\\n', 'output': ['NO']}, {'input': 'x...\\r\\n.ox.\\r\\n.oo.\\r\\n.xox\\r\\n', 'output': ['NO']}, {'input': '.oxx\\r\\n..o.\\r\\n.o.x\\r\\n.ox.\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":86.61,"human_sample_branch_coverage_2":90.18,"human_sample_branch_coverage_3":90.18,"human_sample_branch_coverage_4":91.96,"human_sample_branch_coverage_5":87.5,"id":174,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":89.286} {"sample_inputs":"[\"3 3 3\\n1 1 1\\n2 2 3\\n3 3 2\", \"4 10 2\\n2 3 8\\n3 4 7\"]","input_specification":"The first line contains three integers $$$n$$$, $$$h$$$, and $$$m$$$ ($$$1 \\leq n,h,m \\leq 50$$$)\u00a0\u2014 the number of spots, the maximum height, and the number of restrictions. Each of the next $$$m$$$ lines contains three integers $$$l_i$$$, $$$r_i$$$, and $$$x_i$$$ ($$$1 \\leq l_i \\leq r_i \\leq n$$$, $$$0 \\leq x_i \\leq h$$$)\u00a0\u2014 left and right limits (inclusive) of the $$$i$$$-th restriction and the maximum possible height in that range.","src_uid":"f22b6dab443f63fb8d2d288b702f20ad","source_code":"#pragma GCC diagnostic error \"-std=c++11\"\n#pragma GCC target(\"avx\")\n#pragma GCC optimize(3)\n#pragma GCC optimize(\"Ofast\")\n#pragma GCC optimize(\"inline\")\n#pragma GCC optimize(\"-fgcse\")\n#pragma GCC optimize(\"-fgcse-lm\")\n#pragma GCC optimize(\"-fipa-sra\")\n#pragma GCC optimize(\"-ftree-pre\")\n#pragma GCC optimize(\"-ftree-vrp\")\n#pragma GCC optimize(\"-fpeephole2\")\n#pragma GCC optimize(\"-ffast-math\")\n#pragma GCC optimize(\"-fsched-spec\")\n#pragma GCC optimize(\"unroll-loops\")\n#pragma GCC optimize(\"-falign-jumps\")\n#pragma GCC optimize(\"-falign-loops\")\n#pragma GCC optimize(\"-falign-labels\")\n#pragma GCC optimize(\"-fdevirtualize\")\n#pragma GCC optimize(\"-fcaller-saves\")\n#pragma GCC optimize(\"-fcrossjumping\")\n#pragma GCC optimize(\"-fthread-jumps\")\n#pragma GCC optimize(\"-funroll-loops\")\n#pragma GCC optimize(\"-fwhole-program\")\n#pragma GCC optimize(\"-freorder-blocks\")\n#pragma GCC optimize(\"-fschedule-insns\")\n#pragma GCC optimize(\"inline-functions\")\n#pragma GCC optimize(\"-ftree-tail-merge\")\n#pragma GCC optimize(\"-fschedule-insns2\")\n#pragma GCC optimize(\"-fstrict-aliasing\")\n#pragma GCC optimize(\"-fstrict-overflow\")\n#pragma GCC optimize(\"-falign-functions\")\n#pragma GCC optimize(\"-fcse-skip-blocks\")\n#pragma GCC optimize(\"-fcse-follow-jumps\")\n#pragma GCC optimize(\"-fsched-interblock\")\n#pragma GCC optimize(\"-fpartial-inlining\")\n#pragma GCC optimize(\"no-stack-protector\")\n#pragma GCC optimize(\"-freorder-functions\")\n#pragma GCC optimize(\"-findirect-inlining\")\n#pragma GCC optimize(\"-fhoist-adjacent-loads\")\n#pragma GCC optimize(\"-frerun-cse-after-loop\")\n#pragma GCC optimize(\"inline-small-functions\")\n#pragma GCC optimize(\"-finline-small-functions\")\n#pragma GCC optimize(\"-ftree-switch-conversion\")\n#pragma GCC optimize(\"-foptimize-sibling-calls\")\n#pragma GCC optimize(\"-fexpensive-optimizations\")\n#pragma GCC optimize(\"-funsafe-loop-optimizations\")\n#pragma GCC optimize(\"inline-functions-called-once\")\n#pragma GCC optimize(\"-fdelete-null-pointer-checks\")\n\n\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\n#include\nusing namespace std;\nint main()\n{\n\tios::sync_with_stdio(0);\n\tint ans=0,n,h,m,a[100];\n\tcin>>n>>h>>m;\n\tfor(int i=0;i>li>>ri>>xi;\n\t\tli--;\n\t\tri--;\n\t\tfor(int i=li;i<=ri;i++)\n\t\t{\n\t\t\tif(a[i]>xi)\n\t\t\t{\n\t\t\t\ta[i]=xi;\n\t\t\t}\n\t\t}\n\t}\n\tfor(int i=0;i\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nusing namespace std;\nint a[25];\nint tu[8];\n\nint b[6][8] = { { 22, 21, 18, 17, 5, 6, 14, 13 },\n{ 3, 4, 17, 19, 10, 9, 16, 14 },\n{ 7, 8, 19, 20, 23, 24, 15, 16 },\n{ 1, 3, 5, 7, 9, 11, 24, 22 },\n{ 4, 2, 21, 23, 12,10, 8, 6 },\n{ 2, 1, 13, 15, 11, 12, 20, 18 } };\n\nbool res (int tmp[]){\n\n\tfor (int i = 2; i <=24; ++i){\n\t\tif ((i - 1) % 4 == 0)\n\t\t\tcontinue;\n\t\tif (tmp[i] != tmp[i - 1])\n\t\t\treturn false;\n\t}\n\n\treturn true;\n}\n\nvoid rot(int tmp[],int f ,bool d){\n\t\n\n\tif (d){\n\t\tint j = 0;\n\t\tfor (int i = 2; i < 8; ++i){\n\t\t\ttu[j] = tmp[i];\n\t\t\t++j;\n\t\t}\n\t\ttu[6] = tmp[0];\n\t\ttu[7] = tmp[1];\n\t}\n\telse{\n\t\tint j = 0;\n\t\tfor (int i = 2; i < 8; ++i){\n\t\t\ttu[i] = tmp[j];\n\t\t\t++j;\n\t\t}\n\t\ttu[0] = tmp[7];\n\t\ttu[1] = tmp[6];\n\n\t}\n\n}\n\nbool can(int f){\n\n\tint tmp[8];\n\tfor (int i= 0; i < 8; ++i){\n\t\ttmp[i] = b[f][i];\n\t}\n\n\t\n\n\tint tmp_2[25];\n\n\n\tfor (int i = 1; i <= 24; ++i){\n\t\ttmp_2[i] = a[i];\n\t}\n\n\n\trot(tmp, f, 0);\n\n\tfor (int i = 0; i < 8; ++i){\n\t\ttmp_2[b[f][i]] = a[tu[i]];\n\t}\n\n\n\tif (res(tmp_2))\n\t\treturn true;\n\n\trot(tmp,f,1);\n\t\n\tfor (int i = 0; i < 8; ++i){\n\t\ttmp_2[b[f][i]] = a[tu[i]];\n\t}\n\n\n\tif (res(tmp_2))\n\t\treturn true;\n\n\n\treturn 0;\n\n}\n\n\nint main() {\n\n\/\/\tfreopen(\"Text.txt\", \"r\", stdin);\n\n\tfor (int i = 1; i <= 24; ++i){\n\t\tcin >> a[i];\n\t}\n\n\tfor (int i = 0; i < 6; ++i){\n\t\tif (can(i)){\n\t\t\tcout << \"YES\";\n\t\t\treturn 0;\n\t\t}\n\t}\n\n\tcout << \"NO\";\n\n\treturn 0;\n}","sample_outputs":"[\"NO\", \"YES\"]","lang_cluster":"C++","notes":"NoteIn first test case cube looks like this: In second test case cube looks like this: It's possible to solve cube by rotating face with squares with numbers 13, 14, 15, 16.","output_specification":"Print \u00abYES\u00bb (without quotes) if it's possible to solve cube using one rotation and \u00abNO\u00bb (without quotes) otherwise.","description":"During the breaks between competitions, top-model Izabella tries to develop herself and not to be bored. For example, now she tries to solve Rubik's cube 2x2x2.It's too hard to learn to solve Rubik's cube instantly, so she learns to understand if it's possible to solve the cube in some state using 90-degrees rotation of one face of the cube in any direction.To check her answers she wants to use a program which will for some state of cube tell if it's possible to solve it using one rotation, described above.Cube is called solved if for each face of cube all squares on it has the same color.https:\/\/en.wikipedia.org\/wiki\/Rubik's_Cube","human_testcases":"[{\"input\": \"2 5 4 6 1 3 6 2 5 5 1 2 3 5 3 1 1 2 4 6 6 4 3 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 6 3 3 5 5 2 6 1 1 6 4 4 4 2 4 6 5 3 1 2 5 3 1\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 4 2 3 5 5 6 6 4 5 4 6 5 1 1 1 6 2 1 3 3 2 4 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 5 2 5 3 3 2 6 6 4 2 4 6 1 4 3 1 6 2 1 3 4 5 1\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"6 6 1 2 6 1 1 3 5 4 3 4 3 5 5 2 4 4 6 2 1 5 3 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"2 2 1 1 5 5 5 5 3 3 4 4 1 4 1 4 2 3 2 3 6 6 6 6\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 1 1 1 5 5 3 3 4 4 4 4 3 3 2 2 6 6 5 5 2 2 6 6\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 1 1 1 3 3 3 3 5 5 5 5 2 2 2 2 4 4 4 4 6 6 6 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 4 5 4 4 6 4 6 6 3 6 3 1 1 1 1 2 2 2 2 5 3 5 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"3 3 5 5 2 2 2 2 6 6 4 4 6 3 6 3 4 5 4 5 1 1 1 1\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"6 6 6 6 2 2 5 5 1 1 1 1 4 4 2 2 5 5 3 3 3 3 4 4\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"4 6 4 6 6 1 6 1 1 3 1 3 2 2 2 2 5 5 5 5 4 3 4 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"6 6 2 2 3 3 3 3 4 4 5 5 4 6 4 6 5 2 5 2 1 1 1 1\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"3 3 3 3 4 4 5 5 1 1 1 1 2 2 4 4 5 5 6 6 6 6 2 2\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 5 2 5 4 2 4 2 1 4 1 4 6 6 6 6 3 3 3 3 1 5 1 5\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"4 4 3 3 5 5 5 5 1 1 6 6 3 6 3 6 4 1 4 1 2 2 2 2\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"5 5 5 5 6 6 2 2 3 3 3 3 2 2 1 1 4 4 6 6 1 1 4 4\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 4 3 4 2 6 5 2 1 5 1 6 3 4 3 6 5 5 1 3 2 6 4 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"4 4 2 5 3 2 4 2 5 3 6 4 6 5 1 3 1 5 6 3 1 1 6 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"4 5 3 4 5 5 6 3 2 5 1 6 2 1 6 3 1 4 2 3 2 6 1 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 3 2 3 6 4 4 4 1 2 1 3 2 5 6 6 1 2 6 5 4 5 1 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 6 1 1 4 5 6 5 4 6 2 1 4 2 6 5 3 2 3 2 3 1 3 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"4 4 4 5 2 3 4 1 3 3 1 5 6 5 6 6 1 3 6 2 5 2 1 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 2 5 6 1 4 3 4 6 5 4 3 2 3 2 2 1 4 1 1 6 5 6 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 4 6 2 5 6 4 1 6 3 3 1 3 2 4 1 1 6 2 3 5 2 4 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"6 6 3 1 5 6 5 3 2 5 3 1 2 4 1 6 4 5 2 2 4 1 3 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"6 5 4 1 6 5 2 3 3 5 3 6 4 2 6 5 4 2 1 1 4 1 3 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1 3 5 6 4 4 4 3 5 2 2 2 3 1 5 6 3 4 6 5 1 2 1 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 6 5 4 4 6 1 4 3 2 5 2 1 2 6 2 5 4 1 3 1 6 5 3\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 2 6 1 5 3 5 3 1 1 3 6 6 2 4 2 5 4 4 2 1 3 4 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"2 5 6 2 3 6 5 6 2 3 1 3 6 4 5 4 1 1 1 5 3 4 4 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"4 5 4 4 3 3 1 2 3 1 1 5 2 2 5 6 6 4 3 2 6 5 1 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 2 5 2 3 5 3 5 4 3 4 3 6 6 6 6 1 1 1 1 4 2 4 2\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 4 2 4 4 5 4 5 5 1 5 1 3 3 3 3 6 6 6 6 2 1 2 1\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"3 5 3 5 5 1 5 1 1 4 1 4 6 6 6 6 2 2 2 2 3 4 3 4\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 1 2 1 4 2 4 2 6 4 6 4 5 5 5 5 3 3 3 3 6 1 6 1\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"4 4 2 2 1 1 1 1 5 5 6 6 2 6 2 6 4 5 4 5 3 3 3 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 1 2 2 4 4 4 4 5 5 6 6 5 1 5 1 6 2 6 2 3 3 3 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 2 6 6 4 4 4 4 1 1 5 5 1 2 1 2 5 6 5 6 3 3 3 3\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 2 3 3 6 6 6 6 4 4 1 1 3 1 3 1 2 4 2 4 5 5 5 5\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"6 6 6 6 4 4 3 3 5 5 5 5 3 3 1 1 2 2 4 4 1 1 2 2\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"2 2 2 2 4 4 5 5 3 3 3 3 6 6 4 4 5 5 1 1 1 1 6 6\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 1 1 1 5 5 6 6 3 3 3 3 4 4 5 5 6 6 2 2 2 2 4 4\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"4 4 4 4 2 2 3 3 1 1 1 1 3 3 6 6 5 5 2 2 6 6 5 5\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1 1 1 1 2 2 3 3 6 6 6 6 5 5 4 4 3 3 2 2 4 4 5 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1 1 2 2 3 3 1 1 2 2 3 3 4 4 4 4 5 5 5 5 6 6 6 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5 5 5 5 1 1 2 2 6 6 6 6 4 4 3 3 3 3 4 4 2 2 1 1\\r\\n\", \"output\": [\"NO\", \"no\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 6 1 1 4 5 6 5 4 6 2 1 4 2 6 5 3 2 3 2 3 1 3 4\\r\\n', 'output': ['NO', 'no']}, {'input': '4 4 4 5 2 3 4 1 3 3 1 5 6 5 6 6 1 3 6 2 5 2 1 2\\r\\n', 'output': ['NO', 'no']}, {'input': '1 1 1 1 5 5 3 3 4 4 4 4 3 3 2 2 6 6 5 5 2 2 6 6\\r\\n', 'output': ['YES', 'yes']}, {'input': '4 6 4 6 6 1 6 1 1 3 1 3 2 2 2 2 5 5 5 5 4 3 4 3\\r\\n', 'output': ['YES', 'yes']}, {'input': '4 5 4 4 3 3 1 2 3 1 1 5 2 2 5 6 6 4 3 2 6 5 1 6\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_2":"[{'input': '1 1 2 2 3 3 1 1 2 2 3 3 4 4 4 4 5 5 5 5 6 6 6 6\\r\\n', 'output': ['NO', 'no']}, {'input': '4 4 2 5 3 2 4 2 5 3 6 4 6 5 1 3 1 5 6 3 1 1 6 2\\r\\n', 'output': ['NO', 'no']}, {'input': '2 6 3 3 5 5 2 6 1 1 6 4 4 4 2 4 6 5 3 1 2 5 3 1\\r\\n', 'output': ['NO', 'no']}, {'input': '3 3 2 3 6 4 4 4 1 2 1 3 2 5 6 6 1 2 6 5 4 5 1 5\\r\\n', 'output': ['NO', 'no']}, {'input': '5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3\\r\\n', 'output': ['YES', 'yes']}]","human_sample_testcases_3":"[{'input': '4 4 2 5 3 2 4 2 5 3 6 4 6 5 1 3 1 5 6 3 1 1 6 2\\r\\n', 'output': ['NO', 'no']}, {'input': '3 3 3 3 4 4 5 5 1 1 1 1 2 2 4 4 5 5 6 6 6 6 2 2\\r\\n', 'output': ['YES', 'yes']}, {'input': '5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3\\r\\n', 'output': ['YES', 'yes']}, {'input': '2 5 2 5 4 2 4 2 1 4 1 4 6 6 6 6 3 3 3 3 1 5 1 5\\r\\n', 'output': ['YES', 'yes']}, {'input': '1 1 1 1 5 5 3 3 4 4 4 4 3 3 2 2 6 6 5 5 2 2 6 6\\r\\n', 'output': ['YES', 'yes']}]","human_sample_testcases_4":"[{'input': '4 4 3 3 5 5 5 5 1 1 6 6 3 6 3 6 4 1 4 1 2 2 2 2\\r\\n', 'output': ['YES', 'yes']}, {'input': '5 4 6 2 5 6 4 1 6 3 3 1 3 2 4 1 1 6 2 3 5 2 4 5\\r\\n', 'output': ['NO', 'no']}, {'input': '1 3 5 6 4 4 4 3 5 2 2 2 3 1 5 6 3 4 6 5 1 2 1 6\\r\\n', 'output': ['NO', 'no']}, {'input': '4 4 4 4 2 2 3 3 1 1 1 1 3 3 6 6 5 5 2 2 6 6 5 5\\r\\n', 'output': ['YES', 'yes']}, {'input': '3 6 5 4 4 6 1 4 3 2 5 2 1 2 6 2 5 4 1 3 1 6 5 3\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_5":"[{'input': '3 3 3 3 4 4 5 5 1 1 1 1 2 2 4 4 5 5 6 6 6 6 2 2\\r\\n', 'output': ['YES', 'yes']}, {'input': '2 1 2 1 4 2 4 2 6 4 6 4 5 5 5 5 3 3 3 3 6 1 6 1\\r\\n', 'output': ['YES', 'yes']}, {'input': '6 6 2 2 3 3 3 3 4 4 5 5 4 6 4 6 5 2 5 2 1 1 1 1\\r\\n', 'output': ['YES', 'yes']}, {'input': '5 4 6 2 5 6 4 1 6 3 3 1 3 2 4 1 1 6 2 3 5 2 4 5\\r\\n', 'output': ['NO', 'no']}, {'input': '5 3 5 3 2 5 2 5 6 2 6 2 4 4 4 4 1 1 1 1 6 3 6 3\\r\\n', 'output': ['YES', 'yes']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":97.87,"human_sample_line_coverage_2":97.87,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":97.87,"human_sample_line_coverage_5":97.87,"human_sample_branch_coverage_1":96.67,"human_sample_branch_coverage_2":96.67,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":96.67,"human_sample_branch_coverage_5":96.67,"id":176,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.296,"human_sample_branch_coverage":97.336} {"sample_inputs":"[\"0 0 2 0 0 1\", \"2 3 4 5 6 6\", \"-1 0 2 0 0 1\"]","input_specification":"The first input line contains 6 space-separated integers x1,\u2009y1,\u2009x2,\u2009y2,\u2009x3,\u2009y3 \u2014 coordinates of the triangle's vertices. All the coordinates are integer and don't exceed 100 in absolute value. It's guaranteed that the triangle is nondegenerate, i.e. its total area is not zero.","src_uid":"8324fa542297c21bda1a4aed0bd45a2d","source_code":"#include\n#include\n#include\nusing namespace std;\nint x[20];\nint ck()\n{\n int i;\n int a,b,c,d;\n for (i=1;i<=6;++i) x[i+6]=x[i];\n for (i=1;i<6;i+=2)\n {\n a=x[i]-x[i+2]; b=x[i+1]-x[i+3];\n if (a==0&&b==0) return 0;\n }\n for (i=1;i<6;i+=2)\n {\n a=x[i]-x[i+2]; b=x[i+1]-x[i+3];\n c=x[i+2]-x[i+4]; d=x[i+3]-x[i+5];\n if (a*c+b*d==0) return 1;\n }\n return 0;\n}\nint main()\n{\n int i;\n for (i=1;i<=6;++i) scanf(\"%d\",&x[i]);\n if (ck()) cout <<\"RIGHT\"<\nusing namespace std;\nint a,b,c,d,e,f;\nint main()\n{\n\tcin >> a >> b >> c >> d >> e >> f;\n\tprintf(\"%d\\n\",(a + b + c) * (a + b + c) - a * a - c * c - e * e);\n return 0;\n}","sample_outputs":"[\"6\", \"13\"]","lang_cluster":"C++","notes":"NoteThis is what Gerald's hexagon looks like in the first sample:And that's what it looks like in the second sample:","output_specification":"Print a single integer \u2014 the number of triangles with the sides of one 1 centimeter, into which the hexagon is split.","description":"Gerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the length of its sides, and found that each of them is equal to an integer number of centimeters. There the properties of the hexagon ended and Gerald decided to draw on it.He painted a few lines, parallel to the sides of the hexagon. The lines split the hexagon into regular triangles with sides of 1 centimeter. Now Gerald wonders how many triangles he has got. But there were so many of them that Gerald lost the track of his counting. Help the boy count the triangles.","human_testcases":"[{\"input\": \"1 1 1 1 1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 2 1 2 1 2\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"2 4 5 3 3 6\\r\\n\", \"output\": [\"83\"]}, {\"input\": \"45 19 48 18 46 21\\r\\n\", \"output\": [\"6099\"]}, {\"input\": \"66 6 65 6 66 5\\r\\n\", \"output\": [\"5832\"]}, {\"input\": \"7 5 4 8 4 5\\r\\n\", \"output\": [\"175\"]}, {\"input\": \"3 2 1 4 1 2\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"7 1 7 3 5 3\\r\\n\", \"output\": [\"102\"]}, {\"input\": \"9 2 9 3 8 3\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"1 6 1 5 2 5\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"41 64 48 61 44 68\\r\\n\", \"output\": [\"17488\"]}, {\"input\": \"1 59 2 59 1 60\\r\\n\", \"output\": [\"3838\"]}, {\"input\": \"30 36 36 32 34 38\\r\\n\", \"output\": [\"7052\"]}, {\"input\": \"50 40 46 38 52 34\\r\\n\", \"output\": [\"11176\"]}, {\"input\": \"4 60 4 60 4 60\\r\\n\", \"output\": [\"4576\"]}, {\"input\": \"718 466 729 470 714 481\\r\\n\", \"output\": [\"2102808\"]}, {\"input\": \"131 425 143 461 95 473\\r\\n\", \"output\": [\"441966\"]}, {\"input\": \"125 7 128 8 124 11\\r\\n\", \"output\": [\"20215\"]}, {\"input\": \"677 303 685 288 692 296\\r\\n\", \"output\": [\"1365807\"]}, {\"input\": \"1 577 7 576 2 582\\r\\n\", \"output\": [\"342171\"]}, {\"input\": \"1000 1000 1000 1000 1000 1000\\r\\n\", \"output\": [\"6000000\"]}, {\"input\": \"1 1 1000 1 1 1000\\r\\n\", \"output\": [\"4002\"]}, {\"input\": \"1000 1000 1 1000 1000 1\\r\\n\", \"output\": [\"2004000\"]}, {\"input\": \"1000 1 1000 999 2 999\\r\\n\", \"output\": [\"2003997\"]}, {\"input\": \"1 1000 1 1 1000 1\\r\\n\", \"output\": [\"4002\"]}, {\"input\": \"888 888 888 887 889 887\\r\\n\", \"output\": [\"4729487\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1000 1 1 1000 1\\r\\n', 'output': ['4002']}, {'input': '7 1 7 3 5 3\\r\\n', 'output': ['102']}, {'input': '718 466 729 470 714 481\\r\\n', 'output': ['2102808']}, {'input': '1 6 1 5 2 5\\r\\n', 'output': ['58']}, {'input': '9 2 9 3 8 3\\r\\n', 'output': ['174']}]","human_sample_testcases_2":"[{'input': '888 888 888 887 889 887\\r\\n', 'output': ['4729487']}, {'input': '1000 1 1000 999 2 999\\r\\n', 'output': ['2003997']}, {'input': '7 1 7 3 5 3\\r\\n', 'output': ['102']}, {'input': '1000 1000 1 1000 1000 1\\r\\n', 'output': ['2004000']}, {'input': '1000 1000 1000 1000 1000 1000\\r\\n', 'output': ['6000000']}]","human_sample_testcases_3":"[{'input': '1000 1000 1 1000 1000 1\\r\\n', 'output': ['2004000']}, {'input': '45 19 48 18 46 21\\r\\n', 'output': ['6099']}, {'input': '2 4 5 3 3 6\\r\\n', 'output': ['83']}, {'input': '50 40 46 38 52 34\\r\\n', 'output': ['11176']}, {'input': '125 7 128 8 124 11\\r\\n', 'output': ['20215']}]","human_sample_testcases_4":"[{'input': '1 577 7 576 2 582\\r\\n', 'output': ['342171']}, {'input': '1 2 1 2 1 2\\r\\n', 'output': ['13']}, {'input': '718 466 729 470 714 481\\r\\n', 'output': ['2102808']}, {'input': '3 2 1 4 1 2\\r\\n', 'output': ['25']}, {'input': '2 4 5 3 3 6\\r\\n', 'output': ['83']}]","human_sample_testcases_5":"[{'input': '1 1000 1 1 1000 1\\r\\n', 'output': ['4002']}, {'input': '45 19 48 18 46 21\\r\\n', 'output': ['6099']}, {'input': '50 40 46 38 52 34\\r\\n', 'output': ['11176']}, {'input': '7 5 4 8 4 5\\r\\n', 'output': ['175']}, {'input': '125 7 128 8 124 11\\r\\n', 'output': ['20215']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":178,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7\", \"8\", \"9\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$1 \\leq n \\leq 10^9$$$).","src_uid":"5551742f6ab39fdac3930d866f439e3e","source_code":"#include \nusing namespace std;\nlong long n,dem=0;\nint main()\n{cin>>n;\ncout<\nusing namespace std;\n#define ll long long\n\nint n;\nint main(){\n\tcin>>n;\n if(n==3){puts(\"5\");return 0;}\n for(int i=1;;i+=2){\n if(i*i+1>>1>=n){printf(\"%d\\n\",i);break;}\n }return 0;\n}\n","sample_outputs":"[\"3\", \"5\"]","lang_cluster":"C++","notes":"NoteThe figure below shows the matrices that correspond to the samples: ","output_specification":"Print a single number \u2014 the sought value of n.","description":"Consider some square matrix A with side n consisting of zeros and ones. There are n rows numbered from 1 to n from top to bottom and n columns numbered from 1 to n from left to right in this matrix. We'll denote the element of the matrix which is located at the intersection of the i-row and the j-th column as Ai,\u2009j.Let's call matrix A clear if no two cells containing ones have a common side.Let's call matrix A symmetrical if it matches the matrices formed from it by a horizontal and\/or a vertical reflection. Formally, for each pair (i,\u2009j) (1\u2009\u2264\u2009i,\u2009j\u2009\u2264\u2009n) both of the following conditions must be met: Ai,\u2009j\u2009=\u2009An\u2009-\u2009i\u2009+\u20091,\u2009j and Ai,\u2009j\u2009=\u2009Ai,\u2009n\u2009-\u2009j\u2009+\u20091.Let's define the sharpness of matrix A as the number of ones in it.Given integer x, your task is to find the smallest positive integer n such that there exists a clear symmetrical matrix A with side n and sharpness x.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"31\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"32\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"33\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"34\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"36\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"37\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"38\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"39\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"40\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"41\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"42\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"43\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"44\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"45\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"46\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"47\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"48\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"49\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"50\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"51\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"52\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"53\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"54\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"55\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"56\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"57\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"58\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"59\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"60\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"61\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"62\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"63\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"64\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"65\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"66\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"67\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"68\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"69\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"70\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"72\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"73\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"74\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"75\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"76\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"77\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"78\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"79\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"80\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"81\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"82\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"83\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"84\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"85\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"86\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"87\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"88\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"89\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"90\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"91\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"92\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"93\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"94\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"95\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"96\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"97\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"98\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"15\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '49\\r\\n', 'output': ['11']}, {'input': '63\\r\\n', 'output': ['13']}, {'input': '32\\r\\n', 'output': ['9']}, {'input': '40\\r\\n', 'output': ['9']}, {'input': '84\\r\\n', 'output': ['13']}]","human_sample_testcases_2":"[{'input': '33\\r\\n', 'output': ['9']}, {'input': '41\\r\\n', 'output': ['9']}, {'input': '72\\r\\n', 'output': ['13']}, {'input': '30\\r\\n', 'output': ['9']}, {'input': '53\\r\\n', 'output': ['11']}]","human_sample_testcases_3":"[{'input': '67\\r\\n', 'output': ['13']}, {'input': '98\\r\\n', 'output': ['15']}, {'input': '80\\r\\n', 'output': ['13']}, {'input': '48\\r\\n', 'output': ['11']}, {'input': '92\\r\\n', 'output': ['15']}]","human_sample_testcases_4":"[{'input': '74\\r\\n', 'output': ['13']}, {'input': '36\\r\\n', 'output': ['9']}, {'input': '35\\r\\n', 'output': ['9']}, {'input': '71\\r\\n', 'output': ['13']}, {'input': '19\\r\\n', 'output': ['7']}]","human_sample_testcases_5":"[{'input': '30\\r\\n', 'output': ['9']}, {'input': '45\\r\\n', 'output': ['11']}, {'input': '22\\r\\n', 'output': ['7']}, {'input': '58\\r\\n', 'output': ['11']}, {'input': '65\\r\\n', 'output': ['13']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":180,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":75.0} {"sample_inputs":"[\"QAQAQYSYIOIWIN\", \"QAQQQZZYNOIWIN\"]","input_specification":"The only line contains a string of length n (1\u2009\u2264\u2009n\u2009\u2264\u2009100). It's guaranteed that the string only contains uppercase English letters.","src_uid":"8aef4947322438664bd8610632fe0947","source_code":"#include\n#include\n#include\nusing namespace std;\nstring str,st=\"QAQ\";\nint ans;\nvoid DG(int sum,int x){\n\tif(sum==3){\n\t\tans++;\n\t\treturn;\n\t}\n\tfor(int i=x+1;i\n#include \n\nchar S[102] , n;\n\nint main()\n{\n\n scanf(\"%s\" , S);\n n = strlen(S);\n int pozicija_prve_jedinice = -1;\n for (int i = 0;i < n;++i) if (S[i] == '1')\n {\n pozicija_prve_jedinice = i;\n break;\n }\n if (pozicija_prve_jedinice != -1)\n {\n int broj_nula = 0;\n for (int i = pozicija_prve_jedinice;i < n;++i) if (S[i] == '0') ++broj_nula;\n if (broj_nula >= 6) printf(\"yes\"); else printf(\"no\");\n } else printf(\"no\");\n return 0;\n}","sample_outputs":"[\"yes\", \"no\"]","lang_cluster":"C++","notes":"NoteIn the first test case, you can get string 1 000 000 after removing two ones which is a representation of number 64 in the binary numerical system.You can read more about binary numeral system representation here: https:\/\/en.wikipedia.org\/wiki\/Binary_system","output_specification":"Print \u00abyes\u00bb (without quotes) if it's possible to remove digits required way and \u00abno\u00bb otherwise.","description":"Top-model Izabella participates in the competition. She wants to impress judges and show her mathematical skills.Her problem is following: for given string, consisting of only 0 and 1, tell if it's possible to remove some digits in such a way, that remaining number is a representation of some positive integer, divisible by 64, in the binary numerical system.","human_testcases":"[{\"input\": \"100010001\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000001000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1111111111111111111111111111111111111111111111111111111111111111111111110111111111111111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0111111101111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1111011111111111111111111111110111110111111111111111111111011111111111111110111111111111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1111111111101111111111111111111111111011111111111111111111111101111011111101111111111101111111111111\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"0110111111111111111111011111111110110111110111111111111111111111111111111111111110111111111111111111\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1100110001111011001101101000001110111110011110111110010100011000100101000010010111100000010001001101\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0001000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"10000000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"0000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0010000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00001000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0100000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00010000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000001000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"100000000000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"000010000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0001100000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000001111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0001110000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000010010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0010000000000100\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"0000001000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"100000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000011001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000011000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000001100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000000000000000000111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"000000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000011111111111111111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"101000000000\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"00100000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"00000000000111\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000011\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000000000000000000000000000000\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0010101010\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0000000000000001\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1010101\\r\\n\", \"output\": [\"NO\", \"no\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '000000000000000000000000000111111111111111\\r\\n', 'output': ['NO', 'no']}, {'input': '000000000001\\r\\n', 'output': ['NO', 'no']}, {'input': '0010101010\\r\\n', 'output': ['NO', 'no']}, {'input': '100010001\\r\\n', 'output': ['YES', 'yes']}, {'input': '00000001\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_2":"[{'input': '0001100000\\r\\n', 'output': ['NO', 'no']}, {'input': '0000000000011\\r\\n', 'output': ['NO', 'no']}, {'input': '0000000000000000\\r\\n', 'output': ['NO', 'no']}, {'input': '0010000000000100\\r\\n', 'output': ['YES', 'yes']}, {'input': '00000000111\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_3":"[{'input': '000000000000000\\r\\n', 'output': ['NO', 'no']}, {'input': '0000000000011\\r\\n', 'output': ['NO', 'no']}, {'input': '0000000000000011111111111111111\\r\\n', 'output': ['NO', 'no']}, {'input': '000000000000000000000\\r\\n', 'output': ['NO', 'no']}, {'input': '000000011\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_4":"[{'input': '0000000000011\\r\\n', 'output': ['NO', 'no']}, {'input': '0000100\\r\\n', 'output': ['NO', 'no']}, {'input': '00000000111\\r\\n', 'output': ['NO', 'no']}, {'input': '000000000000000000000000000111111111111111\\r\\n', 'output': ['NO', 'no']}, {'input': '0000001000000\\r\\n', 'output': ['YES', 'yes']}]","human_sample_testcases_5":"[{'input': '000000000000000\\r\\n', 'output': ['NO', 'no']}, {'input': '000001000\\r\\n', 'output': ['NO', 'no']}, {'input': '100000000\\r\\n', 'output': ['YES', 'yes']}, {'input': '0000000000000000000000000000000000000000000000000\\r\\n', 'output': ['NO', 'no']}, {'input': '000010000\\r\\n', 'output': ['NO', 'no']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.31,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":92.31,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":100.0,"id":182,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.924,"human_sample_branch_coverage":89.998} {"sample_inputs":"[\"2\", \"3\", \"20\"]","input_specification":"The only line contains single integer k (1\u2009\u2264\u2009k\u2009\u2264\u2009400).","src_uid":"fda761834f7b5800f540178ac1c79fca","source_code":"#include\n#include\n#include\n#include\n#include\nusing namespace std;\nconst int mo=1e9+7;\nint f[500][500],C[500][500],I[500],nI[500];\nlong long A[500];\nint n;\nint quick(int k1,int k2){\n\tint k3=1;\n\twhile (k2){\n\t\tif (k2&1) k3=1ll*k3*k1%mo; k2>>=1; k1=1ll*k1*k1%mo;\n\t}\n\treturn k3;\n}\nint main(){\n\tscanf(\"%d\",&n);\n\tf[0][0]=1;\n\tfor (int i=0;i<=n;i++){\n\t\tC[i][0]=1;\n\t\tfor (int j=1;j<=i;j++) C[i][j]=(C[i-1][j-1]+C[i-1][j])%mo;\n\t}\n\tI[0]=1; for (int i=1;i<=n;i++) I[i]=1ll*I[i-1]*i%mo;\n\tfor (int i=0;i<=n;i++) nI[i]=quick(I[i],mo-2);\n\tfor (int i=1;i<=n;i++){\n\t\tf[i][0]=1; memset(A,0x00,sizeof A); A[0]=1;\n\t\tfor (int j=n;j;j--)\n\t\t\tfor (int k=0;k<=j;k++)\n\t\t\t\tif (A[j]<0) A[j]+=1ll*f[i-1][k]*f[i-1][j-k];\n\t\t\t\telse A[j]+=1ll*(f[i-1][k]-mo)*f[i-1][j-k]; \n\t\tfor (int j=1;j<=n;j++) A[j]=1ll*(A[j]%mo+mo)*I[j]%mo;\n\t\tfor (int j=n;j;j--)\n\t\t\tf[i][j]=(1ll*(2*j+1)*A[j]+1ll*j*A[j+1]+1ll*j*A[j-1])%mo*nI[j]%mo;\n\t}\n\tprintf(\"%d\\n\",f[n][1]);\n\treturn 0;\n}\n\t\t\t","sample_outputs":"[\"9\", \"245\", \"550384565\"]","lang_cluster":"C++","notes":"NoteThere are 9 paths in the first example (the vertices are numbered on the picture below): 1, 2, 3, 1-2, 2-1, 1-3, 3-1, 2-1-3, 3-1-2. Singer 2-house ","output_specification":"Print single integer\u00a0\u2014 the answer for the task modulo 109\u2009+\u20097.","description":"It is known that passages in Singer house are complex and intertwined. Let's define a Singer k-house as a graph built by the following process: take complete binary tree of height k and add edges from each vertex to all its successors, if they are not yet present. Singer 4-house Count the number of non-empty paths in Singer k-house which do not pass the same vertex twice. Two paths are distinct if the sets or the orders of visited vertices are different. Since the answer can be large, output it modulo 109\u2009+\u20097.","human_testcases":"[{\"input\": \"2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"245\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"550384565\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"126565\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"54326037\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"321837880\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"323252721\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"754868154\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"328083248\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"838314395\"]}, {\"input\": \"400\\r\\n\", \"output\": [\"913259286\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"220816781\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"106742050\"]}, {\"input\": \"31\\r\\n\", \"output\": [\"810384961\"]}, {\"input\": \"41\\r\\n\", \"output\": [\"141033366\"]}, {\"input\": \"51\\r\\n\", \"output\": [\"923507761\"]}, {\"input\": \"61\\r\\n\", \"output\": [\"384672708\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"329267374\"]}, {\"input\": \"81\\r\\n\", \"output\": [\"784719328\"]}, {\"input\": \"91\\r\\n\", \"output\": [\"964027956\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"759589968\"]}, {\"input\": \"111\\r\\n\", \"output\": [\"691982338\"]}, {\"input\": \"121\\r\\n\", \"output\": [\"631667314\"]}, {\"input\": \"131\\r\\n\", \"output\": [\"217349271\"]}, {\"input\": \"141\\r\\n\", \"output\": [\"551624811\"]}, {\"input\": \"151\\r\\n\", \"output\": [\"378771634\"]}, {\"input\": \"161\\r\\n\", \"output\": [\"105884826\"]}, {\"input\": \"171\\r\\n\", \"output\": [\"979036950\"]}, {\"input\": \"181\\r\\n\", \"output\": [\"421742777\"]}, {\"input\": \"191\\r\\n\", \"output\": [\"762720192\"]}, {\"input\": \"201\\r\\n\", \"output\": [\"667160634\"]}, {\"input\": \"211\\r\\n\", \"output\": [\"648844381\"]}, {\"input\": \"221\\r\\n\", \"output\": [\"377133989\"]}, {\"input\": \"231\\r\\n\", \"output\": [\"378035466\"]}, {\"input\": \"241\\r\\n\", \"output\": [\"509578422\"]}, {\"input\": \"251\\r\\n\", \"output\": [\"192479791\"]}, {\"input\": \"261\\r\\n\", \"output\": [\"952127278\"]}, {\"input\": \"271\\r\\n\", \"output\": [\"589677800\"]}, {\"input\": \"281\\r\\n\", \"output\": [\"781971312\"]}, {\"input\": \"291\\r\\n\", \"output\": [\"850484840\"]}, {\"input\": \"301\\r\\n\", \"output\": [\"484957644\"]}, {\"input\": \"311\\r\\n\", \"output\": [\"592476107\"]}, {\"input\": \"321\\r\\n\", \"output\": [\"36248116\"]}, {\"input\": \"331\\r\\n\", \"output\": [\"943513219\"]}, {\"input\": \"341\\r\\n\", \"output\": [\"502180086\"]}, {\"input\": \"351\\r\\n\", \"output\": [\"625447969\"]}, {\"input\": \"361\\r\\n\", \"output\": [\"465138299\"]}, {\"input\": \"371\\r\\n\", \"output\": [\"782234442\"]}, {\"input\": \"381\\r\\n\", \"output\": [\"878748386\"]}, {\"input\": \"391\\r\\n\", \"output\": [\"492009567\"]}, {\"input\": \"399\\r\\n\", \"output\": [\"174591541\"]}, {\"input\": \"398\\r\\n\", \"output\": [\"986172399\"]}, {\"input\": \"397\\r\\n\", \"output\": [\"73091278\"]}, {\"input\": \"396\\r\\n\", \"output\": [\"786963365\"]}, {\"input\": \"395\\r\\n\", \"output\": [\"718047399\"]}, {\"input\": \"394\\r\\n\", \"output\": [\"95725776\"]}, {\"input\": \"393\\r\\n\", \"output\": [\"415902127\"]}, {\"input\": \"392\\r\\n\", \"output\": [\"275683011\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '251\\r\\n', 'output': ['192479791']}, {'input': '4\\r\\n', 'output': ['126565']}, {'input': '392\\r\\n', 'output': ['275683011']}, {'input': '171\\r\\n', 'output': ['979036950']}, {'input': '121\\r\\n', 'output': ['631667314']}]","human_sample_testcases_2":"[{'input': '201\\r\\n', 'output': ['667160634']}, {'input': '291\\r\\n', 'output': ['850484840']}, {'input': '161\\r\\n', 'output': ['105884826']}, {'input': '9\\r\\n', 'output': ['328083248']}, {'input': '392\\r\\n', 'output': ['275683011']}]","human_sample_testcases_3":"[{'input': '396\\r\\n', 'output': ['786963365']}, {'input': '281\\r\\n', 'output': ['781971312']}, {'input': '10\\r\\n', 'output': ['838314395']}, {'input': '161\\r\\n', 'output': ['105884826']}, {'input': '399\\r\\n', 'output': ['174591541']}]","human_sample_testcases_4":"[{'input': '191\\r\\n', 'output': ['762720192']}, {'input': '81\\r\\n', 'output': ['784719328']}, {'input': '61\\r\\n', 'output': ['384672708']}, {'input': '321\\r\\n', 'output': ['36248116']}, {'input': '341\\r\\n', 'output': ['502180086']}]","human_sample_testcases_5":"[{'input': '11\\r\\n', 'output': ['220816781']}, {'input': '301\\r\\n', 'output': ['484957644']}, {'input': '399\\r\\n', 'output': ['174591541']}, {'input': '351\\r\\n', 'output': ['625447969']}, {'input': '31\\r\\n', 'output': ['810384961']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":183,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1\", \"1 2\", \"2 1\"]","input_specification":"The single line contains two integers r,\u2009h (1\u2009\u2264\u2009r,\u2009h\u2009\u2264\u2009107).","src_uid":"ae883bf16842c181ea4bd123dee12ef9","source_code":"#include \n\nusing namespace std;\n\n#define reps(i, s, n) for(int i=s; i=s; i--)\n#define drep(i, n) dreps(i, 0, n)\n#define pb push_back\n#define mp make_pair\n#define fi first\n#define se second\n#define foreach(v, c) for(__typeof((c).begin()) v=(c).begin();v!=(c).end(); ++v)\n#define all(a) a.begin(), a.end()\n#define rall(a) a.rbegin(), a.rend()\n#define in(a,b) ((b).find(a) != (b).end())\n#define cpresent(c,x) (find(all(c),x) != (c).end()) \n#define X real()\n#define Y imag()\n#define length(V) (hypot((V).X, (V).Y))\n\ntypedef vector vi;\ntypedef vector vvi;\ntypedef pair ii;\ntypedef long long ll;\ntypedef long double ld;\ntypedef complex point;\ntypedef pair segment;\ntypedef pair circle;\ntypedef vector polygon;\n\nconst double PI = 2 * acos(0.0);\nconst double eps = 1e-9;\n\ndouble r, h;\n\nint main() {\n cin >> r >> h;\n int ans = 0;\n double half = floor(h \/ r);\n ans += half * 2;\n h = h - half * r;\n if (h * 2 < r) ans ++;\n else if (h * 2 >= r * sqrt(3)) ans += 3;\n else ans += 2;\n cout << ans << endl;\n return 0;\n}\n","sample_outputs":"[\"3\", \"5\", \"2\"]","lang_cluster":"C++","notes":null,"output_specification":"Print a single integer \u2014 the maximum number of balloons Xenia can put in the cupboard.","description":"A girl named Xenia has a cupboard that looks like an arc from ahead. The arc is made of a semicircle with radius r (the cupboard's top) and two walls of height h (the cupboard's sides). The cupboard's depth is r, that is, it looks like a rectangle with base r and height h\u2009+\u2009r from the sides. The figure below shows what the cupboard looks like (the front view is on the left, the side view is on the right). Xenia got lots of balloons for her birthday. The girl hates the mess, so she wants to store the balloons in the cupboard. Luckily, each balloon is a sphere with radius . Help Xenia calculate the maximum number of balloons she can put in her cupboard. You can say that a balloon is in the cupboard if you can't see any part of the balloon on the left or right view. The balloons in the cupboard can touch each other. It is not allowed to squeeze the balloons or deform them in any way. You can assume that the cupboard's walls are negligibly thin.","human_testcases":"[{\"input\": \"1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 11\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"674098 1358794\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3983458 7761504\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4841874 9131511\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"667586 5534221\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"1526002 6904227\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4835362 5823289\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5693778 7001807\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6552194 8371814\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2377906 4774524\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4365659 4738707\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"98 1358794\\r\\n\", \"output\": [\"27731\"]}, {\"input\": \"458 7761504\\r\\n\", \"output\": [\"33894\"]}, {\"input\": \"874 9131511\\r\\n\", \"output\": [\"20897\"]}, {\"input\": \"586 5534221\\r\\n\", \"output\": [\"18889\"]}, {\"input\": \"2 6904227\\r\\n\", \"output\": [\"6904228\"]}, {\"input\": \"1 10000000\\r\\n\", \"output\": [\"20000001\"]}, {\"input\": \"2 10000000\\r\\n\", \"output\": [\"10000001\"]}, {\"input\": \"3 10000000\\r\\n\", \"output\": [\"6666667\"]}, {\"input\": \"4 10000000\\r\\n\", \"output\": [\"5000001\"]}, {\"input\": \"3 9999999\\r\\n\", \"output\": [\"6666667\"]}, {\"input\": \"10000000 866254\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000000 8660255\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 50\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 199\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10000 9999\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000 1999999\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2000000 1999999\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"18 16\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 87\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 19\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10000 38661\\r\\n\", \"output\": [\"9\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2377906 4774524\\r\\n', 'output': ['5']}, {'input': '1 10000000\\r\\n', 'output': ['20000001']}, {'input': '100 50\\r\\n', 'output': ['2']}, {'input': '5 6\\r\\n', 'output': ['3']}, {'input': '4 1\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '10000 38661\\r\\n', 'output': ['9']}, {'input': '10000 9999\\r\\n', 'output': ['3']}, {'input': '3 9999999\\r\\n', 'output': ['6666667']}, {'input': '2000000 1999999\\r\\n', 'output': ['3']}, {'input': '2 10000000\\r\\n', 'output': ['10000001']}]","human_sample_testcases_3":"[{'input': '5693778 7001807\\r\\n', 'output': ['3']}, {'input': '1526002 6904227\\r\\n', 'output': ['10']}, {'input': '5 5\\r\\n', 'output': ['3']}, {'input': '2000000 1999999\\r\\n', 'output': ['3']}, {'input': '100 199\\r\\n', 'output': ['5']}]","human_sample_testcases_4":"[{'input': '586 5534221\\r\\n', 'output': ['18889']}, {'input': '1000000 1999999\\r\\n', 'output': ['5']}, {'input': '5 1\\r\\n', 'output': ['1']}, {'input': '2377906 4774524\\r\\n', 'output': ['5']}, {'input': '10000000 866254\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '8 7\\r\\n', 'output': ['3']}, {'input': '98 1358794\\r\\n', 'output': ['27731']}, {'input': '100 49\\r\\n', 'output': ['1']}, {'input': '4841874 9131511\\r\\n', 'output': ['5']}, {'input': '1526002 6904227\\r\\n', 'output': ['10']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":90.91,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":90.91,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":100.0,"id":184,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.364,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"3 5\", \"6 66\"]","input_specification":"The first line of the input contains integer numbers l,\u2009r (1\u2009\u2264\u2009l,\u2009r\u2009\u2264\u20093\u00b7108).","src_uid":"55a83526c10126ac3a6e6e5154b120d0","source_code":"#pragma GCC optimize(\"Ofast\")\n#pragma GCC target(\"sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx\")\n\n\/\/#include\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#define _USE_MATH_DEFINES\n#define ll long long\n#define ins Not Needed Thing\n#define ull unsigned long long\n#define ld long double\n\/\/ Yeah Yeah\n#define Accepted 0\n#define pb push_back\n\/\/ Ora Ora, Ora Ora, Ora fat\n#define pii pair\n#define pll pair\n#define mp make_pair\n\/\/ Aydin day aydirinday\n#define sz(x) (int)(x.size())\n#define all(x) x.begin(),x.end()\n\/\/ @Im@5@Im@5 @Im@5@Im@5\n#define F first\n#define S second\n\/\/ Skyrim dlya nordov (c) Roflakopter\n#define SORRY FUL Accepted \n#define SpeedForce ios_base::sync_with_stdio(0), cin.tie(0)\n\/\/ Skr Skr v chernih Naykax (c) ZzzzZzzzzZz\n#define Toktama Kazakhstan \n\/\/ TOKTAMA!\n\nusing namespace std;\n\nconst double eps = 0.000001;\nconst ld pi = acos(-1);\nconst int maxn = 1e7 + 9;\nconst int mod = 1e9 + 7;\nconst ll MOD = 1e18 + 9;\nconst ll INF = 1e18 + 123;\nconst int inf = 2e9 + 11;\nconst int mxn = 1e6 + 9;\nconst int N = 3e8 + 1; \nconst int PRI = 555557;\nconst int pri = 997;\n\nint tests = 1;\nint l, r;\nbitset f;\n\nstring s;\nint cnt[31];\nint cur, res;\nint ans;\n\ninline void Solve () {\n\t\/\/easy\n\tcin >> l >> r;\n for (int i = 3; 1ll * i * i <= r; i += 2)\n\t\tif(!f[i])\n\t\t\tfor (ll j = 1ll * i * i; j <= r; j += i)\n\t\t\t\tf[j] = 1;\n\t\t\t\n\n\tfor (int i = 5; i <= r; i += 4)\n\t\tif(!f[i] && i >= l)\n\t\t\tans ++;\n\n\tcout << ans + (2 >= l && 2 <= r);\n}\n\nint main () {\n\tSpeedForce;\n\/\/\tfreopen(\".in\", \"r\", stdin);\n\/\/\tfreopen(\".out\", \"w\", stdout);\t\n\t\/\/ cin >> tests;\n\twhile(tests --) {\n\t\tSolve ();\n\t\t\/\/ Ee Zadrot\n\t}\n\n\treturn Accepted; \n}","sample_outputs":"[\"1\", \"7\"]","lang_cluster":"C++","notes":null,"output_specification":"In the only line print the number of days on the segment [l,\u2009r], which are lucky for Peter and Bob at the same time.","description":"On the math lesson a teacher asked each pupil to come up with his own lucky numbers. As a fan of number theory Peter chose prime numbers. Bob was more original. He said that number t is his lucky number, if it can be represented as: t\u2009=\u2009a2\u2009+\u2009b2,\u2009 where a,\u2009b are arbitrary positive integers.Now, the boys decided to find out how many days of the interval [l,\u2009r] (l\u2009\u2264\u2009r) are suitable for pair programming. They decided that the day i (l\u2009\u2264\u2009i\u2009\u2264\u2009r) is suitable for pair programming if and only if the number i is lucky for Peter and lucky for Bob at the same time. Help the boys to find the number of such days.","human_testcases":"[{\"input\": \"3 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 66\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"15 23\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"124124 1235125\\r\\n\", \"output\": [\"41860\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13 13\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 54321\\r\\n\", \"output\": [\"2749\"]}, {\"input\": \"100000000 101000000\\r\\n\", \"output\": [\"27101\"]}, {\"input\": \"200000000 300000000\\r\\n\", \"output\": [\"2586898\"]}, {\"input\": \"100 152262461\\r\\n\", \"output\": [\"4281819\"]}, {\"input\": \"200 299399868\\r\\n\", \"output\": [\"8110312\"]}, {\"input\": \"300 99050033\\r\\n\", \"output\": [\"2854733\"]}, {\"input\": \"400 246187040\\r\\n\", \"output\": [\"6740466\"]}, {\"input\": \"5000 180883670\\r\\n\", \"output\": [\"5037507\"]}, {\"input\": \"6000 297577626\\r\\n\", \"output\": [\"8063442\"]}, {\"input\": \"7000 114289582\\r\\n\", \"output\": [\"3266461\"]}, {\"input\": \"123123 277416577\\r\\n\", \"output\": [\"7540625\"]}, {\"input\": \"152512 265014995\\r\\n\", \"output\": [\"7220052\"]}, {\"input\": \"5555555 177096153\\r\\n\", \"output\": [\"4745959\"]}, {\"input\": \"12453 60066316\\r\\n\", \"output\": [\"1781786\"]}, {\"input\": \"30003030 239478623\\r\\n\", \"output\": [\"5637984\"]}, {\"input\": \"200000000 240458292\\r\\n\", \"output\": [\"1053415\"]}, {\"input\": \"1457 286080130\\r\\n\", \"output\": [\"7768743\"]}, {\"input\": \"457342 225575638\\r\\n\", \"output\": [\"6186877\"]}, {\"input\": \"4587457 53343959\\r\\n\", \"output\": [\"1433687\"]}, {\"input\": \"9786786 225755921\\r\\n\", \"output\": [\"5885080\"]}, {\"input\": \"939423 12526247\\r\\n\", \"output\": [\"373107\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100000000 200000000\\r\\n\", \"output\": [\"2658316\"]}, {\"input\": \"300000000 300000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 13\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 300000000\\r\\n\", \"output\": [\"8125719\"]}, {\"input\": \"2 243062060\\r\\n\", \"output\": [\"6659514\"]}, {\"input\": \"10000000 267800250\\r\\n\", \"output\": [\"6966675\"]}, {\"input\": \"20000000 28474683\\r\\n\", \"output\": [\"249196\"]}, {\"input\": \"30000000 39149117\\r\\n\", \"output\": [\"263578\"]}, {\"input\": \"666 171304384\\r\\n\", \"output\": [\"4785310\"]}, {\"input\": \"13 170334008\\r\\n\", \"output\": [\"4759800\"]}, {\"input\": \"31 237947428\\r\\n\", \"output\": [\"6527082\"]}, {\"input\": \"111111111 139453038\\r\\n\", \"output\": [\"759971\"]}, {\"input\": \"200010000 300000000\\r\\n\", \"output\": [\"2586636\"]}, {\"input\": \"123123123 269866764\\r\\n\", \"output\": [\"3847785\"]}, {\"input\": \"231231231 296373010\\r\\n\", \"output\": [\"1680139\"]}, {\"input\": \"444 169128168\\r\\n\", \"output\": [\"4727892\"]}, {\"input\": \"3 258745003\\r\\n\", \"output\": [\"7065062\"]}, {\"input\": \"17 163498014\\r\\n\", \"output\": [\"4579231\"]}, {\"input\": \"19 160080022\\r\\n\", \"output\": [\"4488800\"]}, {\"input\": \"100000002 290708239\\r\\n\", \"output\": [\"5007132\"]}, {\"input\": \"100000013 143135280\\r\\n\", \"output\": [\"1158872\"]}, {\"input\": \"100000007 292662021\\r\\n\", \"output\": [\"5057358\"]}, {\"input\": \"100000009 113443527\\r\\n\", \"output\": [\"363753\"]}, {\"input\": \"109009002 294274459\\r\\n\", \"output\": [\"4854746\"]}, {\"input\": \"222222222 300000000\\r\\n\", \"output\": [\"2006978\"]}, {\"input\": \"233333333 300000000\\r\\n\", \"output\": [\"1718394\"]}, {\"input\": \"288888888 300000000\\r\\n\", \"output\": [\"284683\"]}, {\"input\": \"1 227379125\\r\\n\", \"output\": [\"6253051\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4587457 53343959\\r\\n', 'output': ['1433687']}, {'input': '233333333 300000000\\r\\n', 'output': ['1718394']}, {'input': '15 23\\r\\n', 'output': ['1']}, {'input': '457342 225575638\\r\\n', 'output': ['6186877']}, {'input': '231231231 296373010\\r\\n', 'output': ['1680139']}]","human_sample_testcases_2":"[{'input': '233333333 300000000\\r\\n', 'output': ['1718394']}, {'input': '152512 265014995\\r\\n', 'output': ['7220052']}, {'input': '7 54321\\r\\n', 'output': ['2749']}, {'input': '666 171304384\\r\\n', 'output': ['4785310']}, {'input': '13 170334008\\r\\n', 'output': ['4759800']}]","human_sample_testcases_3":"[{'input': '123123 277416577\\r\\n', 'output': ['7540625']}, {'input': '100000013 143135280\\r\\n', 'output': ['1158872']}, {'input': '300000000 300000000\\r\\n', 'output': ['0']}, {'input': '1457 286080130\\r\\n', 'output': ['7768743']}, {'input': '123123123 269866764\\r\\n', 'output': ['3847785']}]","human_sample_testcases_4":"[{'input': '12453 60066316\\r\\n', 'output': ['1781786']}, {'input': '6000 297577626\\r\\n', 'output': ['8063442']}, {'input': '7000 114289582\\r\\n', 'output': ['3266461']}, {'input': '200010000 300000000\\r\\n', 'output': ['2586636']}, {'input': '300 99050033\\r\\n', 'output': ['2854733']}]","human_sample_testcases_5":"[{'input': '288888888 300000000\\r\\n', 'output': ['284683']}, {'input': '400 246187040\\r\\n', 'output': ['6740466']}, {'input': '444 169128168\\r\\n', 'output': ['4727892']}, {'input': '13 13\\r\\n', 'output': ['1']}, {'input': '100000009 113443527\\r\\n', 'output': ['363753']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":85.0,"human_sample_branch_coverage_2":85.0,"human_sample_branch_coverage_3":85.0,"human_sample_branch_coverage_4":85.0,"human_sample_branch_coverage_5":85.0,"id":185,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"2\", \"3\", \"6\"]","input_specification":"The only line contains the integer $$$n$$$ ($$$2 \\le n \\le 10^6$$$)\u00a0\u2014 the length of the permutations.","src_uid":"b2d59b1279d891dba9372a52364bced2","source_code":"#include\n\n\n#define MAX 1000000007\n#define SIZE 1000005\n\nint dp[SIZE][20][3];\nint n;\n\nint fun(int x, int y){\n\tint temp =(1<\nusing namespace std;\nint dp[200010];\nconst int mod = 1000000007;\nint r,g;\nint h;\nint ans = 0;\nint sum;\nint main() {\n\tmemset (dp,0,sizeof(dp));\n\tcin>>r>>g;\n\th=sqrt(r+g+r+g);\n\twhile(h*(h+1)<=r+g+r+g) h++;\n\tdp[0]= 1;\n\tfor(int i=1; i=i; j--) {\n\t\t\tdp[j] += dp[j-i];\n\t\t\tdp[j]%=mod;\n\t\t}\n\t}\t\n\tsum=h*(h-1)\/2;\n\tfor(int i=r; ~i; i--) {\n\t\tif(sum-i>g) break;\n\t\tans+=dp[i];\n\t\tans%=mod;\n\t}\n\tcout<\nusing namespace std;\ntypedef long long ll;\nconst int MOD = (int)1e9 + 7;\nconst int MAXN = (int)503;\nconst int MAXS = (int)62503;\nconst int infint = (int)1e9;\nconst ll inf = (ll)1e18;\nint n, m, pwr[MAXS];\nll dp[MAXN][MAXN], c, t;\nint main()\n{\n\tscanf(\"%d %d\", &n, &m);\n\tpwr[0] = 1;\n\tfor (int i = 1; i < MAXS; i++)\n\t\tpwr[i] = (pwr[i - 1] * 2) % MOD;\n\tdp[0][0] = 1;\n\tif(n == 500 && m == 499)\n\t\treturn cout << 582854781, 0;\n\tif(n + m == 1000)\n\t\treturn cout << 731931766, 0;\n\tfor (short i = 1; i <= n; i++)\n\t\tfor (short j = 0; j <= m; j++)\n\t\t{\n\t\t\tif(j == 0)\n\t\t\t\tdp[i][j] = 1;\n\t\t\telse\n\t\t\tfor (short k = 1; k <= i; k++)\n\t\t\t{\n\t\t\t\tc = pwr[(i - k + 1) * (k - 1)], t = (pwr[i - k + 1] - 1 + MOD) % MOD;\n\t\t\t\tdp[i][j] += c * t % MOD * dp[k - 1][j - 1] % MOD, dp[i][j] %= MOD;\n\t\t\t}\n\t\t}\n\tprintf(\"%I64d\", dp[n][m]);\n}\n","sample_outputs":"[\"23\", \"32\", \"1\", \"2\"]","lang_cluster":"C++","notes":null,"output_specification":"In a single line, print the answer to the problem modulo 1000000007 (109\u2009+\u20097).","description":"Let's assume that set S consists of m distinct intervals [l1,\u2009r1], [l2,\u2009r2], ..., [lm,\u2009rm] (1\u2009\u2264\u2009li\u2009\u2264\u2009ri\u2009\u2264\u2009n; li,\u2009ri are integers).Let's assume that f(S) is the maximum number of intervals that you can choose from the set S, such that every two of them do not intersect. We assume that two intervals, [l1,\u2009r1] and [l2,\u2009r2], intersect if there is an integer x, which meets two inequalities: l1\u2009\u2264\u2009x\u2009\u2264\u2009r1 and l2\u2009\u2264\u2009x\u2009\u2264\u2009r2.Sereja wonders, how many sets S are there, such that f(S)\u2009=\u2009k? Count this number modulo 1000000007 (109\u2009+\u20097).","human_testcases":"[{\"input\": \"3 1\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"20 10\\r\\n\", \"output\": [\"169364726\"]}, {\"input\": \"50 49\\r\\n\", \"output\": [\"560578792\"]}, {\"input\": \"50 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 9\\r\\n\", \"output\": [\"391716853\"]}, {\"input\": \"100 10\\r\\n\", \"output\": [\"209177805\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"281603733\"]}, {\"input\": \"100 99\\r\\n\", \"output\": [\"599757793\"]}, {\"input\": \"100 50\\r\\n\", \"output\": [\"820383341\"]}, {\"input\": \"99 60\\r\\n\", \"output\": [\"97903617\"]}, {\"input\": \"95 93\\r\\n\", \"output\": [\"483334618\"]}, {\"input\": \"400 399\\r\\n\", \"output\": [\"760864214\"]}, {\"input\": \"500 499\\r\\n\", \"output\": [\"582854781\"]}, {\"input\": \"500 500\\r\\n\", \"output\": [\"731931766\"]}, {\"input\": \"400 500\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"500 20\\r\\n\", \"output\": [\"211189748\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"14720\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"1024\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"127\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"64\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 2\\r\\n', 'output': ['32']}, {'input': '99 60\\r\\n', 'output': ['97903617']}, {'input': '50 0\\r\\n', 'output': ['1']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '20 10\\r\\n', 'output': ['169364726']}]","human_sample_testcases_2":"[{'input': '500 499\\r\\n', 'output': ['582854781']}, {'input': '10 0\\r\\n', 'output': ['1']}, {'input': '400 500\\r\\n', 'output': ['0']}, {'input': '3 2\\r\\n', 'output': ['32']}, {'input': '95 93\\r\\n', 'output': ['483334618']}]","human_sample_testcases_3":"[{'input': '500 500\\r\\n', 'output': ['731931766']}, {'input': '500 499\\r\\n', 'output': ['582854781']}, {'input': '5 3\\r\\n', 'output': ['14720']}, {'input': '3 1\\r\\n', 'output': ['23']}, {'input': '100 99\\r\\n', 'output': ['599757793']}]","human_sample_testcases_4":"[{'input': '95 93\\r\\n', 'output': ['483334618']}, {'input': '4 4\\r\\n', 'output': ['64']}, {'input': '400 399\\r\\n', 'output': ['760864214']}, {'input': '1 100\\r\\n', 'output': ['0']}, {'input': '3 1\\r\\n', 'output': ['23']}]","human_sample_testcases_5":"[{'input': '400 500\\r\\n', 'output': ['0']}, {'input': '3 1\\r\\n', 'output': ['23']}, {'input': '100 100\\r\\n', 'output': ['281603733']}, {'input': '10 0\\r\\n', 'output': ['1']}, {'input': '100 99\\r\\n', 'output': ['599757793']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":89.47,"human_sample_line_coverage_2":94.74,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":89.47,"human_sample_line_coverage_5":89.47,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":188,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.63,"human_sample_branch_coverage":82.5} {"sample_inputs":"[\"0 0\\n4 5\", \"3 4\\n6 1\"]","input_specification":"The first line contains two integers x1,\u2009y1 (\u2009-\u2009109\u2009\u2264\u2009x1,\u2009y1\u2009\u2264\u2009109) \u2014 the start position of the robot. The second line contains two integers x2,\u2009y2 (\u2009-\u2009109\u2009\u2264\u2009x2,\u2009y2\u2009\u2264\u2009109) \u2014 the finish position of the robot.","src_uid":"a6e9405bc3d4847fe962446bc1c457b4","source_code":"#include \n#include\nusing namespace std;\ntypedef long long ll;\nll x,y,x2,y2,ans;\nint main()\n{\n cin>>x>>y>>x2>>y2;\n ans=max(abs(x-x2),abs(y-y2));\n cout<\nusing namespace std;\nlong n,m,k,c=1,s=1;\nint main(){\n\tcin>>n>>m>>k;\n\tm-=n;\n\twhile(m>0){\n\t\tif(k-c>=1)s++;\n\t\tif(k+c<=n)s++;\n\t\tm-=s;\n\t\tc++;\n\t}\n\tcout<\n#include \n#include \n#include \nusing namespace std;\nstring s,s1;\nint main() {\n while(cin>>s) {\n int k1,k2;\n int a,b,c,d;\n cin>>s1;\n a=s[0]-'0';\n b=s[1]-'0';\n c=s[3]-'0';\n d=s[4]-'0';\n int aa,bb,cc,dd;\n aa=s1[0]-'0';\n bb=s1[1]-'0';\n cc=s1[3]-'0';\n dd=s1[4]-'0';\n int e,f;\n e=a*10+b;\n f=c*10+d;\n int ee,ff;\n ee=aa*10+bb;\n ff=cc*10+dd;\n if((e*60+f)<(ee*60+ff)) {\n int sum=24*60+f+e*60;\n sum-=ee*60+ff;\n k1=sum\/60,k2=sum%60;\n if(k1<=9) {\n cout<<0<\n#include \nusing namespace std;\n\nunordered_set S;\nlong long int n, x, y;\n\nvoid foo(long long int v){\n if(v<=0 || v>n) return;\n v*=10;\n S.insert(v);\n foo(v+x);\n foo(v+y);\n}\n\nint main(){\n ios_base::sync_with_stdio(false);\n cin.tie(0);\n\n cin>>n;\n\n for(int i=0; i<10; i++)\n {\n for(int j=0; j<10; j++){\n x=i;\n y=j;\n foo(x);\n }\n }\n cout<\nusing namespace std;\nchar a,b;\nbool chess[10][10];\nint x,y,ans = 8;\nint main() {\n\tcin>>a>>b;\n\tx=a-'a';\n\ty=b-'0';\n\tx++;\n\tfor(int i=0; i<=9; i++) {\n\t\tfor(int j=0; j<=9; j++) { \n\t\t\tif(i==0||i==9) {\n\t\t\t\tchess[i][j] = 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tif(j==0||j==9)chess[i][j]=1;\n\t\t\t}\n\t\t}\n\t}\n\tif(chess[x][y+1]==1)ans--;\n\tif(chess[x+1][y]==1)ans--;\n\tif(chess[x][y-1]==1)ans--;\n\tif(chess[x-1][y]==1)ans--;\n\tif(chess[x+1][y+1]==1)ans--;\n\tif(chess[x+1][y-1]==1)ans--;\n\tif(chess[x-1][y+1]==1)ans--;\n\tif(chess[x-1][y-1]==1)ans--;\n\tcout<\nusing namespace std;\n\nint n,k;\nint x[16384],rest;\nint a,b,c;\n\nint main(){\n\tcin>>n>>k;\n\ta=n;\n\tb=2*n;\n\tint N;\n\tfor(int i=1;i<=k;++i){\n\t\tcin>>x[i];\n\t}\n\tfor(int i=1;i<=k;++i){\n\t\trest+=x[i]%2;\n\t\tx[i]=x[i]\/2;\n\t}\n\tfor(int i=1;i<=k;++i){\n\t\tif(!a) break;\n\t\tN=min(a,x[i]\/2);\n\t\ta-=N;\n\t\tx[i]-=N*2;\n\t}\n\tfor(int i=1;i<=k;++i){\n\t\tif(!a) break;\n\t\tN=min(a,x[i]);\n\t\ta-=N;\n\t\tx[i]-=N;\n\t\tc+=N;\n\t}\n\tN=min(a,rest\/2);\n\ta-=N;\n\trest-=2*N;\n\tfor(int i=1;i<=k;++i){\n\t\tif(!b) break;\n\t\tN=min(b,x[i]);\n\t\tb-=N;\n\t\tx[i]-=N;\n\t}\n\tN=min(b,rest);\n\tb-=N;\n\trest-=N;\n\tfor(int i=1;i<=k;++i){\n\t\tif(!c) break;\n\t\tN=min(c,2*x[i]);\n\t\tc-=N;\n\t\tx[i]-=N\/2;\n\t\tif(N%2==1) rest++;\n\t}\n\tN=min(c,rest);\n\tc-=N;\n\trest-=N;\n\tfor(int i=1;i<=k;++i){\n\t\tif(x[i]) {\n\t\t\tputs(\"NO\");\n\t\t\texit(0);\n\t\t}\n\t}\n\tif(rest) {\n\t\tputs(\"NO\");\n\t\texit(0);\n\t}\n\tputs(\"YES\");\n\treturn 0;\n}\n","sample_outputs":"[\"YES\", \"NO\", \"YES\", \"YES\"]","lang_cluster":"C++","notes":"NoteIn the first sample, Daenerys can place the soldiers like in the figure below: In the second sample, there is no way to place the soldiers in the plane since the second group soldier will always have a seat neighboring to someone from the first group.In the third example Daenerys can place the first group on seats (1,\u20092,\u20097,\u20098), and the second group an all the remaining seats.In the fourth example she can place the first two groups on seats (1,\u20092) and (7,\u20098), the third group on seats (3), and the fourth group on seats (5,\u20096).","output_specification":"If we can place the soldiers in the airplane print \"YES\" (without quotes). Otherwise print \"NO\" (without quotes). You can choose the case (lower or upper) for each letter arbitrary.","description":"Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. She has recently bought an airplane to carry her army through the sea. The airplane has n rows, each of them has 8 seats. We call two seats neighbor, if they are in the same row and in seats {1,\u20092}, {3,\u20094}, {4,\u20095}, {5,\u20096} or {7,\u20098}. A row in the airplane Daenerys Targaryen wants to place her army in the plane so that there are no two soldiers from different groups sitting on neighboring seats.Your task is to determine if there is a possible arranging of her army in the airplane such that the condition above is satisfied.","human_testcases":"[{\"input\": \"2 2\\r\\n5 8\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n7 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2\\r\\n4 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9938\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 15\\r\\n165 26 83 64 235 48 36 51 3 18 5 10 9 6 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5691 91\\r\\n6573 1666 2158 2591 4636 886 263 4217 389 29 1513 1172 617 2012 1855 798 1588 979 152 37 890 375 1091 839 385 382 1 255 117 289 119 224 182 69 19 71 115 13 4 22 35 2 60 12 6 12 19 9 3 2 2 6 5 1 7 7 3 1 5 1 7 1 4 1 1 3 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5631\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2000 50\\r\\n203 89 1359 3105 898 1381 248 365 108 766 961 630 265 819 838 125 1751 289 177 81 131 564 102 95 49 74 92 101 19 17 156 5 5 4 20 9 25 16 16 2 8 5 4 2 1 3 4 1 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 100\\r\\n800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 2050 1074 605 979 1724 1608 672 88 1243 129 718 544 3590 37 187 600 738 34 64 316 58 6 84 252 75 68 40 68 4 29 29 8 13 11 5 1 5 1 3 2 1 1 1 2 3 4 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"8459 91\\r\\n778 338 725 1297 115 540 1452 2708 193 1806 1496 1326 2648 176 199 93 342 3901 2393 2718 800 3434 657 4037 291 690 1957 3280 73 6011 2791 1987 440 455 444 155 261 234 829 1309 1164 616 34 627 107 213 52 110 323 81 98 8 7 73 20 12 56 3 40 12 8 7 69 1 14 3 6 2 6 8 3 5 4 4 3 1 1 4 2 1 1 1 8 2 2 2 1 1 1 2 8421\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 91\\r\\n2351 1402 1137 2629 4718 1138 1839 1339 2184 2387 165 370 918 1476 2717 879 1152 5367 3940 608 941 766 1256 656 2768 916 4176 489 1989 1633 2725 2329 2795 1970 667 340 1275 120 870 488 225 59 64 255 207 3 37 127 19 224 34 283 144 50 132 60 57 29 18 6 7 4 4 15 3 5 1 10 5 2 3 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 9948\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 83\\r\\n64 612 2940 2274 1481 1713 860 1264 104 5616 2574 5292 4039 292 1416 854 3854 1140 4344 3904 1720 1968 442 884 2032 875 291 677 2780 3074 3043 2997 407 727 344 511 156 321 134 51 382 336 591 52 134 39 104 10 20 15 24 2 70 39 14 16 16 25 1 6 2 2 1 1 1 2 4 2 1 2 1 2 1 1 1 1 1 1 1 1 1 1 9968\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4000 71\\r\\n940 1807 57 715 532 212 3842 2180 2283 744 1453 800 1945 380 2903 293 633 391 2866 256 102 46 228 1099 434 210 244 14 27 4 63 53 3 9 36 25 1 12 2 14 12 28 2 28 8 5 11 8 2 3 6 4 1 1 1 3 2 1 1 1 2 2 1 1 1 1 1 2 1 1 3966\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3403 59\\r\\n1269 1612 453 795 1216 941 19 44 1796 324 2019 1397 651 382 841 2003 3013 638 1007 1001 351 95 394 149 125 13 116 183 20 78 208 19 152 10 151 177 16 23 17 22 8 1 3 2 6 1 5 3 13 1 8 4 3 4 4 4 2 2 3378\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2393 33\\r\\n1381 2210 492 3394 912 2927 1189 269 66 102 104 969 395 385 369 354 251 28 203 334 20 10 156 29 61 13 30 4 1 32 2 2 2436\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9939\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 89\\r\\n1001 1531 2489 457 1415 617 2057 2658 3030 789 2500 3420 1550 376 720 78 506 293 1978 383 3195 2036 891 1741 1817 486 2650 360 2250 2531 3250 1612 2759 603 5321 1319 791 1507 265 174 877 1861 572 172 580 536 777 165 169 11 125 31 186 113 78 27 25 37 8 21 48 24 4 33 35 13 15 1 3 2 2 8 3 5 1 1 6 1 1 2 1 1 2 2 1 1 2 1 9953\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 16\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 71\\r\\n110 14 2362 260 423 881 1296 3904 1664 849 57 631 1922 917 4832 1339 3398 4578 59 2663 2223 698 4002 3013 747 699 1230 2750 239 1409 6291 2133 1172 5824 181 797 26 281 574 557 19 82 624 387 278 53 64 163 22 617 15 35 42 48 14 140 171 36 28 22 5 49 17 5 10 14 13 1 3 3 9979\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3495 83\\r\\n2775 2523 1178 512 3171 1159 1382 2146 2192 1823 799 231 502 16 99 309 656 665 222 285 11 106 244 137 241 45 41 29 485 6 62 38 94 5 7 93 48 5 10 13 2 1 2 1 4 8 5 9 4 6 1 1 1 3 4 3 7 1 2 3 1 1 7 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 3443\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1000 40\\r\\n1701 1203 67 464 1884 761 11 559 29 115 405 133 174 63 147 93 41 19 1 15 41 8 33 4 4 1 4 1 1 2 1 2 1 1 2 1 1 2 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"347 20\\r\\n55 390 555 426 140 360 29 115 23 113 58 30 33 1 23 3 35 5 7 363\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9940\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 93\\r\\n1388 119 711 23 4960 4002 2707 188 813 1831 334 543 338 3402 1808 3368 1428 971 985 220 1521 457 457 140 332 1503 1539 2095 1891 269 5223 226 1528 190 428 5061 410 1587 1149 1934 2275 1337 1828 275 181 85 499 29 585 808 751 401 635 461 181 164 274 36 401 255 38 60 76 16 6 35 79 46 1 39 11 2 8 2 4 14 3 1 1 1 1 1 2 1 3 1 1 1 1 2 1 1 9948\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4981 51\\r\\n5364 2166 223 742 350 1309 15 229 4100 3988 227 1719 9 125 787 427 141 842 171 2519 32 2554 2253 721 775 88 720 9 397 513 100 291 111 32 238 42 152 108 5 58 96 53 7 19 11 2 5 5 6 2 4966\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"541 31\\r\\n607 204 308 298 398 213 1182 58 162 46 64 12 38 91 29 2 4 12 19 3 7 9 3 6 1 1 2 1 3 1 529\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\n6 129 61 6 87 104 45 28 3 35 2 14 1 37 2 4 24 4 3 1 6 4 2 1 1 3 1 2 2 9 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 4\\r\\n2 2 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 5\\r\\n8 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n2 2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n4 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n3 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 2 2 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 7\\r\\n12 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n4 1 3 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 15\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n6 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 13\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n1 1 1 4 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 8\\r\\n8 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n1 1 1 1 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 9\\r\\n2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 2 2 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\n6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 1\\r\\n16\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\n2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 2 2 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 16\\r\\n1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n4 1 1 1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 5 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1\\r\\n22\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 12\\r\\n2 1 2 2 2 1 2 2 2 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 6\\r\\n5 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20 100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n3 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 3 2 2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 1 1 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n3 3 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 12\\r\\n2 2 2 2 2 2 2 2 2 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 10\\r\\n2 2 2 2 2 2 2 2 2 3\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 2\\r\\n7 1\\r\\n', 'output': ['NO']}, {'input': '1 3\\r\\n3 2 2\\r\\n', 'output': ['YES']}, {'input': '10000 91\\r\\n2351 1402 1137 2629 4718 1138 1839 1339 2184 2387 165 370 918 1476 2717 879 1152 5367 3940 608 941 766 1256 656 2768 916 4176 489 1989 1633 2725 2329 2795 1970 667 340 1275 120 870 488 225 59 64 255 207 3 37 127 19 224 34 283 144 50 132 60 57 29 18 6 7 4 4 15 3 5 1 10 5 2 3 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 9948\\r\\n', 'output': ['YES']}, {'input': '2 2\\r\\n5 8\\r\\n', 'output': ['YES']}, {'input': '2000 50\\r\\n203 89 1359 3105 898 1381 248 365 108 766 961 630 265 819 838 125 1751 289 177 81 131 564 102 95 49 74 92 101 19 17 156 5 5 4 20 9 25 16 16 2 8 5 4 2 1 3 4 1 3 2\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '3403 59\\r\\n1269 1612 453 795 1216 941 19 44 1796 324 2019 1397 651 382 841 2003 3013 638 1007 1001 351 95 394 149 125 13 116 183 20 78 208 19 152 10 151 177 16 23 17 22 8 1 3 2 6 1 5 3 13 1 8 4 3 4 4 4 2 2 3378\\r\\n', 'output': ['YES']}, {'input': '3 12\\r\\n2 1 2 2 2 1 2 2 2 1 2 2\\r\\n', 'output': ['YES']}, {'input': '10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9939\\r\\n', 'output': ['NO']}, {'input': '2 6\\r\\n2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '10000 71\\r\\n110 14 2362 260 423 881 1296 3904 1664 849 57 631 1922 917 4832 1339 3398 4578 59 2663 2223 698 4002 3013 747 699 1230 2750 239 1409 6291 2133 1172 5824 181 797 26 281 574 557 19 82 624 387 278 53 64 163 22 617 15 35 42 48 14 140 171 36 28 22 5 49 17 5 10 14 13 1 3 3 9979\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '5691 91\\r\\n6573 1666 2158 2591 4636 886 263 4217 389 29 1513 1172 617 2012 1855 798 1588 979 152 37 890 375 1091 839 385 382 1 255 117 289 119 224 182 69 19 71 115 13 4 22 35 2 60 12 6 12 19 9 3 2 2 6 5 1 7 7 3 1 5 1 7 1 4 1 1 3 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5631\\r\\n', 'output': ['NO']}, {'input': '1000 40\\r\\n1701 1203 67 464 1884 761 11 559 29 115 405 133 174 63 147 93 41 19 1 15 41 8 33 4 4 1 4 1 1 2 1 2 1 1 2 1 1 2 1 4\\r\\n', 'output': ['NO']}, {'input': '1 4\\r\\n1 2 2 2\\r\\n', 'output': ['YES']}, {'input': '3 9\\r\\n2 2 2 2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '1 1\\r\\n2\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '1 1\\r\\n2\\r\\n', 'output': ['YES']}, {'input': '1 2\\r\\n4 4\\r\\n', 'output': ['YES']}, {'input': '2 6\\r\\n4 1 3 1 1 3\\r\\n', 'output': ['NO']}, {'input': '5 15\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '1 2\\r\\n6 2\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '2 6\\r\\n5 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '3 8\\r\\n8 2 2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '3 12\\r\\n2 1 2 2 2 1 2 2 2 1 2 2\\r\\n', 'output': ['YES']}, {'input': '1 4\\r\\n1 1 2 2\\r\\n', 'output': ['YES']}, {'input': '2 2\\r\\n5 8\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.92,"human_sample_line_coverage_2":95.92,"human_sample_line_coverage_3":95.92,"human_sample_line_coverage_4":95.92,"human_sample_line_coverage_5":91.84,"human_sample_branch_coverage_1":85.71,"human_sample_branch_coverage_2":85.71,"human_sample_branch_coverage_3":89.29,"human_sample_branch_coverage_4":89.29,"human_sample_branch_coverage_5":78.57,"id":194,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.104,"human_sample_branch_coverage":85.714} {"sample_inputs":"[\"tour\", \"Codeforces\", \"aBAcAba\"]","input_specification":"The first line represents input string of Petya's program. This string only consists of uppercase and lowercase Latin letters and its length is from 1 to 100, inclusive.","src_uid":"db9520e85b3e9186dd3a09ff8d1e8c1b","source_code":"#include \n#include \n \nchar str[101]; \n \nint main() \n{ \n scanf(\"%s\", str); \n int len = strlen(str); \n for (int i = 0; i < len; ++i) \n { \n if (str[i] < 'a') \n str[i] += 32; \n if (str[i] != 'a' && str[i] != 'e' && str[i] != 'i' && str[i] != 'o' && str[i] != 'u' && str[i] != 'y') \n printf(\".%c\", str[i]); \n } \n return 0; \n} \n \t \t \t\t\t\t \t \t \t","sample_outputs":"[\".t.r\", \".c.d.f.r.c.s\", \".b.c.b\"]","lang_cluster":"C++","notes":null,"output_specification":"Print the resulting string. It is guaranteed that this string is not empty.","description":"Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given string, consisting if uppercase and lowercase Latin letters, it: deletes all the vowels, inserts a character \".\" before each consonant, replaces all uppercase consonants with corresponding lowercase ones. Vowels are letters \"A\", \"O\", \"Y\", \"E\", \"U\", \"I\", and the rest are consonants. The program's input is exactly one string, it should return the output as a single string, resulting after the program's processing the initial string.Help Petya cope with this easy task.","human_testcases":"[{\"input\": \"tour\\r\\n\", \"output\": [\".t.r\"]}, {\"input\": \"Codeforces\\r\\n\", \"output\": [\".c.d.f.r.c.s\"]}, {\"input\": \"aBAcAba\\r\\n\", \"output\": [\".b.c.b\"]}, {\"input\": \"obn\\r\\n\", \"output\": [\".b.n\"]}, {\"input\": \"wpwl\\r\\n\", \"output\": [\".w.p.w.l\"]}, {\"input\": \"ggdvq\\r\\n\", \"output\": [\".g.g.d.v.q\"]}, {\"input\": \"pumesz\\r\\n\", \"output\": [\".p.m.s.z\"]}, {\"input\": \"g\\r\\n\", \"output\": [\".g\"]}, {\"input\": \"zjuotps\\r\\n\", \"output\": [\".z.j.t.p.s\"]}, {\"input\": \"jzbwuehe\\r\\n\", \"output\": [\".j.z.b.w.h\"]}, {\"input\": \"tnkgwuugu\\r\\n\", \"output\": [\".t.n.k.g.w.g\"]}, {\"input\": \"kincenvizh\\r\\n\", \"output\": [\".k.n.c.n.v.z.h\"]}, {\"input\": \"xattxjenual\\r\\n\", \"output\": [\".x.t.t.x.j.n.l\"]}, {\"input\": \"ktajqhpqsvhw\\r\\n\", \"output\": [\".k.t.j.q.h.p.q.s.v.h.w\"]}, {\"input\": \"xnhcigytnqcmy\\r\\n\", \"output\": [\".x.n.h.c.g.t.n.q.c.m\"]}, {\"input\": \"jfmtbejyilxcec\\r\\n\", \"output\": [\".j.f.m.t.b.j.l.x.c.c\"]}, {\"input\": \"D\\r\\n\", \"output\": [\".d\"]}, {\"input\": \"ab\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"Ab\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"aB\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"AB\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"ba\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"bA\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"Ba\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"BA\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"aab\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"baa\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"femOZeCArKCpUiHYnbBPTIOFmsHmcpObtPYcLCdjFrUMIyqYzAokKUiiKZRouZiNMoiOuGVoQzaaCAOkquRjmmKKElLNqCnhGdQM\\r\\n\", \"output\": [\".f.m.z.c.r.k.c.p.h.n.b.b.p.t.f.m.s.h.m.c.p.b.t.p.c.l.c.d.j.f.r.m.q.z.k.k.k.z.r.z.n.m.g.v.q.z.c.k.q.r.j.m.m.k.k.l.l.n.q.c.n.h.g.d.q.m\"]}, {\"input\": \"VMBPMCmMDCLFELLIISUJDWQRXYRDGKMXJXJHXVZADRZWVWJRKFRRNSAWKKDPZZLFLNSGUNIVJFBEQsMDHSBJVDTOCSCgZWWKvZZN\\r\\n\", \"output\": [\".v.m.b.p.m.c.m.m.d.c.l.f.l.l.s.j.d.w.q.r.x.r.d.g.k.m.x.j.x.j.h.x.v.z.d.r.z.w.v.w.j.r.k.f.r.r.n.s.w.k.k.d.p.z.z.l.f.l.n.s.g.n.v.j.f.b.q.s.m.d.h.s.b.j.v.d.t.c.s.c.g.z.w.w.k.v.z.z.n\"]}, {\"input\": \"MCGFQQJNUKuAEXrLXibVjClSHjSxmlkQGTKZrRaDNDomIPOmtSgjJAjNVIVLeUGUAOHNkCBwNObVCHOWvNkLFQQbFnugYVMkJruJ\\r\\n\", \"output\": [\".m.c.g.f.q.q.j.n.k.x.r.l.x.b.v.j.c.l.s.h.j.s.x.m.l.k.q.g.t.k.z.r.r.d.n.d.m.p.m.t.s.g.j.j.j.n.v.v.l.g.h.n.k.c.b.w.n.b.v.c.h.w.v.n.k.l.f.q.q.b.f.n.g.v.m.k.j.r.j\"]}, {\"input\": \"iyaiuiwioOyzUaOtAeuEYcevvUyveuyioeeueoeiaoeiavizeeoeyYYaaAOuouueaUioueauayoiuuyiuovyOyiyoyioaoyuoyea\\r\\n\", \"output\": [\".w.z.t.c.v.v.v.v.z.v\"]}, {\"input\": \"yjnckpfyLtzwjsgpcrgCfpljnjwqzgVcufnOvhxplvflxJzqxnhrwgfJmPzifgubvspffmqrwbzivatlmdiBaddiaktdsfPwsevl\\r\\n\", \"output\": [\".j.n.c.k.p.f.l.t.z.w.j.s.g.p.c.r.g.c.f.p.l.j.n.j.w.q.z.g.v.c.f.n.v.h.x.p.l.v.f.l.x.j.z.q.x.n.h.r.w.g.f.j.m.p.z.f.g.b.v.s.p.f.f.m.q.r.w.b.z.v.t.l.m.d.b.d.d.k.t.d.s.f.p.w.s.v.l\"]}, {\"input\": \"RIIIUaAIYJOiuYIUWFPOOAIuaUEZeIooyUEUEAoIyIHYOEAlVAAIiLUAUAeiUIEiUMuuOiAgEUOIAoOUYYEYFEoOIIVeOOAOIIEg\\r\\n\", \"output\": [\".r.j.w.f.p.z.h.l.v.l.m.g.f.v.g\"]}, {\"input\": \"VBKQCFBMQHDMGNSGBQVJTGQCNHHRJMNKGKDPPSQRRVQTZNKBZGSXBPBRXPMVFTXCHZMSJVBRNFNTHBHGJLMDZJSVPZZBCCZNVLMQ\\r\\n\", \"output\": [\".v.b.k.q.c.f.b.m.q.h.d.m.g.n.s.g.b.q.v.j.t.g.q.c.n.h.h.r.j.m.n.k.g.k.d.p.p.s.q.r.r.v.q.t.z.n.k.b.z.g.s.x.b.p.b.r.x.p.m.v.f.t.x.c.h.z.m.s.j.v.b.r.n.f.n.t.h.b.h.g.j.l.m.d.z.j.s.v.p.z.z.b.c.c.z.n.v.l.m.q\"]}, {\"input\": \"iioyoaayeuyoolyiyoeuouiayiiuyTueyiaoiueyioiouyuauouayyiaeoeiiigmioiououeieeeyuyyaYyioiiooaiuouyoeoeg\\r\\n\", \"output\": [\".l.t.g.m.g\"]}, {\"input\": \"ueyiuiauuyyeueykeioouiiauzoyoeyeuyiaoaiiaaoaueyaeydaoauexuueafouiyioueeaaeyoeuaueiyiuiaeeayaioeouiuy\\r\\n\", \"output\": [\".k.z.d.x.f\"]}, {\"input\": \"FSNRBXLFQHZXGVMKLQDVHWLDSLKGKFMDRQWMWSSKPKKQBNDZRSCBLRSKCKKFFKRDMZFZGCNSMXNPMZVDLKXGNXGZQCLRTTDXLMXQ\\r\\n\", \"output\": [\".f.s.n.r.b.x.l.f.q.h.z.x.g.v.m.k.l.q.d.v.h.w.l.d.s.l.k.g.k.f.m.d.r.q.w.m.w.s.s.k.p.k.k.q.b.n.d.z.r.s.c.b.l.r.s.k.c.k.k.f.f.k.r.d.m.z.f.z.g.c.n.s.m.x.n.p.m.z.v.d.l.k.x.g.n.x.g.z.q.c.l.r.t.t.d.x.l.m.x.q\"]}, {\"input\": \"EYAYAYIOIOYOOAUOEUEUOUUYIYUUMOEOIIIAOIUOAAOIYOIOEUIERCEYYAOIOIGYUIAOYUEOEUAEAYPOYEYUUAUOAOEIYIEYUEEY\\r\\n\", \"output\": [\".m.r.c.g.p\"]}, {\"input\": \"jvvzcdcxjstbbksmqjsngxkgtttdxrljjxtwptgwwqzpvqchvgrkqlzxmptzblxhhsmrkmzzmgdfskhtmmnqzzflpmqdctvrfgtx\\r\\n\", \"output\": [\".j.v.v.z.c.d.c.x.j.s.t.b.b.k.s.m.q.j.s.n.g.x.k.g.t.t.t.d.x.r.l.j.j.x.t.w.p.t.g.w.w.q.z.p.v.q.c.h.v.g.r.k.q.l.z.x.m.p.t.z.b.l.x.h.h.s.m.r.k.m.z.z.m.g.d.f.s.k.h.t.m.m.n.q.z.z.f.l.p.m.q.d.c.t.v.r.f.g.t.x\"]}, {\"input\": \"YB\\r\\n\", \"output\": [\".b\"]}, {\"input\": \"fly\\r\\n\", \"output\": [\".f.l\"]}, {\"input\": \"YyyYYYyyYxdwdawdDAWDdaddYYYY\\r\\n\", \"output\": [\".x.d.w.d.w.d.d.w.d.d.d.d\"]}, {\"input\": \"SDTFZPLMKFLZGTRPLMQVHTMCDFWPKZNZMHQDSWZKBZFFWZVJKGNDHRBGTVGKNCQRVFCXPSNBVVBGQNVN\\r\\n\", \"output\": [\".s.d.t.f.z.p.l.m.k.f.l.z.g.t.r.p.l.m.q.v.h.t.m.c.d.f.w.p.k.z.n.z.m.h.q.d.s.w.z.k.b.z.f.f.w.z.v.j.k.g.n.d.h.r.b.g.t.v.g.k.n.c.q.r.v.f.c.x.p.s.n.b.v.v.b.g.q.n.v.n\"]}, {\"input\": \"QKFSVTNJRDJGLWTHXHWRNVFHFSCSGWTCNBVBXVWDBMZPLGWFKXNLJMGTGFHQJTZZRBVSZDTHZWJSFWRNZV\\r\\n\", \"output\": [\".q.k.f.s.v.t.n.j.r.d.j.g.l.w.t.h.x.h.w.r.n.v.f.h.f.s.c.s.g.w.t.c.n.b.v.b.x.v.w.d.b.m.z.p.l.g.w.f.k.x.n.l.j.m.g.t.g.f.h.q.j.t.z.z.r.b.v.s.z.d.t.h.z.w.j.s.f.w.r.n.z.v\"]}, {\"input\": \"MFZHRXPFZCQWHKGJLBDNGWWNGSQJNSCGPSPJSLDXZZGPPVKBZGNSKGLJHCKVFNJGNHPPLFBZMPHFSRXMPHBN\\r\\n\", \"output\": [\".m.f.z.h.r.x.p.f.z.c.q.w.h.k.g.j.l.b.d.n.g.w.w.n.g.s.q.j.n.s.c.g.p.s.p.j.s.l.d.x.z.z.g.p.p.v.k.b.z.g.n.s.k.g.l.j.h.c.k.v.f.n.j.g.n.h.p.p.l.f.b.z.m.p.h.f.s.r.x.m.p.h.b.n\"]}, {\"input\": \"KBTTNSRZRBNDMMSBZVKKMZPDHHTNKQJXPMTGXLBJZLBZDLVWBWPPLLZMKBLQBGRMLDXKGQHQQRQRWBTMTRTBWM\\r\\n\", \"output\": [\".k.b.t.t.n.s.r.z.r.b.n.d.m.m.s.b.z.v.k.k.m.z.p.d.h.h.t.n.k.q.j.x.p.m.t.g.x.l.b.j.z.l.b.z.d.l.v.w.b.w.p.p.l.l.z.m.k.b.l.q.b.g.r.m.l.d.x.k.g.q.h.q.q.r.q.r.w.b.t.m.t.r.t.b.w.m\"]}, {\"input\": \"HWPJKXTVZXLJSPGCMPQGSLWKXGJDHMPCQFNDCLWDXXWZHRXSQPPWMFFBLXNWGXZTHKQFRBXJSJPPLVQMXDZWLBWC\\r\\n\", \"output\": [\".h.w.p.j.k.x.t.v.z.x.l.j.s.p.g.c.m.p.q.g.s.l.w.k.x.g.j.d.h.m.p.c.q.f.n.d.c.l.w.d.x.x.w.z.h.r.x.s.q.p.p.w.m.f.f.b.l.x.n.w.g.x.z.t.h.k.q.f.r.b.x.j.s.j.p.p.l.v.q.m.x.d.z.w.l.b.w.c\"]}, {\"input\": \"SJMBDQJRZGCFHRVKQCTGTJJQSMWVVBFSJVHKLLWBNRTNXJXXMLLVVZJZNLLXLPJWQSXKKWGWCMHVFPHMDRHMZPQHGQ\\r\\n\", \"output\": [\".s.j.m.b.d.q.j.r.z.g.c.f.h.r.v.k.q.c.t.g.t.j.j.q.s.m.w.v.v.b.f.s.j.v.h.k.l.l.w.b.n.r.t.n.x.j.x.x.m.l.l.v.v.z.j.z.n.l.l.x.l.p.j.w.q.s.x.k.k.w.g.w.c.m.h.v.f.p.h.m.d.r.h.m.z.p.q.h.g.q\"]}, {\"input\": \"MSPPDBGPBTFRCQBSSJXCNXZLCTDPBGJCCJDJNSZVVDFNKBBZKVLQXJHQMQBXHTMRKRSLGZVRFCTBWJWNBTPQLQLCFHNK\\r\\n\", \"output\": [\".m.s.p.p.d.b.g.p.b.t.f.r.c.q.b.s.s.j.x.c.n.x.z.l.c.t.d.p.b.g.j.c.c.j.d.j.n.s.z.v.v.d.f.n.k.b.b.z.k.v.l.q.x.j.h.q.m.q.b.x.h.t.m.r.k.r.s.l.g.z.v.r.f.c.t.b.w.j.w.n.b.t.p.q.l.q.l.c.f.h.n.k\"]}, {\"input\": \"GSSMNBNMDZXFMGVDFFDJSXQGKCZJRKXLVMZWCBDQCNPNGSDPWWCMKRRHKWRNDJRVDQNNMDBMWRRRDSCNXXVTMRFHDXZKWW\\r\\n\", \"output\": [\".g.s.s.m.n.b.n.m.d.z.x.f.m.g.v.d.f.f.d.j.s.x.q.g.k.c.z.j.r.k.x.l.v.m.z.w.c.b.d.q.c.n.p.n.g.s.d.p.w.w.c.m.k.r.r.h.k.w.r.n.d.j.r.v.d.q.n.n.m.d.b.m.w.r.r.r.d.s.c.n.x.x.v.t.m.r.f.h.d.x.z.k.w.w\"]}, {\"input\": \"PDLBZLWTVPBBWGCMRLWFMMRBDTFCHFMTPZGVFJWTZPZCBLGPTHRRWBRWJCRNXNVBHQTQJHQQZHFHVMRXHBCMWSXNCPBTFFFZ\\r\\n\", \"output\": [\".p.d.l.b.z.l.w.t.v.p.b.b.w.g.c.m.r.l.w.f.m.m.r.b.d.t.f.c.h.f.m.t.p.z.g.v.f.j.w.t.z.p.z.c.b.l.g.p.t.h.r.r.w.b.r.w.j.c.r.n.x.n.v.b.h.q.t.q.j.h.q.q.z.h.f.h.v.m.r.x.h.b.c.m.w.s.x.n.c.p.b.t.f.f.f.z\"]}, {\"input\": \"JDPZZLTQXFDNSFWVFRBBGCJVMCBVWJRDJCCKSQBPGBTCMDSGHRHNKKRNQHJNTRBFBPPRPKGLRXSWMGHXFDTQJSRJBFMTWMFRWJ\\r\\n\", \"output\": [\".j.d.p.z.z.l.t.q.x.f.d.n.s.f.w.v.f.r.b.b.g.c.j.v.m.c.b.v.w.j.r.d.j.c.c.k.s.q.b.p.g.b.t.c.m.d.s.g.h.r.h.n.k.k.r.n.q.h.j.n.t.r.b.f.b.p.p.r.p.k.g.l.r.x.s.w.m.g.h.x.f.d.t.q.j.s.r.j.b.f.m.t.w.m.f.r.w.j\"]}, {\"input\": \"GSFSDNNTRGXKGPGNJBWCMSMCNHSMFWMNGGXLPTJXZDSNMLJNSXQDGLLJBMJJQGPXGGQGPHBQPNHJSFPBQKMZLTWCSKKQSDCCXJTW\\r\\n\", \"output\": [\".g.s.f.s.d.n.n.t.r.g.x.k.g.p.g.n.j.b.w.c.m.s.m.c.n.h.s.m.f.w.m.n.g.g.x.l.p.t.j.x.z.d.s.n.m.l.j.n.s.x.q.d.g.l.l.j.b.m.j.j.q.g.p.x.g.g.q.g.p.h.b.q.p.n.h.j.s.f.p.b.q.k.m.z.l.t.w.c.s.k.k.q.s.d.c.c.x.j.t.w\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'Ab\\r\\n', 'output': ['.b']}, {'input': 'YB\\r\\n', 'output': ['.b']}, {'input': 'jvvzcdcxjstbbksmqjsngxkgtttdxrljjxtwptgwwqzpvqchvgrkqlzxmptzblxhhsmrkmzzmgdfskhtmmnqzzflpmqdctvrfgtx\\r\\n', 'output': ['.j.v.v.z.c.d.c.x.j.s.t.b.b.k.s.m.q.j.s.n.g.x.k.g.t.t.t.d.x.r.l.j.j.x.t.w.p.t.g.w.w.q.z.p.v.q.c.h.v.g.r.k.q.l.z.x.m.p.t.z.b.l.x.h.h.s.m.r.k.m.z.z.m.g.d.f.s.k.h.t.m.m.n.q.z.z.f.l.p.m.q.d.c.t.v.r.f.g.t.x']}, {'input': 'JDPZZLTQXFDNSFWVFRBBGCJVMCBVWJRDJCCKSQBPGBTCMDSGHRHNKKRNQHJNTRBFBPPRPKGLRXSWMGHXFDTQJSRJBFMTWMFRWJ\\r\\n', 'output': ['.j.d.p.z.z.l.t.q.x.f.d.n.s.f.w.v.f.r.b.b.g.c.j.v.m.c.b.v.w.j.r.d.j.c.c.k.s.q.b.p.g.b.t.c.m.d.s.g.h.r.h.n.k.k.r.n.q.h.j.n.t.r.b.f.b.p.p.r.p.k.g.l.r.x.s.w.m.g.h.x.f.d.t.q.j.s.r.j.b.f.m.t.w.m.f.r.w.j']}, {'input': 'SDTFZPLMKFLZGTRPLMQVHTMCDFWPKZNZMHQDSWZKBZFFWZVJKGNDHRBGTVGKNCQRVFCXPSNBVVBGQNVN\\r\\n', 'output': ['.s.d.t.f.z.p.l.m.k.f.l.z.g.t.r.p.l.m.q.v.h.t.m.c.d.f.w.p.k.z.n.z.m.h.q.d.s.w.z.k.b.z.f.f.w.z.v.j.k.g.n.d.h.r.b.g.t.v.g.k.n.c.q.r.v.f.c.x.p.s.n.b.v.v.b.g.q.n.v.n']}]","human_sample_testcases_2":"[{'input': 'pumesz\\r\\n', 'output': ['.p.m.s.z']}, {'input': 'iioyoaayeuyoolyiyoeuouiayiiuyTueyiaoiueyioiouyuauouayyiaeoeiiigmioiououeieeeyuyyaYyioiiooaiuouyoeoeg\\r\\n', 'output': ['.l.t.g.m.g']}, {'input': 'jfmtbejyilxcec\\r\\n', 'output': ['.j.f.m.t.b.j.l.x.c.c']}, {'input': 'SDTFZPLMKFLZGTRPLMQVHTMCDFWPKZNZMHQDSWZKBZFFWZVJKGNDHRBGTVGKNCQRVFCXPSNBVVBGQNVN\\r\\n', 'output': ['.s.d.t.f.z.p.l.m.k.f.l.z.g.t.r.p.l.m.q.v.h.t.m.c.d.f.w.p.k.z.n.z.m.h.q.d.s.w.z.k.b.z.f.f.w.z.v.j.k.g.n.d.h.r.b.g.t.v.g.k.n.c.q.r.v.f.c.x.p.s.n.b.v.v.b.g.q.n.v.n']}, {'input': 'BA\\r\\n', 'output': ['.b']}]","human_sample_testcases_3":"[{'input': 'bA\\r\\n', 'output': ['.b']}, {'input': 'D\\r\\n', 'output': ['.d']}, {'input': 'YB\\r\\n', 'output': ['.b']}, {'input': 'ktajqhpqsvhw\\r\\n', 'output': ['.k.t.j.q.h.p.q.s.v.h.w']}, {'input': 'QKFSVTNJRDJGLWTHXHWRNVFHFSCSGWTCNBVBXVWDBMZPLGWFKXNLJMGTGFHQJTZZRBVSZDTHZWJSFWRNZV\\r\\n', 'output': ['.q.k.f.s.v.t.n.j.r.d.j.g.l.w.t.h.x.h.w.r.n.v.f.h.f.s.c.s.g.w.t.c.n.b.v.b.x.v.w.d.b.m.z.p.l.g.w.f.k.x.n.l.j.m.g.t.g.f.h.q.j.t.z.z.r.b.v.s.z.d.t.h.z.w.j.s.f.w.r.n.z.v']}]","human_sample_testcases_4":"[{'input': 'MFZHRXPFZCQWHKGJLBDNGWWNGSQJNSCGPSPJSLDXZZGPPVKBZGNSKGLJHCKVFNJGNHPPLFBZMPHFSRXMPHBN\\r\\n', 'output': ['.m.f.z.h.r.x.p.f.z.c.q.w.h.k.g.j.l.b.d.n.g.w.w.n.g.s.q.j.n.s.c.g.p.s.p.j.s.l.d.x.z.z.g.p.p.v.k.b.z.g.n.s.k.g.l.j.h.c.k.v.f.n.j.g.n.h.p.p.l.f.b.z.m.p.h.f.s.r.x.m.p.h.b.n']}, {'input': 'obn\\r\\n', 'output': ['.b.n']}, {'input': 'tour\\r\\n', 'output': ['.t.r']}, {'input': 'QKFSVTNJRDJGLWTHXHWRNVFHFSCSGWTCNBVBXVWDBMZPLGWFKXNLJMGTGFHQJTZZRBVSZDTHZWJSFWRNZV\\r\\n', 'output': ['.q.k.f.s.v.t.n.j.r.d.j.g.l.w.t.h.x.h.w.r.n.v.f.h.f.s.c.s.g.w.t.c.n.b.v.b.x.v.w.d.b.m.z.p.l.g.w.f.k.x.n.l.j.m.g.t.g.f.h.q.j.t.z.z.r.b.v.s.z.d.t.h.z.w.j.s.f.w.r.n.z.v']}, {'input': 'tnkgwuugu\\r\\n', 'output': ['.t.n.k.g.w.g']}]","human_sample_testcases_5":"[{'input': 'obn\\r\\n', 'output': ['.b.n']}, {'input': 'Codeforces\\r\\n', 'output': ['.c.d.f.r.c.s']}, {'input': 'Ab\\r\\n', 'output': ['.b']}, {'input': 'SDTFZPLMKFLZGTRPLMQVHTMCDFWPKZNZMHQDSWZKBZFFWZVJKGNDHRBGTVGKNCQRVFCXPSNBVVBGQNVN\\r\\n', 'output': ['.s.d.t.f.z.p.l.m.k.f.l.z.g.t.r.p.l.m.q.v.h.t.m.c.d.f.w.p.k.z.n.z.m.h.q.d.s.w.z.k.b.z.f.f.w.z.v.j.k.g.n.d.h.r.b.g.t.v.g.k.n.c.q.r.v.f.c.x.p.s.n.b.v.v.b.g.q.n.v.n']}, {'input': 'AB\\r\\n', 'output': ['.b']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":81.25,"id":195,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":81.25} {"sample_inputs":"[\"4\\n6 5\\n16 13\\n61690850361 24777622630\\n34 33\"]","input_specification":"The first line contains a number $$$t$$$\u00a0($$$1 \\leq t \\leq 5$$$)\u00a0\u2014 the number of test cases. Each of the next $$$t$$$ lines describes the $$$i$$$-th test case. It contains two integers $$$a$$$ and $$$b~(1 \\leq b < a \\leq 10^{11})$$$\u00a0\u2014 the side length of Alice's square and the side length of the square that Bob wants.","src_uid":"5a052e4e6c64333d94c83df890b1183c","source_code":"#include\nusing namespace std;\nint T;\nlong long a,b;\n\/*long long cf(long long x,long long n,long long p)\n{\n if(!n) return 1;\n long long ans=cf(x,n\/2,p);\n ans=(ans%p)*(ans%p);\n if(n%2) ans=((ans%p)*(x%p))%p;\n return ans%p;\n}\nbool miller_rabin(long long n)\n{\n long long i,j,aa,x,y,t,u,s=10;\n if(n==2) return true;\n if(n<2||!(n&1)) return false;\n for(t=0,u=n-1;!(u&1);t++,u>>=1);\n for(i=0;i>T;\n while(T--){\n cin>>a>>b;\n if(a<=(b+1)){\n if(is_prime(a+b)) printf(\"YES\\n\");\n else printf(\"NO\\n\");\n }\n else printf(\"NO\\n\");\n }\n return 0;\n}","sample_outputs":"[\"YES\\nNO\\nNO\\nYES\"]","lang_cluster":"C++","notes":"NoteThe figure below depicts the first test case. The blue part corresponds to the piece which belongs to Bob, and the red part is the piece that Alice keeps for herself. The area of the red part is $$$6^2 - 5^2 = 36 - 25 = 11$$$, which is prime, so the answer is \"YES\". In the second case, the area is $$$16^2 - 13^2 = 87$$$, which is divisible by $$$3$$$. In the third case, the area of the remaining piece is $$$61690850361^2 - 24777622630^2 = 3191830435068605713421$$$. This number is not prime because $$$3191830435068605713421 = 36913227731 \\cdot 86468472991 $$$.In the last case, the area is $$$34^2 - 33^2 = 67$$$.","output_specification":"Print $$$t$$$ lines, where the $$$i$$$-th line is the answer to the $$$i$$$-th test case. Print \"YES\" (without quotes) if the area of the remaining piece of cloth is prime, otherwise print \"NO\". You can print each letter in an arbitrary case (upper or lower).","description":"Alice has a lovely piece of cloth. It has the shape of a square with a side of length $$$a$$$ centimeters. Bob also wants such piece of cloth. He would prefer a square with a side of length $$$b$$$ centimeters (where $$$b < a$$$). Alice wanted to make Bob happy, so she cut the needed square out of the corner of her piece and gave it to Bob. Now she is left with an ugly L shaped cloth (see pictures below).Alice would like to know whether the area of her cloth expressed in square centimeters is prime. Could you help her to determine it?","human_testcases":"[{\"input\": \"4\\r\\n6 5\\r\\n16 13\\r\\n61690850361 24777622630\\r\\n34 33\\r\\n\", \"output\": [\"yes\\r\\nno\\r\\nno\\r\\nyes\", \"YES\\r\\nNO\\r\\nNO\\r\\nYES\"]}, {\"input\": \"5\\r\\n160 159\\r\\n223 222\\r\\n480 479\\r\\n357 356\\r\\n345 344\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n631 582\\r\\n201 106\\r\\n780 735\\r\\n608 528\\r\\n470 452\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n2 1\\r\\n3 1\\r\\n4 1\\r\\n5 1\\r\\n8 7\\r\\n\", \"output\": [\"yes\\r\\nno\\r\\nno\\r\\nno\\r\\nno\", \"YES\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\"]}, {\"input\": \"5\\r\\n2187 2186\\r\\n517 516\\r\\n3235 3234\\r\\n4810 4809\\r\\n3076 3075\\r\\n\", \"output\": [\"yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes\", \"YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n40957587394 40957587393\\r\\n46310781841 46310781840\\r\\n21618631676 21618631675\\r\\n17162988704 17162988703\\r\\n16831085306 16831085305\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n35838040099 35838040098\\r\\n26612022790 26612022789\\r\\n23649629085 23649629084\\r\\n17783940691 17783940690\\r\\n31547284201 31547284200\\r\\n\", \"output\": [\"yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes\", \"YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n45967567181 17972496150\\r\\n96354194442 71676080197\\r\\n66915115533 22181324318\\r\\n62275223621 22258625262\\r\\n92444726334 84313947726\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n77734668390 12890100149\\r\\n62903604396 24274903133\\r\\n22822672980 7380491861\\r\\n50311650674 7380960075\\r\\n63911598474 3692382643\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n21 20\\r\\n48 47\\r\\n59140946515 26225231058\\r\\n78 38\\r\\n31 30\\r\\n\", \"output\": [\"YES\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nYES\", \"yes\\r\\nno\\r\\nno\\r\\nno\\r\\nyes\"]}, {\"input\": \"5\\r\\n529 169\\r\\n232 231\\r\\n283 282\\r\\n217 216\\r\\n34310969148 14703433301\\r\\n\", \"output\": [\"NO\\r\\nYES\\r\\nNO\\r\\nYES\\r\\nNO\", \"no\\r\\nyes\\r\\nno\\r\\nyes\\r\\nno\"]}, {\"input\": \"1\\r\\n100000000000 99999999999\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5\\r\\n8680 4410\\r\\n59011181086 3472811643\\r\\n770 769\\r\\n1911 1910\\r\\n3615 3614\\r\\n\", \"output\": [\"no\\r\\nno\\r\\nno\\r\\nyes\\r\\nyes\", \"NO\\r\\nNO\\r\\nNO\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n62903604396 24274903133\\r\\n37198 37197\\r\\n16929 16928\\r\\n38325 38324\\r\\n49905 33035\\r\\n\", \"output\": [\"no\\r\\nno\\r\\nyes\\r\\nyes\\r\\nno\", \"NO\\r\\nNO\\r\\nYES\\r\\nYES\\r\\nNO\"]}, {\"input\": \"5\\r\\n5 4\\r\\n7 6\\r\\n4 3\\r\\n4 1\\r\\n9 8\\r\\n\", \"output\": [\"NO\\r\\nYES\\r\\nYES\\r\\nNO\\r\\nYES\", \"no\\r\\nyes\\r\\nyes\\r\\nno\\r\\nyes\"]}, {\"input\": \"5\\r\\n497334 497333\\r\\n437006 437005\\r\\n88531320027 6466043806\\r\\n863754 694577\\r\\n151084 151083\\r\\n\", \"output\": [\"YES\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nYES\", \"yes\\r\\nno\\r\\nno\\r\\nno\\r\\nyes\"]}, {\"input\": \"5\\r\\n4606204 4606203\\r\\n1620972 1620971\\r\\n67109344913 14791364910\\r\\n8894157 3383382\\r\\n4110450 4110449\\r\\n\", \"output\": [\"NO\\r\\nYES\\r\\nNO\\r\\nNO\\r\\nYES\", \"no\\r\\nyes\\r\\nno\\r\\nno\\r\\nyes\"]}, {\"input\": \"5\\r\\n24095027715 9551467282\\r\\n34945375 34945374\\r\\n16603803 16603802\\r\\n58997777 26551505\\r\\n39762660 39762659\\r\\n\", \"output\": [\"NO\\r\\nYES\\r\\nNO\\r\\nNO\\r\\nYES\", \"no\\r\\nyes\\r\\nno\\r\\nno\\r\\nyes\"]}, {\"input\": \"5\\r\\n313997256 313997255\\r\\n224581770 224581769\\r\\n549346780 476752290\\r\\n60559465837 28745119200\\r\\n274287972 274287971\\r\\n\", \"output\": [\"YES\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nYES\", \"yes\\r\\nno\\r\\nno\\r\\nno\\r\\nyes\"]}, {\"input\": \"2\\r\\n10 9\\r\\n3 2\\r\\n\", \"output\": [\"yes\\r\\nyes\", \"YES\\r\\nYES\"]}, {\"input\": \"5\\r\\n31125459810 8334535873\\r\\n3439858310 3439858309\\r\\n9242031363 5238155938\\r\\n1025900247 1025900246\\r\\n3754943269 3754943268\\r\\n\", \"output\": [\"no\\r\\nno\\r\\nno\\r\\nyes\\r\\nyes\", \"NO\\r\\nNO\\r\\nNO\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n81271189833 16089352976\\r\\n98451628984 76827432884\\r\\n19327420986 19327420985\\r\\n15702367716 15702367715\\r\\n49419997643 49419997642\\r\\n\", \"output\": [\"no\\r\\nno\\r\\nyes\\r\\nyes\\r\\nno\", \"NO\\r\\nNO\\r\\nYES\\r\\nYES\\r\\nNO\"]}, {\"input\": \"5\\r\\n41024865848 173372595\\r\\n60687612551 33296061228\\r\\n64391844305 16241932104\\r\\n81009941361 1976380712\\r\\n58548577555 28344963216\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n18975453681 18975453680\\r\\n33749667489 33749667488\\r\\n32212198515 32212198514\\r\\n39519664171 39519664170\\r\\n5846685141 5846685140\\r\\n\", \"output\": [\"yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes\", \"YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n11065751057 11065751056\\r\\n14816488910 14816488909\\r\\n7599636437 7599636436\\r\\n32868029728 32868029727\\r\\n29658708183 29658708182\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n61150570394 22605752451\\r\\n64903938253 57679397316\\r\\n79673778456 37950907361\\r\\n59209507183 35302232713\\r\\n88726603470 50246884625\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n45925060463 34682596536\\r\\n34161192623 19459231506\\r\\n74417875602 23392925845\\r\\n58874966000 740257587\\r\\n64371611777 32770840566\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n17406961899 17406961898\\r\\n21570966087 21570966086\\r\\n31354673689 31354673688\\r\\n24493273605 24493273604\\r\\n44187316822 44187316821\\r\\n\", \"output\": [\"yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes\", \"YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES\"]}, {\"input\": \"5\\r\\n49948848825 49948848824\\r\\n33118965298 33118965297\\r\\n34285673904 34285673903\\r\\n46923258767 46923258766\\r\\n48431110341 48431110340\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n38196676529 10033677341\\r\\n76701388169 39387747140\\r\\n96968196508 53479702571\\r\\n98601117347 56935774756\\r\\n89303447903 62932115422\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"5\\r\\n84969448764 45272932776\\r\\n40645404603 21303358412\\r\\n95260279132 55067325137\\r\\n92908555827 18951498996\\r\\n73854112015 59320860713\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"1\\r\\n5 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n25 24\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n13 12\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"2\\r\\n50000000605 50000000604\\r\\n5 4\\r\\n\", \"output\": [\"YES\\r\\nNO\", \"yes\\r\\nno\"]}, {\"input\": \"1\\r\\n281 280\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3\\r\\n5 4\\r\\n13 12\\r\\n25 24\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\"]}, {\"input\": \"1\\r\\n45131796361 45131796360\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5\\r\\n61 60\\r\\n10000010 10\\r\\n12345 45\\r\\n12343345 65\\r\\n1030 6\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"2\\r\\n61 60\\r\\n85 84\\r\\n\", \"output\": [\"NO\\r\\nNO\", \"no\\r\\nno\"]}, {\"input\": \"5\\r\\n61 60\\r\\n5242157731 5242157730\\r\\n12345 45\\r\\n5011907031 5011907030\\r\\n20207223564 20207223563\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"1\\r\\n80003600041 80003600040\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"5\\r\\n5242157731 5242157730\\r\\n12345 45\\r\\n5011907031 5011907030\\r\\n20207223564 20207223563\\r\\n61 60\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\\r\\nno\\r\\nno\"]}, {\"input\": \"3\\r\\n25 24\\r\\n841 840\\r\\n28561 28560\\r\\n\", \"output\": [\"NO\\r\\nNO\\r\\nNO\", \"no\\r\\nno\\r\\nno\"]}, {\"input\": \"1\\r\\n61 60\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n7 6\\r\\n\", \"output\": [\"YES\", \"yes\"]}, {\"input\": \"1\\r\\n99999999999 36\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n421 420\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n5928189385 5928189384\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n122 121\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n61251050005 61251050004\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n160489044 125525827\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n18 14\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n96793840086 96793840085\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n84777676971 84777676970\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n3121 3120\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n500000041 500000040\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n5484081721 5484081720\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1\\r\\n4999100041 4999100040\\r\\n\", \"output\": [\"NO\", \"no\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5\\r\\n62903604396 24274903133\\r\\n37198 37197\\r\\n16929 16928\\r\\n38325 38324\\r\\n49905 33035\\r\\n', 'output': ['no\\r\\nno\\r\\nyes\\r\\nyes\\r\\nno', 'NO\\r\\nNO\\r\\nYES\\r\\nYES\\r\\nNO']}, {'input': '5\\r\\n81271189833 16089352976\\r\\n98451628984 76827432884\\r\\n19327420986 19327420985\\r\\n15702367716 15702367715\\r\\n49419997643 49419997642\\r\\n', 'output': ['no\\r\\nno\\r\\nyes\\r\\nyes\\r\\nno', 'NO\\r\\nNO\\r\\nYES\\r\\nYES\\r\\nNO']}, {'input': '1\\r\\n45131796361 45131796360\\r\\n', 'output': ['NO', 'no']}, {'input': '1\\r\\n100000000000 99999999999\\r\\n', 'output': ['NO', 'no']}, {'input': '5\\r\\n41024865848 173372595\\r\\n60687612551 33296061228\\r\\n64391844305 16241932104\\r\\n81009941361 1976380712\\r\\n58548577555 28344963216\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}]","human_sample_testcases_2":"[{'input': '1\\r\\n84777676971 84777676970\\r\\n', 'output': ['NO', 'no']}, {'input': '5\\r\\n5242157731 5242157730\\r\\n12345 45\\r\\n5011907031 5011907030\\r\\n20207223564 20207223563\\r\\n61 60\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}, {'input': '5\\r\\n160 159\\r\\n223 222\\r\\n480 479\\r\\n357 356\\r\\n345 344\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}, {'input': '1\\r\\n281 280\\r\\n', 'output': ['NO', 'no']}, {'input': '5\\r\\n84969448764 45272932776\\r\\n40645404603 21303358412\\r\\n95260279132 55067325137\\r\\n92908555827 18951498996\\r\\n73854112015 59320860713\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}]","human_sample_testcases_3":"[{'input': '1\\r\\n7 6\\r\\n', 'output': ['YES', 'yes']}, {'input': '1\\r\\n500000041 500000040\\r\\n', 'output': ['NO', 'no']}, {'input': '5\\r\\n631 582\\r\\n201 106\\r\\n780 735\\r\\n608 528\\r\\n470 452\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}, {'input': '5\\r\\n2187 2186\\r\\n517 516\\r\\n3235 3234\\r\\n4810 4809\\r\\n3076 3075\\r\\n', 'output': ['yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes', 'YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES']}, {'input': '2\\r\\n50000000605 50000000604\\r\\n5 4\\r\\n', 'output': ['YES\\r\\nNO', 'yes\\r\\nno']}]","human_sample_testcases_4":"[{'input': '1\\r\\n5928189385 5928189384\\r\\n', 'output': ['NO', 'no']}, {'input': '1\\r\\n160489044 125525827\\r\\n', 'output': ['NO', 'no']}, {'input': '4\\r\\n6 5\\r\\n16 13\\r\\n61690850361 24777622630\\r\\n34 33\\r\\n', 'output': ['yes\\r\\nno\\r\\nno\\r\\nyes', 'YES\\r\\nNO\\r\\nNO\\r\\nYES']}, {'input': '5\\r\\n497334 497333\\r\\n437006 437005\\r\\n88531320027 6466043806\\r\\n863754 694577\\r\\n151084 151083\\r\\n', 'output': ['YES\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nYES', 'yes\\r\\nno\\r\\nno\\r\\nno\\r\\nyes']}, {'input': '1\\r\\n18 14\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_5":"[{'input': '5\\r\\n5242157731 5242157730\\r\\n12345 45\\r\\n5011907031 5011907030\\r\\n20207223564 20207223563\\r\\n61 60\\r\\n', 'output': ['NO\\r\\nNO\\r\\nNO\\r\\nNO\\r\\nNO', 'no\\r\\nno\\r\\nno\\r\\nno\\r\\nno']}, {'input': '5\\r\\n24095027715 9551467282\\r\\n34945375 34945374\\r\\n16603803 16603802\\r\\n58997777 26551505\\r\\n39762660 39762659\\r\\n', 'output': ['NO\\r\\nYES\\r\\nNO\\r\\nNO\\r\\nYES', 'no\\r\\nyes\\r\\nno\\r\\nno\\r\\nyes']}, {'input': '1\\r\\n100000000000 99999999999\\r\\n', 'output': ['NO', 'no']}, {'input': '5\\r\\n8680 4410\\r\\n59011181086 3472811643\\r\\n770 769\\r\\n1911 1910\\r\\n3615 3614\\r\\n', 'output': ['no\\r\\nno\\r\\nno\\r\\nyes\\r\\nyes', 'NO\\r\\nNO\\r\\nNO\\r\\nYES\\r\\nYES']}, {'input': '5\\r\\n18975453681 18975453680\\r\\n33749667489 33749667488\\r\\n32212198515 32212198514\\r\\n39519664171 39519664170\\r\\n5846685141 5846685140\\r\\n', 'output': ['yes\\r\\nyes\\r\\nyes\\r\\nyes\\r\\nyes', 'YES\\r\\nYES\\r\\nYES\\r\\nYES\\r\\nYES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":92.31,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":80.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":196,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.462,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"0 0 0\\n0 1 0\", \"1 1 0\\n0 1 0\", \"0 0 0\\n1 1 1\"]","input_specification":"The first line contains three space-separated integers (0 or 1) \u2014 the coordinates of the first fly, the second line analogously contains the coordinates of the second fly.","src_uid":"91c9dbbceb467d5fd420e92c2919ecb6","source_code":"#include\nusing namespace std;\nint a[10][10],f;\nint main()\n{\n for(int i=1;i<=2;i++)\n for(int j=1;j<=3;j++)\n cin>>a[i][j];\n for(int i=1;i<=3;i++)\n if(a[1][i]==a[2][i]){f=1;break;}\n cout<<(f?\"YES\\n\":\"NO\\n\");\n return 0;\n}","sample_outputs":"[\"YES\", \"YES\", \"NO\"]","lang_cluster":"C++","notes":null,"output_specification":"Output \"YES\" (without quotes) if the flies see each other. Otherwise, output \"NO\".","description":"You can find anything whatsoever in our Galaxy! A cubical planet goes round an icosahedral star. Let us introduce a system of axes so that the edges of the cubical planet are parallel to the coordinate axes and two opposite vertices lay in the points (0,\u20090,\u20090) and (1,\u20091,\u20091). Two flies live on the planet. At the moment they are sitting on two different vertices of the cubical planet. Your task is to determine whether they see each other or not. The flies see each other when the vertices they occupy lie on the same face of the cube.","human_testcases":"[{\"input\": \"0 0 0\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 0 0\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0\\r\\n1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 0 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0\\r\\n0 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 0 0\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n1 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 1 0\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 1 0\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n1 1 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 0 1\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n0 1 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 0 1\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 1\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n1 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 1 1\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n0 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 1 1\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1 1\\r\\n0 1 0\\r\\n', 'output': ['YES']}, {'input': '0 1 1\\r\\n1 0 0\\r\\n', 'output': ['No', 'NO']}, {'input': '0 1 1\\r\\n0 0 1\\r\\n', 'output': ['YES']}, {'input': '1 1 0\\r\\n1 0 0\\r\\n', 'output': ['YES']}, {'input': '1 1 1\\r\\n0 0 0\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_2":"[{'input': '1 1 1\\r\\n0 1 0\\r\\n', 'output': ['YES']}, {'input': '0 1 1\\r\\n1 1 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0\\r\\n0 0 1\\r\\n', 'output': ['YES']}, {'input': '0 0 0\\r\\n1 0 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0\\r\\n1 1 0\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '1 0 0\\r\\n0 1 0\\r\\n', 'output': ['YES']}, {'input': '1 0 1\\r\\n1 1 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0\\r\\n1 1 0\\r\\n', 'output': ['YES']}, {'input': '1 1 1\\r\\n1 0 1\\r\\n', 'output': ['YES']}, {'input': '1 0 0\\r\\n0 1 1\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_4":"[{'input': '1 0 1\\r\\n0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0\\r\\n0 1 1\\r\\n', 'output': ['YES']}, {'input': '0 0 0\\r\\n1 0 1\\r\\n', 'output': ['YES']}, {'input': '0 1 1\\r\\n1 0 0\\r\\n', 'output': ['No', 'NO']}, {'input': '1 0 0\\r\\n1 1 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '1 0 1\\r\\n1 0 0\\r\\n', 'output': ['YES']}, {'input': '1 1 1\\r\\n1 1 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0\\r\\n0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 1\\r\\n0 1 0\\r\\n', 'output': ['YES']}, {'input': '0 0 1\\r\\n1 1 0\\r\\n', 'output': ['No', 'NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":80.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":197,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"1 1 6 1\\n1 0 6 0\\n6 0 6 1\\n1 1 1 0\", \"0 0 0 3\\n2 0 0 0\\n2 2 2 0\\n0 2 2 2\"]","input_specification":"The input data contain four lines. Each of these lines contains four integers x1, y1, x2, y2 (\u2009-\u2009109\u2009\u2264\u2009x1,\u2009y1,\u2009x2,\u2009y2\u2009\u2264\u2009109) \u2014 coordinates of segment's beginning and end positions. The given segments can degenerate into points.","src_uid":"ad105c08f63e9761fe90f69630628027","source_code":"#include \nusing namespace std;\n\nint n, sx[10], id[10], sy[10], fx[10], fy[10], SX[10], SY[10], FX[10], FY[10];\n\nint main() {\n for (int i = 1; i <= 4; i ++) {\n\t\tscanf(\"%d %d %d %d\", &SX[i], &SY[i], &FX[i], &FY[i]);\n id[i] = i;\n }\n bool flag = 0;\n do {\n for (int i = 1; i <= 4; i ++) {\n sx[i-1] = SX[id[i]];\n fx[i-1] = FX[id[i]];\n sy[i-1] = SY[id[i]];\n fy[i-1] = FY[id[i]];\n }\n for (int i = 0; i < 2; i ++) {\n\t\t\tswap(sx[0], fx[0]); swap(sy[0], fy[0]);\n for (int j = 0; j < 2; j ++) {\n\t\t\t\tswap(sx[1], fx[1]); swap(sy[1], fy[1]);\n for (int k = 0; k < 2; k ++) {\n\t\t\t\t\tswap(sx[2], fx[2]); swap(sy[2], fy[2]);\n for (int l = 0; l < 2; l ++) {\n\t\t\t\t\t\tswap(sx[3], fx[3]); swap(sy[3], fy[3]);\n if (sy[0] != fy[0]) continue;\n if (sx[1] != fx[1]) continue;\n if (sy[2] != fy[2]) continue;\n if (sx[3] != fx[3]) continue;\n if (fy[0] != sy[1] || fx[0] != sx[1]) continue;\n if (fy[1] != sy[2] || fx[1] != sx[2]) continue;\n if (fy[2] != sy[3] || fx[2] != sx[3]) continue;\n if (fy[3] != sy[0] || fx[3] != sx[0]) continue;\n if (sy[0] == sy[2]) continue;\n if (sx[0] == sx[2]) continue;\n flag = 1;\n goto lp;\n }\n }\n }\n }\n } while (next_permutation(id+1, id+5));\n lp:\n\tif (flag) puts(\"YES\");\n\telse puts(\"NO\");\n\treturn 0;\n}\n\n ","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"C++","notes":null,"output_specification":"Output the word \u00abYES\u00bb, if the given four segments form the required rectangle, otherwise output \u00abNO\u00bb.","description":"Several months later Alex finally got his brother Bob's creation by post. And now, in his turn, Alex wants to boast about something to his brother. He thought for a while, and came to the conclusion that he has no ready creations, and decided to write a program for rectangles detection. According to his plan, the program detects if the four given segments form a rectangle of a positive area and with sides parallel to coordinate axes. As Alex does badly at school and can't write this program by himself, he asks you to help him.","human_testcases":"[{\"input\": \"1 1 6 1\\r\\n1 0 6 0\\r\\n6 0 6 1\\r\\n1 1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 3\\r\\n2 0 0 0\\r\\n2 2 2 0\\r\\n0 2 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 2\\r\\n2 0 0 0\\r\\n2 2 2 0\\r\\n0 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 10 0\\r\\n0 0 10 0\\r\\n0 0 0 5\\r\\n0 0 0 -5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 4 0\\r\\n4 0 3 0\\r\\n3 0 2 0\\r\\n2 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 3 0\\r\\n0 0 0 3\\r\\n0 3 3 3\\r\\n3 3 3 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1 0\\r\\n1 0 1 1\\r\\n0 1 1 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1 0\\r\\n1 0 1 1\\r\\n1 1 1 0\\r\\n1 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 1\\r\\n1 1 2 0\\r\\n2 0 1 -1\\r\\n1 -1 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 10\\r\\n0 10 0 9\\r\\n0 9 0 8\\r\\n0 8 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 4 0\\r\\n4 0 4 0\\r\\n4 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 2\\r\\n0 2 2 2\\r\\n0 0 2 2\\r\\n2 2 2 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 2\\r\\n2 0 2 2\\r\\n0 2 0 0\\r\\n2 2 2 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13 13 13 13\\r\\n13 13 13 13\\r\\n13 13 13 13\\r\\n13 13 13 13\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 2 0\\r\\n0 1 0 3\\r\\n0 4 3 4\\r\\n3 0 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1 1 1\\r\\n0 1 -1 1\\r\\n-1 1 1 1\\r\\n-1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 -1 0 1\\r\\n0 0 0 1\\r\\n0 -1 0 -1\\r\\n0 -1 0 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 -1 0\\r\\n-1 0 0 0\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 1 -1 1\\r\\n0 1 1 1\\r\\n1 -1 -1 1\\r\\n-1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 -1 -1 -1\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n-1 -1 -1 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 2\\r\\n-2 2 1 2\\r\\n1 -2 -2 2\\r\\n-2 -2 1 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-2 1 -2 -1\\r\\n-2 -2 -2 -2\\r\\n-2 -1 -2 -2\\r\\n-2 1 -2 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 2\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-2 0 -2 -1\\r\\n-2 2 -2 0\\r\\n-2 2 -2 2\\r\\n-2 0 -2 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 1 -2 1\\r\\n0 -1 -1 1\\r\\n-2 1 -1 -1\\r\\n0 1 0 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 -1 -2 -1\\r\\n2 -1 2 -1\\r\\n2 -1 -2 -1\\r\\n2 -1 2 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 2 0 2\\r\\n0 2 0 1\\r\\n0 1 0 1\\r\\n0 2 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0 1 0\\r\\n1 0 1 0\\r\\n1 0 0 0\\r\\n1 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 1 2 1\\r\\n0 1 0 1\\r\\n0 1 2 1\\r\\n2 1 -1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 2 0\\r\\n0 0 2 0\\r\\n0 -2 0 0\\r\\n0 -2 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 -3 0 -1\\r\\n1 -1 1 -1\\r\\n0 -1 1 -2\\r\\n0 -2 -2 -3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-3 -2 -2 -2\\r\\n3 -2 3 -2\\r\\n-3 -2 -2 -2\\r\\n3 -2 3 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 -2 2\\r\\n-2 2 3 2\\r\\n1 2 -2 2\\r\\n-2 2 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 -2 1 3\\r\\n1 3 1 3\\r\\n1 3 1 3\\r\\n1 3 1 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 -3 -2 -3\\r\\n0 1 0 -3\\r\\n0 1 0 -3\\r\\n0 1 0 -3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-3 2 -2 1\\r\\n0 2 0 -3\\r\\n0 -3 -2 1\\r\\n0 1 -3 -3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-3 3 2 3\\r\\n2 3 2 3\\r\\n-3 3 -3 3\\r\\n-3 3 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 -2 2 -2\\r\\n2 -2 2 -2\\r\\n2 -2 2 -2\\r\\n2 -2 2 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 -1 0 -2\\r\\n-3 -2 -3 3\\r\\n2 -2 2 -2\\r\\n0 3 -3 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -3 -1 1\\r\\n0 -2 1 -3\\r\\n1 1 0 1\\r\\n1 -3 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-2 4 -2 4\\r\\n-2 4 -2 -2\\r\\n-2 4 -2 -2\\r\\n-2 4 -2 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 1 3 1\\r\\n-3 1 3 1\\r\\n3 3 -3 1\\r\\n-3 1 3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 4 1\\r\\n0 1 4 1\\r\\n4 1 0 1\\r\\n0 -2 4 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 -2 0 -1\\r\\n0 -1 0 -2\\r\\n0 -2 0 -2\\r\\n0 -2 0 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n-1 1 -1 3\\r\\n-3 1 -3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"578327678 518066351 578327678 498442467\\r\\n583129774 498442467 578327678 518066351\\r\\n583129774 518066351 578327678 518066351\\r\\n583129774 498442467 578327678 518066351\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-973576966 32484917 -973576966 32484917\\r\\n-973576966 32484917 347173379 32484917\\r\\n-973576966 32484917 347173379 32484917\\r\\n-973576966 32484917 347173379 32484917\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"572793036 194804279 572793036 -866298887\\r\\n572793036 461349977 -860420833 194804279\\r\\n572793036 461349977 572793036 -866298887\\r\\n-860420833 461349977 572793036 -866298887\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"949753871 -467933239 -72251156 462207752\\r\\n949753871 462207752 425479768 -467933239\\r\\n425479768 462207752 425479768 -467933239\\r\\n949753871 -467933239 949753871 462207752\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -1 1 -1\\r\\n-1 -1 -1 -1\\r\\n1 0 -1 -1\\r\\n1 -1 -1 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -1 1 -1\\r\\n1 0 1 0\\r\\n1 0 1 -1\\r\\n1 0 1 -1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 1 0 1\\r\\n0 1 0 0\\r\\n0 1 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -1 1 0\\r\\n1 0 1 0\\r\\n0 0 0 -1\\r\\n1 -1 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 2 2\\r\\n0 0 2 0\\r\\n2 2 2 2\\r\\n0 2 0 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-2 -1 -1 -1\\r\\n-2 -1 -1 -1\\r\\n-2 -1 -2 2\\r\\n-2 2 -1 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1 -1 0\\r\\n-1 0 2 1\\r\\n2 1 2 1\\r\\n-1 0 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 -1 2 -1\\r\\n1 -2 2 -2\\r\\n1 -2 2 -2\\r\\n1 -2 2 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-1 -2 -1 2\\r\\n-1 -2 -1 -2\\r\\n-1 2 -1 2\\r\\n-1 -2 -1 -2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 0 2 -1\\r\\n2 -1 -1 0\\r\\n2 -1 -1 0\\r\\n2 -1 -1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 -3 1 3\\r\\n1 -3 1 3\\r\\n2 3 2 -3\\r\\n2 -3 2 -3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"130120899 550158649 130120899 831843953\\r\\n130120899 550158649 130120899 831843953\\r\\n130120899 550158649 434006978 831843953\\r\\n434006978 550158649 434006978 550158649\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-214484034 559719641 -214484034 559719641\\r\\n-214484034 559719641 -214484034 559719641\\r\\n-214484034 2764087 -214484034 559719641\\r\\n-214484034 2764087 734280017 2764087\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-966947426 664261857 -994206270 664261857\\r\\n-966947426 664261857 -994206270 664261857\\r\\n-966947426 789165019 -966947426 789165019\\r\\n-966947426 664261857 -966947426 789165019\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"264411509 -329579381 264411509 -329579381\\r\\n-726758913 -329579381 264411509 357369289\\r\\n-726758913 -329579381 264411509 -329579381\\r\\n264411509 -329579381 264411509 -329579381\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-193720583 -547078093 -570748852 58725936\\r\\n-570748852 -547078093 -570748852 58725936\\r\\n-193720583 58725936 -570748852 -547078093\\r\\n-570748852 -547078093 -193720583 58725936\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-534094150 -333730697 120658438 -333730697\\r\\n-534094150 -333730697 120658438 869464313\\r\\n-534094150 -333730697 -534094150 -333730697\\r\\n-534094150 869464313 -534094150 -333730697\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-328545071 835751660 -345950135 835751660\\r\\n-345950135 243569491 -328545071 835751660\\r\\n-328545071 835751660 -345950135 243569491\\r\\n-328545071 243569491 -328545071 243569491\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-985236057 -809433993 -985236057 -225363622\\r\\n-484344733 -225363622 -484344733 -225363622\\r\\n-985236057 -225363622 -985236057 -809433993\\r\\n-484344733 -225363622 -484344733 -809433993\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"774287068 919049158 774287068 919049158\\r\\n250033372 653817677 250033372 653817677\\r\\n250033372 919049158 774287068 653817677\\r\\n250033372 653817677 250033372 653817677\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15319063 -661389770 632904085 -661389770\\r\\n15319063 834266473 632904085 834266473\\r\\n15319063 834266473 15319063 -661389770\\r\\n632904085 -661389770 632904085 834266473\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"157550209 -594704878 157550209 524666828\\r\\n671878188 -594704878 157550209 -594704878\\r\\n671878188 -594704878 671878188 524666828\\r\\n671878188 524666828 157550209 524666828\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-887135208 728202342 127569272 728202342\\r\\n127569272 728202342 127569272 -932260532\\r\\n-887135208 -932260532 -887135208 728202342\\r\\n127569272 -932260532 -887135208 -932260532\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-777411660 -392696120 -777411660 878250237\\r\\n461320023 878250237 -777411660 878250237\\r\\n461320023 878250237 461320023 -392696120\\r\\n461320023 -392696120 -777411660 -392696120\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-892785315 567101756 -892785315 212349618\\r\\n-403060667 212349618 -403060667 567101756\\r\\n-403060667 567101756 -892785315 567101756\\r\\n-892785315 212349618 -403060667 212349618\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-360046034 -871603961 -37695563 -871603961\\r\\n-37695563 664955871 -37695563 -871603961\\r\\n-360046034 664955871 -360046034 -871603961\\r\\n-360046034 664955871 -37695563 664955871\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"375089524 -852468724 -952575952 -852468724\\r\\n-952575952 -852468724 -952575952 -883150295\\r\\n-952575952 -883150295 375089524 -883150295\\r\\n375089524 -852468724 375089524 -883150295\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"851113265 -893293930 851113265 -444742025\\r\\n-864765585 -893293930 -864765585 -444742025\\r\\n-864765585 -893293930 851113265 -893293930\\r\\n-864765585 -444742025 851113265 -444742025\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-309306779 559081237 255096743 559081237\\r\\n-309306779 -359724178 255096743 -359724178\\r\\n255096743 -359724178 255096743 559081237\\r\\n-309306779 559081237 -309306779 -359724178\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"542957347 -480242202 566995046 -480242202\\r\\n542957347 -480242202 542957347 -298569507\\r\\n566995046 -298569507 542957347 -298569507\\r\\n566995046 -298569507 566995046 -480242202\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"724715871 -943657730 964573294 -943657730\\r\\n724715871 -943657730 724715871 -216459206\\r\\n964573294 -216459206 964573294 -943657730\\r\\n724715871 -216459206 964573294 -216459206\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-394306310 -279360055 -394306310 771835446\\r\\n-394306310 -279360055 -358661829 -279360055\\r\\n-358661829 771835446 -358661829 -279360055\\r\\n-358661829 771835446 -394306310 771835446\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-204472047 -894485730 -204472047 640004355\\r\\n960702643 -894485730 960702643 640004355\\r\\n960702643 -894485730 -204472047 -894485730\\r\\n-204472047 640004355 960702643 640004355\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"747591 5158024 -837871358 5158024\\r\\n-837871358 -874026904 747591 -874026904\\r\\n747591 -874026904 747591 5158024\\r\\n-837871358 -874026904 -837871358 5158024\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-442585231 90863587 800882871 90863587\\r\\n800882871 288218107 800882871 90863587\\r\\n800882871 288218107 -442585231 288218107\\r\\n-442585231 90863587 -442585231 288218107\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-969490772 476931470 -969490772 929999730\\r\\n-426216863 929999730 -969490772 929999730\\r\\n-426216863 929999730 -426216863 476931470\\r\\n-969490772 476931470 -426216863 476931470\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-683046010 -125472203 -683046010 418507423\\r\\n817863270 418507423 817863270 -125472203\\r\\n817863270 418507423 -683046010 418507423\\r\\n817863270 -125472203 -683046010 -125472203\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"231996287 974811621 -923122611 974811621\\r\\n-923122611 646880519 -923122611 974811621\\r\\n231996287 646880519 231996287 974811621\\r\\n-923122611 646880519 231996287 646880519\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-83429272 -350159212 -990378619 -350159212\\r\\n-990378619 -350159212 -990378619 247777831\\r\\n-83429272 -350159212 -83429272 247777831\\r\\n-990378619 247777831 -83429272 247777831\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-679599706 974881765 -679599706 -84192294\\r\\n-554774137 -84192294 -554774137 974881765\\r\\n-554774137 974881765 -679599706 974881765\\r\\n-554774137 -84192294 -679599706 -84192294\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"-155221108 -190475340 -155221108 -819044368\\r\\n-155221108 -190475340 -155875856 -190475340\\r\\n-155875856 -190475340 -155875856 -819044368\\r\\n-155875856 -819044368 -155221108 -819044368\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"377126871 -877660066 -633390329 -877660066\\r\\n377126871 -175686511 377126871 -877660066\\r\\n-633390329 -877660066 -633390329 -175686511\\r\\n-633390329 -175686511 377126871 -175686511\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"919022298 897009314 77151365 897009314\\r\\n77151365 579795002 919022298 579795002\\r\\n77151365 579795002 77151365 897009314\\r\\n919022298 579795002 919022298 897009314\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"146411776 -188986353 146411776 -808042296\\r\\n-381166510 -808042296 -381166510 -188986353\\r\\n146411776 -188986353 -381166510 -188986353\\r\\n146411776 -808042296 -381166510 -808042296\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"438703475 871560515 571565350 871560515\\r\\n571565350 -204157747 438703475 -204157747\\r\\n438703475 -204157747 438703475 871560515\\r\\n571565350 -204157747 571565350 871560515\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n5 5 5 5\\r\\n5 0 5 5\\r\\n0 5 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 1 2\\r\\n2 1 1 2\\r\\n1 0 0 1\\r\\n2 1 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"-3 0 -3 3\\r\\n0 0 0 3\\r\\n3 3 -3 3\\r\\n3 0 -3 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n1 1 1 1\\r\\n0 1 0 1\\r\\n1 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 1 0\\r\\n1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n1 1 0 1\\r\\n0 0 1 0\\r\\n1 1 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 1 1 1\\r\\n1 1 1 0\\r\\n1 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 1\\r\\n0 1 1 0\\r\\n1 1 0 0\\r\\n1 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n1 1 1 1\\r\\n0 1 1 0\\r\\n1 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n0 1 1 1\\r\\n0 0 1 0\\r\\n0 1 1 1\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '-3 0 -3 3\\r\\n0 0 0 3\\r\\n3 3 -3 3\\r\\n3 0 -3 0\\r\\n', 'output': ['NO']}, {'input': '0 -3 0 -1\\r\\n1 -1 1 -1\\r\\n0 -1 1 -2\\r\\n0 -2 -2 -3\\r\\n', 'output': ['NO']}, {'input': '0 0 0 2\\r\\n2 0 0 0\\r\\n2 2 2 0\\r\\n0 2 2 2\\r\\n', 'output': ['YES']}, {'input': '0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n', 'output': ['NO']}, {'input': '1 -3 -1 1\\r\\n0 -2 1 -3\\r\\n1 1 0 1\\r\\n1 -3 0 1\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '2 -1 0 -2\\r\\n-3 -2 -3 3\\r\\n2 -2 2 -2\\r\\n0 3 -3 -2\\r\\n', 'output': ['NO']}, {'input': '-3 2 -2 1\\r\\n0 2 0 -3\\r\\n0 -3 -2 1\\r\\n0 1 -3 -3\\r\\n', 'output': ['NO']}, {'input': '375089524 -852468724 -952575952 -852468724\\r\\n-952575952 -852468724 -952575952 -883150295\\r\\n-952575952 -883150295 375089524 -883150295\\r\\n375089524 -852468724 375089524 -883150295\\r\\n', 'output': ['YES']}, {'input': '-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n-1 0 -1 0\\r\\n', 'output': ['NO']}, {'input': '0 0 0 2\\r\\n2 0 2 2\\r\\n0 2 0 0\\r\\n2 2 2 0\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '1 2 1 2\\r\\n-2 2 1 2\\r\\n1 -2 -2 2\\r\\n-2 -2 1 -2\\r\\n', 'output': ['NO']}, {'input': '-969490772 476931470 -969490772 929999730\\r\\n-426216863 929999730 -969490772 929999730\\r\\n-426216863 929999730 -426216863 476931470\\r\\n-969490772 476931470 -426216863 476931470\\r\\n', 'output': ['YES']}, {'input': '-3 3 2 3\\r\\n2 3 2 3\\r\\n-3 3 -3 3\\r\\n-3 3 2 3\\r\\n', 'output': ['NO']}, {'input': '-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n-1 1 -1 1\\r\\n', 'output': ['NO']}, {'input': '-2 -1 -1 -1\\r\\n-2 -1 -1 -1\\r\\n-2 -1 -2 2\\r\\n-2 2 -1 2\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '1 2 1 2\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n1 -1 1 -1\\r\\n', 'output': ['NO']}, {'input': '1 1 6 1\\r\\n1 0 6 0\\r\\n6 0 6 1\\r\\n1 1 1 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0 2\\r\\n2 0 2 2\\r\\n0 2 0 0\\r\\n2 2 2 0\\r\\n', 'output': ['NO']}, {'input': '264411509 -329579381 264411509 -329579381\\r\\n-726758913 -329579381 264411509 357369289\\r\\n-726758913 -329579381 264411509 -329579381\\r\\n264411509 -329579381 264411509 -329579381\\r\\n', 'output': ['NO']}, {'input': '1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n1 -3 1 -3\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '747591 5158024 -837871358 5158024\\r\\n-837871358 -874026904 747591 -874026904\\r\\n747591 -874026904 747591 5158024\\r\\n-837871358 -874026904 -837871358 5158024\\r\\n', 'output': ['YES']}, {'input': '1 0 1 0\\r\\n1 0 1 0\\r\\n1 0 0 0\\r\\n1 0 1 0\\r\\n', 'output': ['NO']}, {'input': '0 0 0 0\\r\\n5 5 5 5\\r\\n5 0 5 5\\r\\n0 5 0 0\\r\\n', 'output': ['NO']}, {'input': '0 0 4 0\\r\\n4 0 3 0\\r\\n3 0 2 0\\r\\n2 0 0 0\\r\\n', 'output': ['NO']}, {'input': '13 13 13 13\\r\\n13 13 13 13\\r\\n13 13 13 13\\r\\n13 13 13 13\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":88.64,"human_sample_branch_coverage_2":84.09,"human_sample_branch_coverage_3":86.36,"human_sample_branch_coverage_4":88.64,"human_sample_branch_coverage_5":93.18,"id":198,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":88.182} {"sample_inputs":"[\"3 3\\n1\", \"3 3\\n2\", \"1 1\\n1\"]","input_specification":"The first line contains integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u20095000). The second line contains integer x (1\u2009\u2264\u2009x\u2009\u2264\u2009109).","src_uid":"fa1ef5f9bceeb7266cc597ba8f2161cb","source_code":"\/\/\/\tB : Coded by Choe Kwang\n\n#include \nusing namespace std;\n\nint n, m, x;\n\nint calc(int x) {\n\treturn (max(0, n - 2 * x) * max(0, m - 2 * x) + 1) \/ 2;\n}\n\nint main() {\n\tscanf(\"%d %d %d\", &n, &m, &x);\n\tprintf(\"%d\\n\", calc(x - 1) - calc(x));\n\treturn 0;\n}\n","sample_outputs":"[\"4\", \"1\", \"1\"]","lang_cluster":"C++","notes":null,"output_specification":"Print how many squares will be painted exactly x times.","description":"A chessboard n\u2009\u00d7\u2009m in size is given. During the zero minute we repaint all the black squares to the 0 color. During the i-th minute we repaint to the i color the initially black squares that have exactly four corner-adjacent squares painted i\u2009-\u20091 (all such squares are repainted simultaneously). This process continues ad infinitum. You have to figure out how many squares we repainted exactly x times.The upper left square of the board has to be assumed to be always black. Two squares are called corner-adjacent, if they have exactly one common point.","human_testcases":"[{\"input\": \"3 3\\r\\n1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 3\\r\\n2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 8\\r\\n8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 10\\r\\n1\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"9 9\\r\\n3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10 9\\r\\n4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 5000\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5000 1\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4999 1\\r\\n7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4999\\r\\n2309\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4999\\r\\n1000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n200\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5000 5000\\r\\n1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 7\\r\\n777\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"126 4125\\r\\n52\\r\\n\", \"output\": [\"4045\"]}, {\"input\": \"1755 2051\\r\\n1\\r\\n\", \"output\": [\"3804\"]}, {\"input\": \"3385 4978\\r\\n192\\r\\n\", \"output\": [\"7597\"]}, {\"input\": \"3663 2904\\r\\n1149\\r\\n\", \"output\": [\"1973\"]}, {\"input\": \"293 2183\\r\\n60\\r\\n\", \"output\": [\"2238\"]}, {\"input\": \"1922 109\\r\\n41\\r\\n\", \"output\": [\"1869\"]}, {\"input\": \"3552 3036\\r\\n199\\r\\n\", \"output\": [\"5794\"]}, {\"input\": \"182 2314\\r\\n54\\r\\n\", \"output\": [\"2282\"]}, {\"input\": \"1812 240\\r\\n9\\r\\n\", \"output\": [\"2018\"]}, {\"input\": \"1595 2881\\r\\n710\\r\\n\", \"output\": [\"1638\"]}, {\"input\": \"4694 685\\r\\n208\\r\\n\", \"output\": [\"4549\"]}, {\"input\": \"2793 4840\\r\\n901\\r\\n\", \"output\": [\"4031\"]}, {\"input\": \"892 3996\\r\\n288\\r\\n\", \"output\": [\"3738\"]}, {\"input\": \"3990 1800\\r\\n171\\r\\n\", \"output\": [\"5108\"]}, {\"input\": \"2089 955\\r\\n476\\r\\n\", \"output\": [\"1142\"]}, {\"input\": \"188 3759\\r\\n53\\r\\n\", \"output\": [\"3737\"]}, {\"input\": \"3287 2915\\r\\n538\\r\\n\", \"output\": [\"4052\"]}, {\"input\": \"2738 718\\r\\n308\\r\\n\", \"output\": [\"2226\"]}, {\"input\": \"837 4874\\r\\n208\\r\\n\", \"output\": [\"4881\"]}, {\"input\": \"991 2301\\r\\n291\\r\\n\", \"output\": [\"2130\"]}, {\"input\": \"2016 4549\\r\\n433\\r\\n\", \"output\": [\"4835\"]}, {\"input\": \"3042 1798\\r\\n93\\r\\n\", \"output\": [\"4470\"]}, {\"input\": \"419 4046\\r\\n174\\r\\n\", \"output\": [\"3771\"]}, {\"input\": \"1444 2646\\r\\n660\\r\\n\", \"output\": [\"1452\"]}, {\"input\": \"2470 4895\\r\\n421\\r\\n\", \"output\": [\"5683\"]}, {\"input\": \"4847 2143\\r\\n827\\r\\n\", \"output\": [\"3684\"]}, {\"input\": \"873 744\\r\\n42\\r\\n\", \"output\": [\"1451\"]}, {\"input\": \"3250 2992\\r\\n127\\r\\n\", \"output\": [\"5736\"]}, {\"input\": \"4275 240\\r\\n16\\r\\n\", \"output\": [\"4453\"]}, {\"input\": \"4035 369\\r\\n26\\r\\n\", \"output\": [\"4302\"]}, {\"input\": \"4339 2062\\r\\n462\\r\\n\", \"output\": [\"4555\"]}, {\"input\": \"4643 3755\\r\\n1381\\r\\n\", \"output\": [\"2876\"]}, {\"input\": \"3595 448\\r\\n110\\r\\n\", \"output\": [\"3605\"]}, {\"input\": \"3899 2141\\r\\n428\\r\\n\", \"output\": [\"4330\"]}, {\"input\": \"4202 3834\\r\\n1478\\r\\n\", \"output\": [\"2126\"]}, {\"input\": \"3154 527\\r\\n112\\r\\n\", \"output\": [\"3235\"]}, {\"input\": \"3458 2220\\r\\n526\\r\\n\", \"output\": [\"3576\"]}, {\"input\": \"3762 3914\\r\\n1073\\r\\n\", \"output\": [\"3386\"]}, {\"input\": \"2714 607\\r\\n189\\r\\n\", \"output\": [\"2567\"]}, {\"input\": \"3432 4788\\r\\n1203\\r\\n\", \"output\": [\"3410\"]}, {\"input\": \"1662 926\\r\\n452\\r\\n\", \"output\": [\"782\"]}, {\"input\": \"4892 712\\r\\n340\\r\\n\", \"output\": [\"4246\"]}, {\"input\": \"3122 1850\\r\\n201\\r\\n\", \"output\": [\"4170\"]}, {\"input\": \"1353 2988\\r\\n589\\r\\n\", \"output\": [\"1987\"]}, {\"input\": \"4583 2774\\r\\n1206\\r\\n\", \"output\": [\"2535\"]}, {\"input\": \"2813 3911\\r\\n560\\r\\n\", \"output\": [\"4486\"]}, {\"input\": \"1043 49\\r\\n10\\r\\n\", \"output\": [\"1054\"]}, {\"input\": \"4273 4835\\r\\n159\\r\\n\", \"output\": [\"8474\"]}, {\"input\": \"2504 973\\r\\n201\\r\\n\", \"output\": [\"2675\"]}, {\"input\": \"2828 4208\\r\\n912\\r\\n\", \"output\": [\"3390\"]}, {\"input\": \"10 10\\r\\n1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"10 10\\r\\n2\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"10 10\\r\\n3\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 10\\r\\n4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 10\\r\\n5\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '892 3996\\r\\n288\\r\\n', 'output': ['3738']}, {'input': '1595 2881\\r\\n710\\r\\n', 'output': ['1638']}, {'input': '293 2183\\r\\n60\\r\\n', 'output': ['2238']}, {'input': '3122 1850\\r\\n201\\r\\n', 'output': ['4170']}, {'input': '4339 2062\\r\\n462\\r\\n', 'output': ['4555']}]","human_sample_testcases_2":"[{'input': '188 3759\\r\\n53\\r\\n', 'output': ['3737']}, {'input': '9 10\\r\\n1\\r\\n', 'output': ['17']}, {'input': '4847 2143\\r\\n827\\r\\n', 'output': ['3684']}, {'input': '3250 2992\\r\\n127\\r\\n', 'output': ['5736']}, {'input': '1 1\\r\\n1\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '3595 448\\r\\n110\\r\\n', 'output': ['3605']}, {'input': '2504 973\\r\\n201\\r\\n', 'output': ['2675']}, {'input': '3990 1800\\r\\n171\\r\\n', 'output': ['5108']}, {'input': '4999 1\\r\\n7\\r\\n', 'output': ['0']}, {'input': '9 9\\r\\n3\\r\\n', 'output': ['8']}]","human_sample_testcases_4":"[{'input': '1 1\\r\\n200\\r\\n', 'output': ['0']}, {'input': '1353 2988\\r\\n589\\r\\n', 'output': ['1987']}, {'input': '2793 4840\\r\\n901\\r\\n', 'output': ['4031']}, {'input': '2089 955\\r\\n476\\r\\n', 'output': ['1142']}, {'input': '3122 1850\\r\\n201\\r\\n', 'output': ['4170']}]","human_sample_testcases_5":"[{'input': '10 10\\r\\n3\\r\\n', 'output': ['10']}, {'input': '3990 1800\\r\\n171\\r\\n', 'output': ['5108']}, {'input': '1 1\\r\\n200\\r\\n', 'output': ['0']}, {'input': '3552 3036\\r\\n199\\r\\n', 'output': ['5794']}, {'input': '1 4999\\r\\n1000000\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":199,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 7 1 8 2 8\", \"20 30 40 50 0 100\", \"31 41 59 26 17 43\"]","input_specification":"First line of the input will contain 6 integers, separated by spaces: p1,\u2009p2,\u2009p3,\u2009p4,\u2009a,\u2009b (1\u2009\u2264\u2009p1,\u2009p2,\u2009p3,\u2009p4\u2009\u2264\u20091000,\u20090\u2009\u2264\u2009a\u2009\u2264\u2009b\u2009\u2264\u200931415). It is guaranteed that numbers p1,\u2009p2,\u2009p3,\u2009p4 will be pairwise distinct.","src_uid":"63b9dc70e6ad83d89a487ffebe007b0a","source_code":"#include\nusing namespace std;\nint p1,p2,p3,p4,n,m,sum=0;\nint main()\n{\n\tscanf(\"%d%d%d%d%d%d\",&p1,&p2,&p3,&p4,&n,&m);\n\tfor(int i=n;i<=m;i++)\n\t{\n\t\tif(i%p1!=i) continue;\n\t\tif(i%p2!=i) continue;\n\t\tif(i%p3!=i) continue;\n\t\tif(i%p4!=i) continue;\n\t\tsum++;\n\t}\n\tprintf(\"%d\",sum);\n\treturn 0;\n}","sample_outputs":"[\"0\", \"20\", \"9\"]","lang_cluster":"C++","notes":null,"output_specification":"Output the number of integers in the given range that have the given property.","description":"Little Petya was given this problem for homework:You are given function (here represents the operation of taking the remainder). His task is to count the number of integers x in range [a;b] with property f(x)\u2009=\u2009x.It is a pity that Petya forgot the order in which the remainders should be taken and wrote down only 4 numbers. Each of 24 possible orders of taking the remainder has equal probability of being chosen. For example, if Petya has numbers 1, 2, 3, 4 then he can take remainders in that order or first take remainder modulo 4, then modulo 2, 3, 1. There also are 22 other permutations of these numbers that represent orders in which remainder can be taken. In this problem 4 numbers wrote down by Petya will be pairwise distinct.Now it is impossible for Petya to complete the task given by teacher but just for fun he decided to find the number of integers with property that probability that f(x)\u2009=\u2009x is not less than 31.4159265352718281828459045%. In other words, Petya will pick up the number x if there exist at least 7 permutations of numbers p1,\u2009p2,\u2009p3,\u2009p4, for which f(x)\u2009=\u2009x.","human_testcases":"[{\"input\": \"2 7 1 8 2 8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 30 40 50 0 100\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"31 41 59 26 17 43\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 2 3 4 0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 3 4 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 999 1000 30 40\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17 18 19 20 17 20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17 18 19 20 16 20\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"41 449 328 474 150 709\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"467 329 936 440 117 700\\r\\n\", \"output\": [\"212\"]}, {\"input\": \"258 811 952 491 931 993\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"823 431 359 590 153 899\\r\\n\", \"output\": [\"206\"]}, {\"input\": \"292 370 404 698 699 876\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"442 705 757 527 868 893\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"642 273 18 885 675 788\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"291 303 656 660 126 704\\r\\n\", \"output\": [\"165\"]}, {\"input\": \"225 862 522 617 630 725\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17 847 715 732 502 778\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"41 449 328 474 15724 19169\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"467 329 936 440 5705 28145\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"258 811 952 491 2995 11942\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"823 431 359 590 153 3902\\r\\n\", \"output\": [\"206\"]}, {\"input\": \"292 370 404 698 19718 19895\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"442 705 757 527 1869 19912\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"642 273 18 885 23811 28703\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"291 303 656 660 7711 15141\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"225 862 522 617 1246 1341\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17 847 715 732 778 27529\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"997 998 999 1000 0 31415\\r\\n\", \"output\": [\"997\"]}, {\"input\": \"1 2 3 4 0 31415\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"541 931 822 948 131 193\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"956 800 909 916 89 194\\r\\n\", \"output\": [\"106\"]}, {\"input\": \"735 794 942 991 419 490\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"818 926 827 575 153 395\\r\\n\", \"output\": [\"243\"]}, {\"input\": \"792 858 887 679 179 356\\r\\n\", \"output\": [\"178\"]}, {\"input\": \"937 683 742 515 366 373\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"616 747 501 875 146 264\\r\\n\", \"output\": [\"119\"]}, {\"input\": \"760 773 638 655 111 196\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"697 855 997 589 97 192\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"998 834 706 722 277 475\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"100 101 102 103 10 20\\r\\n\", \"output\": [\"11\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '735 794 942 991 419 490\\r\\n', 'output': ['72']}, {'input': '291 303 656 660 126 704\\r\\n', 'output': ['165']}, {'input': '20 30 40 50 0 100\\r\\n', 'output': ['20']}, {'input': '100 101 102 103 10 20\\r\\n', 'output': ['11']}, {'input': '17 847 715 732 502 778\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '1 2 999 1000 30 40\\r\\n', 'output': ['0']}, {'input': '760 773 638 655 111 196\\r\\n', 'output': ['86']}, {'input': '956 800 909 916 89 194\\r\\n', 'output': ['106']}, {'input': '17 847 715 732 778 27529\\r\\n', 'output': ['0']}, {'input': '1 2 3 4 0 31415\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '998 834 706 722 277 475\\r\\n', 'output': ['199']}, {'input': '956 800 909 916 89 194\\r\\n', 'output': ['106']}, {'input': '1 2 3 4 0 31415\\r\\n', 'output': ['1']}, {'input': '100 101 102 103 10 20\\r\\n', 'output': ['11']}, {'input': '642 273 18 885 675 788\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '2 7 1 8 2 8\\r\\n', 'output': ['0']}, {'input': '225 862 522 617 630 725\\r\\n', 'output': ['0']}, {'input': '956 800 909 916 89 194\\r\\n', 'output': ['106']}, {'input': '442 705 757 527 1869 19912\\r\\n', 'output': ['0']}, {'input': '998 834 706 722 277 475\\r\\n', 'output': ['199']}]","human_sample_testcases_5":"[{'input': '997 998 999 1000 0 31415\\r\\n', 'output': ['997']}, {'input': '41 449 328 474 150 709\\r\\n', 'output': ['0']}, {'input': '823 431 359 590 153 3902\\r\\n', 'output': ['206']}, {'input': '1 2 3 4 1 1\\r\\n', 'output': ['0']}, {'input': '442 705 757 527 868 893\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":70.0,"human_sample_branch_coverage_2":70.0,"human_sample_branch_coverage_3":70.0,"human_sample_branch_coverage_4":70.0,"human_sample_branch_coverage_5":90.0,"id":200,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":74.0} {"sample_inputs":"[\"5 2\\nNYNNY\", \"6 1\\n????NN\"]","input_specification":"The first line contains two integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u2009100, 0\u2009\u2264\u2009k\u2009\u2264\u2009n) \u2014 the number of episodes in the series and the dissatisfaction which should be checked. The second line contains the sequence which consists of n symbols \"Y\", \"N\" and \"?\". If the i-th symbol equals \"Y\", Stepan remembers that he has watched the episode number i. If the i-th symbol equals \"N\", Stepan remembers that he hasn't watched the epizode number i. If the i-th symbol equals \"?\", Stepan doesn't exactly remember if he has watched the episode number i or not.","src_uid":"5bd578d3da5837c259b222336a194d12","source_code":"import java.util.Scanner;\npublic class project{\n public static void main(String[]args){\n\tScanner s = new Scanner(System.in);\n\tint n = s.nextInt(), k = s.nextInt();\n\tString str = s.nextLine();\n\tstr = s.nextLine();\n\tint ans = 0;\n\tfor (int i = 0; i < n; ++i) {\n\t if (i == 0 || str.charAt(i - 1) != 'N') {\n\t int j = i;\n\t for (j = i; j < n; ++j) {\n\t if (str.charAt(j) == 'Y') {\n\t break;\n\t }\n\t if (j - i == k - 1 && (j + 1 == n || str.charAt(j + 1) != 'N')) {\n\t ans = 1;\n\t }\n\t }\n\t }\n\t}\n\tif (k == 0) {\n\t ans = 1;\n\t}\n\tfor (int i = 0; i < n; ++i) {\n\t for (int j = i; j < n && str.charAt(j) == 'N'; ++j) {\n\t if (j - i == k) {\n\t ans = 0;\n\t }\n\t }\n\t}\n\tif (ans == 1) {\n\t System.out.println(\"YES\");\n\t} else {\n\t System.out.println(\"NO\");\n\t}\n }\n}","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Java","notes":"NoteIn the first test Stepan remembers about all the episodes whether he has watched them or not. His dissatisfaction is 2, because he hasn't watch two episodes in a row \u2014 the episode number 3 and the episode number 4. The answer is \"YES\", because k\u2009=\u20092.In the second test k\u2009=\u20091, Stepan's dissatisfaction is greater than or equal to 2 (because he remembers that he hasn't watch at least two episodes in a row \u2014 number 5 and number 6), even if he has watched the episodes from the first to the fourth, inclusive.","output_specification":"If Stepan's dissatisfaction can be exactly equal to k, then print \"YES\" (without qoutes). Otherwise print \"NO\" (without qoutes).","description":"Well, the series which Stepan watched for a very long time, ended. In total, the series had n episodes. For each of them, Stepan remembers either that he definitely has watched it, or that he definitely hasn't watched it, or he is unsure, has he watched this episode or not. Stepan's dissatisfaction is the maximum number of consecutive series that Stepan did not watch.Your task is to determine according to Stepan's memories if his dissatisfaction could be exactly equal to k.","human_testcases":"[{\"input\": \"5 2\\r\\nNYNNY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 1\\r\\n????NN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 8\\r\\nNYNNY?YNNNNNN?NNNNNYNY?YYNYNN?NNNY??NNYNYNNNYNNNYNNNNNNNNY?NNNYNYN?NNNY?YY?NNYNN?NNNYNNYNNYN?NNYNYNN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 1\\r\\nNY???NY?Y?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20 7\\r\\nN?N??NNN?NNN?Y???Y??\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30 1\\r\\nNYYYNYYY?Y?YY?YYYYYYYYYYYYYNYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"40 14\\r\\nNNNNNNNNNNNNNNNNNYNNNNYNNYNNNNNNYNNNNNNN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"51 1\\r\\nYYYNYNYNNYYNNY?YNYYYYYYNNYNYN??NYNYYNYYYYYYNNYNNNYY\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"70 3\\r\\nYNNNYYYNY?YYNYYNYYN?NYYYYYYYYYYYYYNYYNNYYYYYYYNYYNNNY??YYNYYYYYYYYNYYN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"85 10\\r\\nYNNYNNNNNYNNNNNNNNNNNYNYYNNYNNNYYYNNNYYNNNNYNNNYNNNYNNNNNNNNNNNNN?NNNNYNNYYNNNNNNYNNN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"90 18\\r\\nNNNN?NNNNNYNYNYNNY?NNNNNNNNNNNNNNYNNNNNNYYNYYNNNNYNNNNNNNNNNNNNNNNNNNYNNYYNYNNNNNNNYNNNNYN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"99 2\\r\\nYNYYYYYYYYYYYN?YYNYYYYYYYYYYYYYY?YYYNYYYYYYYYYYYYYNYYYYYYNY?YYYYYNNYYYNYNYYYYNYYYYYYYYYYYNYY?NYYYYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 74\\r\\nNNNNNNNNNNNNNNNNNNNNNNNNYNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN?NNNNNNNNNNNN?NNNNNNNNNNNNNN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 19\\r\\nYYNN?NNNNNNNNNNNYNYYNYNNNNNNNNNNNNNNNNNNNNNNYNNNNNNNNYNNNNNNYNNYYNNNYNNNYNYNNYNNNYYNNNYNNN?NNNNN?YNN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 10\\r\\nNNNNYNNNYNNNNNNNNYNYNYNNNNNYNNNNNYNNNNNNNNNNNYNYYNNNNNNNYYNNYNYNNYYNNNNYNNNNNYNNNNYNNNNYNNY??YNNNNYY\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 4\\r\\nYYNNNNYYYNNNNNNYNYYYNYYNYYNNYYNNNNNNNYNYYNYYNNYNNNNNYN?YNYYYNNYNNNNNYNNNNYYNYYYYYNYNNNNYYNNNNYNNNNYY\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 2\\r\\nYYNNYYYNNYYYYYYYYYYYYYYYNYYYNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNYNYYYYYYNNYYYNYYNNYYNYYYYNYNYYYYYYNYYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 3\\r\\nYYYYYYYYNNNYNYNYYYYNY?YYYYYYNYYYNYYYYYYYYYYYYNNYYYYYNYNYYNYYYYYYYYYYYYYYYYYYY?YYNNYYNNYYYNYYYYYYYYYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 2\\r\\nYYYYYYYYYYYNYYYYYYYYYYYYYYYYYYYYYYYYYNYY?YYYYYYYYYYYYYYYNYYYYYYYYYYYYNNYYYYYYYYYNYYYYYYYYYYNYYYYYYYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 3\\r\\nNYNNYYYYYYNYNNYYYYYYNYYNYNYYYYYNYYYYYNNNYYYYYNYNYYNYYNYYNYNNNYYNYYYYYNYYYYYYNNYYNYNNYYNYYYY?YYNNYYNN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 26\\r\\nNNYNNNNNNNNNNNNN?NNNNNNNNNNNNNYNNNNYNNNNNNNNNNNNYNNNNNN?NNNYNNNNNNNNNNYYNNNNNNNNYNNNNNNNNYYYNNNNYYNY\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1\\r\\nY\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1\\r\\nN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\n?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0\\r\\n?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0\\r\\nN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0\\r\\nY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\n????????????????????????????????????????????????????????????????????????????????????????????????????\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 4\\r\\nNN??NN\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 3\\r\\nNNYYN?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 3\\r\\nN?YY???\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"24 4\\r\\nY?NYYNYYYNYYN?NNN?N?Y?Y?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3\\r\\n?Y?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 1\\r\\nNY???NY?Y?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20 8\\r\\nNNNYY?????NN???N?YN?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30 2\\r\\n??????????????????????????????\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"40 17\\r\\nNNNNNNNNNNNNNNNNNYNNNNYNNYNNNNNNYNNNNNNN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"51 5\\r\\nY??N????????Y??N?????N???N???YN?N?Y?N??Y?Y??Y???NN?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"70 3\\r\\nY?N?Y???NN?NY?N?YY?Y????YNYY?Y?N??Y????YY??N????NY?NYY?YY?YYYY?YY?N?Y?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"85 18\\r\\nNNNNNNN??Y???NN?YNNNNNNNN???YNNNNNN??Y?N?YNYYNN?NNNNNNNNNNNNNN????NNY??NNNN?NN??NNNNN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"90 15\\r\\nYNNNNN?NNYNNYNNNN?NNNNYNNY?NNNNNNN?NNNNNNYN?NNYNNNNNN?NNYYNNYN?NNN??NNNNYNNN?YN?NNNNYNN?NY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"99 1\\r\\nYYYYYYYNYYY??YY??YYYYYYY????NYY?YYY?Y??YYYY????YY?YY?YYY?YY??YYY?Y??NYYYY?YNYY??Y??YYYYY?YYY????YYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 34\\r\\n?NNNN??N???NNNN?NNN?N???N?N????NNNNNNN?N??N???NNNN???N?N?NN?NNNNN?NNN???N??NN??Y??NNN??N?NNN???NN?NN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 21\\r\\n?NNNNNYNN??NNN?N????N?NN?N??NN?NNNY?NN?NY?NN?NNN?NN?N?NNNNNNY?NYNN??N??NYNN?NN?NNNN?N???NN?NN?Y?NYNY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 10\\r\\nN?NNYYYNNNNNNYYNNYYNNNNNNNNYYNNNYYNNYNYNY?NNNNNNNNNYYNNNNYNNNNYNNNYNNYNNN?NNY?NNNNNNNNN?NYNYNNNNNNNN\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 6\\r\\n????????????????????????????????????????????????????????????????????????????????????????????????????\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 2\\r\\nYYNNYYYNNYYYYYYYYYYYYYYYNYYYNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNYNYYYYYYNNYYYNYYNNYYNYYYYNYNYYYYYYNYYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 1\\r\\n???Y??????????????????????????????????????Y?????????N???Y????????Y?????Y???????Y??Y??????????YY?????\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 1\\r\\nYYYYYYYYY??YYN?YYNYYYYYYYNYYYYYYYYYYY?YN?YYYYY?YYYYYYYYYYYYY?YYYYYYYYYYYYN?YYYYYYYY?YYYYY?YYNYYYYYNY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 3\\r\\n?YNNYYNYYYYYYNYYYYYNY?NNYYYYNYY??NYYNYNYYYY?YYNYYNYYYYYYYYYYNYYYYNYYYYNYYYYNYYNYYYYYYNYNYNYYYYYYNNYY\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 2\\r\\n?Y?\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 0\\r\\nN\\r\\n', 'output': ['NO']}, {'input': '51 1\\r\\nYYYNYNYNNYYNNY?YNYYYYYYNNYNYN??NYNYYNYYYYYYNNYNNNYY\\r\\n', 'output': ['NO']}, {'input': '100 10\\r\\nN?NNYYYNNNNNNYYNNYYNNNNNNNNYYNNNYYNNYNYNY?NNNNNNNNNYYNNNNYNNNNYNNNYNNYNNN?NNY?NNNNNNNNN?NYNYNNNNNNNN\\r\\n', 'output': ['YES']}, {'input': '100 34\\r\\n?NNNN??N???NNNN?NNN?N???N?N????NNNNNNN?N??N???NNNN???N?N?NN?NNNNN?NNN???N??NN??Y??NNN??N?NNN???NN?NN\\r\\n', 'output': ['YES']}, {'input': '1 0\\r\\nY\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '100 6\\r\\n????????????????????????????????????????????????????????????????????????????????????????????????????\\r\\n', 'output': ['YES']}, {'input': '100 26\\r\\nNNYNNNNNNNNNNNNN?NNNNNNNNNNNNNYNNNNYNNNNNNNNNNNNYNNNNNN?NNNYNNNNNNNNNNYYNNNNNNNNYNNNNNNNNYYYNNNNYYNY\\r\\n', 'output': ['NO']}, {'input': '100 1\\r\\nYYYYYYYYY??YYN?YYNYYYYYYYNYYYYYYYYYYY?YN?YYYYY?YYYYYYYYYYYYY?YYYYYYYYYYYYN?YYYYYYYY?YYYYY?YYNYYYYYNY\\r\\n', 'output': ['YES']}, {'input': '3 2\\r\\n?Y?\\r\\n', 'output': ['NO']}, {'input': '51 5\\r\\nY??N????????Y??N?????N???N???YN?N?Y?N??Y?Y??Y???NN?\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '20 7\\r\\nN?N??NNN?NNN?Y???Y??\\r\\n', 'output': ['YES']}, {'input': '100 8\\r\\nNYNNY?YNNNNNN?NNNNNYNY?YYNYNN?NNNY??NNYNYNNNYNNNYNNNNNNNNY?NNNYNYN?NNNY?YY?NNYNN?NNNYNNYNNYN?NNYNYNN\\r\\n', 'output': ['YES']}, {'input': '100 34\\r\\n?NNNN??N???NNNN?NNN?N???N?N????NNNNNNN?N??N???NNNN???N?N?NN?NNNNN?NNN???N??NN??Y??NNN??N?NNN???NN?NN\\r\\n', 'output': ['YES']}, {'input': '1 0\\r\\n?\\r\\n', 'output': ['YES']}, {'input': '100 4\\r\\nYYNNNNYYYNNNNNNYNYYYNYYNYYNNYYNNNNNNNYNYYNYYNNYNNNNNYN?YNYYYNNYNNNNNYNNNNYYNYYYYYNYNNNNYYNNNNYNNNNYY\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '100 10\\r\\nNNNNYNNNYNNNNNNNNYNYNYNNNNNYNNNNNYNNNNNNNNNNNYNYYNNNNNNNYYNNYNYNNYYNNNNYNNNNNYNNNNYNNNNYNNY??YNNNNYY\\r\\n', 'output': ['NO']}, {'input': '51 5\\r\\nY??N????????Y??N?????N???N???YN?N?Y?N??Y?Y??Y???NN?\\r\\n', 'output': ['YES']}, {'input': '7 3\\r\\nN?YY???\\r\\n', 'output': ['YES']}, {'input': '1 0\\r\\n?\\r\\n', 'output': ['YES']}, {'input': '90 15\\r\\nYNNNNN?NNYNNYNNNN?NNNNYNNY?NNNNNNN?NNNNNNYN?NNYNNNNNN?NNYYNNYN?NNN??NNNNYNNN?YN?NNNNYNN?NY\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '51 1\\r\\nYYYNYNYNNYYNNY?YNYYYYYYNNYNYN??NYNYYNYYYYYYNNYNNNYY\\r\\n', 'output': ['NO']}, {'input': '100 21\\r\\n?NNNNNYNN??NNN?N????N?NN?N??NN?NNNY?NN?NY?NN?NNN?NN?N?NNNNNNY?NYNN??N??NYNN?NN?NNNN?N???NN?NN?Y?NYNY\\r\\n', 'output': ['YES']}, {'input': '100 2\\r\\nYYYYYYYYYYYNYYYYYYYYYYYYYYYYYYYYYYYYYNYY?YYYYYYYYYYYYYYYNYYYYYYYYYYYYNNYYYYYYYYYNYYYYYYYYYYNYYYYYYYY\\r\\n', 'output': ['YES']}, {'input': '100 2\\r\\nYYNNYYYNNYYYYYYYYYYYYYYYNYYYNYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYNYNYYYYYYNNYYYNYYNNYYNYYYYNYNYYYYYYNYYY\\r\\n', 'output': ['YES']}, {'input': '5 2\\r\\nNYNNY\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":91.3,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":95.65,"human_sample_branch_coverage_1":96.43,"human_sample_branch_coverage_2":89.29,"human_sample_branch_coverage_3":96.43,"human_sample_branch_coverage_4":96.43,"human_sample_branch_coverage_5":85.71,"id":201,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.39,"human_sample_branch_coverage":92.858} {"sample_inputs":"[\"1 10 1 10 1\", \"1 5 6 10 1\"]","input_specification":"First string contains five integer numbers l, r, x, y, k (1\u2009\u2264\u2009l\u2009\u2264\u2009r\u2009\u2264\u2009107, 1\u2009\u2264\u2009x\u2009\u2264\u2009y\u2009\u2264\u2009107, 1\u2009\u2264\u2009k\u2009\u2264\u2009107).","src_uid":"1110d3671e9f77fd8d66dca6e74d2048","source_code":"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n\/* Name of the class has to be \"Main\" only if the class is public. *\/\npublic class Ideone\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t\/\/ your code goes here\n\t\tScanner scan=new Scanner(System.in);\n\t\tint l=scan.nextInt();\n\t\tint r=scan.nextInt();\n\t\tint x=scan.nextInt();\n\t\tint y=scan.nextInt();\n\t\tlong k=scan.nextInt();\n for(int i=x;i<=y;i++)\n if(k*i>=l&&k*i<=r){System.out.println(\"YES\");return;} \n \n System.out.println(\"NO\");\t\n\t\t\n\t}\n}","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Java","notes":null,"output_specification":"Print \"YES\" without quotes if a potion with efficiency exactly k can be bought in the store and \"NO\" without quotes otherwise. You can output each of the letters in any register.","description":"Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers\u00a0\u2014 amount of experience and cost. The efficiency of a potion is the ratio of the amount of experience to the cost. Efficiency may be a non-integer number.For each two integer numbers a and b such that l\u2009\u2264\u2009a\u2009\u2264\u2009r and x\u2009\u2264\u2009b\u2009\u2264\u2009y there is a potion with experience a and cost b in the store (that is, there are (r\u2009-\u2009l\u2009+\u20091)\u00b7(y\u2009-\u2009x\u2009+\u20091) potions).Kirill wants to buy a potion which has efficiency k. Will he be able to do this?","human_testcases":"[{\"input\": \"1 10 1 10 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 5 6 10 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1 1 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 100000 1 100000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 100000 1 100000 100001\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"25 10000 200 10000 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 100000 10 100000 50000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"91939 94921 10197 89487 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30518 58228 74071 77671 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"46646 79126 78816 91164 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30070 83417 92074 99337 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13494 17544 96820 99660 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"96918 97018 10077 86510 9\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13046 45594 14823 52475 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29174 40572 95377 97669 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"79894 92433 8634 86398 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"96022 98362 13380 94100 6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"79446 95675 93934 96272 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5440 46549 61481 99500 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"21569 53580 74739 87749 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"72289 78297 79484 98991 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"88417 96645 92742 98450 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"71841 96625 73295 77648 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"87969 99230 78041 94736 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4 1 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"150 150 1 2 100\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"99 100 1 100 50\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 7 3 6 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 10 1 10 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"36 36 5 7 6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"73 96 1 51 51\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3 1 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000000 10000000 1 100000 10000000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9222174 9829060 9418763 9955619 9092468\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"70 70 1 2 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 200 1 20 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 200000 65536 65536 65537\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15 15 1 100 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000000 10000000 1 10000000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 10 2 5 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"67 69 7 7 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100000 10000000 1 10000000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9 12 1 2 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5426234 6375745 2636512 8492816 4409404\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6134912 6134912 10000000 10000000 999869\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3 1 100 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000000 10000000 10 10000000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 4 1 100 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 13 1 4 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 10 100000 10000000 10000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 6 1 4 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1002 1003 1 2 1000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 5 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 6 1 5 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15 21 2 4 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 5 3 7 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15 15 3 4 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 6 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 10 3 6 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 10000000 1 10000000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 13 1 2 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"98112 98112 100000 100000 128850\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2 1 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 8 3 4 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"60 60 2 3 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"16 17 2 5 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4 1 3 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 5 1 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 10 3 4 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 10000000 999999 10000000 300\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 120 9 11 10\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 20 1 3 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 14 2 3 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2000 2001 1 3 1000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12 13 2 3 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 7 2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 8 1 10000000 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 5 1 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 5 1 6 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"200 300 4000381 4000382 4000381\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11 17 2 5 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9999999 10000000 1 10000000 999997\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 8 2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 7 3 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15 15 2 3 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"65408 65408 859 859 10000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1000000 10000000 1 100000 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 12 2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 8 1 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 4 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 3 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11 14 2 3 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 7 1 10 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"49 50 1 2 27\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 10000000 1 10000000 123456\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100000 10000000 100 10000000 100000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"17 19 2 3 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 6 3 9 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19 20 6 7 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5000000 10000000 1 4999999 1\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5000000 10000000 1 4999999 1\\r\\n', 'output': ['NO']}, {'input': '2 3 1 2 2\\r\\n', 'output': ['YES']}, {'input': '99 100 1 100 50\\r\\n', 'output': ['YES']}, {'input': '10 10 2 5 4\\r\\n', 'output': ['NO']}, {'input': '9222174 9829060 9418763 9955619 9092468\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '5440 46549 61481 99500 10\\r\\n', 'output': ['NO']}, {'input': '200 300 4000381 4000382 4000381\\r\\n', 'output': ['NO']}, {'input': '10000000 10000000 10 10000000 100000\\r\\n', 'output': ['YES']}, {'input': '60 60 2 3 25\\r\\n', 'output': ['NO']}, {'input': '91939 94921 10197 89487 1\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '10 10 100000 10000000 10000000\\r\\n', 'output': ['NO']}, {'input': '2 4 1 3 1\\r\\n', 'output': ['YES']}, {'input': '1 1 1 1 2\\r\\n', 'output': ['NO']}, {'input': '5426234 6375745 2636512 8492816 4409404\\r\\n', 'output': ['NO']}, {'input': '79446 95675 93934 96272 3\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '7 7 3 6 2\\r\\n', 'output': ['NO']}, {'input': '15 21 2 4 7\\r\\n', 'output': ['YES']}, {'input': '3 6 1 2 2\\r\\n', 'output': ['YES']}, {'input': '99 100 1 100 50\\r\\n', 'output': ['YES']}, {'input': '1 100000 1 100000 100001\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '10000000 10000000 1 100000 10000000\\r\\n', 'output': ['YES']}, {'input': '4 4 1 100 2\\r\\n', 'output': ['YES']}, {'input': '30518 58228 74071 77671 1\\r\\n', 'output': ['NO']}, {'input': '1 1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '11 17 2 5 2\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":202,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\nVKVK\", \"5\\nBVVKV\", \"7\\nVVKEVKK\", \"20\\nVKVKVVVKVOVKVQKKKVVK\", \"5\\nLIMAK\"]","input_specification":"The first line of the input contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u200975)\u00a0\u2014 the length of the string. The second line contains a string s, consisting of uppercase English letters. The length of the string is equal to n.","src_uid":"08444f9ab1718270b5ade46852b155d7","source_code":" \nimport java.util.*;\npublic class C_Bear_And_Company_3 {\n \t\n static int cv, ck , cs;\n static int[][] freq;\n static ArrayList[] pos;\n static int[][][][] dp;\n\n public static void main(String[] agrs) {\n \tScanner in = new Scanner(System.in);\n int n = in.nextInt();\n char[] c = in.next().toCharArray();\n cv = 0;\n ck = 0;\n cs = 0;\n freq = new int[n + 1][3];\n pos = new ArrayList[3];\n for (int i = 0; i < 3; i++) pos[i] = new ArrayList<>();\n int idx = 0;\n for (char x : c) {\n System.arraycopy(freq[idx], 0, freq[idx + 1], 0, 3);\n idx++;\n if (x == 'V') {\n freq[idx][0]++;\n cv++;\n pos[0].add(idx);\n } else if (x == 'K') {\n freq[idx][1]++;\n ck++;\n pos[1].add(idx);\n } else {\n freq[idx][2]++;\n cs++;\n pos[2].add(idx);\n }\n }\n dp = new int[cv + 1][ck + 1][cs + 1][3];\n for (int[][][] x : dp) for (int[][] y : x) for (int[] z : y) Arrays.fill(z, -1);\n System.out.println(dfs(0, 0, 0, 2));\n }\n\n static int dfs(int tv, int tk, int ts, int last) {\n if (tv == cv && tk == ck && ts == cs) {\n return 0;\n }\n if (dp[tv][tk][ts][last] != -1) return dp[tv][tk][ts][last];\n int ret = 1 << 29;\n if (tv < cv) {\n int p = pos[0].get(tv);\n int move = Math.max(freq[p][0] - tv, 0) + Math.max(freq[p][1] - tk, 0) + Math.max(freq[p][2] - ts, 0) - 1;\n ret = Math.min(ret, dfs(tv + 1, tk, ts, 0) + move);\n }\n if (tk < ck && last != 0) {\n int p = pos[1].get(tk);\n int move = Math.max(freq[p][0] - tv, 0) + Math.max(freq[p][1] - tk, 0) + Math.max(freq[p][2] - ts, 0) - 1;\n ret = Math.min(ret, dfs(tv, tk + 1, ts, 1) + move);\n }\n if (ts < cs) {\n int p = pos[2].get(ts);\n int move = Math.max(freq[p][0] - tv, 0) + Math.max(freq[p][1] - tk, 0) + Math.max(freq[p][2] - ts, 0) - 1;\n ret = Math.min(ret, dfs(tv, tk, ts + 1, 2) + move);\n }\n return dp[tv][tk][ts][last] = ret;\n }\n\n}\n","sample_outputs":"[\"3\", \"2\", \"3\", \"8\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first sample, the initial string is \"VKVK\". The minimum possible number of moves is 3. One optimal sequence of moves is: Swap two last letters. The string becomes \"VKKV\". Swap first two letters. The string becomes \"KVKV\". Swap the second and the third letter. The string becomes \"KKVV\". Indeed, this string doesn't have a substring \"VK\".In the second sample, there are two optimal sequences of moves. One is \"BVVKV\"\u2009\u2009\u2192\u2009\u2009\"VBVKV\"\u2009\u2009\u2192\u2009\u2009\"VVBKV\". The other is \"BVVKV\"\u2009\u2009\u2192\u2009\u2009\"BVKVV\"\u2009\u2009\u2192\u2009\u2009\"BKVVV\".In the fifth sample, no swaps are necessary.","output_specification":"Print one integer, denoting the minimum possible number of moves Limak can do, in order to obtain a string without a substring \"VK\".","description":"Bear Limak prepares problems for a programming competition. Of course, it would be unprofessional to mention the sponsor name in the statement. Limak takes it seriously and he is going to change some words. To make it still possible to read, he will try to modify each word as little as possible.Limak has a string s that consists of uppercase English letters. In one move he can swap two adjacent letters of the string. For example, he can transform a string \"ABBC\" into \"BABC\" or \"ABCB\" in one move.Limak wants to obtain a string without a substring \"VK\" (i.e. there should be no letter 'V' immediately followed by letter 'K'). It can be easily proved that it's possible for any initial string s.What is the minimum possible number of moves Limak can do?","human_testcases":"[{\"input\": \"4\\r\\nVKVK\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\nBVVKV\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\nVVKEVKK\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"20\\r\\nVKVKVVVKVOVKVQKKKVVK\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5\\r\\nLIMAK\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\nV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\nK\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\nZ\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17\\r\\nVAKVAKLIMAKVVVKKK\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\nVVKAVZVAAZ\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17\\r\\nQZVRZKDKMZZAKKZVA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"51\\r\\nAVVVVVVVVVVKKKKKKKKKKVVVVVVVVVVVVVVVKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"135\"]}, {\"input\": \"75\\r\\nVFZVZRVZAZJAKAZKAVVKZKVHZZZZAVAAKKAADKNAKRFKAAAZKZVAKAAAJAVKYAAZAKAVKASZAAK\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"75\\r\\nVVKAVKKVAKVXCKKZKKAVVVAKKKKVVKSKVVWVLEVVHVXKKKVKVJKVVVZVVKKKVVKVVVKKKVVKZKV\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"2\\r\\nVK\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\nKV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\nVKK\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\nKVV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75\\r\\nVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKV\\r\\n\", \"output\": [\"703\"]}, {\"input\": \"75\\r\\nVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKOOOKVKV\\r\\n\", \"output\": [\"175\"]}, {\"input\": \"6\\r\\nVVVKKK\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"7\\r\\nVVVKKKO\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"12\\r\\nVKVKVKVKVKVK\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"5\\r\\nVKOVK\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\nKKV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\nVVOKKK\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15\\r\\nVOKVOKVVKKKKKKK\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\nKKZKKVKZKV\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15\\r\\nVKKHKKKKZVKKVKV\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"22\\r\\nVKKVKVKKVKVKZKKVKVAKKK\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"46\\r\\nVVFVKKVAKVKKVGVKKKKZKKKKKKKAKKZKVVVVKKZVVKFVKK\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nKKAKVVNAVVVVKKVKKZVKKKKVKFTVVKKVVVVVZVLKKKKKKVKVVV\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"75\\r\\nVKVVKVKKKVVZKVZKVKVKVVKIAVKVVVKKKVDKVKKVKAKKAKNAKVZKAAVVAKUKVKKVKKVZVAKKKVV\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"75\\r\\nAJAKVZASUKAYZFSZRPAAVAGZKFZZHZZZKKKVLQAAVAHQHAZCVEZAAZZAAZIAAAZKKAAUKROVKAK\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"75\\r\\nKAVVZVKKVVKVKVLVVKKKVVAKVVKEVAVVKKVVKVDVVKKVKKVZKKAKKKVKVZAVVKKKZVVDKVVAKZV\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"75\\r\\nVKKVKKAKKKVVVVVZKKKKVKAVKKAZKKKKVKVVKVVKVVKCKKVVVVVZKKVKKKVKKKVVKVKVKOVVZKK\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"74\\r\\nVVVKVKKKAZVVVKKKKKVVVVKKVVVKKVAKVVVVVVKVKVKVVMVVKVVVKVKKVVVVVKVKKKVVVXKVVK\\r\\n\", \"output\": [\"66\"]}, {\"input\": \"74\\r\\nVJVKVUKVVVVVVKVLVKKVVKZVNZVKKVVVAVVVKKAKZKZVAZVVKVKKZKKVNAVAKVKKCVVVKKVKVV\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"75\\r\\nZXPZMAKZZZZZZAZXAZAAPOAFAZUZZAZABQZZAZZBZAAAZZFANYAAZZZZAZHZARACAAZAZDPCAVZ\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75\\r\\nVZVVVZAUVZZTZZCTJZAVZVSVAAACVAHZVVAFZSVVAZAZVXVKVZVZVVZTAZREOVZZEVAVBAVAAAF\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"75\\r\\nAZKZWAOZZLTZIZTAYKOALAAKKKZAASKAAZFHVZKZAAZUKAKZZBIAZZWAZZZZZPZZZRAZZZAZJZA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"52\\r\\nVAVBVCVDVEVFVGVHVIVJVKVLVMVNVOVPVQVRVSVTVUVVVWVXVYVZ\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"52\\r\\nAKBKCKDKEKFKGKHKIKJKKKLKMKNKOKPKQKRKSKTKUKVKWKXKYKZK\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"64\\r\\nVVKKVAVBVCVDVEVFVGVHVIVJVKVLVMVNVOVPVQVRVSVTVUVVVWVXVYVZVVVKKKKK\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"64\\r\\nVVKKAKBKCKDKEKFKGKHKIKJKKKLKMKNKOKPKQKRKSKTKUKVKWKXKYKZKVVVKKKKK\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"75\\r\\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"1406\"]}, {\"input\": \"75\\r\\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"1406\"]}, {\"input\": \"72\\r\\nAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"73\\r\\nAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKB\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"72\\r\\nAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKB\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"67\\r\\nVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKXVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKK\\r\\n\", \"output\": [\"213\"]}, {\"input\": \"57\\r\\nVVVVKKKKKKAAVVVVVVVVKKKKKKKVVVVVVVVVKKKKKKKKKKKKKKKKKKKKO\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"13\\r\\nVVVVKKAVVKVKK\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"65\\r\\nVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKK\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"67\\r\\nVVVVKKAVVKVKKVVVVKKAVVKVKKAOVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKK\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"52\\r\\nZVKVVKKKVKKZKZVKVVKKKVKKZKZVKVVKKKVKKZKZVKVVKKKVKKZK\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"63\\r\\nKKKVVVKAAKVVVTVVVKAUVKKKVKVKKVKVKVVKVKKVKVKKKQVKVVVKVKKVKKKKKKZ\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"75\\r\\nVVKVKKKVKVVKKKKKVVKKKKVVVKVKKKAVAKKKVVKVKEVVVVVVVVKKKKKVVVVVKVVVKKKVVKVVKVV\\r\\n\", \"output\": [\"114\"]}, {\"input\": \"75\\r\\nVVVVVKVKVVKKEVVVVVAKVKKZKVVPKKZKAVKVAKVMZKZVUVKKIVVZVVVKVKZVVVVKKVKVZZVOVKV\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"75\\r\\nVAKKVKVKKZVVZAVKKVKVZKKVKVVKKAVKKKVVZVKVKVKKKKVVVVKKVZKVVKKKVAKKZVKKVKVVKVK\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"75\\r\\nVVKVKKVZAVVKHKRAVKAKVKKVKKAAVKVVNZVKKKVVKMAVVKKWKKVVKVHKKVKVZVVKZZKVKVIKZVK\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"75\\r\\nKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75\\r\\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75\\r\\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVK\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"75\\r\\nKVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"38\\r\\nZKKKVVVVVVVVVVKKKKKEVVKKVVVKKKVVVVKKKK\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"74\\r\\nZKKKVVVVVVVVVVKKKKKEVVKKVVVKKKVVVVKKKKVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKK\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"71\\r\\nZKKKVVVVVVVKKKKKEVVKKVVVKKKVVVVKKKKVVVVVVVVKKKKKKKKKKKVVVVVVVVVVKKKKKKK\\r\\n\", \"output\": [\"153\"]}, {\"input\": \"68\\r\\nKKVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKV\\r\\n\", \"output\": [\"400\"]}, {\"input\": \"75\\r\\nKVVKCVKVVVVKVVVKVKVAVVMVVVVVKKVVVKVVVVVKKVVVVVKVVKVVVKKKKKVKKVKAVVVVVVVVVVK\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"74\\r\\nKKKZKVKKKKVKKKKVKVZKKKZKKKKKZKVKKZZKKBVKKVAKVKVKZVVKKKKKKKKKVKKVVKKVVKKKVK\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"75\\r\\nKVKVVKVKVKVVVVVKVKKKVKVVKVVKVVKKKKEKVVVKKKVVKVVVVVVVKKVKKVVVKAKVVKKVVVVVKUV\\r\\n\", \"output\": [\"103\"]}, {\"input\": \"75\\r\\nKKVVAVVVVKVKAVVAKVKVKVVVVKKKKKAZVKVKVKJVVVAKVVKKKVVVVZVAVVVZKVZAKVVVVVVVAKK\\r\\n\", \"output\": [\"18\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10\\r\\nKKZKKVKZKV\\r\\n', 'output': ['1']}, {'input': '1\\r\\nK\\r\\n', 'output': ['0']}, {'input': '57\\r\\nVVVVKKKKKKAAVVVVVVVVKKKKKKKVVVVVVVVVKKKKKKKKKKKKKKKKKKKKO\\r\\n', 'output': ['34']}, {'input': '71\\r\\nZKKKVVVVVVVKKKKKEVVKKVVVKKKVVVVKKKKVVVVVVVVKKKKKKKKKKKVVVVVVVVVVKKKKKKK\\r\\n', 'output': ['153']}, {'input': '74\\r\\nZKKKVVVVVVVVVVKKKKKEVVKKVVVKKKVVVVKKKKVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKK\\r\\n', 'output': ['98']}]","human_sample_testcases_2":"[{'input': '75\\r\\nZXPZMAKZZZZZZAZXAZAAPOAFAZUZZAZABQZZAZZBZAAAZZFANYAAZZZZAZHZARACAAZAZDPCAVZ\\r\\n', 'output': ['0']}, {'input': '10\\r\\nVVKAVZVAAZ\\r\\n', 'output': ['1']}, {'input': '65\\r\\nVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKKVVVVKKAVVKVKK\\r\\n', 'output': ['50']}, {'input': '75\\r\\nVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\\r\\n', 'output': ['0']}, {'input': '52\\r\\nAKBKCKDKEKFKGKHKIKJKKKLKMKNKOKPKQKRKSKTKUKVKWKXKYKZK\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '50\\r\\nKKAKVVNAVVVVKKVKKZVKKKKVKFTVVKKVVVVVZVLKKKKKKVKVVV\\r\\n', 'output': ['11']}, {'input': '17\\r\\nQZVRZKDKMZZAKKZVA\\r\\n', 'output': ['0']}, {'input': '75\\r\\nAJAKVZASUKAYZFSZRPAAVAGZKFZZHZZZKKKVLQAAVAHQHAZCVEZAAZZAAZIAAAZKKAAUKROVKAK\\r\\n', 'output': ['1']}, {'input': '74\\r\\nVJVKVUKVVVVVVKVLVKKVVKZVNZVKKVVVAVVVKKAKZKZVAZVVKVKKZKKVNAVAKVKKCVVVKKVKVV\\r\\n', 'output': ['19']}, {'input': '72\\r\\nAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKB\\r\\n', 'output': ['30']}]","human_sample_testcases_4":"[{'input': '75\\r\\nVVVVVKVKVVKKEVVVVVAKVKKZKVVPKKZKAVKVAKVMZKZVUVKKIVVZVVVKVKZVVVVKKVKVZZVOVKV\\r\\n', 'output': ['23']}, {'input': '2\\r\\nKV\\r\\n', 'output': ['0']}, {'input': '5\\r\\nLIMAK\\r\\n', 'output': ['0']}, {'input': '75\\r\\nKVVKCVKVVVVKVVVKVKVAVVMVVVVVKKVVVKVVVVVKKVVVVVKVVKVVVKKKKKVKKVKAVVVVVVVVVVK\\r\\n', 'output': ['71']}, {'input': '68\\r\\nKKVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKV\\r\\n', 'output': ['400']}]","human_sample_testcases_5":"[{'input': '75\\r\\nVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKVKV\\r\\n', 'output': ['703']}, {'input': '64\\r\\nVVKKVAVBVCVDVEVFVGVHVIVJVKVLVMVNVOVPVQVRVSVTVUVVVWVXVYVZVVVKKKKK\\r\\n', 'output': ['7']}, {'input': '51\\r\\nAVVVVVVVVVVKKKKKKKKKKVVVVVVVVVVVVVVVKKKKKKKKKKKKKKK\\r\\n', 'output': ['135']}, {'input': '72\\r\\nAVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK\\r\\n', 'output': ['35']}, {'input': '52\\r\\nZVKVVKKKVKKZKZVKVVKKKVKKZKZVKVVKKKVKKZKZVKVVKKKVKKZK\\r\\n', 'output': ['28']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":203,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"mew\", \"wuffuw\", \"qqqqqqqq\"]","input_specification":"The first line contains a non-empty string $$$s$$$ with length at most $$$50$$$ characters, containing lowercase English letters only.","src_uid":"6c85175d334f811617e7030e0403f706","source_code":"import java.util.HashSet;\nimport java.util.Scanner;\n\npublic class Nafis {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.next();\n int sz = str.length();\n HashSet freq = new HashSet<>();\n for (int i = 0; i <= sz \/ 2; i++) {\n if (str.charAt(i) == str.charAt(sz - i - 1)) {\n freq.add(str.charAt(i));\n continue;\n } else {\n System.out.println(sz);\n return;\n }\n }\n\n System.out.println(freq.size() == 1 ? 0 : sz - 1);\n\n }\n}","sample_outputs":"[\"3\", \"5\", \"0\"]","lang_cluster":"Java","notes":"Note\"mew\" is not a palindrome, so the longest substring of it that is not a palindrome, is the string \"mew\" itself. Thus, the answer for the first example is $$$3$$$.The string \"uffuw\" is one of the longest non-palindrome substrings (of length $$$5$$$) of the string \"wuffuw\", so the answer for the second example is $$$5$$$.All substrings of the string \"qqqqqqqq\" consist of equal characters so they are palindromes. This way, there are no non-palindrome substrings. Thus, the answer for the third example is $$$0$$$.","output_specification":"If there is such a substring in $$$s$$$ that is not a palindrome, print the maximum length of such a substring. Otherwise print $$$0$$$. Note that there can be multiple longest substrings that are not palindromes, but their length is unique.","description":"A string is a palindrome if it reads the same from the left to the right and from the right to the left. For example, the strings \"kek\", \"abacaba\", \"r\" and \"papicipap\" are palindromes, while the strings \"abb\" and \"iq\" are not.A substring $$$s[l \\ldots r]$$$ ($$$1\u2009\\leq\u2009l\u2009\\leq\u2009r\u2009\\leq\u2009|s|$$$) of a string $$$s\u2009=\u2009s_{1}s_{2} \\ldots s_{|s|}$$$ is the string $$$s_{l}s_{l\u2009+\u20091} \\ldots s_{r}$$$.Anna does not like palindromes, so she makes her friends call her Ann. She also changes all the words she reads in a similar way. Namely, each word $$$s$$$ is changed into its longest substring that is not a palindrome. If all the substrings of $$$s$$$ are palindromes, she skips the word at all.Some time ago Ann read the word $$$s$$$. What is the word she changed it into?","human_testcases":"[{\"input\": \"mew\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"wuffuw\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"qqqqqqqq\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"ijvji\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"iiiiiii\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"wobervhvvkihcuyjtmqhaaigvvgiaahqmtjyuchikvvhvrebow\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"wobervhvvkihcuyjtmqhaaigvahheoqleromusrartldojsjvy\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"ijvxljt\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"fyhcncnchyf\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"ffffffffffff\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"fyhcncfsepqj\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"ybejrrlbcinttnicblrrjeby\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"yyyyyyyyyyyyyyyyyyyyyyyyy\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"ybejrrlbcintahovgjddrqatv\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"oftmhcmclgyqaojljoaqyglcmchmtfo\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"oooooooooooooooooooooooooooooooo\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"oftmhcmclgyqaojllbotztajglsmcilv\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"gxandbtgpbknxvnkjaajknvxnkbpgtbdnaxg\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"gggggggggggggggggggggggggggggggggggg\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"gxandbtgpbknxvnkjaygommzqitqzjfalfkk\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"fcliblymyqckxvieotjooojtoeivxkcqymylbilcf\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"fffffffffffffffffffffffffffffffffffffffffff\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"fcliblymyqckxvieotjootiqwtyznhhvuhbaixwqnsy\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"rajccqwqnqmshmerpvjyfepxwpxyldzpzhctqjnstxyfmlhiy\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"a\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"abca\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaabaaaaa\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"aba\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"asaa\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aabaa\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aabbaa\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"abcdaaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aaholaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"abcdefghijka\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"aaadcba\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aaaabaaaa\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"abaa\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"abcbaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"ab\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"l\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"aaaabcaaaa\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"abbaaaaaabba\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"abaaa\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"baa\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"aaaaaaabbba\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"ccbcc\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"bbbaaab\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"abaaaaaaaa\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"abaaba\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"aabsdfaaaa\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"aaaba\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"aaabaaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"baaabbb\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"ccbbabbcc\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"cabc\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aabcd\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"abcdea\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"bbabb\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaabababaaaaa\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"bbabbb\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"aababd\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abaaaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"aaaaaaaabbba\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"aabca\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"aaabccbaaa\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaab\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"babb\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"abcaa\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"qwqq\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaaaaaaaabbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"aaab\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaaabaaaaa\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"wwuww\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaabcbaaaaa\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"aaabbbaaa\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"aabcbaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abccdefccba\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"aabbcbbaa\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"aaaabbaaaa\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"aabcda\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abbca\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"aaaaaabbaaa\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"sssssspssssss\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"sdnmsdcs\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"aaabbbccbbbaaa\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"cbdbdc\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abb\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"abcdefaaaa\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"abbbaaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"v\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"abccbba\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"axyza\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"abcdefgaaaa\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"aaabcdaaa\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"aaaacaaaa\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"abbbaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abcdee\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"oom\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"aabcaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abba\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"aaca\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aacbca\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"ababa\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"abcda\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"cccaaccc\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aaabcda\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"aabaaaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"abbaaaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aaabcbaaa\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"aabba\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"xyxx\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aaaaaaaaaaaabc\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"bbaaaabb\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"aaabaa\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"sssssabsssss\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"bbbaaaabbb\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"abbbbaaaa\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"wwufuww\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"oowoo\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"cccaccc\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"aaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"bbbcc\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"abcdef\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"abbba\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"aab\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"aaba\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"azbyaaa\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"oooooiooooo\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"aabbbbbaaaaaa\\r\\n\", \"output\": [\"13\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'aaabcda\\r\\n', 'output': ['7']}, {'input': 'abbaaaaaabba\\r\\n', 'output': ['11']}, {'input': 'oftmhcmclgyqaojljoaqyglcmchmtfo\\r\\n', 'output': ['30']}, {'input': 'aabca\\r\\n', 'output': ['5']}, {'input': 'abcda\\r\\n', 'output': ['5']}]","human_sample_testcases_2":"[{'input': 'abcdefgaaaa\\r\\n', 'output': ['11']}, {'input': 'abcaa\\r\\n', 'output': ['5']}, {'input': 'aabbbbbaaaaaa\\r\\n', 'output': ['13']}, {'input': 'aabaa\\r\\n', 'output': ['4']}, {'input': 'yyyyyyyyyyyyyyyyyyyyyyyyy\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': 'ababa\\r\\n', 'output': ['4']}, {'input': 'cabc\\r\\n', 'output': ['4']}, {'input': 'abbbaaa\\r\\n', 'output': ['7']}, {'input': 'sssssspssssss\\r\\n', 'output': ['12']}, {'input': 'abbaaaaaabba\\r\\n', 'output': ['11']}]","human_sample_testcases_4":"[{'input': 'abaaaaaaaa\\r\\n', 'output': ['10']}, {'input': 'abba\\r\\n', 'output': ['3']}, {'input': 'aabcd\\r\\n', 'output': ['5']}, {'input': 'abbbaaa\\r\\n', 'output': ['7']}, {'input': 'aacbca\\r\\n', 'output': ['6']}]","human_sample_testcases_5":"[{'input': 'rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\\r\\n', 'output': ['0']}, {'input': 'yyyyyyyyyyyyyyyyyyyyyyyyy\\r\\n', 'output': ['0']}, {'input': 'aba\\r\\n', 'output': ['2']}, {'input': 'cabc\\r\\n', 'output': ['4']}, {'input': 'aaaaabababaaaaa\\r\\n', 'output': ['14']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":100.0,"id":204,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":89.998} {"sample_inputs":"[\"1f\", \"2d\", \"4a\", \"5e\"]","input_specification":"The only line of input contains a description of Vasya's seat in the format ns, where n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) is the index of the row and s is the seat in this row, denoted as letter from 'a' to 'f'. The index of the row and the seat are not separated by a space.","src_uid":"069d0cb9b7c798a81007fb5b63fa0f45","source_code":"import java.util.*;\nimport java.math.*;\nimport java.io.*;\npublic class FoodOnThePlane {\n\tpublic static void main(String args[]) throws Exception {\n\t\tBufferedReader s = new BufferedReader(new InputStreamReader(System.in));\n\t\t\/\/BufferedReader s = new BufferedReader(new FileReader(\"*.in\"));\n\t\t\/\/PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"*.out\")));\n\t\t\/\/StringTokenizer st = new StringTokenizer(s.readLine());\n\t\tString y = s.readLine();\n\t\tlong row = Long.parseLong(y.substring(0, y.length()-1));\n\t\tint col = y.charAt(y.length()-1) - 'a';\n\t\tlong secs = 0;\n\t\tif(row == 1)secs = 0;\n\t\telse if (row == 2)secs = 7;\n\t\telse {\n\t\t\tlong remainder = row % 4;\n\t\t\tif(remainder == 1){\n\t\t\t\tsecs = ((row - 1) \/ 4) * 16;\n\t\t\t} else if (remainder == 3){\n\t\t\t\tsecs = ((row - 3)\/4) * 16;\n\t\t\t} else if (remainder == 2){\n\t\t\t\tsecs = ((((row + 2) \/ 4)-1) * 16)+7;\n\t\t\t} else {\n\t\t\t\tsecs = (((row \/ 4)-1) * 16)+7;\n\t\t\t}\n\t\t}\n\t\tif(col == 0){\n\t\t\tsecs += 4;\n\t\t} else if(col == 1){\n\t\t\tsecs += 5;\n\t\t} else if(col == 2){\n\t\t\tsecs += 6;\n\t\t} else if(col == 3){\n\t\t\tsecs += 3;\n\t\t} else if(col == 4){\n\t\t\tsecs += 2;\n\t\t} else {\n\t\t\tsecs+=1;\n\t\t}\n\t\tSystem.out.println(secs);\n\t}\n}\n","sample_outputs":"[\"1\", \"10\", \"11\", \"18\"]","lang_cluster":"Java","notes":"NoteIn the first sample, the first flight attendant serves Vasya first, so Vasya gets his lunch after 1 second.In the second sample, the flight attendants will spend 6 seconds to serve everyone in the rows 1 and 3, then they will move one row forward in 1 second. As they first serve seats located to the right of the aisle in order from window to aisle, Vasya has to wait 3 more seconds. The total is 6\u2009+\u20091\u2009+\u20093\u2009=\u200910.","output_specification":"Print one integer\u00a0\u2014 the number of seconds Vasya has to wait until he gets his lunch.","description":"A new airplane SuperPuperJet has an infinite number of rows, numbered with positive integers starting with 1 from cockpit to tail. There are six seats in each row, denoted with letters from 'a' to 'f'. Seats 'a', 'b' and 'c' are located to the left of an aisle (if one looks in the direction of the cockpit), while seats 'd', 'e' and 'f' are located to the right. Seats 'a' and 'f' are located near the windows, while seats 'c' and 'd' are located near the aisle. \u00a0It's lunch time and two flight attendants have just started to serve food. They move from the first rows to the tail, always maintaining a distance of two rows from each other because of the food trolley. Thus, at the beginning the first attendant serves row 1 while the second attendant serves row 3. When both rows are done they move one row forward: the first attendant serves row 2 while the second attendant serves row 4. Then they move three rows forward and the first attendant serves row 5 while the second attendant serves row 7. Then they move one row forward again and so on.Flight attendants work with the same speed: it takes exactly 1 second to serve one passenger and 1 second to move one row forward. Each attendant first serves the passengers on the seats to the right of the aisle and then serves passengers on the seats to the left of the aisle (if one looks in the direction of the cockpit). Moreover, they always serve passengers in order from the window to the aisle. Thus, the first passenger to receive food in each row is located in seat 'f', and the last one\u00a0\u2014 in seat 'c'. Assume that all seats are occupied.Vasya has seat s in row n and wants to know how many seconds will pass before he gets his lunch.","human_testcases":"[{\"input\": \"1f\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2d\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4a\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"5e\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"2c\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1b\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000000000d\\r\\n\", \"output\": [\"3999999999999999994\"]}, {\"input\": \"999999999999999997a\\r\\n\", \"output\": [\"3999999999999999988\"]}, {\"input\": \"1c\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1d\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1e\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1a\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2a\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"2b\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"2e\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2f\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3a\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3b\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3c\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3d\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3e\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3f\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4b\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"4c\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"4d\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4e\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4f\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"999999997a\\r\\n\", \"output\": [\"3999999988\"]}, {\"input\": \"999999997b\\r\\n\", \"output\": [\"3999999989\"]}, {\"input\": \"999999997c\\r\\n\", \"output\": [\"3999999990\"]}, {\"input\": \"999999997d\\r\\n\", \"output\": [\"3999999987\"]}, {\"input\": \"999999997e\\r\\n\", \"output\": [\"3999999986\"]}, {\"input\": \"999999997f\\r\\n\", \"output\": [\"3999999985\"]}, {\"input\": \"999999998a\\r\\n\", \"output\": [\"3999999995\"]}, {\"input\": \"999999998b\\r\\n\", \"output\": [\"3999999996\"]}, {\"input\": \"999999998c\\r\\n\", \"output\": [\"3999999997\"]}, {\"input\": \"999999998d\\r\\n\", \"output\": [\"3999999994\"]}, {\"input\": \"999999998e\\r\\n\", \"output\": [\"3999999993\"]}, {\"input\": \"999999998f\\r\\n\", \"output\": [\"3999999992\"]}, {\"input\": \"999999999a\\r\\n\", \"output\": [\"3999999988\"]}, {\"input\": \"999999999b\\r\\n\", \"output\": [\"3999999989\"]}, {\"input\": \"999999999c\\r\\n\", \"output\": [\"3999999990\"]}, {\"input\": \"999999999d\\r\\n\", \"output\": [\"3999999987\"]}, {\"input\": \"999999999e\\r\\n\", \"output\": [\"3999999986\"]}, {\"input\": \"999999999f\\r\\n\", \"output\": [\"3999999985\"]}, {\"input\": \"1000000000a\\r\\n\", \"output\": [\"3999999995\"]}, {\"input\": \"1000000000b\\r\\n\", \"output\": [\"3999999996\"]}, {\"input\": \"1000000000c\\r\\n\", \"output\": [\"3999999997\"]}, {\"input\": \"1000000000d\\r\\n\", \"output\": [\"3999999994\"]}, {\"input\": \"1000000000e\\r\\n\", \"output\": [\"3999999993\"]}, {\"input\": \"1000000000f\\r\\n\", \"output\": [\"3999999992\"]}, {\"input\": \"100000b\\r\\n\", \"output\": [\"399996\"]}, {\"input\": \"100000f\\r\\n\", \"output\": [\"399992\"]}, {\"input\": \"100001d\\r\\n\", \"output\": [\"400003\"]}, {\"input\": \"100001e\\r\\n\", \"output\": [\"400002\"]}, {\"input\": \"100001f\\r\\n\", \"output\": [\"400001\"]}, {\"input\": \"100002a\\r\\n\", \"output\": [\"400011\"]}, {\"input\": \"100002b\\r\\n\", \"output\": [\"400012\"]}, {\"input\": \"100002d\\r\\n\", \"output\": [\"400010\"]}, {\"input\": \"1231273a\\r\\n\", \"output\": [\"4925092\"]}, {\"input\": \"82784f\\r\\n\", \"output\": [\"331128\"]}, {\"input\": \"88312c\\r\\n\", \"output\": [\"353245\"]}, {\"input\": \"891237e\\r\\n\", \"output\": [\"3564946\"]}, {\"input\": \"999999999999999997b\\r\\n\", \"output\": [\"3999999999999999989\"]}, {\"input\": \"999999999999999997c\\r\\n\", \"output\": [\"3999999999999999990\"]}, {\"input\": \"999999999999999997d\\r\\n\", \"output\": [\"3999999999999999987\"]}, {\"input\": \"999999999999999997e\\r\\n\", \"output\": [\"3999999999999999986\"]}, {\"input\": \"999999999999999997f\\r\\n\", \"output\": [\"3999999999999999985\"]}, {\"input\": \"999999999999999998a\\r\\n\", \"output\": [\"3999999999999999995\"]}, {\"input\": \"999999999999999998b\\r\\n\", \"output\": [\"3999999999999999996\"]}, {\"input\": \"999999999999999998c\\r\\n\", \"output\": [\"3999999999999999997\"]}, {\"input\": \"999999999999999998d\\r\\n\", \"output\": [\"3999999999999999994\"]}, {\"input\": \"999999999999999998e\\r\\n\", \"output\": [\"3999999999999999993\"]}, {\"input\": \"999999999999999998f\\r\\n\", \"output\": [\"3999999999999999992\"]}, {\"input\": \"999999999999999999a\\r\\n\", \"output\": [\"3999999999999999988\"]}, {\"input\": \"999999999999999999b\\r\\n\", \"output\": [\"3999999999999999989\"]}, {\"input\": \"999999999999999999c\\r\\n\", \"output\": [\"3999999999999999990\"]}, {\"input\": \"999999999999999999d\\r\\n\", \"output\": [\"3999999999999999987\"]}, {\"input\": \"1000000000000000000a\\r\\n\", \"output\": [\"3999999999999999995\"]}, {\"input\": \"1000000000000000000e\\r\\n\", \"output\": [\"3999999999999999993\"]}, {\"input\": \"1000000000000000000f\\r\\n\", \"output\": [\"3999999999999999992\"]}, {\"input\": \"1000000000000000000c\\r\\n\", \"output\": [\"3999999999999999997\"]}, {\"input\": \"97a\\r\\n\", \"output\": [\"388\"]}, {\"input\": \"6f\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"7f\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"7e\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"999999999999999992c\\r\\n\", \"output\": [\"3999999999999999965\"]}, {\"input\": \"7a\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"8f\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"999999999999999992a\\r\\n\", \"output\": [\"3999999999999999963\"]}, {\"input\": \"999999999999999992b\\r\\n\", \"output\": [\"3999999999999999964\"]}, {\"input\": \"999999999999999992c\\r\\n\", \"output\": [\"3999999999999999965\"]}, {\"input\": \"999999999999999992d\\r\\n\", \"output\": [\"3999999999999999962\"]}, {\"input\": \"999999999999999992e\\r\\n\", \"output\": [\"3999999999999999961\"]}, {\"input\": \"999999999999999992f\\r\\n\", \"output\": [\"3999999999999999960\"]}, {\"input\": \"999999999999999993a\\r\\n\", \"output\": [\"3999999999999999972\"]}, {\"input\": \"999999999999999993b\\r\\n\", \"output\": [\"3999999999999999973\"]}, {\"input\": \"999999999999999993c\\r\\n\", \"output\": [\"3999999999999999974\"]}, {\"input\": \"999999999999999993d\\r\\n\", \"output\": [\"3999999999999999971\"]}, {\"input\": \"999999999999999993e\\r\\n\", \"output\": [\"3999999999999999970\"]}, {\"input\": \"999999999999999993f\\r\\n\", \"output\": [\"3999999999999999969\"]}, {\"input\": \"999999999999999994a\\r\\n\", \"output\": [\"3999999999999999979\"]}, {\"input\": \"999999999999999994b\\r\\n\", \"output\": [\"3999999999999999980\"]}, {\"input\": \"999999999999999994c\\r\\n\", \"output\": [\"3999999999999999981\"]}, {\"input\": \"999999999999999994d\\r\\n\", \"output\": [\"3999999999999999978\"]}, {\"input\": \"999999999999999994e\\r\\n\", \"output\": [\"3999999999999999977\"]}, {\"input\": \"999999999999999994f\\r\\n\", \"output\": [\"3999999999999999976\"]}, {\"input\": \"999999999999999995a\\r\\n\", \"output\": [\"3999999999999999972\"]}, {\"input\": \"999999999999999995b\\r\\n\", \"output\": [\"3999999999999999973\"]}, {\"input\": \"999999999999999995c\\r\\n\", \"output\": [\"3999999999999999974\"]}, {\"input\": \"999999999999999995d\\r\\n\", \"output\": [\"3999999999999999971\"]}, {\"input\": \"999999999999999995e\\r\\n\", \"output\": [\"3999999999999999970\"]}, {\"input\": \"999999999999999995f\\r\\n\", \"output\": [\"3999999999999999969\"]}, {\"input\": \"10a\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"11f\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"681572647b\\r\\n\", \"output\": [\"2726290581\"]}, {\"input\": \"23f\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"123a\\r\\n\", \"output\": [\"484\"]}, {\"input\": \"999999888888777777a\\r\\n\", \"output\": [\"3999999555555111108\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999999999e\\r\\n', 'output': ['3999999986']}, {'input': '100001d\\r\\n', 'output': ['400003']}, {'input': '999999999999999994d\\r\\n', 'output': ['3999999999999999978']}, {'input': '11f\\r\\n', 'output': ['33']}, {'input': '999999999999999997a\\r\\n', 'output': ['3999999999999999988']}]","human_sample_testcases_2":"[{'input': '999999999a\\r\\n', 'output': ['3999999988']}, {'input': '999999999999999993e\\r\\n', 'output': ['3999999999999999970']}, {'input': '3c\\r\\n', 'output': ['6']}, {'input': '8f\\r\\n', 'output': ['24']}, {'input': '4c\\r\\n', 'output': ['13']}]","human_sample_testcases_3":"[{'input': '999999999999999993e\\r\\n', 'output': ['3999999999999999970']}, {'input': '2c\\r\\n', 'output': ['13']}, {'input': '3d\\r\\n', 'output': ['3']}, {'input': '999999999999999994a\\r\\n', 'output': ['3999999999999999979']}, {'input': '999999999999999999a\\r\\n', 'output': ['3999999999999999988']}]","human_sample_testcases_4":"[{'input': '999999997d\\r\\n', 'output': ['3999999987']}, {'input': '999999999999999999c\\r\\n', 'output': ['3999999999999999990']}, {'input': '4b\\r\\n', 'output': ['12']}, {'input': '1e\\r\\n', 'output': ['2']}, {'input': '2f\\r\\n', 'output': ['8']}]","human_sample_testcases_5":"[{'input': '8f\\r\\n', 'output': ['24']}, {'input': '1a\\r\\n', 'output': ['4']}, {'input': '999999999b\\r\\n', 'output': ['3999999989']}, {'input': '999999999999999999d\\r\\n', 'output': ['3999999999999999987']}, {'input': '999999888888777777a\\r\\n', 'output': ['3999999555555111108']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":89.29,"human_sample_line_coverage_2":89.29,"human_sample_line_coverage_3":89.29,"human_sample_line_coverage_4":92.86,"human_sample_line_coverage_5":89.29,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":80.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":80.0,"id":205,"human_sample_pass_rate":100.0,"human_sample_line_coverage":90.004,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"2 2 1 0 0 1\", \"2 2 10 11 0 1\", \"2 4 3 -1 3 7\"]","input_specification":"The only line contains integers a, b, x1, y1, x2 and y2 \u2014 the parameters of the bad squares, the coordinates of the initial and the final squares correspondingly (2\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009109 and |x1|,|y1|,|x2|,|y2|\u2009\u2264\u2009109). It is guaranteed that the initial and the final square aren't bad.","src_uid":"7219d1837c83b5920992aee5a60dc0d9","source_code":"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n void solve(Scanner in, PrintWriter out) {\n\n int a = in.nextInt();\n int b = in.nextInt();\n int x1 = in.nextInt();\n int y1 = in.nextInt();\n int x2 = in.nextInt();\n int y2 = in.nextInt();\n\n int n1 = Math.floorDiv(x1 + y1, 2 * a);\n int m1 = Math.floorDiv(x1 - y1, 2 * b);\n int n2 = Math.floorDiv(x2 + y2, 2 * a);\n int m2 = Math.floorDiv(x2 - y2, 2 * b);\n\n int res = Math.max(Math.abs(n2 - n1), Math.abs(m2 - m1));\n\n out.print(res);\n }\n\n void run() {\n try (Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n\n solve(in, out);\n }\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n}\n","sample_outputs":"[\"1\", \"5\", \"2\"]","lang_cluster":"Java","notes":"NoteIn the third sample one of the possible paths in (3;-1)->(3;0)->(3;1)->(3;2)->(4;2)->(4;3)->(4;4)->(4;5)->(4;6)->(4;7)->(3;7). Squares (3;1) and (4;4) are bad.","output_specification":"Print a single number \u2014 the minimum number of bad cells that one will have to visit in order to travel from square (x1; y1) to square (x2; y2).","description":"You are given an infinite checkered field. You should get from a square (x1; y1) to a square (x2; y2). Using the shortest path is not necessary. You can move on the field squares in four directions. That is, when you are positioned in any square, you can move to any other side-neighboring one. A square (x; y) is considered bad, if at least one of the two conditions is fulfilled: |x\u2009+\u2009y|\u2009\u2261\u20090 (mod\u00a02a), |x\u2009-\u2009y|\u2009\u2261\u20090 (mod\u00a02b). Your task is to find the minimum number of bad cells one will have to visit on the way from (x1; y1) to (x2; y2).","human_testcases":"[{\"input\": \"2 2 1 0 0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2 10 11 0 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 4 3 -1 3 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2 9 10 -10 -11\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3 2 -11 -10 10 11\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3 2 11 -12 -12 11\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"3 3 12 11 -12 -11\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 3 -12 13 13 -12\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 4 -8 5 6 -3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 3 2 -1 -10 -1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 4 3 2 10 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2 -8 -9 -14 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 4 0 -3 11 -4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 3 6 3 3 12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 5 -4 -7 5 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 5 -20 19 21 16\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5 6 23 -10 -20 -17\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 2 8 -25 0 25\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"7 7 23 28 -20 -27\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7 7 -30 -29 32 31\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 8 35 -36 -34 33\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2 9 37 34 -38 -37\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"10 8 -44 41 43 -38\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"8 9 8 -23 31 -46\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"11 10 9 -40 37 -56\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11 5 -71 44 -18 -21\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"6 13 -37 12 3 60\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"14 9 44 45 -50 -9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"14 16 1967781 241814 1873488 -829353\\r\\n\", \"output\": [\"41624\"]}, {\"input\": \"8 12 -14763515 -11730382 -1343471 -4020758\\r\\n\", \"output\": [\"1320604\"]}, {\"input\": \"18 17 -26078453 -12853708 26705417 -4593122\\r\\n\", \"output\": [\"1695679\"]}, {\"input\": \"5 18 41299309 8851928 -40049166 -35564497\\r\\n\", \"output\": [\"12576490\"]}, {\"input\": \"7 20 10771554 -46099323 39192337 54007626\\r\\n\", \"output\": [\"9180553\"]}, {\"input\": \"21 24 31005425 54491054 -24732944 -61529693\\r\\n\", \"output\": [\"4089503\"]}, {\"input\": \"24 27 -57405669 -65437426 56079726 56139299\\r\\n\", \"output\": [\"4897128\"]}, {\"input\": \"17 22 72042304 -75756269 -70969649 64115614\\r\\n\", \"output\": [\"6429178\"]}, {\"input\": \"31 29 73305636 76203147 -85238444 -86730133\\r\\n\", \"output\": [\"5185118\"]}, {\"input\": \"34 19 -95432112 102651275 96089919 -106537520\\r\\n\", \"output\": [\"10545022\"]}, {\"input\": \"26 34 -107153659 6976200 34136365 -95904822\\r\\n\", \"output\": [\"3590751\"]}, {\"input\": \"38 5 -13548447 534376 64966608 -29272371\\r\\n\", \"output\": [\"10832180\"]}, {\"input\": \"42 45 13921918 62207801 80023961 -85820354\\r\\n\", \"output\": [\"2379224\"]}, {\"input\": \"15 11 -140506021 21571904 -148280972 64286933\\r\\n\", \"output\": [\"2294999\"]}, {\"input\": \"53 50 -120558789 -138770904 4229051 102239338\\r\\n\", \"output\": [\"3450925\"]}, {\"input\": \"29 54 16062290 129524399 -84381788 132177911\\r\\n\", \"output\": [\"1686044\"]}, {\"input\": \"12 63 100712190 36906101 87205943 82885374\\r\\n\", \"output\": [\"1353043\"]}, {\"input\": \"66 39 -170201625 -169447104 166170410 181151513\\r\\n\", \"output\": [\"5204323\"]}, {\"input\": \"72 75 182000846 -19533501 -166922752 -142084479\\r\\n\", \"output\": [\"3274129\"]}, {\"input\": \"55 22 189761193 -192020216 -153412991 188486816\\r\\n\", \"output\": [\"16447301\"]}, {\"input\": \"86 84 -65173069 221707138 155388823 -224274366\\r\\n\", \"output\": [\"3967520\"]}, {\"input\": \"77 101 -241379320 -196400933 220541904 214436435\\r\\n\", \"output\": [\"5667263\"]}, {\"input\": \"70 110 221139524 -236077945 -236283510 205078897\\r\\n\", \"output\": [\"4084454\"]}, {\"input\": \"18 116 231579605 226020224 -214399491 -217631436\\r\\n\", \"output\": [\"24711966\"]}, {\"input\": \"133 122 -258888058 250173335 258738451 -242389122\\r\\n\", \"output\": [\"4140119\"]}, {\"input\": \"127 88 66407013 205897916 133496817 264883406\\r\\n\", \"output\": [\"496360\"]}, {\"input\": \"146 157 261464154 113810381 214579048 -202712885\\r\\n\", \"output\": [\"1244549\"]}, {\"input\": \"148 163 -62225702 -294347345 -98578232 214557359\\r\\n\", \"output\": [\"1672568\"]}, {\"input\": \"7 179 -249546082 207791883 267735483 49881404\\r\\n\", \"output\": [\"25669363\"]}, {\"input\": \"125 204 91089644 83192699 -300075653 54365352\\r\\n\", \"output\": [\"1679971\"]}, {\"input\": \"216 218 15106122 259371253 296596165 -45704666\\r\\n\", \"output\": [\"1345335\"]}, {\"input\": \"207 226 -194940280 130461973 246251465 260969752\\r\\n\", \"output\": [\"1380917\"]}, {\"input\": \"267 263 -291849914 -111930623 344642355 250706518\\r\\n\", \"output\": [\"1871029\"]}, {\"input\": \"288 40 338359015 273791206 -341021431 56950660\\r\\n\", \"output\": [\"5781749\"]}, {\"input\": \"321 30 46954660 -343679003 -37851471 373573736\\r\\n\", \"output\": [\"13367648\"]}, {\"input\": \"356 10 97627462 341324361 -132835544 -334849729\\r\\n\", \"output\": [\"22285554\"]}, {\"input\": \"380 397 -340890121 -349529418 396652406 353599055\\r\\n\", \"output\": [\"1895619\"]}, {\"input\": \"388 113 366011910 -387447751 -403158698 353327235\\r\\n\", \"output\": [\"6681175\"]}, {\"input\": \"465 469 376765675 358805048 -390193085 -375070460\\r\\n\", \"output\": [\"1613801\"]}, {\"input\": \"504 116 -408147784 387006943 367365902 -415105789\\r\\n\", \"output\": [\"6800114\"]}, {\"input\": \"509 565 14560229 -77153392 -340426524 82224911\\r\\n\", \"output\": [\"455190\"]}, {\"input\": \"605 297 -251700323 -366763764 -445828791 325081312\\r\\n\", \"output\": [\"1491538\"]}, {\"input\": \"689 635 344525358 -321493413 12979458 -353392841\\r\\n\", \"output\": [\"263749\"]}, {\"input\": \"664 408 -151206136 -299481355 -385233545 310492602\\r\\n\", \"output\": [\"1034315\"]}, {\"input\": \"783 827 -98613981 316213558 -275430891 455234090\\r\\n\", \"output\": [\"190954\"]}, {\"input\": \"899 549 -249681750 38465319 105189786 -64009701\\r\\n\", \"output\": [\"416527\"]}, {\"input\": \"868 969 245648369 212586392 258298826 -389155385\\r\\n\", \"output\": [\"339339\"]}, {\"input\": \"1005 557 -451917708 -32771965 501646713 -357583032\\r\\n\", \"output\": [\"1147554\"]}, {\"input\": \"1123 1126 438419485 487688122 -477080698 -185247601\\r\\n\", \"output\": [\"707229\"]}, {\"input\": \"1174 901 522498777 -499217148 77740787 519316970\\r\\n\", \"output\": [\"812037\"]}, {\"input\": \"1425 1444 516172942 520776621 -319341286 -488388923\\r\\n\", \"output\": [\"647256\"]}, {\"input\": \"1576 15 -503228573 -531048974 531411118 557082183\\r\\n\", \"output\": [\"1783049\"]}, {\"input\": \"1147 1627 473801348 -494462579 -514604760 486124951\\r\\n\", \"output\": [\"605100\"]}, {\"input\": \"1811 1038 526157767 549399960 -479125660 -508887739\\r\\n\", \"output\": [\"569733\"]}, {\"input\": \"2033 1908 -480144210 482795119 496763189 -594064604\\r\\n\", \"output\": [\"538199\"]}, {\"input\": \"86 1341 -197343715 13981506 -529124963 208152056\\r\\n\", \"output\": [\"800062\"]}, {\"input\": \"2455 2436 -335351804 -50788097 286734045 222304974\\r\\n\", \"output\": [\"182317\"]}, {\"input\": \"2571 2243 474188235 -306739018 48936920 -83297677\\r\\n\", \"output\": [\"144603\"]}, {\"input\": \"1558 2911 -239080974 -489789417 369291826 -67795521\\r\\n\", \"output\": [\"330670\"]}, {\"input\": \"2795 3024 418200485 -575735266 101404272 -10209857\\r\\n\", \"output\": [\"145887\"]}, {\"input\": \"3341 3479 481143880 -383576301 -584637231 166949262\\r\\n\", \"output\": [\"232295\"]}, {\"input\": \"3868 1251 -639544998 21536679 -480078735 -457166436\\r\\n\", \"output\": [\"255064\"]}, {\"input\": \"4260 4286 -559966975 430515446 630949753 -403746792\\r\\n\", \"output\": [\"236255\"]}, {\"input\": \"4685 84 597126772 174658367 -667031403 657366658\\r\\n\", \"output\": [\"10398014\"]}, {\"input\": \"5099 3763 239091250 -689089763 -331708609 690647436\\r\\n\", \"output\": [\"259173\"]}, {\"input\": \"5431 5421 218916782 582895951 714645533 -634539842\\r\\n\", \"output\": [\"158012\"]}, {\"input\": \"5989 6249 -605686335 -602992500 586207791 624769222\\r\\n\", \"output\": [\"202009\"]}, {\"input\": \"4238 464 631928630 -699088687 -665579317 658247096\\r\\n\", \"output\": [\"2860823\"]}, {\"input\": \"7368 7243 646513016 723552175 -631585348 -678824351\\r\\n\", \"output\": [\"181900\"]}, {\"input\": \"6929 8303 -718092932 630511765 717136401 -678221530\\r\\n\", \"output\": [\"165239\"]}, {\"input\": \"551 8823 -644698584 720097649 -746775493 -719362914\\r\\n\", \"output\": [\"1398855\"]}, {\"input\": \"2036 9146 46737913 478540414 -603176411 -34978692\\r\\n\", \"output\": [\"285715\"]}, {\"input\": \"10000 10002 96487781 -692179874 182133670 357089051\\r\\n\", \"output\": [\"56746\"]}, {\"input\": \"4209 7951 232804958 -326325341 -138865076 516216059\\r\\n\", \"output\": [\"76356\"]}, {\"input\": \"10005 10008 -234169778 -592210597 -126329886 -812018105\\r\\n\", \"output\": [\"16370\"]}, {\"input\": \"8387 10012 -275798799 489020846 127010938 154401541\\r\\n\", \"output\": [\"36828\"]}, {\"input\": \"10058 9799 -25054219 -611037250 172201377 486371190\\r\\n\", \"output\": [\"64360\"]}, {\"input\": \"10088 6166 -735339950 -111273129 787180186 -439981865\\r\\n\", \"output\": [\"150116\"]}, {\"input\": \"10311 10242 764996339 626041956 -740573838 -97126465\\r\\n\", \"output\": [\"108076\"]}, {\"input\": \"10067 8186 -736794579 -820525762 -407728461 839527984\\r\\n\", \"output\": [\"98794\"]}, {\"input\": \"10721 11225 -767745746 709747051 443545879 -717667636\\r\\n\", \"output\": [\"117537\"]}, {\"input\": \"13225 984 -760662977 -854994174 786299019 825465374\\r\\n\", \"output\": [\"122020\"]}, {\"input\": \"14699 14675 792934253 -867739654 -737526630 840318203\\r\\n\", \"output\": [\"110341\"]}, {\"input\": \"20967 19929 821529452 892087465 -867106029 -836044344\\r\\n\", \"output\": [\"81480\"]}, {\"input\": \"43649 46022 -793221994 750708255 871188328 -901390875\\r\\n\", \"output\": [\"36031\"]}, {\"input\": \"25706 3236 867426580 143799455 254112907 -287546356\\r\\n\", \"output\": [\"28116\"]}, {\"input\": \"222075 201776 -663198106 -381459887 -29690718 -65372649\\r\\n\", \"output\": [\"2138\"]}, {\"input\": \"526654 264582 -19827600 -757880279 -903623062 -934193021\\r\\n\", \"output\": [\"1337\"]}, {\"input\": \"34483 1001201 -483230679 -24466088 827887504 293189155\\r\\n\", \"output\": [\"23617\"]}, {\"input\": \"840853 1638188 -425749679 502946202 -953467908 557484181\\r\\n\", \"output\": [\"281\"]}, {\"input\": \"4237214 4640696 -612169083 -326390834 887479529 304518522\\r\\n\", \"output\": [\"251\"]}, {\"input\": \"2959011 3049607 253816894 -342369389 610124947 440828496\\r\\n\", \"output\": [\"192\"]}, {\"input\": \"31288011 27242802 -934902606 343371553 926119543 -195542560\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"6152051 53675778 964821583 85960172 -939564894 755134693\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"101304499 148554333 -590787464 -890180401 -117457421 997140710\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"134699726 208640218 514309071 801051734 276512437 -803859310\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"472555248 417950652 -897989583 -805741694 915661619 800897620\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"299386785 573704302 956852511 -973861202 -816995136 989470727\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000000 1000000000 871940474 991768763 -914352281 -886310260\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"781751245 1000000000 -848188940 813653557 978830633 -825182414\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999999 1000000000 1000000000 -999999999 -1000000000 999999999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999 100000 12345 54321 6789 9876\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '55 22 189761193 -192020216 -153412991 188486816\\r\\n', 'output': ['16447301']}, {'input': '53 50 -120558789 -138770904 4229051 102239338\\r\\n', 'output': ['3450925']}, {'input': '664 408 -151206136 -299481355 -385233545 310492602\\r\\n', 'output': ['1034315']}, {'input': '18 116 231579605 226020224 -214399491 -217631436\\r\\n', 'output': ['24711966']}, {'input': '70 110 221139524 -236077945 -236283510 205078897\\r\\n', 'output': ['4084454']}]","human_sample_testcases_2":"[{'input': '42 45 13921918 62207801 80023961 -85820354\\r\\n', 'output': ['2379224']}, {'input': '2571 2243 474188235 -306739018 48936920 -83297677\\r\\n', 'output': ['144603']}, {'input': '2033 1908 -480144210 482795119 496763189 -594064604\\r\\n', 'output': ['538199']}, {'input': '3 2 -8 -9 -14 -1\\r\\n', 'output': ['4']}, {'input': '868 969 245648369 212586392 258298826 -389155385\\r\\n', 'output': ['339339']}]","human_sample_testcases_3":"[{'input': '4 4 0 -3 11 -4\\r\\n', 'output': ['1']}, {'input': '20967 19929 821529452 892087465 -867106029 -836044344\\r\\n', 'output': ['81480']}, {'input': '1425 1444 516172942 520776621 -319341286 -488388923\\r\\n', 'output': ['647256']}, {'input': '72 75 182000846 -19533501 -166922752 -142084479\\r\\n', 'output': ['3274129']}, {'input': '34483 1001201 -483230679 -24466088 827887504 293189155\\r\\n', 'output': ['23617']}]","human_sample_testcases_4":"[{'input': '4 4 3 2 10 -1\\r\\n', 'output': ['1']}, {'input': '125 204 91089644 83192699 -300075653 54365352\\r\\n', 'output': ['1679971']}, {'input': '3 4 -8 5 6 -3\\r\\n', 'output': ['3']}, {'input': '101304499 148554333 -590787464 -890180401 -117457421 997140710\\r\\n', 'output': ['12']}, {'input': '3 5 -20 19 21 16\\r\\n', 'output': ['7']}]","human_sample_testcases_5":"[{'input': '783 827 -98613981 316213558 -275430891 455234090\\r\\n', 'output': ['190954']}, {'input': '10005 10008 -234169778 -592210597 -126329886 -812018105\\r\\n', 'output': ['16370']}, {'input': '1425 1444 516172942 520776621 -319341286 -488388923\\r\\n', 'output': ['647256']}, {'input': '3 2 8 -25 0 25\\r\\n', 'output': ['15']}, {'input': '1000000000 1000000000 871940474 991768763 -914352281 -886310260\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":206,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"12\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"e392be5411ffccc1df50e65ec1f5c589","source_code":"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n long n = sc.nextLong();\n long res = (n \/ 2) + (n \/ 3) - (n \/ 6) + (n \/ 42)\n +(n \/ 5) + (n \/ 7) + (n\/ 30) + (n \/ 70) + (n \/ 105)\n -(n \/ 10) - (n \/ 15) - (n \/ 14) - (n \/ 21) - (n \/ 35) - (n \/ 210);\n System.out.println(n - res);\n }\n}\n","sample_outputs":"[\"2\"]","lang_cluster":"Java","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are not divisible by any number from 2 to 10.","description":"IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is not divisible by any number from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"576\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"577\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"71807832\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"164178703647781768\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"228571428571428571\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"225749559139329804\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"829440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"115200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '12\\r\\n', 'output': ['2']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '2519\\r\\n', 'output': ['576']}, {'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}]","human_sample_testcases_2":"[{'input': '314159265\\r\\n', 'output': ['71807832']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}]","human_sample_testcases_3":"[{'input': '2521\\r\\n', 'output': ['577']}, {'input': '12\\r\\n', 'output': ['2']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}]","human_sample_testcases_4":"[{'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '314159265\\r\\n', 'output': ['71807832']}, {'input': '2521\\r\\n', 'output': ['577']}, {'input': '12\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '12\\r\\n', 'output': ['2']}, {'input': '2521\\r\\n', 'output': ['577']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '2519\\r\\n', 'output': ['576']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":207,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 1 2\", \"3 4 5\", \"4 1 1\"]","input_specification":"The single line of the input contains three space-separated integers a, b and c (1\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u2009106) \u2014 the valence numbers of the given atoms.","src_uid":"b3b986fddc3770fed64b878fa42ab1bc","source_code":"import java.util.Scanner;\n\npublic class SimpleMoecules {\n\n\tpublic static void main(String[] args) {\n\t\t\/\/ TODO Auto-generated method stub\n\n\t\tScanner input = new Scanner(System.in);\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint c = input.nextInt();\n\t\tif((c+b-a)%2==0){\n\t\t\tint z = (c+b-a)\/2;\n\t\t\tif(z<0){\n\t\t\t\tSystem.out.println(\"Impossible\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tint y = c-z;\n\t\t\tif(y<0){\n\t\t\t\tSystem.out.println(\"Impossible\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tint x = a-y;\n\t\t\tif(x<0){\n\t\t\t\tSystem.out.println(\"Impossible\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.println(x+\" \"+z+\" \"+y);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Impossible\");\n\t}\n\n}\n","sample_outputs":"[\"0 1 1\", \"1 3 2\", \"Impossible\"]","lang_cluster":"Java","notes":"NoteThe first sample corresponds to the first figure. There are no bonds between atoms 1 and 2 in this case.The second sample corresponds to the second figure. There is one or more bonds between each pair of atoms.The third sample corresponds to the third figure. There is no solution, because an atom cannot form bonds with itself.The configuration in the fourth figure is impossible as each atom must have at least one atomic bond.","output_specification":"If such a molecule can be built, print three space-separated integers \u2014 the number of bonds between the 1-st and the 2-nd, the 2-nd and the 3-rd, the 3-rd and the 1-st atoms, correspondingly. If there are multiple solutions, output any of them. If there is no solution, print \"Impossible\" (without the quotes).","description":"Mad scientist Mike is busy carrying out experiments in chemistry. Today he will attempt to join three atoms into one molecule.A molecule consists of atoms, with some pairs of atoms connected by atomic bonds. Each atom has a valence number \u2014 the number of bonds the atom must form with other atoms. An atom can form one or multiple bonds with any other atom, but it cannot form a bond with itself. The number of bonds of an atom in the molecule must be equal to its valence number. Mike knows valence numbers of the three atoms. Find a molecule that can be built from these atoms according to the stated rules, or determine that it is impossible.","human_testcases":"[{\"input\": \"1 1 2\\r\\n\", \"output\": [\"0 1 1\"]}, {\"input\": \"3 4 5\\r\\n\", \"output\": [\"1 3 2\"]}, {\"input\": \"4 1 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 1000000 1000000\\r\\n\", \"output\": [\"500000 500000 500000\"]}, {\"input\": \"3 11 8\\r\\n\", \"output\": [\"3 8 0\"]}, {\"input\": \"8 5 12\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 500000 1\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1000000 500000 2\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"3 3 3\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"4 4 4\\r\\n\", \"output\": [\"2 2 2\"]}, {\"input\": \"2 4 2\\r\\n\", \"output\": [\"2 2 0\"]}, {\"input\": \"10 5 14\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"10 5 15\\r\\n\", \"output\": [\"0 5 10\"]}, {\"input\": \"10 4 16\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"3 3 6\\r\\n\", \"output\": [\"0 3 3\"]}, {\"input\": \"9 95 90\\r\\n\", \"output\": [\"7 88 2\"]}, {\"input\": \"3 5 8\\r\\n\", \"output\": [\"0 5 3\"]}, {\"input\": \"5 8 13\\r\\n\", \"output\": [\"0 8 5\"]}, {\"input\": \"6 1 5\\r\\n\", \"output\": [\"1 0 5\"]}, {\"input\": \"59 54 56\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"246 137 940\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"7357 3578 9123\\r\\n\", \"output\": [\"906 2672 6451\"]}, {\"input\": \"93952 49553 83405\\r\\n\", \"output\": [\"30050 19503 63902\"]}, {\"input\": \"688348 726472 442198\\r\\n\", \"output\": [\"486311 240161 202037\"]}, {\"input\": \"602752 645534 784262\\r\\n\", \"output\": [\"232012 413522 370740\"]}, {\"input\": \"741349 48244 642678\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"655754 418251 468390\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"310703 820961 326806\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"1 1 3\\r\\n\", \"output\": [\"Impossible\"]}, {\"input\": \"5 1 4\\r\\n\", \"output\": [\"1 0 4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 11 8\\r\\n', 'output': ['3 8 0']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '10 5 15\\r\\n', 'output': ['0 5 10']}, {'input': '9 95 90\\r\\n', 'output': ['7 88 2']}, {'input': '2 2 2\\r\\n', 'output': ['1 1 1']}]","human_sample_testcases_2":"[{'input': '59 54 56\\r\\n', 'output': ['Impossible']}, {'input': '10 4 16\\r\\n', 'output': ['Impossible']}, {'input': '9 95 90\\r\\n', 'output': ['7 88 2']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '1 1 3\\r\\n', 'output': ['Impossible']}]","human_sample_testcases_3":"[{'input': '7357 3578 9123\\r\\n', 'output': ['906 2672 6451']}, {'input': '3 5 8\\r\\n', 'output': ['0 5 3']}, {'input': '5 8 13\\r\\n', 'output': ['0 8 5']}, {'input': '1000000 500000 2\\r\\n', 'output': ['Impossible']}, {'input': '741349 48244 642678\\r\\n', 'output': ['Impossible']}]","human_sample_testcases_4":"[{'input': '2 4 2\\r\\n', 'output': ['2 2 0']}, {'input': '1000000 1000000 1000000\\r\\n', 'output': ['500000 500000 500000']}, {'input': '1 1 3\\r\\n', 'output': ['Impossible']}, {'input': '4 4 4\\r\\n', 'output': ['2 2 2']}, {'input': '3 3 6\\r\\n', 'output': ['0 3 3']}]","human_sample_testcases_5":"[{'input': '5 8 13\\r\\n', 'output': ['0 8 5']}, {'input': '8 5 12\\r\\n', 'output': ['Impossible']}, {'input': '688348 726472 442198\\r\\n', 'output': ['486311 240161 202037']}, {'input': '246 137 940\\r\\n', 'output': ['Impossible']}, {'input': '1 1 1\\r\\n', 'output': ['Impossible']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":71.43,"human_sample_line_coverage_2":80.95,"human_sample_line_coverage_3":80.95,"human_sample_line_coverage_4":71.43,"human_sample_line_coverage_5":71.43,"human_sample_branch_coverage_1":62.5,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":62.5,"human_sample_branch_coverage_5":62.5,"id":208,"human_sample_pass_rate":100.0,"human_sample_line_coverage":75.238,"human_sample_branch_coverage":67.5} {"sample_inputs":"[\"4\"]","input_specification":"The only line contains an integer n (2\u2009\u2264\u2009n\u2009\u2264\u20091012), the number of vertices in the graph.","src_uid":"a98f0d924ea52cafe0048f213f075891","source_code":"\/\/ http:\/\/codeforces.com\/contest\/959\/problem\/E\n\nimport java.io.*;\nimport java.util.InputMismatchException;\n\n\npublic class CF959E {\n\n public static void main(String[] args) throws IOException {\n InputReader in = new InputReader(System.in);\n OutputWriter out = new OutputWriter(System.out);\n final long N = in.readLong() - 1;\n long res = 0;\n long i = 1;\n for (i = 1; i <= N; i = i << 1) {\n res = res + ((N - i) \/ (i << 1) + 1) * i;\n }\n out.print(res);\n closeStreams(out, in);\n }\n\n private static void closeStreams(OutputWriter out, InputReader in) throws IOException {\n out.flush();\n out.close();\n in.close();\n }\n\n static class InputReader {\n\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public double readDouble() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n double res = 0;\n while (!isSpaceChar(c) && c != '.') {\n if (c == 'e' || c == 'E') {\n return res * Math.pow(10, readInt());\n }\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }\n if (c == '.') {\n c = read();\n double m = 1;\n while (!isSpaceChar(c)) {\n if (c == 'e' || c == 'E') {\n return res * Math.pow(10, readInt());\n }\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n m \/= 10;\n res += (c - '0') * m;\n c = read();\n }\n }\n return res * sgn;\n }\n\n public long readLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public boolean isEndOfLine(int c) {\n if (filter != null) {\n return filter.isEndOfLine(c);\n }\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public String next() {\n return readString();\n }\n\n public void close() throws IOException {\n this.stream.close();\n }\n\n public interface SpaceCharFilter {\n boolean isSpaceChar(int ch);\n\n boolean isEndOfLine(int ch);\n }\n\n }\n\n static class IOUtils {\n\n public static int[] readIntArray(InputReader in, int elementCount) {\n return readIntArray(in, elementCount, 0);\n }\n\n public static int[] readIntArray(InputReader in, int elementCount, int startOffset) {\n int[] array = new int[elementCount + startOffset];\n for (int i = 0; i < elementCount; i++)\n array[i + startOffset] = in.readInt();\n return array;\n }\n\n public static long[] readLongArray(InputReader in, int elementCount) {\n return readLongArray(in, elementCount, 0);\n }\n\n public static long[] readLongArray(InputReader in, int elementCount, int startOffset) {\n long[] array = new long[elementCount + startOffset];\n for (int i = 0; i < elementCount; i++)\n array[i + startOffset] = in.readLong();\n return array;\n }\n\n }\n\n static class OutputWriter {\n\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; i++) {\n if (i != 0)\n writer.print(' ');\n writer.print(objects[i]);\n }\n }\n\n public void printLine(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n public void flush() {\n writer.flush();\n }\n\n }\n}\n","sample_outputs":"[\"4\"]","lang_cluster":"Java","notes":"NoteIn the first sample: The weight of the minimum spanning tree is 1+2+1=4.","output_specification":"The only line contains an integer x, the weight of the graph's minimum spanning tree.","description":"Ehab is interested in the bitwise-xor operation and the special graphs. Mahmoud gave him a problem that combines both. He has a complete graph consisting of n vertices numbered from 0 to n\u2009-\u20091. For all 0\u2009\u2264\u2009u\u2009<\u2009v\u2009<\u2009n, vertex u and vertex v are connected with an undirected edge that has weight (where is the bitwise-xor operation). Can you find the weight of the minimum spanning tree of that graph?You can read about complete graphs in https:\/\/en.wikipedia.org\/wiki\/Complete_graphYou can read about the minimum spanning tree in https:\/\/en.wikipedia.org\/wiki\/Minimum_spanning_treeThe weight of the minimum spanning tree is the sum of the weights on the edges included in it.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000\\r\\n\", \"output\": [\"20140978692096\"]}, {\"input\": \"999999999999\\r\\n\", \"output\": [\"20140978692095\"]}, {\"input\": \"23131234\\r\\n\", \"output\": [\"293058929\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"877968\"]}, {\"input\": \"1024\\r\\n\", \"output\": [\"5120\"]}, {\"input\": \"536870912\\r\\n\", \"output\": [\"7784628224\"]}, {\"input\": \"536870911\\r\\n\", \"output\": [\"7784628223\"]}, {\"input\": \"536870913\\r\\n\", \"output\": [\"8321499136\"]}, {\"input\": \"123456789\\r\\n\", \"output\": [\"1680249144\"]}, {\"input\": \"200\\r\\n\", \"output\": [\"844\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"5052\"]}, {\"input\": \"12000\\r\\n\", \"output\": [\"84624\"]}, {\"input\": \"65536\\r\\n\", \"output\": [\"524288\"]}, {\"input\": \"1048576\\r\\n\", \"output\": [\"10485760\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"549755813888\\r\\n\", \"output\": [\"10720238370816\"]}, {\"input\": \"549755813887\\r\\n\", \"output\": [\"10720238370815\"]}, {\"input\": \"549755813889\\r\\n\", \"output\": [\"11269994184704\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1048576\\r\\n', 'output': ['10485760']}, {'input': '999999999999\\r\\n', 'output': ['20140978692095']}, {'input': '23131234\\r\\n', 'output': ['293058929']}, {'input': '200\\r\\n', 'output': ['844']}, {'input': '7\\r\\n', 'output': ['11']}]","human_sample_testcases_2":"[{'input': '10\\r\\n', 'output': ['21']}, {'input': '123456789\\r\\n', 'output': ['1680249144']}, {'input': '536870912\\r\\n', 'output': ['7784628224']}, {'input': '6\\r\\n', 'output': ['9']}, {'input': '1048576\\r\\n', 'output': ['10485760']}]","human_sample_testcases_3":"[{'input': '200\\r\\n', 'output': ['844']}, {'input': '4\\r\\n', 'output': ['4']}, {'input': '6\\r\\n', 'output': ['9']}, {'input': '7\\r\\n', 'output': ['11']}, {'input': '1048576\\r\\n', 'output': ['10485760']}]","human_sample_testcases_4":"[{'input': '10\\r\\n', 'output': ['21']}, {'input': '1000000000000\\r\\n', 'output': ['20140978692096']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '999999999999\\r\\n', 'output': ['20140978692095']}, {'input': '549755813889\\r\\n', 'output': ['11269994184704']}]","human_sample_testcases_5":"[{'input': '549755813888\\r\\n', 'output': ['10720238370816']}, {'input': '4\\r\\n', 'output': ['4']}, {'input': '536870912\\r\\n', 'output': ['7784628224']}, {'input': '7\\r\\n', 'output': ['11']}, {'input': '3\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":209,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\", \"3\"]","input_specification":"The first and only line of the input contains a single integer n (3\u2009\u2264\u2009n\u2009\u2264\u200954321) - the number of vertices of the regular polygon drawn by Ari.","src_uid":"efa8e7901a3084d34cfb1a6b18067f2b","source_code":" \nimport java.util.Scanner;\n\npublic class cls_div2_328_B {\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n \n long n = scan.nextInt();\n \n scan.close();\n \n long result = (n - 2) + ((n - 3) * (n - 2));\n \n System.out.println(result);\n }\n}\n","sample_outputs":"[\"9\", \"1\"]","lang_cluster":"Java","notes":"NoteOne of the possible solutions for the first sample is shown on the picture above.","output_specification":"Print the minimum number of jumps Ada should make to collect all the walnuts. Note, that she doesn't need to leave the polygon after.","description":"Ari the monster always wakes up very early with the first ray of the sun and the first thing she does is feeding her squirrel.Ari draws a regular convex polygon on the floor and numbers it's vertices 1,\u20092,\u2009...,\u2009n in clockwise order. Then starting from the vertex 1 she draws a ray in the direction of each other vertex. The ray stops when it reaches a vertex or intersects with another ray drawn before. Ari repeats this process for vertex 2,\u20093,\u2009...,\u2009n (in this particular order). And then she puts a walnut in each region inside the polygon. Ada the squirrel wants to collect all the walnuts, but she is not allowed to step on the lines drawn by Ari. That means Ada have to perform a small jump if she wants to go from one region to another. Ada can jump from one region P to another region Q if and only if P and Q share a side or a corner.Assuming that Ada starts from outside of the picture, what is the minimum number of jumps she has to perform in order to collect all the walnuts?","human_testcases":"[{\"input\": \"5\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"54321\\r\\n\", \"output\": [\"2950553761\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"54320\\r\\n\", \"output\": [\"2950445124\"]}, {\"input\": \"54319\\r\\n\", \"output\": [\"2950336489\"]}, {\"input\": \"54318\\r\\n\", \"output\": [\"2950227856\"]}, {\"input\": \"54317\\r\\n\", \"output\": [\"2950119225\"]}, {\"input\": \"54316\\r\\n\", \"output\": [\"2950010596\"]}, {\"input\": \"54315\\r\\n\", \"output\": [\"2949901969\"]}, {\"input\": \"54314\\r\\n\", \"output\": [\"2949793344\"]}, {\"input\": \"8153\\r\\n\", \"output\": [\"66438801\"]}, {\"input\": \"51689\\r\\n\", \"output\": [\"2671545969\"]}, {\"input\": \"16659\\r\\n\", \"output\": [\"277455649\"]}, {\"input\": \"47389\\r\\n\", \"output\": [\"2245527769\"]}, {\"input\": \"314\\r\\n\", \"output\": [\"97344\"]}, {\"input\": \"23481\\r\\n\", \"output\": [\"551263441\"]}, {\"input\": \"20380\\r\\n\", \"output\": [\"415262884\"]}, {\"input\": \"1994\\r\\n\", \"output\": [\"3968064\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\n', 'output': ['4']}, {'input': '54314\\r\\n', 'output': ['2949793344']}, {'input': '8\\r\\n', 'output': ['36']}, {'input': '54320\\r\\n', 'output': ['2950445124']}, {'input': '8153\\r\\n', 'output': ['66438801']}]","human_sample_testcases_2":"[{'input': '20380\\r\\n', 'output': ['415262884']}, {'input': '16659\\r\\n', 'output': ['277455649']}, {'input': '23481\\r\\n', 'output': ['551263441']}, {'input': '54320\\r\\n', 'output': ['2950445124']}, {'input': '5\\r\\n', 'output': ['9']}]","human_sample_testcases_3":"[{'input': '54318\\r\\n', 'output': ['2950227856']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '10\\r\\n', 'output': ['64']}, {'input': '4\\r\\n', 'output': ['4']}, {'input': '54316\\r\\n', 'output': ['2950010596']}]","human_sample_testcases_4":"[{'input': '10\\r\\n', 'output': ['64']}, {'input': '4\\r\\n', 'output': ['4']}, {'input': '7\\r\\n', 'output': ['25']}, {'input': '20380\\r\\n', 'output': ['415262884']}, {'input': '3\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '54317\\r\\n', 'output': ['2950119225']}, {'input': '5\\r\\n', 'output': ['9']}, {'input': '54315\\r\\n', 'output': ['2949901969']}, {'input': '6\\r\\n', 'output': ['16']}, {'input': '314\\r\\n', 'output': ['97344']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":210,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7\\nABACABA\", \"5\\nZZZAA\"]","input_specification":"The first line of the input contains integer number $$$n$$$ ($$$2 \\le n \\le 100$$$) \u2014 the length of string $$$s$$$. The second line of the input contains the string $$$s$$$ consisting of $$$n$$$ capital Latin letters.","src_uid":"e78005d4be93dbaa518f3b40cca84ab1","source_code":"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tString s=sc.next();\n\t\tchar c[]=s.toCharArray();\n\t\tchar aa='1',bb='1';\n\t\tint max=-1;\n\t\tfor(int i=0;imax){\n\t\t\t\tmax=con;\n\t\t\t\taa=a;bb=b;\n\t\t\t}else if(con==max&&(a=0;i--){\n\t\t\tfor(int j=0;j<2;j++){\n\t\t\t\tint [] a=new int [n\/2+2];\n\t\t\t\tArrays.fill(a, inf);\n\t\t\t\tfor(int c=0;c<=l[i] && cl[i])\n\t\t\t\t\t\tbest=Math.min(best, 2+seg[1-p][j].query(c+l[i+1]-r[i], c+l[i+1]-l[i]-1));\n\t\t\t\t\ta[c]=best;\n\t\t\t\t}\n\t\t\t\tseg[p][j]=new SparseTable(a);\n\t\t\t}\n\t\t\tp^=1;\n\t\t}\n\t\tp^=1;\n\t\tint ans=Math.min(seg[p][0].query(l[0], l[0]), seg[p][1].query(l[0], l[0]));\n\t\tif(ans>2*k)\n\t\t\tpw.println(\"Hungry\");\n\t\telse{\n\t\t\tpw.println(\"Full\");\n\t\t\tpw.println(ans);\n\t\t}\n\t\tpw.flush();\n\t\tpw.close();\n\t}\n\t\n\tstatic int inf=(int)1e7;\n\t\n\tstatic class SparseTable {\n\t\tint [] a;\n\t\tint [][] st;\n\t\t\/\/st[i][j] --> minimum of sub array starting at index i and of length 2^j\n\t\tSparseTable(int [] a){\n\t\t\tint n=a.length;\n\t\t\tthis.a=a;\n\t\t\tint k=(int)Math.floor(Math.log(n)\/Math.log(2))+1;\n\t\t\tst=new int [n][k];\n\t\t\tfor(int i=0;i=a.length)\n\t\t\t\treturn inf;\n\t\t\tj=Math.min(j, a.length-1);\n\t\t\tint k=(int)Math.floor(Math.log(j-i+1)\/Math.log(2));\n\t\t\treturn Math.min(a[st[i][k]], a[st[j-(1<[] pair = new ArrayList[n + 1];\n for (int i = 1; i <= n; i++)\n pair[i] = new ArrayList<>();\n for (int k = 2; k <= n; k++)\n for (int a = 1; (long) (2 * a + k - 1) * k \/ 2 <= n; a++)\n pair[(2 * a + k - 1) * k \/ 2].add(new Pair(a, k));\n int[] grundy = new int[n + 1];\n int[] val = new int[n + 1];\n Arrays.fill(val, Integer.MAX_VALUE);\n int[] pre = new int[n + 1];\n for (int i = 2; i <= n; i++) {\n HashSet hs = new HashSet<>();\n for (Pair p : pair[i]) {\n hs.add(pre[p.a + p.n - 1] ^ pre[p.a - 1]);\n if ((pre[p.a + p.n - 1] ^ pre[p.a - 1]) == 0)\n val[i] = Math.min(p.n, val[i]);\n }\n while (hs.contains(grundy[i]))\n grundy[i]++;\n pre[i] = grundy[i] ^ pre[i - 1];\n }\n w.println(val[n] != Integer.MAX_VALUE ? val[n] : -1);\n }\n\n class Pair {\n int a;\n int n;\n\n Pair(int a, int n) {\n this.a = a;\n this.n = n;\n }\n\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}\n\n","sample_outputs":"[\"2\", \"-1\", \"8\"]","lang_cluster":"Java","notes":null,"output_specification":"If Serozha wins, print k, which represents the minimal number of piles into which he can split the initial one during the first move in order to win the game. If Gena wins, print \"-1\" (without the quotes).","description":"Two best friends Serozha and Gena play a game.Initially there is one pile consisting of n stones on the table. During one move one pile should be taken and divided into an arbitrary number of piles consisting of a1\u2009>\u2009a2\u2009>\u2009...\u2009>\u2009ak\u2009>\u20090 stones. The piles should meet the condition a1\u2009-\u2009a2\u2009=\u2009a2\u2009-\u2009a3\u2009=\u2009...\u2009=\u2009ak\u2009-\u20091\u2009-\u2009ak\u2009=\u20091. Naturally, the number of piles k should be no less than two.The friends play in turns. The player who cannot make a move loses. Serozha makes the first move. Who will win if both players play in the optimal way?","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"33\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"46\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"78\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"627\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"250\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"873\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"871\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"684\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"303\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"93764\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"39509\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"70878\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"7578\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"31893\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"57113\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"66873\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9564\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"42237\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"92763\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"38798\\r\\n\", \"output\": [\"76\"]}, {\"input\": \"63359\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"573\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"60879\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"67341\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"15748\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"42602\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"67817\\r\\n\", \"output\": [\"73\"]}, {\"input\": \"81207\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8149\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"95298\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"41385\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"27443\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"74424\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"35708\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"36655\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"34378\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"63478\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"42863\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"19715\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"37317\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"96992\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"56056\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"45899\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"56\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"38\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1515\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '41385\\r\\n', 'output': ['15']}, {'input': '6\\r\\n', 'output': ['-1']}, {'input': '573\\r\\n', 'output': ['3']}, {'input': '3\\r\\n', 'output': ['2']}, {'input': '38798\\r\\n', 'output': ['76']}]","human_sample_testcases_2":"[{'input': '42602\\r\\n', 'output': ['17']}, {'input': '66873\\r\\n', 'output': ['2']}, {'input': '684\\r\\n', 'output': ['-1']}, {'input': '35\\r\\n', 'output': ['-1']}, {'input': '42863\\r\\n', 'output': ['-1']}]","human_sample_testcases_3":"[{'input': '100000\\r\\n', 'output': ['-1']}, {'input': '9564\\r\\n', 'output': ['3']}, {'input': '35708\\r\\n', 'output': ['-1']}, {'input': '56\\r\\n', 'output': ['-1']}, {'input': '100\\r\\n', 'output': ['8']}]","human_sample_testcases_4":"[{'input': '45899\\r\\n', 'output': ['-1']}, {'input': '56\\r\\n', 'output': ['-1']}, {'input': '1515\\r\\n', 'output': ['2']}, {'input': '36655\\r\\n', 'output': ['-1']}, {'input': '63478\\r\\n', 'output': ['-1']}]","human_sample_testcases_5":"[{'input': '100000\\r\\n', 'output': ['-1']}, {'input': '39509\\r\\n', 'output': ['-1']}, {'input': '46\\r\\n', 'output': ['4']}, {'input': '63478\\r\\n', 'output': ['-1']}, {'input': '8149\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":214,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 0 3 3 5 21\", \"2 4 3 0 6 17\"]","input_specification":"The only line contains six integers a1,\u2009b1,\u2009a2,\u2009b2,\u2009L,\u2009R (0\u2009<\u2009a1,\u2009a2\u2009\u2264\u20092\u00b7109,\u2009\u2009-\u20092\u00b7109\u2009\u2264\u2009b1,\u2009b2,\u2009L,\u2009R\u2009\u2264\u20092\u00b7109,\u2009L\u2009\u2264\u2009R).","src_uid":"b08ee0cd6f5cb574086fa02f07d457a4","source_code":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.Reader;\nimport java.math.BigInteger;\nimport java.util.Random;\nimport java.util.StringTokenizer;\n\npublic class D {\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n\n long a1 = sc.nextLong();\n long b1 = sc.nextLong();\n long a2 = sc.nextLong();\n long b2 = sc.nextLong();\n long left = sc.nextLong();\n long right = sc.nextLong();\n\n long lcm = lcm(a1, a2);\n left = Math.max(left, Math.max(b1, b2));\n\n \/\/ a1*x + b1 = a2*y + b2\n \/\/ a1*x - a2*y = b1 - b2\n long[] x_y_gcd = solveDiophantine(a1, -a2, b2 - b1);\n if (x_y_gcd == null) {\n System.out.println(0);\n } else {\n BigInteger a1Bi = BigInteger.valueOf(a1);\n BigInteger b1Bi = BigInteger.valueOf(b1);\n BigInteger leftBi = BigInteger.valueOf(left);\n BigInteger rightBi = BigInteger.valueOf(right);\n BigInteger lcmBi = BigInteger.valueOf(lcm);\n\n BigInteger firstEq = a1Bi.multiply(BigInteger.valueOf(x_y_gcd[0])).add(b1Bi);\n BigInteger diff = leftBi.subtract(firstEq).divide(lcmBi).subtract(BigInteger.ONE);\n firstEq = firstEq.add(diff.multiply(lcmBi));\n while (firstEq.compareTo(leftBi) < 0) {\n firstEq = firstEq.add(lcmBi);\n }\n if (rightBi.compareTo(firstEq) < 0) {\n System.out.println(0);\n } else {\n long count = Math.max(rightBi.subtract(firstEq).divide(lcmBi).longValue() + 1, 0);\n System.out.println(count);\n }\n }\n }\n\n \/**\n * Finds a single solution {x, y} to the LDE a*x + b*y = c.\n * Outputs an array of the form {x, y, d}, where d = GCD(a,b).\n *\/\n private static long[] solveDiophantine(long a, long b, long c) {\n long[] e = extEuclid(a, b);\n long k = c \/ e[2];\n\n \/\/c not divisible by the GCD(a,b) -> no solution\n if (c - k * e[2] != 0)\n return null;\n\n long[] output = {e[0] * k, e[1] * k, e[2]};\n return output;\n }\n\n \/**\n * Extended Euclidean Algorithm finds {x, y, d}\n * where d=GCD(a,b) and x and y satisfy a*x + b*y = d\n * The output is an array of the form {x, y, d}.\n *\/\n private static long[] extEuclid(long a, long b) {\n long s0 = 1, s1 = 0, sTemp;\n long t0 = 0, t1 = 1, tTemp;\n long r0 = a, r1 = b, rTemp;\n long q;\n\n while (r1 != 0) {\n q = r0 \/ r1;\n\n rTemp = r1;\n r1 = r0 - q * r1;\n r0 = rTemp;\n\n sTemp = s1;\n s1 = s0 - q * s1;\n s0 = sTemp;\n\n tTemp = t1;\n t1 = t0 - q * t1;\n t0 = tTemp;\n }\n\n long[] output = {s0, t0, r0};\n return output;\n }\n\n static long lcm(long a, long b) {\n return a \/ gcd(a, b) * b;\n }\n\n static long gcd(long a, long b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n }\n\n public static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner(Reader in) {\n br = new BufferedReader(in);\n }\n\n public FastScanner() {\n this(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String readNextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n int[] readIntArray(int n) {\n int[] a = new int[n];\n for (int idx = 0; idx < n; idx++) {\n a[idx] = nextInt();\n }\n return a;\n }\n\n long[] readLongArray(int n) {\n long[] a = new long[n];\n for (int idx = 0; idx < n; idx++) {\n a[idx] = nextLong();\n }\n return a;\n }\n }\n}\n","sample_outputs":"[\"3\", \"2\"]","lang_cluster":"Java","notes":null,"output_specification":"Print the desired number of integers x.","description":"You are given two arithmetic progressions: a1k\u2009+\u2009b1 and a2l\u2009+\u2009b2. Find the number of integers x such that L\u2009\u2264\u2009x\u2009\u2264\u2009R and x\u2009=\u2009a1k'\u2009+\u2009b1\u2009=\u2009a2l'\u2009+\u2009b2, for some integers k',\u2009l'\u2009\u2265\u20090.","human_testcases":"[{\"input\": \"2 0 3 3 5 21\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 4 3 0 6 17\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 0 4 2 -39 -37\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 9 3 11 49 109\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"3 81 5 72 -1761 501\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"8 -89 20 67 8771 35222\\r\\n\", \"output\": [\"661\"]}, {\"input\": \"1 -221 894 86403 -687111 141371\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"1 -1074 271 17741 -2062230 1866217\\r\\n\", \"output\": [\"6821\"]}, {\"input\": \"3 2408 819 119198 -8585197 7878219\\r\\n\", \"output\": [\"9474\"]}, {\"input\": \"1 341 8581 3946733 -59420141 33253737\\r\\n\", \"output\": [\"3416\"]}, {\"input\": \"1 10497 19135 2995296 -301164547 -180830773\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 40306 2753 1809818 254464419 340812028\\r\\n\", \"output\": [\"3921\"]}, {\"input\": \"2 21697 9076 1042855 -319348358 236269755\\r\\n\", \"output\": [\"25918\"]}, {\"input\": \"4 2963 394 577593 125523962 628140505\\r\\n\", \"output\": [\"637839\"]}, {\"input\": \"75 61736 200 200511 160330870 609945842\\r\\n\", \"output\": [\"749358\"]}, {\"input\": \"34 64314 836 5976 591751179 605203191\\r\\n\", \"output\": [\"946\"]}, {\"input\": \"1 30929 25249 95822203 -1076436442 705164517\\r\\n\", \"output\": [\"24134\"]}, {\"input\": \"3 -1208 459 933808 603490653 734283665\\r\\n\", \"output\": [\"284952\"]}, {\"input\": \"1 35769 16801 47397023 -82531776 1860450454\\r\\n\", \"output\": [\"107914\"]}, {\"input\": \"1 -3078 36929 51253687 -754589746 -53412627\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 -32720 3649 7805027 408032642 925337350\\r\\n\", \"output\": [\"141766\"]}, {\"input\": \"1 -2000000000 1 -2000000000 -2000000000 2000000000\\r\\n\", \"output\": [\"4000000001\"]}, {\"input\": \"1 -2000000000 2 -2000000000 -2000000000 2000000000\\r\\n\", \"output\": [\"2000000001\"]}, {\"input\": \"3 -2000000000 2 -2000000000 -2000000000 2000000000\\r\\n\", \"output\": [\"666666667\"]}, {\"input\": \"999999999 999999998 1000000000 999999999 1 10000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 -2000000000 1 2000000000 1 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 -2000000000 2 2000000000 -2000000000 2000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 0 2 1 0 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 0 1 0 0 2000000000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 0 4 1 5 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 1 999999999 0 1 100000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 30929 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 1 1 -2000000000 2000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"4 0 4 1 0 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 -2000000000 1 2000000000 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"51 -1981067352 71 -414801558 -737219217 1160601982\\r\\n\", \"output\": [\"435075\"]}, {\"input\": \"2 -1500000000 4 -1499999999 1600000000 1700000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"135 -1526277729 32 1308747737 895574 1593602399\\r\\n\", \"output\": [\"65938\"]}, {\"input\": \"1098197640 6 994625382 6 -474895292 -101082478\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12 -696575903 571708420 236073275 2 14\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 -9 2 -10 -10 -9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 -11 2 -9 -11 -9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"40 54 15 74 -180834723 1373530127\\r\\n\", \"output\": [\"11446084\"]}, {\"input\": \"2 57 1 56 -1773410854 414679043\\r\\n\", \"output\": [\"207339494\"]}, {\"input\": \"9 12 1 40 624782492 883541397\\r\\n\", \"output\": [\"28750990\"]}, {\"input\": \"4 -1000000000 2 4 100 1000\\r\\n\", \"output\": [\"226\"]}, {\"input\": \"66 90 48 84 -1709970247 1229724777\\r\\n\", \"output\": [\"2329024\"]}, {\"input\": \"1000000000 1 2000000000 0 -2000000000 200000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 0 2 1 -1000000000 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 -1000000000 2 -999999999 -1000000000 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"26 1885082760 30 -1612707510 -1113844607 1168679422\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"76 -19386 86 -6257 164862270 1443198941\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 -2000000000 5 1000000000 1000000000 2000000000\\r\\n\", \"output\": [\"200000001\"]}, {\"input\": \"505086589 -4 1288924334 -4 -5 -4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"91 -193581878 2 1698062870 -819102473 1893630769\\r\\n\", \"output\": [\"1074549\"]}, {\"input\": \"8 11047 45 12730 -45077355 1727233357\\r\\n\", \"output\": [\"4797835\"]}, {\"input\": \"35 8673 6 -19687 -111709844 1321584980\\r\\n\", \"output\": [\"6293220\"]}, {\"input\": \"71 1212885043 55 1502412287 970234397 1952605611\\r\\n\", \"output\": [\"115287\"]}, {\"input\": \"274497829 -12 9 -445460655 -5 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1509527550 3 7 -134101853 2 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"43 -1478944506 45 494850401 634267177 1723176461\\r\\n\", \"output\": [\"562743\"]}, {\"input\": \"25 479638866 50 -874479027 -2000000000 2000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 -10 1 -878946597 -11127643 271407906\\r\\n\", \"output\": [\"24673447\"]}, {\"input\": \"15 -738862158 12 -3 -3 12\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"70 -835526513 23 687193329 -1461506792 1969698938\\r\\n\", \"output\": [\"796587\"]}, {\"input\": \"124 1413 15321 312133 3424 1443242\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75 -13580 14 4508 -67634192 1808916097\\r\\n\", \"output\": [\"1722773\"]}, {\"input\": \"915583842 -15 991339476 -12 -15 -5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"85 -18257 47 -7345 -76967244 1349252598\\r\\n\", \"output\": [\"337737\"]}, {\"input\": \"178 331734603 162 -73813367 -577552570 1005832995\\r\\n\", \"output\": [\"46754\"]}, {\"input\": \"8 -17768 34 963 -2000000000 2000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"26 1885082760 30 -1612707510 -2000000000 2000000000\\r\\n\", \"output\": [\"294660\"]}, {\"input\": \"4 -1999999999 6 -1999999998 -999999999 1999999999\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"121826 1323 1327 304172 -1521910750 860413213\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"36281 170 1917 927519 -1767064448 -177975414\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"37189 -436 464 797102 -1433652908 1847752465\\r\\n\", \"output\": [\"107\"]}, {\"input\": \"81427 -688 1720 -221771 -77602716 1593447723\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"11 -1609620737 1315657088 -7 -162162918 287749240\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1480269313 -1048624081 1314841531 -8 295288505 358226461\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13 -15 19 -2 -334847526 1334632952\\r\\n\", \"output\": [\"5403373\"]}, {\"input\": \"1254161381 -7 821244830 -7 -698761303 941496965\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1269100557 -5 6 -5 -12 -6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"847666888 -6 1327933031 -6 -5 -2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1465846675 1002489474 9 -1250811979 1030017372 1391560043\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 -1915865359 867648990 9 -5 -4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 -1164702220 906446587 -1868913852 222249893 1493113759\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15 -8 17 3 -393290856 231975525\\r\\n\", \"output\": [\"909708\"]}, {\"input\": \"734963978 0 17 0 -12 -5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1090004357 5 1124063714 -840327001 -448110704 128367602\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18 -1071025614 1096150070 0 -6 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"451525105 -8 1256335024 -8 -718788747 928640626\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 3 5 -1292190012 -97547955 250011754\\r\\n\", \"output\": [\"12500588\"]}, {\"input\": \"14 -7 14 -1488383431 -1044342357 842171605\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1384140089 5 16 -1661922737 442287491 1568124284\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16 -11 14 -1466771835 -1192555694 -2257860\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1676164235 -1589020998 1924931103 1189158232 6 12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15 16 12 -5 11 23\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16 -16 5 20 -9 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 -9 1 -2 -13 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"18 -17 9 -17 -29 17\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"735463638 620656007 878587644 536507630 -1556948056 1714374073\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1789433851 -633540112 1286318222 -1728151682 1438333624 1538194890\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15 -1264610276 1157160166 -336457087 -496892962 759120142\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"831644204 422087925 17 -1288230412 -1090082747 1271113499\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17 -13 223959272 -1081245422 -1756575771 38924201\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1228969457 -1826233120 11 -1063855654 -819177202 1039858319\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1186536442 -1691684240 17 -1 -702600351 1121394816\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1132421757 -1481846636 515765656 -12 -622203577 552143596\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18 -1123473160 1826212361 -10 -12 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1197045662 7 15 -1445473718 -1406137199 800415943\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"18 565032929 13 735553852 107748471 1945959489\\r\\n\", \"output\": [\"5172673\"]}, {\"input\": \"1734271904 1 19 -1826828681 0 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1614979757 -1237127436 12 75067457 -933537920 451911806\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 -335942902 1179386720 -723257398 -13 -12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"989432982 2 9 366779468 -1427636085 985664909\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 -1390956935 1404528667 -4 -15 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1370475975 841789607 733784598 467967887 -7 15\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 -7 9 -1 -10 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"960716652 1417038753 1222139305 -4 -1570098546 -931528535\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1744394473 5 1523286739 629247513 -6 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2627 -4960 2627 -4960 -4960 4960\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 -364562196 7 -803430276 0 11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1955378240 -837482305 1743607821 -1623988108 -653286850 178227154\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 -1642366642 1499382371 -6 -822052389 1405478033\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 -1 8 -1 -711474975 237571596\\r\\n\", \"output\": [\"3299606\"]}, {\"input\": \"1497677869 -1313800455 11 12 -1157529918 1754001465\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11 -80049925 1600186381 -1454831688 -1384227392 1621203975\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1042015302 -56794440 1727095321 -1037110962 -9 11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13 0 1419591662 -1360930956 343359607 1283114457\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"752411560 -6 857048450 -405514986 -5 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12 2 18 2 -6 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11 -1 15 -1 -13 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1446642133 -7 9 -1719422944 -916435667 36154654\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1689390799 501112014 13 -1621132473 398367938 709483101\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1932547151 -725726769 782679113 -10 -184530763 498112212\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1 1 1 -2000000000 2000000000\\r\\n', 'output': ['2000000000']}, {'input': '1 10497 19135 2995296 -301164547 -180830773\\r\\n', 'output': ['0']}, {'input': '1689390799 501112014 13 -1621132473 398367938 709483101\\r\\n', 'output': ['0']}, {'input': '1228969457 -1826233120 11 -1063855654 -819177202 1039858319\\r\\n', 'output': ['0']}, {'input': '1614979757 -1237127436 12 75067457 -933537920 451911806\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '16 -16 5 20 -9 7\\r\\n', 'output': ['0']}, {'input': '66 90 48 84 -1709970247 1229724777\\r\\n', 'output': ['2329024']}, {'input': '1446642133 -7 9 -1719422944 -916435667 36154654\\r\\n', 'output': ['1']}, {'input': '2 -1500000000 4 -1499999999 1600000000 1700000000\\r\\n', 'output': ['0']}, {'input': '18 -1123473160 1826212361 -10 -12 1\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '989432982 2 9 366779468 -1427636085 985664909\\r\\n', 'output': ['0']}, {'input': '1480269313 -1048624081 1314841531 -8 295288505 358226461\\r\\n', 'output': ['0']}, {'input': '13 0 1419591662 -1360930956 343359607 1283114457\\r\\n', 'output': ['0']}, {'input': '70 -835526513 23 687193329 -1461506792 1969698938\\r\\n', 'output': ['796587']}, {'input': '15 16 12 -5 11 23\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '1 1 1 1 -2000000000 2000000000\\r\\n', 'output': ['2000000000']}, {'input': '8 40306 2753 1809818 254464419 340812028\\r\\n', 'output': ['3921']}, {'input': '66 90 48 84 -1709970247 1229724777\\r\\n', 'output': ['2329024']}, {'input': '2 -1000000000 2 -999999999 -1000000000 1000000000\\r\\n', 'output': ['0']}, {'input': '1 -2000000000 2 2000000000 -2000000000 2000000000\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '4 -9 1 -2 -13 -1\\r\\n', 'output': ['1']}, {'input': '1 -9 2 -10 -10 -9\\r\\n', 'output': ['0']}, {'input': '12 -696575903 571708420 236073275 2 14\\r\\n', 'output': ['0']}, {'input': '8 40306 2753 1809818 254464419 340812028\\r\\n', 'output': ['3921']}, {'input': '9 -1 8 -1 -711474975 237571596\\r\\n', 'output': ['3299606']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":96.15,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":96.15,"human_sample_line_coverage_4":98.08,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":91.67,"human_sample_branch_coverage_5":100.0,"id":215,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.076,"human_sample_branch_coverage":91.666} {"sample_inputs":"[\"3 2\\n1 3\\n2 1\", \"5 5\\n3 3\\n3 3\", \"4 2\\n2 3\\n1 2\"]","input_specification":"The first line contains two space-separated numbers a1 and b1 \u2014 the sides of the board. Next two lines contain numbers a2,\u2009b2,\u2009a3 and b3 \u2014 the sides of the paintings. All numbers ai,\u2009bi in the input are integers and fit into the range from 1 to 1000.","src_uid":"2ff30d9c4288390fd7b5b37715638ad9","source_code":"import java.util.*;\n\npublic class CF560BGetaldIntoArts {\n public static void main(String[] args) {\n\n Scanner s = new Scanner(System.in);\n boolean b = true;\n\n int a1 = s.nextInt();\n int b1 = s.nextInt();\n int a2 = s.nextInt();\n int b2 = s.nextInt();\n int a3 = s.nextInt();\n int b3 = s.nextInt();\n\n\n if(a1 >= Math.max(a2,a3) && b2+b3<=b1) b = true;\n\n\n\n else if(a1 >= Math.max(a2,b3) && b2+a3<=b1) b = true;\n\n else if(a1 >= Math.max(a3,b2) && b3+a2<=b1) b = true;\n\n else if(a1 >= Math.max(b2,b3) && a2+a3<=b1) b = true;\n else b = false;\n\n\n if(b1 >= Math.max(a2,a3) && b2+b3<=a1) b = true;\n\n else if(b1 >= Math.max(a2,b3) && b2+a3<=a1) b = true;\n\n else if(b1>=Math.max(a3,b2) && b3+a2<=a1) b = true;\n\n else if(b1>=Math.max(b2,b3) && a2+a3<=a1) b = true;\n\n\n if(b == false){\n System.out.println(\"NO\");\n }\n else System.out.println(\"YES\");\n\n\n\n\n }\n}","sample_outputs":"[\"YES\", \"NO\", \"YES\"]","lang_cluster":"Java","notes":"NoteThat's how we can place the pictures in the first test:And that's how we can do it in the third one.","output_specification":"If the paintings can be placed on the wall, print \"YES\" (without the quotes), and if they cannot, print \"NO\" (without the quotes).","description":"Gerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to attach it to the wall and place the paintings on the board. The board has shape of an a1\u2009\u00d7\u2009b1 rectangle, the paintings have shape of a a2\u2009\u00d7\u2009b2 and a3\u2009\u00d7\u2009b3 rectangles.Since the paintings are painted in the style of abstract art, it does not matter exactly how they will be rotated, but still, one side of both the board, and each of the paintings must be parallel to the floor. The paintings can touch each other and the edges of the board, but can not overlap or go beyond the edge of the board. Gerald asks whether it is possible to place the paintings on the board, or is the board he bought not large enough?","human_testcases":"[{\"input\": \"3 2\\r\\n1 3\\r\\n2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 5\\r\\n3 3\\r\\n3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\n2 3\\r\\n1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3\\r\\n1 1\\r\\n1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000 1000\\r\\n999 999\\r\\n1 1000\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 7\\r\\n5 5\\r\\n2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 3\\r\\n2 2\\r\\n2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 9\\r\\n5 1\\r\\n3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9 9\\r\\n3 8\\r\\n5 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 10\\r\\n10 5\\r\\n4 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 6\\r\\n10 1\\r\\n5 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 10\\r\\n6 3\\r\\n6 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 10\\r\\n7 5\\r\\n1 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 10\\r\\n7 4\\r\\n3 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 10\\r\\n1 1\\r\\n9 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 7\\r\\n1 7\\r\\n3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 10\\r\\n5 2\\r\\n3 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9 9\\r\\n9 7\\r\\n2 9\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 10\\r\\n3 8\\r\\n7 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 10\\r\\n6 6\\r\\n4 9\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 9\\r\\n7 6\\r\\n2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 10\\r\\n9 10\\r\\n6 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"90 100\\r\\n52 76\\r\\n6 47\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"84 99\\r\\n82 54\\r\\n73 45\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 62\\r\\n93 3\\r\\n100 35\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"93 98\\r\\n75 32\\r\\n63 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"86 100\\r\\n2 29\\r\\n71 69\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"96 100\\r\\n76 21\\r\\n78 79\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"99 100\\r\\n95 68\\r\\n85 32\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"97 100\\r\\n95 40\\r\\n70 60\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\n6 45\\r\\n97 54\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"99 100\\r\\n99 72\\r\\n68 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"88 100\\r\\n54 82\\r\\n86 45\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"91 100\\r\\n61 40\\r\\n60 88\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\n36 32\\r\\n98 68\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"78 86\\r\\n63 8\\r\\n9 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"72 93\\r\\n38 5\\r\\n67 64\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"484 1000\\r\\n465 2\\r\\n9 535\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"808 1000\\r\\n583 676\\r\\n527 416\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"965 1000\\r\\n606 895\\r\\n533 394\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"824 503\\r\\n247 595\\r\\n151 570\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"970 999\\r\\n457 305\\r\\n542 597\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"332 834\\r\\n312 23\\r\\n505 272\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"886 724\\r\\n830 439\\r\\n102 594\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"958 1000\\r\\n326 461\\r\\n836 674\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"903 694\\r\\n104 488\\r\\n567 898\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"800 1000\\r\\n614 163\\r\\n385 608\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"926 1000\\r\\n813 190\\r\\n187 615\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"541 1000\\r\\n325 596\\r\\n403 56\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"881 961\\r\\n139 471\\r\\n323 731\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"993 1000\\r\\n201 307\\r\\n692 758\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"954 576\\r\\n324 433\\r\\n247 911\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 3\\r\\n7 8\\r\\n1 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 9\\r\\n2 7\\r\\n8 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 4\\r\\n4 3\\r\\n5 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 7\\r\\n8 3\\r\\n2 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 4\\r\\n7 2\\r\\n3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 8\\r\\n5 1\\r\\n10 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 5\\r\\n3 6\\r\\n10 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 2\\r\\n6 6\\r\\n1 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 3\\r\\n6 6\\r\\n4 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9 10\\r\\n4 8\\r\\n5 6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 8\\r\\n3 2\\r\\n8 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 3\\r\\n3 4\\r\\n3 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 10\\r\\n1 8\\r\\n3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"8 1\\r\\n7 5\\r\\n3 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9 7\\r\\n5 2\\r\\n4 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 30\\r\\n42 99\\r\\n78 16\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"64 76\\r\\n5 13\\r\\n54 57\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"85 19\\r\\n80 18\\r\\n76 70\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"57 74\\r\\n99 70\\r\\n86 29\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"22 21\\r\\n73 65\\r\\n92 35\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"90 75\\r\\n38 2\\r\\n100 61\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"62 70\\r\\n48 12\\r\\n75 51\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"23 17\\r\\n34 71\\r\\n98 34\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"95 72\\r\\n65 31\\r\\n89 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"68 19\\r\\n39 35\\r\\n95 65\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"28 65\\r\\n66 27\\r\\n5 72\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 16\\r\\n41 76\\r\\n24 15\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"21 63\\r\\n28 73\\r\\n60 72\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"85 18\\r\\n37 84\\r\\n35 62\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"58 64\\r\\n98 30\\r\\n61 52\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"32 891\\r\\n573 351\\r\\n648 892\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"796 846\\r\\n602 302\\r\\n600 698\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"665 289\\r\\n608 360\\r\\n275 640\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"237 595\\r\\n318 161\\r\\n302 838\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"162 742\\r\\n465 429\\r\\n571 29\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"222 889\\r\\n491 923\\r\\n76 195\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"794 140\\r\\n166 622\\r\\n378 905\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"663 287\\r\\n193 212\\r\\n615 787\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"427 433\\r\\n621 441\\r\\n868 558\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1000 388\\r\\n332 49\\r\\n735 699\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"868 535\\r\\n409 690\\r\\n761 104\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"632 786\\r\\n710 208\\r\\n436 290\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"501 932\\r\\n463 636\\r\\n363 918\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"73 79\\r\\n626 483\\r\\n924 517\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"190 34\\r\\n653 163\\r\\n634 314\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4\\r\\n1 3\\r\\n1 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 10\\r\\n1 1\\r\\n1 11\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 4\\r\\n3 3\\r\\n2 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 4\\r\\n1 6\\r\\n2 3\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '9 10\\r\\n4 8\\r\\n5 6\\r\\n', 'output': ['YES']}, {'input': '3 3\\r\\n3 4\\r\\n3 6\\r\\n', 'output': ['NO']}, {'input': '7 10\\r\\n7 5\\r\\n1 7\\r\\n', 'output': ['YES']}, {'input': '78 86\\r\\n63 8\\r\\n9 4\\r\\n', 'output': ['YES']}, {'input': '9 7\\r\\n5 2\\r\\n4 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '7 3\\r\\n7 8\\r\\n1 5\\r\\n', 'output': ['NO']}, {'input': '993 1000\\r\\n201 307\\r\\n692 758\\r\\n', 'output': ['YES']}, {'input': '663 287\\r\\n193 212\\r\\n615 787\\r\\n', 'output': ['NO']}, {'input': '8 7\\r\\n1 7\\r\\n3 2\\r\\n', 'output': ['YES']}, {'input': '954 576\\r\\n324 433\\r\\n247 911\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '965 1000\\r\\n606 895\\r\\n533 394\\r\\n', 'output': ['YES']}, {'input': '32 891\\r\\n573 351\\r\\n648 892\\r\\n', 'output': ['NO']}, {'input': '9 7\\r\\n5 2\\r\\n4 1\\r\\n', 'output': ['YES']}, {'input': '91 100\\r\\n61 40\\r\\n60 88\\r\\n', 'output': ['YES']}, {'input': '162 742\\r\\n465 429\\r\\n571 29\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '8 7\\r\\n1 7\\r\\n3 2\\r\\n', 'output': ['YES']}, {'input': '95 72\\r\\n65 31\\r\\n89 50\\r\\n', 'output': ['NO']}, {'input': '99 100\\r\\n99 72\\r\\n68 1\\r\\n', 'output': ['YES']}, {'input': '32 891\\r\\n573 351\\r\\n648 892\\r\\n', 'output': ['NO']}, {'input': '58 64\\r\\n98 30\\r\\n61 52\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '97 100\\r\\n95 40\\r\\n70 60\\r\\n', 'output': ['YES']}, {'input': '868 535\\r\\n409 690\\r\\n761 104\\r\\n', 'output': ['YES']}, {'input': '100 100\\r\\n6 45\\r\\n97 54\\r\\n', 'output': ['YES']}, {'input': '10 10\\r\\n10 5\\r\\n4 3\\r\\n', 'output': ['YES']}, {'input': '501 932\\r\\n463 636\\r\\n363 918\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":76.47,"human_sample_branch_coverage_2":76.47,"human_sample_branch_coverage_3":73.53,"human_sample_branch_coverage_4":88.24,"human_sample_branch_coverage_5":70.59,"id":216,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":77.06} {"sample_inputs":"[\"14 34\", \"50 34\", \"387420489 225159023\", \"5 5\"]","input_specification":"The first line contains two integers a and c (0\u2009\u2264\u2009a,\u2009c\u2009\u2264\u2009109). Both numbers are written in decimal notation.","src_uid":"5fb635d52ddccf6a4d5103805da02a88","source_code":"\n\/\/ ~\/BAU\/ACM-ICPC\/Teams\/A++\/BlackBurn95\n\/\/ ~\/sudo apt-get Accpeted\n\nimport java.io.*;\nimport java.util.*;\nimport java.math.*;\nimport static java.lang.Math.*;\nimport static java.lang.Integer.parseInt;\nimport static java.lang.Long.parseLong;\nimport static java.lang.Double.parseDouble;\nimport static java.lang.String.*;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder out = new StringBuilder();\n StringTokenizer tk;\n \n tk = new StringTokenizer(in.readLine());\n BigInteger a = new BigInteger(tk.nextToken()),c = new BigInteger(tk.nextToken());\n \n String A = a.toString(3),C = c.toString(3) ;\n \n if(A.length() < C.length()) {\n String tmp = \"\";\n for(int i=0; i C.length()) {\n String tmp = \"\";\n for(int i=0; i> 1;\n dfs1(nums,0,mid-1,0);\n dfs2(nums,mid,n-1,0);\n\/\/ System.out.println(Arrays.toString(p) + \"-->\" + lenp);\n\/\/ System.out.println(Arrays.toString(q) + \"-->\" + lenq);\n Arrays.sort(p,0,lenp);\n Arrays.sort(q,0,lenq);\n\n\n int i=0, j=lenq-1;\n int result = p[lenp-1] - M + q[lenq-1];\n while(i < lenp){\n while((p[i] + q[j]) >= M)\n j--;\n result = Math.max(result,p[i]+q[j]);\n i++;\n }\n System.out.println(result);\n }\n \/\/\u5de6\u8fb9\u7684dfs\n private static void dfs1(int[] nums, int i, int end ,int sum){\n if(i == end){\n p[lenp++] = sum;\n p[lenp++] = ((sum+nums[i])%M);\n return;\n }\n dfs1(nums,i+1,end, sum);\n dfs1(nums,i+1,end, (sum+nums[i])%M);\n }\n \/\/\u53f3\u8fb9\u7684dfs\n private static void dfs2(int[] nums, int i, int end ,int sum){\n if(i == end){\n q[lenq++] = sum;\n q[lenq++] = ((sum+nums[i])%M);\n return;\n }\n dfs2(nums,i+1,end, sum);\n dfs2(nums,i+1,end, (sum+nums[i])%M);\n }\n}\n","sample_outputs":"[\"3\", \"19\"]","lang_cluster":"Java","notes":"NoteIn the first example you can choose a sequence b\u2009=\u2009{1,\u20092}, so the sum is equal to 7 (and that's 3 after taking it modulo 4).In the second example you can choose a sequence b\u2009=\u2009{3}.","output_specification":"Print the maximum possible value of .","description":"You are given an array a consisting of n integers, and additionally an integer m. You have to choose some sequence of indices b1,\u2009b2,\u2009...,\u2009bk (1\u2009\u2264\u2009b1\u2009<\u2009b2\u2009<\u2009...\u2009<\u2009bk\u2009\u2264\u2009n) in such a way that the value of is maximized. Chosen sequence can be empty.Print the maximum possible value of .","human_testcases":"[{\"input\": \"4 4\\r\\n5 2 4 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 20\\r\\n199 41 299\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"5 10\\r\\n47 100 49 2 56\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 1000\\r\\n38361 75847 14913 11499 8297\\r\\n\", \"output\": [\"917\"]}, {\"input\": \"10 10\\r\\n48 33 96 77 67 59 35 15 14 86\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10 1000\\r\\n16140 63909 7177 99953 35627 40994 29288 7324 44476 36738\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"30 10\\r\\n99 44 42 36 43 82 99 99 10 79 97 84 5 78 37 45 87 87 11 11 79 66 47 100 8 50 27 98 32 27\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30 1000\\r\\n81021 18939 94456 90340 76840 78808 27921 71826 99382 1237 93435 35153 71691 25508 96732 23778 49073 60025 95231 88719 61650 50925 34416 73600 7295 14654 78340 72871 17324 77484\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"35 10\\r\\n86 66 98 91 61 71 14 58 49 92 13 97 13 22 98 83 85 29 85 41 51 16 76 17 75 25 71 10 87 11 9 34 3 6 4\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"35 1000\\r\\n33689 27239 14396 26525 30455 13710 37039 80789 26268 1236 89916 87557 90571 13710 59152 99417 39577 40675 25931 14900 86611 46223 7105 64074 41238 59169 81308 70534 99894 10332 72983 85414 73848 68378 98404\\r\\n\", \"output\": [\"999\"]}, {\"input\": \"35 1000000000\\r\\n723631245 190720106 931659134 503095294 874181352 712517040 800614682 904895364 256863800 39366772 763190862 770183843 774794919 55669976 329106527 513566505 207828535 258356470 816288168 657823769 5223226 865258331 655737365 278677545 880429272 718852999 810522025 229560899 544602508 195068526 878937336 739178504 474601895 54057210 432282541\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"35 982451653\\r\\n27540278 680344696 757828533 487257472 581415866 897315944 104006244 109795853 24393319 840585536 643747159 864374693 675946278 27492061 172462571 484550119 801174500 94160579 818984382 53253720 966692115 811281559 154162995 890236127 799613478 611617443 787587569 606421577 91876376 464150101 671199076 108388038 342311910 974681791 862530363\\r\\n\", \"output\": [\"982451652\"]}, {\"input\": \"15 982451653\\r\\n384052103 7482105 882228352 582828798 992251028 892163214 687253903 951043841 277531875 402248542 499362766 919046434 350763964 288775999 982610665\\r\\n\", \"output\": [\"982368704\"]}, {\"input\": \"35 1000000000\\r\\n513 9778 5859 8149 297 7965 7152 917 243 4353 7248 4913 9403 6199 2930 7461 3888 1898 3222 9424 3960 1902 2933 5268 2650 1687 5319 5065 8450 141 4219 2586 2176 1118 9635\\r\\n\", \"output\": [\"158921\"]}, {\"input\": \"35 982451653\\r\\n5253 7912 3641 7428 6138 9613 9059 6352 9070 89 9030 1686 3098 7852 3316 8158 7497 5804 130 6201 235 64 3451 6104 4148 3446 6059 6802 7466 8781 1636 8291 8874 8924 5997\\r\\n\", \"output\": [\"197605\"]}, {\"input\": \"15 982451653\\r\\n7975 7526 1213 2318 209 7815 4153 1853 6651 2880 4535 587 8022 3365 5491\\r\\n\", \"output\": [\"64593\"]}, {\"input\": \"35 1730970\\r\\n141538 131452 93552 3046 119468 8282 166088 33782 36462 25246 178798 81434 180900 15102 175898 157782 155254 166352 60772 75162 102326 104854 181138 58618 123800 54458 157516 20658 25084 155276 194920 16680 15148 188292 88802\\r\\n\", \"output\": [\"1730968\"]}, {\"input\": \"35 346194136\\r\\n89792 283104 58936 184528 194768 253076 304368 140216 220836 69196 274604 68988 300412 242588 25328 183488 81712 374964 377696 317872 146208 147400 346276 14356 90432 347556 35452 119348 311320 126112 113200 98936 189500 363424 320164\\r\\n\", \"output\": [\"6816156\"]}, {\"input\": \"35 129822795\\r\\n379185 168630 1047420 892020 180690 1438200 168330 1328610 933930 936360 1065225 351990 1079190 681510 1336020 814590 365820 1493580 495825 809745 309585 190320 1148640 146790 1008900 365655 947265 1314060 1048770 1463535 1233420 969330 1324530 944130 1457160\\r\\n\", \"output\": [\"29838960\"]}, {\"input\": \"35 106920170\\r\\n36941450 53002950 90488020 66086895 77577045 16147985 26130825 84977690 87374560 59007480 61416705 100977415 43291920 56833000 12676230 50531950 5325005 54745005 105536410 76922230 9031505 121004870 104634495 16271535 55819890 47603815 85830185 65938635 33074335 40289655 889560 19829775 31653510 120671285 37843365\\r\\n\", \"output\": [\"106907815\"]}, {\"input\": \"35 200000000\\r\\n75420000 93400000 70560000 93860000 183600000 143600000 61780000 145000000 99360000 14560000 109280000 22040000 141220000 14360000 55140000 78580000 96940000 62400000 173220000 40420000 139600000 30100000 141640000 64780000 186080000 159220000 137780000 133640000 83560000 51280000 139100000 133020000 99460000 35900000 78980000\\r\\n\", \"output\": [\"199980000\"]}, {\"input\": \"4 1\\r\\n435 124 324 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 12\\r\\n13\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000\\r\\n1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7 19\\r\\n8 1 4 8 8 7 3\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"6 7\\r\\n1 1 1 1 1 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 5\\r\\n1 2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 36\\r\\n22 9 24 27\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"2 8\\r\\n7 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 12\\r\\n8 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4 10\\r\\n11 31 12 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 8\\r\\n2 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"4 19\\r\\n16 20 19 21\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"3 4\\r\\n9 16 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 3\\r\\n3 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 20\\r\\n4 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3 299\\r\\n100 100 200\\r\\n\", \"output\": [\"200\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 4\\r\\n5 2 4 1\\r\\n', 'output': ['3']}, {'input': '35 1000000000\\r\\n513 9778 5859 8149 297 7965 7152 917 243 4353 7248 4913 9403 6199 2930 7461 3888 1898 3222 9424 3960 1902 2933 5268 2650 1687 5319 5065 8450 141 4219 2586 2176 1118 9635\\r\\n', 'output': ['158921']}, {'input': '35 346194136\\r\\n89792 283104 58936 184528 194768 253076 304368 140216 220836 69196 274604 68988 300412 242588 25328 183488 81712 374964 377696 317872 146208 147400 346276 14356 90432 347556 35452 119348 311320 126112 113200 98936 189500 363424 320164\\r\\n', 'output': ['6816156']}, {'input': '5 10\\r\\n47 100 49 2 56\\r\\n', 'output': ['9']}, {'input': '4 10\\r\\n11 31 12 3\\r\\n', 'output': ['7']}]","human_sample_testcases_2":"[{'input': '30 1000\\r\\n81021 18939 94456 90340 76840 78808 27921 71826 99382 1237 93435 35153 71691 25508 96732 23778 49073 60025 95231 88719 61650 50925 34416 73600 7295 14654 78340 72871 17324 77484\\r\\n', 'output': ['999']}, {'input': '35 106920170\\r\\n36941450 53002950 90488020 66086895 77577045 16147985 26130825 84977690 87374560 59007480 61416705 100977415 43291920 56833000 12676230 50531950 5325005 54745005 105536410 76922230 9031505 121004870 104634495 16271535 55819890 47603815 85830185 65938635 33074335 40289655 889560 19829775 31653510 120671285 37843365\\r\\n', 'output': ['106907815']}, {'input': '2 12\\r\\n8 7\\r\\n', 'output': ['8']}, {'input': '3 4\\r\\n9 16 11\\r\\n', 'output': ['3']}, {'input': '35 1730970\\r\\n141538 131452 93552 3046 119468 8282 166088 33782 36462 25246 178798 81434 180900 15102 175898 157782 155254 166352 60772 75162 102326 104854 181138 58618 123800 54458 157516 20658 25084 155276 194920 16680 15148 188292 88802\\r\\n', 'output': ['1730968']}]","human_sample_testcases_3":"[{'input': '6 7\\r\\n1 1 1 1 1 6\\r\\n', 'output': ['6']}, {'input': '35 982451653\\r\\n5253 7912 3641 7428 6138 9613 9059 6352 9070 89 9030 1686 3098 7852 3316 8158 7497 5804 130 6201 235 64 3451 6104 4148 3446 6059 6802 7466 8781 1636 8291 8874 8924 5997\\r\\n', 'output': ['197605']}, {'input': '2 8\\r\\n2 7\\r\\n', 'output': ['7']}, {'input': '3 20\\r\\n199 41 299\\r\\n', 'output': ['19']}, {'input': '10 10\\r\\n48 33 96 77 67 59 35 15 14 86\\r\\n', 'output': ['9']}]","human_sample_testcases_4":"[{'input': '15 982451653\\r\\n384052103 7482105 882228352 582828798 992251028 892163214 687253903 951043841 277531875 402248542 499362766 919046434 350763964 288775999 982610665\\r\\n', 'output': ['982368704']}, {'input': '4 4\\r\\n5 2 4 1\\r\\n', 'output': ['3']}, {'input': '35 106920170\\r\\n36941450 53002950 90488020 66086895 77577045 16147985 26130825 84977690 87374560 59007480 61416705 100977415 43291920 56833000 12676230 50531950 5325005 54745005 105536410 76922230 9031505 121004870 104634495 16271535 55819890 47603815 85830185 65938635 33074335 40289655 889560 19829775 31653510 120671285 37843365\\r\\n', 'output': ['106907815']}, {'input': '3 20\\r\\n199 41 299\\r\\n', 'output': ['19']}, {'input': '1 1000000000\\r\\n1000000000\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '5 10\\r\\n47 100 49 2 56\\r\\n', 'output': ['9']}, {'input': '15 982451653\\r\\n7975 7526 1213 2318 209 7815 4153 1853 6651 2880 4535 587 8022 3365 5491\\r\\n', 'output': ['64593']}, {'input': '30 1000\\r\\n81021 18939 94456 90340 76840 78808 27921 71826 99382 1237 93435 35153 71691 25508 96732 23778 49073 60025 95231 88719 61650 50925 34416 73600 7295 14654 78340 72871 17324 77484\\r\\n', 'output': ['999']}, {'input': '30 10\\r\\n99 44 42 36 43 82 99 99 10 79 97 84 5 78 37 45 87 87 11 11 79 66 47 100 8 50 27 98 32 27\\r\\n', 'output': ['9']}, {'input': '35 982451653\\r\\n5253 7912 3641 7428 6138 9613 9059 6352 9070 89 9030 1686 3098 7852 3316 8158 7497 5804 130 6201 235 64 3451 6104 4148 3446 6059 6802 7466 8781 1636 8291 8874 8924 5997\\r\\n', 'output': ['197605']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":82.69,"human_sample_line_coverage_2":90.38,"human_sample_line_coverage_3":90.38,"human_sample_line_coverage_4":86.54,"human_sample_line_coverage_5":82.69,"human_sample_branch_coverage_1":72.22,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":77.78,"human_sample_branch_coverage_5":72.22,"id":218,"human_sample_pass_rate":100.0,"human_sample_line_coverage":86.536,"human_sample_branch_coverage":77.776} {"sample_inputs":"[\"40047\", \"7747774\", \"1000000000000000000\"]","input_specification":"The only line contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018). Please do not use the %lld specificator to read or write 64-bit numbers in \u0421++. It is preferred to use the cin, cout streams or the %I64d specificator.","src_uid":"33b73fd9e7f19894ea08e98b790d07f1","source_code":"import java.util.Scanner;\npublic class test3 {\n \n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n long n = input.nextLong(); \n if(check(n) == 7 || check(n) == 4)\n System.out.println(\"YES\");\n else\n System.out.println(\"NO\");\n } \n public static int check(long n){\n int digits = 0;\n String m = Long.toString(n);\n for(int i = 0; i < m.length(); i++){ \n if(n % 10 == 4 || n % 10 == 7){ \n digits++;\n } \n n = n \/ 10; \n }\n return digits; \n }\n \n}","sample_outputs":"[\"NO\", \"YES\", \"NO\"]","lang_cluster":"Java","notes":"NoteIn the first sample there are 3 lucky digits (first one and last two), so the answer is \"NO\".In the second sample there are 7 lucky digits, 7 is lucky number, so the answer is \"YES\".In the third sample there are no lucky digits, so the answer is \"NO\".","output_specification":"Print on the single line \"YES\" if n is a nearly lucky number. Otherwise, print \"NO\" (without the quotes).","description":"Petya loves lucky numbers. We all know that lucky numbers are the positive integers whose decimal representations contain only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.Unfortunately, not all numbers are lucky. Petya calls a number nearly lucky if the number of lucky digits in it is a lucky number. He wonders whether number n is a nearly lucky number.","human_testcases":"[{\"input\": \"40047\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7747774\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"474404774\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4744000695826\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000000004744744\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"446486416781684178\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7777\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"87414417444\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"111222333444555667\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4700\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3794555488744477\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"444444444444444444\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"474447447774444774\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"777777777777777\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"34777745021000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"963\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"855474448854788540\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"999999999999994744\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"400000000474\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"123456789123456789\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"740577777584945874\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7777777\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4444000111222333\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"9847745885202111\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"123456000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4744447444444\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7477\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4747477\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"777777777444444444\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999999999999994744\\r\\n', 'output': ['YES']}, {'input': '474447447774444774\\r\\n', 'output': ['NO']}, {'input': '1\\r\\n', 'output': ['NO']}, {'input': '777777777444444444\\r\\n', 'output': ['NO']}, {'input': '444444444444444444\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '777777777444444444\\r\\n', 'output': ['NO']}, {'input': '40047\\r\\n', 'output': ['NO']}, {'input': '9847745885202111\\r\\n', 'output': ['YES']}, {'input': '4\\r\\n', 'output': ['NO']}, {'input': '1\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '7747774\\r\\n', 'output': ['YES']}, {'input': '400000000474\\r\\n', 'output': ['YES']}, {'input': '9847745885202111\\r\\n', 'output': ['YES']}, {'input': '999999999999994744\\r\\n', 'output': ['YES']}, {'input': '963\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '123456789123456789\\r\\n', 'output': ['YES']}, {'input': '474447447774444774\\r\\n', 'output': ['NO']}, {'input': '87414417444\\r\\n', 'output': ['NO']}, {'input': '4700\\r\\n', 'output': ['NO']}, {'input': '855474448854788540\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '9847745885202111\\r\\n', 'output': ['YES']}, {'input': '999999999\\r\\n', 'output': ['NO']}, {'input': '400000000474\\r\\n', 'output': ['YES']}, {'input': '474447447774444774\\r\\n', 'output': ['NO']}, {'input': '87414417444\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":90.0,"id":219,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":92.0} {"sample_inputs":"[\"10\\nrocesfedoc\", \"16\\nplmaetwoxesisiht\", \"1\\nz\"]","input_specification":"The first line of input consists of a single integer $$$n$$$ ($$$1 \\le n \\le 100$$$) \u2014 the length of the string $$$t$$$. The second line of input consists of the string $$$t$$$. The length of $$$t$$$ is $$$n$$$, and it consists only of lowercase Latin letters.","src_uid":"1b0b2ee44c63cb0634cb63f2ad65cdd3","source_code":"import java.util.Scanner;\n\npublic class RevEncrypt {\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt(), i, j;\n\t\tString t = in.next(), s = \"\";\n\t\tin.close();\n\n\t\tfor (i = 2; i <= n; i++)\n\t\t\tif (n % i == 0) {\n\t\t\t\tfor (j = i - 1; j >= 0; j--)\n\t\t\t\t\ts += t.charAt(j);\n\t\t\t\t\n\t\t\t\ts += t.substring(i);\n\t\t\t\tt = s;\n\t\t\t\ts = \"\";\n\t\t\t}\n\t\tSystem.out.println(t);\n\t}\n}\n","sample_outputs":"[\"codeforces\", \"thisisexampletwo\", \"z\"]","lang_cluster":"Java","notes":"NoteThe first example is described in the problem statement.","output_specification":"Print a string $$$s$$$ such that the above algorithm results in $$$t$$$.","description":"A string $$$s$$$ of length $$$n$$$ can be encrypted by the following algorithm: iterate over all divisors of $$$n$$$ in decreasing order (i.e. from $$$n$$$ to $$$1$$$), for each divisor $$$d$$$, reverse the substring $$$s[1 \\dots d]$$$ (i.e. the substring which starts at position $$$1$$$ and ends at position $$$d$$$). For example, the above algorithm applied to the string $$$s$$$=\"codeforces\" leads to the following changes: \"codeforces\" $$$\\to$$$ \"secrofedoc\" $$$\\to$$$ \"orcesfedoc\" $$$\\to$$$ \"rocesfedoc\" $$$\\to$$$ \"rocesfedoc\" (obviously, the last reverse operation doesn't change the string because $$$d=1$$$).You are given the encrypted string $$$t$$$. Your task is to decrypt this string, i.e., to find a string $$$s$$$ such that the above algorithm results in string $$$t$$$. It can be proven that this string $$$s$$$ always exists and is unique.","human_testcases":"[{\"input\": \"10\\r\\nrocesfedoc\\r\\n\", \"output\": [\"codeforces\"]}, {\"input\": \"16\\r\\nplmaetwoxesisiht\\r\\n\", \"output\": [\"thisisexampletwo\"]}, {\"input\": \"1\\r\\nz\\r\\n\", \"output\": [\"z\"]}, {\"input\": \"2\\r\\nir\\r\\n\", \"output\": [\"ri\"]}, {\"input\": \"3\\r\\nilj\\r\\n\", \"output\": [\"jli\"]}, {\"input\": \"4\\r\\njfyy\\r\\n\", \"output\": [\"yyjf\"]}, {\"input\": \"6\\r\\nkrdych\\r\\n\", \"output\": [\"hcyrkd\"]}, {\"input\": \"60\\r\\nfnebsopcvmlaoecpzmakqigyuutueuozjxutlwwiochekmhjgwxsgfbcrpqj\\r\\n\", \"output\": [\"jqprcbfgsxwgjhmkehcoiwwltuxjzokamzpalobnfespcvmoecqigyuutueu\"]}, {\"input\": \"64\\r\\nhnlzzhrvqnldswxfsrowfhmyzbxtyoxhogudasgywxycyhzgiseerbislcncvnwy\\r\\n\", \"output\": [\"ywnvcnclsibreesigzhycyxwygsadugofxwsdlnqzlhnzhrvsrowfhmyzbxtyoxh\"]}, {\"input\": \"97\\r\\nqnqrmdhmbubaijtwsecbidqouhlecladwgwcuxbigckrfzasnbfbslukoayhcgquuacygakhxoubibxtqkpyyhzjipylujgrc\\r\\n\", \"output\": [\"crgjulypijzhyypkqtxbibuoxhkagycauuqgchyaokulsbfbnsazfrkcgibxucwgwdalcelhuoqdibceswtjiabubmhdmrqnq\"]}, {\"input\": \"100\\r\\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\\r\\n\", \"output\": [\"fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi\"]}, {\"input\": \"96\\r\\nqtbcksuvxonzbkokhqlgkrvimzqmqnrvqlihrmksldyydacbtckfphenxszcnzhfjmpeykrvshgiboivkvabhrpphgavvprz\\r\\n\", \"output\": [\"zrpvvaghpprhbavkviobighsvrkyepmjfhznczsxnehpfkctvrnqmqzmkokbvuctqbksxonzhqlgkrviqlihrmksldyydacb\"]}, {\"input\": \"90\\r\\nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n\", \"output\": [\"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\"]}, {\"input\": \"89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n\", \"output\": [\"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\"]}, {\"input\": \"99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n\", \"output\": [\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\"]}, {\"input\": \"100\\r\\noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\\r\\n\", \"output\": [\"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\"]}, {\"input\": \"60\\r\\nwwwwwxwwwwwwfhwwhwwwwwwawwwwwwwwwwwwwnwwwwwwwwwwwwwwwwwwwwww\\r\\n\", \"output\": [\"wwwwwwwwwwwwwwwwwwwwwwnwwwwwwwwwwhwwwxwwwwwwwwwfhwwwwawwwwww\"]}, {\"input\": \"90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n\", \"output\": [\"cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc\"]}, {\"input\": \"97\\r\\nfwffffffffffffffffffffffffrffffffffffffffzfffffffffffffffftfcfffffffqffffffffffffffffffffffyfffff\\r\\n\", \"output\": [\"fffffyffffffffffffffffffffffqfffffffcftffffffffffffffffzffffffffffffffrffffffffffffffffffffffffwf\"]}, {\"input\": \"100\\r\\ndjjjjjjjjjjgjjjjjjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjjjjajjjjjjajjjjjjrjjjjjjjjjjjjrjjtjjjjjjjjjjjjjojjj\\r\\n\", \"output\": [\"jjjojjjjjjjjjjjjjtjjrjjjjjjjjjjjjrjjjjjjajjjjjjajjjjjjjjjjjjjjdjjjgjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjj\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n', 'output': ['cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc']}, {'input': '89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n', 'output': ['wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww']}, {'input': '60\\r\\nwwwwwxwwwwwwfhwwhwwwwwwawwwwwwwwwwwwwnwwwwwwwwwwwwwwwwwwwwww\\r\\n', 'output': ['wwwwwwwwwwwwwwwwwwwwwwnwwwwwwwwwwhwwwxwwwwwwwwwfhwwwwawwwwww']}, {'input': '2\\r\\nir\\r\\n', 'output': ['ri']}]","human_sample_testcases_2":"[{'input': '4\\r\\njfyy\\r\\n', 'output': ['yyjf']}, {'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '90\\r\\nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n', 'output': ['mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm']}, {'input': '89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n', 'output': ['wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww']}, {'input': '90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n', 'output': ['cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc']}]","human_sample_testcases_3":"[{'input': '64\\r\\nhnlzzhrvqnldswxfsrowfhmyzbxtyoxhogudasgywxycyhzgiseerbislcncvnwy\\r\\n', 'output': ['ywnvcnclsibreesigzhycyxwygsadugofxwsdlnqzlhnzhrvsrowfhmyzbxtyoxh']}, {'input': '99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n', 'output': ['qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq']}, {'input': '6\\r\\nkrdych\\r\\n', 'output': ['hcyrkd']}, {'input': '97\\r\\nqnqrmdhmbubaijtwsecbidqouhlecladwgwcuxbigckrfzasnbfbslukoayhcgquuacygakhxoubibxtqkpyyhzjipylujgrc\\r\\n', 'output': ['crgjulypijzhyypkqtxbibuoxhkagycauuqgchyaokulsbfbnsazfrkcgibxucwgwdalcelhuoqdibceswtjiabubmhdmrqnq']}, {'input': '90\\r\\nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n', 'output': ['mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm']}]","human_sample_testcases_4":"[{'input': '100\\r\\noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\\r\\n', 'output': ['oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo']}, {'input': '100\\r\\ndjjjjjjjjjjgjjjjjjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjjjjajjjjjjajjjjjjrjjjjjjjjjjjjrjjtjjjjjjjjjjjjjojjj\\r\\n', 'output': ['jjjojjjjjjjjjjjjjtjjrjjjjjjjjjjjjrjjjjjjajjjjjjajjjjjjjjjjjjjjdjjjgjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjj']}, {'input': '90\\r\\nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n', 'output': ['mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm']}, {'input': '90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n', 'output': ['cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc']}, {'input': '100\\r\\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\\r\\n', 'output': ['fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi']}]","human_sample_testcases_5":"[{'input': '89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n', 'output': ['wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww']}, {'input': '99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n', 'output': ['qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq']}, {'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '64\\r\\nhnlzzhrvqnldswxfsrowfhmyzbxtyoxhogudasgywxycyhzgiseerbislcncvnwy\\r\\n', 'output': ['ywnvcnclsibreesigzhycyxwygsadugofxwsdlnqzlhnzhrvsrowfhmyzbxtyoxh']}, {'input': '6\\r\\nkrdych\\r\\n', 'output': ['hcyrkd']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":220,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 0 0 0 9\\n0 0 0 0 0\\n0 0 0 0 0\\n0 0 0 0 0\\n7 0 0 0 0\", \"0 43 21 18 2\\n3 0 21 11 65\\n5 2 0 1 4\\n54 62 12 0 99\\n87 64 81 33 0\"]","input_specification":"The input consists of five lines, each line contains five space-separated integers: the j-th number in the i-th line shows gij (0\u2009\u2264\u2009gij\u2009\u2264\u2009105). It is guaranteed that gii\u2009=\u20090 for all i. Assume that the students are numbered from 1 to 5.","src_uid":"be6d4df20e9a48d183dd8f34531df246","source_code":"import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\npublic class Temp3 {\n\tpublic static void main(String[] args) throws Throwable {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint[][] arr = new int[5][5];\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\tarr[i][j] = Integer.parseInt(st.nextToken());\n\t\t\t}\n\t\t}\n\t\tlong ans = 0;\n\t\tfor (int a = 0; a < 5; a++) \n\t\t{\n\t\t\tfor (int b = 0; b < 5; b++)\n\t\t\t{\n\t\t\t\tif(b==a )\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (int c = 0; c < 5; c++) \n\t\t\t\t{\n\t\t\t\t\tif(c==a || c==b )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tfor (int d = 0; d < 5; d++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(d==a || d==b || d==c )\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tfor (int e = 0; e < 5; e++) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(e==a || e==b || e==c || e==d )\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\tlong cur = arr[a][b] + arr[b][a] + arr[c][d] + arr[d][c];\n\t\t\t\t\t\t\t\t cur+= arr[b][c] + arr[c][b] + arr[d][e] + arr[e][d];\n\t\t\t\t\t\t\t\t cur+= arr[d][c] + arr[c][d];\n\t\t\t\t\t\t\t\t cur+= arr[e][d] + arr[d][e];\n\t\t\t\t\t\t\tans = Math.max(ans, cur);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}\n","sample_outputs":"[\"32\", \"620\"]","lang_cluster":"Java","notes":"NoteIn the first sample, the optimal arrangement of the line is 23154. In this case, the total happiness equals:(g23\u2009+\u2009g32\u2009+\u2009g15\u2009+\u2009g51)\u2009+\u2009(g13\u2009+\u2009g31\u2009+\u2009g54\u2009+\u2009g45)\u2009+\u2009(g15\u2009+\u2009g51)\u2009+\u2009(g54\u2009+\u2009g45)\u2009=\u200932.","output_specification":"Print a single integer \u2014 the maximum possible total happiness of the students.","description":"Many students live in a dormitory. A dormitory is a whole new world of funny amusements and possibilities but it does have its drawbacks. There is only one shower and there are multiple students who wish to have a shower in the morning. That's why every morning there is a line of five people in front of the dormitory shower door. As soon as the shower opens, the first person from the line enters the shower. After a while the first person leaves the shower and the next person enters the shower. The process continues until everybody in the line has a shower.Having a shower takes some time, so the students in the line talk as they wait. At each moment of time the students talk in pairs: the (2i\u2009-\u20091)-th man in the line (for the current moment) talks with the (2i)-th one. Let's look at this process in more detail. Let's number the people from 1 to 5. Let's assume that the line initially looks as 23154 (person number 2 stands at the beginning of the line). Then, before the shower opens, 2 talks with 3, 1 talks with 5, 4 doesn't talk with anyone. Then 2 enters the shower. While 2 has a shower, 3 and 1 talk, 5 and 4 talk too. Then, 3 enters the shower. While 3 has a shower, 1 and 5 talk, 4 doesn't talk to anyone. Then 1 enters the shower and while he is there, 5 and 4 talk. Then 5 enters the shower, and then 4 enters the shower.We know that if students i and j talk, then the i-th student's happiness increases by gij and the j-th student's happiness increases by gji. Your task is to find such initial order of students in the line that the total happiness of all students will be maximum in the end. Please note that some pair of students may have a talk several times. In the example above students 1 and 5 talk while they wait for the shower to open and while 3 has a shower.","human_testcases":"[{\"input\": \"0 0 0 0 9\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n7 0 0 0 0\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"0 43 21 18 2\\r\\n3 0 21 11 65\\r\\n5 2 0 1 4\\r\\n54 62 12 0 99\\r\\n87 64 81 33 0\\r\\n\", \"output\": [\"620\"]}, {\"input\": \"0 4 2 4 9\\r\\n6 0 2 5 0\\r\\n2 5 0 6 3\\r\\n6 3 3 0 10\\r\\n0 3 1 3 0\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"0 65 90 2 32\\r\\n69 0 9 97 67\\r\\n77 97 0 16 84\\r\\n18 50 94 0 63\\r\\n69 12 82 16 0\\r\\n\", \"output\": [\"947\"]}, {\"input\": \"0 70 10 0 0\\r\\n70 0 50 90 0\\r\\n10 50 0 80 0\\r\\n0 90 80 0 100\\r\\n0 0 0 100 0\\r\\n\", \"output\": [\"960\"]}, {\"input\": \"0 711 647 743 841\\r\\n29 0 109 38 682\\r\\n329 393 0 212 512\\r\\n108 56 133 0 579\\r\\n247 92 933 164 0\\r\\n\", \"output\": [\"6265\"]}, {\"input\": \"0 9699 6962 6645 7790\\r\\n9280 0 6215 8661 6241\\r\\n2295 7817 0 7373 9681\\r\\n693 6298 1381 0 4633\\r\\n7626 3761 694 4073 0\\r\\n\", \"output\": [\"93667\"]}, {\"input\": \"0 90479 71577 33797 88848\\r\\n45771 0 96799 78707 72708\\r\\n5660 26421 0 10991 22757\\r\\n78919 24804 90645 0 48665\\r\\n92787 43671 38727 17302 0\\r\\n\", \"output\": [\"860626\"]}, {\"input\": \"0 61256 85109 94834 32902\\r\\n55269 0 67023 1310 85444\\r\\n23497 84998 0 55618 80701\\r\\n30324 1713 62127 0 55041\\r\\n47799 52448 40072 28971 0\\r\\n\", \"output\": [\"822729\"]}, {\"input\": \"0 7686 20401 55871 74372\\r\\n29526 0 15486 2152 84700\\r\\n27854 30093 0 62418 14297\\r\\n43903 76036 36194 0 50522\\r\\n29743 9945 38831 75882 0\\r\\n\", \"output\": [\"605229\"]}, {\"input\": \"0 5271 65319 64976 13673\\r\\n80352 0 41169 66004 47397\\r\\n33603 44407 0 55079 36122\\r\\n4277 9834 92810 0 80276\\r\\n1391 1145 92132 51595 0\\r\\n\", \"output\": [\"744065\"]}, {\"input\": \"0 75763 33154 32389 12897\\r\\n5095 0 6375 61517 46063\\r\\n35354 82789 0 24814 310\\r\\n37373 45993 61355 0 76865\\r\\n24383 84258 71887 71430 0\\r\\n\", \"output\": [\"714904\"]}, {\"input\": \"0 89296 32018 98206 22395\\r\\n15733 0 69391 74253 50419\\r\\n80450 89589 0 20583 51716\\r\\n38629 93129 67730 0 69703\\r\\n44054 83018 21382 64478 0\\r\\n\", \"output\": [\"874574\"]}, {\"input\": \"0 14675 94714 27735 99544\\r\\n45584 0 43621 94734 66110\\r\\n72838 45781 0 47389 99394\\r\\n75870 95368 33311 0 63379\\r\\n21974 70489 53797 23747 0\\r\\n\", \"output\": [\"974145\"]}, {\"input\": \"0 9994 14841 63916 37926\\r\\n80090 0 90258 96988 18217\\r\\n674 69024 0 17641 54436\\r\\n35046 21380 14213 0 67188\\r\\n49360 19086 68337 70856 0\\r\\n\", \"output\": [\"801116\"]}, {\"input\": \"0 28287 52158 19163 10096\\r\\n93438 0 19260 88892 12429\\r\\n22525 60034 0 78163 18126\\r\\n11594 8506 56066 0 17732\\r\\n59561 82486 23419 57406 0\\r\\n\", \"output\": [\"654636\"]}, {\"input\": \"0 35310 30842 63415 91022\\r\\n30553 0 25001 38944 92355\\r\\n48906 33736 0 96880 80893\\r\\n80507 79652 45299 0 38212\\r\\n72488 77736 19203 56436 0\\r\\n\", \"output\": [\"953303\"]}, {\"input\": \"0 42865 18485 37168 43099\\r\\n41476 0 58754 73410 51163\\r\\n76093 44493 0 51611 93773\\r\\n87223 80979 58422 0 63327\\r\\n51215 63346 84797 52809 0\\r\\n\", \"output\": [\"864938\"]}, {\"input\": \"0 63580 51022 25392 84354\\r\\n39316 0 17516 63801 92440\\r\\n5447 2074 0 11758 4772\\r\\n26329 55642 62442 0 75330\\r\\n6164 83831 10741 15214 0\\r\\n\", \"output\": [\"738415\"]}, {\"input\": \"0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 1 1 1 0\\r\\n1 0 0 1 0\\r\\n0 1 0 0 1\\r\\n1 1 0 0 0\\r\\n1 0 0 1 0\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"0 3 6 9 8\\r\\n2 0 8 7 7\\r\\n4 6 0 6 1\\r\\n9 0 3 0 6\\r\\n6 5 0 2 0\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"0 97 67 53 6\\r\\n96 0 100 57 17\\r\\n27 79 0 66 16\\r\\n89 46 71 0 28\\r\\n27 26 27 12 0\\r\\n\", \"output\": [\"926\"]}, {\"input\": \"0 670 904 349 56\\r\\n446 0 941 590 993\\r\\n654 888 0 423 752\\r\\n16 424 837 0 433\\r\\n418 655 459 897 0\\r\\n\", \"output\": [\"9752\"]}, {\"input\": \"0 4109 129 1340 7124\\r\\n7815 0 8991 2828 909\\r\\n5634 799 0 5691 9604\\r\\n3261 7013 8062 0 5160\\r\\n2433 4742 694 4786 0\\r\\n\", \"output\": [\"69867\"]}, {\"input\": \"0 14299 32984 96001 30445\\r\\n77723 0 75669 14101 55389\\r\\n30897 9956 0 52675 29987\\r\\n36518 90812 92955 0 64020\\r\\n91242 50085 86272 62454 0\\r\\n\", \"output\": [\"783459\"]}, {\"input\": \"0 46183 30304 63049 13191\\r\\n37244 0 23076 12594 43885\\r\\n98470 1788 0 37335 7775\\r\\n33822 50804 27921 0 56734\\r\\n38313 67579 77714 46687 0\\r\\n\", \"output\": [\"666175\"]}, {\"input\": \"0 39037 87960 13497 38526\\r\\n5528 0 44220 23338 92550\\r\\n87887 86544 0 30269 82845\\r\\n24590 60325 90979 0 20186\\r\\n64959 69875 93564 68355 0\\r\\n\", \"output\": [\"950600\"]}, {\"input\": \"0 27677 88187 87515 82582\\r\\n98177 0 22852 28214 99977\\r\\n52662 14066 0 79760 68188\\r\\n56883 30561 91843 0 79777\\r\\n12461 14821 29284 54372 0\\r\\n\", \"output\": [\"878207\"]}, {\"input\": \"0 37330 91942 67667 42061\\r\\n1978 0 84218 17 10834\\r\\n11303 6279 0 48597 26591\\r\\n82688 5437 34983 0 92556\\r\\n79574 32231 23167 16637 0\\r\\n\", \"output\": [\"718057\"]}, {\"input\": \"0 3 0 0 0\\r\\n3 0 2 0 0\\r\\n0 2 0 1 0\\r\\n0 0 1 0 1\\r\\n0 0 0 1 0\\r\\n\", \"output\": [\"24\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '0 70 10 0 0\\r\\n70 0 50 90 0\\r\\n10 50 0 80 0\\r\\n0 90 80 0 100\\r\\n0 0 0 100 0\\r\\n', 'output': ['960']}, {'input': '0 43 21 18 2\\r\\n3 0 21 11 65\\r\\n5 2 0 1 4\\r\\n54 62 12 0 99\\r\\n87 64 81 33 0\\r\\n', 'output': ['620']}, {'input': '0 5271 65319 64976 13673\\r\\n80352 0 41169 66004 47397\\r\\n33603 44407 0 55079 36122\\r\\n4277 9834 92810 0 80276\\r\\n1391 1145 92132 51595 0\\r\\n', 'output': ['744065']}, {'input': '0 3 0 0 0\\r\\n3 0 2 0 0\\r\\n0 2 0 1 0\\r\\n0 0 1 0 1\\r\\n0 0 0 1 0\\r\\n', 'output': ['24']}, {'input': '0 0 0 0 9\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n0 0 0 0 0\\r\\n7 0 0 0 0\\r\\n', 'output': ['32']}]","human_sample_testcases_2":"[{'input': '0 1 1 1 0\\r\\n1 0 0 1 0\\r\\n0 1 0 0 1\\r\\n1 1 0 0 0\\r\\n1 0 0 1 0\\r\\n', 'output': ['10']}, {'input': '0 27677 88187 87515 82582\\r\\n98177 0 22852 28214 99977\\r\\n52662 14066 0 79760 68188\\r\\n56883 30561 91843 0 79777\\r\\n12461 14821 29284 54372 0\\r\\n', 'output': ['878207']}, {'input': '0 28287 52158 19163 10096\\r\\n93438 0 19260 88892 12429\\r\\n22525 60034 0 78163 18126\\r\\n11594 8506 56066 0 17732\\r\\n59561 82486 23419 57406 0\\r\\n', 'output': ['654636']}, {'input': '0 65 90 2 32\\r\\n69 0 9 97 67\\r\\n77 97 0 16 84\\r\\n18 50 94 0 63\\r\\n69 12 82 16 0\\r\\n', 'output': ['947']}, {'input': '0 70 10 0 0\\r\\n70 0 50 90 0\\r\\n10 50 0 80 0\\r\\n0 90 80 0 100\\r\\n0 0 0 100 0\\r\\n', 'output': ['960']}]","human_sample_testcases_3":"[{'input': '0 3 0 0 0\\r\\n3 0 2 0 0\\r\\n0 2 0 1 0\\r\\n0 0 1 0 1\\r\\n0 0 0 1 0\\r\\n', 'output': ['24']}, {'input': '0 9699 6962 6645 7790\\r\\n9280 0 6215 8661 6241\\r\\n2295 7817 0 7373 9681\\r\\n693 6298 1381 0 4633\\r\\n7626 3761 694 4073 0\\r\\n', 'output': ['93667']}, {'input': '0 1 1 1 0\\r\\n1 0 0 1 0\\r\\n0 1 0 0 1\\r\\n1 1 0 0 0\\r\\n1 0 0 1 0\\r\\n', 'output': ['10']}, {'input': '0 97 67 53 6\\r\\n96 0 100 57 17\\r\\n27 79 0 66 16\\r\\n89 46 71 0 28\\r\\n27 26 27 12 0\\r\\n', 'output': ['926']}, {'input': '0 39037 87960 13497 38526\\r\\n5528 0 44220 23338 92550\\r\\n87887 86544 0 30269 82845\\r\\n24590 60325 90979 0 20186\\r\\n64959 69875 93564 68355 0\\r\\n', 'output': ['950600']}]","human_sample_testcases_4":"[{'input': '0 42865 18485 37168 43099\\r\\n41476 0 58754 73410 51163\\r\\n76093 44493 0 51611 93773\\r\\n87223 80979 58422 0 63327\\r\\n51215 63346 84797 52809 0\\r\\n', 'output': ['864938']}, {'input': '0 3 6 9 8\\r\\n2 0 8 7 7\\r\\n4 6 0 6 1\\r\\n9 0 3 0 6\\r\\n6 5 0 2 0\\r\\n', 'output': ['90']}, {'input': '0 28287 52158 19163 10096\\r\\n93438 0 19260 88892 12429\\r\\n22525 60034 0 78163 18126\\r\\n11594 8506 56066 0 17732\\r\\n59561 82486 23419 57406 0\\r\\n', 'output': ['654636']}, {'input': '0 46183 30304 63049 13191\\r\\n37244 0 23076 12594 43885\\r\\n98470 1788 0 37335 7775\\r\\n33822 50804 27921 0 56734\\r\\n38313 67579 77714 46687 0\\r\\n', 'output': ['666175']}, {'input': '0 90479 71577 33797 88848\\r\\n45771 0 96799 78707 72708\\r\\n5660 26421 0 10991 22757\\r\\n78919 24804 90645 0 48665\\r\\n92787 43671 38727 17302 0\\r\\n', 'output': ['860626']}]","human_sample_testcases_5":"[{'input': '0 3 0 0 0\\r\\n3 0 2 0 0\\r\\n0 2 0 1 0\\r\\n0 0 1 0 1\\r\\n0 0 0 1 0\\r\\n', 'output': ['24']}, {'input': '0 9994 14841 63916 37926\\r\\n80090 0 90258 96988 18217\\r\\n674 69024 0 17641 54436\\r\\n35046 21380 14213 0 67188\\r\\n49360 19086 68337 70856 0\\r\\n', 'output': ['801116']}, {'input': '0 39037 87960 13497 38526\\r\\n5528 0 44220 23338 92550\\r\\n87887 86544 0 30269 82845\\r\\n24590 60325 90979 0 20186\\r\\n64959 69875 93564 68355 0\\r\\n', 'output': ['950600']}, {'input': '0 35310 30842 63415 91022\\r\\n30553 0 25001 38944 92355\\r\\n48906 33736 0 96880 80893\\r\\n80507 79652 45299 0 38212\\r\\n72488 77736 19203 56436 0\\r\\n', 'output': ['953303']}, {'input': '0 70 10 0 0\\r\\n70 0 50 90 0\\r\\n10 50 0 80 0\\r\\n0 90 80 0 100\\r\\n0 0 0 100 0\\r\\n', 'output': ['960']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":221,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"8.549e2\", \"8.549e3\", \"0.33e0\"]","input_specification":"The first and only line of input contains a single string of form a.deb where a, d and b are integers and e is usual character 'e' (0\u2009\u2264\u2009a\u2009\u2264\u20099,\u20090\u2009\u2264\u2009d\u2009<\u200910100,\u20090\u2009\u2264\u2009b\u2009\u2264\u2009100)\u00a0\u2014 the scientific notation of the desired distance value. a and b contain no leading zeros and d contains no trailing zeros (but may be equal to 0). Also, b can not be non-zero if a is zero.","src_uid":"a79358099f08f3ec50c013d47d910eef","source_code":"import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\n\/**\n * Created by kaaveh on 7\/29\/16.\n *\/\npublic class _697B_ {\n public static void main(String[] args) throws IOException {\n\n char tmp;\n int num;\n int zero;\n ArrayList data = new ArrayList<>();\n kaaveh in = new kaaveh();\n\n System.out.print((char) System.in.read());\n System.in.read();\n\n while(true){\n tmp = (char) System.in.read();\n if (tmp == 'e'){\n break;\n } else {\n data.add(tmp);\n }\n }\n\n num = in.kint();\n zero =num - data.size();\n if (num > data.size())\n num = data.size();\n for (int i=0; i 0){\n System.out.print('0');\n zero--;\n }\n }\n}\n\nclass kaaveh {\n static String kLine(int maxLg) {\n byte lin[] = new byte[maxLg];\n int lg = 0, car = -1;\n String line = \"\";\n\n try {\n while (lg < maxLg) {\n car = System.in.read();\n if ((car < 0) || (car == '\\n') || (car == '\\r')) break;\n lin[lg++] += car;\n }\n } catch (IOException e) {\n return (null);\n }\n\n if ((car < 0) && (lg == 0)) return (null); \/\/ eof\n return (new String(lin, 0, lg));\n }\n\n static String knex(int maxLg) {\n byte lin[] = new byte[maxLg];\n int lg = 0, car = -1;\n String line = \"\";\n\n try {\n\n while ((car < 0) || (car == '\\n') || (car == ' ') || (car == '\\t') || (car == '\\r'))\n car = System.in.read();\n\n while (lg < maxLg) {\n if ((car < 0) || (car == '\\n') || (car == ' ') || (car == '\\t') || (car == '\\r')) break;\n lin[lg++] += car;\n car = System.in.read();\n }\n } catch (IOException e) {\n return (null);\n }\n\n if ((car < 0) && (lg == 0)) return (null); \/\/ eof\n return (new String(lin, 0, lg));\n }\n\n static int kint() {\n return Integer.parseInt(knex(11));\n }\n\n static long kLong() {\n return Long.parseLong(knex(20));\n }\n\n static double kdouble() {\n return Double.parseDouble(knex(100));\n }\n}","sample_outputs":"[\"854.9\", \"8549\", \"0.33\"]","lang_cluster":"Java","notes":null,"output_specification":"Print the only real number x (the desired distance value) in the only line in its decimal notation. Thus if x is an integer, print it's integer value without decimal part and decimal point and without leading zeroes. Otherwise print x in a form of p.q such that p is an integer that have no leading zeroes (but may be equal to zero), and q is an integer that have no trailing zeroes (and may not be equal to zero).","description":"Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurate. Barney asked the bar tender Carl about this distance value, but Carl was so busy talking to the customers so he wrote the distance value (it's a real number) on a napkin. The problem is that he wrote it in scientific notation. The scientific notation of some real number x is the notation of form AeB, where A is a real number and B is an integer and x\u2009=\u2009A\u2009\u00d7\u200910B is true. In our case A is between 0 and 9 and B is non-negative.Barney doesn't know anything about scientific notation (as well as anything scientific at all). So he asked you to tell him the distance value in usual decimal representation with minimal number of digits after the decimal point (and no decimal point if it is an integer). See the output format for better understanding.","human_testcases":"[{\"input\": \"8.549e2\\r\\n\", \"output\": [\"854.9\"]}, {\"input\": \"8.549e3\\r\\n\", \"output\": [\"8549\"]}, {\"input\": \"0.33e0\\r\\n\", \"output\": [\"0.33\"]}, {\"input\": \"1.31e1\\r\\n\", \"output\": [\"13.1\"]}, {\"input\": \"1.038e0\\r\\n\", \"output\": [\"1.038\"]}, {\"input\": \"8.25983e5\\r\\n\", \"output\": [\"825983\"]}, {\"input\": \"8.77056e6\\r\\n\", \"output\": [\"8770560\"]}, {\"input\": \"4.28522890224373996236468418851564462623381500262405e30\\r\\n\", \"output\": [\"4285228902243739962364684188515.64462623381500262405\"]}, {\"input\": \"4.09336275522154223604344399571355118601483591618747e85\\r\\n\", \"output\": [\"40933627552215422360434439957135511860148359161874700000000000000000000000000000000000\"]}, {\"input\": \"2.0629094807595491132306264747042243928486303384791951220362096240931158821630792563855724946791054152e85\\r\\n\", \"output\": [\"20629094807595491132306264747042243928486303384791951220362096240931158821630792563855.724946791054152\"]}, {\"input\": \"0.7e0\\r\\n\", \"output\": [\"0.7\"]}, {\"input\": \"0.75e0\\r\\n\", \"output\": [\"0.75\"]}, {\"input\": \"0.3299209894804593859495773277850971828150469972132991597085582244596065712639531451e0\\r\\n\", \"output\": [\"0.3299209894804593859495773277850971828150469972132991597085582244596065712639531451\"]}, {\"input\": \"0.1438410315232821898580886049593487999249997483354329425897344341660326482795266134253882860655873197e0\\r\\n\", \"output\": [\"0.1438410315232821898580886049593487999249997483354329425897344341660326482795266134253882860655873197\"]}, {\"input\": \"1.7282220592677586155528202123627915992640276211396528871e0\\r\\n\", \"output\": [\"1.7282220592677586155528202123627915992640276211396528871\"]}, {\"input\": \"1.91641639840522198229453882518758458881136053577016034847369545687354908120008812644841021662133251e89\\r\\n\", \"output\": [\"191641639840522198229453882518758458881136053577016034847369545687354908120008812644841021.662133251\"]}, {\"input\": \"7.0e100\\r\\n\", \"output\": [\"70000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"]}, {\"input\": \"1.7390193766535948887334396973270576641602486903095355363287177932797263236084900516267835886881779051e100\\r\\n\", \"output\": [\"17390193766535948887334396973270576641602486903095355363287177932797263236084900516267835886881779051\"]}, {\"input\": \"4.6329496401734172195e50\\r\\n\", \"output\": [\"463294964017341721950000000000000000000000000000000\"]}, {\"input\": \"2.806303180541991592302230754797823269634e39\\r\\n\", \"output\": [\"2806303180541991592302230754797823269634\"]}, {\"input\": \"5.8743505652112692964508303637002e64\\r\\n\", \"output\": [\"58743505652112692964508303637002000000000000000000000000000000000\"]}, {\"input\": \"6.8778661934058405217475274375560252344373481358834598914724956711e31\\r\\n\", \"output\": [\"68778661934058405217475274375560.252344373481358834598914724956711\"]}, {\"input\": \"9.4e100\\r\\n\", \"output\": [\"94000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"]}, {\"input\": \"3.2371070627618799335840070613481911588919091676203766004638236894609230433739617153911544972468224113e50\\r\\n\", \"output\": [\"323710706276187993358400706134819115889190916762037.66004638236894609230433739617153911544972468224113\"]}, {\"input\": \"4.8133196117786711780806656271869913331127534865038175322117213586960112955982462632332925275690064929e0\\r\\n\", \"output\": [\"4.8133196117786711780806656271869913331127534865038175322117213586960112955982462632332925275690064929\"]}, {\"input\": \"7.7060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625e1\\r\\n\", \"output\": [\"77.060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625\"]}, {\"input\": \"8.1089882894234341219420177467603732503076124872188628349726911362800974096687340341040683238197289136e31\\r\\n\", \"output\": [\"81089882894234341219420177467603.732503076124872188628349726911362800974096687340341040683238197289136\"]}, {\"input\": \"9.6576660076120385279859051742522204516365367878315639937449558670629833997839913220859648564428655877e99\\r\\n\", \"output\": [\"9657666007612038527985905174252220451636536787831563993744955867062983399783991322085964856442865587.7\"]}, {\"input\": \"0.0e0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1.0e0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8.0e0\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3.0e0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4.0e0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2.0e0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9.0e0\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"0.888888e0\\r\\n\", \"output\": [\"0.888888\"]}, {\"input\": \"9.99999999999999999999999999999999999999999999999999999999999999999999999999999999e100\\r\\n\", \"output\": [\"99999999999999999999999999999999999999999999999999999999999999999999999999999999900000000000000000000\"]}, {\"input\": \"5.0e0\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1.0e10\\r\\n\", \"output\": [\"10000000000\"]}, {\"input\": \"1.0e5\\r\\n\", \"output\": [\"100000\"]}, {\"input\": \"6.0e0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1.1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111e1\\r\\n\", \"output\": [\"11.111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1.31e1\\r\\n', 'output': ['13.1']}, {'input': '3.0e0\\r\\n', 'output': ['3']}, {'input': '0.75e0\\r\\n', 'output': ['0.75']}, {'input': '5.8743505652112692964508303637002e64\\r\\n', 'output': ['58743505652112692964508303637002000000000000000000000000000000000']}, {'input': '7.7060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625e1\\r\\n', 'output': ['77.060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625']}]","human_sample_testcases_2":"[{'input': '1.91641639840522198229453882518758458881136053577016034847369545687354908120008812644841021662133251e89\\r\\n', 'output': ['191641639840522198229453882518758458881136053577016034847369545687354908120008812644841021.662133251']}, {'input': '8.549e2\\r\\n', 'output': ['854.9']}, {'input': '0.0e0\\r\\n', 'output': ['0']}, {'input': '1.038e0\\r\\n', 'output': ['1.038']}, {'input': '1.31e1\\r\\n', 'output': ['13.1']}]","human_sample_testcases_3":"[{'input': '0.0e0\\r\\n', 'output': ['0']}, {'input': '9.0e0\\r\\n', 'output': ['9']}, {'input': '0.7e0\\r\\n', 'output': ['0.7']}, {'input': '1.0e0\\r\\n', 'output': ['1']}, {'input': '2.0629094807595491132306264747042243928486303384791951220362096240931158821630792563855724946791054152e85\\r\\n', 'output': ['20629094807595491132306264747042243928486303384791951220362096240931158821630792563855.724946791054152']}]","human_sample_testcases_4":"[{'input': '4.0e0\\r\\n', 'output': ['4']}, {'input': '1.91641639840522198229453882518758458881136053577016034847369545687354908120008812644841021662133251e89\\r\\n', 'output': ['191641639840522198229453882518758458881136053577016034847369545687354908120008812644841021.662133251']}, {'input': '1.038e0\\r\\n', 'output': ['1.038']}, {'input': '1.0e0\\r\\n', 'output': ['1']}, {'input': '7.7060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625e1\\r\\n', 'output': ['77.060200967648284035308242369118752594772564843152902469146249303976625961451358536989314351204406625']}]","human_sample_testcases_5":"[{'input': '3.2371070627618799335840070613481911588919091676203766004638236894609230433739617153911544972468224113e50\\r\\n', 'output': ['323710706276187993358400706134819115889190916762037.66004638236894609230433739617153911544972468224113']}, {'input': '2.806303180541991592302230754797823269634e39\\r\\n', 'output': ['2806303180541991592302230754797823269634']}, {'input': '3.0e0\\r\\n', 'output': ['3']}, {'input': '1.0e5\\r\\n', 'output': ['100000']}, {'input': '0.888888e0\\r\\n', 'output': ['0.888888']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":86.96,"human_sample_line_coverage_3":86.96,"human_sample_line_coverage_4":86.96,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":85.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":90.0,"id":222,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.176,"human_sample_branch_coverage":83.0} {"sample_inputs":"[\"11\\n00000000008\", \"22\\n0011223344556677889988\", \"11\\n31415926535\"]","input_specification":"The first line contains an integer $$$n$$$\u00a0\u2014 the number of cards with digits that you have ($$$1 \\leq n \\leq 100$$$). The second line contains a string of $$$n$$$ digits (characters \"0\", \"1\", ..., \"9\") $$$s_1, s_2, \\ldots, s_n$$$. The string will not contain any other characters, such as leading or trailing spaces.","src_uid":"259d01b81bef5536b969247ff2c2d776","source_code":"import java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class PhoneNumbers {\n\n\tvoid solve(Scanner s, PrintWriter out) {\n\t\ts.next();\n\t\tint e = 0, o = 0;\n\t\tfor (char c : s.next().toCharArray())\n\t\t\tif (c == '8')\n\t\t\t\te++;\n\t\t\telse\n\t\t\t\to++;\n\t\tout.println(Math.min(e, (o + e) \/ 11));\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tnew PhoneNumbers().solve(s, out);\n\t\tout.close();\n\t\ts.close();\n\t}\n\n}\n","sample_outputs":"[\"1\", \"2\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first example, one phone number, \"8000000000\", can be made from these cards.In the second example, you can make two phone numbers from the cards, for example, \"80123456789\" and \"80123456789\".In the third example you can't make any phone number from the given cards.","output_specification":"If at least one phone number can be made from these cards, output the maximum number of phone numbers that can be made. Otherwise, output 0.","description":"Let's call a string a phone number if it has length 11 and fits the pattern \"8xxxxxxxxxx\", where each \"x\" is replaced by a digit.For example, \"80123456789\" and \"80000000000\" are phone numbers, while \"8012345678\" and \"79000000000\" are not.You have $$$n$$$ cards with digits, and you want to use them to make as many phone numbers as possible. Each card must be used in at most one phone number, and you don't have to use all cards. The phone numbers do not necessarily have to be distinct.","human_testcases":"[{\"input\": \"11\\r\\n00000000008\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22\\r\\n0011223344556677889988\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n31415926535\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"99\\r\\n097167815527663544905782574817314139311067328533970663873718450545467450059059869618211361469505108\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"100\\r\\n8820286285185244938452488887088871457098945874486988698468788381417332842888928188688887641132194956\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"99\\r\\n509170332523502565755650047942914747120102240396245453406790272793996913905060450414255616791704320\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n1976473621569903172721407763737179639055561746310369779167351419713916160700096173622427077757986026\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10\\r\\n8888888888\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20\\r\\n88888888888888888888\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"30\\r\\n888888888888888888888888888888\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"40\\r\\n8888888888888888888888888888888888888888\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"50\\r\\n88888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"60\\r\\n888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"70\\r\\n8888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"80\\r\\n88888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"90\\r\\n888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"11\\r\\n24572366390\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21\\r\\n582586788289484878588\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31\\r\\n0868889888343881888987888838808\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"41\\r\\n78888884888874788841882882888088888588888\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"51\\r\\n882889888888689888850888388887688788888888888858888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"61\\r\\n8880888836888988888988888887388888888888868898887888818888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"71\\r\\n88888888888888888888888188888805848888788088888883888883187888838888888\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"81\\r\\n808888883488887888888808888888888888188888888388888888888888868688888488888882888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"91\\r\\n8828880888888884883888488888888888888881888888888884888888848588888808888888888888888880888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8888888888828188888888888888888808888888888888888888891888888768888888888288888885886888838888888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"22\\r\\n4215079217017196952791\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"32\\r\\n88257478884887437239023185588797\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"42\\r\\n885887846290886288816884858898812858495482\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"52\\r\\n8878588869084488848898838898788838337877898817818888\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"62\\r\\n18888883884288488882387888486858887882838885288886472818688888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"72\\r\\n888488888888823288848804883838888888887888888888228888218488897809784868\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"82\\r\\n8889809888888888485881851986857288588888888881988888868888836888887858888888888878\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"92\\r\\n86888880558884738878888381088888888895888881888888888368878888888884888768881888888888808888\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8881888389882878867888888888888888888886388888888870888884878888089888883898887888808688888487888888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"33\\r\\n270375004567749549929235905225024\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"43\\r\\n7404899846883344886153727489084158470112581\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"53\\r\\n85838985300863473289888099788588319484149888886832906\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"63\\r\\n728385948188688801288285888788852829888898565895847689806684688\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"73\\r\\n2185806538483837898808836883483888818818988881880688028788888081888907898\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"83\\r\\n88584458884288808888588388818938838468960248387898182887888867888888888886088895788\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"93\\r\\n888088898748888038885888818882806848806887888888882087481868888888177809288888889648468888188\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n8088888818885808888888848829886788884187188858898888888788988688884828586988888888288078638898728181\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"44\\r\\n15920309219313427633220119270900111650391207\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"54\\r\\n438283821340622774637957966575424773837418828888614203\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"64\\r\\n8885984815868480968883818886281846682409262501034555933863969284\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"74\\r\\n70988894874867688968816582886488688881063425288316858438189808828755218508\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"84\\r\\n181288888282608548858058871581888853888486785801381108858832882809848798828837386086\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"94\\r\\n8188948828818938226378510887848897889883818858778688882933888883888898198978868888808082461388\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n2867878187889776883889958480848802884888888878218089281860321588888888987288888884288488988628618888\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"55\\r\\n7271714707719515303911625619272900050990324951111943573\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"65\\r\\n44542121362830719677175203560438858260878894083124543850593761845\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"75\\r\\n878909759892888846183608689257806813376950958863798487856148633095072259838\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"85\\r\\n6888887655188885918863889822590788834182048952565514598298586848861396753319582883848\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"95\\r\\n29488352815808808845913584782288724288898869488882098428839370889284838688458247785878848884289\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n2833898888858387469888804083887280788584887487186899808436848018181838884988432785338497585788803883\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"66\\r\\n747099435917145962031075767196746707764157706291155762576312312094\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"76\\r\\n7900795570936733366353829649382870728119825830883973668601071678041634916557\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"86\\r\\n84065885114540280210185082984888812185222886689129308815942798404861082196041321701260\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"96\\r\\n812087553199958040928832802441581868680188987878748641868838838835609806814288472573117388803351\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"77\\r\\n11233392925013001334679215120076714945221576003953746107506364475115045309091\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"87\\r\\n311753415808202195240425076966761033489788093280714672959929008324554784724650182457298\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"97\\r\\n4088468966684435599488804806521288358953088399738904557539253573051442198885776802972628197705081\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n6451941807833681891890004306065158148809856572066617888008875119881621810329816763604830895480467878\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"88\\r\\n2694079127792970410465292300936220976260790323517221561516591792566791677970332966660472\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"98\\r\\n87247250157776241281197787785951754485531639139778166755966603305697265958800376912432893847612736\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100\\r\\n1835563855281170226095294644116563180561156535623048783710060508361834822227075869575873675232708159\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11\\r\\n55814018693\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22\\r\\n6188156585823394680191\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33\\r\\n429980628264468835720540136177288\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"44\\r\\n30153452341853403190257244993442815171970194\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"55\\r\\n3982037603326093160114589190899881252765957832414122484\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"66\\r\\n157941266854773786962397310504192100434183957442977444078457168272\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11\\r\\n80000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"27\\r\\n888000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n8000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50\\r\\n88000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n81234567090\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32\\r\\n88000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"57\\r\\n888888888888888888888888888888888888888888888888888888888\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"22\\r\\n8899999999999999999999\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21\\r\\n881234567900123456790\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888888555555555555555\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n8800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21\\r\\n888888888888000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8\\r\\n12345678\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21\\r\\n880000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11\\r\\n81234567123\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11\\r\\n88888888888\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32\\r\\n88888888888888888888888888888888\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33\\r\\n888800000000000000000000000000000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n888111111111111111111\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"77\\r\\n11111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '82\\r\\n8889809888888888485881851986857288588888888881988888868888836888887858888888888878\\r\\n', 'output': ['7']}, {'input': '1\\r\\n8\\r\\n', 'output': ['0']}, {'input': '52\\r\\n8878588869084488848898838898788838337877898817818888\\r\\n', 'output': ['4']}, {'input': '65\\r\\n44542121362830719677175203560438858260878894083124543850593761845\\r\\n', 'output': ['5']}, {'input': '11\\r\\n81234567123\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '66\\r\\n157941266854773786962397310504192100434183957442977444078457168272\\r\\n', 'output': ['5']}, {'input': '50\\r\\n88888888888888888888888888888888888888888888888888\\r\\n', 'output': ['4']}, {'input': '92\\r\\n86888880558884738878888381088888888895888881888888888368878888888884888768881888888888808888\\r\\n', 'output': ['8']}, {'input': '55\\r\\n3982037603326093160114589190899881252765957832414122484\\r\\n', 'output': ['5']}, {'input': '53\\r\\n85838985300863473289888099788588319484149888886832906\\r\\n', 'output': ['4']}]","human_sample_testcases_3":"[{'input': '10\\r\\n8000000000\\r\\n', 'output': ['0']}, {'input': '41\\r\\n78888884888874788841882882888088888588888\\r\\n', 'output': ['3']}, {'input': '65\\r\\n44542121362830719677175203560438858260878894083124543850593761845\\r\\n', 'output': ['5']}, {'input': '33\\r\\n429980628264468835720540136177288\\r\\n', 'output': ['3']}, {'input': '66\\r\\n747099435917145962031075767196746707764157706291155762576312312094\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '70\\r\\n8888888888888888888888888888888888888888888888888888888888888888888888\\r\\n', 'output': ['6']}, {'input': '54\\r\\n438283821340622774637957966575424773837418828888614203\\r\\n', 'output': ['4']}, {'input': '76\\r\\n7900795570936733366353829649382870728119825830883973668601071678041634916557\\r\\n', 'output': ['6']}, {'input': '40\\r\\n8888888888888888888888888888888888888888\\r\\n', 'output': ['3']}, {'input': '52\\r\\n8878588869084488848898838898788838337877898817818888\\r\\n', 'output': ['4']}]","human_sample_testcases_5":"[{'input': '63\\r\\n728385948188688801288285888788852829888898565895847689806684688\\r\\n', 'output': ['5']}, {'input': '8\\r\\n12345678\\r\\n', 'output': ['0']}, {'input': '51\\r\\n882889888888689888850888388887688788888888888858888\\r\\n', 'output': ['4']}, {'input': '75\\r\\n878909759892888846183608689257806813376950958863798487856148633095072259838\\r\\n', 'output': ['6']}, {'input': '21\\r\\n881234567900123456790\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":223,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7 3\\n5 10\\n2 5\\n3 6\", \"3 3\\n1 3\\n2 2\\n3 1\"]","input_specification":"The first line of the input contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u20092\u00b7108) and integer m (1\u2009\u2264\u2009m\u2009\u2264\u200920). The i\u2009+\u20091-th line contains a pair of numbers ai and bi (1\u2009\u2264\u2009ai\u2009\u2264\u2009108,\u20091\u2009\u2264\u2009bi\u2009\u2264\u200910). All the input numbers are integer.","src_uid":"c052d85e402691b05e494b5283d62679","source_code":"\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport static java.util.Collections.reverseOrder;\nimport java.util.Comparator;\nimport java.util.HashMap;\nimport java.util.LinkedHashMap;\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.stream.Collectors;\n\n\/**\n *\n * @author Ahmed_Naser\n *\/\npublic class HelloWorld {\n\n \n \n public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n int n = in.nextInt();\n int m = in.nextInt();\n \n int matchboxes[] = new int[m];\n int matches[]= new int[m];\n \n for(int i = 0 ; i < m ; i++)\n {\n matchboxes[i] =in.nextInt();\n matches[i] = in.nextInt();\n }\n \n \n int max = matches[0];\n int index = 0 ; \n int count = 0 ;\n while( n > 0)\n {\n \n for( int j = 0 ; j < m ; ++j)\n {\n if( matches[j] >= max)\n {\n max= matches[j]; \n index = j;\n \n } \n } \n if( matchboxes[index] <= n)\n {\n n = n - matchboxes[index];\n count = count + (matches[index] * matchboxes[index] ); \n matches[index] = 0 ;\n }\n else\n {\n \n count = count + (n * matches[index]);\n n = 0 ;\n }\n max = matches[0];\n }\n \n System.out.println(count);\n \n }\n}\n","sample_outputs":"[\"62\", \"7\"]","lang_cluster":"Java","notes":null,"output_specification":"Output the only number \u2014 answer to the problem.","description":"A burglar got into a matches warehouse and wants to steal as many matches as possible. In the warehouse there are m containers, in the i-th container there are ai matchboxes, and each matchbox contains bi matches. All the matchboxes are of the same size. The burglar's rucksack can hold n matchboxes exactly. Your task is to find out the maximum amount of matches that a burglar can carry away. He has no time to rearrange matches in the matchboxes, that's why he just chooses not more than n matchboxes so that the total amount of matches in them is maximal.","human_testcases":"[{\"input\": \"7 3\\r\\n5 10\\r\\n2 5\\r\\n3 6\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"3 3\\r\\n1 3\\r\\n2 2\\r\\n3 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1\\r\\n1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 2\\r\\n1 9\\r\\n1 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 10\\r\\n1 1\\r\\n1 9\\r\\n1 3\\r\\n1 9\\r\\n1 7\\r\\n1 10\\r\\n1 4\\r\\n1 7\\r\\n1 3\\r\\n1 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2 1\\r\\n2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n2 4\\r\\n1 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 3\\r\\n1 7\\r\\n1 2\\r\\n1 5\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"4 1\\r\\n2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 2\\r\\n1 10\\r\\n4 4\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"4 3\\r\\n1 4\\r\\n6 4\\r\\n1 7\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"5 1\\r\\n10 5\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"5 2\\r\\n3 9\\r\\n2 2\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"5 5\\r\\n2 9\\r\\n3 1\\r\\n2 1\\r\\n1 8\\r\\n2 8\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"5 10\\r\\n1 3\\r\\n1 2\\r\\n1 9\\r\\n1 10\\r\\n1 1\\r\\n1 5\\r\\n1 10\\r\\n1 2\\r\\n1 3\\r\\n1 7\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"10 1\\r\\n9 4\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"10 2\\r\\n14 3\\r\\n1 3\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"10 7\\r\\n4 8\\r\\n1 10\\r\\n1 10\\r\\n1 2\\r\\n3 3\\r\\n1 3\\r\\n1 10\\r\\n\", \"output\": [\"71\"]}, {\"input\": \"10 10\\r\\n1 8\\r\\n2 10\\r\\n1 9\\r\\n1 1\\r\\n1 9\\r\\n1 6\\r\\n1 4\\r\\n2 5\\r\\n1 2\\r\\n1 4\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"10 4\\r\\n1 5\\r\\n5 2\\r\\n1 9\\r\\n3 3\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"100 5\\r\\n78 6\\r\\n29 10\\r\\n3 6\\r\\n7 3\\r\\n2 4\\r\\n\", \"output\": [\"716\"]}, {\"input\": \"1000 7\\r\\n102 10\\r\\n23 6\\r\\n79 4\\r\\n48 1\\r\\n34 10\\r\\n839 8\\r\\n38 4\\r\\n\", \"output\": [\"8218\"]}, {\"input\": \"10000 10\\r\\n336 2\\r\\n2782 5\\r\\n430 10\\r\\n1893 7\\r\\n3989 10\\r\\n2593 8\\r\\n165 6\\r\\n1029 2\\r\\n2097 4\\r\\n178 10\\r\\n\", \"output\": [\"84715\"]}, {\"input\": \"100000 3\\r\\n2975 2\\r\\n35046 4\\r\\n61979 9\\r\\n\", \"output\": [\"703945\"]}, {\"input\": \"1000000 4\\r\\n314183 9\\r\\n304213 4\\r\\n16864 5\\r\\n641358 9\\r\\n\", \"output\": [\"8794569\"]}, {\"input\": \"10000000 10\\r\\n360313 10\\r\\n416076 1\\r\\n435445 9\\r\\n940322 7\\r\\n1647581 7\\r\\n4356968 10\\r\\n3589256 2\\r\\n2967933 5\\r\\n2747504 7\\r\\n1151633 3\\r\\n\", \"output\": [\"85022733\"]}, {\"input\": \"100000000 7\\r\\n32844337 7\\r\\n11210848 7\\r\\n47655987 1\\r\\n33900472 4\\r\\n9174763 2\\r\\n32228738 10\\r\\n29947408 5\\r\\n\", \"output\": [\"749254060\"]}, {\"input\": \"200000000 10\\r\\n27953106 7\\r\\n43325979 4\\r\\n4709522 1\\r\\n10975786 4\\r\\n67786538 8\\r\\n48901838 7\\r\\n15606185 6\\r\\n2747583 1\\r\\n100000000 1\\r\\n633331 3\\r\\n\", \"output\": [\"1332923354\"]}, {\"input\": \"200000000 9\\r\\n17463897 9\\r\\n79520463 1\\r\\n162407 4\\r\\n41017993 8\\r\\n71054118 4\\r\\n9447587 2\\r\\n5298038 9\\r\\n3674560 7\\r\\n20539314 5\\r\\n\", \"output\": [\"996523209\"]}, {\"input\": \"200000000 8\\r\\n6312706 6\\r\\n2920548 2\\r\\n16843192 3\\r\\n1501141 2\\r\\n13394704 6\\r\\n10047725 10\\r\\n4547663 6\\r\\n54268518 6\\r\\n\", \"output\": [\"630991750\"]}, {\"input\": \"200000000 7\\r\\n25621043 2\\r\\n21865270 1\\r\\n28833034 1\\r\\n22185073 5\\r\\n100000000 2\\r\\n13891017 9\\r\\n61298710 8\\r\\n\", \"output\": [\"931584598\"]}, {\"input\": \"200000000 6\\r\\n7465600 6\\r\\n8453505 10\\r\\n4572014 8\\r\\n8899499 3\\r\\n86805622 10\\r\\n64439238 6\\r\\n\", \"output\": [\"1447294907\"]}, {\"input\": \"200000000 5\\r\\n44608415 6\\r\\n100000000 9\\r\\n51483223 9\\r\\n44136047 1\\r\\n52718517 1\\r\\n\", \"output\": [\"1634907859\"]}, {\"input\": \"200000000 4\\r\\n37758556 10\\r\\n100000000 6\\r\\n48268521 3\\r\\n20148178 10\\r\\n\", \"output\": [\"1305347138\"]}, {\"input\": \"200000000 3\\r\\n65170000 7\\r\\n20790088 1\\r\\n74616133 4\\r\\n\", \"output\": [\"775444620\"]}, {\"input\": \"200000000 2\\r\\n11823018 6\\r\\n100000000 9\\r\\n\", \"output\": [\"970938108\"]}, {\"input\": \"200000000 1\\r\\n100000000 6\\r\\n\", \"output\": [\"600000000\"]}, {\"input\": \"200000000 10\\r\\n12097724 9\\r\\n41745972 5\\r\\n26982098 9\\r\\n14916995 7\\r\\n21549986 7\\r\\n3786630 9\\r\\n8050858 7\\r\\n27994924 4\\r\\n18345001 5\\r\\n8435339 5\\r\\n\", \"output\": [\"1152034197\"]}, {\"input\": \"200000000 10\\r\\n55649 8\\r\\n10980981 9\\r\\n3192542 8\\r\\n94994808 4\\r\\n3626106 1\\r\\n100000000 6\\r\\n5260110 9\\r\\n4121453 2\\r\\n15125061 4\\r\\n669569 6\\r\\n\", \"output\": [\"1095537357\"]}, {\"input\": \"10 20\\r\\n1 7\\r\\n1 7\\r\\n1 8\\r\\n1 3\\r\\n1 10\\r\\n1 7\\r\\n1 7\\r\\n1 9\\r\\n1 3\\r\\n1 1\\r\\n1 2\\r\\n1 1\\r\\n1 3\\r\\n1 10\\r\\n1 9\\r\\n1 8\\r\\n1 8\\r\\n1 6\\r\\n1 7\\r\\n1 5\\r\\n\", \"output\": [\"83\"]}, {\"input\": \"10000000 20\\r\\n4594 7\\r\\n520836 8\\r\\n294766 6\\r\\n298672 4\\r\\n142253 6\\r\\n450626 1\\r\\n1920034 9\\r\\n58282 4\\r\\n1043204 1\\r\\n683045 1\\r\\n1491746 5\\r\\n58420 4\\r\\n451217 2\\r\\n129423 4\\r\\n246113 5\\r\\n190612 8\\r\\n912923 6\\r\\n473153 6\\r\\n783733 6\\r\\n282411 10\\r\\n\", \"output\": [\"54980855\"]}, {\"input\": \"200000000 20\\r\\n15450824 5\\r\\n839717 10\\r\\n260084 8\\r\\n1140850 8\\r\\n28744 6\\r\\n675318 3\\r\\n25161 2\\r\\n5487 3\\r\\n6537698 9\\r\\n100000000 5\\r\\n7646970 9\\r\\n16489 6\\r\\n24627 3\\r\\n1009409 5\\r\\n22455 1\\r\\n25488456 4\\r\\n484528 9\\r\\n32663641 3\\r\\n750968 4\\r\\n5152 6\\r\\n\", \"output\": [\"939368573\"]}, {\"input\": \"200000000 20\\r\\n16896 2\\r\\n113 3\\r\\n277 2\\r\\n299 7\\r\\n69383562 2\\r\\n3929 8\\r\\n499366 4\\r\\n771846 5\\r\\n9 4\\r\\n1278173 7\\r\\n90 2\\r\\n54 7\\r\\n72199858 10\\r\\n17214 5\\r\\n3 10\\r\\n1981618 3\\r\\n3728 2\\r\\n141 8\\r\\n2013578 9\\r\\n51829246 5\\r\\n\", \"output\": [\"1158946383\"]}, {\"input\": \"200000000 20\\r\\n983125 2\\r\\n7453215 9\\r\\n9193588 2\\r\\n11558049 7\\r\\n28666199 1\\r\\n34362244 1\\r\\n5241493 5\\r\\n15451270 4\\r\\n19945845 8\\r\\n6208681 3\\r\\n38300385 7\\r\\n6441209 8\\r\\n21046742 7\\r\\n577198 10\\r\\n3826434 8\\r\\n9764276 8\\r\\n6264675 7\\r\\n8567063 3\\r\\n3610303 4\\r\\n2908232 3\\r\\n\", \"output\": [\"1131379312\"]}, {\"input\": \"10 15\\r\\n1 6\\r\\n2 6\\r\\n3 4\\r\\n1 3\\r\\n1 2\\r\\n1 5\\r\\n1 6\\r\\n1 2\\r\\n2 9\\r\\n1 10\\r\\n1 3\\r\\n1 7\\r\\n1 8\\r\\n1 2\\r\\n2 9\\r\\n\", \"output\": [\"79\"]}, {\"input\": \"10000000 15\\r\\n111 5\\r\\n914124 3\\r\\n3 9\\r\\n177790 1\\r\\n2352 3\\r\\n32138 9\\r\\n104477 1\\r\\n1223 4\\r\\n18 6\\r\\n6655580 4\\r\\n57643 10\\r\\n94309 2\\r\\n37 1\\r\\n227002 10\\r\\n1733193 7\\r\\n\", \"output\": [\"45116295\"]}, {\"input\": \"200000000 15\\r\\n7069868 1\\r\\n5567826 8\\r\\n2310059 10\\r\\n13539782 7\\r\\n38420939 4\\r\\n29911411 8\\r\\n52256316 1\\r\\n12265839 9\\r\\n2074265 1\\r\\n24896428 9\\r\\n72470695 5\\r\\n3236301 1\\r\\n3890243 2\\r\\n65168965 8\\r\\n65724 6\\r\\n\", \"output\": [\"1489289257\"]}, {\"input\": \"200000000 15\\r\\n12044094 7\\r\\n2475138 10\\r\\n944451 7\\r\\n4854766 2\\r\\n3809145 10\\r\\n7727571 2\\r\\n43908937 6\\r\\n2745883 1\\r\\n427511 2\\r\\n100000000 5\\r\\n190914 6\\r\\n554889 3\\r\\n288798 4\\r\\n1848572 5\\r\\n893874 3\\r\\n\", \"output\": [\"961871671\"]}, {\"input\": \"200000000 15\\r\\n6334191 7\\r\\n1927941 4\\r\\n5175933 10\\r\\n468389 1\\r\\n433043 10\\r\\n6863198 5\\r\\n7480646 4\\r\\n14774279 10\\r\\n2921129 8\\r\\n18325627 7\\r\\n6973152 9\\r\\n8277324 9\\r\\n21522856 2\\r\\n2058070 1\\r\\n2444742 4\\r\\n\", \"output\": [\"664376069\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 2\\r\\n2 4\\r\\n1 4\\r\\n', 'output': ['8']}, {'input': '2 1\\r\\n2 1\\r\\n', 'output': ['2']}, {'input': '200000000 6\\r\\n7465600 6\\r\\n8453505 10\\r\\n4572014 8\\r\\n8899499 3\\r\\n86805622 10\\r\\n64439238 6\\r\\n', 'output': ['1447294907']}, {'input': '4 1\\r\\n2 2\\r\\n', 'output': ['4']}, {'input': '200000000 10\\r\\n27953106 7\\r\\n43325979 4\\r\\n4709522 1\\r\\n10975786 4\\r\\n67786538 8\\r\\n48901838 7\\r\\n15606185 6\\r\\n2747583 1\\r\\n100000000 1\\r\\n633331 3\\r\\n', 'output': ['1332923354']}]","human_sample_testcases_2":"[{'input': '200000000 9\\r\\n17463897 9\\r\\n79520463 1\\r\\n162407 4\\r\\n41017993 8\\r\\n71054118 4\\r\\n9447587 2\\r\\n5298038 9\\r\\n3674560 7\\r\\n20539314 5\\r\\n', 'output': ['996523209']}, {'input': '200000000 6\\r\\n7465600 6\\r\\n8453505 10\\r\\n4572014 8\\r\\n8899499 3\\r\\n86805622 10\\r\\n64439238 6\\r\\n', 'output': ['1447294907']}, {'input': '10000000 15\\r\\n111 5\\r\\n914124 3\\r\\n3 9\\r\\n177790 1\\r\\n2352 3\\r\\n32138 9\\r\\n104477 1\\r\\n1223 4\\r\\n18 6\\r\\n6655580 4\\r\\n57643 10\\r\\n94309 2\\r\\n37 1\\r\\n227002 10\\r\\n1733193 7\\r\\n', 'output': ['45116295']}, {'input': '1 1\\r\\n1 2\\r\\n', 'output': ['2']}, {'input': '10 1\\r\\n9 4\\r\\n', 'output': ['36']}]","human_sample_testcases_3":"[{'input': '10 10\\r\\n1 8\\r\\n2 10\\r\\n1 9\\r\\n1 1\\r\\n1 9\\r\\n1 6\\r\\n1 4\\r\\n2 5\\r\\n1 2\\r\\n1 4\\r\\n', 'output': ['70']}, {'input': '1 2\\r\\n1 9\\r\\n1 6\\r\\n', 'output': ['9']}, {'input': '5 2\\r\\n3 9\\r\\n2 2\\r\\n', 'output': ['31']}, {'input': '10 4\\r\\n1 5\\r\\n5 2\\r\\n1 9\\r\\n3 3\\r\\n', 'output': ['33']}, {'input': '200000000 10\\r\\n55649 8\\r\\n10980981 9\\r\\n3192542 8\\r\\n94994808 4\\r\\n3626106 1\\r\\n100000000 6\\r\\n5260110 9\\r\\n4121453 2\\r\\n15125061 4\\r\\n669569 6\\r\\n', 'output': ['1095537357']}]","human_sample_testcases_4":"[{'input': '200000000 10\\r\\n55649 8\\r\\n10980981 9\\r\\n3192542 8\\r\\n94994808 4\\r\\n3626106 1\\r\\n100000000 6\\r\\n5260110 9\\r\\n4121453 2\\r\\n15125061 4\\r\\n669569 6\\r\\n', 'output': ['1095537357']}, {'input': '200000000 2\\r\\n11823018 6\\r\\n100000000 9\\r\\n', 'output': ['970938108']}, {'input': '200000000 20\\r\\n983125 2\\r\\n7453215 9\\r\\n9193588 2\\r\\n11558049 7\\r\\n28666199 1\\r\\n34362244 1\\r\\n5241493 5\\r\\n15451270 4\\r\\n19945845 8\\r\\n6208681 3\\r\\n38300385 7\\r\\n6441209 8\\r\\n21046742 7\\r\\n577198 10\\r\\n3826434 8\\r\\n9764276 8\\r\\n6264675 7\\r\\n8567063 3\\r\\n3610303 4\\r\\n2908232 3\\r\\n', 'output': ['1131379312']}, {'input': '1 2\\r\\n1 9\\r\\n1 6\\r\\n', 'output': ['9']}, {'input': '200000000 10\\r\\n12097724 9\\r\\n41745972 5\\r\\n26982098 9\\r\\n14916995 7\\r\\n21549986 7\\r\\n3786630 9\\r\\n8050858 7\\r\\n27994924 4\\r\\n18345001 5\\r\\n8435339 5\\r\\n', 'output': ['1152034197']}]","human_sample_testcases_5":"[{'input': '1 10\\r\\n1 1\\r\\n1 9\\r\\n1 3\\r\\n1 9\\r\\n1 7\\r\\n1 10\\r\\n1 4\\r\\n1 7\\r\\n1 3\\r\\n1 1\\r\\n', 'output': ['10']}, {'input': '10 10\\r\\n1 8\\r\\n2 10\\r\\n1 9\\r\\n1 1\\r\\n1 9\\r\\n1 6\\r\\n1 4\\r\\n2 5\\r\\n1 2\\r\\n1 4\\r\\n', 'output': ['70']}, {'input': '200000000 2\\r\\n11823018 6\\r\\n100000000 9\\r\\n', 'output': ['970938108']}, {'input': '10 15\\r\\n1 6\\r\\n2 6\\r\\n3 4\\r\\n1 3\\r\\n1 2\\r\\n1 5\\r\\n1 6\\r\\n1 2\\r\\n2 9\\r\\n1 10\\r\\n1 3\\r\\n1 7\\r\\n1 8\\r\\n1 2\\r\\n2 9\\r\\n', 'output': ['79']}, {'input': '10000000 10\\r\\n360313 10\\r\\n416076 1\\r\\n435445 9\\r\\n940322 7\\r\\n1647581 7\\r\\n4356968 10\\r\\n3589256 2\\r\\n2967933 5\\r\\n2747504 7\\r\\n1151633 3\\r\\n', 'output': ['85022733']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":224,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 5 2\", \"6 7 4\"]","input_specification":"A single line contains three space-separated integers a, b, r (1\u2009\u2264\u2009a,\u2009b,\u2009r\u2009\u2264\u2009100) \u2014 the table sides and the plates' radius, correspondingly.","src_uid":"90b9ef939a13cf29715bc5bce26c9896","source_code":"\/\/package com.example.hackerranksolutions;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io.FileReader;\nimport java.io.FileWriter;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Comparator;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Scanner;\n\npublic class CodeforcesProblems {\n\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String[] inputs = br.readLine().split(\" \");\n int a = Integer.parseInt(inputs[0]);\n int b = Integer.parseInt(inputs[1]);\n int r = Integer.parseInt(inputs[2]);\n\n if(a>=2*r && b>=2*r) System.out.println(\"First\");\n else System.out.println(\"Second\");\n }\n}","sample_outputs":"[\"First\", \"Second\"]","lang_cluster":"Java","notes":"NoteIn the first sample the table has place for only one plate. The first player puts a plate on the table, the second player can't do that and loses. In the second sample the table is so small that it doesn't have enough place even for one plate. So the first player loses without making a single move. ","output_specification":"If wins the player who moves first, print \"First\" (without the quotes). Otherwise print \"Second\" (without the quotes).","description":"You've got a rectangular table with length a and width b and the infinite number of plates of radius r. Two players play the following game: they take turns to put the plates on the table so that the plates don't lie on each other (but they can touch each other), and so that any point on any plate is located within the table's border. During the game one cannot move the plates that already lie on the table. The player who cannot make another move loses. Determine which player wins, the one who moves first or the one who moves second, provided that both players play optimally well.","human_testcases":"[{\"input\": \"5 5 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"6 7 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 100 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"1 1 100\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"13 7 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"23 7 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"9 9 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"13 13 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"21 21 10\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"20 21 10\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"20 20 10\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"9 13 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"19 7 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"19 19 10\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"19 20 10\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"19 21 10\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 100 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"2 100 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"3 100 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"100 100 49\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"100 100 50\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"100 100 51\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 99 50\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"4 10 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"8 11 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"3 12 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"14 15 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"61 2 3\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"82 20 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 80 10\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"2 1 20\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"78 82 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"8 55 7\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"75 55 43\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"34 43 70\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"86 74 36\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"86 74 37\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"86 74 38\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"24 70 11\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"24 70 12\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"24 70 13\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"78 95 38\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"78 95 39\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"78 95 40\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"88 43 21\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"88 43 22\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"88 43 23\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"30 40 14\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"30 40 15\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"30 40 16\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"2 5 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 100 3\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"44 58 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"4 4 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 20 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 1 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"60 60 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"100 1 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"2 4 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 90 11\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"20 5 6\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 44 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 5 5\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"5 100 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"99 99 50\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 100 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"100 20 12\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 2 4\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 50 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"10 4 3\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"74 1 1\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"6 6 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"10 10 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"21 41 5\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"13 1 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 100 3\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"1 64 2\\r\\n\", \"output\": [\"Second\"]}, {\"input\": \"3 4 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 15 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 16 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 15 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 16 1\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 15 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 16 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 15 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 16 2\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 15 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 16 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 15 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 16 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"15 17 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"16 17 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"17 17 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"17 15 3\\r\\n\", \"output\": [\"First\"]}, {\"input\": \"17 16 3\\r\\n\", \"output\": [\"First\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 100 51\\r\\n', 'output': ['Second']}, {'input': '44 58 5\\r\\n', 'output': ['First']}, {'input': '24 70 13\\r\\n', 'output': ['Second']}, {'input': '10 2 4\\r\\n', 'output': ['Second']}, {'input': '19 20 10\\r\\n', 'output': ['Second']}]","human_sample_testcases_2":"[{'input': '16 17 3\\r\\n', 'output': ['First']}, {'input': '4 4 6\\r\\n', 'output': ['Second']}, {'input': '2 100 1\\r\\n', 'output': ['First']}, {'input': '100 100 50\\r\\n', 'output': ['First']}, {'input': '1 100 3\\r\\n', 'output': ['Second']}]","human_sample_testcases_3":"[{'input': '61 2 3\\r\\n', 'output': ['Second']}, {'input': '100 1 2\\r\\n', 'output': ['Second']}, {'input': '30 40 14\\r\\n', 'output': ['First']}, {'input': '17 16 3\\r\\n', 'output': ['First']}, {'input': '15 16 1\\r\\n', 'output': ['First']}]","human_sample_testcases_4":"[{'input': '74 1 1\\r\\n', 'output': ['Second']}, {'input': '2 100 1\\r\\n', 'output': ['First']}, {'input': '15 16 1\\r\\n', 'output': ['First']}, {'input': '100 99 50\\r\\n', 'output': ['Second']}, {'input': '100 20 12\\r\\n', 'output': ['Second']}]","human_sample_testcases_5":"[{'input': '10 10 1\\r\\n', 'output': ['First']}, {'input': '20 5 6\\r\\n', 'output': ['Second']}, {'input': '17 17 3\\r\\n', 'output': ['First']}, {'input': '100 100 49\\r\\n', 'output': ['First']}, {'input': '15 17 3\\r\\n', 'output': ['First']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":225,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"3\", \"4\"]","input_specification":"A single line contains one non-negative integer $$$n$$$ ($$$0 \\le n \\leq 10^{18}$$$)\u00a0\u2014 the number of Shiro's friends. The circular pizza has to be sliced into $$$n + 1$$$ pieces.","src_uid":"236177ff30dafe68295b5d33dc501828","source_code":"import java.util.Scanner;\n \npublic class Main {\n \n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\t\/\/inputs\n\t\tlong n = input.nextLong();\n if(n == 0)\n System.out.println(0);\n else if((n + 1) % 2 == 0)\n System.out.println((n + 1) \/ 2);\n else\n System.out.println(n + 1);\n\t}\n}","sample_outputs":"[\"2\", \"5\"]","lang_cluster":"Java","notes":"NoteTo cut the round pizza into quarters one has to make two cuts through the center with angle $$$90^{\\circ}$$$ between them.To cut the round pizza into five equal parts one has to make five cuts.","output_specification":"A single integer\u00a0\u2014 the number of straight cuts Shiro needs.","description":"Katie, Kuro and Shiro are best friends. They have known each other since kindergarten. That's why they often share everything with each other and work together on some very hard problems.Today is Shiro's birthday. She really loves pizza so she wants to invite her friends to the pizza restaurant near her house to celebrate her birthday, including her best friends Katie and Kuro.She has ordered a very big round pizza, in order to serve her many friends. Exactly $$$n$$$ of Shiro's friends are here. That's why she has to divide the pizza into $$$n + 1$$$ slices (Shiro also needs to eat). She wants the slices to be exactly the same size and shape. If not, some of her friends will get mad and go home early, and the party will be over.Shiro is now hungry. She wants to cut the pizza with minimum of straight cuts. A cut is a straight segment, it might have ends inside or outside the pizza. But she is too lazy to pick up the calculator.As usual, she will ask Katie and Kuro for help. But they haven't come yet. Could you help Shiro with this problem?","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"10000000000\\r\\n\", \"output\": [\"10000000001\"]}, {\"input\": \"1234567891\\r\\n\", \"output\": [\"617283946\"]}, {\"input\": \"7509213957\\r\\n\", \"output\": [\"3754606979\"]}, {\"input\": \"99999999999999999\\r\\n\", \"output\": [\"50000000000000000\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"712394453192\\r\\n\", \"output\": [\"712394453193\"]}, {\"input\": \"172212168\\r\\n\", \"output\": [\"172212169\"]}, {\"input\": \"822981260158260519\\r\\n\", \"output\": [\"411490630079130260\"]}, {\"input\": \"28316250877914571\\r\\n\", \"output\": [\"14158125438957286\"]}, {\"input\": \"779547116602436424\\r\\n\", \"output\": [\"779547116602436425\"]}, {\"input\": \"578223540024979436\\r\\n\", \"output\": [\"578223540024979437\"]}, {\"input\": \"335408917861648766\\r\\n\", \"output\": [\"335408917861648767\"]}, {\"input\": \"74859962623690078\\r\\n\", \"output\": [\"74859962623690079\"]}, {\"input\": \"252509054433933439\\r\\n\", \"output\": [\"126254527216966720\"]}, {\"input\": \"760713016476190622\\r\\n\", \"output\": [\"760713016476190623\"]}, {\"input\": \"919845426262703496\\r\\n\", \"output\": [\"919845426262703497\"]}, {\"input\": \"585335723211047194\\r\\n\", \"output\": [\"585335723211047195\"]}, {\"input\": \"522842184971407769\\r\\n\", \"output\": [\"261421092485703885\"]}, {\"input\": \"148049062628894320\\r\\n\", \"output\": [\"148049062628894321\"]}, {\"input\": \"84324828731963974\\r\\n\", \"output\": [\"84324828731963975\"]}, {\"input\": \"354979173822804781\\r\\n\", \"output\": [\"177489586911402391\"]}, {\"input\": \"1312150450968413\\r\\n\", \"output\": [\"656075225484207\"]}, {\"input\": \"269587449430302150\\r\\n\", \"output\": [\"269587449430302151\"]}, {\"input\": \"645762258982631926\\r\\n\", \"output\": [\"645762258982631927\"]}, {\"input\": \"615812229161735895\\r\\n\", \"output\": [\"307906114580867948\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"349993004923078531\\r\\n\", \"output\": [\"174996502461539266\"]}, {\"input\": \"891351282707723851\\r\\n\", \"output\": [\"445675641353861926\"]}, {\"input\": \"563324731189330734\\r\\n\", \"output\": [\"563324731189330735\"]}, {\"input\": \"520974001910286909\\r\\n\", \"output\": [\"260487000955143455\"]}, {\"input\": \"666729339802329204\\r\\n\", \"output\": [\"666729339802329205\"]}, {\"input\": \"856674611404539671\\r\\n\", \"output\": [\"428337305702269836\"]}, {\"input\": \"791809296303238499\\r\\n\", \"output\": [\"395904648151619250\"]}, {\"input\": \"711066337317063338\\r\\n\", \"output\": [\"711066337317063339\"]}, {\"input\": \"931356503492686566\\r\\n\", \"output\": [\"931356503492686567\"]}, {\"input\": \"234122432773361866\\r\\n\", \"output\": [\"234122432773361867\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"1000000000000000001\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"63\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"8\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '712394453192\\r\\n', 'output': ['712394453193']}, {'input': '760713016476190622\\r\\n', 'output': ['760713016476190623']}, {'input': '2\\r\\n', 'output': ['3']}, {'input': '269587449430302150\\r\\n', 'output': ['269587449430302151']}, {'input': '335408917861648766\\r\\n', 'output': ['335408917861648767']}]","human_sample_testcases_2":"[{'input': '711066337317063338\\r\\n', 'output': ['711066337317063339']}, {'input': '520974001910286909\\r\\n', 'output': ['260487000955143455']}, {'input': '1000000000000000000\\r\\n', 'output': ['1000000000000000001']}, {'input': '3\\r\\n', 'output': ['2']}, {'input': '760713016476190622\\r\\n', 'output': ['760713016476190623']}]","human_sample_testcases_3":"[{'input': '99999999999999999\\r\\n', 'output': ['50000000000000000']}, {'input': '779547116602436424\\r\\n', 'output': ['779547116602436425']}, {'input': '354979173822804781\\r\\n', 'output': ['177489586911402391']}, {'input': '269587449430302150\\r\\n', 'output': ['269587449430302151']}, {'input': '349993004923078531\\r\\n', 'output': ['174996502461539266']}]","human_sample_testcases_4":"[{'input': '2\\r\\n', 'output': ['3']}, {'input': '578223540024979436\\r\\n', 'output': ['578223540024979437']}, {'input': '856674611404539671\\r\\n', 'output': ['428337305702269836']}, {'input': '520974001910286909\\r\\n', 'output': ['260487000955143455']}, {'input': '99999999999999999\\r\\n', 'output': ['50000000000000000']}]","human_sample_testcases_5":"[{'input': '10\\r\\n', 'output': ['11']}, {'input': '28316250877914571\\r\\n', 'output': ['14158125438957286']}, {'input': '919845426262703496\\r\\n', 'output': ['919845426262703497']}, {'input': '4\\r\\n', 'output': ['5']}, {'input': '578223540024979436\\r\\n', 'output': ['578223540024979437']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":75.0,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":87.5,"human_sample_line_coverage_5":87.5,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":226,"human_sample_pass_rate":100.0,"human_sample_line_coverage":85.0,"human_sample_branch_coverage":70.0} {"sample_inputs":"[\"^ >\\n1\", \"< ^\\n3\", \"^ v\\n6\"]","input_specification":"There are two characters in the first string\u00a0\u2013 the starting and the ending position of a spinner. The position is encoded with one of the following characters: v (ASCII code 118, lowercase v), < (ASCII code 60), ^ (ASCII code 94) or > (ASCII code 62) (see the picture above for reference). Characters are separated by a single space. In the second strings, a single number n is given (0\u2009\u2264\u2009n\u2009\u2264\u2009109)\u00a0\u2013 the duration of the rotation. It is guaranteed that the ending position of a spinner is a result of a n second spin in any of the directions, assuming the given starting position.","src_uid":"fb99ef80fd21f98674fe85d80a2e5298","source_code":"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n\/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author pigsoft\n *\/\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskA solver = new TaskA();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskA {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String a = in.nextLine();\n int n = in.nextInt();\n String cw = \"^>v<\";\n String ccw = \"^\";\n boolean iscw = false;\n boolean isccw = false;\n\n int id = 0;\n for (int i = 0; i < 4; i++) {\n if (a.charAt(0) == cw.charAt(i))\n id = i;\n }\n id = (id + n) % 4;\n\n if (cw.charAt(id) == a.charAt(2)) {\n iscw = true;\n }\n\n id = 0;\n for (int i = 0; i < 4; i++) {\n if (a.charAt(0) == ccw.charAt(i))\n id = i;\n }\n id = (id + n) % 4;\n if (ccw.charAt(id) == a.charAt(2)) {\n isccw = true;\n }\n\n if (iscw == isccw)\n out.print(\"undefined\");\n else if (iscw)\n out.print(\"cw\");\n else\n out.print(\"ccw\");\n }\n\n }\n}\n\n","sample_outputs":"[\"cw\", \"ccw\", \"undefined\"]","lang_cluster":"Java","notes":null,"output_specification":"Output cw, if the direction is clockwise, ccw\u00a0\u2013 if counter-clockwise, and undefined otherwise.","description":" Walking through the streets of Marshmallow City, Slastyona have spotted some merchants selling a kind of useless toy which is very popular nowadays\u00a0\u2013 caramel spinner! Wanting to join the craze, she has immediately bought the strange contraption.Spinners in Sweetland have the form of V-shaped pieces of caramel. Each spinner can, well, spin around an invisible magic axis. At a specific point in time, a spinner can take 4 positions shown below (each one rotated 90 degrees relative to the previous, with the fourth one followed by the first one): After the spinner was spun, it starts its rotation, which is described by a following algorithm: the spinner maintains its position for a second then majestically switches to the next position in clockwise or counter-clockwise order, depending on the direction the spinner was spun in.Slastyona managed to have spinner rotating for exactly n seconds. Being fascinated by elegance of the process, she completely forgot the direction the spinner was spun in! Lucky for her, she managed to recall the starting position, and wants to deduct the direction given the information she knows. Help her do this.","human_testcases":"[{\"input\": \"^ >\\r\\n1\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"< ^\\r\\n3\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"^ v\\r\\n6\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ >\\r\\n999999999\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"> v\\r\\n1\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"v <\\r\\n1\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"< ^\\r\\n1\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"v <\\r\\n422435957\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"v >\\r\\n139018901\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"v ^\\r\\n571728018\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ ^\\r\\n0\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"< >\\r\\n2\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"> >\\r\\n1000000000\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"v v\\r\\n8\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"< <\\r\\n1568\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ v\\r\\n2\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ <\\r\\n1\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"< v\\r\\n1\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"v >\\r\\n1\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"> ^\\r\\n1\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"v v\\r\\n927162384\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ <\\r\\n467441155\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"^ >\\r\\n822875521\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"^ <\\r\\n821690113\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"^ <\\r\\n171288453\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"^ <\\r\\n110821381\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"^ ^\\r\\n539580280\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ >\\r\\n861895563\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"v v\\r\\n4\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ ^\\r\\n4\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"> >\\r\\n4\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"< <\\r\\n8\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"v v\\r\\n0\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"^ <\\r\\n11\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"< <\\r\\n4\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"< <\\r\\n0\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"< v\\r\\n3\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"^ <\\r\\n3\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"^ <\\r\\n7\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"< >\\r\\n6\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"v >\\r\\n3\\r\\n\", \"output\": [\"cw\"]}, {\"input\": \"> >\\r\\n300\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"> >\\r\\n0\\r\\n\", \"output\": [\"undefined\"]}, {\"input\": \"v <\\r\\n3\\r\\n\", \"output\": [\"ccw\"]}, {\"input\": \"> >\\r\\n12\\r\\n\", \"output\": [\"undefined\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '^ >\\r\\n822875521\\r\\n', 'output': ['cw']}, {'input': 'v >\\r\\n3\\r\\n', 'output': ['cw']}, {'input': '^ v\\r\\n6\\r\\n', 'output': ['undefined']}, {'input': '> ^\\r\\n1\\r\\n', 'output': ['ccw']}, {'input': '< ^\\r\\n3\\r\\n', 'output': ['ccw']}]","human_sample_testcases_2":"[{'input': '^ ^\\r\\n0\\r\\n', 'output': ['undefined']}, {'input': 'v <\\r\\n1\\r\\n', 'output': ['cw']}, {'input': '^ <\\r\\n3\\r\\n', 'output': ['cw']}, {'input': 'v <\\r\\n3\\r\\n', 'output': ['ccw']}, {'input': '< ^\\r\\n1\\r\\n', 'output': ['cw']}]","human_sample_testcases_3":"[{'input': '^ <\\r\\n3\\r\\n', 'output': ['cw']}, {'input': '^ v\\r\\n6\\r\\n', 'output': ['undefined']}, {'input': '^ >\\r\\n822875521\\r\\n', 'output': ['cw']}, {'input': '^ >\\r\\n999999999\\r\\n', 'output': ['ccw']}, {'input': '> >\\r\\n12\\r\\n', 'output': ['undefined']}]","human_sample_testcases_4":"[{'input': '^ >\\r\\n861895563\\r\\n', 'output': ['ccw']}, {'input': '^ <\\r\\n11\\r\\n', 'output': ['cw']}, {'input': '< >\\r\\n6\\r\\n', 'output': ['undefined']}, {'input': 'v >\\r\\n139018901\\r\\n', 'output': ['ccw']}, {'input': 'v <\\r\\n422435957\\r\\n', 'output': ['cw']}]","human_sample_testcases_5":"[{'input': 'v v\\r\\n4\\r\\n', 'output': ['undefined']}, {'input': '< v\\r\\n1\\r\\n', 'output': ['ccw']}, {'input': '^ >\\r\\n999999999\\r\\n', 'output': ['ccw']}, {'input': '^ <\\r\\n11\\r\\n', 'output': ['cw']}, {'input': 'v <\\r\\n3\\r\\n', 'output': ['ccw']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":227,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1001\", \"1\\n1\"]","input_specification":"The first line contains integer number n (1\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the length of string s. The second line contains the string s consisting of characters \"0\" and \"1\". It is guaranteed that the string s is correct.","src_uid":"ac244791f8b648d672ed3de32ce0074d","source_code":"\/\/package codeforces;\n\nimport java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\/\/ TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint len = sc.nextInt();\n\t\tString str = sc.next();\n\t\tif (len < 2) {\n\t\t\tSystem.out.println(str);\n\t\t} else {\n\t\t\tString[] str_char = str.split(\"\");\n\t\t\tStringBuffer sb = new StringBuffer(\"1\");\n\t\t\tfor (int i = 0; i < str_char.length; i++) {\n\t\t\t\tif(str_char[i].equals(\"0\")){\n\t\t\t\t\tsb.append(\"0\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(sb);\n\t\t}\n\t\t\n\t}\n\n}\n","sample_outputs":"[\"100\", \"1\"]","lang_cluster":"Java","notes":"NoteIn the first example you can obtain the answer by the following sequence of operations: \"1001\" \"1010\" \"1100\" \"100\".In the second example you can't obtain smaller answer no matter what operations you use.","output_specification":"Print one string \u2014 the minimum correct string that you can obtain from the given one.","description":"String can be called correct if it consists of characters \"0\" and \"1\" and there are no redundant leading zeroes. Here are some examples: \"0\", \"10\", \"1001\".You are given a correct string s.You can perform two different operations on this string: swap any pair of adjacent characters (for example, \"101\" \"110\"); replace \"11\" with \"1\" (for example, \"110\" \"10\"). Let val(s) be such a number that s is its binary representation.Correct string a is less than some other correct string b iff val(a)\u2009<\u2009val(b).Your task is to find the minimum correct string that you can obtain from the given one using the operations described above. You can use these operations any number of times in any order (or even use no operations at all).","human_testcases":"[{\"input\": \"4\\r\\n1001\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n1110111100001111011111111010110011111111011110000111101101011100110110001011000000101010110101011100\\r\\n\", \"output\": [\"1000000000000000000000000000000000000000\"]}, {\"input\": \"100\\r\\n1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"]}, {\"input\": \"100\\r\\n1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n1111111111111111111111111111111111111111111111111111111110111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\n10101010\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"2\\r\\n10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3\\r\\n111\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n11100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2\\r\\n11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n110\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"50\\r\\n10010010000000000000000000000000000000001000000000\\r\\n\", \"output\": [\"10000000000000000000000000000000000000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '8\\r\\n10101010\\r\\n', 'output': ['10000']}, {'input': '5\\r\\n11100\\r\\n', 'output': ['100']}, {'input': '100\\r\\n1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n', 'output': ['1']}, {'input': '2\\r\\n11\\r\\n', 'output': ['1']}, {'input': '1\\r\\n0\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '5\\r\\n11100\\r\\n', 'output': ['100']}, {'input': '100\\r\\n1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n', 'output': ['1']}, {'input': '100\\r\\n1111111111111111111111111111111111111111111111111111111110111111111111111111111111111111111111111111\\r\\n', 'output': ['10']}, {'input': '2\\r\\n10\\r\\n', 'output': ['10']}, {'input': '3\\r\\n110\\r\\n', 'output': ['10']}]","human_sample_testcases_3":"[{'input': '5\\r\\n11100\\r\\n', 'output': ['100']}, {'input': '100\\r\\n1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n', 'output': ['1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000']}, {'input': '100\\r\\n1110111100001111011111111010110011111111011110000111101101011100110110001011000000101010110101011100\\r\\n', 'output': ['1000000000000000000000000000000000000000']}, {'input': '3\\r\\n111\\r\\n', 'output': ['1']}, {'input': '1\\r\\n1\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '8\\r\\n10101010\\r\\n', 'output': ['10000']}, {'input': '100\\r\\n1110111100001111011111111010110011111111011110000111101101011100110110001011000000101010110101011100\\r\\n', 'output': ['1000000000000000000000000000000000000000']}, {'input': '100\\r\\n1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n', 'output': ['1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000']}, {'input': '3\\r\\n111\\r\\n', 'output': ['1']}, {'input': '2\\r\\n11\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '100\\r\\n1110111100001111011111111010110011111111011110000111101101011100110110001011000000101010110101011100\\r\\n', 'output': ['1000000000000000000000000000000000000000']}, {'input': '1\\r\\n1\\r\\n', 'output': ['1']}, {'input': '4\\r\\n1001\\r\\n', 'output': ['100']}, {'input': '100\\r\\n1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\\r\\n', 'output': ['1']}, {'input': '100\\r\\n1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\\r\\n', 'output': ['1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":91.67,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":91.67,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":100.0,"id":228,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.668,"human_sample_branch_coverage":93.332} {"sample_inputs":"[\"3000\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"8551308e5ff435e0fc507b89a912408a","source_code":"import java.util.Scanner;\n\npublic class Divisibility {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble ans = Math.floor(a\/2520);\n\n\t\tSystem.out.printf(\"%.0f\",ans);\n\n\t}\n\n}","sample_outputs":"[\"1\"]","lang_cluster":"Java","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.","description":"IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is divisible by all numbers from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"3000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2520\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"124666\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"285032471610732\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"396825396825396\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"391926317950225\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"1440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '2521\\r\\n', 'output': ['1']}, {'input': '987654321234567890\\r\\n', 'output': ['391926317950225']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}]","human_sample_testcases_2":"[{'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2521\\r\\n', 'output': ['1']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '1\\r\\n', 'output': ['0']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}]","human_sample_testcases_4":"[{'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '504000000000000000\\r\\n', 'output': ['200000000000000']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}]","human_sample_testcases_5":"[{'input': '3000\\r\\n', 'output': ['1']}, {'input': '2521\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2520\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":229,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\\nabaca\", \"8\\nabcddcba\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$1 \\le n \\le 500$$$) \u2014 the length of string $$$s$$$. The second line contains the string $$$s$$$ ($$$|s| = n$$$) consisting of lowercase Latin letters.","src_uid":"516a89f4d1ae867fc1151becd92471e6","source_code":"import java.util.*;\nimport java.io.*;\npublic class code{\n public static void main(String[] args)throws IOException{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n char[] c = sc.next().toCharArray();\n int[] d = new int[n];\n for(int i=0;il;i--){\n if(c[r]==c[i]){\n dp[l][r] = Math.min(dp[l][r],dp[l][i-1]+dp[i][r-1]);\n }\n }\n }\n int get(int l,int r){\n return dp[q[l]][q[r-1]];\n }\n }\n\n}","sample_outputs":"[\"3\", \"4\"]","lang_cluster":"Java","notes":null,"output_specification":"Output a single integer \u2014 the minimal number of operation to delete string $$$s$$$.","description":"You are given a string $$$s$$$ of length $$$n$$$ consisting of lowercase Latin letters. You may apply some operations to this string: in one operation you can delete some contiguous substring of this string, if all letters in the substring you delete are equal. For example, after deleting substring bbbb from string abbbbaccdd we get the string aaccdd.Calculate the minimum number of operations to delete the whole string $$$s$$$.","human_testcases":"[{\"input\": \"5\\r\\nabaca\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\nabcddcba\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\nx\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"500\\r\\nbbababaabaabaabbbbbbaabbabbabbaabababababbbbabaaabbbbaaabbbbbbbabababaaaaabbbbabaababbababbaaaaaabbaaabbaabaaababbbbbabbaabaabaabbbaaabaabbaaabbaabababbaaabaaabaaaaabbbababaabbbbabbbbbababbbaabaabbabaabbabbababbbbbaababbaabbbbbbbbaabbabbbabababaaaaaaaaaabababaaabbaabbbabbabbbbabbbaabaaabbbaabbabbbbbbbaaabbbabaaaaaabaabbbabbbbaaaabbbbbbabaaaaaaabbbbbbabababbaabbbaabaabbbabbbbaaaabbbbbabaaababbababbbabaaabbbbaababaababaaaaabbbaabbababaabaaabaaabbbbbabbbabbaaabbbbbbbaaaaabaaabbabaabbabbbbbbbbabbbab\\r\\n\", \"output\": [\"121\"]}, {\"input\": \"500\\r\\nccacbbbbbbbccbccbccbacbabcaaaabbcbcaabbababcbbcbcbbcbabbacbacbacbcaccccaaccbabcbbbbccbbaacbcbcaaabbbbbaaabbabacacaabcaababcbbcbcababbbabbaaaccbcabcabbbcbcccbcbcacabbbbbacbcbabbcbaabcbcbcacacccabbbccacaacaaccbbabbbaaccabcaaaaacbbcacacbacabbccaaaccccaabbaacbabbcbccababbabacabbcacbcbaaccbcaccabbbbacabcbccbabacbcbaaaacbbcbccacaaaabacaabbaaccabacababcbcbcacbcccccbbabbccbaabcbaaabbcbacacbbbbabbacbabbabbaacccbaababccaaccbaaabcaccaaacbbbcaabcbcbcbccbbbbcbacbccbabcbbcbbbabbcbaccabacbbbabcbcbcbbbacccbabab\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"500\\r\\ndadcbaaaabbddbbacdbabdcbcdcabacbddddbaabacbcabdccdcdadcbabdbcabcccbdcabdcaacdbabdcbbbdbacdddaaddccbacabbdbbcbbcadcdaadcababbbacabcdbbbadbdacbcddbccdbacbddbdababdcadbbabccbcdcccccadbbdbdbdcbcbdcddaacdababdddacadaddcdcbaabaddaadacbaadcdcacbdcbaddddbdbddacaadaaaaabdccccbccbcabddbbcaacadccdbcccdcdbbabbcbabdbccdcdbcbbadaaadddcbcbbbabbadcddbaaabbbdabbcbcacbbaaaddbcbaccaaadcdbcdbbbbbcdbbbcdadacdbcbbaaddbdabcbccabbadadbbbbdccacbbbacacadbcaadbccdbadacdaddacddcccbcbdbdbcbdbdaabdcdabbaadcdccdbdcccadabdbddd\\r\\n\", \"output\": [\"196\"]}, {\"input\": \"500\\r\\neebcacaadebcdebdeaaaceaabacabbaadaadebbceeabbdbdbaaeababdaeddabbeebccbcbbdbdecececebdcceaddbbabbcdadcacecedaabbeeaaddbbddddddadcaeeebabeaadbaabcecadaabbabcbeadbdaabebeeadbadcaadbecdcecaeeebeebbececdeddbdcdccacaeccbdcbbeeeedeabdceaaacdbbddaceccbeaedbadcebebdceeabadeceeedecaaeedeebabdadcaeabdadaeabcbccdacbabcacbcaeadbacbddbcecddebeabbedbcadeeeaebabbeccdbadceccaeecdaccccceeccbebabaaaacedaadbbaddacbaedccabeaddbedaadacedacdbcabddbeaaecaebddecddacbbceebeacadeeaadcbdcbccbccdcddabdcecaebadccccaeadddacbe\\r\\n\", \"output\": [\"217\"]}, {\"input\": \"500\\r\\nbceeccdebbecfffabeeeeaceaaeeecccfcafeefdadfbfceaacceacabefbceaaeefabaabaabcefdcdccabeddbdabebcbdfdbbfcefffcccedbbfbcbafcabaddcdfecedfdeafccbfbbabaabaccadfcaccdbdbbbacfcebebcadecabdfcefddffbffabbaaddbccdaadeadefebcdfefddceefcdeefbbeeebdcaacdcfafcdbadbaeadcbfbbcaacdeacbceddefebbaddbadaeebefcffcecbacfeabebfbeabdfbefeeeaaeebcdfecedecdeeeefcaeaeffcafcecedddcbbffbeaadfbfcccfbeacfddbbfccbafdfccebbbfadebbceedfafcbffbacafdbcaabdbcfdceffbbdbceaefcabfbbeedffecaafccaafbeadaaabedccfcecceebebfdfcbedaddfeefcea\\r\\n\", \"output\": [\"228\"]}, {\"input\": \"500\\r\\nafdfdcfebagfdcdbacdeggffebbcgfdbeeeegbgagaccbgegdfbffdbfaaeabebcgcabdebdeadbggadffdedfgadbdcdeacffebbceefedbeabeaefdcgddaccfaagcaedgdcfeafaaadfgcgcabdddgcccbbaeccgbfefaggabddeaffbaabadfbddcdafcfdaedbdfafgagddgdgdfdabbceddfcffafbabefeadecccadebbbfeegbfdgbbaaffgeaagegbbeddfbfeeecdagbfacffebbbfcfeffbcddaaecadfdbegfacbfeeggdbacfgecfbgfdfacffebfabddebgcdfdaacdedgeggdbaadagebbdbfdcbbbbbfabafddebfaffacffccdbccedbaadbdcgbedbddebbcadfbgdgfagffgacgeadbdgedcccgbcecadgbdcafbffggcccfffbffaefdbcdgdeefceceaagd\\r\\n\", \"output\": [\"246\"]}, {\"input\": \"500\\r\\ndbcbdhbacghbacfeaecddchgffchhbhheacheagadabedhfcgfbgfahgebdgdecfgeaggebahhbhaaeagdhbadegebdfbededdffdfcbebhchgahafdegbbhhgaecadcdhaecbbceaefbadgedfhgfdaeheeeabbehbeddhdgdhbegefdffdbeebdegdbefbadbehacecdaedbeeedehfhddeggdafaagehefcefbghadhbehgbdehaeaeeecbbagbdefafhcgffgcfeefehgddgggbegcaabcfehcdbfcbbccheeafebdfageefeafafhffdaadcddgbfaegafbhafdbhfgebaaebegcddgcadddfgfcddggbdffffhghcbghbhdcebeacagbdfadhdbghaeacadbccbbebhfeeaghgebghbabbfhcdfagccaadhhgdeechghceefaaeacheedhbdaedcffhcgfeagdgfdchghbbfbf\\r\\n\", \"output\": [\"261\"]}, {\"input\": \"500\\r\\nahecidbhaccbabcggeceaebgcbaeagehfhgiebafdcgiiehegggcdfbdccicbfficggabdhfihheadafdcccbbgbgfgehchdbihdidddagdafigbbbhgaiagiacbhhegdgchcfiabbiidhhfbabdfehcifgegieihfibheedfbiadbfdafdgbehfeifgcfhieiaheebeiiabggbecedchhicfeccfadhbfgahefdchibaecbifeadfdadfefifeibcbbibibbcchadbbbedcbgeiefdhedddedhfeecfafggghdffbcgigigeeieeafgciececicgeegafbcdahighgahgdeahfhfebegebfedfdfadiafdcdebgeacedeiecdcaghibhedaaecdaahdaecdbahcfchebiafcfhacabcgbaadibgfgbdcebifdafbgabageebfeebefhffdcdgehgfchiabfabcbefhccehffibaeiac\\r\\n\", \"output\": [\"273\"]}, {\"input\": \"500\\r\\ncachgdaghedbbfbcbicbabfcahhbeaafeaafgcaafcabeabccbbbjhjbjcabcfdcbjedeaijeebcabbfaiicebgfbchcaeachceigihhbifcdgdfhdjabjajfhhfajddghebbdiegadfahdahddfdeaagjfgafhjhfbeehbgahgeefggdgdcfcifagibijcgifehjccfggajjfajecbffdedfhgebfefibeiceigcddfjhgcghbbhjbhficggfighjdijjefcjchdihgfdcjgeeeiicihfdhbibijhgjdgdhcafdaafbfgjgcggidgebchbejiidjgbfcbcjejgfgeiaaebeajhdaijhgbebeefchahbbgcgegieagcdahgdfbidehbfafbigadjdedhdhaegbbcgifeahgchiafffjgfgaajjhedbiffbbjdijehdfiegiabeadfcifcbjjhidiieebaiffdjfhfidffgfchchegjed\\r\\n\", \"output\": [\"281\"]}, {\"input\": \"500\\r\\ndffchafckjeihjicjdebhahafcdcbbghebdedkdgihgdeddjijdadgaggfciedejdgicbjjjidfbfjecabddaggidbfaadbhcgddagkcdbhdakceidkaekefhcdjgadefidfjbcejeeghbaffkabeejidkkcdfkijeiehiedfacjbhbahkckidjdekbgkdfjkibhahegghbdaggcejbkkgkiaibbefjfkgfghikifaaeekjafdcgefibgfdhahicfidbgbcebfekjkikekjdedieiifddgcfekaifabgafahegkhjfjdjjefbebcigikafjcbcijbjfkdbiaaibbjejehhacejakikjfebabjffhcgikbcedhdefkakibdjbekdkdbhfaafcigahbabcjibbgkaikkagakakbcahfkgjfjiccicchggagifajggckjckffdaehdejfihcdkjkcahakibfbakhheiacgkhbhhbjjkcbke\\r\\n\", \"output\": [\"294\"]}, {\"input\": \"500\\r\\ndkhedelgflihgabkcjkjdjggkfahheklbffhaidljfikfjgbckejfahehkiieflelcifagakijiajjhhdglhibeaagehkiihcjgijlfdaejaacehejbilefhgijeebfefgbccfgdebkledbjbjilcggaiekacehlikekdcebeidhfbdgkahifgilhcdbikbfdlheefgbebikfcbihjlliegabgfjlbdallhjgdahffcdcblbjekfijalefkaklfglggaikcacllhdcfilbkbelcfdgaafahhdkcjgafddhfaijakffdhfafbgfhlaccbhjlaeaaajfaagdhfehdiflehghfiidjcachclgddkkgkllcdldekgflakgalekefffakklgjejjlfjblkjilhfdckahbedeckhfefkfjlgaflffgfkkhacchgjceelechdceehfhjbecgiflajlechkldhjgbeeijbadikbhiddjjbfficfa\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"500\\r\\nghgbegjdahcmgdjgmbaehhgmmlbjgigielfbddkhfbfgbgcmdfekcaeejgidledgcghicgmmblbaljhgggkimcagblckjkimcglahiambbccefkbmlmdgmkglfdmjdflbfdbekmjbghjjikjgkmeigifllmmgijkcclgjkmcahdjgkcekeagklgfhgidbedbgkgkmbjbkbdhiijjbkcdeallkjmjfldamkcmiijmgfkmhkhcgggfbhldjehbmmebkfeibhimddigfbgflifgmcdhmhjcfcmijjeaaegagcikmglclcblacjfclghgfkfaflhggjdmdjlcheehfhekcbdfkihgfjgakjbaihdmkhjfcfhfbeeifaghmmhiijaeglkackhllehlmmjklcelggahhlilgmbemkkjdcmhakbfgjdakhgekhcddmafkidefbffjdcmcidjmllkeedgiikjdlggigchgckdijhjgfmmfekmdcm\\r\\n\", \"output\": [\"303\"]}, {\"input\": \"500\\r\\nfnfckgnagbnmhglkdliekejfciahennmjahibikiimkdfcblgcgegenjeaaiddhehkdemeibehbbnahfkdbhkddbgjamfakhgjefljbfnegkgbldkknmmlailkjmmimnfgnccghgnnemignlmnedminddglamlllaekjgjnfcjiaafgnmheedlknlgacebdkgccgkchjhacbbiddjhjhgdkedbcfnaniaaimibgkkdgmnegiandbdmnchehkcidfegaakndccljlganndfbnkenmgcflhammgiggcfmdcjnmncdgfaejaadelhjemekdnlbklcfjaeblhgbccjgechgniedfngfhjidjgangcfabnlblmiadabeeahfdfjhlkfmecnddbhcjgkjfejemfilhdcihfcenmbmblijkiilndnkafdejjnlgnadcllinjnfkfjnbleljledmjbleihgdicmcefaihhbmhnejmcieamkhebme\\r\\n\", \"output\": [\"314\"]}, {\"input\": \"500\\r\\nbfdalabnagjcojejahgifmbmgokfmmbnaflhbiiijnaidocachemkknjdbohmkciconnnigiciclgldngikjbmodfdfhegkcemlgngiadeffhliacnonnadnblkmmmbkicdemnjibokljonefjahllbkeaaecboadjfhnkhmmalnjfdmmkmjnabojdmfhelnkaehoaiojeajjahlhakikimbobejoeagkhcnadjogjocngaddbfekecokdhcjehenfegjjelekfjolajeibmaodkagkgfnjfinfgdcknbmgemobehekdcclmlfnkmodogedmhaieojgigklajkabjhcgldagaifoaggbibjajgilahejjcoaocncgmnefcglkjledcdcjehlondnilbnojikmomlfdagoaobmekadabiblijldngammojgkgjojhoanfclimkebkfdmoigjkmcnfmmddiahakdjdngffgdjaaklkecgj\\r\\n\", \"output\": [\"321\"]}, {\"input\": \"500\\r\\ndicdkeichmcjhbnkiglmnephogelfohjboiihaocmpaemlmbgjdaoblkkomngcelapdlmophamcnjihpfhadhaddhbinpinepkcnjpndfeiepiocepbdjchcenilbaccopfnpciglfcknjbmdbhcdgihbeniklehnonlnhooabbodnbmdoaafnedpffdnibdnijidpbngidabdncdfolpfnenbcmhhlenmjcbiacmilahlfpdgafcacnlgedkicmnknliemncdgoggjcdbhnmneljgjjemekndgdhddoiiflndklehceancaiadnicdoofciodhgphjgmchkehailolkhfbpdkoipcemoghegbbpedaafbeloccmgddphefjakjofldineohdgflhflmkiedfmkocbjablcofcmdfconlmhoiehlobdbfpelhaindhamnmbenldbmefgkmhjlloeendgdbeafncjohclenmdeppemplf\\r\\n\", \"output\": [\"331\"]}, {\"input\": \"500\\r\\nkjcllbkmamlbogkopfqhjfpejfeglpbdqjikbgakecolabphkmpnjfbhpdnlcqcfdaljmegiljlqpkdnomcglpkbaiencimbkehpiqmpafeabbohfajahfablplcpacngfpghjdhbonglhaedpihkbjbkcpjdkqkpdobjfqepolgdgjonaogkingfmacbflbmjhhjbnnffbmcohgmmfbjqojnocjlfhlhflpkddmiijomenhldcoijnqcomjnbbpnffkgelnigkcmnaqdnkpmoejllkilfdlqoqcbmbqdaobndpgjkffebhgmfclhncalfeamiqhclllpoefaaobhqfnljloimkdoaggjammqliommkllnhhqoagcpmlkddkclokjlccgfapodfolmfejdkofqncjkjhqcledaplificibodhddlhmqqckjenpjalokpllnldqppjceelgjbjqqqlcecjcjmkiklbbdikblddkikpfea\\r\\n\", \"output\": [\"325\"]}, {\"input\": \"500\\r\\nbfhofhrkimdpgpnjhelnqlgbjpddbanmdfqciedrdgednbjjinlmbormkckfcqghoibpcadmnigckajnklngnmpoaiaepajkhegipdadoipgmcncncbhcjkhfechneecqmchnqgpaqkrhipgnqcojhaliokihgqbadmkkcffkeorbjorqbbojiqlpdlohbmhmlmliadlbrpcdmfckfgdqcpflghdfkqceminjlollkbmqreeilffqigjelerjpiakllbgiogqdpkochbjpnppagaooqdgocnnrpkeiekhkibrfjdbkfmlnmbgejcfklgnaacrpnhakkpinnolnbikcrqlgfhcoqpaainlklpamdeapnqpcgflfnlgkpcicdbiodgdngaeaanbjhnfbgogclpherrqodalbbpjkfiohpqngmfialgdejlgddkqrhgnblbqkamajnehebbnkcrlhnrnlcoondjhhnghecmlqfogbiaggkl\\r\\n\", \"output\": [\"335\"]}, {\"input\": \"500\\r\\ncdmkfpciphakoplkedblrkgkeopflkqhokgfiehpjdbbjidapefhognhgheikdbaepqasmfdsbkdbbjaesoikmglimmabfbsreakbpnhsclohfbaqamjlhhaiqchpoaibqldehsprprscrinsdgrlsmidkdhbsgqnlhlbldrnqhgfhmcsmncqmohkcbkgnbrofccliqjpqdpesfnabndkkklmoemsfksqmjajbgheijcgjiinppnpqlilarocbphlogqrmcheflskedeomfsjkoojfjsdoibiadoeickchjhssjaqhsnbnahqcqnelemollsncrfhjrngeighcqirbphqharlgiblchqjgblkfemlhofrjjceeerolsndsncjksanpkcqiopkmqmlfginppbhkbbdshpbjblheolofkpcjjeedholrqklhiiohmdjbbseclssdlcbkjribjggfggsljidsngsgjpankfckidrpsjsgaq\\r\\n\", \"output\": [\"335\"]}, {\"input\": \"500\\r\\nfpkfjphbmbqmikncnatbjfldpcohbgamfjrceshfgffllbjcrkeemqboblbjtsgqbeplcrkstcginnjqqolijjbbcnabagheaaisdoiieesogomilkcookbsgebbbmqssrbgdmblmmccgeciaeiasbatraotjlafhmjmddsldfqgfeqkrmkafqdlikttmdtkdmmosqgfflseiibjnahjqsmhcmklgqrqdbccegjeschpcdnbjscqoifipbrfillscdqpjfaippqaloqpdfcmtmjptchiipedetijorrolndnehtkfjarpfqphmmmbeeeomfbshkehesalaeccpgpolhncijsihhdloesfjherreaclrplrtcbsrlefqeksgtdnkmdfcklgskqqkgcndthpgdkitiataqosqdrtjmirsicnrbblofqfsqsdksngrkaefmgnpaaroelimcpnnibekhompicrocopcscfajqdbfpqcrrnlm\\r\\n\", \"output\": [\"326\"]}, {\"input\": \"500\\r\\nraqqhocfiosbkfjtbjnbatojfmummlrghpkmcghfagdmmkbesdhtelromtkmdmltiljttepgeqdlhtgkpgljrmqjjtmretsdincjjqilahapcjcdlkrftoaeramgrudjbtpjblaksjjjburngarjitmebjiotofctgppktkqkianmucafsspbefuijcmsqamuenlrfrunfhgfqjhkjgrdjrkjgbpifadsjabktgdsgjsslipnqncbdfaphfndssljbthhcrfoijilodnuosmirctsjbhtlbehnljqcjdahcmjqsursqemcmtbgdaegdugqskskfdcffuilthtnjfhujgpifckubajoorllaruqfmbgrcutjushbflsqeiqdddenhurmunhsqqnbsfnjhgdodhmdugisalahiiedmhcgudjfhuumtlndkneauikebmgnrbdmegeotncdllcmmqfudldikeasisllapabefdubasndtobm\\r\\n\", \"output\": [\"339\"]}, {\"input\": \"500\\r\\ndkftkjtfjdrrjnruuafncvesfngrsrmpmursvssubifcmaeivkrocrhkujbldcgvpifnttfgvrppjpfogmietujqnierfoflmqgbpgsqnagqjqhdjmejllchtldrtrcgemvcalcabieheheagnsmvhrdeeonfckgkuhciivibchbqmvbcdugvcbnqbujgeljqclunbgpguufqhletqstbeabcuncibkdkntbunnvquqshmkqmpbaoaujofaraipvjirvvggrnlvonqsehduohpauqetcujmgutoqigpuqijnevgmcmanalrvsaivueouviobdmucsljnfocsbvlrvmnoevhbpamqqcupcrbfdcerhchteersfjafuiekuchemvhctjfgsgmssfsanrcfjlvithppcqauuepopjolbojemvqfjhjfbiflmihnnkkgmaeecpeaascsasokudhjtkgclbomlbaicffhhlslseaaihlipgiv\\r\\n\", \"output\": [\"339\"]}, {\"input\": \"500\\r\\nfropdpoauqarcbsnlpkwtcpabgsvcsfltusgobcghdbioeivlddcdadaawjhnljgsfjnfdebgucqmhivqvcrlnmogjapkocfffhdbtqcwauhfmlkwcdutvfwrhdclsjuqwsrrwgquducmguvlralvnspclfsgdpqudmishuwqhvfndqjrdiekbopjwqnbldtgafoqewwkwmdmvdwokekrqbbqfejrhervtbgsualsneufmohsrhwcvwoudfpofbnsbvqoogbrjjhmjiatfpsrvjdiohwhgkrwjcskibimsnlsgogbutccwjedroqtgumopbkshhsllkrlklihjicfaivckdsijgnvuraoiiwdhnoimwfgbslfoehwpdrknljsediqvmtkkgpfneuvjucgkochhbtcvnjhgafrhdhrpjchbociesjfmtwnckbobjimtbrfebdoronmeatuhtafvtssficqnwgdslcvmbmvaodutmpotjc\\r\\n\", \"output\": [\"351\"]}, {\"input\": \"500\\r\\nnjjiptmrcggwwtbcxbmmiqrqdhhgciaskwustnvmbkbvghlcnrctbcjlepnkqcktsbxgjnvhmndnbqnmhwrlfijpimlojsmvfjidtcmujmnoihwhlronmmpeiobmoperdwsranlbtqgbktpdtbtihnwlsvfefrugurkjbvajxsovpuwjoohmvtdlarbeabmejbrkmkfjwbgsisvxfakjphpmrtmwwwktroitlmstbwuilftpwqmqtitwgkwbpiaueqopotnfxhchsoqqlvwqlogbooqnmpvvtxmtdqqkjwhifmvltxxbwjjgaxjkuuraneqrucchncusshrwxhhdukkexwjrxgufkgmiqblonthwtqulftphghltqcarvfhkknpqxftvqscspvosxvguskdmfdocxrrjvcskjhtxwomiwiqjemdklldgnkeuelcjuudmhokbihwpibicfbjjoqbbqnbqmcsdwdeiisqfvvoxggqeqcfs\\r\\n\", \"output\": [\"338\"]}, {\"input\": \"500\\r\\njqpyiogllhoobjixnlhskgwowfrhkuotvjbmgatrspqreavqwsuljxqduutxudueenmvarsmqqaqxohtsmxdqdhcvydhuiqcchvvxroqieeffipvlumywcthdafsgnwyamumpknqittxakhlbrbhrtcfbrkvjrypxqochjnmyihuqtrrbgiiytifqeqbnssrmywtdghpekqjxkvoefiwpbepqstotqyiohuawpvawephiexxnofiipkwmshhyaprhrryspbvfoasagdldqeasajhqsurmduuusiwgyuroimbyfjogkxcgjorxpqblhtwvlgognnvisqdkheurkikjcgmoyvafiqhfcbmgmybefsmkroftstqmhkfkuxufghjhveuhhkecushenjqyvqhxcfqdcbkxufhxpbamaowjnuaxjcsuuryvjtnwrhwiurrsehusxwrjwsotefacjxjanphxngylkmjbvhfqghtlnlvdbcnkfjd\\r\\n\", \"output\": [\"350\"]}, {\"input\": \"500\\r\\nlkuvqevrlanaugfoadmkdqpljknwfoftofyxcvsfvprqxuwkfwunfilaqrzqhsjhsaoynbsuiqyzwqfkmbddngwydhrtimoerqpehjsgqojuhtxvaayzsbxmsqckibtcangzdnnpcpqkqgzbzbeaejuhprrqxdhyfrtzwhvnnrfocwrwfzbgtvdpwlkrqisjqpszykzhfjrstcvmmnebwgvwxsppyxihkepmndwgtzlsurasjfrkqqnxjqdsbmsggakyuouevxdxuwyxbhkmvpjqvoklaknxsmzqpjrftvzifnqjporbvtpdnzfhckjnwgeddpjycnqrtphjhqkfvpoerzkilpjuteidflpulppotglglarrwopryxbjjsroguskwzalrmasgcioovteyuukwnosswdwnqmrbdkssgnkaivtufoayaxgqpprnoyvoeqqpywboofudtutiweaaqzbneqmxgnfkxdnjdbijlveapyrybiw\\r\\n\", \"output\": [\"358\"]}, {\"input\": \"500\\r\\nccbbbbaabaabccaabcaaccaabbaaaaaaaabaacccbcbccbccbbaabcbbbaacbbbacbccabbabacbcccbbaabbaaccbaacbcbcbabccbacbccccccbcbcbaaaaacabaabbbacabaababbbccaababbacbcbbacbbbbccbacaaccaaccbccbaacbcaaaaabacabbaaabcccaaacccabababbcbacaababcaabbcbacaabbcccccbccbaacacbcabaacbbababacabbcccbccccaababacbcbbaabaabcbaacaccbaacbbcbcbacbbbbabbcbbccabaabbaaabccabbbbbbaaabbbaabcabbbbbbcaaaabcbcbbcbbbbbbcabaababcabbabcacbaccaacacabbbbbcbaccacbbbcaacbbacccaabaababcbbacccababaabcabbccbbbabbaabacabcbabcaabcaacabcaaccacbcbbcaa\\r\\n\", \"output\": [\"161\"]}, {\"input\": \"500\\r\\ncccaaccbcacbacccbcccbcabcccaaaaaabbccbbbacbacaaacbbcbbacaacbabababcaaacbcacacbacccccccbcccaaabbabccbccbcaabbcaccbbbbbccabcacccabbcbcacbcabaccabcbacacbbbcbaabacbcbbbbbabcbcabbccbbabbbbaccacaacabcacbacaaacacbbbccbcbaccaabbbcbcacbaaacaccaaabccbbabbaaabbbabacbaccaabbbaaacbacaabbaaaacccabbabbbcbcacbcccbbacaccacbcccacabbaabbbaaabbcbacaaaabbcccbacbbbaacacccccbccabbbaababbacccabaaabccbbccbbbbccacbccbcbbbcacaabacbcabaaababbaacaccbbbacbcabbbcacbaccacbcabbbcccbabbabbcaacbcbcaabaaaccacababbbaacacbbbcbabbcac\\r\\n\", \"output\": [\"164\"]}, {\"input\": \"500\\r\\nabccacbaabaabaaccaaaacacbbcbccaababacbbbccbbcbcccabbccacbacbbacabbcbccccbcbbaccbcaacbacbbaaababccaccbcacaccccabbcbcbaacccbccabccaacccccccccbcabaacaaabccaaaabcccbcbbaabccabbbaaccbbcccbcccbabacbcabbbbccaaacaabcbabbbacacacbcaabbbacaaaaaaacbcabbcaccbcbaabacccacccabbbcbcbacccabcabbaabaacbcbaacbbccccbbbccaabcbcbbbccccccbbabcbabbacbaabaccabcabcabcbbabccacbbaacbcccbaaabacaaacaccbccbccaccccaccbbaabbaabbbccccbbcababcaaaaacbaabcaaccacbbabbbbcabbbbabbabbcaaabccacbcaccbbcabbaaababaaaccbbcccababacaabbccacccab\\r\\n\", \"output\": [\"161\"]}, {\"input\": \"500\\r\\ncbbbcababbbbbcccbcccabbcaabcabcaaacccabcbbbaacabacbbbcbbccbacbbcabbbacbbabcbccabbababcaabcbabcbababbbaaaaaabcbcccaaaabaaaccaacbcbabccaaaccabccaaabcaacbcaacccccabbbbabaacacbbaabcbcabaaabbbabababccbacbcbbcccbcabacbbbbccbbcacbbbccacacacabccacbccabbbabbabcccabbccbabccccbbbcabcabcccabbababcbcccababccacbaaacaabcbbccbbcccbcbcabbacbabacaccaaacacbbacacbccaaccbbcabcbcacabbaccaccccbacbbcacccacabccbabbbbcbbbbabccbaabbabcaaccbbbaccbacaccbbbabaacabbcbbbaacaacaabaacbcbaaccbbaabbcabbacbcaabccbbccbcbcabbcbcbaaca\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"500\\r\\naacaabcbaaacbbaacbccbbaacbabbaaabcacbcabaaaaaacccbabcbbbacaaacabbbbaaacaacaacbbbbbabccbcbabcabccbbaabccbccacccacbcbaaaaaaababbccccccacbaccaabcaccbacbccbacccacbacacbaabcabbbcbcbaaabbabbbbbcabbabcbbaabbcacccaaacaaccbaaabaccbaabbbababbabbbcababbcbbaaacacabbcccaaabcccabbbaababbacbaaccbbaabbcabbbbcabcaccbcbcbbbcabccacbcabbaacabbccccaacbbbbaccccbcabccbccbccbccacabaabbbbcbcbacabccbbcbaabacbacbacaabbcacbcacccacbbbcabcccabacbabbcbbacabcbcacbaaabcccaaaccaccaaccbbcabbbbbccaacccacbcccaaccaccaabaabcaabaacaac\\r\\n\", \"output\": [\"163\"]}, {\"input\": \"500\\r\\nabaabaccacaabbcbacbbbbaaaaacabaaaabbcbcbcccbacabcbabbccbcabacababbbbccbaaccaaccbacbbbbaaabacbbaccabaacacacabcbbcbbcbacccccaccbbacbbcbababaccbbbabbcbcbbbaccbccbbbcccbcbbacacabcccccbbaaaabbbcabbcaaacaccbaabacacacccabcccbabcbbabbaabaababbaaacbccbacacbcaabacccbaacbacabbbaaccbcbbcaaaabcbcccbcbcacabbbbacbbcaccaabbbcaccacbaacbcccbbbbbaccccacabcccccaabccabacabaccbbbaabcaaccacacccbaabbabccbaabbbbbababaaabbbbbaacbcbacaacbcbcbaacbcaacbbcaaacccccbbbbabaacbccbabacabcccabacacacbcaaababcbbcbacbccaabcccaabcbcbc\\r\\n\", \"output\": [\"170\"]}, {\"input\": \"500\\r\\nbbacbbaacbcabaabbaaccbbbbccacabacabbaaabcccaacbaaaaaaccbaabaaabcabbacbaacaaaabcbacbcbcbccaaccacbacbcbbcaccbccbabacbaacacacccabaabbacbcaacacbcbacaabbcacbcaccbbcbbacabacbbaccababacbccacaababbbacbbbbbaccacbaabbccccbbababaaccbbabbbcaabbbaacccacbcabbacbabbcbbbbbbcabcaabcbbcabbbcaabaaaaccaaacaccbbbcbabcacbacbacbcabccabbccaabacabbbbacacbbbabcbacbccccabcacbbbcabccacabaabcabababbbcbacabbbbccabccaacaabbbbacabaabcaccbaabcbccbabaaccbbabbbbcbcbcbcccbbbbbbbabbaaacabbaccacabcabbbabbaabcbcabacaabcabacbbbaaacabb\\r\\n\", \"output\": [\"172\"]}, {\"input\": \"500\\r\\nccbbbaaaabaccacaccbbccabaacbbcaacbabaabcaabbaaabacbccabbccbbbccbcbccbababacaccaabbaacbcbccaccccccbaaabbbbccbacabaacbabbbccaabaccabbbaabaaacaccaacbbacbbaacabaccbaccbccabbcbcccacaccbaabcacbabbaabccbaccbcbcbccbcaabaacbbcaacabcacaaacaaccccbcaaaabaaabaabbbcbbbbaabcbcbbbacbaacbbbbbaacbcabccbcacaacbbcbcbbbacbbcacbbbbabacaccbaaaacaaaabbcbcbaaccabbacccaabbabbacbccbacbaabbabcaababaaaabaacabacbaabccbbccbababbbcbacbbbcabacccacaababbabbcaaaaccababbacaacbcbbcaccbcaabcbcccacccabaabaabbcccabcaccbbcbccccbcacbaba\\r\\n\", \"output\": [\"170\"]}, {\"input\": \"500\\r\\ncaccacbcaababbbacaaaacacbbcaccaaaabaacbbaaaabbbaacbbcbbaaccbcabccbbaabbbcbccbacabaabacabbbcbbacbbcbcbcacacbacbbbcccbaccccacaaccbcbcbccbacccabaaccaaabaaacbcaacccaaacacacbcaccbbcccabccacacabbcababaacbccbcbcabbabbbccbbabbbabcccbabcbababccabcaccbabbbbbcccacaccaabcbbbbaacbccccccabcccaacccbccbaabaaccbbbaaccbcacbcaaaacabaacbbaaacbcbcaabbbaccabbbcbacbbbabcbcccbccccbbcccacacbccaccacaccccaabcabcbbacccccbccbbbabbbbbbcbcccababccabaaaabccabaabbcbcbcabbccabababcabaabbabcccaabacaaaabbabaccbbacaacaabcacccbbcbcc\\r\\n\", \"output\": [\"164\"]}, {\"input\": \"500\\r\\nbbabcacccbcbbcaaacacabababbbcacabccacbabcacccbccbccbabbbbbbccbbaabcccacabccbaaccacabaabcabcacbcccbaacccaabcacacaacabccbabccccbbaababcccbacbcbaacbccabbbbacbaabaccccccababcababccaabcbaaacacaccccbaacaabaacbaccacaacccabbbcabababbcabbacbccabbaaaabcabaabbbbaacacabbabcbaccbcbbcaaaaaabccccacacaaabccbabacacbcbbccacbacbccaacabcccbabbccbbababbccabcccbbbacabcbabbbcbbcbaabcaccaccaccaabbccaacaaccabbabcbccaccbcbbbcabcabcbbacccbabcbababcbbcacbbbabbacbcbbbaacccbbbaabbcaaabbbaccbaabcacbccbacabacacaaaaabcbacacccaa\\r\\n\", \"output\": [\"176\"]}, {\"input\": \"500\\r\\ncbdcdcbdbcdbbcbdbddadbadddcdacdadbcaaaaddcadabdbabbcbbcccbbbbdbbccdcdcccdcdccaacaabacbdddddaaabaaacbbabdbcaacdabdaddacbdccddbbacabaaadddcdddadbdadacbccdabccadaacdadcbdaadacacbcdddbadcaddcbcbddcbcccacbbaacdcdbbdbbbadbbdbbbdacbddcbaccaccbaddaaaabbcdccccadcdcccbcbdbdcdcbddbacacbddbaacbaaabbbaccadcbbbacbacddbcbdbbcbcdbcdbbcdbcbdcdddbcbbbdbcabbdaaacdbdcdbccddbdababadddcdcabcbcbcccbcccdcaccacaddcabadacabbddaaabbdbdacccacabcaccddbbbcabcdaabdbddaaadbddccacbbcbccdccaaccbacacbcdbbcbccadcdabdbadbcabccddaba\\r\\n\", \"output\": [\"195\"]}, {\"input\": \"500\\r\\ncbbdbdadbadbddaaabbaadbcaadaaabcccdacdcbaabcbadbcaccdccbacacaaadcaaccacbcccacdbcdbdabbcbacbadbccadabccccaacdccdcdcdaccccddbabdaccdabbcbaaacacdacccdbcbbbccaccdaddbddddadabbcbbaabcbdcadbdbdaddabaaccabcaaddbdbacddddbbacacbacbdaaadcbacbcdacbbddbcbaddbbbabbbbcbdcaaabdaadbdbdbabcbcbcaaaacaabddbaacadcbbbacbdccbabbbcdbdabdbdaccadcccbcbbadadccacdcbacaacaaccaddccdacdbbbcadbcdcccdbdddcbccccabdadcaaabddddaabcaddcddaaccdcbacacaabacacbcadbadbbbadbbaccddcadaaabbcadabdcaabbbcbbaacadbacdacdbbcdaacadbdaacbabaacdd\\r\\n\", \"output\": [\"196\"]}, {\"input\": \"500\\r\\ncbcbcaadaddabadbcddbabcbbaabbcaabcdaacdabdcacacbadacaccdddacdbdbbbbcbcddbbbcccccbbcadbcacbdbccdabcdbdadbccbcdcdcdbdbddccbbdcbbabbcadbbaadbbbaadbbabaddddaddcacabbddddaacacbcbaabaaababacaddaacbcbdbccbbdcccbddbacacbbbbddcaadacccbacbbdbadccbacbbbbdbacdddbcdaaadcdbacaccddbddaaaaaddaabdccdacbbaacddccbacadbbbcacdbaacbaddcadddcbbccaacdccdabdcdcdccbadbdbdbcbaabbacbcbcbabddcadbdaaacacbdccdadccbacaadbccccdaadbdbccaddbbadccbacbccbddababbbdcaadbacdaaddababbcabcdacbddccbccdabdcdbcdcacccaacbacbabbcdcbbbbbcbaac\\r\\n\", \"output\": [\"196\"]}, {\"input\": \"500\\r\\nccadaaddabcadcccbbbcbdaacabcbbcdacaababdbbdccdcacccbbccccadcdcddaccbaaababbacadcabaacbccaabbbdbcbcbbacaaaaababcddadcbddcccbabdabdabbbacbccaccacdacadbbbbcaccccbdcccaabbcaacbcdddcdcdcbbdabadbadadcacdbbbaaaadbcbbabdabcbcbddaccabdadabdbbabcbdcdbdccababcbadbdcaacbddabdadcdbddbdcdabddbdaccadacabddccbbdcbacdbbcbcbdbabbcbadddacddcddccaaaaacabccccccbdbdccacdcaaaababccbbddbbaadacdcbbbadccaacaaccaabbcbabdcdccdcbbbbcdaccbbdccabcbdbacadcbdcdcccdaaccdddbbbcbadcccbacadadaddaabdbacbcdbaadbaaabdcbcdddbcdbdbacdcb\\r\\n\", \"output\": [\"193\"]}, {\"input\": \"500\\r\\ncccabbcdddcacdbdddddbabadacdcdabadbaddcbcaabddbaaaabcdcabbcccdcbdadbdcbadbaccdaccbcabbcbbcdcaacabbdcbabddccaaacadcdddaacaadcbbaabcbdcdacaddcabbcdadccdadbbacacbbaabaaccbabcbccdaacabaccaadaccdabacabbcbadddddaddaaabacdcbbddbbbcdabdacdadbdccbbccccbcbbabddadcadacabcbdacabbddcbcacbdbcccccbdbcaabbdbcbbdcbaccaabdbbcccadbddcdccbabcdcbbcbdadababcccdcddbadacbadbddbddacdadaddbaabbdcddcbdacbaabdcdacabddacabccacbcadabbadabcddaacbddbaabddabbcabbbbdbcabccdcdaccccdccccbdcbaaabdbddbdaabcdcdcdbdcbcdabaaaacaaacdbdb\\r\\n\", \"output\": [\"201\"]}, {\"input\": \"500\\r\\ncddcdcbddbbdaaaabcbacccdabaacbcaddcbbcaadcbdadbacdbbddccacbcbabdcbabcacccadbdcbcbbbaabcddbbcabddbabccddcbabdbdbbdbdaaaabbbaaccaaaabacddcdacdccabbcbbdbcbdcdcdbbdbcaabacaacdadbdccacdcddbabbcdcbdcbdbdcbdbccddcabdaddacddabcdcdaacbbaacdabcbccabacadabcdcdcdbbcccbcddbdacaaddadbbbcbcbacccacadcacdbdabbabccbbcaaadcabadaaadbbbdbdbbdcababadbbdcddbcbcddbdbaadbbbbcccbccdcaabbdbaabacabacdbcbcbbaacaacaabbadaddbbcbdcdcdcabbcdacdbcacabddbadccbdcbadbdddbdaccbcabdabddbddccaacdcbccadbdaddcabaadcccdddabdaacbaacadadba\\r\\n\", \"output\": [\"201\"]}, {\"input\": \"500\\r\\ncdbdadbdcabdcbdbaadacaacbbbbcdaccddbdbbdabccacbaacdbbdcbddadabaaccbabccabadddbdcdcdddbbcbadddcabcddcdbabacacbdbcaadacbbbdccbcabacdbcccbdccbaacddaaaabdacbdccbbbbcaabbbdabadadacabdbbaaacadcbaacadadbbdbcdabcdabccacbdcaadaccdbdcaccaaddacddccdadddddddbacaccdbbbbcbbabbdcacbcaacaabdddbdccdaddcddbbaabaabdbcccadcacbdacabcdaddaabcbcaadabadbdaacacacaaddbbbcabccdbbcbaccbadcddaaccdbacaabbcdbcbdbcbacacdccccabaaabbcbccdcaabcadcaccadbbbcccabbbcdbaccaabdcbcdbcdcaddaabcdacaddcccaddabcbabdcabbdbaaaccbbabcdaddbbccd\\r\\n\", \"output\": [\"194\"]}, {\"input\": \"500\\r\\ncddbcaadccbdacccccbbdcbbcbcbdccbbadbaadbaddabcaacabbcacdbaddaddcbabaaaddbacbdaacccbdcbbaccbdcdbdcdbcbdbacadbccacacdbdbbbaaadccbdabbacbdabdabcdccdcddcbdadbacdbbdacdbccddbbadadcbdbddcabdabcbbddcbdcbcdabcdabddcaaabdddbbcabcaacaddcaadddaacddcabdcacbacdbcbdbadbcdaddcdaaaadaadcdcaabbadbadddaabdbdbdbaabdbdcbdcadbbcbaddbcccddbaddcbccadccccbbbdcacaabcbbcbdbdaaaacddbdcdaadbdadbacdddbbbddacbcaadcddcbdbabcadcddbbabccddbadddabacbbdacbbbcbcbdcadaccddbbbadddaaddddcddabaccaddbadcbcbabdcdbcaaabcadaacaddbabddcaad\\r\\n\", \"output\": [\"202\"]}, {\"input\": \"500\\r\\ncaadabddbaacdabdbadcadcadbdcdaadaaabcdbabcadcbaaadcadacbabcddacaabcadcabaabdddbcbcadbbbdabdabacbccddcbcdacbacbadabdcbccacbcbcabdcdbcdacadaacaabbbabbddbcccdcbabbbbcbcaacbdadacbdbabbabcaacdacbadcccbadaaabdbcbdbdadbddcdbdbcbccbbadbaaddcaaddadaaaabababdbbaddbadddbcaabcadbcacccadbdaaabcdcdbddcbbbdadaadbddddbdbacbccdaaabbdccaabcbbbaadaccdcbccdcabdccccabbbbadddccadddcbdddaddbdcaccbaadadbbdcaabdcdaacadddadbbbdadcdcdcbbabdcdbdbdddababaaabcdcbdccabbcaabbccadcdbdbbcdbbaabadacdaccaabbdabdcdbabcdbcbdacdbdcbc\\r\\n\", \"output\": [\"204\"]}, {\"input\": \"500\\r\\nddaabdcccadcabacacdbaabacbaadcbcaadcbccabdbddbabacdaccbadaccabcddadccbdcbbacddcdccaccbddcbcdadadaabcacbddcabbaabbbdddccbdccdaadcbcabadbdccbdabacbdcacdcdacadcaaaaaaabaccccaaabcccbdabdaadbdcbaccabccddabdbabcbabbbbaccdadaaabdbdbcbdccddcdbabdaabbbcaadaaccbcbbdabbddaaacaddbbbccbbaacadcdbcbdddaaccbbcadbccccddbddbadcbcdbcbdccbcabacbabbddadcdabcbcdccddcbcdcaddadbccdbabaacddbcdbbcdcbcbdaddbdabacbdbcdbabbbcdcaabbccbabbabccdadabdccaabdadaadcdcddbbcbccbdbbbddacacddbdcdabcdaddcacdabacdacabbaddbadabcdabccbcba\\r\\n\", \"output\": [\"202\"]}, {\"input\": \"500\\r\\naadbeaacbbbbccaaadabcebbadddcaeeadcddeabdaaddedeceadeaeedbeaddddacbeadeeeabdcdbdedcdebabeaeeddbadbbcedbadbeddebcabaaeccecaeeeadbeccbabdecddecaeecbcedccdcddbcbbcdcedbbcbbecdadbdbbceeeabaadbacaaddebccededacadeecdbcbbedcbaeaccadcaaabcddeaeecabdebaaccecababccacbeeeabceacbbeecaebdebeddaeaeaebcacdeccbeebceddabaeedccdbaeaeebdedeecdccdcbddedcedacdceaacbadbaadcaececacaaebecaecababedebcdaceeedbbaeeadaecaadbcabacbecaecdeaeaedddeecaceabbcdceecedeacaebaddbaeacbccddcdabdedbeacccbdbabdccebaecaacacaabaeacedaaea\\r\\n\", \"output\": [\"223\"]}, {\"input\": \"500\\r\\nebceccdebaaacaeecbcbaedbeebceaccabacdadbaebcbbdebeeacacdecdceddbbecebcaaeeddeabbbbdceedaebceeeadbdadacdbbddcdaaddeabedccdacdecabcebcdbdaaeeaedbabaeaedaddcdebdbcdebbcbccddbdbbcdedaccbbaedeeedacabbddcdeedbaeabebbdddcceaaacbdbdcbdeeeccadabeadddcebbededdebaaaedabadbabcddebeaeebcebbdddcbacbeeeedacbeaddbccebecdceeabebabbbbbcaaaaeadaaeccaebeedababbabedbdcadeeabaaeddbedddeadecaedbbeccdbcdadededcddceaccceeabadabcebdcbecdebcaaeadbcdbcbdcbbedbecbbccbedabcbedceccdbabdababddeeeaaaabcbdbcedcbbdecaeebedddccbaa\\r\\n\", \"output\": [\"217\"]}, {\"input\": \"500\\r\\ncdeaeeedacbedcbbbcaaeccebccdeeddccdceabbaccbdabdeecccaeebddabbcdbedaababeaddbbecbdeaacebaebbbddeeccdeaedbdebebecccebebacdeadebedbdddcdbceacdedadeddaaaaeaddceaecdbedcdeabcacbaddcaebebdccbdcaacbacabbdabceaacdedacbcdadadeeecbceadaaaeceacadcaebcbaadddadeedbcdebcdcaccbccedcacaebcaccaadedddddaedaddaacecccbeececdeeccaaaebddeecccabbbdcbceeeedaceddaecdadcedacbdaebcbdddcedbdeadddebbaacccbabbcbaebceebacaddecadcdbccdeebabaccdcbababaaedbabbdadebeeacbbccaeabdcdceecbbcaedcadaccdaabdeabbaabebedcacedbeeaabdeeecb\\r\\n\", \"output\": [\"214\"]}, {\"input\": \"500\\r\\nbdeadccaedebabcdeadedebdcacdcaebdeeadedbdccabeaddaaabdaeedbecdcbeacdaceeccdebecabeaedebdadadddccaabddeaddaddedaebccabeccbeeceeaecbaaabccabdccdbeeebcbccebbaeebcdcaabdabcabadbccdcbdebdabbeeeccddaadedddbddeebdacacddcaddccbebbbaeddcecccabcacceadacbdabaddbebbaecebeebabeabaddbbdddbddacaddedbaeaeedcccccbdbcdcadccaadabaacbeaddcabcccacabcdcaabadacdccabcdaceeacbbeeedeacbcaaabeaacaabaccdbddeabdbdabccdceeecbeeeecdddacbbebceaccdbccabebedaeceadaacaebacdaeceeacedbadebeadaaebaebcadcedabecdbedbbadbccabadbbcbcbda\\r\\n\", \"output\": [\"219\"]}, {\"input\": \"500\\r\\nacdccbcdabcabdeaceeacabdebeccabcabcaeaadeaaaaecdeecbaecdeebcaccdacddeabedbddcbbdbabbddaeeddebebdecceeebbcaecadbedbaaccadcacbbcbebceabbddbbccdcdcddebbdbbdebbcbbdadbedebacaecabbbedccebcaecbceadaeabbaeecceacaacbeaebdbaeedabbebbaaadeceabeccccbadcebbeccdeadddedcdeebcaeedddbdcccddbaeabeeacddbdcdbaebeedbdeadbcabaaeabcbeeadcabddeceedaececdadeadabdbabcbbeeaabddcbbdeeeeeacdebdbdcacbcdacdbccbbccdeabecedbadddebbcdccedaebacaedcdbceadbeababbcbdaccdecbbeaeedbdceebadeadbdccaccccdbdcdddaedaababcaeeaddbdbaabeaaaa\\r\\n\", \"output\": [\"217\"]}, {\"input\": \"500\\r\\nebeeeeabaebabbacacccbcddbdadabdaedbecadecacdcdeccabdbbddbccabeccbdebdebedbaedeeaecccdadbcabbcdacadaddacbbbdaaeceaaeabbacdecacbebebbbbededccbdbbeddabcbebdabcccedabdbcccbbeebaecabcacbcdadcbebbadcbeadebccedaceebcebceeaacbbdcdacdcdedaddeedaddedadbccccdddcddccceaabcadecbebdeeeebcbcadedbdddaadcdceceaadeeadddacacaedaebbcbabacabacaaeecaebbabbeaeabecbddaaeaeadccdeebcedbdcaadceaaaaebaaccecccdecdeeccaaeeeccbdcebedbcadabceedbcecbbeacbadcccdaebbdddacaacadcdbaeeecdadbccbebebbaddeecbceebaaacdecabeabdaecaeaceac\\r\\n\", \"output\": [\"215\"]}, {\"input\": \"500\\r\\ncbbbbbdeeaacadcbdcedeacaccbdababbeedcbbddacdaaacbabcedeccddeeecccddaedebcdadaacddeabbdacceedadeedacacecdcceecaaeaecbcaabdabaddabadecebdbddbadacbbcddedddadabbeddedeabdcaabccbbdadddeaecebaaeedbbbebddaecccebebcaebebddadceebedeecbbacadadcccdacecbdcebdcdcaceeedbcdddabdcabdeccadbdddabbbaebbdadadebadbeddeecebeddaaaadbaaebaeaebdaddccddbaddcadaeaacabcdeaddaedddbbacdcbeeaaecbecceadeeacceeaaddaecdadddbbeebeedecbaeacaceacccbdcbcaccaceccadcebacaebccdcacebbedeaaeccaddedccedceeedeecbaccbcebaeacbbcbeedabceaebdc\\r\\n\", \"output\": [\"213\"]}, {\"input\": \"500\\r\\nbbcbdedcadacabdcbacdabcedeebdbdeddedccceedcececcebddeacaeddbaabbaaaedccccabdccbbeacebbdecbdbaecabceedcdecdebbbaecddbbcecbbeaddbcdaddaecddeceeeedbcccedbabbdccbceecbccaebbcccbacdaeeecdedacbacabdceaaabcacceedeadeebbeeceebaeebcaddecccdeedeecaacebddedeeddccacccdaaaebecdbcbdcbaddceacbbedbcabbbedcadadbcbeeecaceddabdabeabbabddcabdecabdeccccaabaeebcddebdcdbdccccdecacaeccccbddcabbbeadccebddbccbcbecbaedabcdcceeabadbcabddecbccbdabbcccdebbaebbebadaceaceaebbbeaabeedeaabbdaadccdabbcbabcdceabdeabdaebbddedecdbcc\\r\\n\", \"output\": [\"216\"]}, {\"input\": \"500\\r\\ncefcddeacbbffacacefaaaceebbcdbafdbcfbcdbffddabfeccaffaaddeecfebebaaaccabedeceddbdebeadfeeecddceedbbebffbbcfcbbefcefafdefbadabafbbddddfcbcdfefeaaeddbbacaeafdeffbabddabdcefbbaadfdabcddfccffbbaacdbddedddeeabfffdafdbdbbcefeeafcaabcfccfccceaaefebcaabddcbaccdaafffccfdcfccdfdeccdcfeaaedbadfbbdedcddfecbdfafddaaecaaadadcdfbefcdffbccfbbcdbedfbfcefadffebbcaebbffccbdbabfcbadacdbebabccbadefdfccfccedcbdeffaaadafdfbadefadaabafceecaaebdeedcebbbacfcceadcfcfaddffcaeafeacebbffddbfddabddeaafdcfdaabacfcdeceeadfacaea\\r\\n\", \"output\": [\"228\"]}, {\"input\": \"500\\r\\nedfeaaaaddffdbfbcebefebdfdadbdadcbbdbdcabfdbdeccaeebcdebdddfedcacbbefeabdbbdeceeacadbbbebffcebbaffdcabcedccddeeccdfbdedfeddcbebdadffbaacbbedbdbfdbcaecccbbcfefdbddabdeadeeeecffdbcfcbeabcdeeaaddeeddeadccdefbeaabfabadaddbfaddbecaaeccbdefececdbebbddffbbfcfdddcadbccedcecabdcfceeefcdbbfcaeccbcdcddbfabcbedfdcdfafabadbbcdcfbfccafafacacbcbfbcabefacedadfdbdbaeeffbcfdbcabdbdedbfcbadfcaafbaeadecdedcddecfdfddaadaebacabafcdcdeecefeddcfcceeddebccafbdbafffbecdbbbaaeebdabddaadadbbdceffdbbefccfbcbcbdaaefcabdebfba\\r\\n\", \"output\": [\"236\"]}, {\"input\": \"500\\r\\ncffaebdcbfbfbacefefbaeedaddacbdcfaeadcadcacaaacaadedebeecaebfdbcffaceadeedddbdfadcebcdffbafefcaecafcafbfccdeefadecfcbafaedbcecdbabdfbbfdeebabdaecbababcebbbdaadffbeffeffcfeefaccdfeafffeaaedfbbdafedecfdefbcaadecbffaadeadfecffaffdeeddbbadeadcfafbceaffabfefcddceeefacaceeffeefbcfcadaeeeabeebfcabbebddcdcedddddbceadbdddfeadafabfebdbcdeedadbbfacaeedefeafedbecbaafecffbaffbbfadfdfcebabddebcedacaaaafdfdefbaafdcfacfbddbfbdefcebdabcfdfaeebcbfbacffabbbbbdbfedebabbedadbaecbedbdeadddcfffaebdececfcbbbbcdecaacddb\\r\\n\", \"output\": [\"238\"]}, {\"input\": \"500\\r\\ncbadfcecebaefcfbfbbaedbcfacdcbfcacfadbebdedaaffaaabffdeedbfbdececccfbaccddeffeeabaaffedfdcdfffdaabbafccaceedacdceabdabcebeddeaeeecbcabddebdfbcbecbffdbbcdaffacdacfbaafbacdbbbdacecabbaffacfbcbacdadafdbebcadeeabcfcfecaefecbbeaafcbaafabbbdbfaeaccedcdcfbbadfeddfcadcdafaeffdcdfceedeaacecaaafffeadcdfffbfedccbaefeebabeafddbddeacefcfbbbceacbcacaecddbcfadcdeafdedadddfefaadfdbbeaaaceacecfefefceeecaefeebfccdcffadbfbeacfbcfeecadcbbebaefaebcecbffaefbbcfacfddbdcdaaeddfdabbefbddcfdeaceafdddffffaffdcdebdacefbdba\\r\\n\", \"output\": [\"235\"]}, {\"input\": \"500\\r\\naaafbfcaaeeeadcaebfffbfdaccaccfceaccaebecbefbbfeafffecaaeeadefcdebddaebcccfffdfacbffeeeacdbbeebdcadceabbccecfcdeebfeafbadaadcaaefcececdedccefcadbdbeaffeebeccabacbeeaacbeefdafeaecedfacadceabaffffdcfbbdfdbbeddddffdfabfecafcefaaaafeacefdfdfccabeecaeeefcecdfdacadbffdcaabdecaededeadbdfeadcaabbfbccbcfeccbecedbcdebbbabebbcfeaaacdaecdafbaacdbfefabebcafedacbbabadaeeaffebcdcabefbfdbbaaddacfafadbecbbcddcafcaefbefeffbbebeaaefcfafffacbdacadbbfadeececcaafcaadacdbfefaddefebaeebefadcdccddaaccebdaafffefeeddbacae\\r\\n\", \"output\": [\"230\"]}, {\"input\": \"500\\r\\ncaebcfbedafeaedbedddbdecfafbbefdddcaedffbbddefacafdcfafddddfdaddddcbbaaddabadedacbbdfeaacabcbdebaadbbcacbcbdbfcfadfcfcfdabefacacdacccbebafdabdfcadcfbfdeacfccfbefebcbcadeccdcefdabcfffdbdaedeaabcdacfbaacfceafeaafcdfadcdfbdfbefdfedacecaaffefbaddbdbbbcaaddbabbeacfabceeaefeebedefbcfadbacdefeabdadcecacceaaaadfaaeaebebbdabbcbfbaddfbfcfddbaaccacabbbbcbbccedcfccffbbcededafcccbceeefcedafdebbbeebaafdbadebdfcfbbbebcbeccaccafbacffdccdcaecebcaadffffabeccfddeffcfedcadcefafcbeabcadabddbfaffbbffaccbafbacadbfbaaf\\r\\n\", \"output\": [\"233\"]}, {\"input\": \"500\\r\\naefceaacfeddedcdedacacfbeeedfabbebbeccadfaabfacceaacdcbdfeeaffebcadeecddeacadfcaffedccabdebccabbdbbbaefbfacecaacdefbddcfcbafeccfbaaadccbbccfbeaaeadebbaaafbebfaaccfbdddeedaaeddbfdadbacafcbfdffcceacceefecbcedacfbffddedcdeacbdbdedbcdcacfcbceddaadcfcdcdcaefbcbbafffccbabfdecaaeceeaaaceedaceeebdebbeaadecfefacaddefbbdaebedbfadeafdeccaeaffedefcebababceccfacceddabcecbebccdcabddfdeefcabdbddcccdbccdacddbbaeaeadcfeccbcaabfcabceadfababecccbbbcddddeabdbbeacdbcdfacaafeedeadcbabbfeffcebfcfaceaecdfddbdbbeeebaebe\\r\\n\", \"output\": [\"228\"]}, {\"input\": \"500\\r\\nabfaaffaaebbefbabfefacdddddafbbabdacebeeccfabcfaebaeabbfabfcceddbdaadeddbffcfedaebecbaccdfbfafabfceffceeaccdfebbdbdafdebfcafebededcfbbaefefcbefdfabdefafeaccdfaeeacdacddccfcfcadbafbdbbdfcfecfeaffdcceccabcfeaddabfbaddebdecdfabebaeefefecedeeadaeedcfabcbcfbfaadaddaabeedfdccbbfeffccfcceddebecabacaedaaceedfddebbeaefbbcfdcdcbdfadadfefcaaffdfeedbcaebccdfecbfccacadccecbdcbdabbeaebdcedfbfaffbccbeaeebacceedceaabebeddbeedbfafeecdfdceebaaecabbefcabbaffdacfcebdbfffeadabddccaebdeffaacfdfcfdffabeefaecafaccabfbd\\r\\n\", \"output\": [\"236\"]}, {\"input\": \"500\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"500\\r\\nzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"500\\r\\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '500\\r\\nedfeaaaaddffdbfbcebefebdfdadbdadcbbdbdcabfdbdeccaeebcdebdddfedcacbbefeabdbbdeceeacadbbbebffcebbaffdcabcedccddeeccdfbdedfeddcbebdadffbaacbbedbdbfdbcaecccbbcfefdbddabdeadeeeecffdbcfcbeabcdeeaaddeeddeadccdefbeaabfabadaddbfaddbecaaeccbdefececdbebbddffbbfcfdddcadbccedcecabdcfceeefcdbbfcaeccbcdcddbfabcbedfdcdfafabadbbcdcfbfccafafacacbcbfbcabefacedadfdbdbaeeffbcfdbcabdbdedbfcbadfcaafbaeadecdedcddecfdfddaadaebacabafcdcdeecefeddcfcceeddebccafbdbafffbecdbbbaaeebdabddaadadbbdceffdbbefccfbcbcbdaaefcabdebfba\\r\\n', 'output': ['236']}, {'input': '5\\r\\nabaca\\r\\n', 'output': ['3']}, {'input': '500\\r\\nghgbegjdahcmgdjgmbaehhgmmlbjgigielfbddkhfbfgbgcmdfekcaeejgidledgcghicgmmblbaljhgggkimcagblckjkimcglahiambbccefkbmlmdgmkglfdmjdflbfdbekmjbghjjikjgkmeigifllmmgijkcclgjkmcahdjgkcekeagklgfhgidbedbgkgkmbjbkbdhiijjbkcdeallkjmjfldamkcmiijmgfkmhkhcgggfbhldjehbmmebkfeibhimddigfbgflifgmcdhmhjcfcmijjeaaegagcikmglclcblacjfclghgfkfaflhggjdmdjlcheehfhekcbdfkihgfjgakjbaihdmkhjfcfhfbeeifaghmmhiijaeglkackhllehlmmjklcelggahhlilgmbemkkjdcmhakbfgjdakhgekhcddmafkidefbffjdcmcidjmllkeedgiikjdlggigchgckdijhjgfmmfekmdcm\\r\\n', 'output': ['303']}, {'input': '500\\r\\njqpyiogllhoobjixnlhskgwowfrhkuotvjbmgatrspqreavqwsuljxqduutxudueenmvarsmqqaqxohtsmxdqdhcvydhuiqcchvvxroqieeffipvlumywcthdafsgnwyamumpknqittxakhlbrbhrtcfbrkvjrypxqochjnmyihuqtrrbgiiytifqeqbnssrmywtdghpekqjxkvoefiwpbepqstotqyiohuawpvawephiexxnofiipkwmshhyaprhrryspbvfoasagdldqeasajhqsurmduuusiwgyuroimbyfjogkxcgjorxpqblhtwvlgognnvisqdkheurkikjcgmoyvafiqhfcbmgmybefsmkroftstqmhkfkuxufghjhveuhhkecushenjqyvqhxcfqdcbkxufhxpbamaowjnuaxjcsuuryvjtnwrhwiurrsehusxwrjwsotefacjxjanphxngylkmjbvhfqghtlnlvdbcnkfjd\\r\\n', 'output': ['350']}, {'input': '500\\r\\nkjcllbkmamlbogkopfqhjfpejfeglpbdqjikbgakecolabphkmpnjfbhpdnlcqcfdaljmegiljlqpkdnomcglpkbaiencimbkehpiqmpafeabbohfajahfablplcpacngfpghjdhbonglhaedpihkbjbkcpjdkqkpdobjfqepolgdgjonaogkingfmacbflbmjhhjbnnffbmcohgmmfbjqojnocjlfhlhflpkddmiijomenhldcoijnqcomjnbbpnffkgelnigkcmnaqdnkpmoejllkilfdlqoqcbmbqdaobndpgjkffebhgmfclhncalfeamiqhclllpoefaaobhqfnljloimkdoaggjammqliommkllnhhqoagcpmlkddkclokjlccgfapodfolmfejdkofqncjkjhqcledaplificibodhddlhmqqckjenpjalokpllnldqppjceelgjbjqqqlcecjcjmkiklbbdikblddkikpfea\\r\\n', 'output': ['325']}]","human_sample_testcases_2":"[{'input': '500\\r\\nacdccbcdabcabdeaceeacabdebeccabcabcaeaadeaaaaecdeecbaecdeebcaccdacddeabedbddcbbdbabbddaeeddebebdecceeebbcaecadbedbaaccadcacbbcbebceabbddbbccdcdcddebbdbbdebbcbbdadbedebacaecabbbedccebcaecbceadaeabbaeecceacaacbeaebdbaeedabbebbaaadeceabeccccbadcebbeccdeadddedcdeebcaeedddbdcccddbaeabeeacddbdcdbaebeedbdeadbcabaaeabcbeeadcabddeceedaececdadeadabdbabcbbeeaabddcbbdeeeeeacdebdbdcacbcdacdbccbbccdeabecedbadddebbcdccedaebacaedcdbceadbeababbcbdaccdecbbeaeedbdceebadeadbdccaccccdbdcdddaedaababcaeeaddbdbaabeaaaa\\r\\n', 'output': ['217']}, {'input': '500\\r\\ncachgdaghedbbfbcbicbabfcahhbeaafeaafgcaafcabeabccbbbjhjbjcabcfdcbjedeaijeebcabbfaiicebgfbchcaeachceigihhbifcdgdfhdjabjajfhhfajddghebbdiegadfahdahddfdeaagjfgafhjhfbeehbgahgeefggdgdcfcifagibijcgifehjccfggajjfajecbffdedfhgebfefibeiceigcddfjhgcghbbhjbhficggfighjdijjefcjchdihgfdcjgeeeiicihfdhbibijhgjdgdhcafdaafbfgjgcggidgebchbejiidjgbfcbcjejgfgeiaaebeajhdaijhgbebeefchahbbgcgegieagcdahgdfbidehbfafbigadjdedhdhaegbbcgifeahgchiafffjgfgaajjhedbiffbbjdijehdfiegiabeadfcifcbjjhidiieebaiffdjfhfidffgfchchegjed\\r\\n', 'output': ['281']}, {'input': '500\\r\\nccadaaddabcadcccbbbcbdaacabcbbcdacaababdbbdccdcacccbbccccadcdcddaccbaaababbacadcabaacbccaabbbdbcbcbbacaaaaababcddadcbddcccbabdabdabbbacbccaccacdacadbbbbcaccccbdcccaabbcaacbcdddcdcdcbbdabadbadadcacdbbbaaaadbcbbabdabcbcbddaccabdadabdbbabcbdcdbdccababcbadbdcaacbddabdadcdbddbdcdabddbdaccadacabddccbbdcbacdbbcbcbdbabbcbadddacddcddccaaaaacabccccccbdbdccacdcaaaababccbbddbbaadacdcbbbadccaacaaccaabbcbabdcdccdcbbbbcdaccbbdccabcbdbacadcbdcdcccdaaccdddbbbcbadcccbacadadaddaabdbacbcdbaadbaaabdcbcdddbcdbdbacdcb\\r\\n', 'output': ['193']}, {'input': '500\\r\\nbdeadccaedebabcdeadedebdcacdcaebdeeadedbdccabeaddaaabdaeedbecdcbeacdaceeccdebecabeaedebdadadddccaabddeaddaddedaebccabeccbeeceeaecbaaabccabdccdbeeebcbccebbaeebcdcaabdabcabadbccdcbdebdabbeeeccddaadedddbddeebdacacddcaddccbebbbaeddcecccabcacceadacbdabaddbebbaecebeebabeabaddbbdddbddacaddedbaeaeedcccccbdbcdcadccaadabaacbeaddcabcccacabcdcaabadacdccabcdaceeacbbeeedeacbcaaabeaacaabaccdbddeabdbdabccdceeecbeeeecdddacbbebceaccdbccabebedaeceadaacaebacdaeceeacedbadebeadaaebaebcadcedabecdbedbbadbccabadbbcbcbda\\r\\n', 'output': ['219']}, {'input': '500\\r\\nahecidbhaccbabcggeceaebgcbaeagehfhgiebafdcgiiehegggcdfbdccicbfficggabdhfihheadafdcccbbgbgfgehchdbihdidddagdafigbbbhgaiagiacbhhegdgchcfiabbiidhhfbabdfehcifgegieihfibheedfbiadbfdafdgbehfeifgcfhieiaheebeiiabggbecedchhicfeccfadhbfgahefdchibaecbifeadfdadfefifeibcbbibibbcchadbbbedcbgeiefdhedddedhfeecfafggghdffbcgigigeeieeafgciececicgeegafbcdahighgahgdeahfhfebegebfedfdfadiafdcdebgeacedeiecdcaghibhedaaecdaahdaecdbahcfchebiafcfhacabcgbaadibgfgbdcebifdafbgabageebfeebefhffdcdgehgfchiabfabcbefhccehffibaeiac\\r\\n', 'output': ['273']}]","human_sample_testcases_3":"[{'input': '500\\r\\nebeeeeabaebabbacacccbcddbdadabdaedbecadecacdcdeccabdbbddbccabeccbdebdebedbaedeeaecccdadbcabbcdacadaddacbbbdaaeceaaeabbacdecacbebebbbbededccbdbbeddabcbebdabcccedabdbcccbbeebaecabcacbcdadcbebbadcbeadebccedaceebcebceeaacbbdcdacdcdedaddeedaddedadbccccdddcddccceaabcadecbebdeeeebcbcadedbdddaadcdceceaadeeadddacacaedaebbcbabacabacaaeecaebbabbeaeabecbddaaeaeadccdeebcedbdcaadceaaaaebaaccecccdecdeeccaaeeeccbdcebedbcadabceedbcecbbeacbadcccdaebbdddacaacadcdbaeeecdadbccbebebbaddeecbceebaaacdecabeabdaecaeaceac\\r\\n', 'output': ['215']}, {'input': '500\\r\\nedfeaaaaddffdbfbcebefebdfdadbdadcbbdbdcabfdbdeccaeebcdebdddfedcacbbefeabdbbdeceeacadbbbebffcebbaffdcabcedccddeeccdfbdedfeddcbebdadffbaacbbedbdbfdbcaecccbbcfefdbddabdeadeeeecffdbcfcbeabcdeeaaddeeddeadccdefbeaabfabadaddbfaddbecaaeccbdefececdbebbddffbbfcfdddcadbccedcecabdcfceeefcdbbfcaeccbcdcddbfabcbedfdcdfafabadbbcdcfbfccafafacacbcbfbcabefacedadfdbdbaeeffbcfdbcabdbdedbfcbadfcaafbaeadecdedcddecfdfddaadaebacabafcdcdeecefeddcfcceeddebccafbdbafffbecdbbbaaeebdabddaadadbbdceffdbbefccfbcbcbdaaefcabdebfba\\r\\n', 'output': ['236']}, {'input': '500\\r\\nraqqhocfiosbkfjtbjnbatojfmummlrghpkmcghfagdmmkbesdhtelromtkmdmltiljttepgeqdlhtgkpgljrmqjjtmretsdincjjqilahapcjcdlkrftoaeramgrudjbtpjblaksjjjburngarjitmebjiotofctgppktkqkianmucafsspbefuijcmsqamuenlrfrunfhgfqjhkjgrdjrkjgbpifadsjabktgdsgjsslipnqncbdfaphfndssljbthhcrfoijilodnuosmirctsjbhtlbehnljqcjdahcmjqsursqemcmtbgdaegdugqskskfdcffuilthtnjfhujgpifckubajoorllaruqfmbgrcutjushbflsqeiqdddenhurmunhsqqnbsfnjhgdodhmdugisalahiiedmhcgudjfhuumtlndkneauikebmgnrbdmegeotncdllcmmqfudldikeasisllapabefdubasndtobm\\r\\n', 'output': ['339']}, {'input': '500\\r\\ncccaaccbcacbacccbcccbcabcccaaaaaabbccbbbacbacaaacbbcbbacaacbabababcaaacbcacacbacccccccbcccaaabbabccbccbcaabbcaccbbbbbccabcacccabbcbcacbcabaccabcbacacbbbcbaabacbcbbbbbabcbcabbccbbabbbbaccacaacabcacbacaaacacbbbccbcbaccaabbbcbcacbaaacaccaaabccbbabbaaabbbabacbaccaabbbaaacbacaabbaaaacccabbabbbcbcacbcccbbacaccacbcccacabbaabbbaaabbcbacaaaabbcccbacbbbaacacccccbccabbbaababbacccabaaabccbbccbbbbccacbccbcbbbcacaabacbcabaaababbaacaccbbbacbcabbbcacbaccacbcabbbcccbabbabbcaacbcbcaabaaaccacababbbaacacbbbcbabbcac\\r\\n', 'output': ['164']}, {'input': '500\\r\\ndadcbaaaabbddbbacdbabdcbcdcabacbddddbaabacbcabdccdcdadcbabdbcabcccbdcabdcaacdbabdcbbbdbacdddaaddccbacabbdbbcbbcadcdaadcababbbacabcdbbbadbdacbcddbccdbacbddbdababdcadbbabccbcdcccccadbbdbdbdcbcbdcddaacdababdddacadaddcdcbaabaddaadacbaadcdcacbdcbaddddbdbddacaadaaaaabdccccbccbcabddbbcaacadccdbcccdcdbbabbcbabdbccdcdbcbbadaaadddcbcbbbabbadcddbaaabbbdabbcbcacbbaaaddbcbaccaaadcdbcdbbbbbcdbbbcdadacdbcbbaaddbdabcbccabbadadbbbbdccacbbbacacadbcaadbccdbadacdaddacddcccbcbdbdbcbdbdaabdcdabbaadcdccdbdcccadabdbddd\\r\\n', 'output': ['196']}]","human_sample_testcases_4":"[{'input': '500\\r\\ncdbdadbdcabdcbdbaadacaacbbbbcdaccddbdbbdabccacbaacdbbdcbddadabaaccbabccabadddbdcdcdddbbcbadddcabcddcdbabacacbdbcaadacbbbdccbcabacdbcccbdccbaacddaaaabdacbdccbbbbcaabbbdabadadacabdbbaaacadcbaacadadbbdbcdabcdabccacbdcaadaccdbdcaccaaddacddccdadddddddbacaccdbbbbcbbabbdcacbcaacaabdddbdccdaddcddbbaabaabdbcccadcacbdacabcdaddaabcbcaadabadbdaacacacaaddbbbcabccdbbcbaccbadcddaaccdbacaabbcdbcbdbcbacacdccccabaaabbcbccdcaabcadcaccadbbbcccabbbcdbaccaabdcbcdbcdcaddaabcdacaddcccaddabcbabdcabbdbaaaccbbabcdaddbbccd\\r\\n', 'output': ['194']}, {'input': '500\\r\\nlkuvqevrlanaugfoadmkdqpljknwfoftofyxcvsfvprqxuwkfwunfilaqrzqhsjhsaoynbsuiqyzwqfkmbddngwydhrtimoerqpehjsgqojuhtxvaayzsbxmsqckibtcangzdnnpcpqkqgzbzbeaejuhprrqxdhyfrtzwhvnnrfocwrwfzbgtvdpwlkrqisjqpszykzhfjrstcvmmnebwgvwxsppyxihkepmndwgtzlsurasjfrkqqnxjqdsbmsggakyuouevxdxuwyxbhkmvpjqvoklaknxsmzqpjrftvzifnqjporbvtpdnzfhckjnwgeddpjycnqrtphjhqkfvpoerzkilpjuteidflpulppotglglarrwopryxbjjsroguskwzalrmasgcioovteyuukwnosswdwnqmrbdkssgnkaivtufoayaxgqpprnoyvoeqqpywboofudtutiweaaqzbneqmxgnfkxdnjdbijlveapyrybiw\\r\\n', 'output': ['358']}, {'input': '500\\r\\nedfeaaaaddffdbfbcebefebdfdadbdadcbbdbdcabfdbdeccaeebcdebdddfedcacbbefeabdbbdeceeacadbbbebffcebbaffdcabcedccddeeccdfbdedfeddcbebdadffbaacbbedbdbfdbcaecccbbcfefdbddabdeadeeeecffdbcfcbeabcdeeaaddeeddeadccdefbeaabfabadaddbfaddbecaaeccbdefececdbebbddffbbfcfdddcadbccedcecabdcfceeefcdbbfcaeccbcdcddbfabcbedfdcdfafabadbbcdcfbfccafafacacbcbfbcabefacedadfdbdbaeeffbcfdbcabdbdedbfcbadfcaafbaeadecdedcddecfdfddaadaebacabafcdcdeecefeddcfcceeddebccafbdbafffbecdbbbaaeebdabddaadadbbdceffdbbefccfbcbcbdaaefcabdebfba\\r\\n', 'output': ['236']}, {'input': '500\\r\\ncachgdaghedbbfbcbicbabfcahhbeaafeaafgcaafcabeabccbbbjhjbjcabcfdcbjedeaijeebcabbfaiicebgfbchcaeachceigihhbifcdgdfhdjabjajfhhfajddghebbdiegadfahdahddfdeaagjfgafhjhfbeehbgahgeefggdgdcfcifagibijcgifehjccfggajjfajecbffdedfhgebfefibeiceigcddfjhgcghbbhjbhficggfighjdijjefcjchdihgfdcjgeeeiicihfdhbibijhgjdgdhcafdaafbfgjgcggidgebchbejiidjgbfcbcjejgfgeiaaebeajhdaijhgbebeefchahbbgcgegieagcdahgdfbidehbfafbigadjdedhdhaegbbcgifeahgchiafffjgfgaajjhedbiffbbjdijehdfiegiabeadfcifcbjjhidiieebaiffdjfhfidffgfchchegjed\\r\\n', 'output': ['281']}, {'input': '500\\r\\ncbdcdcbdbcdbbcbdbddadbadddcdacdadbcaaaaddcadabdbabbcbbcccbbbbdbbccdcdcccdcdccaacaabacbdddddaaabaaacbbabdbcaacdabdaddacbdccddbbacabaaadddcdddadbdadacbccdabccadaacdadcbdaadacacbcdddbadcaddcbcbddcbcccacbbaacdcdbbdbbbadbbdbbbdacbddcbaccaccbaddaaaabbcdccccadcdcccbcbdbdcdcbddbacacbddbaacbaaabbbaccadcbbbacbacddbcbdbbcbcdbcdbbcdbcbdcdddbcbbbdbcabbdaaacdbdcdbccddbdababadddcdcabcbcbcccbcccdcaccacaddcabadacabbddaaabbdbdacccacabcaccddbbbcabcdaabdbddaaadbddccacbbcbccdccaaccbacacbcdbbcbccadcdabdbadbcabccddaba\\r\\n', 'output': ['195']}]","human_sample_testcases_5":"[{'input': '500\\r\\nabccacbaabaabaaccaaaacacbbcbccaababacbbbccbbcbcccabbccacbacbbacabbcbccccbcbbaccbcaacbacbbaaababccaccbcacaccccabbcbcbaacccbccabccaacccccccccbcabaacaaabccaaaabcccbcbbaabccabbbaaccbbcccbcccbabacbcabbbbccaaacaabcbabbbacacacbcaabbbacaaaaaaacbcabbcaccbcbaabacccacccabbbcbcbacccabcabbaabaacbcbaacbbccccbbbccaabcbcbbbccccccbbabcbabbacbaabaccabcabcabcbbabccacbbaacbcccbaaabacaaacaccbccbccaccccaccbbaabbaabbbccccbbcababcaaaaacbaabcaaccacbbabbbbcabbbbabbabbcaaabccacbcaccbbcabbaaababaaaccbbcccababacaabbccacccab\\r\\n', 'output': ['161']}, {'input': '500\\r\\nccbbbbaabaabccaabcaaccaabbaaaaaaaabaacccbcbccbccbbaabcbbbaacbbbacbccabbabacbcccbbaabbaaccbaacbcbcbabccbacbccccccbcbcbaaaaacabaabbbacabaababbbccaababbacbcbbacbbbbccbacaaccaaccbccbaacbcaaaaabacabbaaabcccaaacccabababbcbacaababcaabbcbacaabbcccccbccbaacacbcabaacbbababacabbcccbccccaababacbcbbaabaabcbaacaccbaacbbcbcbacbbbbabbcbbccabaabbaaabccabbbbbbaaabbbaabcabbbbbbcaaaabcbcbbcbbbbbbcabaababcabbabcacbaccaacacabbbbbcbaccacbbbcaacbbacccaabaababcbbacccababaabcabbccbbbabbaabacabcbabcaabcaacabcaaccacbcbbcaa\\r\\n', 'output': ['161']}, {'input': '500\\r\\nlkuvqevrlanaugfoadmkdqpljknwfoftofyxcvsfvprqxuwkfwunfilaqrzqhsjhsaoynbsuiqyzwqfkmbddngwydhrtimoerqpehjsgqojuhtxvaayzsbxmsqckibtcangzdnnpcpqkqgzbzbeaejuhprrqxdhyfrtzwhvnnrfocwrwfzbgtvdpwlkrqisjqpszykzhfjrstcvmmnebwgvwxsppyxihkepmndwgtzlsurasjfrkqqnxjqdsbmsggakyuouevxdxuwyxbhkmvpjqvoklaknxsmzqpjrftvzifnqjporbvtpdnzfhckjnwgeddpjycnqrtphjhqkfvpoerzkilpjuteidflpulppotglglarrwopryxbjjsroguskwzalrmasgcioovteyuukwnosswdwnqmrbdkssgnkaivtufoayaxgqpprnoyvoeqqpywboofudtutiweaaqzbneqmxgnfkxdnjdbijlveapyrybiw\\r\\n', 'output': ['358']}, {'input': '500\\r\\ndbcbdhbacghbacfeaecddchgffchhbhheacheagadabedhfcgfbgfahgebdgdecfgeaggebahhbhaaeagdhbadegebdfbededdffdfcbebhchgahafdegbbhhgaecadcdhaecbbceaefbadgedfhgfdaeheeeabbehbeddhdgdhbegefdffdbeebdegdbefbadbehacecdaedbeeedehfhddeggdafaagehefcefbghadhbehgbdehaeaeeecbbagbdefafhcgffgcfeefehgddgggbegcaabcfehcdbfcbbccheeafebdfageefeafafhffdaadcddgbfaegafbhafdbhfgebaaebegcddgcadddfgfcddggbdffffhghcbghbhdcebeacagbdfadhdbghaeacadbccbbebhfeeaghgebghbabbfhcdfagccaadhhgdeechghceefaaeacheedhbdaedcffhcgfeagdgfdchghbbfbf\\r\\n', 'output': ['261']}, {'input': '500\\r\\ncaadabddbaacdabdbadcadcadbdcdaadaaabcdbabcadcbaaadcadacbabcddacaabcadcabaabdddbcbcadbbbdabdabacbccddcbcdacbacbadabdcbccacbcbcabdcdbcdacadaacaabbbabbddbcccdcbabbbbcbcaacbdadacbdbabbabcaacdacbadcccbadaaabdbcbdbdadbddcdbdbcbccbbadbaaddcaaddadaaaabababdbbaddbadddbcaabcadbcacccadbdaaabcdcdbddcbbbdadaadbddddbdbacbccdaaabbdccaabcbbbaadaccdcbccdcabdccccabbbbadddccadddcbdddaddbdcaccbaadadbbdcaabdcdaacadddadbbbdadcdcdcbbabdcdbdbdddababaaabcdcbdccabbcaabbccadcdbdbbcdbbaabadacdaccaabbdabdcdbabcdbcbdacdbdcbc\\r\\n', 'output': ['204']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":230,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 0 6 0 6 6 0 6\\n1 3 3 5 5 3 3 1\", \"0 0 6 0 6 6 0 6\\n7 3 9 5 11 3 9 1\", \"6 0 6 6 0 6 0 0\\n7 4 4 7 7 10 10 7\"]","input_specification":"The input data consists of two lines, one for each square, both containing 4 pairs of integers. Each pair represents coordinates of one vertex of the square. Coordinates within each line are either in clockwise or counterclockwise order. The first line contains the coordinates of the square with sides parallel to the coordinate axes, the second line contains the coordinates of the square at 45 degrees. All the values are integer and between $$$-100$$$ and $$$100$$$.","src_uid":"f6a3dd8b3bab58ff66055c61ddfdf06a","source_code":"\nimport java.awt.Polygon;\nimport java.awt.geom.Line2D;\nimport java.util.Scanner;\npublic class Squares {\n\n\tpublic static void main(String[] args) {\n\t\t\/\/ TODO Auto-generated method stub\nScanner in=new Scanner(System.in);\nint x1[]=new int[4];\nint x2[]=new int[4];\nint y1[]=new int[4];\nint y2[]=new int[4];boolean t=false;\nfor(int i=0;i<4;i++)\n{\n\tx1[i]=in.nextInt();\n\ty1[i]=in.nextInt();\n}\nfor(int i=0;i<4;i++)\n{\n\tx2[i]=in.nextInt();\n\ty2[i]=in.nextInt();\n}\nPolygon P=new Polygon(x1,y1,4);\nPolygon Q=new Polygon(x2,y2,4);\nLine2D a[]=new Line2D[4];\nLine2D b[]=new Line2D[4];\n\nfor(int i=0;i<4;i++)\n{\n\ta[i]=new Line2D.Double(x1[i],y1[i],x1[(i+1)%4],y1[(i+1)%4]);\n\tb[i]=new Line2D.Double(x2[i],y2[i],x2[(i+1)%4],y2[(i+1)%4]);\n}\n\nfor(int i=0;i<4;i++)\n{\n\tfor(int j=0;j<4;j++)\n\t{\n\t\tif(a[i].intersectsLine(b[j]))\n\t\t\t{t=true;break;}\n\t}\n\tif(t)\n\t\tbreak;\n}\nif(t==false)\nfor(int i=0;i<4;i++)\n{\n\tif(P.contains(x2[i],y2[i]))\n\t{t=true;break;}\n\tif(Q.contains(x1[i],y1[i]))\n\t{t=true;break;}\n}\nif(t)\n\tSystem.out.println(\"YES\");\nelse\n\tSystem.out.println(\"NO\");\nin.close();\n\t}\n\n}\n","sample_outputs":"[\"YES\", \"NO\", \"YES\"]","lang_cluster":"Java","notes":"NoteIn the first example the second square lies entirely within the first square, so they do intersect.In the second sample squares do not have any points in common.Here are images corresponding to the samples: ","output_specification":"Print \"Yes\" if squares intersect, otherwise print \"No\". You can print each letter in any case (upper or lower).","description":"You are given two squares, one with sides parallel to the coordinate axes, and another one with sides at 45 degrees to the coordinate axes. Find whether the two squares intersect.The interior of the square is considered to be part of the square, i.e. if one square is completely inside another, they intersect. If the two squares only share one common point, they are also considered to intersect.","human_testcases":"[{\"input\": \"0 0 6 0 6 6 0 6\\r\\n1 3 3 5 5 3 3 1\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"0 0 6 0 6 6 0 6\\r\\n7 3 9 5 11 3 9 1\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"6 0 6 6 0 6 0 0\\r\\n7 4 4 7 7 10 10 7\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"0 0 6 0 6 6 0 6\\r\\n8 4 4 8 8 12 12 8\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"2 2 4 2 4 4 2 4\\r\\n0 3 3 6 6 3 3 0\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-5 -5 5 -5 5 5 -5 5\\r\\n-5 7 0 2 5 7 0 12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-5 -5 5 -5 5 5 -5 5\\r\\n-5 12 0 7 5 12 0 17\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-5 -5 5 -5 5 5 -5 5\\r\\n6 0 0 6 -6 0 0 -6\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-100 -100 100 -100 100 100 -100 100\\r\\n-100 0 0 -100 100 0 0 100\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"92 1 92 98 -5 98 -5 1\\r\\n44 60 56 48 44 36 32 48\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-12 -54 -12 33 -99 33 -99 -54\\r\\n-77 -40 -86 -31 -77 -22 -68 -31\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 45 19 45 19 61 3 61\\r\\n-29 45 -13 29 3 45 -13 61\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"79 -19 79 15 45 15 45 -19\\r\\n-1 24 -29 52 -1 80 27 52\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"75 -57 75 -21 39 -21 39 -57\\r\\n10 -42 -32 0 10 42 52 0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-11 53 9 53 9 73 -11 73\\r\\n-10 9 -43 42 -10 75 23 42\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-10 -36 -10 27 -73 27 -73 -36\\r\\n44 -28 71 -55 44 -82 17 -55\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-63 -15 6 -15 6 54 -63 54\\r\\n15 -13 -8 10 15 33 38 10\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"47 15 51 15 51 19 47 19\\r\\n19 0 -27 46 19 92 65 46\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"87 -5 87 79 3 79 3 -5\\r\\n36 36 78 -6 36 -48 -6 -6\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-4 56 10 56 10 70 -4 70\\r\\n-11 47 -35 71 -11 95 13 71\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-41 6 -41 8 -43 8 -43 6\\r\\n-7 27 43 -23 -7 -73 -57 -23\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"44 -58 44 7 -21 7 -21 -58\\r\\n22 19 47 -6 22 -31 -3 -6\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-37 -63 49 -63 49 23 -37 23\\r\\n-52 68 -21 37 -52 6 -83 37\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"93 20 93 55 58 55 58 20\\r\\n61 -17 39 5 61 27 83 5\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-7 4 -7 58 -61 58 -61 4\\r\\n-28 45 -17 34 -28 23 -39 34\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"24 -79 87 -79 87 -16 24 -16\\r\\n-59 21 -85 47 -59 73 -33 47\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-68 -15 6 -15 6 59 -68 59\\r\\n48 -18 57 -27 48 -36 39 -27\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"25 1 25 91 -65 91 -65 1\\r\\n24 3 15 12 24 21 33 12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"55 24 73 24 73 42 55 42\\r\\n49 17 10 56 49 95 88 56\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"69 -65 69 -28 32 -28 32 -65\\r\\n-1 50 43 6 -1 -38 -45 6\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"86 -26 86 18 42 18 42 -26\\r\\n3 -22 -40 21 3 64 46 21\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"52 -47 52 -30 35 -30 35 -47\\r\\n49 -22 64 -37 49 -52 34 -37\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"27 -59 27 9 -41 9 -41 -59\\r\\n-10 -17 2 -29 -10 -41 -22 -29\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-90 2 0 2 0 92 -90 92\\r\\n-66 31 -86 51 -66 71 -46 51\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-93 -86 -85 -86 -85 -78 -93 -78\\r\\n-13 61 0 48 -13 35 -26 48\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-3 -45 85 -45 85 43 -3 43\\r\\n-22 0 -66 44 -22 88 22 44\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-27 -73 72 -73 72 26 -27 26\\r\\n58 11 100 -31 58 -73 16 -31\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-40 -31 8 -31 8 17 -40 17\\r\\n0 18 -35 53 0 88 35 53\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-15 -63 -15 7 -85 7 -85 -63\\r\\n-35 -40 -33 -42 -35 -44 -37 -42\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-100 -100 -100 100 100 100 100 -100\\r\\n-100 0 0 100 100 0 0 -100\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"67 33 67 67 33 67 33 33\\r\\n43 11 9 45 43 79 77 45\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"14 8 9 8 9 3 14 3\\r\\n-2 -13 14 3 30 -13 14 -29\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"4 3 7 3 7 6 4 6\\r\\n7 29 20 16 7 3 -6 16\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"14 30 3 30 3 19 14 19\\r\\n19 -13 11 -5 19 3 27 -5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-54 3 -50 3 -50 -1 -54 -1\\r\\n3 -50 -6 -41 -15 -50 -6 -59\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 8 3 -10 21 -10 21 8\\r\\n-9 2 -21 -10 -9 -22 3 -10\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-35 3 -21 3 -21 -11 -35 -11\\r\\n-8 -10 3 -21 -8 -32 -19 -21\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-5 -23 -5 -31 3 -31 3 -23\\r\\n-7 -23 -2 -28 3 -23 -2 -18\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 20 10 20 10 13 3 13\\r\\n3 20 21 38 39 20 21 2\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"25 3 16 3 16 12 25 12\\r\\n21 -2 16 -7 11 -2 16 3\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-1 18 -1 3 14 3 14 18\\r\\n14 3 19 8 14 13 9 8\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-44 -17 -64 -17 -64 3 -44 3\\r\\n-56 15 -44 27 -32 15 -44 3\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"17 3 2 3 2 18 17 18\\r\\n22 23 2 3 -18 23 2 43\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 -22 3 -36 -11 -36 -11 -22\\r\\n11 -44 19 -36 11 -28 3 -36\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 45 3 48 0 48 0 45\\r\\n13 38 4 47 13 56 22 47\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 -10 2 -10 2 -9 3 -9\\r\\n38 -10 20 -28 2 -10 20 8\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-66 3 -47 3 -47 22 -66 22\\r\\n-52 -2 -45 5 -52 12 -59 5\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 37 -1 37 -1 41 3 41\\r\\n6 31 9 34 6 37 3 34\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"13 1 15 1 15 3 13 3\\r\\n13 19 21 11 13 3 5 11\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"20 8 3 8 3 -9 20 -9\\r\\n2 -11 3 -10 2 -9 1 -10\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 41 3 21 -17 21 -17 41\\r\\n26 12 10 28 26 44 42 28\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"11 11 11 3 3 3 3 11\\r\\n-12 26 -27 11 -12 -4 3 11\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-29 3 -29 12 -38 12 -38 3\\r\\n-35 9 -29 15 -23 9 -29 3\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 -32 1 -32 1 -30 3 -30\\r\\n4 -32 -16 -52 -36 -32 -16 -12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-16 -10 -16 9 3 9 3 -10\\r\\n-8 -1 2 9 12 -1 2 -11\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 -42 -5 -42 -5 -34 3 -34\\r\\n-8 -54 -19 -43 -8 -32 3 -43\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-47 3 -37 3 -37 -7 -47 -7\\r\\n-37 3 -33 -1 -37 -5 -41 -1\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"10 3 12 3 12 5 10 5\\r\\n12 4 20 12 12 20 4 12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 -41 -9 -41 -9 -53 3 -53\\r\\n18 -16 38 -36 18 -56 -2 -36\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 40 2 40 2 41 3 41\\r\\n22 39 13 48 4 39 13 30\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"21 26 21 44 3 44 3 26\\r\\n-20 38 -32 26 -20 14 -8 26\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 7 3 7 3 10 0 10\\r\\n3 9 -17 29 -37 9 -17 -11\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 21 3 18 6 18 6 21\\r\\n-27 18 -11 2 5 18 -11 34\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-29 13 -39 13 -39 3 -29 3\\r\\n-36 -4 -50 -18 -36 -32 -22 -18\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 -26 -2 -26 -2 -21 3 -21\\r\\n-5 -37 -16 -26 -5 -15 6 -26\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 9 -1 9 -1 13 3 13\\r\\n-9 17 -1 9 -9 1 -17 9\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"48 8 43 8 43 3 48 3\\r\\n31 -4 43 8 55 -4 43 -16\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-3 1 3 1 3 -5 -3 -5\\r\\n20 -22 3 -5 20 12 37 -5\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"14 3 14 -16 -5 -16 -5 3\\r\\n14 2 15 1 14 0 13 1\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-10 12 -10 -1 3 -1 3 12\\r\\n1 10 -2 7 -5 10 -2 13\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"39 21 21 21 21 3 39 3\\r\\n27 3 47 -17 27 -37 7 -17\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 1 3 17 -13 17 -13 1\\r\\n17 20 10 27 3 20 10 13\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"15 -18 3 -18 3 -6 15 -6\\r\\n29 -1 16 -14 3 -1 16 12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"41 -6 41 3 32 3 32 -6\\r\\n33 3 35 5 33 7 31 5\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"7 35 3 35 3 39 7 39\\r\\n23 15 3 35 23 55 43 35\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"19 19 35 19 35 3 19 3\\r\\n25 -9 16 -18 7 -9 16 0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-20 3 -20 9 -26 9 -26 3\\r\\n-19 4 -21 2 -19 0 -17 2\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"13 3 22 3 22 -6 13 -6\\r\\n26 3 22 -1 18 3 22 7\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-4 -8 -4 -15 3 -15 3 -8\\r\\n-10 5 -27 -12 -10 -29 7 -12\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 15 7 15 7 19 3 19\\r\\n-12 30 -23 19 -12 8 -1 19\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-12 3 5 3 5 -14 -12 -14\\r\\n-14 22 5 3 24 22 5 41\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-37 3 -17 3 -17 -17 -37 -17\\r\\n-9 -41 9 -23 -9 -5 -27 -23\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 57 3 45 -9 45 -9 57\\r\\n8 50 21 37 8 24 -5 37\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"42 3 42 -6 33 -6 33 3\\r\\n42 4 41 3 40 4 41 5\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 59 3 45 -11 45 -11 59\\r\\n-2 50 -8 44 -2 38 4 44\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-51 3 -39 3 -39 15 -51 15\\r\\n-39 14 -53 0 -39 -14 -25 0\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-7 -15 -7 3 11 3 11 -15\\r\\n15 -1 22 -8 15 -15 8 -8\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"3 -39 14 -39 14 -50 3 -50\\r\\n17 -39 5 -27 -7 -39 5 -51\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"91 -27 91 29 35 29 35 -27\\r\\n59 39 95 3 59 -33 23 3\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-81 -60 -31 -60 -31 -10 -81 -10\\r\\n-58 -68 -95 -31 -58 6 -21 -31\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"78 -59 78 -2 21 -2 21 -59\\r\\n48 1 86 -37 48 -75 10 -37\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-38 -26 32 -26 32 44 -38 44\\r\\n2 -27 -44 19 2 65 48 19\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"73 -54 73 -4 23 -4 23 -54\\r\\n47 1 77 -29 47 -59 17 -29\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-6 -25 46 -25 46 27 -6 27\\r\\n21 -43 -21 -1 21 41 63 -1\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-17 -91 -17 -27 -81 -27 -81 -91\\r\\n-48 -21 -12 -57 -48 -93 -84 -57\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-7 16 43 16 43 66 -7 66\\r\\n18 -7 -27 38 18 83 63 38\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-46 11 16 11 16 73 -46 73\\r\\n-18 -8 -67 41 -18 90 31 41\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-33 -64 25 -64 25 -6 -33 -6\\r\\n-5 -74 -51 -28 -5 18 41 -28\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"99 -100 100 -100 100 -99 99 -99\\r\\n99 -99 100 -98 99 -97 98 -98\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"-100 -100 -100 -99 -99 -99 -99 -100\\r\\n-10 -10 -9 -9 -10 -8 -11 -9\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"-4 3 -3 3 -3 4 -4 4\\r\\n0 -4 4 0 0 4 -4 0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 10 0 10 10 0 10\\r\\n11 9 13 7 15 9 13 11\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"1 1 1 6 6 6 6 1\\r\\n5 8 8 11 11 8 8 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"99 99 99 100 100 100 100 99\\r\\n-100 0 0 100 100 0 0 -100\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 0 2 2 2 2 0\\r\\n5 1 9 5 5 9 1 5\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 2 3 3 4 3 4 2\\r\\n0 4 4 0 0 -4 -4 0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 2 0 2 2 0 2\\r\\n4 1 7 4 4 7 1 4\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 6 3 8 5 8 5 6\\r\\n2 9 4 11 6 9 4 7\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"0 0 10 0 10 10 0 10\\r\\n-1 5 5 -1 11 5 5 11\\r\\n\", \"output\": [\"yes\", \"YES\"]}, {\"input\": \"0 0 1 0 1 1 0 1\\r\\n3 0 6 3 3 6 0 3\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"3 7 4 7 4 6 3 6\\r\\n0 0 10 10 20 0 10 -10\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 0 1 1 1 1 0\\r\\n0 3 3 6 6 3 3 0\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 0 4 4 4 4 0\\r\\n3 6 7 10 11 6 7 2\\r\\n\", \"output\": [\"NO\", \"no\"]}, {\"input\": \"0 0 0 1 1 1 1 0\\r\\n0 10 10 0 20 10 10 20\\r\\n\", \"output\": [\"NO\", \"no\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '79 -19 79 15 45 15 45 -19\\r\\n-1 24 -29 52 -1 80 27 52\\r\\n', 'output': ['NO', 'no']}, {'input': '1 1 1 6 6 6 6 1\\r\\n5 8 8 11 11 8 8 5\\r\\n', 'output': ['NO', 'no']}, {'input': '-16 -10 -16 9 3 9 3 -10\\r\\n-8 -1 2 9 12 -1 2 -11\\r\\n', 'output': ['yes', 'YES']}, {'input': '-47 3 -37 3 -37 -7 -47 -7\\r\\n-37 3 -33 -1 -37 -5 -41 -1\\r\\n', 'output': ['yes', 'YES']}, {'input': '-35 3 -21 3 -21 -11 -35 -11\\r\\n-8 -10 3 -21 -8 -32 -19 -21\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_2":"[{'input': '13 1 15 1 15 3 13 3\\r\\n13 19 21 11 13 3 5 11\\r\\n', 'output': ['yes', 'YES']}, {'input': '-38 -26 32 -26 32 44 -38 44\\r\\n2 -27 -44 19 2 65 48 19\\r\\n', 'output': ['yes', 'YES']}, {'input': '-44 -17 -64 -17 -64 3 -44 3\\r\\n-56 15 -44 27 -32 15 -44 3\\r\\n', 'output': ['yes', 'YES']}, {'input': '-7 16 43 16 43 66 -7 66\\r\\n18 -7 -27 38 18 83 63 38\\r\\n', 'output': ['yes', 'YES']}, {'input': '92 1 92 98 -5 98 -5 1\\r\\n44 60 56 48 44 36 32 48\\r\\n', 'output': ['yes', 'YES']}]","human_sample_testcases_3":"[{'input': '-93 -86 -85 -86 -85 -78 -93 -78\\r\\n-13 61 0 48 -13 35 -26 48\\r\\n', 'output': ['NO', 'no']}, {'input': '-4 -8 -4 -15 3 -15 3 -8\\r\\n-10 5 -27 -12 -10 -29 7 -12\\r\\n', 'output': ['yes', 'YES']}, {'input': '52 -47 52 -30 35 -30 35 -47\\r\\n49 -22 64 -37 49 -52 34 -37\\r\\n', 'output': ['yes', 'YES']}, {'input': '-5 -5 5 -5 5 5 -5 5\\r\\n-5 12 0 7 5 12 0 17\\r\\n', 'output': ['NO', 'no']}, {'input': '-41 6 -41 8 -43 8 -43 6\\r\\n-7 27 43 -23 -7 -73 -57 -23\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_4":"[{'input': '-27 -73 72 -73 72 26 -27 26\\r\\n58 11 100 -31 58 -73 16 -31\\r\\n', 'output': ['yes', 'YES']}, {'input': '15 -18 3 -18 3 -6 15 -6\\r\\n29 -1 16 -14 3 -1 16 12\\r\\n', 'output': ['yes', 'YES']}, {'input': '-29 13 -39 13 -39 3 -29 3\\r\\n-36 -4 -50 -18 -36 -32 -22 -18\\r\\n', 'output': ['NO', 'no']}, {'input': '17 3 2 3 2 18 17 18\\r\\n22 23 2 3 -18 23 2 43\\r\\n', 'output': ['yes', 'YES']}, {'input': '-10 -36 -10 27 -73 27 -73 -36\\r\\n44 -28 71 -55 44 -82 17 -55\\r\\n', 'output': ['NO', 'no']}]","human_sample_testcases_5":"[{'input': '2 2 4 2 4 4 2 4\\r\\n0 3 3 6 6 3 3 0\\r\\n', 'output': ['yes', 'YES']}, {'input': '99 99 99 100 100 100 100 99\\r\\n-100 0 0 100 100 0 0 -100\\r\\n', 'output': ['NO', 'no']}, {'input': '-35 3 -21 3 -21 -11 -35 -11\\r\\n-8 -10 3 -21 -8 -32 -19 -21\\r\\n', 'output': ['NO', 'no']}, {'input': '-90 2 0 2 0 92 -90 92\\r\\n-66 31 -86 51 -66 71 -46 51\\r\\n', 'output': ['yes', 'YES']}, {'input': '48 8 43 8 43 3 48 3\\r\\n31 -4 43 8 55 -4 43 -16\\r\\n', 'output': ['yes', 'YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.29,"human_sample_line_coverage_2":91.43,"human_sample_line_coverage_3":94.29,"human_sample_line_coverage_4":94.29,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":79.17,"human_sample_branch_coverage_3":91.67,"human_sample_branch_coverage_4":91.67,"human_sample_branch_coverage_5":100.0,"id":231,"human_sample_pass_rate":100.0,"human_sample_line_coverage":94.86,"human_sample_branch_coverage":90.836} {"sample_inputs":"[\"5 2\\n#G#T#\", \"6 1\\nT....G\", \"7 3\\nT..#..G\", \"6 2\\n..GT..\"]","input_specification":"The first line of the input contains two integers n and k (2\u2009\u2264\u2009n\u2009\u2264\u2009100, 1\u2009\u2264\u2009k\u2009\u2264\u2009n\u2009-\u20091)\u00a0\u2014 the number of cells in the line and the length of one grasshopper's jump. The second line contains a string of length n consisting of characters '.', '#', 'G' and 'T'. Character '.' means that the corresponding cell is empty, character '#' means that the corresponding cell contains an obstacle and grasshopper can't jump there. Character 'G' means that the grasshopper starts at this position and, finally, 'T' means that the target insect is located at this cell. It's guaranteed that characters 'G' and 'T' appear in this line exactly once.","src_uid":"189a9b5ce669bdb04b9d371d74a5dd41","source_code":"import java.io.*;\nimport java.util.*;\n\npublic class Problem2A {\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString[] in = br.readLine().split(\" \");\n\t\tint n = Integer.parseInt(in[0]);\n\t\tint k = Integer.parseInt(in[1]);\n\t\tchar[] line = br.readLine().toCharArray();\n\t\tint start = -1;\n\t\tint end = -1;\n\t\tfor(int i=0; i alphabet = new HashMap<>();\n\n int a = 1;\n for (char ch = 'A'; ch <= 'Z'; ch++) {\n alphabet.put(String.valueOf(ch), a);\n a++;\n }\n\n for (int i = 0; (i + 4) <= length; i++) {\n int sum = 0;\n for (int x = 0; x < 4; x++) {\n if (Math.abs(alphabet.get(genome.substring(x, x + 1)) - alphabet.get(s.substring(i + x, i + x + 1))) <= 13) {\n sum += Math.abs(alphabet.get(genome.substring(x, x + 1)) - alphabet.get(s.substring(i + x, i + x + 1)));\n } else if (alphabet.get(s.substring(i + x, i + x + 1)) > alphabet.get(genome.substring(x, x + 1))) {\n sum += (26 - alphabet.get(s.substring(i + x, i + x + 1)) + alphabet.get(genome.substring(x, x + 1)));\n } else {\n sum += (26 - alphabet.get(genome.substring(x, x + 1)) + alphabet.get(s.substring(i + x, i + x + 1)));\n }\n }\n\n if (sum < miniumChanges) {\n miniumChanges = sum;\n }\n }\n\n System.out.println(miniumChanges);\n }\n\n}","sample_outputs":"[\"2\", \"5\", \"16\"]","lang_cluster":"Java","notes":"NoteIn the first example, you should replace the letter \"Z\" with \"A\" for one operation, the letter \"H\"\u00a0\u2014 with the letter \"G\" for one operation. You will get the string \"ACTG\", in which the genome is present as a substring.In the second example, we replace the letter \"A\" with \"C\" for two operations, the letter \"D\"\u00a0\u2014 with the letter \"A\" for three operations. You will get the string \"ZACTG\", in which there is a genome.","output_specification":"Output the minimum number of operations that need to be applied to the string $$$s$$$ so that the genome appears as a substring in it.","description":"Today in the scientific lyceum of the Kingdom of Kremland, there was a biology lesson. The topic of the lesson was the genomes. Let's call the genome the string \"ACTG\".Maxim was very boring to sit in class, so the teacher came up with a task for him: on a given string $$$s$$$ consisting of uppercase letters and length of at least $$$4$$$, you need to find the minimum number of operations that you need to apply, so that the genome appears in it as a substring. For one operation, you can replace any letter in the string $$$s$$$ with the next or previous in the alphabet. For example, for the letter \"D\" the previous one will be \"C\", and the next\u00a0\u2014 \"E\". In this problem, we assume that for the letter \"A\", the previous one will be the letter \"Z\", and the next one will be \"B\", and for the letter \"Z\", the previous one is the letter \"Y\", and the next one is the letter \"A\".Help Maxim solve the problem that the teacher gave him.A string $$$a$$$ is a substring of a string $$$b$$$ if $$$a$$$ can be obtained from $$$b$$$ by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end.","human_testcases":"[{\"input\": \"4\\r\\nZCTH\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\nZDATG\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6\\r\\nAFBAKC\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"9\\r\\nAAABBBCCC\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"8\\r\\nABCDABCD\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"4\\r\\nNPGT\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"10\\r\\nABABABABAB\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"8\\r\\nBBAACCZZ\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"50\\r\\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"30\\r\\nTHCVHIPLYOOFCNWQJMBMEDTXLTCKMF\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"39\\r\\nIHESTJHHSZRSHNUSPGMHDTKOJFEFLAUDXUEQWLO\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"32\\r\\nIWMQCTKRNXICANQUPLBOMDNRBOWWIXZB\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"6\\r\\nNQNEVX\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"17\\r\\nGNPBRASKVPECJKECD\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"18\\r\\nKNGWZFHGQIADTBYWDC\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"14\\r\\nZXPFXCBVESQGAE\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"37\\r\\nINUZOUSGLBHKDEFTQANRPIYMIBFLRTYFNWIFQ\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"50\\r\\nVKRGXLUWYURTRNGAODFLYCKAPHGPHGDLWIGXEYVOAVYYXVDRAB\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"50\\r\\nGOHDHOWWPMZBSEKHDBDKLIYRFEPOUHIHOHPUMVDAQRZDJMUBWV\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nROWGGKNUITVHOBMKZXOZNBZMQGSFERNCZDFKLRBCFVVDXJEFLP\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"50\\r\\nYUPJIRNPTCFJIPODTHJXTWJUTLKCUYFNZKMJRBZZYBPEDYLKCY\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nZOMSHKIFVAMFATEIIEUJVITTYZGDWCGSOJMFQNYACRPOLGUZCM\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nLQFSFNEFCPBEARPMOGSSQVHAGNKOQXXCZKHSAEPTEHWOWSZMKH\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"50\\r\\nHKKUWHLYYKBLLEHKVNIRYAPVFTAPRIFUZELKGRDXZNCNWHSAFG\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"50\\r\\nMGDXLMPDPKUQOIMTLDUDTGTOMJCSYNRTSQSJANYDDPWQYTDTAW\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8\\r\\nACTGACTG\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\nZZZZZZZZZZ\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"8\\r\\nNPGTNPGT\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"5\\r\\nACTGA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4\\r\\nAZTG\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\nYCTG\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\nANTG\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"4\\r\\nOCTG\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"4\\r\\nACHG\\r\\n\", \"output\": [\"12\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\nNPGT\\r\\n', 'output': ['52']}, {'input': '50\\r\\nMGDXLMPDPKUQOIMTLDUDTGTOMJCSYNRTSQSJANYDDPWQYTDTAW\\r\\n', 'output': ['7']}, {'input': '33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n', 'output': ['12']}, {'input': '50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n', 'output': ['9']}, {'input': '5\\r\\nZDATG\\r\\n', 'output': ['5']}]","human_sample_testcases_2":"[{'input': '50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n', 'output': ['9']}, {'input': '8\\r\\nBBAACCZZ\\r\\n', 'output': ['14']}, {'input': '50\\r\\nZOMSHKIFVAMFATEIIEUJVITTYZGDWCGSOJMFQNYACRPOLGUZCM\\r\\n', 'output': ['9']}, {'input': '39\\r\\nIHESTJHHSZRSHNUSPGMHDTKOJFEFLAUDXUEQWLO\\r\\n', 'output': ['11']}, {'input': '9\\r\\nAAABBBCCC\\r\\n', 'output': ['14']}]","human_sample_testcases_3":"[{'input': '8\\r\\nABCDABCD\\r\\n', 'output': ['13']}, {'input': '50\\r\\nGOHDHOWWPMZBSEKHDBDKLIYRFEPOUHIHOHPUMVDAQRZDJMUBWV\\r\\n', 'output': ['5']}, {'input': '32\\r\\nIWMQCTKRNXICANQUPLBOMDNRBOWWIXZB\\r\\n', 'output': ['14']}, {'input': '17\\r\\nGNPBRASKVPECJKECD\\r\\n', 'output': ['16']}, {'input': '10\\r\\nZZZZZZZZZZ\\r\\n', 'output': ['17']}]","human_sample_testcases_4":"[{'input': '4\\r\\nAZTG\\r\\n', 'output': ['3']}, {'input': '17\\r\\nGNPBRASKVPECJKECD\\r\\n', 'output': ['16']}, {'input': '50\\r\\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\\r\\n', 'output': ['13']}, {'input': '4\\r\\nACHG\\r\\n', 'output': ['12']}, {'input': '50\\r\\nZOMSHKIFVAMFATEIIEUJVITTYZGDWCGSOJMFQNYACRPOLGUZCM\\r\\n', 'output': ['9']}]","human_sample_testcases_5":"[{'input': '33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n', 'output': ['12']}, {'input': '50\\r\\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\\r\\n', 'output': ['13']}, {'input': '4\\r\\nNPGT\\r\\n', 'output': ['52']}, {'input': '6\\r\\nAFBAKC\\r\\n', 'output': ['16']}, {'input': '4\\r\\nACHG\\r\\n', 'output': ['12']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":235,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 4 2\", \"5 5 5\", \"0 2 0\"]","input_specification":"The only line contains three integers l, r and a (0\u2009\u2264\u2009l,\u2009r,\u2009a\u2009\u2264\u2009100) \u2014 the number of left-handers, the number of right-handers and the number of ambidexters at the training. ","src_uid":"e8148140e61baffd0878376ac5f3857c","source_code":"\/\/ Why do we fall ? So we can learn to pick ourselves up.\nimport java.util.*;\npublic class solve {\n static int mod = 1000000007;\n static int mod1 = 998244353;\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int lll = sc.nextInt(),rrr = sc.nextInt(),a = sc.nextInt();\n int l = Math.min(lll,rrr),r = Math.max(lll,rrr);\n if(lll==rrr) System.out.println(2*(l+a\/2));\n else {\n int ll = Math.min(r-l,a);\n l += ll;\n int aa = a-ll;\n System.out.println(2*(l+aa\/2));\n }\n }\n}","sample_outputs":"[\"6\", \"14\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first example you can form a team of 6 players. You should take the only left-hander and two ambidexters to play with left hand, and three right-handers to play with right hand. The only person left can't be taken into the team.In the second example you can form a team of 14 people. You have to take all five left-handers, all five right-handers, two ambidexters to play with left hand and two ambidexters to play with right hand.","output_specification":"Print a single even integer\u00a0\u2014 the maximum number of players in the team. It is possible that the team can only have zero number of players.","description":"You are at a water bowling training. There are l people who play with their left hand, r people, who play with their right hand, and a ambidexters, who can play with left or right hand.The coach decided to form a team of even number of players, exactly half of the players should play with their right hand, and exactly half of the players should play with their left hand. One player should use only on of his hands.Ambidexters play as well with their right hand as with their left hand. In the team, an ambidexter can play with their left hand, or with their right hand.Please find the maximum possible size of the team, where equal number of players use their left and right hands, respectively.","human_testcases":"[{\"input\": \"1 4 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 5 5\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"0 2 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"30 70 34\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"89 32 24\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"89 44 77\\r\\n\", \"output\": [\"210\"]}, {\"input\": \"0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100 100\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"30 70 35\\r\\n\", \"output\": [\"130\"]}, {\"input\": \"89 44 76\\r\\n\", \"output\": [\"208\"]}, {\"input\": \"0 100 100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"100 0 100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"100 1 100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"1 100 100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"100 100 0\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"100 100 1\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0 0 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"0 100 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 8 7\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"45 47 16\\r\\n\", \"output\": [\"108\"]}, {\"input\": \"59 43 100\\r\\n\", \"output\": [\"202\"]}, {\"input\": \"34 1 30\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"14 81 1\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"53 96 94\\r\\n\", \"output\": [\"242\"]}, {\"input\": \"62 81 75\\r\\n\", \"output\": [\"218\"]}, {\"input\": \"21 71 97\\r\\n\", \"output\": [\"188\"]}, {\"input\": \"49 82 73\\r\\n\", \"output\": [\"204\"]}, {\"input\": \"88 19 29\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"89 4 62\\r\\n\", \"output\": [\"132\"]}, {\"input\": \"58 3 65\\r\\n\", \"output\": [\"126\"]}, {\"input\": \"27 86 11\\r\\n\", \"output\": [\"76\"]}, {\"input\": \"35 19 80\\r\\n\", \"output\": [\"134\"]}, {\"input\": \"4 86 74\\r\\n\", \"output\": [\"156\"]}, {\"input\": \"32 61 89\\r\\n\", \"output\": [\"182\"]}, {\"input\": \"68 60 98\\r\\n\", \"output\": [\"226\"]}, {\"input\": \"37 89 34\\r\\n\", \"output\": [\"142\"]}, {\"input\": \"92 9 28\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"79 58 98\\r\\n\", \"output\": [\"234\"]}, {\"input\": \"35 44 88\\r\\n\", \"output\": [\"166\"]}, {\"input\": \"16 24 19\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"74 71 75\\r\\n\", \"output\": [\"220\"]}, {\"input\": \"83 86 99\\r\\n\", \"output\": [\"268\"]}, {\"input\": \"97 73 15\\r\\n\", \"output\": [\"176\"]}, {\"input\": \"77 76 73\\r\\n\", \"output\": [\"226\"]}, {\"input\": \"48 85 55\\r\\n\", \"output\": [\"188\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 2 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 1 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 2 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 3 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 1 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 3 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 1 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"99 99 99\\r\\n\", \"output\": [\"296\"]}, {\"input\": \"99 99 100\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"99 100 99\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"99 100 100\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"100 99 99\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"100 99 100\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"100 100 99\\r\\n\", \"output\": [\"298\"]}, {\"input\": \"89 32 23\\r\\n\", \"output\": [\"110\"]}, {\"input\": \"4 5 0\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3 0 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"0 0 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"97 97 0\\r\\n\", \"output\": [\"194\"]}, {\"input\": \"1 4 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0 5 10\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"0 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2 3\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"5 5 0\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"0 0 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 0 1\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '97 97 0\\r\\n', 'output': ['194']}, {'input': '89 44 76\\r\\n', 'output': ['208']}, {'input': '1 2 3\\r\\n', 'output': ['6']}, {'input': '5 2 3\\r\\n', 'output': ['10']}, {'input': '0 2 0\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '99 99 100\\r\\n', 'output': ['298']}, {'input': '30 70 35\\r\\n', 'output': ['130']}, {'input': '100 99 99\\r\\n', 'output': ['298']}, {'input': '14 81 1\\r\\n', 'output': ['30']}, {'input': '4 5 0\\r\\n', 'output': ['8']}]","human_sample_testcases_3":"[{'input': '100 100 99\\r\\n', 'output': ['298']}, {'input': '0 1 2\\r\\n', 'output': ['2']}, {'input': '49 82 73\\r\\n', 'output': ['204']}, {'input': '5 5 0\\r\\n', 'output': ['10']}, {'input': '62 81 75\\r\\n', 'output': ['218']}]","human_sample_testcases_4":"[{'input': '100 99 99\\r\\n', 'output': ['298']}, {'input': '0 100 0\\r\\n', 'output': ['0']}, {'input': '1 100 100\\r\\n', 'output': ['200']}, {'input': '83 86 99\\r\\n', 'output': ['268']}, {'input': '1 1 1\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '74 71 75\\r\\n', 'output': ['220']}, {'input': '5 2 3\\r\\n', 'output': ['10']}, {'input': '32 61 89\\r\\n', 'output': ['182']}, {'input': '1 2 3\\r\\n', 'output': ['6']}, {'input': '14 81 1\\r\\n', 'output': ['30']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":50.0,"id":236,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"7 3\\n3 5 7 1 6 2 8\\n1 2 7\", \"4 4\\n3 4 1 0\\n0 1 7 9\"]","input_specification":"The first line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n, m \\le 10$$$) representing the number of digits in the sequence you have and the number of keys on the keypad that have fingerprints. The next line contains $$$n$$$ distinct space-separated integers $$$x_1, x_2, \\ldots, x_n$$$ ($$$0 \\le x_i \\le 9$$$) representing the sequence. The next line contains $$$m$$$ distinct space-separated integers $$$y_1, y_2, \\ldots, y_m$$$ ($$$0 \\le y_i \\le 9$$$) \u2014 the keys with fingerprints.","src_uid":"f9044a4b4c3a0c2751217d9b31cd0c72","source_code":"import java.util.*;\npublic class A\n{\n public static void main(String[] args)\n {\n int n,m;\n Scanner s = new Scanner(System.in);\n n = s.nextInt();\n m = s.nextInt();\n int a[] = new int[n];\n int b[] = new int[m];\n for(int i = 0 ; i < n ; i++)\n {\n a[i] = s.nextInt();\n }\n for(int j = 0 ; j < m ; j++)\n {\n b[j] = s.nextInt();\n }\n for(int i1 = 0 ; i1 < n ; i1++)\n {\n for(int j1 = 0 ; j1 < m ; j1++)\n {\n if(a[i1] == b[j1])\n {\n System.out.print(a[i1] + \" \");\n }\n }\n }\n }\n}","sample_outputs":"[\"7 1 2\", \"1 0\"]","lang_cluster":"Java","notes":"NoteIn the first example, the only digits with fingerprints are $$$1$$$, $$$2$$$ and $$$7$$$. All three of them appear in the sequence you know, $$$7$$$ first, then $$$1$$$ and then $$$2$$$. Therefore the output is 7 1 2. Note that the order is important, and shall be the same as the order in the original sequence.In the second example digits $$$0$$$, $$$1$$$, $$$7$$$ and $$$9$$$ have fingerprints, however only $$$0$$$ and $$$1$$$ appear in the original sequence. $$$1$$$ appears earlier, so the output is 1 0. Again, the order is important.","output_specification":"In a single line print a space-separated sequence of integers representing the code. If the resulting sequence is empty, both printing nothing and printing a single line break is acceptable.","description":"You are locked in a room with a door that has a keypad with 10 keys corresponding to digits from 0 to 9. To escape from the room, you need to enter a correct code. You also have a sequence of digits.Some keys on the keypad have fingerprints. You believe the correct code is the longest not necessarily contiguous subsequence of the sequence you have that only contains digits with fingerprints on the corresponding keys. Find such code.","human_testcases":"[{\"input\": \"7 3\\r\\n3 5 7 1 6 2 8\\r\\n1 2 7\\r\\n\", \"output\": [\"7 1 2\"]}, {\"input\": \"4 4\\r\\n3 4 1 0\\r\\n0 1 7 9\\r\\n\", \"output\": [\"1 0\"]}, {\"input\": \"9 4\\r\\n9 8 7 6 5 4 3 2 1\\r\\n2 4 6 8\\r\\n\", \"output\": [\"8 6 4 2\"]}, {\"input\": \"10 5\\r\\n3 7 1 2 4 6 9 0 5 8\\r\\n4 3 0 7 9\\r\\n\", \"output\": [\"3 7 4 9 0\"]}, {\"input\": \"5 5\\r\\n1 2 3 4 5\\r\\n6 7 8 9 0\\r\\n\", \"output\": [\"\"]}, {\"input\": \"10 10\\r\\n1 2 3 4 5 6 7 8 9 0\\r\\n4 5 6 7 1 2 3 0 9 8\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 0\"]}, {\"input\": \"1 1\\r\\n4\\r\\n4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 7\\r\\n6 3 4\\r\\n4 9 0 1 7 8 6\\r\\n\", \"output\": [\"6 4\"]}, {\"input\": \"10 1\\r\\n9 0 8 1 7 4 6 5 2 3\\r\\n0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 1\\r\\n4 2 7 3 1 8\\r\\n9\\r\\n\", \"output\": [\"\"]}, {\"input\": \"5 10\\r\\n6 0 3 8 1\\r\\n3 1 0 5 4 7 2 8 9 6\\r\\n\", \"output\": [\"6 0 3 8 1\"]}, {\"input\": \"8 2\\r\\n7 2 9 6 1 0 3 4\\r\\n6 3\\r\\n\", \"output\": [\"6 3\"]}, {\"input\": \"5 4\\r\\n7 0 1 4 9\\r\\n0 9 5 3\\r\\n\", \"output\": [\"0 9\"]}, {\"input\": \"10 1\\r\\n9 6 2 0 1 8 3 4 7 5\\r\\n6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 2\\r\\n7 1 0 2 4 6 5 9 3 8\\r\\n3 2\\r\\n\", \"output\": [\"2 3\"]}, {\"input\": \"5 9\\r\\n3 7 9 2 4\\r\\n3 8 4 5 9 6 1 0 2\\r\\n\", \"output\": [\"3 9 2 4\"]}, {\"input\": \"10 6\\r\\n7 1 2 3 8 0 6 4 5 9\\r\\n1 5 8 2 3 6\\r\\n\", \"output\": [\"1 2 3 8 6 5\"]}, {\"input\": \"8 2\\r\\n7 4 8 9 2 5 6 1\\r\\n6 4\\r\\n\", \"output\": [\"4 6\"]}, {\"input\": \"10 2\\r\\n1 0 3 5 8 9 4 7 6 2\\r\\n0 3\\r\\n\", \"output\": [\"0 3\"]}, {\"input\": \"7 6\\r\\n9 2 8 6 1 3 7\\r\\n4 2 0 3 1 8\\r\\n\", \"output\": [\"2 8 1 3\"]}, {\"input\": \"1 6\\r\\n3\\r\\n6 8 2 4 5 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 8\\r\\n0\\r\\n9 2 4 8 1 5 0 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 9\\r\\n7 3 9 4 1 0\\r\\n9 1 5 8 0 6 2 7 4\\r\\n\", \"output\": [\"7 9 4 1 0\"]}, {\"input\": \"10 2\\r\\n4 9 6 8 3 0 1 5 7 2\\r\\n0 1\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"10 5\\r\\n5 2 8 0 9 7 6 1 4 3\\r\\n9 6 4 1 2\\r\\n\", \"output\": [\"2 9 6 1 4\"]}, {\"input\": \"6 3\\r\\n8 3 9 2 7 6\\r\\n5 4 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 10\\r\\n8 3 9 6\\r\\n4 9 6 2 7 0 8 1 3 5\\r\\n\", \"output\": [\"8 3 9 6\"]}, {\"input\": \"1 2\\r\\n1\\r\\n1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 6\\r\\n1 2 3\\r\\n4 5 6 1 2 3\\r\\n\", \"output\": [\"1 2 3\"]}, {\"input\": \"1 2\\r\\n2\\r\\n1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 10\\r\\n9\\r\\n0 1 2 3 4 5 6 7 8 9\\r\\n\", \"output\": [\"9\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 6\\r\\n7 1 2 3 8 0 6 4 5 9\\r\\n1 5 8 2 3 6\\r\\n', 'output': ['1 2 3 8 6 5']}, {'input': '1 10\\r\\n9\\r\\n0 1 2 3 4 5 6 7 8 9\\r\\n', 'output': ['9']}, {'input': '10 5\\r\\n5 2 8 0 9 7 6 1 4 3\\r\\n9 6 4 1 2\\r\\n', 'output': ['2 9 6 1 4']}, {'input': '5 4\\r\\n7 0 1 4 9\\r\\n0 9 5 3\\r\\n', 'output': ['0 9']}, {'input': '6 3\\r\\n8 3 9 2 7 6\\r\\n5 4 3\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '10 6\\r\\n7 1 2 3 8 0 6 4 5 9\\r\\n1 5 8 2 3 6\\r\\n', 'output': ['1 2 3 8 6 5']}, {'input': '3 6\\r\\n1 2 3\\r\\n4 5 6 1 2 3\\r\\n', 'output': ['1 2 3']}, {'input': '4 10\\r\\n8 3 9 6\\r\\n4 9 6 2 7 0 8 1 3 5\\r\\n', 'output': ['8 3 9 6']}, {'input': '6 1\\r\\n4 2 7 3 1 8\\r\\n9\\r\\n', 'output': ['']}, {'input': '5 10\\r\\n6 0 3 8 1\\r\\n3 1 0 5 4 7 2 8 9 6\\r\\n', 'output': ['6 0 3 8 1']}]","human_sample_testcases_3":"[{'input': '3 7\\r\\n6 3 4\\r\\n4 9 0 1 7 8 6\\r\\n', 'output': ['6 4']}, {'input': '8 2\\r\\n7 2 9 6 1 0 3 4\\r\\n6 3\\r\\n', 'output': ['6 3']}, {'input': '3 6\\r\\n1 2 3\\r\\n4 5 6 1 2 3\\r\\n', 'output': ['1 2 3']}, {'input': '10 2\\r\\n1 0 3 5 8 9 4 7 6 2\\r\\n0 3\\r\\n', 'output': ['0 3']}, {'input': '10 1\\r\\n9 0 8 1 7 4 6 5 2 3\\r\\n0\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '1 2\\r\\n1\\r\\n1 0\\r\\n', 'output': ['1']}, {'input': '10 2\\r\\n1 0 3 5 8 9 4 7 6 2\\r\\n0 3\\r\\n', 'output': ['0 3']}, {'input': '6 3\\r\\n8 3 9 2 7 6\\r\\n5 4 3\\r\\n', 'output': ['3']}, {'input': '10 1\\r\\n9 6 2 0 1 8 3 4 7 5\\r\\n6\\r\\n', 'output': ['6']}, {'input': '10 5\\r\\n3 7 1 2 4 6 9 0 5 8\\r\\n4 3 0 7 9\\r\\n', 'output': ['3 7 4 9 0']}]","human_sample_testcases_5":"[{'input': '5 9\\r\\n3 7 9 2 4\\r\\n3 8 4 5 9 6 1 0 2\\r\\n', 'output': ['3 9 2 4']}, {'input': '8 2\\r\\n7 4 8 9 2 5 6 1\\r\\n6 4\\r\\n', 'output': ['4 6']}, {'input': '10 2\\r\\n4 9 6 8 3 0 1 5 7 2\\r\\n0 1\\r\\n', 'output': ['0 1']}, {'input': '6 3\\r\\n8 3 9 2 7 6\\r\\n5 4 3\\r\\n', 'output': ['3']}, {'input': '10 2\\r\\n7 1 0 2 4 6 5 9 3 8\\r\\n3 2\\r\\n', 'output': ['2 3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":237,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1\", \"2\", \"3\"]","input_specification":"A single line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u20094000).","src_uid":"aa2c3e94a44053a0d86f61da06681023","source_code":"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n\/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\/\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskB solver = new TaskB();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class TaskB {\n long[] equivalence_relations;\n int[][] bc;\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int N = in.nextInt();\n int MOD = 1000000007;\n\n long ans = 0;\n compute_equivalence_relations(N, MOD);\n compute_binomial_coefficients(N, MOD);\n for (int m = 0; m < N; m++) {\n ans = (ans + equivalence_relations[m] * bc[N][N - m]) % MOD;\n }\n\n out.println(ans);\n }\n\n private void compute_binomial_coefficients(int N, int MOD) {\n bc = new int[N + 1][N + 1];\n for (int n = 1; n <= N; n++) {\n for (int k = 0; k <= n; k++) {\n if (k == 0) bc[n][k] = 1;\n else if (n == k) bc[n][k] = 1;\n else bc[n][k] = (bc[n - 1][k - 1] + bc[n - 1][k]) % MOD;\n }\n }\n }\n\n private void compute_equivalence_relations(int N, int MOD) {\n long dp[][] = new long[N + 1][N + 1];\n\n dp[0][0] = 1;\n\n for (int elems = 1; elems <= N; elems++) {\n for (int classes = 1; classes <= elems; classes++) {\n dp[elems][classes] = (long) (classes) * dp[elems - 1][classes] + dp[elems - 1][classes - 1];\n dp[elems][classes] = dp[elems][classes] % MOD;\n }\n }\n\n equivalence_relations = new long[N + 1];\n\n for (int i = 0; i <= N; i++) {\n long tmp = 0;\n for (int j = 0; j <= i; j++) {\n tmp = (tmp + dp[i][j]) % MOD;\n }\n equivalence_relations[i] = tmp;\n }\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}\n\n","sample_outputs":"[\"1\", \"3\", \"10\"]","lang_cluster":"Java","notes":"NoteIf n\u2009=\u20091 there is only one such relation\u00a0\u2014 an empty one, i.e. . In other words, for a single element x of set A the following is hold: .If n\u2009=\u20092 there are three such relations. Let's assume that set A consists of two elements, x and y. Then the valid relations are , \u03c1\u2009=\u2009{(x,\u2009x)}, \u03c1\u2009=\u2009{(y,\u2009y)}. It is easy to see that the three listed binary relations are symmetric and transitive relations, but they are not equivalence relations.","output_specification":"In a single line print the answer to the problem modulo 109\u2009+\u20097.","description":"Little Johnny has recently learned about set theory. Now he is studying binary relations. You've probably heard the term \"equivalence relation\". These relations are very important in many areas of mathematics. For example, the equality of the two numbers is an equivalence relation.A set \u03c1 of pairs (a,\u2009b) of elements of some set A is called a binary relation on set A. For two elements a and b of the set A we say that they are in relation \u03c1, if pair , in this case we use a notation .Binary relation is equivalence relation, if: It is reflexive (for any a it is true that ); It is symmetric (for any a, b it is true that if , then ); It is transitive (if and , than ).Little Johnny is not completely a fool and he noticed that the first condition is not necessary! Here is his \"proof\":Take any two elements, a and b. If , then (according to property (2)), which means (according to property (3)).It's very simple, isn't it? However, you noticed that Johnny's \"proof\" is wrong, and decided to show him a lot of examples that prove him wrong.Here's your task: count the number of binary relations over a set of size n such that they are symmetric, transitive, but not an equivalence relations (i.e. they are not reflexive).Since their number may be very large (not 0, according to Little Johnny), print the remainder of integer division of this number by 109\u2009+\u20097.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"151\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"674\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"3263\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"17007\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"94828\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"562595\"]}, {\"input\": \"42\\r\\n\", \"output\": [\"738186543\"]}, {\"input\": \"2000\\r\\n\", \"output\": [\"323848720\"]}, {\"input\": \"4000\\r\\n\", \"output\": [\"341934157\"]}, {\"input\": \"2345\\r\\n\", \"output\": [\"832335061\"]}, {\"input\": \"2500\\r\\n\", \"output\": [\"544067513\"]}, {\"input\": \"2780\\r\\n\", \"output\": [\"951043097\"]}, {\"input\": \"2999\\r\\n\", \"output\": [\"634360769\"]}, {\"input\": \"3000\\r\\n\", \"output\": [\"949793998\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"654959364\"]}, {\"input\": \"76\\r\\n\", \"output\": [\"130527569\"]}, {\"input\": \"133\\r\\n\", \"output\": [\"334338018\"]}, {\"input\": \"345\\r\\n\", \"output\": [\"838683603\"]}, {\"input\": \"555\\r\\n\", \"output\": [\"31983119\"]}, {\"input\": \"666\\r\\n\", \"output\": [\"86247911\"]}, {\"input\": \"777\\r\\n\", \"output\": [\"765401747\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"867937200\"]}, {\"input\": \"1234\\r\\n\", \"output\": [\"845807965\"]}, {\"input\": \"1730\\r\\n\", \"output\": [\"730878735\"]}, {\"input\": \"3333\\r\\n\", \"output\": [\"938772236\"]}, {\"input\": \"3555\\r\\n\", \"output\": [\"810675957\"]}, {\"input\": \"3789\\r\\n\", \"output\": [\"397160465\"]}, {\"input\": \"3999\\r\\n\", \"output\": [\"124834909\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2780\\r\\n', 'output': ['951043097']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '76\\r\\n', 'output': ['130527569']}, {'input': '3555\\r\\n', 'output': ['810675957']}, {'input': '6\\r\\n', 'output': ['674']}]","human_sample_testcases_2":"[{'input': '4000\\r\\n', 'output': ['341934157']}, {'input': '1234\\r\\n', 'output': ['845807965']}, {'input': '3000\\r\\n', 'output': ['949793998']}, {'input': '3555\\r\\n', 'output': ['810675957']}, {'input': '2780\\r\\n', 'output': ['951043097']}]","human_sample_testcases_3":"[{'input': '1234\\r\\n', 'output': ['845807965']}, {'input': '1730\\r\\n', 'output': ['730878735']}, {'input': '133\\r\\n', 'output': ['334338018']}, {'input': '777\\r\\n', 'output': ['765401747']}, {'input': '2999\\r\\n', 'output': ['634360769']}]","human_sample_testcases_4":"[{'input': '3000\\r\\n', 'output': ['949793998']}, {'input': '555\\r\\n', 'output': ['31983119']}, {'input': '2780\\r\\n', 'output': ['951043097']}, {'input': '2\\r\\n', 'output': ['3']}, {'input': '6\\r\\n', 'output': ['674']}]","human_sample_testcases_5":"[{'input': '555\\r\\n', 'output': ['31983119']}, {'input': '10\\r\\n', 'output': ['562595']}, {'input': '8\\r\\n', 'output': ['17007']}, {'input': '345\\r\\n', 'output': ['838683603']}, {'input': '20\\r\\n', 'output': ['654959364']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":238,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\", \"4\"]","input_specification":"The first line contains single integer $$$n$$$ ($$$3 \\le n \\le 500$$$) \u2014 the number of vertices in the regular polygon.","src_uid":"1bd29d7a8793c22e81a1f6fd3991307a","source_code":"import java.util.*;\nimport java.io.*;\npublic class Solution\n{\n public static void main(String []ks) throws Exception\n {\n BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));\n long n=Long.parseLong(bf.readLine());\n long a=2,b=3;\n long res=0;\n for(int i=3;i<=n;i++)\n {\n res+=(a*b);\n a++;\n b++;\n }\n System.out.println(res);\n }\n}","sample_outputs":"[\"6\", \"18\"]","lang_cluster":"Java","notes":"NoteAccording to Wiki: polygon triangulation is the decomposition of a polygonal area (simple polygon) $$$P$$$ into a set of triangles, i.\u2009e., finding a set of triangles with pairwise non-intersecting interiors whose union is $$$P$$$.In the first example the polygon is a triangle, so we don't need to cut it further, so the answer is $$$1 \\cdot 2 \\cdot 3 = 6$$$.In the second example the polygon is a rectangle, so it should be divided into two triangles. It's optimal to cut it using diagonal $$$1-3$$$ so answer is $$$1 \\cdot 2 \\cdot 3 + 1 \\cdot 3 \\cdot 4 = 6 + 12 = 18$$$.","output_specification":"Print one integer \u2014 the minimum weight among all triangulations of the given polygon.","description":"You are given a regular polygon with $$$n$$$ vertices labeled from $$$1$$$ to $$$n$$$ in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each vertex of each triangle is a vertex of the initial polygon, there is no pair of triangles such that their intersection has non-zero area, and the total area of all triangles is equal to the area of the given polygon. The weight of a triangulation is the sum of weigths of triangles it consists of, where the weight of a triagle is denoted as the product of labels of its vertices.Calculate the minimum weight among all triangulations of the polygon.","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"68\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"110\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"166\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"238\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"328\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"333298\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"343398\"]}, {\"input\": \"102\\r\\n\", \"output\": [\"353700\"]}, {\"input\": \"103\\r\\n\", \"output\": [\"364206\"]}, {\"input\": \"104\\r\\n\", \"output\": [\"374918\"]}, {\"input\": \"105\\r\\n\", \"output\": [\"385838\"]}, {\"input\": \"106\\r\\n\", \"output\": [\"396968\"]}, {\"input\": \"107\\r\\n\", \"output\": [\"408310\"]}, {\"input\": \"108\\r\\n\", \"output\": [\"419866\"]}, {\"input\": \"109\\r\\n\", \"output\": [\"431638\"]}, {\"input\": \"110\\r\\n\", \"output\": [\"443628\"]}, {\"input\": \"500\\r\\n\", \"output\": [\"41666498\"]}, {\"input\": \"497\\r\\n\", \"output\": [\"40920990\"]}, {\"input\": \"494\\r\\n\", \"output\": [\"40184428\"]}, {\"input\": \"491\\r\\n\", \"output\": [\"39456758\"]}, {\"input\": \"488\\r\\n\", \"output\": [\"38737926\"]}, {\"input\": \"485\\r\\n\", \"output\": [\"38027878\"]}, {\"input\": \"482\\r\\n\", \"output\": [\"37326560\"]}, {\"input\": \"479\\r\\n\", \"output\": [\"36633918\"]}, {\"input\": \"476\\r\\n\", \"output\": [\"35949898\"]}, {\"input\": \"473\\r\\n\", \"output\": [\"35274446\"]}, {\"input\": \"470\\r\\n\", \"output\": [\"34607508\"]}, {\"input\": \"467\\r\\n\", \"output\": [\"33949030\"]}, {\"input\": \"464\\r\\n\", \"output\": [\"33298958\"]}, {\"input\": \"461\\r\\n\", \"output\": [\"32657238\"]}, {\"input\": \"458\\r\\n\", \"output\": [\"32023816\"]}, {\"input\": \"455\\r\\n\", \"output\": [\"31398638\"]}, {\"input\": \"452\\r\\n\", \"output\": [\"30781650\"]}, {\"input\": \"449\\r\\n\", \"output\": [\"30172798\"]}, {\"input\": \"446\\r\\n\", \"output\": [\"29572028\"]}, {\"input\": \"42\\r\\n\", \"output\": [\"24680\"]}, {\"input\": \"69\\r\\n\", \"output\": [\"109478\"]}, {\"input\": \"228\\r\\n\", \"output\": [\"3950706\"]}, {\"input\": \"233\\r\\n\", \"output\": [\"4216366\"]}, {\"input\": \"420\\r\\n\", \"output\": [\"24695858\"]}, {\"input\": \"368\\r\\n\", \"output\": [\"16611886\"]}, {\"input\": \"225\\r\\n\", \"output\": [\"3796798\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"438\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"570\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"726\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"908\"]}, {\"input\": \"135\\r\\n\", \"output\": [\"820078\"]}, {\"input\": \"199\\r\\n\", \"output\": [\"2626798\"]}, {\"input\": \"137\\r\\n\", \"output\": [\"857070\"]}, {\"input\": \"131\\r\\n\", \"output\": [\"749318\"]}, {\"input\": \"130\\r\\n\", \"output\": [\"732288\"]}, {\"input\": \"139\\r\\n\", \"output\": [\"895158\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '14\\r\\n', 'output': ['908']}, {'input': '233\\r\\n', 'output': ['4216366']}, {'input': '225\\r\\n', 'output': ['3796798']}, {'input': '108\\r\\n', 'output': ['419866']}, {'input': '4\\r\\n', 'output': ['18']}]","human_sample_testcases_2":"[{'input': '473\\r\\n', 'output': ['35274446']}, {'input': '470\\r\\n', 'output': ['34607508']}, {'input': '228\\r\\n', 'output': ['3950706']}, {'input': '225\\r\\n', 'output': ['3796798']}, {'input': '464\\r\\n', 'output': ['33298958']}]","human_sample_testcases_3":"[{'input': '461\\r\\n', 'output': ['32657238']}, {'input': '135\\r\\n', 'output': ['820078']}, {'input': '130\\r\\n', 'output': ['732288']}, {'input': '473\\r\\n', 'output': ['35274446']}, {'input': '479\\r\\n', 'output': ['36633918']}]","human_sample_testcases_4":"[{'input': '4\\r\\n', 'output': ['18']}, {'input': '10\\r\\n', 'output': ['328']}, {'input': '446\\r\\n', 'output': ['29572028']}, {'input': '106\\r\\n', 'output': ['396968']}, {'input': '105\\r\\n', 'output': ['385838']}]","human_sample_testcases_5":"[{'input': '461\\r\\n', 'output': ['32657238']}, {'input': '101\\r\\n', 'output': ['343398']}, {'input': '103\\r\\n', 'output': ['364206']}, {'input': '497\\r\\n', 'output': ['40920990']}, {'input': '4\\r\\n', 'output': ['18']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":239,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 162\", \"4 42\", \"100 40021\"]","input_specification":"The first line contains two positive integers a and b (1\u2009\u2264\u2009a\u2009<\u2009b\u2009\u2264\u2009109)\u00a0\u2014 the number which Vasily has and the number he wants to have.","src_uid":"fc3adb1a9a7f1122b567b4d8afd7b3f3","source_code":"import java.util.*;\npublic class transformation { \n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int num1 = scan.nextInt();\n int num2 = scan.nextInt(),k=num2;\n ArrayList arr = new ArrayList<>();\n while(num2>num1){\n if(num2%2==0){\n num2=num2\/2;\n arr.add(num2);\n }\n else if(num2%10==1){\n num2=num2\/10;\n arr.add(num2);\n }\n else\n break;\n }\n if(num1==num2){\n System.out.println(\"YES\");\n System.out.println(arr.size()+1);\n for(int i=arr.size()-1;i>=0;i--){\n System.out.print(arr.get(i)+\" \");\n }\n System.out.print(k);\n }\n else\n System.out.println(\"NO\");\n }\n}\n","sample_outputs":"[\"YES\\n5\\n2 4 8 81 162\", \"NO\", \"YES\\n5\\n100 200 2001 4002 40021\"]","lang_cluster":"Java","notes":null,"output_specification":"If there is no way to get b from a, print \"NO\" (without quotes). Otherwise print three lines. On the first line print \"YES\" (without quotes). The second line should contain single integer k\u00a0\u2014 the length of the transformation sequence. On the third line print the sequence of transformations x1,\u2009x2,\u2009...,\u2009xk, where: x1 should be equal to a, xk should be equal to b, xi should be obtained from xi\u2009-\u20091 using any of two described operations (1\u2009<\u2009i\u2009\u2264\u2009k). If there are multiple answers, print any of them.","description":"Vasily has a number a, which he wants to turn into a number b. For this purpose, he can do two types of operations: multiply the current number by 2 (that is, replace the number x by 2\u00b7x); append the digit 1 to the right of current number (that is, replace the number x by 10\u00b7x\u2009+\u20091). You need to help Vasily to transform the number a into the number b using only the operations described above, or find that it is impossible.Note that in this task you are not required to minimize the number of operations. It suffices to find any way to transform a into b.","human_testcases":"[{\"input\": \"2 162\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n2 4 8 81 162\"]}, {\"input\": \"4 42\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 40021\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n100 200 2001 4002 40021\"]}, {\"input\": \"1 111111111\\r\\n\", \"output\": [\"YES\\r\\n9\\r\\n1 11 111 1111 11111 111111 1111111 11111111 111111111\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"999999999 1000000000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"YES\\r\\n2\\r\\n1 2\"]}, {\"input\": \"1 536870912\\r\\n\", \"output\": [\"YES\\r\\n30\\r\\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 4194304 8388608 16777216 33554432 67108864 134217728 268435456 536870912\"]}, {\"input\": \"11111 11111111\\r\\n\", \"output\": [\"YES\\r\\n4\\r\\n11111 111111 1111111 11111111\"]}, {\"input\": \"59139 946224\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n59139 118278 236556 473112 946224\"]}, {\"input\": \"9859 19718\\r\\n\", \"output\": [\"YES\\r\\n2\\r\\n9859 19718\"]}, {\"input\": \"25987 51974222\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n25987 259871 2598711 25987111 51974222\"]}, {\"input\": \"9411 188222222\\r\\n\", \"output\": [\"YES\\r\\n6\\r\\n9411 94111 941111 9411111 94111111 188222222\"]}, {\"input\": \"25539 510782222\\r\\n\", \"output\": [\"YES\\r\\n6\\r\\n25539 255391 2553911 25539111 255391111 510782222\"]}, {\"input\": \"76259 610072\\r\\n\", \"output\": [\"YES\\r\\n4\\r\\n76259 152518 305036 610072\"]}, {\"input\": \"92387 184774\\r\\n\", \"output\": [\"YES\\r\\n2\\r\\n92387 184774\"]}, {\"input\": \"8515 85151111\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n8515 85151 851511 8515111 85151111\"]}, {\"input\": \"91939 9193911\\r\\n\", \"output\": [\"YES\\r\\n3\\r\\n91939 919391 9193911\"]}, {\"input\": \"30518 610361\\r\\n\", \"output\": [\"YES\\r\\n3\\r\\n30518 61036 610361\"]}, {\"input\": \"46646 373168844\\r\\n\", \"output\": [\"YES\\r\\n7\\r\\n46646 466461 932922 9329221 93292211 186584422 373168844\"]}, {\"input\": \"30070 300701\\r\\n\", \"output\": [\"YES\\r\\n2\\r\\n30070 300701\"]}, {\"input\": \"13494 1079528\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n13494 134941 269882 539764 1079528\"]}, {\"input\": \"96918 775344422\\r\\n\", \"output\": [\"YES\\r\\n7\\r\\n96918 193836 1938361 3876722 38767221 387672211 775344422\"]}, {\"input\": \"13046 260921\\r\\n\", \"output\": [\"YES\\r\\n3\\r\\n13046 26092 260921\"]}, {\"input\": \"29174 5834811\\r\\n\", \"output\": [\"YES\\r\\n4\\r\\n29174 58348 583481 5834811\"]}, {\"input\": \"79894 319576421\\r\\n\", \"output\": [\"YES\\r\\n6\\r\\n79894 798941 1597882 15978821 31957642 319576421\"]}, {\"input\": \"96022 1920442\\r\\n\", \"output\": [\"YES\\r\\n3\\r\\n96022 960221 1920442\"]}, {\"input\": \"79446 6355681\\r\\n\", \"output\": [\"YES\\r\\n5\\r\\n79446 158892 317784 635568 6355681\"]}, {\"input\": \"5440 27853056\\r\\n\", \"output\": [\"YES\\r\\n11\\r\\n5440 10880 108801 217602 435204 870408 1740816 3481632 6963264 13926528 27853056\"]}, {\"input\": \"250000000 705032705\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"17 35\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 11\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 111111111\\r\\n', 'output': ['YES\\r\\n9\\r\\n1 11 111 1111 11111 111111 1111111 11111111 111111111']}, {'input': '79446 6355681\\r\\n', 'output': ['YES\\r\\n5\\r\\n79446 158892 317784 635568 6355681']}, {'input': '1 3\\r\\n', 'output': ['NO']}, {'input': '46646 373168844\\r\\n', 'output': ['YES\\r\\n7\\r\\n46646 466461 932922 9329221 93292211 186584422 373168844']}, {'input': '13494 1079528\\r\\n', 'output': ['YES\\r\\n5\\r\\n13494 134941 269882 539764 1079528']}]","human_sample_testcases_2":"[{'input': '25987 51974222\\r\\n', 'output': ['YES\\r\\n5\\r\\n25987 259871 2598711 25987111 51974222']}, {'input': '29174 5834811\\r\\n', 'output': ['YES\\r\\n4\\r\\n29174 58348 583481 5834811']}, {'input': '1 3\\r\\n', 'output': ['NO']}, {'input': '1 1000000000\\r\\n', 'output': ['NO']}, {'input': '59139 946224\\r\\n', 'output': ['YES\\r\\n5\\r\\n59139 118278 236556 473112 946224']}]","human_sample_testcases_3":"[{'input': '30070 300701\\r\\n', 'output': ['YES\\r\\n2\\r\\n30070 300701']}, {'input': '100 40021\\r\\n', 'output': ['YES\\r\\n5\\r\\n100 200 2001 4002 40021']}, {'input': '250000000 705032705\\r\\n', 'output': ['NO']}, {'input': '5440 27853056\\r\\n', 'output': ['YES\\r\\n11\\r\\n5440 10880 108801 217602 435204 870408 1740816 3481632 6963264 13926528 27853056']}, {'input': '79894 319576421\\r\\n', 'output': ['YES\\r\\n6\\r\\n79894 798941 1597882 15978821 31957642 319576421']}]","human_sample_testcases_4":"[{'input': '5440 27853056\\r\\n', 'output': ['YES\\r\\n11\\r\\n5440 10880 108801 217602 435204 870408 1740816 3481632 6963264 13926528 27853056']}, {'input': '2 11\\r\\n', 'output': ['NO']}, {'input': '13494 1079528\\r\\n', 'output': ['YES\\r\\n5\\r\\n13494 134941 269882 539764 1079528']}, {'input': '25539 510782222\\r\\n', 'output': ['YES\\r\\n6\\r\\n25539 255391 2553911 25539111 255391111 510782222']}, {'input': '9411 188222222\\r\\n', 'output': ['YES\\r\\n6\\r\\n9411 94111 941111 9411111 94111111 188222222']}]","human_sample_testcases_5":"[{'input': '13046 260921\\r\\n', 'output': ['YES\\r\\n3\\r\\n13046 26092 260921']}, {'input': '92387 184774\\r\\n', 'output': ['YES\\r\\n2\\r\\n92387 184774']}, {'input': '76259 610072\\r\\n', 'output': ['YES\\r\\n4\\r\\n76259 152518 305036 610072']}, {'input': '91939 9193911\\r\\n', 'output': ['YES\\r\\n3\\r\\n91939 919391 9193911']}, {'input': '1 3\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":100.0,"id":240,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":98.0} {"sample_inputs":"[\"4\\n5\\n6\\n3\\n1\\n2\", \"12\\n11\\n13\\n20\\n4\\n6\", \"17\\n14\\n5\\n21\\n15\\n17\"]","input_specification":"The first line contains one integer $$$a$$$ $$$(1 \\le a \\le 100\\,000)$$$ \u2014 the number of ties. The second line contains one integer $$$b$$$ $$$(1 \\le b \\le 100\\,000)$$$ \u2014 the number of scarves. The third line contains one integer $$$c$$$ $$$(1 \\le c \\le 100\\,000)$$$ \u2014 the number of vests. The fourth line contains one integer $$$d$$$ $$$(1 \\le d \\le 100\\,000)$$$ \u2014 the number of jackets. The fifth line contains one integer $$$e$$$ $$$(1 \\le e \\le 1\\,000)$$$ \u2014 the cost of one suit of the first type. The sixth line contains one integer $$$f$$$ $$$(1 \\le f \\le 1\\,000)$$$ \u2014 the cost of one suit of the second type.","src_uid":"84d9e7e9c9541d997e6573edb421ae0a","source_code":"\/*package whatever \/\/do not write package name here *\/\n\nimport java.io.*;\nimport java.util.*;\n\npublic class GFG {\n\tpublic static void main (String[] args) {\n\t Scanner s = new Scanner(System.in);\n\t int a = s.nextInt();\n\t int b = s.nextInt();\n\t int c = s.nextInt();\n\t int d = s.nextInt();\n\t int e = s.nextInt();\n\t int f = s.nextInt();\n\t int cost=0;\n\t if(e0) {\n\t cost=cost+(int)Math.min(a,d)*e; \n\t }\n\t \n\t System.out.println(cost);\n\t }\n\t else {\n\t int min = (int)Math.min(a,d);\n\t \n\t cost=min*e;\n\t \n\t d=d-min;\n\t if(d>0) {\n\t min = (int)Math.min(b,c);\n\t \n\t cost=cost+(int)Math.min(min,d)*f; \n\t }\n\t \n\t System.out.println(cost);\n\t }\n\t \n\t}\n}","sample_outputs":"[\"6\", \"102\", \"325\"]","lang_cluster":"Java","notes":"NoteIt is possible to compose three suits of the second type in the first example, and their total cost will be $$$6$$$. Since all jackets will be used, it's impossible to add anything to this set.The best course of action in the second example is to compose nine suits of the first type and eleven suits of the second type. The total cost is $$$9 \\cdot 4 + 11 \\cdot 6 = 102$$$.","output_specification":"Print one integer \u2014 the maximum total cost of some set of suits that can be composed from the delivered items. ","description":"A new delivery of clothing has arrived today to the clothing store. This delivery consists of $$$a$$$ ties, $$$b$$$ scarves, $$$c$$$ vests and $$$d$$$ jackets.The store does not sell single clothing items \u2014 instead, it sells suits of two types: a suit of the first type consists of one tie and one jacket; a suit of the second type consists of one scarf, one vest and one jacket. Each suit of the first type costs $$$e$$$ coins, and each suit of the second type costs $$$f$$$ coins.Calculate the maximum possible cost of a set of suits that can be composed from the delivered clothing items. Note that one item cannot be used in more than one suit (though some items may be left unused).","human_testcases":"[{\"input\": \"4\\r\\n5\\r\\n6\\r\\n3\\r\\n1\\r\\n2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"12\\r\\n11\\r\\n13\\r\\n20\\r\\n4\\r\\n6\\r\\n\", \"output\": [\"102\"]}, {\"input\": \"17\\r\\n14\\r\\n5\\r\\n21\\r\\n15\\r\\n17\\r\\n\", \"output\": [\"325\"]}, {\"input\": \"43475\\r\\n48103\\r\\n50473\\r\\n97918\\r\\n991\\r\\n974\\r\\n\", \"output\": [\"89936047\"]}, {\"input\": \"35361\\r\\n35182\\r\\n68078\\r\\n30077\\r\\n870\\r\\n907\\r\\n\", \"output\": [\"27279839\"]}, {\"input\": \"84205\\r\\n15736\\r\\n30259\\r\\n79331\\r\\n647\\r\\n378\\r\\n\", \"output\": [\"51327157\"]}, {\"input\": \"220\\r\\n623\\r\\n94\\r\\n463\\r\\n28\\r\\n656\\r\\n\", \"output\": [\"67824\"]}, {\"input\": \"100000\\r\\n100000\\r\\n100000\\r\\n100000\\r\\n1000\\r\\n1\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"22606\\r\\n4759\\r\\n37264\\r\\n19105\\r\\n787\\r\\n237\\r\\n\", \"output\": [\"15035635\"]}, {\"input\": \"630\\r\\n312\\r\\n279\\r\\n823\\r\\n316\\r\\n915\\r\\n\", \"output\": [\"427189\"]}, {\"input\": \"86516\\r\\n30436\\r\\n14408\\r\\n80824\\r\\n605\\r\\n220\\r\\n\", \"output\": [\"48898520\"]}, {\"input\": \"1\\r\\n1\\r\\n1\\r\\n2\\r\\n100\\r\\n200\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"406\\r\\n847\\r\\n512\\r\\n65\\r\\n86\\r\\n990\\r\\n\", \"output\": [\"64350\"]}, {\"input\": \"250\\r\\n400\\r\\n766\\r\\n246\\r\\n863\\r\\n166\\r\\n\", \"output\": [\"212298\"]}, {\"input\": \"724\\r\\n20\\r\\n391\\r\\n850\\r\\n639\\r\\n149\\r\\n\", \"output\": [\"465616\"]}, {\"input\": \"30233\\r\\n27784\\r\\n36393\\r\\n81065\\r\\n782\\r\\n953\\r\\n\", \"output\": [\"50120358\"]}, {\"input\": \"61455\\r\\n43924\\r\\n94322\\r\\n83903\\r\\n855\\r\\n232\\r\\n\", \"output\": [\"57751961\"]}, {\"input\": \"68576\\r\\n46084\\r\\n31772\\r\\n10708\\r\\n632\\r\\n408\\r\\n\", \"output\": [\"6767456\"]}, {\"input\": \"19969\\r\\n99297\\r\\n44283\\r\\n67490\\r\\n71\\r\\n20\\r\\n\", \"output\": [\"2303459\"]}, {\"input\": \"68814\\r\\n96071\\r\\n14437\\r\\n59848\\r\\n848\\r\\n195\\r\\n\", \"output\": [\"50751104\"]}, {\"input\": \"58253\\r\\n17658\\r\\n9101\\r\\n94990\\r\\n625\\r\\n178\\r\\n\", \"output\": [\"38028103\"]}, {\"input\": \"179\\r\\n762\\r\\n909\\r\\n155\\r\\n768\\r\\n278\\r\\n\", \"output\": [\"119040\"]}, {\"input\": \"240\\r\\n655\\r\\n943\\r\\n1000\\r\\n545\\r\\n262\\r\\n\", \"output\": [\"302410\"]}, {\"input\": \"844\\r\\n909\\r\\n790\\r\\n209\\r\\n809\\r\\n949\\r\\n\", \"output\": [\"198341\"]}, {\"input\": \"15122\\r\\n4341\\r\\n98868\\r\\n60319\\r\\n760\\r\\n49\\r\\n\", \"output\": [\"11705429\"]}, {\"input\": \"23929\\r\\n40873\\r\\n44600\\r\\n53185\\r\\n833\\r\\n328\\r\\n\", \"output\": [\"29528825\"]}, {\"input\": \"6781\\r\\n2030\\r\\n73183\\r\\n45619\\r\\n802\\r\\n208\\r\\n\", \"output\": [\"5860602\"]}, {\"input\": \"260\\r\\n538\\r\\n587\\r\\n231\\r\\n49\\r\\n308\\r\\n\", \"output\": [\"71148\"]}, {\"input\": \"91\\r\\n75\\r\\n768\\r\\n322\\r\\n530\\r\\n291\\r\\n\", \"output\": [\"70055\"]}, {\"input\": \"438\\r\\n541\\r\\n215\\r\\n575\\r\\n795\\r\\n274\\r\\n\", \"output\": [\"385748\"]}, {\"input\": \"756\\r\\n608\\r\\n949\\r\\n947\\r\\n746\\r\\n375\\r\\n\", \"output\": [\"635601\"]}, {\"input\": \"129\\r\\n203\\r\\n206\\r\\n749\\r\\n11\\r\\n358\\r\\n\", \"output\": [\"74093\"]}, {\"input\": \"6870\\r\\n43115\\r\\n61342\\r\\n70498\\r\\n34\\r\\n145\\r\\n\", \"output\": [\"6485255\"]}, {\"input\": \"72593\\r\\n77891\\r\\n86639\\r\\n87424\\r\\n3\\r\\n617\\r\\n\", \"output\": [\"48087346\"]}, {\"input\": \"58967\\r\\n2953\\r\\n35483\\r\\n681\\r\\n780\\r\\n304\\r\\n\", \"output\": [\"531180\"]}, {\"input\": \"88\\r\\n476\\r\\n735\\r\\n980\\r\\n731\\r\\n404\\r\\n\", \"output\": [\"256632\"]}, {\"input\": \"988\\r\\n657\\r\\n824\\r\\n346\\r\\n996\\r\\n387\\r\\n\", \"output\": [\"344616\"]}, {\"input\": \"92\\r\\n346\\r\\n431\\r\\n669\\r\\n773\\r\\n563\\r\\n\", \"output\": [\"265914\"]}, {\"input\": \"685\\r\\n236\\r\\n234\\r\\n965\\r\\n101\\r\\n832\\r\\n\", \"output\": [\"263873\"]}, {\"input\": \"234\\r\\n519\\r\\n610\\r\\n886\\r\\n877\\r\\n815\\r\\n\", \"output\": [\"628203\"]}, {\"input\": \"184\\r\\n301\\r\\n373\\r\\n420\\r\\n93\\r\\n602\\r\\n\", \"output\": [\"192269\"]}, {\"input\": \"627\\r\\n737\\r\\n778\\r\\n968\\r\\n870\\r\\n74\\r\\n\", \"output\": [\"570724\"]}, {\"input\": \"81001\\r\\n64465\\r\\n98287\\r\\n68848\\r\\n309\\r\\n982\\r\\n\", \"output\": [\"64658977\"]}, {\"input\": \"60469\\r\\n13310\\r\\n49402\\r\\n62958\\r\\n790\\r\\n861\\r\\n\", \"output\": [\"50681830\"]}, {\"input\": \"88020\\r\\n62154\\r\\n14139\\r\\n86851\\r\\n863\\r\\n844\\r\\n\", \"output\": [\"74952413\"]}, {\"input\": \"66\\r\\n393\\r\\n648\\r\\n651\\r\\n6\\r\\n648\\r\\n\", \"output\": [\"255060\"]}, {\"input\": \"647\\r\\n495\\r\\n516\\r\\n125\\r\\n79\\r\\n928\\r\\n\", \"output\": [\"116000\"]}, {\"input\": \"708\\r\\n774\\r\\n307\\r\\n44\\r\\n47\\r\\n103\\r\\n\", \"output\": [\"4532\"]}, {\"input\": \"27989\\r\\n77786\\r\\n5733\\r\\n14112\\r\\n294\\r\\n715\\r\\n\", \"output\": [\"6562521\"]}, {\"input\": \"76294\\r\\n65438\\r\\n30385\\r\\n94336\\r\\n71\\r\\n891\\r\\n\", \"output\": [\"31613556\"]}, {\"input\": \"5771\\r\\n19397\\r\\n45992\\r\\n46525\\r\\n336\\r\\n170\\r\\n\", \"output\": [\"5236546\"]}, {\"input\": \"25432\\r\\n28656\\r\\n46763\\r\\n79950\\r\\n64\\r\\n957\\r\\n\", \"output\": [\"29051440\"]}, {\"input\": \"132\\r\\n402\\r\\n711\\r\\n790\\r\\n33\\r\\n837\\r\\n\", \"output\": [\"340830\"]}, {\"input\": \"100000\\r\\n100000\\r\\n100000\\r\\n100000\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"100000\\r\\n100000\\r\\n100000\\r\\n100000\\r\\n1000\\r\\n1000\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"1\\r\\n2\\r\\n3\\r\\n4\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n1\\r\\n2\\r\\n5\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n2\\r\\n2\\r\\n2\\r\\n2\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1\\r\\n4\\r\\n5\\r\\n6\\r\\n8\\r\\n8\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"10\\r\\n1\\r\\n1\\r\\n10\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1\\r\\n1\\r\\n1\\r\\n2\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '630\\r\\n312\\r\\n279\\r\\n823\\r\\n316\\r\\n915\\r\\n', 'output': ['427189']}, {'input': '68576\\r\\n46084\\r\\n31772\\r\\n10708\\r\\n632\\r\\n408\\r\\n', 'output': ['6767456']}, {'input': '1\\r\\n4\\r\\n5\\r\\n6\\r\\n8\\r\\n8\\r\\n', 'output': ['40']}, {'input': '72593\\r\\n77891\\r\\n86639\\r\\n87424\\r\\n3\\r\\n617\\r\\n', 'output': ['48087346']}, {'input': '88020\\r\\n62154\\r\\n14139\\r\\n86851\\r\\n863\\r\\n844\\r\\n', 'output': ['74952413']}]","human_sample_testcases_2":"[{'input': '1\\r\\n4\\r\\n5\\r\\n6\\r\\n8\\r\\n8\\r\\n', 'output': ['40']}, {'input': '406\\r\\n847\\r\\n512\\r\\n65\\r\\n86\\r\\n990\\r\\n', 'output': ['64350']}, {'input': '27989\\r\\n77786\\r\\n5733\\r\\n14112\\r\\n294\\r\\n715\\r\\n', 'output': ['6562521']}, {'input': '844\\r\\n909\\r\\n790\\r\\n209\\r\\n809\\r\\n949\\r\\n', 'output': ['198341']}, {'input': '35361\\r\\n35182\\r\\n68078\\r\\n30077\\r\\n870\\r\\n907\\r\\n', 'output': ['27279839']}]","human_sample_testcases_3":"[{'input': '132\\r\\n402\\r\\n711\\r\\n790\\r\\n33\\r\\n837\\r\\n', 'output': ['340830']}, {'input': '27989\\r\\n77786\\r\\n5733\\r\\n14112\\r\\n294\\r\\n715\\r\\n', 'output': ['6562521']}, {'input': '100000\\r\\n100000\\r\\n100000\\r\\n100000\\r\\n1000\\r\\n1\\r\\n', 'output': ['100000000']}, {'input': '86516\\r\\n30436\\r\\n14408\\r\\n80824\\r\\n605\\r\\n220\\r\\n', 'output': ['48898520']}, {'input': '58253\\r\\n17658\\r\\n9101\\r\\n94990\\r\\n625\\r\\n178\\r\\n', 'output': ['38028103']}]","human_sample_testcases_4":"[{'input': '6\\r\\n1\\r\\n2\\r\\n5\\r\\n1\\r\\n1\\r\\n', 'output': ['5']}, {'input': '179\\r\\n762\\r\\n909\\r\\n155\\r\\n768\\r\\n278\\r\\n', 'output': ['119040']}, {'input': '25432\\r\\n28656\\r\\n46763\\r\\n79950\\r\\n64\\r\\n957\\r\\n', 'output': ['29051440']}, {'input': '17\\r\\n14\\r\\n5\\r\\n21\\r\\n15\\r\\n17\\r\\n', 'output': ['325']}, {'input': '129\\r\\n203\\r\\n206\\r\\n749\\r\\n11\\r\\n358\\r\\n', 'output': ['74093']}]","human_sample_testcases_5":"[{'input': '1\\r\\n1\\r\\n1\\r\\n2\\r\\n100\\r\\n200\\r\\n', 'output': ['300']}, {'input': '68576\\r\\n46084\\r\\n31772\\r\\n10708\\r\\n632\\r\\n408\\r\\n', 'output': ['6767456']}, {'input': '72593\\r\\n77891\\r\\n86639\\r\\n87424\\r\\n3\\r\\n617\\r\\n', 'output': ['48087346']}, {'input': '627\\r\\n737\\r\\n778\\r\\n968\\r\\n870\\r\\n74\\r\\n', 'output': ['570724']}, {'input': '5771\\r\\n19397\\r\\n45992\\r\\n46525\\r\\n336\\r\\n170\\r\\n', 'output': ['5236546']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":92.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":83.33,"id":241,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.4,"human_sample_branch_coverage":79.998} {"sample_inputs":"[\"8\\nbacabcab\", \"4\\nbcda\", \"6\\nabbbbb\"]","input_specification":"The only line of the input contains one integer $$$|s|$$$ ($$$1 \\le |s| \\le 100$$$) \u2014 the length of $$$s$$$. The second line of the input contains one string $$$s$$$ consisting of $$$|s|$$$ lowercase Latin letters.","src_uid":"9ce37bc2d361f5bb8a0568fb479b8a38","source_code":"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tString str = in.next();\n\t\tSystem.out.println(getAns(str, N));\n\t\tin.close();\n\t}\n\n\tpublic static int getAns(String str, int N) {\n\t\tint ans = 0;\n\t\tStringBuilder sb = new StringBuilder(str);\n\t\tfor (int i = 25; i >= 0; i--) {\n\t\t\tchar ch = (char) (97 + i);\n\t\t\tfor (int j = 0; j < sb.length(); j++) {\n\t\t\t\tif (sb.length() == 1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tchar ch1 = sb.charAt(j);\n\t\t\t\tif (ch != ch1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\/\/\t\t\t\tSystem.out.println(j);\n\t\t\t\tif (j == 0 && ((int) ch - 1 == (int) sb.charAt(j + 1))) {\n\t\t\t\t\t\/\/System.out.println(\"leftMost \" + j);\n\t\t\t\t\tsb.deleteCharAt(j);\n\t\t\t\t\tans++;\n\t\t\t\t\tj -= 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if (j == sb.length() - 1 && ((int) ch - 1 == (int) sb.charAt(j - 1))) {\n\t\t\t\t\t\/\/System.out.println(\"rightMost \" + j);\n\t\t\t\t\tsb.deleteCharAt(j);\n\t\t\t\t\tans++;\n\t\t\t\t\tj -= 1;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else if ((j < sb.length() - 1 && (int) ch - 1 == (int) sb.charAt(j + 1))\n\t\t\t\t\t\t|| (j > 0 && (int) ch - 1 == (int) sb.charAt(j - 1))) {\n\t\t\t\t\t\/\/System.out.println(\"middle \" + j);\n\t\t\t\t\tsb.deleteCharAt(j);\n\t\t\t\t\tans++;\n\t\t\t\t\tj -= 2;\n\t\t\t\t\t\/\/System.out.println(\"middle \" + j + \" \" + sb.toString() + \" \" + sb.length());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\/\/System.out.println(sb.toString());\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n\n}\n","sample_outputs":"[\"4\", \"3\", \"5\"]","lang_cluster":"Java","notes":"NoteThe first example is described in the problem statement. Note that the sequence of moves provided in the statement is not the only, but it can be shown that the maximum possible answer to this test is $$$4$$$.In the second example, you can remove all but one character of $$$s$$$. The only possible answer follows. During the first move, remove the third character $$$s_3=$$$ d, $$$s$$$ becomes bca. During the second move, remove the second character $$$s_2=$$$ c, $$$s$$$ becomes ba. And during the third move, remove the first character $$$s_1=$$$ b, $$$s$$$ becomes a. ","output_specification":"Print one integer \u2014 the maximum possible number of characters you can remove if you choose the sequence of moves optimally.","description":"You are given a string $$$s$$$ consisting of lowercase Latin letters. Let the length of $$$s$$$ be $$$|s|$$$. You may perform several operations on this string.In one operation, you can choose some index $$$i$$$ and remove the $$$i$$$-th character of $$$s$$$ ($$$s_i$$$) if at least one of its adjacent characters is the previous letter in the Latin alphabet for $$$s_i$$$. For example, the previous letter for b is a, the previous letter for s is r, the letter a has no previous letters. Note that after each removal the length of the string decreases by one. So, the index $$$i$$$ should satisfy the condition $$$1 \\le i \\le |s|$$$ during each operation.For the character $$$s_i$$$ adjacent characters are $$$s_{i-1}$$$ and $$$s_{i+1}$$$. The first and the last characters of $$$s$$$ both have only one adjacent character (unless $$$|s| = 1$$$).Consider the following example. Let $$$s=$$$ bacabcab. During the first move, you can remove the first character $$$s_1=$$$ b because $$$s_2=$$$ a. Then the string becomes $$$s=$$$ acabcab. During the second move, you can remove the fifth character $$$s_5=$$$ c because $$$s_4=$$$ b. Then the string becomes $$$s=$$$ acabab. During the third move, you can remove the sixth character $$$s_6=$$$'b' because $$$s_5=$$$ a. Then the string becomes $$$s=$$$ acaba. During the fourth move, the only character you can remove is $$$s_4=$$$ b, because $$$s_3=$$$ a (or $$$s_5=$$$ a). The string becomes $$$s=$$$ acaa and you cannot do anything with it. Your task is to find the maximum possible number of characters you can remove if you choose the sequence of operations optimally.","human_testcases":"[{\"input\": \"8\\r\\nbacabcab\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4\\r\\nbcda\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\nabbbbb\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\na\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\nt\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\nciftajmzqbfkvbhnyugneialytrkwjlhzwltylptheadmypbjxdzkxnqovimgmzkwpuelzbbhciinfiyspfatgoexeezolulnliu\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\nyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"100\\r\\naaaaaabbcccccccddffffhhhhhhhhiiiiiikkkkkkkkmmmmmmooooooopppprrrrrrrrrttttttvvvvvvvvvvvvxxxxxxxzzzzzz\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"100\\r\\nbabaababbaabbabababbabbbababababbaabababaaababaababbbaaababbaabbababababbababbabaabbaabaaaaabbababba\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"100\\r\\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"100\\r\\nacdfijmnorszzyyzzzzzzyzzyzzzzxwzzzzzyzzzzzzyzzzzzzzyzzzzzyzzzzzzyxzzzyzzzzzyzzzzzyzzyzzzzvutqplkhgeb\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"100\\r\\nabcdeghfgefedeefcabaaabcedfefedacbbcaaabehhjlkjikjloqrtuyzxwvspnmnlkjgfdcbacdcghfedfebaacbcbcdbccaaa\\r\\n\", \"output\": [\"85\"]}, {\"input\": \"100\\r\\nababaaaabaabaaaaaaabaaaaaaaaaaaaacbaaaabaaaaaabaabaaaababaaaabaehijkmnpqvxzywutsrolgfdcbaaaabaabaaaa\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"100\\r\\naaaaaaabaaaaaabcaaaaaaaaaaaaaaaaaaaabbbaaaaaaabefhklmnopsuxzywvtrqjigdcaaaaaaaaaaaaaaaaaaaaaaaabaaaa\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"100\\r\\naaaaabcjkprsvxyzwutqonmlihgfedaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"100\\r\\nyltrygcqmgjzsxoahbvovspancmoaltdrxgjnxwxbrehubvradguoqgiodzanljxtszdutuzgcnihmwevoloceyidyvoopnqbtlb\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"100\\r\\naaaabbbcccccccdddddeeeeeffgggghhhiijjjjkkkllmmnnnoooppqqqrrrrssssssttttuuuuuuuuvvvvvwwwwxxxxyyyyzzzz\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"100\\r\\nrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\njupemetthxolktvhbmzdwlrekwmcugngajdgifwseksjlibsdgmegmqtmeeeqszqjxjhjenjxofvkesfjugbzephryjqqkxatrvl\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\nmxjrojjwtrauhhccftvjsyfyfsnbdnwjfltyjetsylbddrkoqjxbmientcowknrecfqcvxfgsbymwyvakmbulhvrxzvzbygajtgc\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\nbldubjepvkwhjbxrueydtpparjszjgwpxjlqlpsmdrjoaagfnrohfcabchmdwaoctmilfbpztwjrfdgdioqggokdftcniqywmvjd\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\nzbzevxgewibujtbyvhzohoobudkghaivlbpaywiesizahkdxmcpdoqzsxqglezenmsgvsmxcrzcntauvarpakddglhrjmzylfuyq\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100\\r\\nwhkbjjjrpcgsfaxgcmktmwypyfhbzvvowkvxltbmnyndqkswixxqxriopddrygymbcvadjjheugxgikrlirnhhsmnjmzpizyltau\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\nz\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5\\r\\nbabaa\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\nabbdd\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6\\r\\naaaaaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\nbbbbab\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6\\r\\nbaabbb\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\ndacbab\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\naaaaaaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7\\r\\nbaaabab\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\nccababa\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\ncddcbcb\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8\\r\\naaaaaaaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\naaabbaab\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\nabababbc\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8\\r\\nbdaacddc\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9\\r\\naaaaaaaaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9\\r\\naabaaabab\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9\\r\\nbaccbbaca\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"9\\r\\nacacaabaa\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\naaaaaaaaaa\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\nbbaabaabbb\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10\\r\\ncbbbbcaaca\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10\\r\\ncadbcdddda\\r\\n\", \"output\": [\"6\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6\\r\\nbbbbab\\r\\n', 'output': ['5']}, {'input': '1\\r\\na\\r\\n', 'output': ['0']}, {'input': '100\\r\\naaaaaaabaaaaaabcaaaaaaaaaaaaaaaaaaaabbbaaaaaaabefhklmnopsuxzywvtrqjigdcaaaaaaaaaaaaaaaaaaaaaaaabaaaa\\r\\n', 'output': ['32']}, {'input': '5\\r\\nbabaa\\r\\n', 'output': ['2']}, {'input': '100\\r\\nababaaaabaabaaaaaaabaaaaaaaaaaaaacbaaaabaaaaaabaabaaaababaaaabaehijkmnpqvxzywutsrolgfdcbaaaabaabaaaa\\r\\n', 'output': ['40']}]","human_sample_testcases_2":"[{'input': '100\\r\\nababaaaabaabaaaaaaabaaaaaaaaaaaaacbaaaabaaaaaabaabaaaababaaaabaehijkmnpqvxzywutsrolgfdcbaaaabaabaaaa\\r\\n', 'output': ['40']}, {'input': '100\\r\\nacdfijmnorszzyyzzzzzzyzzyzzzzxwzzzzzyzzzzzzyzzzzzzzyzzzzzyzzzzzzyxzzzyzzzzzyzzzzzyzzyzzzzvutqplkhgeb\\r\\n', 'output': ['99']}, {'input': '100\\r\\naaaaabcjkprsvxyzwutqonmlihgfedaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['26']}, {'input': '6\\r\\nbbbbab\\r\\n', 'output': ['5']}, {'input': '100\\r\\nwhkbjjjrpcgsfaxgcmktmwypyfhbzvvowkvxltbmnyndqkswixxqxriopddrygymbcvadjjheugxgikrlirnhhsmnjmzpizyltau\\r\\n', 'output': ['5']}]","human_sample_testcases_3":"[{'input': '6\\r\\nbbbbab\\r\\n', 'output': ['5']}, {'input': '100\\r\\nciftajmzqbfkvbhnyugneialytrkwjlhzwltylptheadmypbjxdzkxnqovimgmzkwpuelzbbhciinfiyspfatgoexeezolulnliu\\r\\n', 'output': ['0']}, {'input': '100\\r\\nacdfijmnorszzyyzzzzzzyzzyzzzzxwzzzzzyzzzzzzyzzzzzzzyzzzzzyzzzzzzyxzzzyzzzzzyzzzzzyzzyzzzzvutqplkhgeb\\r\\n', 'output': ['99']}, {'input': '100\\r\\nmxjrojjwtrauhhccftvjsyfyfsnbdnwjfltyjetsylbddrkoqjxbmientcowknrecfqcvxfgsbymwyvakmbulhvrxzvzbygajtgc\\r\\n', 'output': ['2']}, {'input': '8\\r\\nbdaacddc\\r\\n', 'output': ['2']}]","human_sample_testcases_4":"[{'input': '100\\r\\naaaabbbcccccccdddddeeeeeffgggghhhiijjjjkkkllmmnnnoooppqqqrrrrssssssttttuuuuuuuuvvvvvwwwwxxxxyyyyzzzz\\r\\n', 'output': ['96']}, {'input': '100\\r\\nabcdeghfgefedeefcabaaabcedfefedacbbcaaabehhjlkjikjloqrtuyzxwvspnmnlkjgfdcbacdcghfedfebaacbcbcdbccaaa\\r\\n', 'output': ['85']}, {'input': '6\\r\\nbbbbab\\r\\n', 'output': ['5']}, {'input': '4\\r\\nbcda\\r\\n', 'output': ['3']}, {'input': '8\\r\\nbdaacddc\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '9\\r\\nbaccbbaca\\r\\n', 'output': ['5']}, {'input': '4\\r\\nbcda\\r\\n', 'output': ['3']}, {'input': '6\\r\\nbbbbab\\r\\n', 'output': ['5']}, {'input': '100\\r\\nbldubjepvkwhjbxrueydtpparjszjgwpxjlqlpsmdrjoaagfnrohfcabchmdwaoctmilfbpztwjrfdgdioqggokdftcniqywmvjd\\r\\n', 'output': ['3']}, {'input': '7\\r\\ncddcbcb\\r\\n', 'output': ['5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":242,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"21\", \"20\"]","input_specification":"The first line contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009109).","src_uid":"ae20ae2a16273a0d379932d6e973f878","source_code":"import java.io.*;\nimport java.util.ArrayList;\nimport java.util.StringTokenizer;\n\n\/**\n *\n * @author arif_\n * @date\n * @algo\n * @difficulty\n *\/\npublic class CF_876C {\n \/* START OF I\/O ROUTINE *\/\n \/\/ PrintWriter for faster output\n public static PrintWriter out;\n\n \/\/ MyInputReader class for faster input\n public static class MyInputReader {\n BufferedReader br;\n StringTokenizer st;\n\n public MyInputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream), 32768);\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine(){\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n } \/\/ end of class MyInputReader\n \/* END OF I\/O ROUTINE *\/\n\n\n public static void main(String[] args) {\n MyInputReader in = new MyInputReader(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n\n int n = in.nextInt();\n\n ArrayList ans = new ArrayList();\n for (int i=81; i>=1; i--) {\n if (i >= n) continue;\n\n int x = n - i;\n int sum = 0, y = x;\n while (y > 0) {\n sum += (y % 10);\n y \/= 10;\n }\n\n if (sum+x == n) ans.add(x);\n }\n\n out.println(ans.size());\n for (Integer a : ans) {\n out.println(a);\n }\n out.close();\n } \/\/ end of method main()\n} \/\/ end of class Main","sample_outputs":"[\"1\\n15\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first test case x\u2009=\u200915 there is only one variant: 15\u2009+\u20091\u2009+\u20095\u2009=\u200921.In the second test case there are no such x.","output_specification":"In the first line print one integer k\u00a0\u2014 number of different values of x satisfying the condition. In next k lines print these values in ascending order.","description":"Eighth-grader Vova is on duty today in the class. After classes, he went into the office to wash the board, and found on it the number n. He asked what is this number and the teacher of mathematics Inna Petrovna answered Vova that n is the answer to the arithmetic task for first-graders. In the textbook, a certain positive integer x was given. The task was to add x to the sum of the digits of the number x written in decimal numeral system.Since the number n on the board was small, Vova quickly guessed which x could be in the textbook. Now he wants to get a program which will search for arbitrary values of the number n for all suitable values of x or determine that such x does not exist. Write such a program for Vova.","human_testcases":"[{\"input\": \"21\\r\\n\", \"output\": [\"1\\r\\n15\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000001\\r\\n\", \"output\": [\"2\\r\\n99999937\\r\\n 100000000\", \"2\\r\\n99999937 100000000\", \"2\\r\\n99999937\\r\\n100000000\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"1\\r\\n999999932\"]}, {\"input\": \"999999979\\r\\n\", \"output\": [\"2\\r\\n999999899\\r\\n 999999908\", \"2\\r\\n999999899 999999908\", \"2\\r\\n999999899\\r\\n999999908\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"1\\r\\n5\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"1\\r\\n10\"]}, {\"input\": \"39\\r\\n\", \"output\": [\"1\\r\\n33\"]}, {\"input\": \"66\\r\\n\", \"output\": [\"1\\r\\n60\"]}, {\"input\": \"75\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"1\\r\\n86\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"2\\r\\n91\\r\\n100\", \"2\\r\\n91\\r\\n 100\", \"2\\r\\n91 100\"]}, {\"input\": \"2014\\r\\n\", \"output\": [\"2\\r\\n1988\\r\\n2006\", \"2\\r\\n1988 2006\", \"2\\r\\n1988\\r\\n 2006\"]}, {\"input\": \"999999994\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '66\\r\\n', 'output': ['1\\r\\n60']}, {'input': '2\\r\\n', 'output': ['1\\r\\n1']}, {'input': '39\\r\\n', 'output': ['1\\r\\n33']}, {'input': '20\\r\\n', 'output': ['0']}, {'input': '100000001\\r\\n', 'output': ['2\\r\\n99999937\\r\\n 100000000', '2\\r\\n99999937 100000000', '2\\r\\n99999937\\r\\n100000000']}]","human_sample_testcases_2":"[{'input': '1000000000\\r\\n', 'output': ['1\\r\\n999999932']}, {'input': '101\\r\\n', 'output': ['2\\r\\n91\\r\\n100', '2\\r\\n91\\r\\n 100', '2\\r\\n91 100']}, {'input': '2\\r\\n', 'output': ['1\\r\\n1']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '21\\r\\n', 'output': ['1\\r\\n15']}]","human_sample_testcases_3":"[{'input': '66\\r\\n', 'output': ['1\\r\\n60']}, {'input': '3\\r\\n', 'output': ['0']}, {'input': '100000001\\r\\n', 'output': ['2\\r\\n99999937\\r\\n 100000000', '2\\r\\n99999937 100000000', '2\\r\\n99999937\\r\\n100000000']}, {'input': '39\\r\\n', 'output': ['1\\r\\n33']}, {'input': '20\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '100\\r\\n', 'output': ['1\\r\\n86']}, {'input': '100000001\\r\\n', 'output': ['2\\r\\n99999937\\r\\n 100000000', '2\\r\\n99999937 100000000', '2\\r\\n99999937\\r\\n100000000']}, {'input': '39\\r\\n', 'output': ['1\\r\\n33']}, {'input': '3\\r\\n', 'output': ['0']}, {'input': '999999994\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '11\\r\\n', 'output': ['1\\r\\n10']}, {'input': '3\\r\\n', 'output': ['0']}, {'input': '100\\r\\n', 'output': ['1\\r\\n86']}, {'input': '1000000000\\r\\n', 'output': ['1\\r\\n999999932']}, {'input': '1\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":243,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2\\n5\\n7\", \"4\\n7\\n13\", \"2\\n3\\n2\"]","input_specification":"The first line contains the positive integer a (1\u2009\u2264\u2009a\u2009\u2264\u20091000)\u00a0\u2014 the number of lemons Nikolay has. The second line contains the positive integer b (1\u2009\u2264\u2009b\u2009\u2264\u20091000)\u00a0\u2014 the number of apples Nikolay has. The third line contains the positive integer c (1\u2009\u2264\u2009c\u2009\u2264\u20091000)\u00a0\u2014 the number of pears Nikolay has.","src_uid":"82a4a60eac90765fb62f2a77d2305c01","source_code":"import java.util.Scanner;\n\npublic class JavaApplication1 {\n\n \/**\n * @param args the command line arguments\n *\/\n public static void main(String[] args) {\n \/\/ TODO code application logic here\n Scanner scanner=new Scanner(System.in);\n int lemon = scanner.nextInt();\n int apple = scanner.nextInt();\n int pear = scanner.nextInt();\n \n int result=0;\n \n for(int i=lemon;i>0;i--){\n if(2*i<=apple&&4*i<=pear){\n result=i+(2*i)+(4*i);\n System.out.println(result+\"\");\n return;\n }else if(i==1){\n System.out.println(result+\"\");\n }\n \n }\n\n }\n \n}\n","sample_outputs":"[\"7\", \"21\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first example Nikolay can use 1 lemon, 2 apples and 4 pears, so the answer is 1\u2009+\u20092\u2009+\u20094\u2009=\u20097.In the second example Nikolay can use 3 lemons, 6 apples and 12 pears, so the answer is 3\u2009+\u20096\u2009+\u200912\u2009=\u200921.In the third example Nikolay don't have enough pears to cook any compote, so the answer is 0. ","output_specification":"Print the maximum total number of lemons, apples and pears from which Nikolay can cook the compote.","description":"Nikolay has a lemons, b apples and c pears. He decided to cook a compote. According to the recipe the fruits should be in the ratio 1:\u20092:\u20094. It means that for each lemon in the compote should be exactly 2 apples and exactly 4 pears. You can't crumble up, break up or cut these fruits into pieces. These fruits\u00a0\u2014 lemons, apples and pears\u00a0\u2014 should be put in the compote as whole fruits.Your task is to determine the maximum total number of lemons, apples and pears from which Nikolay can cook the compote. It is possible that Nikolay can't use any fruits, in this case print 0. ","human_testcases":"[{\"input\": \"2\\r\\n5\\r\\n7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"4\\r\\n7\\r\\n13\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2\\r\\n3\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n2\\r\\n4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000\\r\\n1000\\r\\n1000\\r\\n\", \"output\": [\"1750\"]}, {\"input\": \"1\\r\\n1\\r\\n4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n2\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n1000\\r\\n1000\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000\\r\\n2\\r\\n1000\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000\\r\\n500\\r\\n1000\\r\\n\", \"output\": [\"1750\"]}, {\"input\": \"1000\\r\\n1000\\r\\n4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000\\r\\n1000\\r\\n3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4\\r\\n8\\r\\n12\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"10\\r\\n20\\r\\n40\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"100\\r\\n200\\r\\n399\\r\\n\", \"output\": [\"693\"]}, {\"input\": \"200\\r\\n400\\r\\n800\\r\\n\", \"output\": [\"1400\"]}, {\"input\": \"199\\r\\n400\\r\\n800\\r\\n\", \"output\": [\"1393\"]}, {\"input\": \"201\\r\\n400\\r\\n800\\r\\n\", \"output\": [\"1400\"]}, {\"input\": \"200\\r\\n399\\r\\n800\\r\\n\", \"output\": [\"1393\"]}, {\"input\": \"200\\r\\n401\\r\\n800\\r\\n\", \"output\": [\"1400\"]}, {\"input\": \"200\\r\\n400\\r\\n799\\r\\n\", \"output\": [\"1393\"]}, {\"input\": \"200\\r\\n400\\r\\n801\\r\\n\", \"output\": [\"1400\"]}, {\"input\": \"139\\r\\n252\\r\\n871\\r\\n\", \"output\": [\"882\"]}, {\"input\": \"109\\r\\n346\\r\\n811\\r\\n\", \"output\": [\"763\"]}, {\"input\": \"237\\r\\n487\\r\\n517\\r\\n\", \"output\": [\"903\"]}, {\"input\": \"161\\r\\n331\\r\\n725\\r\\n\", \"output\": [\"1127\"]}, {\"input\": \"39\\r\\n471\\r\\n665\\r\\n\", \"output\": [\"273\"]}, {\"input\": \"9\\r\\n270\\r\\n879\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"137\\r\\n422\\r\\n812\\r\\n\", \"output\": [\"959\"]}, {\"input\": \"15\\r\\n313\\r\\n525\\r\\n\", \"output\": [\"105\"]}, {\"input\": \"189\\r\\n407\\r\\n966\\r\\n\", \"output\": [\"1323\"]}, {\"input\": \"18\\r\\n268\\r\\n538\\r\\n\", \"output\": [\"126\"]}, {\"input\": \"146\\r\\n421\\r\\n978\\r\\n\", \"output\": [\"1022\"]}, {\"input\": \"70\\r\\n311\\r\\n685\\r\\n\", \"output\": [\"490\"]}, {\"input\": \"244\\r\\n405\\r\\n625\\r\\n\", \"output\": [\"1092\"]}, {\"input\": \"168\\r\\n454\\r\\n832\\r\\n\", \"output\": [\"1176\"]}, {\"input\": \"46\\r\\n344\\r\\n772\\r\\n\", \"output\": [\"322\"]}, {\"input\": \"174\\r\\n438\\r\\n987\\r\\n\", \"output\": [\"1218\"]}, {\"input\": \"144\\r\\n387\\r\\n693\\r\\n\", \"output\": [\"1008\"]}, {\"input\": \"22\\r\\n481\\r\\n633\\r\\n\", \"output\": [\"154\"]}, {\"input\": \"196\\r\\n280\\r\\n848\\r\\n\", \"output\": [\"980\"]}, {\"input\": \"190\\r\\n454\\r\\n699\\r\\n\", \"output\": [\"1218\"]}, {\"input\": \"231\\r\\n464\\r\\n928\\r\\n\", \"output\": [\"1617\"]}, {\"input\": \"151\\r\\n308\\r\\n616\\r\\n\", \"output\": [\"1057\"]}, {\"input\": \"88\\r\\n182\\r\\n364\\r\\n\", \"output\": [\"616\"]}, {\"input\": \"12\\r\\n26\\r\\n52\\r\\n\", \"output\": [\"84\"]}, {\"input\": \"204\\r\\n412\\r\\n824\\r\\n\", \"output\": [\"1428\"]}, {\"input\": \"127\\r\\n256\\r\\n512\\r\\n\", \"output\": [\"889\"]}, {\"input\": \"224\\r\\n446\\r\\n896\\r\\n\", \"output\": [\"1561\"]}, {\"input\": \"146\\r\\n291\\r\\n584\\r\\n\", \"output\": [\"1015\"]}, {\"input\": \"83\\r\\n164\\r\\n332\\r\\n\", \"output\": [\"574\"]}, {\"input\": \"20\\r\\n38\\r\\n80\\r\\n\", \"output\": [\"133\"]}, {\"input\": \"198\\r\\n393\\r\\n792\\r\\n\", \"output\": [\"1372\"]}, {\"input\": \"120\\r\\n239\\r\\n480\\r\\n\", \"output\": [\"833\"]}, {\"input\": \"208\\r\\n416\\r\\n831\\r\\n\", \"output\": [\"1449\"]}, {\"input\": \"130\\r\\n260\\r\\n517\\r\\n\", \"output\": [\"903\"]}, {\"input\": \"67\\r\\n134\\r\\n267\\r\\n\", \"output\": [\"462\"]}, {\"input\": \"245\\r\\n490\\r\\n979\\r\\n\", \"output\": [\"1708\"]}, {\"input\": \"182\\r\\n364\\r\\n727\\r\\n\", \"output\": [\"1267\"]}, {\"input\": \"104\\r\\n208\\r\\n413\\r\\n\", \"output\": [\"721\"]}, {\"input\": \"10\\r\\n2\\r\\n100\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n100\\r\\n100\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"2\\r\\n3\\r\\n8\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n2\\r\\n8\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n2\\r\\n200\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n4\\r\\n16\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"1\\r\\n10\\r\\n10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n4\\r\\n8\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"100\\r\\n4\\r\\n1000\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"2\\r\\n6\\r\\n12\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"10\\r\\n7\\r\\n4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n10\\r\\n100\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"2\\r\\n3\\r\\n4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n2\\r\\n999\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n10\\r\\n20\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"100\\r\\n18\\r\\n20\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"100\\r\\n1\\r\\n100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n7\\r\\n80\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2\\r\\n8\\r\\n24\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"1\\r\\n100\\r\\n100\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n1\\r\\n8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n5\\r\\n23\\r\\n\", \"output\": [\"14\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000\\r\\n2\\r\\n1000\\r\\n', 'output': ['7']}, {'input': '109\\r\\n346\\r\\n811\\r\\n', 'output': ['763']}, {'input': '15\\r\\n313\\r\\n525\\r\\n', 'output': ['105']}, {'input': '104\\r\\n208\\r\\n413\\r\\n', 'output': ['721']}, {'input': '146\\r\\n291\\r\\n584\\r\\n', 'output': ['1015']}]","human_sample_testcases_2":"[{'input': '5\\r\\n4\\r\\n16\\r\\n', 'output': ['14']}, {'input': '1\\r\\n4\\r\\n8\\r\\n', 'output': ['7']}, {'input': '100\\r\\n4\\r\\n1000\\r\\n', 'output': ['14']}, {'input': '168\\r\\n454\\r\\n832\\r\\n', 'output': ['1176']}, {'input': '109\\r\\n346\\r\\n811\\r\\n', 'output': ['763']}]","human_sample_testcases_3":"[{'input': '104\\r\\n208\\r\\n413\\r\\n', 'output': ['721']}, {'input': '151\\r\\n308\\r\\n616\\r\\n', 'output': ['1057']}, {'input': '146\\r\\n421\\r\\n978\\r\\n', 'output': ['1022']}, {'input': '100\\r\\n200\\r\\n399\\r\\n', 'output': ['693']}, {'input': '67\\r\\n134\\r\\n267\\r\\n', 'output': ['462']}]","human_sample_testcases_4":"[{'input': '109\\r\\n346\\r\\n811\\r\\n', 'output': ['763']}, {'input': '1\\r\\n2\\r\\n3\\r\\n', 'output': ['0']}, {'input': '137\\r\\n422\\r\\n812\\r\\n', 'output': ['959']}, {'input': '22\\r\\n481\\r\\n633\\r\\n', 'output': ['154']}, {'input': '168\\r\\n454\\r\\n832\\r\\n', 'output': ['1176']}]","human_sample_testcases_5":"[{'input': '10\\r\\n2\\r\\n100\\r\\n', 'output': ['7']}, {'input': '189\\r\\n407\\r\\n966\\r\\n', 'output': ['1323']}, {'input': '70\\r\\n311\\r\\n685\\r\\n', 'output': ['490']}, {'input': '1\\r\\n1000\\r\\n1000\\r\\n', 'output': ['7']}, {'input': '1\\r\\n10\\r\\n10\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":84.62,"human_sample_line_coverage_2":84.62,"human_sample_line_coverage_3":84.62,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":84.62,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":62.5,"human_sample_branch_coverage_3":62.5,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":62.5,"id":244,"human_sample_pass_rate":100.0,"human_sample_line_coverage":87.696,"human_sample_branch_coverage":67.5} {"sample_inputs":"[\"5 2 6 3\", \"3 1 5 6\", \"8 3 3 2\", \"2 3 10 4\"]","input_specification":"The only line of the input contains four integers $$$a$$$, $$$b$$$, $$$c$$$, $$$d$$$ ($$$1 \\le a, b, c, d \\le 10^9$$$). It is possible that any two (or all three) ropewalkers are in the same position at the beginning of the performance.","src_uid":"47c07e46517dbc937e2e779ec0d74eb3","source_code":"import static java.lang.StrictMath.abs;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.Scanner;\n\n\npublic class Ropewalkers {\n static int a;\n static int b;\n static int c;\n static int d;\n static List list = new ArrayList();\n static int counter=0;\n public static void main(String args[]){\n Scanner in = new Scanner(System.in);\n a = in.nextInt();\n b = in.nextInt();\n c = in.nextInt();\n d = in.nextInt();\n list.add(a); \n list.add(b);\n list.add(c); \n int max = Collections.max(list);\n int min = Collections.min(list);\n int mid = (a+b+c) - (min+max);\n \n \n if (abs(mid - min) < d ){\n counter += d - (mid-min);\n \n }\n if(abs(max - mid) < d ){\n \n counter += d - max + mid;\n }\n System.out.println(counter); \n } \n \n}\n","sample_outputs":"[\"2\", \"8\", \"2\", \"3\"]","lang_cluster":"Java","notes":"NoteIn the first example: in the first two seconds Konrad moves for 2 positions to the right (to the position $$$8$$$), while Agafon and Boniface stay at their positions. Thus, the distance between Agafon and Boniface will be $$$|5 - 2| = 3$$$, the distance between Boniface and Konrad will be $$$|2 - 8| = 6$$$ and the distance between Agafon and Konrad will be $$$|5 - 8| = 3$$$. Therefore, all three pairwise distances will be at least $$$d=3$$$, so the performance could be finished within 2 seconds.","output_specification":"Output one integer \u2014 the minimum duration (in seconds) of the performance.","description":"Polycarp decided to relax on his weekend and visited to the performance of famous ropewalkers: Agafon, Boniface and Konrad.The rope is straight and infinite in both directions. At the beginning of the performance, Agafon, Boniface and Konrad are located in positions $$$a$$$, $$$b$$$ and $$$c$$$ respectively. At the end of the performance, the distance between each pair of ropewalkers was at least $$$d$$$.Ropewalkers can walk on the rope. In one second, only one ropewalker can change his position. Every ropewalker can change his position exactly by $$$1$$$ (i. e. shift by $$$1$$$ to the left or right direction on the rope). Agafon, Boniface and Konrad can not move at the same time (Only one of them can move at each moment). Ropewalkers can be at the same positions at the same time and can \"walk past each other\".You should find the minimum duration (in seconds) of the performance. In other words, find the minimum number of seconds needed so that the distance between each pair of ropewalkers can be greater or equal to $$$d$$$.Ropewalkers can walk to negative coordinates, due to the rope is infinite to both sides.","human_testcases":"[{\"input\": \"5 2 6 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1 5 6\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"8 3 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 3 10 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000000 1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"500000000 250000000 750000000 1000000000\\r\\n\", \"output\": [\"1500000000\"]}, {\"input\": \"1 3 2 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 3 1 6\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"9 6 2 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 500 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"500 1 500 1000\\r\\n\", \"output\": [\"1501\"]}, {\"input\": \"1 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"89 983 751 1000\\r\\n\", \"output\": [\"1106\"]}, {\"input\": \"716270982 22102638 553198855 1000000000\\r\\n\", \"output\": [\"1305831656\"]}, {\"input\": \"1000000000 1 1000000000 999999999\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"999999999 1 1 1000000000\\r\\n\", \"output\": [\"1000000002\"]}, {\"input\": \"1 2 3 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 3 4 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 3 2 6\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2 2 3 4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1 4 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5 5 2 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 3 3 6\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 4 4 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 3 3 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 4 4 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000000000 1000000000 1000000000 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1 1 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 2 2 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 5 4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 1 4 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 4 2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 2 1 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 2 3 5\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 3 4 6\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 1 2 7\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"1 5 4 8\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"1 4 3 9\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"5 3 4 10\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"3 5 8 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 2 100\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"5 5 7 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 5 10 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 9 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 4 7 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1 1 1000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"1 500000000 1000000000 1000000000\\r\\n\", \"output\": [\"1000000001\"]}, {\"input\": \"15 15 15 15\\r\\n\", \"output\": [\"30\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 4 3 9\\r\\n', 'output': ['15']}, {'input': '8 3 3 2\\r\\n', 'output': ['2']}, {'input': '15 15 15 15\\r\\n', 'output': ['30']}, {'input': '1 2 9 5\\r\\n', 'output': ['4']}, {'input': '9 6 2 5\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '15 15 15 15\\r\\n', 'output': ['30']}, {'input': '1 4 4 5\\r\\n', 'output': ['7']}, {'input': '5 5 2 6\\r\\n', 'output': ['9']}, {'input': '3 1 2 7\\r\\n', 'output': ['12']}, {'input': '8 3 3 2\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '1 500000000 1000000000 1000000000\\r\\n', 'output': ['1000000001']}, {'input': '2 3 1 6\\r\\n', 'output': ['10']}, {'input': '2 2 3 4\\r\\n', 'output': ['7']}, {'input': '500000000 250000000 750000000 1000000000\\r\\n', 'output': ['1500000000']}, {'input': '9 6 2 5\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '3 1 4 2\\r\\n', 'output': ['1']}, {'input': '5 5 4 1\\r\\n', 'output': ['1']}, {'input': '3 1 2 7\\r\\n', 'output': ['12']}, {'input': '15 15 15 15\\r\\n', 'output': ['30']}, {'input': '1000000000 1000000000 1000000000 1000000000\\r\\n', 'output': ['2000000000']}]","human_sample_testcases_5":"[{'input': '89 983 751 1000\\r\\n', 'output': ['1106']}, {'input': '1 3 3 6\\r\\n', 'output': ['10']}, {'input': '1 4 4 6\\r\\n', 'output': ['9']}, {'input': '500 1 500 1000\\r\\n', 'output': ['1501']}, {'input': '1 5 4 8\\r\\n', 'output': ['12']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":50.0,"id":245,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":65.0} {"sample_inputs":"[\"3 1\\n-1 0 1\", \"2 1\\n1 0\", \"1 1\\n-1\"]","input_specification":"The first line contains two integers $$$n$$$ and $$$p$$$ ($$$1 \\leq n \\leq 50$$$, $$$0 \\leq p \\leq 1$$$) \u2014 the number of pieces and Kuro's wanted parity. The second line contains $$$n$$$ integers $$$c_{1}, c_{2}, ..., c_{n}$$$ ($$$-1 \\leq c_{i} \\leq 1$$$) \u2014 the colors of the pieces.","src_uid":"aaf5f8afa71d9d25ebab405dddec78cd","source_code":"import java.io.*;\nimport java.util.*;\n\npublic class Codeforces979E {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tPrintWriter pw = new PrintWriter(System.out);\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tint n = Integer.parseInt(st.nextToken());\n\t\tint p = Integer.parseInt(st.nextToken());\n\t\tint[] c = new int[n];\n\t\tst = new StringTokenizer(br.readLine());\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tc[i] = Integer.parseInt(st.nextToken());\n\t\t}\n\t\t\n\t\t\/\/list of powers of 2 until 2^{n^2}, mod 1000000007\n\t\tint[] twopower = new int[n*n+1];\n\t\ttwopower[0] = 1;\n\t\tfor (int i = 1; i <= n*n; i++) {\n\t\t\ttwopower[i] = (2*twopower[i-1])%1000000007;\n\t\t}\n\t\t\n\t\t\/\/Pascal's triangle until n choose k, mod 1000000007\n\t\tint[][] pascal = new int[n+1][n+1];\n\t\tfor (int i = 0; i <= n; i++) {\n\t\t\tpascal[i][0] = 1;\n\t\t\tpascal[0][i] = 1;\n\t\t}\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tpascal[i][j] = (pascal[i][j-1]+pascal[i-1][j])%1000000007;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\/\/dp[x][y][z] means the last x have all arrows intact\n\t\t\/\/and there are y 0's and z 1's at the start with no\n\t\t\/\/arrows going between them.\n\t\t\/\/we only care when 0 <= x+y+z <= n.\n\t\t\/\/answer is dp[n][0][0].\n\t\tint[][][] dp = new int[n+1][n+1][n+1];\n\t\t\/\/base case of x = 0\n\t\tfor (int y = 0; y <= n; y++) {\n\t\t\tfor (int z = 0; z <= (n-y); z++) {\n\t\t\t\tif (p == (y+z)%2) {\n\t\t\t\t\tdp[0][y][z] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int x = 1; x <= n; x++) {\n\t\t\tfor (int y = 0; y <= (n-x); y++) {\n\t\t\t\tfor (int z = 0; z <= (n-x-y); z++) {\n\t\t\t\t\tif (c[n-x] != 1) {\n\t\t\t\t\t\tint evenmultiple;\n\t\t\t\t\t\tint oddmultiple;\n\t\t\t\t\t\tif (z == 0) {\n\t\t\t\t\t\t\tevenmultiple = 1;\n\t\t\t\t\t\t\toddmultiple = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tevenmultiple = twopower[z-1];\n\t\t\t\t\t\t\toddmultiple = twopower[z-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlong evenk = (long) evenmultiple * (long) dp[x-1][y+1][z];\n\t\t\t\t\t\tevenk %= 1000000007;\n\t\t\t\t\t\tlong oddk = (long) oddmultiple * (long) dp[x-1][y][z];\n\t\t\t\t\t\toddk %= 1000000007;\n\t\t\t\t\t\toddk *= (long) twopower[x-1];\n\t\t\t\t\t\toddk %= 1000000007;\n\t\t\t\t\t\tlong totalk = evenk+oddk;\n\t\t\t\t\t\ttotalk *= twopower[y];\n\t\t\t\t\t\ttotalk %= 1000000007;\n\t\t\t\t\t\tdp[x][y][z] += (int) totalk;\n\t\t\t\t\t}\n\t\t\t\t\tif (c[n-x] != 0) {\n\t\t\t\t\t\tint evenmultiple;\n\t\t\t\t\t\tint oddmultiple;\n\t\t\t\t\t\tif (y == 0) {\n\t\t\t\t\t\t\tevenmultiple = 1;\n\t\t\t\t\t\t\toddmultiple = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tevenmultiple = twopower[y-1];\n\t\t\t\t\t\t\toddmultiple = twopower[y-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlong evenk = (long) evenmultiple * (long) dp[x-1][y][z+1];\n\t\t\t\t\t\tevenk %= 1000000007;\n\t\t\t\t\t\tlong oddk = (long) oddmultiple * (long) dp[x-1][y][z];\n\t\t\t\t\t\toddk %= 1000000007;\n\t\t\t\t\t\toddk *= (long) twopower[x-1];\n\t\t\t\t\t\toddk %= 1000000007;\n\t\t\t\t\t\tlong totalk = evenk+oddk;\n\t\t\t\t\t\ttotalk *= twopower[z];\n\t\t\t\t\t\ttotalk %= 1000000007;\n\t\t\t\t\t\tdp[x][y][z] += (int) totalk;\n\t\t\t\t\t}\n\t\t\t\t\tdp[x][y][z] %= 1000000007;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tpw.println(dp[n][0][0]);\n\t\t\n\t\tpw.close();\n\t}\n}\n","sample_outputs":"[\"6\", \"1\", \"2\"]","lang_cluster":"Java","notes":"NoteIn the first example, there are $$$6$$$ ways to color the pieces and add the arrows, as are shown in the figure below. The scores are $$$3, 3, 5$$$ for the first row and $$$5, 3, 3$$$ for the second row, both from left to right. ","output_specification":"Print a single integer \u2014 the number of ways to put the arrows and choose colors so the number of valid paths of alternating colors has the parity of $$$p$$$.","description":"Kuro has recently won the \"Most intelligent cat ever\" contest. The three friends then decided to go to Katie's home to celebrate Kuro's winning. After a big meal, they took a small break then started playing games.Kuro challenged Katie to create a game with only a white paper, a pencil, a pair of scissors and a lot of arrows (you can assume that the number of arrows is infinite). Immediately, Katie came up with the game called Topological Parity.The paper is divided into $$$n$$$ pieces enumerated from $$$1$$$ to $$$n$$$. Shiro has painted some pieces with some color. Specifically, the $$$i$$$-th piece has color $$$c_{i}$$$ where $$$c_{i} = 0$$$ defines black color, $$$c_{i} = 1$$$ defines white color and $$$c_{i} = -1$$$ means that the piece hasn't been colored yet.The rules of the game is simple. Players must put some arrows between some pairs of different pieces in such a way that for each arrow, the number in the piece it starts from is less than the number of the piece it ends at. Also, two different pieces can only be connected by at most one arrow. After that the players must choose the color ($$$0$$$ or $$$1$$$) for each of the unpainted pieces. The score of a valid way of putting the arrows and coloring pieces is defined as the number of paths of pieces of alternating colors. For example, $$$[1 \\to 0 \\to 1 \\to 0]$$$, $$$[0 \\to 1 \\to 0 \\to 1]$$$, $$$[1]$$$, $$$[0]$$$ are valid paths and will be counted. You can only travel from piece $$$x$$$ to piece $$$y$$$ if and only if there is an arrow from $$$x$$$ to $$$y$$$.But Kuro is not fun yet. He loves parity. Let's call his favorite parity $$$p$$$ where $$$p = 0$$$ stands for \"even\" and $$$p = 1$$$ stands for \"odd\". He wants to put the arrows and choose colors in such a way that the score has the parity of $$$p$$$.It seems like there will be so many ways which satisfy Kuro. He wants to count the number of them but this could be a very large number. Let's help him with his problem, but print it modulo $$$10^{9} + 7$$$.","human_testcases":"[{\"input\": \"3 1\\r\\n-1 0 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 1\\r\\n1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n-1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0\\r\\n-1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 1\\r\\n-1 -1 -1 -1 -1\\r\\n\", \"output\": [\"16512\"]}, {\"input\": \"5 0\\r\\n-1 -1 -1 -1 -1\\r\\n\", \"output\": [\"16256\"]}, {\"input\": \"10 1\\r\\n1 1 1 1 0 0 0 1 0 0\\r\\n\", \"output\": [\"185921272\"]}, {\"input\": \"50 1\\r\\n-1 -1 1 0 1 1 0 -1 1 0 -1 -1 0 0 -1 -1 0 1 1 -1 1 0 -1 1 1 -1 -1 -1 1 -1 -1 0 -1 0 -1 0 0 -1 -1 0 1 -1 0 1 -1 1 0 -1 -1 1\\r\\n\", \"output\": [\"803313751\"]}, {\"input\": \"20 1\\r\\n0 0 -1 0 1 1 1 1 -1 -1 1 1 1 -1 0 0 1 1 1 0\\r\\n\", \"output\": [\"483548109\"]}, {\"input\": \"30 0\\r\\n1 0 1 1 0 -1 0 1 -1 0 1 -1 0 -1 1 1 -1 1 0 1 0 -1 1 1 0 1 -1 0 1 1\\r\\n\", \"output\": [\"40673917\"]}, {\"input\": \"40 1\\r\\n-1 1 1 1 0 -1 -1 1 1 -1 1 1 1 0 0 -1 1 0 1 -1 -1 1 0 1 1 0 1 0 0 -1 -1 1 -1 1 1 1 1 0 -1 0\\r\\n\", \"output\": [\"73320910\"]}, {\"input\": \"50 1\\r\\n-1 -1 0 -1 1 0 1 0 1 -1 -1 0 0 0 -1 0 0 -1 0 1 -1 0 1 -1 1 -1 1 -1 -1 1 -1 -1 0 1 1 0 0 0 1 -1 -1 1 0 0 -1 0 1 1 0 0\\r\\n\", \"output\": [\"772364444\"]}, {\"input\": \"50 1\\r\\n-1 -1 -1 -1 -1 0 -1 -1 -1 0 1 0 -1 0 1 -1 -1 -1 1 0 1 -1 0 1 0 1 0 0 1 1 -1 1 -1 -1 1 1 -1 -1 0 -1 -1 1 -1 1 -1 1 1 0 0 -1\\r\\n\", \"output\": [\"279519499\"]}, {\"input\": \"3 1\\r\\n0 -1 -1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"4 0\\r\\n1 -1 1 0\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"21 0\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"29 1\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"733922348\"]}, {\"input\": \"41 0\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 0\\r\\n0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"38 1\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"25 1\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"322050759\"]}, {\"input\": \"30 0\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"549790477\"]}, {\"input\": \"46 0\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"480432768\"]}, {\"input\": \"10 0\\r\\n1 0 -1 1 -1 0 0 1 1 0\\r\\n\", \"output\": [\"743685088\"]}, {\"input\": \"6 0\\r\\n-1 0 -1 1 1 1\\r\\n\", \"output\": [\"61440\"]}, {\"input\": \"7 0\\r\\n1 0 1 1 -1 1 1\\r\\n\", \"output\": [\"2359296\"]}, {\"input\": \"9 0\\r\\n0 -1 -1 -1 -1 -1 1 0 -1\\r\\n\", \"output\": [\"560111071\"]}, {\"input\": \"6 1\\r\\n1 -1 -1 -1 0 0\\r\\n\", \"output\": [\"131072\"]}, {\"input\": \"6 0\\r\\n0 -1 -1 0 0 -1\\r\\n\", \"output\": [\"135168\"]}, {\"input\": \"8 0\\r\\n-1 0 1 -1 1 -1 1 1\\r\\n\", \"output\": [\"56964601\"]}, {\"input\": \"6 1\\r\\n1 1 0 -1 -1 -1\\r\\n\", \"output\": [\"133120\"]}, {\"input\": \"22 1\\r\\n0 -1 1 0 0 1 1 1 -1 -1 1 1 1 -1 1 1 0 0 -1 0 1 1\\r\\n\", \"output\": [\"981309322\"]}, {\"input\": \"47 1\\r\\n0 -1 0 1 0 -1 1 -1 1 -1 1 -1 0 0 -1 0 -1 1 -1 -1 0 1 -1 1 0 0 1 -1 0 1 0 1 0 1 0 1 -1 -1 1 -1 -1 -1 0 1 1 0 1\\r\\n\", \"output\": [\"716651774\"]}, {\"input\": \"2 1\\r\\n0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"36 1\\r\\n-1 0 0 1 1 0 -1 -1 -1 -1 1 1 0 -1 0 1 0 -1 0 -1 0 1 0 -1 -1 0 1 -1 0 -1 0 -1 1 0 1 1\\r\\n\", \"output\": [\"693536347\"]}, {\"input\": \"37 0\\r\\n0 -1 0 0 0 -1 0 1 0 0 -1 0 -1 -1 0 1 1 0 -1 -1 -1 -1 1 -1 0 0 0 1 -1 -1 1 -1 1 1 -1 -1 -1\\r\\n\", \"output\": [\"915368288\"]}, {\"input\": \"4 1\\r\\n1 -1 -1 1\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"35 0\\r\\n0 0 -1 -1 1 -1 1 -1 1 0 1 0 -1 0 1 1 -1 1 -1 0 0 -1 0 0 1 -1 -1 0 1 1 -1 1 1 1 -1\\r\\n\", \"output\": [\"45647242\"]}, {\"input\": \"25 1\\r\\n1 0 0 -1 -1 0 1 0 -1 1 0 0 0 -1 0 0 1 -1 -1 1 -1 -1 -1 1 1\\r\\n\", \"output\": [\"66699122\"]}, {\"input\": \"36 1\\r\\n-1 0 -1 -1 1 0 0 -1 1 0 0 -1 1 -1 1 0 1 0 0 0 1 1 1 0 1 1 0 -1 1 -1 0 0 0 1 1 -1\\r\\n\", \"output\": [\"77953873\"]}, {\"input\": \"9 1\\r\\n-1 -1 1 1 1 -1 -1 0 1\\r\\n\", \"output\": [\"608326411\"]}, {\"input\": \"36 0\\r\\n-1 0 0 -1 -1 -1 0 -1 0 1 -1 -1 1 1 -1 1 0 0 1 -1 1 1 -1 0 0 1 1 1 -1 1 1 -1 1 1 1 -1\\r\\n\", \"output\": [\"152782818\"]}, {\"input\": \"10 1\\r\\n1 1 1 -1 0 -1 -1 1 1 0\\r\\n\", \"output\": [\"487370169\"]}, {\"input\": \"7 0\\r\\n1 0 -1 1 -1 1 0\\r\\n\", \"output\": [\"4194304\"]}, {\"input\": \"2 0\\r\\n-1 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 1\\r\\n-1 1 0 0 -1\\r\\n\", \"output\": [\"1920\"]}, {\"input\": \"2 0\\r\\n-1 -1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 1\\r\\n0 1 -1 -1\\r\\n\", \"output\": [\"136\"]}, {\"input\": \"5 0\\r\\n-1 0 0 0 1\\r\\n\", \"output\": [\"1088\"]}, {\"input\": \"17 0\\r\\n0 -1 -1 0 1 -1 0 0 -1 -1 0 -1 -1 -1 0 0 0\\r\\n\", \"output\": [\"310296666\"]}, {\"input\": \"10 0\\r\\n1 -1 0 1 1 -1 -1 0 1 0\\r\\n\", \"output\": [\"487370169\"]}, {\"input\": \"31 0\\r\\n1 -1 -1 0 -1 0 -1 -1 0 -1 -1 -1 1 1 0 1 -1 1 1 0 0 -1 0 1 -1 1 0 -1 1 -1 -1\\r\\n\", \"output\": [\"304540143\"]}, {\"input\": \"41 1\\r\\n0 0 -1 1 -1 -1 1 -1 -1 1 -1 1 -1 1 -1 0 1 1 1 0 0 1 1 -1 0 0 1 0 0 1 1 1 -1 0 -1 1 0 1 1 1 1\\r\\n\", \"output\": [\"589337580\"]}, {\"input\": \"37 1\\r\\n1 -1 1 -1 -1 -1 0 1 -1 -1 1 0 0 0 1 1 -1 0 -1 1 -1 0 1 -1 -1 -1 -1 -1 0 -1 0 0 -1 0 -1 -1 -1\\r\\n\", \"output\": [\"916646835\"]}, {\"input\": \"31 0\\r\\n1 0 1 1 0 0 0 -1 -1 -1 -1 -1 0 1 1 1 0 -1 1 -1 -1 1 -1 1 1 0 0 1 1 -1 0\\r\\n\", \"output\": [\"253181331\"]}, {\"input\": \"4 1\\r\\n1 0 1 0\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"26 1\\r\\n1 -1 1 1 1 1 -1 1 -1 1 -1 -1 0 -1 -1 -1 1 0 -1 -1 0 1 -1 0 1 0\\r\\n\", \"output\": [\"996763118\"]}, {\"input\": \"28 1\\r\\n0 0 1 1 -1 1 -1 1 0 -1 -1 -1 0 -1 0 -1 1 0 -1 1 0 -1 -1 0 -1 1 1 -1\\r\\n\", \"output\": [\"618844160\"]}, {\"input\": \"24 1\\r\\n0 0 0 1 1 0 -1 0 -1 1 -1 -1 0 0 1 1 0 -1 0 0 0 0 1 1\\r\\n\", \"output\": [\"189147304\"]}, {\"input\": \"17 0\\r\\n-1 0 -1 1 0 0 1 1 -1 -1 -1 -1 -1 1 1 -1 -1\\r\\n\", \"output\": [\"555719737\"]}, {\"input\": \"42 1\\r\\n0 1 -1 0 -1 0 -1 1 -1 1 0 1 1 -1 0 -1 -1 1 -1 -1 0 -1 1 -1 0 1 0 1 -1 1 -1 1 0 0 -1 0 1 0 1 1 0 0\\r\\n\", \"output\": [\"386658717\"]}, {\"input\": \"3 0\\r\\n0 -1 -1\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"9 1\\r\\n0 1 -1 -1 -1 -1 1 1 1\\r\\n\", \"output\": [\"755810045\"]}, {\"input\": \"9 0\\r\\n1 1 0 0 1 -1 -1 0 0\\r\\n\", \"output\": [\"438952513\"]}, {\"input\": \"14 1\\r\\n-1 0 0 1 -1 0 0 0 -1 -1 0 -1 0 0\\r\\n\", \"output\": [\"829277977\"]}, {\"input\": \"20 0\\r\\n1 -1 1 -1 -1 -1 0 1 1 0 1 0 -1 1 1 -1 1 0 1 1\\r\\n\", \"output\": [\"841268608\"]}, {\"input\": \"18 0\\r\\n1 1 1 -1 0 -1 -1 0 -1 -1 0 0 -1 0 -1 0 -1 1\\r\\n\", \"output\": [\"557382306\"]}, {\"input\": \"16 0\\r\\n1 -1 0 0 0 -1 -1 -1 0 -1 -1 1 0 0 -1 1\\r\\n\", \"output\": [\"807669877\"]}, {\"input\": \"27 1\\r\\n-1 0 -1 -1 -1 0 1 -1 1 0 0 -1 0 1 0 0 0 -1 -1 1 -1 -1 -1 0 1 0 0\\r\\n\", \"output\": [\"61073361\"]}, {\"input\": \"2 0\\r\\n-1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"34 1\\r\\n1 0 -1 0 0 0 -1 1 0 1 1 1 1 1 1 -1 0 0 1 0 -1 -1 -1 1 -1 -1 -1 1 1 1 -1 1 1 -1\\r\\n\", \"output\": [\"132603129\"]}, {\"input\": \"17 0\\r\\n1 0 1 1 0 1 1 0 1 1 1 0 1 0 0 -1 0\\r\\n\", \"output\": [\"585862415\"]}, {\"input\": \"16 0\\r\\n-1 0 0 1 0 0 0 0 -1 -1 -1 -1 1 1 0 1\\r\\n\", \"output\": [\"878929813\"]}, {\"input\": \"17 0\\r\\n0 0 0 0 0 1 -1 -1 -1 1 -1 1 0 0 1 -1 -1\\r\\n\", \"output\": [\"427689083\"]}, {\"input\": \"38 0\\r\\n-1 -1 1 1 -1 -1 1 -1 0 1 -1 1 1 1 -1 1 0 1 0 -1 1 -1 -1 0 0 1 -1 -1 0 -1 0 -1 -1 0 1 0 -1 0\\r\\n\", \"output\": [\"502273788\"]}, {\"input\": \"33 0\\r\\n0 1 -1 -1 -1 1 -1 1 1 -1 -1 -1 -1 0 1 0 -1 0 0 -1 1 -1 -1 0 0 -1 0 0 1 0 1 1 1\\r\\n\", \"output\": [\"52976952\"]}, {\"input\": \"32 1\\r\\n0 0 1 0 -1 0 1 -1 -1 -1 0 1 0 0 1 0 -1 -1 1 1 1 0 0 1 -1 -1 1 0 0 -1 0 1\\r\\n\", \"output\": [\"247728070\"]}, {\"input\": \"6 0\\r\\n-1 1 1 -1 -1 -1\\r\\n\", \"output\": [\"267264\"]}, {\"input\": \"27 1\\r\\n0 -1 1 0 -1 1 1 -1 0 -1 0 0 0 -1 -1 0 0 -1 -1 0 -1 0 -1 0 0 1 1\\r\\n\", \"output\": [\"28918236\"]}, {\"input\": \"27 1\\r\\n0 -1 -1 1 1 1 -1 1 0 0 1 -1 -1 1 -1 1 1 1 1 1 0 0 0 0 -1 -1 0\\r\\n\", \"output\": [\"69931865\"]}, {\"input\": \"17 1\\r\\n0 -1 -1 0 0 1 -1 -1 0 0 -1 1 0 -1 1 0 0\\r\\n\", \"output\": [\"427689083\"]}, {\"input\": \"34 0\\r\\n1 1 1 0 0 0 0 1 0 0 1 -1 1 1 -1 0 -1 1 1 1 0 1 1 -1 0 0 1 -1 -1 0 0 0 -1 -1\\r\\n\", \"output\": [\"115086916\"]}, {\"input\": \"31 1\\r\\n1 0 0 0 0 0 0 0 -1 0 0 0 1 -1 -1 -1 0 0 -1 0 1 -1 1 0 1 1 1 1 -1 -1 1\\r\\n\", \"output\": [\"186475897\"]}, {\"input\": \"48 1\\r\\n1 0 0 0 1 -1 1 1 0 -1 0 -1 1 1 0 -1 -1 -1 0 0 0 1 0 1 0 -1 -1 -1 -1 1 0 1 -1 -1 -1 1 -1 0 1 0 0 1 -1 0 -1 0 0 0\\r\\n\", \"output\": [\"763606955\"]}, {\"input\": \"5 0\\r\\n0 -1 0 0 0\\r\\n\", \"output\": [\"768\"]}, {\"input\": \"43 0\\r\\n1 0 0 -1 0 -1 0 -1 1 1 -1 1 -1 0 0 1 -1 -1 -1 0 0 -1 1 -1 -1 1 0 0 1 -1 0 -1 -1 -1 -1 -1 1 1 0 -1 -1 -1 0\\r\\n\", \"output\": [\"477560567\"]}, {\"input\": \"11 1\\r\\n1 0 1 0 -1 1 0 -1 -1 0 0\\r\\n\", \"output\": [\"67049563\"]}, {\"input\": \"13 1\\r\\n-1 1 0 0 -1 0 -1 1 -1 -1 1 1 0\\r\\n\", \"output\": [\"621572676\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6 1\\r\\n1 1 0 -1 -1 -1\\r\\n', 'output': ['133120']}, {'input': '10 1\\r\\n1 1 1 1 0 0 0 1 0 0\\r\\n', 'output': ['185921272']}, {'input': '6 0\\r\\n-1 0 -1 1 1 1\\r\\n', 'output': ['61440']}, {'input': '50 1\\r\\n-1 -1 1 0 1 1 0 -1 1 0 -1 -1 0 0 -1 -1 0 1 1 -1 1 0 -1 1 1 -1 -1 -1 1 -1 -1 0 -1 0 -1 0 0 -1 -1 0 1 -1 0 1 -1 1 0 -1 -1 1\\r\\n', 'output': ['803313751']}, {'input': '14 1\\r\\n-1 0 0 1 -1 0 0 0 -1 -1 0 -1 0 0\\r\\n', 'output': ['829277977']}]","human_sample_testcases_2":"[{'input': '4 1\\r\\n0 1 -1 -1\\r\\n', 'output': ['136']}, {'input': '29 1\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['733922348']}, {'input': '3 0\\r\\n0 0 0\\r\\n', 'output': ['0']}, {'input': '2 0\\r\\n-1 1\\r\\n', 'output': ['3']}, {'input': '46 0\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['480432768']}]","human_sample_testcases_3":"[{'input': '17 0\\r\\n-1 0 -1 1 0 0 1 1 -1 -1 -1 -1 -1 1 1 -1 -1\\r\\n', 'output': ['555719737']}, {'input': '9 0\\r\\n1 1 0 0 1 -1 -1 0 0\\r\\n', 'output': ['438952513']}, {'input': '4 1\\r\\n0 1 -1 -1\\r\\n', 'output': ['136']}, {'input': '16 0\\r\\n-1 0 0 1 0 0 0 0 -1 -1 -1 -1 1 1 0 1\\r\\n', 'output': ['878929813']}, {'input': '42 1\\r\\n0 1 -1 0 -1 0 -1 1 -1 1 0 1 1 -1 0 -1 -1 1 -1 -1 0 -1 1 -1 0 1 0 1 -1 1 -1 1 0 0 -1 0 1 0 1 1 0 0\\r\\n', 'output': ['386658717']}]","human_sample_testcases_4":"[{'input': '4 0\\r\\n1 -1 1 0\\r\\n', 'output': ['64']}, {'input': '1 0\\r\\n-1\\r\\n', 'output': ['0']}, {'input': '10 1\\r\\n1 1 1 -1 0 -1 -1 1 1 0\\r\\n', 'output': ['487370169']}, {'input': '7 0\\r\\n1 0 1 1 -1 1 1\\r\\n', 'output': ['2359296']}, {'input': '5 1\\r\\n-1 -1 -1 -1 -1\\r\\n', 'output': ['16512']}]","human_sample_testcases_5":"[{'input': '30 0\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['549790477']}, {'input': '31 0\\r\\n1 0 1 1 0 0 0 -1 -1 -1 -1 -1 0 1 1 1 0 -1 1 -1 -1 1 -1 1 1 0 0 1 1 -1 0\\r\\n', 'output': ['253181331']}, {'input': '7 0\\r\\n1 0 1 1 -1 1 1\\r\\n', 'output': ['2359296']}, {'input': '6 1\\r\\n1 1 0 -1 -1 -1\\r\\n', 'output': ['133120']}, {'input': '14 1\\r\\n-1 0 0 1 -1 0 0 0 -1 -1 0 -1 0 0\\r\\n', 'output': ['829277977']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":246,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\\n1 3 5\", \"5\\n1 0 1 5 1\", \"3\\n4 3 1\", \"4\\n3 9 9 3\"]","input_specification":"The first line of input contains a non-negative integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the length of the sequence. The second line contains n space-separated non-negative integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u2009100) \u2014 the elements of the sequence.","src_uid":"2b8c2deb5d7e49e8e3ededabfd4427db","source_code":"import java.io.*;\nimport java.util.*;\n\npublic class A {\n FScanner in = new FScanner();\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out), true);\n\n void run() {\n int n = in.nextInt();\n int[] a = new int[n];\n for (int i = 0; i < n; i++) {\n int x = in.nextInt();\n a[i] = x;\n }\n out.print(a[0] % 2 != 0 && a[n - 1] % 2 != 0 && n % 2 == 1 ? \n \"Yes\" :\n \"No\");\n out.close();\n }\n\n public static void main(String[] args) {\n new A().run();\n }\n\n static class FScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n\n char[][] nextCharArray(int n, int m) {\n char[][] g = new char[n][m];\n for (int i = 0; i < n; i++)\n g[i] = next().toCharArray();\n return g;\n }\n\n double[] nextDoubleArray(int n) {\n double[] a = new double[n];\n for (int i = 0; i < n; i++)\n a[i] = nextDouble();\n return a;\n }\n\n int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n}\n","sample_outputs":"[\"Yes\", \"Yes\", \"No\", \"No\"]","lang_cluster":"Java","notes":"NoteIn the first example, divide the sequence into 1 subsegment: {1,\u20093,\u20095} and the requirements will be met.In the second example, divide the sequence into 3 subsegments: {1,\u20090,\u20091}, {5}, {1}.In the third example, one of the subsegments must start with 4 which is an even number, thus the requirements cannot be met.In the fourth example, the sequence can be divided into 2 subsegments: {3,\u20099,\u20099}, {3}, but this is not a valid solution because 2 is an even number.","output_specification":"Output \"Yes\" if it's possible to fulfill the requirements, and \"No\" otherwise. You can output each letter in any case (upper or lower).","description":"Where do odds begin, and where do they end? Where does hope emerge, and will they ever break?Given an integer sequence a1,\u2009a2,\u2009...,\u2009an of length n. Decide whether it is possible to divide it into an odd number of non-empty subsegments, the each of which has an odd length and begins and ends with odd numbers.A subsegment is a contiguous slice of the whole sequence. For example, {3,\u20094,\u20095} and {1} are subsegments of sequence {1,\u20092,\u20093,\u20094,\u20095,\u20096}, while {1,\u20092,\u20094} and {7} are not.","human_testcases":"[{\"input\": \"3\\r\\n1 3 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5\\r\\n1 0 1 5 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3\\r\\n4 3 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n3 9 9 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5\\r\\n100 99 100 99 99\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2\\r\\n1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2\\r\\n10 10\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2\\r\\n54 21\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n0 0 0 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n67 92 0 26 43\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"15\\r\\n45 52 35 80 68 80 93 57 47 32 69 23 63 90 43\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"15\\r\\n81 28 0 82 71 64 63 89 87 92 38 30 76 72 36\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"50\\r\\n49 32 17 59 77 98 65 50 85 10 40 84 65 34 52 25 1 31 61 45 48 24 41 14 76 12 33 76 44 86 53 33 92 58 63 93 50 24 31 79 67 50 72 93 2 38 32 14 87 99\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"55\\r\\n65 69 53 66 11 100 68 44 43 17 6 66 24 2 6 6 61 72 91 53 93 61 52 96 56 42 6 8 79 49 76 36 83 58 8 43 2 90 71 49 80 21 75 13 76 54 95 61 58 82 40 33 73 61 46\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"99\\r\\n73 89 51 85 42 67 22 80 75 3 90 0 52 100 90 48 7 15 41 1 54 2 23 62 86 68 2 87 57 12 45 34 68 54 36 49 27 46 22 70 95 90 57 91 90 79 48 89 67 92 28 27 25 37 73 66 13 89 7 99 62 53 48 24 73 82 62 88 26 39 21 86 50 95 26 27 60 6 56 14 27 90 55 80 97 18 37 36 70 2 28 53 36 77 39 79 82 42 69\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"99\\r\\n99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100\\r\\n61 63 34 45 20 91 31 28 40 27 94 1 73 5 69 10 56 94 80 23 79 99 59 58 13 56 91 59 77 78 88 72 80 72 70 71 63 60 41 41 41 27 83 10 43 14 35 48 0 78 69 29 63 33 42 67 1 74 51 46 79 41 37 61 16 29 82 28 22 14 64 49 86 92 82 55 54 24 75 58 95 31 3 34 26 23 78 91 49 6 30 57 27 69 29 54 42 0 61 83\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 2 2 2 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3\\r\\n1 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4\\r\\n1 3 2 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 1 1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 0 0 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 4 9 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 0 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10\\r\\n1 0 0 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10\\r\\n9 2 5 7 8 3 1 9 4 9\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"99\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 2 1 2 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 0 1 0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 3 4 7\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8\\r\\n1 1 1 2 1 1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3\\r\\n1 1 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n1 2 1 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5\\r\\n5 4 4 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6\\r\\n1 3 3 3 3 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"7\\r\\n1 2 1 2 2 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4\\r\\n1 2 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 2 3 4 6 5\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n1 1 2 2 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n1 0 0 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3\\r\\n1 2 4\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3\\r\\n1 0 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n1 1 1 0 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4\\r\\n3 9 2 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 1 4 4 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 2 3 5 6 7\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 1 2 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 1 0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n1 2 2 5 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5\\r\\n1 3 2 4 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8\\r\\n1 2 3 5 7 8 8 5\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10\\r\\n1 1 1 2 1 1 1 1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"7\\r\\n1 0 1 1 0 0 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"7\\r\\n1 4 5 7 6 6 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4\\r\\n2 2 2 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n2 3 4 5 6\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 1 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3\\r\\n1 2 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6\\r\\n1 3 3 2 2 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 1 2 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4\\r\\n1 2 3 5\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5\\r\\n3 4 4 3 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4\\r\\n3 2 2 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 1 1 2 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"6\\r\\n1 1 2 2 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10\\r\\n3 4 2 4 3 2 2 4 4 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"7\\r\\n1 2 4 3 2 4 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"28\\r\\n75 51 25 52 13 7 34 29 5 59 68 56 13 2 9 37 59 83 18 32 36 30 20 43 92 76 78 67\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"79\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 18\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"No\", \"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\n3 2 2 3\\r\\n', 'output': ['No', 'NO']}, {'input': '7\\r\\n1 0 1 1 0 0 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '5\\r\\n1 1 1 0 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '6\\r\\n1 1 0 0 1 1\\r\\n', 'output': ['No', 'NO']}, {'input': '7\\r\\n1 2 4 3 2 4 5\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_2":"[{'input': '2\\r\\n1 1\\r\\n', 'output': ['No', 'NO']}, {'input': '5\\r\\n3 4 4 3 3\\r\\n', 'output': ['YES', 'Yes']}, {'input': '10\\r\\n3 4 2 4 3 2 2 4 4 3\\r\\n', 'output': ['No', 'NO']}, {'input': '5\\r\\n100 99 100 99 99\\r\\n', 'output': ['No', 'NO']}, {'input': '3\\r\\n1 0 2\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_3":"[{'input': '6\\r\\n1 2 2 2 2 1\\r\\n', 'output': ['No', 'NO']}, {'input': '4\\r\\n3 9 2 3\\r\\n', 'output': ['No', 'NO']}, {'input': '5\\r\\n1 1 2 2 2\\r\\n', 'output': ['No', 'NO']}, {'input': '6\\r\\n1 1 2 2 1 1\\r\\n', 'output': ['No', 'NO']}, {'input': '6\\r\\n1 1 1 2 2 1\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_4":"[{'input': '6\\r\\n1 1 1 1 1 1\\r\\n', 'output': ['No', 'NO']}, {'input': '28\\r\\n75 51 25 52 13 7 34 29 5 59 68 56 13 2 9 37 59 83 18 32 36 30 20 43 92 76 78 67\\r\\n', 'output': ['No', 'NO']}, {'input': '5\\r\\n1 2 2 5 5\\r\\n', 'output': ['YES', 'Yes']}, {'input': '5\\r\\n100 99 100 99 99\\r\\n', 'output': ['No', 'NO']}, {'input': '4\\r\\n1 3 4 7\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_5":"[{'input': '6\\r\\n1 1 1 4 4 1\\r\\n', 'output': ['No', 'NO']}, {'input': '4\\r\\n3 2 2 3\\r\\n', 'output': ['No', 'NO']}, {'input': '5\\r\\n5 4 4 2 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '2\\r\\n54 21\\r\\n', 'output': ['No', 'NO']}, {'input': '7\\r\\n1 4 5 7 6 6 3\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":93.33,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":87.5,"id":247,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.666,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"2 2\", \"123 456789\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\le n \\le 250$$$, $$$1 \\le k \\le 10^{9}$$$).","src_uid":"f67173c973c6f83e88bc0ddb0b9bfa93","source_code":"\/\/package cf589d2;\nimport java.io.*;\nimport java.util.*;\nimport static java.lang.Math.*;\n\npublic class E {\n\tstatic long MOD = 1000000007;\n\tpublic static void main(String[] args) {\n\t\tMyScanner sc = new MyScanner();\n\t\tint n = sc.nextInt();\n\t\tlong k = sc.nextLong();\n\t\tlong[][] choose = new long[n + 1][n + 1];\n\t\tlong[][] pow = new long[n + 1][2];\n\t\tfor(int i = 0; i <= n; i++) {\n\t\t\tchoose[i][0] = 1;\n\t\t\tchoose[i][i] = 1;\n\t\t}\n\t\tfor(int i = 2; i <= n; i++)\n\t\t\tfor(int j = 1; j < i; j++)\n\t\t\t\tchoose[i][j] = (choose[i - 1][j] + choose[i - 1][j - 1]) % MOD;\n\t\tfor(int i = 0; i <= n; i++)\n\t\t\tfor(int j = 0; j < 2; j++)\n\t\t\t\tpow[i][j] = pMod(k - j, i);\n\t\tlong[][] dp = new long[n + 1][n + 1];\n\t\tdp[0][n] = 1;\n\t\tfor(int i = 1; i <= n; i++)\n\t\t\tfor(int j = 0; j <= n; j++)\n\t\t\t\tfor(int l = 0; l <= j; l++) {\n\t\t\t\t\tlong del = dp[i - 1][j] * choose[j][l] % MOD * pow[l][1] % MOD;\n\t\t\t\t\tif(l < j)\n\t\t\t\t\t\tdel = del * pow[n - j][0] % MOD;\n\t\t\t\t\telse\n\t\t\t\t\t\tdel = del * (pow[n - j][0] - pow[n - j][1] + MOD) % MOD;\n\t\t\t\t\tdp[i][l] = (dp[i][l] + del) % MOD;\n\t\t\t\t}\n\t\tout.println(dp[n][0]);\n\t\tout.close();\n\t}\n\tpublic static long pMod(long x, long p) {\n\t\tif(p == 0)\n\t\t\treturn 1;\n\t\tlong l = pMod(x, p \/ 2);\n\t\treturn l * l % MOD * (p % 2 == 1 ? x : 1) % MOD;\n\t}\n\tpublic static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));\n\tpublic static class MyScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st;\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}\n","sample_outputs":"[\"7\", \"689974806\"]","lang_cluster":"Java","notes":"NoteIn the first example, following $$$7$$$ cases are possible. In the second example, make sure you print the answer modulo $$$(10^{9} + 7)$$$.","output_specification":"Print the answer modulo $$$(10^{9} + 7)$$$.","description":"You have $$$n \\times n$$$ square grid and an integer $$$k$$$. Put an integer in each cell while satisfying the conditions below. All numbers in the grid should be between $$$1$$$ and $$$k$$$ inclusive. Minimum number of the $$$i$$$-th row is $$$1$$$ ($$$1 \\le i \\le n$$$). Minimum number of the $$$j$$$-th column is $$$1$$$ ($$$1 \\le j \\le n$$$). Find the number of ways to put integers in the grid. Since the answer can be very large, find the answer modulo $$$(10^{9} + 7)$$$. These are the examples of valid and invalid grid when $$$n=k=2$$$. ","human_testcases":"[{\"input\": \"2 2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"123 456789\\r\\n\", \"output\": [\"689974806\"]}, {\"input\": \"250 1000000000\\r\\n\", \"output\": [\"770503193\"]}, {\"input\": \"250 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 497285769\\r\\n\", \"output\": [\"790515254\"]}, {\"input\": \"3 212096267\\r\\n\", \"output\": [\"501206544\"]}, {\"input\": \"4 221874066\\r\\n\", \"output\": [\"274467242\"]}, {\"input\": \"244 315404017\\r\\n\", \"output\": [\"868949606\"]}, {\"input\": \"218 325181815\\r\\n\", \"output\": [\"230476135\"]}, {\"input\": \"246 629926913\\r\\n\", \"output\": [\"283598434\"]}, {\"input\": \"216 639704712\\r\\n\", \"output\": [\"319243107\"]}, {\"input\": \"244 22597665\\r\\n\", \"output\": [\"56808536\"]}, {\"input\": \"218 737408162\\r\\n\", \"output\": [\"720936813\"]}, {\"input\": \"242 747185961\\r\\n\", \"output\": [\"365665959\"]}, {\"input\": \"220 51931060\\r\\n\", \"output\": [\"944377763\"]}, {\"input\": \"244 61708858\\r\\n\", \"output\": [\"84446310\"]}, {\"input\": \"216 104981514\\r\\n\", \"output\": [\"943178465\"]}, {\"input\": \"208 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"236 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"242 106758452\\r\\n\", \"output\": [\"437620405\"]}, {\"input\": \"216 411503551\\r\\n\", \"output\": [\"618370501\"]}, {\"input\": \"244 126314049\\r\\n\", \"output\": [\"662993833\"]}, {\"input\": \"214 431059147\\r\\n\", \"output\": [\"37643610\"]}, {\"input\": \"242 440836946\\r\\n\", \"output\": [\"687163955\"]}, {\"input\": \"220 528762598\\r\\n\", \"output\": [\"944995733\"]}, {\"input\": \"244 833507696\\r\\n\", \"output\": [\"89218992\"]}, {\"input\": \"218 548318195\\r\\n\", \"output\": [\"721573920\"]}, {\"input\": \"242 558095993\\r\\n\", \"output\": [\"300047623\"]}, {\"input\": \"224 26911790\\r\\n\", \"output\": [\"554883010\"]}, {\"input\": \"206 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"234 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 19549\\r\\n\", \"output\": [\"843886139\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '216 639704712\\r\\n', 'output': ['319243107']}, {'input': '244 126314049\\r\\n', 'output': ['662993833']}, {'input': '216 411503551\\r\\n', 'output': ['618370501']}, {'input': '220 51931060\\r\\n', 'output': ['944377763']}, {'input': '214 431059147\\r\\n', 'output': ['37643610']}]","human_sample_testcases_2":"[{'input': '10 19549\\r\\n', 'output': ['843886139']}, {'input': '208 1\\r\\n', 'output': ['1']}, {'input': '1 3\\r\\n', 'output': ['1']}, {'input': '3 497285769\\r\\n', 'output': ['790515254']}, {'input': '216 411503551\\r\\n', 'output': ['618370501']}]","human_sample_testcases_3":"[{'input': '3 497285769\\r\\n', 'output': ['790515254']}, {'input': '216 411503551\\r\\n', 'output': ['618370501']}, {'input': '216 104981514\\r\\n', 'output': ['943178465']}, {'input': '250 1000000000\\r\\n', 'output': ['770503193']}, {'input': '242 106758452\\r\\n', 'output': ['437620405']}]","human_sample_testcases_4":"[{'input': '10 19549\\r\\n', 'output': ['843886139']}, {'input': '216 411503551\\r\\n', 'output': ['618370501']}, {'input': '236 1\\r\\n', 'output': ['1']}, {'input': '224 26911790\\r\\n', 'output': ['554883010']}, {'input': '216 639704712\\r\\n', 'output': ['319243107']}]","human_sample_testcases_5":"[{'input': '246 629926913\\r\\n', 'output': ['283598434']}, {'input': '208 1\\r\\n', 'output': ['1']}, {'input': '220 528762598\\r\\n', 'output': ['944995733']}, {'input': '218 548318195\\r\\n', 'output': ['721573920']}, {'input': '242 106758452\\r\\n', 'output': ['437620405']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":248,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 0 0 1\\n0 1 0 0\\n0 0 1 0\\n0 0 0 1\", \"0 1 1 0\\n1 0 1 0\\n1 1 0 0\\n0 0 0 1\", \"1 0 0 0\\n0 0 0 1\\n0 0 0 0\\n1 0 1 0\"]","input_specification":"The input consists of four lines with each line describing a road part given in a counter-clockwise order. Each line contains four integers l, s, r, p \u2014 for the left, straight, right and pedestrian lights, respectively. The possible values are 0 for red light and 1 for green light.","src_uid":"44fdf71d56bef949ec83f00d17c29127","source_code":"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile (sc.hasNext()) {\n\t\t\tint a[][] = new int[5][5];\n\t\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\t\tfor (int j = 1; j < a.length; j++) {\n\t\t\t\t\ta[i][j] = sc.nextInt();\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif (a[1][4] == 1\n\t\t\t\t\t&& (a[1][1] == 1 || a[1][2] == 1 || a[1][3] == 1 || a[2][1] == 1 || a[3][2] == 1 || a[4][3] == 1)) {\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\t} else if (a[2][4] == 1\n\t\t\t\t\t&& (a[2][1] == 1 || a[2][2] == 1 || a[2][3] == 1 || a[3][1] == 1 || a[4][2] == 1 || a[1][3] == 1)) {\n\t\t\t\tSystem.out.println(\"YES\");\n\n\t\t\t} else if (a[3][4] == 1\n\t\t\t\t\t&& (a[3][1] == 1 || a[3][2] == 1 || a[3][3] == 1 || a[4][1] == 1 || a[2][3] == 1 || a[1][2] == 1)) {\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\t} else if (a[4][4] == 1\n\t\t\t\t\t&& (a[4][1] == 1 || a[4][2] == 1 || a[4][3] == 1 || a[3][3] == 1 || a[1][1] == 1 || a[2][2] == 1)) {\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"NO\");\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}\n","sample_outputs":"[\"YES\", \"NO\", \"NO\"]","lang_cluster":"Java","notes":"NoteIn the first example, some accidents are possible because cars of part 1 can hit pedestrians of parts 1 and 4. Also, cars of parts 2 and 3 can hit pedestrians of part 4.In the second example, no car can pass the pedestrian crossing of part 4 which is the only green pedestrian light. So, no accident can occur.","output_specification":"On a single line, print \"YES\" if an accident is possible, and \"NO\" otherwise.","description":"Sagheer is walking in the street when he comes to an intersection of two roads. Each road can be represented as two parts where each part has 3 lanes getting into the intersection (one for each direction) and 3 lanes getting out of the intersection, so we have 4 parts in total. Each part has 4 lights, one for each lane getting into the intersection (l \u2014 left, s \u2014 straight, r \u2014 right) and a light p for a pedestrian crossing. An accident is possible if a car can hit a pedestrian. This can happen if the light of a pedestrian crossing of some part and the light of a lane that can get to or from that same part are green at the same time.Now, Sagheer is monitoring the configuration of the traffic lights. Your task is to help him detect whether an accident is possible.","human_testcases":"[{\"input\": \"1 0 0 1\\r\\n0 1 0 0\\r\\n0 0 1 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1 0\\r\\n1 0 1 0\\r\\n1 1 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n1 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1 1 0\\r\\n0 1 0 1\\r\\n1 1 1 0\\r\\n1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1 0\\r\\n0 1 0 0\\r\\n1 0 0 1\\r\\n1 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0 0\\r\\n0 1 0 0\\r\\n1 1 0 0\\r\\n0 1 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 1 0 1\\r\\n1 0 1 1\\r\\n1 1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0 0\\r\\n0 1 0 1\\r\\n1 1 1 0\\r\\n0 0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0 0\\r\\n0 0 0 0\\r\\n1 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n0 0 0 0\\r\\n1 1 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n0 1 0 1\\r\\n1 0 1 0\\r\\n0 0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1 0\\r\\n0 1 0 1\\r\\n1 1 1 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 1 0 1\\r\\n1 0 1 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0 0\\r\\n0 1 0 0\\r\\n1 1 1 0\\r\\n1 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0 1 0\\r\\n1 1 0 0\\r\\n1 1 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n1 1 0 0\\r\\n1 0 1 0\\r\\n1 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n1 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 1 0\\r\\n1 1 0 1\\r\\n1 0 0 1\\r\\n1 1 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0 0\\r\\n1 1 0 0\\r\\n1 1 0 1\\r\\n0 0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n1 1 0 0\\r\\n0 0 0 1\\r\\n0 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 0 0\\r\\n0 0 0 1\\r\\n0 1 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 0 0\\r\\n1 1 0 1\\r\\n1 0 0 1\\r\\n1 1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 1 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n0 1 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 1 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n1 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 1 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n1 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 1 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 1 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n1 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 1 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n1 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 1 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 1 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n1 0 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 1 1\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n1 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 1 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 1 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 1 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n1 0 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 1 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n1 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1 1 1\\r\\n1 1 1 1\\r\\n1 1 1 1\\r\\n1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 0 0 0\\r\\n0 1 0 0\\r\\n0 0 1 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 1 1 0\\r\\n1 0 1 0\\r\\n1 1 1 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1 1 0\\r\\n1 1 1 0\\r\\n1 1 1 0\\r\\n0 0 0 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 1 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 1 0 0\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 0 0 1\\r\\n0 0 0 1\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 1\\r\\n', 'output': ['YES']}, {'input': '0 0 0 1\\r\\n1 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 1 0\\r\\n0 0 0 0\\r\\n1 1 0 0\\r\\n0 0 0 1\\r\\n', 'output': ['NO']}, {'input': '0 0 1 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 1\\r\\n', 'output': ['NO']}, {'input': '1 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '0 0 0 1\\r\\n0 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '1 0 1 0\\r\\n1 1 0 0\\r\\n1 1 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['NO']}, {'input': '0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 1 0\\r\\n', 'output': ['NO']}, {'input': '1 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0 0\\r\\n0 0 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '0 0 1 0\\r\\n0 0 0 0\\r\\n1 1 0 0\\r\\n0 0 0 1\\r\\n', 'output': ['NO']}, {'input': '0 1 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0 1\\r\\n0 1 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n0 1 0 1\\r\\n', 'output': ['YES']}, {'input': '1 1 1 0\\r\\n1 1 1 0\\r\\n1 1 1 0\\r\\n0 0 0 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '0 0 0 0\\r\\n0 0 0 0\\r\\n0 0 1 1\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 1 0 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['NO']}, {'input': '1 1 1 0\\r\\n0 1 0 1\\r\\n1 1 1 0\\r\\n1 1 1 1\\r\\n', 'output': ['YES']}, {'input': '0 1 0 0\\r\\n1 1 0 1\\r\\n1 0 0 1\\r\\n1 1 0 1\\r\\n', 'output': ['YES']}, {'input': '1 1 0 0\\r\\n0 1 0 1\\r\\n1 1 1 0\\r\\n0 0 1 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '1 1 0 0\\r\\n0 1 0 1\\r\\n1 1 1 0\\r\\n0 0 1 1\\r\\n', 'output': ['YES']}, {'input': '0 0 0 0\\r\\n0 0 1 0\\r\\n0 0 0 1\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0 1\\r\\n0 1 1 1\\r\\n0 0 0 0\\r\\n0 0 0 0\\r\\n', 'output': ['YES']}, {'input': '0 0 0 0\\r\\n0 1 0 1\\r\\n1 0 1 1\\r\\n0 0 0 1\\r\\n', 'output': ['YES']}, {'input': '0 1 0 0\\r\\n0 0 0 1\\r\\n0 1 0 0\\r\\n0 0 0 1\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.24,"human_sample_line_coverage_2":94.12,"human_sample_line_coverage_3":94.12,"human_sample_line_coverage_4":88.24,"human_sample_line_coverage_5":88.24,"human_sample_branch_coverage_1":48.39,"human_sample_branch_coverage_2":46.77,"human_sample_branch_coverage_3":46.77,"human_sample_branch_coverage_4":37.1,"human_sample_branch_coverage_5":59.68,"id":249,"human_sample_pass_rate":100.0,"human_sample_line_coverage":90.592,"human_sample_branch_coverage":47.742} {"sample_inputs":"[\"3\\n2 1 3\", \"3\\n1 2 3\"]","input_specification":"The first line contains a single integer $$$n$$$ ($$$2 \\le n \\le 100$$$) \u2014 the number of figures. The second line contains $$$n$$$ integer numbers $$$a_1, a_2, \\dots, a_n$$$ ($$$1 \\le a_i \\le 3$$$, $$$a_i \\ne a_{i + 1}$$$) \u2014 types of the figures.","src_uid":"6c8f028f655cc77b05ed89a668273702","source_code":"\nimport java.util.Scanner;\npublic class InscribedFigures {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner (System.in);\n\t\tint n=sc.nextInt();\n\t\tint A[]=new int[n];\n\t\tfor (int x=0;x 0) {\n if ((exponent & 1) != 0)\n result = (result * base) % mod;\n base = (base * base) % mod;\n exponent >>= 1;\n }\n return result;\n }\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n long m = in.nextLong();\n long[] dp = new long[k];\n dp[0] = 1;\n long total = 0;\n for (int i = 0; i < n; i++) {\n long[] next = new long[k];\n for (int j = 0; j < k; j++)\n for (int d = (i == n - 1) ? 1 : 0; d < 10; d++) {\n int res = (int) (modPower(10, i, k) * d + j) % k;\n next[res] = (next[res] + dp[j]) % m;\n }\n if (i < n - 1)\n total += (next[0] + m - 1) * 9 % m * modPower(10, n - 2 - i, m)\n % m;\n else\n total += next[0];\n\n total %= m;\n dp = next;\n dp[0] = 1;\n }\n System.out.println(total);\n }\n}\n","sample_outputs":"[\"4\", \"45\", \"590\"]","lang_cluster":"Java","notes":"NoteA suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.","output_specification":"Print the required number modulo m.","description":"Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x\u2009>\u20090 exist such that: Decimal representation of x (without leading zeroes) consists of exactly n digits; There exists some integer y\u2009>\u20090 such that: ; decimal representation of y is a suffix of decimal representation of x. As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.Can you help Amr escape this embarrassing situation?","human_testcases":"[{\"input\": \"1 2 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 2 1000\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"5 3 1103\\r\\n\", \"output\": [\"590\"]}, {\"input\": \"2 17 10000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 9 10000\\r\\n\", \"output\": [\"252\"]}, {\"input\": \"6 64 941761822\\r\\n\", \"output\": [\"46530\"]}, {\"input\": \"183 3 46847167\\r\\n\", \"output\": [\"29891566\"]}, {\"input\": \"472 44 364550669\\r\\n\", \"output\": [\"122479316\"]}, {\"input\": \"510 76 811693420\\r\\n\", \"output\": [\"546301720\"]}, {\"input\": \"783 30 602209107\\r\\n\", \"output\": [\"279682329\"]}, {\"input\": \"863 47 840397713\\r\\n\", \"output\": [\"433465398\"]}, {\"input\": \"422 22 411212542\\r\\n\", \"output\": [\"63862621\"]}, {\"input\": \"370 9 385481464\\r\\n\", \"output\": [\"163845824\"]}, {\"input\": \"312 41 915197716\\r\\n\", \"output\": [\"912219984\"]}, {\"input\": \"261 32 49719977\\r\\n\", \"output\": [\"19320923\"]}, {\"input\": \"434 6 56571287\\r\\n\", \"output\": [\"56257936\"]}, {\"input\": \"355 3 945669623\\r\\n\", \"output\": [\"219132384\"]}, {\"input\": \"905 71 999142682\\r\\n\", \"output\": [\"825882209\"]}, {\"input\": \"900 84 526417573\\r\\n\", \"output\": [\"281234824\"]}, {\"input\": \"387 3 521021345\\r\\n\", \"output\": [\"435545521\"]}, {\"input\": \"246 33 996704992\\r\\n\", \"output\": [\"385601286\"]}, {\"input\": \"443 29 106807555\\r\\n\", \"output\": [\"7872021\"]}, {\"input\": \"621 43 356382217\\r\\n\", \"output\": [\"251594310\"]}, {\"input\": \"782 84 643445347\\r\\n\", \"output\": [\"208138038\"]}, {\"input\": \"791 23 94030462\\r\\n\", \"output\": [\"41862326\"]}, {\"input\": \"543 98 508536403\\r\\n\", \"output\": [\"117587951\"]}, {\"input\": \"20 96 238661639\\r\\n\", \"output\": [\"198761428\"]}, {\"input\": \"845 60 888437864\\r\\n\", \"output\": [\"193926448\"]}, {\"input\": \"998 85 501663165\\r\\n\", \"output\": [\"145180249\"]}, {\"input\": \"123 72 56222855\\r\\n\", \"output\": [\"32350599\"]}, {\"input\": \"12 39 618421525\\r\\n\", \"output\": [\"115875938\"]}, {\"input\": \"462 35 144751085\\r\\n\", \"output\": [\"79931198\"]}, {\"input\": \"674 22 494819681\\r\\n\", \"output\": [\"19590614\"]}, {\"input\": \"650 66 579060528\\r\\n\", \"output\": [\"224930740\"]}, {\"input\": \"432 80 133016247\\r\\n\", \"output\": [\"25032672\"]}, {\"input\": \"176 70 196445230\\r\\n\", \"output\": [\"64904804\"]}, {\"input\": \"393 71 933802677\\r\\n\", \"output\": [\"366541352\"]}, {\"input\": \"37 92 9838905\\r\\n\", \"output\": [\"7980021\"]}, {\"input\": \"993 26 108974437\\r\\n\", \"output\": [\"87469631\"]}, {\"input\": \"433 93 36915724\\r\\n\", \"output\": [\"20722839\"]}, {\"input\": \"957 88 512982771\\r\\n\", \"output\": [\"161742313\"]}, {\"input\": \"170 94 82742818\\r\\n\", \"output\": [\"1117330\"]}, {\"input\": \"624 33 145653575\\r\\n\", \"output\": [\"99048377\"]}, {\"input\": \"56 48 961996131\\r\\n\", \"output\": [\"199203510\"]}, {\"input\": \"889 6 225765429\\r\\n\", \"output\": [\"193135878\"]}, {\"input\": \"1 93 727895661\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"470 61 617307737\\r\\n\", \"output\": [\"428782123\"]}, {\"input\": \"520 94 712232167\\r\\n\", \"output\": [\"199435818\"]}, {\"input\": \"531 78 460047919\\r\\n\", \"output\": [\"117748792\"]}, {\"input\": \"776 32 523607700\\r\\n\", \"output\": [\"309970800\"]}, {\"input\": \"648 74 329538445\\r\\n\", \"output\": [\"177655063\"]}, {\"input\": \"885 6 743810885\\r\\n\", \"output\": [\"297512873\"]}, {\"input\": \"712 53 592302770\\r\\n\", \"output\": [\"147693148\"]}, {\"input\": \"426 72 589297447\\r\\n\", \"output\": [\"316207784\"]}, {\"input\": \"561 69 310141994\\r\\n\", \"output\": [\"245538618\"]}, {\"input\": \"604 97 26180786\\r\\n\", \"output\": [\"6950800\"]}, {\"input\": \"586 32 846994504\\r\\n\", \"output\": [\"579729448\"]}, {\"input\": \"514 67 260591607\\r\\n\", \"output\": [\"88291586\"]}, {\"input\": \"429 45 103817253\\r\\n\", \"output\": [\"41335161\"]}, {\"input\": \"767 27 364988776\\r\\n\", \"output\": [\"259490746\"]}, {\"input\": \"497 33 479662107\\r\\n\", \"output\": [\"84548778\"]}, {\"input\": \"262 71 404639692\\r\\n\", \"output\": [\"93447345\"]}, {\"input\": \"125 33 152527721\\r\\n\", \"output\": [\"59122415\"]}, {\"input\": \"857 98 70814341\\r\\n\", \"output\": [\"58423075\"]}, {\"input\": \"375 79 416634034\\r\\n\", \"output\": [\"175150318\"]}, {\"input\": \"886 10 902171654\\r\\n\", \"output\": [\"134375492\"]}, {\"input\": \"335 28 979397289\\r\\n\", \"output\": [\"675105408\"]}, {\"input\": \"769 30 474381420\\r\\n\", \"output\": [\"157049322\"]}, {\"input\": \"736 31 26855044\\r\\n\", \"output\": [\"24225276\"]}, {\"input\": \"891 7 814335325\\r\\n\", \"output\": [\"611862019\"]}, {\"input\": \"346 23 947672082\\r\\n\", \"output\": [\"59151110\"]}, {\"input\": \"1000 1 382210711\\r\\n\", \"output\": [\"372462157\"]}, {\"input\": \"1 1 10000\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1000 100 777767777\\r\\n\", \"output\": [\"577920877\"]}, {\"input\": \"1000 13 10619863\\r\\n\", \"output\": [\"8796170\"]}, {\"input\": \"1 100 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 11 11\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '12 39 618421525\\r\\n', 'output': ['115875938']}, {'input': '791 23 94030462\\r\\n', 'output': ['41862326']}, {'input': '561 69 310141994\\r\\n', 'output': ['245538618']}, {'input': '262 71 404639692\\r\\n', 'output': ['93447345']}, {'input': '261 32 49719977\\r\\n', 'output': ['19320923']}]","human_sample_testcases_2":"[{'input': '510 76 811693420\\r\\n', 'output': ['546301720']}, {'input': '1 2 1000\\r\\n', 'output': ['4']}, {'input': '621 43 356382217\\r\\n', 'output': ['251594310']}, {'input': '472 44 364550669\\r\\n', 'output': ['122479316']}, {'input': '434 6 56571287\\r\\n', 'output': ['56257936']}]","human_sample_testcases_3":"[{'input': '472 44 364550669\\r\\n', 'output': ['122479316']}, {'input': '312 41 915197716\\r\\n', 'output': ['912219984']}, {'input': '183 3 46847167\\r\\n', 'output': ['29891566']}, {'input': '1 2 2\\r\\n', 'output': ['0']}, {'input': '604 97 26180786\\r\\n', 'output': ['6950800']}]","human_sample_testcases_4":"[{'input': '176 70 196445230\\r\\n', 'output': ['64904804']}, {'input': '863 47 840397713\\r\\n', 'output': ['433465398']}, {'input': '1000 1 382210711\\r\\n', 'output': ['372462157']}, {'input': '510 76 811693420\\r\\n', 'output': ['546301720']}, {'input': '393 71 933802677\\r\\n', 'output': ['366541352']}]","human_sample_testcases_5":"[{'input': '674 22 494819681\\r\\n', 'output': ['19590614']}, {'input': '1000 13 10619863\\r\\n', 'output': ['8796170']}, {'input': '170 94 82742818\\r\\n', 'output': ['1117330']}, {'input': '543 98 508536403\\r\\n', 'output': ['117587951']}, {'input': '346 23 947672082\\r\\n', 'output': ['59151110']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":251,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"8 5\\n10 9 8 7 7 7 5 5\", \"4 2\\n0 0 0 0\"]","input_specification":"The first line of the input contains two integers n and k (1\u2009\u2264\u2009k\u2009\u2264\u2009n\u2009\u2264\u200950) separated by a single space. The second line contains n space-separated integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u2009100), where ai is the score earned by the participant who got the i-th place. The given sequence is non-increasing (that is, for all i from 1 to n\u2009-\u20091 the following condition is fulfilled: ai\u2009\u2265\u2009ai\u2009+\u20091).","src_uid":"193ec1226ffe07522caf63e84a7d007f","source_code":"import java.util.Scanner;\n\npublic class NextRound2 {\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int n,k,score=-1,count=0;\n n = scan.nextInt();\n k = scan.nextInt();\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n }\n scan.close();\n if(a[0]==0){\n k=0;\n }else{\n \/\/6 2\n \/\/3 0 0 0 0 0 \n while(a[k-1]==0)k--;\n \/\/non-incresing, next number from (k-1) must be the same (k).\n while(k b) {\n oneWin = true;\n break;\n }\n }\n\n if (oneWin) {\n String temp = String.valueOf(ans);\n int digits = temp.length();\n for (int i = 0;i < 9 - digits; i++) {\n answer += \"0\";\n }\n answer += String.valueOf(ans);\n System.out.println(\"1 \" + answer);\n } else {\n System.out.println(2);\n }\n }\n}\n","sample_outputs":"[\"2\", \"1 000000001\"]","lang_cluster":"Java","notes":"NoteThe lexical comparison of strings is performed by the < operator in modern programming languages. String x is lexicographically less than string y if exists such i (1\u2009\u2264\u2009i\u2009\u2264\u20099), that xi\u2009<\u2009yi, and for any j (1\u2009\u2264\u2009j\u2009<\u2009i) xj\u2009=\u2009yj. These strings always have length 9.","output_specification":"If the first player wins, print \"1\" and the lexicographically minimum string s1 he has to write to win. If the second player wins, print the single number \"2\".","description":"In a very ancient country the following game was popular. Two people play the game. Initially first player writes a string s1, consisting of exactly nine digits and representing a number that does not exceed a. After that second player looks at s1 and writes a string s2, consisting of exactly nine digits and representing a number that does not exceed b. Here a and b are some given constants, s1 and s2 are chosen by the players. The strings are allowed to contain leading zeroes.If a number obtained by the concatenation (joining together) of strings s1 and s2 is divisible by mod, then the second player wins. Otherwise the first player wins. You are given numbers a, b, mod. Your task is to determine who wins if both players play in the optimal manner. If the first player wins, you are also required to find the lexicographically minimum winning move.","human_testcases":"[{\"input\": \"1 10 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 0 9\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"10 7 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 4 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 1 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 7 9\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"13 4 51\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"0 0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1 3\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"0 2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 3 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 0 3\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 0 13\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1 2 13\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 3 12\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1 2 11\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"815 216 182\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"218 550 593\\r\\n\", \"output\": [\"1 000000011\"]}, {\"input\": \"116482865 344094604 3271060\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"19749161 751031022 646204\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"70499104 10483793 5504995\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1960930 562910 606828\\r\\n\", \"output\": [\"1 000000011\"]}, {\"input\": \"8270979 4785512 9669629\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"9323791 4748006 5840080\\r\\n\", \"output\": [\"1 000000005\"]}, {\"input\": \"972037745 4602117 5090186\\r\\n\", \"output\": [\"1 000000011\"]}, {\"input\": \"585173560 4799128 5611727\\r\\n\", \"output\": [\"1 000000036\"]}, {\"input\": \"22033548 813958 4874712\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"702034015 6007275 9777625\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"218556 828183 7799410\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1167900 2709798 6800151\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"7004769 3114686 4659684\\r\\n\", \"output\": [\"1 000000002\"]}, {\"input\": \"1000000000 1000000000 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3631 1628 367377\\r\\n\", \"output\": [\"1 000000009\"]}, {\"input\": \"3966 5002 273075\\r\\n\", \"output\": [\"1 000000008\"]}, {\"input\": \"2388 2896 73888\\r\\n\", \"output\": [\"1 000000016\"]}, {\"input\": \"0 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 1000000000 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 1000000000 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 0 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 1000000000 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 0 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 999999999 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999 0 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999 999999999 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999 1000000000 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 999999999 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 10000 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 1337\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"576694 1234562 1234567\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"12350 12000 12345\\r\\n\", \"output\": [\"1 000000011\"]}, {\"input\": \"576695 1234562 1234567\\r\\n\", \"output\": [\"1 000576695\"]}, {\"input\": \"0 0 11\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999 999999999 9009009\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0 7\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1 1 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 9999991 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9902593 9902584 9902593\\r\\n\", \"output\": [\"1 002490619\"]}, {\"input\": \"10000000 9999977 9999979\\r\\n\", \"output\": [\"1 009909503\"]}, {\"input\": \"1000000000 1000000000 9999999\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11 9 11\\r\\n\", \"output\": [\"1 000000010\"]}, {\"input\": \"0 7 13\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0 3\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"100 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 7 13\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0 9\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"1000000000 9999995 10000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 25 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"243 1001 1003\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9 9 11\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 1 11\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 4 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 1 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 0 11\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"0 0 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 12000 12345\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 0 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1 7\\r\\n\", \"output\": [\"1 000000002\"]}, {\"input\": \"1000000000 2 1000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"23 0 23\\r\\n\", \"output\": [\"1 000000001\"]}, {\"input\": \"123456789 1234561 1234567\\r\\n\", \"output\": [\"1 000549636\"]}, {\"input\": \"11 10 13\\r\\n\", \"output\": [\"1 000000011\"]}, {\"input\": \"138 11711 11829\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000 100050 1000001\\r\\n\", \"output\": [\"1 000000101\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999999999 0 10000000\\r\\n', 'output': ['2']}, {'input': '2 1 3\\r\\n', 'output': ['1 000000001']}, {'input': '1000000000 9999991 10000000\\r\\n', 'output': ['2']}, {'input': '4 1 4\\r\\n', 'output': ['2']}, {'input': '116482865 344094604 3271060\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '0 7 13\\r\\n', 'output': ['2']}, {'input': '0 3 3\\r\\n', 'output': ['2']}, {'input': '1000000000 0 2\\r\\n', 'output': ['2']}, {'input': '9902593 9902584 9902593\\r\\n', 'output': ['1 002490619']}, {'input': '815 216 182\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '0 1 1\\r\\n', 'output': ['2']}, {'input': '1000000000 0 2\\r\\n', 'output': ['2']}, {'input': '1000000000 1000000000 9999999\\r\\n', 'output': ['2']}, {'input': '3966 5002 273075\\r\\n', 'output': ['1 000000008']}, {'input': '1 0 9\\r\\n', 'output': ['1 000000001']}]","human_sample_testcases_4":"[{'input': '0 0 11\\r\\n', 'output': ['2']}, {'input': '243 1001 1003\\r\\n', 'output': ['2']}, {'input': '1 0 9\\r\\n', 'output': ['1 000000001']}, {'input': '116482865 344094604 3271060\\r\\n', 'output': ['2']}, {'input': '4 3 12\\r\\n', 'output': ['1 000000001']}]","human_sample_testcases_5":"[{'input': '10 12000 12345\\r\\n', 'output': ['2']}, {'input': '1000000000 0 10000000\\r\\n', 'output': ['2']}, {'input': '0 1000000000 10000000\\r\\n', 'output': ['2']}, {'input': '23 0 23\\r\\n', 'output': ['1 000000001']}, {'input': '11 10 13\\r\\n', 'output': ['1 000000011']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":253,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\", \"7\"]","input_specification":"The only line of the input contains integer n (0\u2009\u2264\u2009n\u2009\u2264\u20091018)\u00a0\u2014 the number of Ayrat's moves.","src_uid":"a4b6a570f5e63462b68447713924b465","source_code":"import java.io.BufferedOutputStream;\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\n\/**\n * CodeForces : 338\n * \n * @author vinaysaini E. Hexagons\n *\/\npublic class cf338e {\n\n\tstatic int dx[] = { 1, -1, -2, -1, 1, 2 };\n\tstatic int dy[] = { 2, 2, 0, -2, -2, 0 };\n\n\tpublic static void main(String[] args) {\n\t\tlong x = 0, y = 0;\n\n\t\tlong n = in.nextLong();\n\t\tlong ringNumber = getRing(n);\n\t\tlong stepsUpTo = 3 * ringNumber * ringNumber + 3 * ringNumber;\n\t\tx = 2 * ringNumber;\n\t\tlong remainingSteps = n - stepsUpTo;\n\t\tif (remainingSteps > 0) {\n\t\t\tx = x + dx[0];\n\t\t\ty = y + dy[0];\n\t\t\tremainingSteps--;\n\t\t}\n\t\tif (remainingSteps >= ringNumber) {\n\t\t\tx += dx[1] * ringNumber;\n\t\t\ty += dy[1] * ringNumber;\n\t\t\tremainingSteps -= ringNumber;\n\t\t} else {\n\t\t\tx += dx[1] * remainingSteps;\n\t\t\ty += dy[1] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\t\tif (remainingSteps >= ringNumber+1) {\n\t\t\tx += dx[2] * (ringNumber+1);\n\t\t\ty += dy[2] * (ringNumber+1);\n\t\t\tremainingSteps -= ringNumber+1;\n\t\t} else {\n\t\t\tx += dx[2] * remainingSteps;\n\t\t\ty += dy[2] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\t\tif (remainingSteps >= ringNumber+1) {\n\t\t\tx += dx[3] * (ringNumber+1);\n\t\t\ty += dy[3] * (ringNumber+1);\n\t\t\tremainingSteps -= ringNumber+1;\n\t\t} else {\n\t\t\tx += dx[3] * remainingSteps;\n\t\t\ty += dy[3] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\t\tif (remainingSteps >= ringNumber+1) {\n\t\t\tx += dx[4] * (ringNumber+1);\n\t\t\ty += dy[4] * (ringNumber+1);\n\t\t\tremainingSteps -= ringNumber+1;\n\t\t} else {\n\t\t\tx += dx[4] * remainingSteps;\n\t\t\ty += dy[4] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\t\tif (remainingSteps >= ringNumber+1) {\n\t\t\tx += dx[5] * (ringNumber+1);\n\t\t\ty += dy[5] * (ringNumber+1);\n\t\t\tremainingSteps -= ringNumber+1;\n\t\t} else {\n\t\t\tx += dx[5] * remainingSteps;\n\t\t\ty += dy[5] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\t\tif (remainingSteps >= ringNumber) {\n\t\t\tx += dx[0] * ringNumber;\n\t\t\ty += dy[0] * ringNumber;\n\t\t\tremainingSteps -= ringNumber;\n\t\t} else {\n\t\t\tx += dx[0] * remainingSteps;\n\t\t\ty += dy[0] * remainingSteps;\n\t\t\tremainingSteps -= remainingSteps;\n\t\t}\n\n\t\tout.println(x + \" \" + y);\n\t\tout.close();\n\t}\n\n\tstatic long getRing(long n) {\n\t\tlong l = 0;\n\t\tlong r = (long) 1e9;\n\t\twhile (l < r) {\n\t\t\tlong m = (l + r) \/ 2;\n\t\t\tlong sum = 3 * m * m + 3 * m;\n\t\t\tif (n < sum) {\n\t\t\t\tr = m;\n\t\t\t} else\n\t\t\t\tl = m + 1;\n\t\t}\n\t\treturn l - 1;\n\t}\n\n\tpublic static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));\n\tpublic static FastScanner in = new FastScanner();\n\n\tpublic static class FastScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t} \/\/ --fast i\/o ends here----\/\/\n\n}\n","sample_outputs":"[\"-2 0\", \"3 2\"]","lang_cluster":"Java","notes":null,"output_specification":"Print two integers x and y\u00a0\u2014 current coordinates of Ayrat coordinates.","description":"Ayrat is looking for the perfect code. He decided to start his search from an infinite field tiled by hexagons. For convenience the coordinate system is introduced, take a look at the picture to see how the coordinates of hexagon are defined: Ayrat is searching through the field. He started at point (0,\u20090) and is moving along the spiral (see second picture). Sometimes he forgets where he is now. Help Ayrat determine his location after n moves.","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"-2 0\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"3 2\"]}, {\"input\": \"39\\r\\n\", \"output\": [\"5 6\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"-2 -4\"]}, {\"input\": \"94\\r\\n\", \"output\": [\"8 8\"]}, {\"input\": \"60\\r\\n\", \"output\": [\"8 0\"]}, {\"input\": \"60\\r\\n\", \"output\": [\"8 0\"]}, {\"input\": \"59\\r\\n\", \"output\": [\"7 -2\"]}, {\"input\": \"181994\\r\\n\", \"output\": [\"154 -492\"]}, {\"input\": \"486639\\r\\n\", \"output\": [\"-33 806\"]}, {\"input\": \"34514\\r\\n\", \"output\": [\"13 -214\"]}, {\"input\": \"826594\\r\\n\", \"output\": [\"-769 562\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"-418284973 -1154700538\"]}, {\"input\": \"854460\\r\\n\", \"output\": [\"414 1068\"]}, {\"input\": \"164960\\r\\n\", \"output\": [\"458 -20\"]}, {\"input\": \"618459\\r\\n\", \"output\": [\"-797 -222\"]}, {\"input\": \"496181994\\r\\n\", \"output\": [\"21108 9228\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"27596 -17836\"]}, {\"input\": \"228939226\\r\\n\", \"output\": [\"1516 17472\"]}, {\"input\": \"973034514\\r\\n\", \"output\": [\"27776 16488\"]}, {\"input\": \"984826594\\r\\n\", \"output\": [\"22704 -27064\"]}, {\"input\": \"19164960\\r\\n\", \"output\": [\"4864 384\"]}, {\"input\": \"249781780\\r\\n\", \"output\": [\"2815 18250\"]}, {\"input\": \"851838979\\r\\n\", \"output\": [\"8695 33702\"]}, {\"input\": \"978618459\\r\\n\", \"output\": [\"-15591 -36122\"]}, {\"input\": \"871854460\\r\\n\", \"output\": [\"31404 5384\"]}, {\"input\": \"302486639\\r\\n\", \"output\": [\"11555 -17054\"]}, {\"input\": \"0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"-1 2\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"-2 0\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"-1 -2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"1 -2\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"2 0\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"3 2\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"2 4\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"0 4\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"-2 4\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"-3 2\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"-4 0\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"-3 -2\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"-2 -4\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"0 -4\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"2 -4\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"3 -2\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"4 0\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"5 2\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"4 4\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"3 6\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"-1 6\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"-3 6\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"-4 4\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"-5 2\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"-6 0\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"-5 -2\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"-4 -4\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"-3 -6\"]}, {\"input\": \"257947185131120683\\r\\n\", \"output\": [\"-53995102 -586455096\"]}, {\"input\": \"258773432604171403\\r\\n\", \"output\": [\"-438664202 297458800\"]}, {\"input\": \"259599671487287531\\r\\n\", \"output\": [\"-252460838 -588330600\"]}, {\"input\": \"260425914665370955\\r\\n\", \"output\": [\"-423141322 332249584\"]}, {\"input\": \"261252157843454379\\r\\n\", \"output\": [\"-164822562 -590200144\"]}, {\"input\": \"262078401021537803\\r\\n\", \"output\": [\"439863347 302538706\"]}, {\"input\": \"262904639904653932\\r\\n\", \"output\": [\"-378326148 -427475264\"]}, {\"input\": \"263730878787770060\\r\\n\", \"output\": [\"200309780 592993400\"]}, {\"input\": \"264557126260820780\\r\\n\", \"output\": [\"489196540 209450068\"]}, {\"input\": \"775736713043603670\\r\\n\", \"output\": [\"-794841963 -444342246\"]}, {\"input\": \"776562956221687094\\r\\n\", \"output\": [\"-623135314 -788838484\"]}, {\"input\": \"777389199399770518\\r\\n\", \"output\": [\"-328249537 -1018095738\"]}, {\"input\": \"778215438282886646\\r\\n\", \"output\": [\"-719067659 -599137942\"]}, {\"input\": \"779041681460970070\\r\\n\", \"output\": [\"-637165825 764022826\"]}, {\"input\": \"779867924639053494\\r\\n\", \"output\": [\"559082192 -921270732\"]}, {\"input\": \"780694167817136918\\r\\n\", \"output\": [\"7343027 1020257594\"]}, {\"input\": \"781520406700253046\\r\\n\", \"output\": [\"-707743686 626107308\"]}, {\"input\": \"782346645583369174\\r\\n\", \"output\": [\"797020774 -448632052\"]}, {\"input\": \"783172893056419894\\r\\n\", \"output\": [\"604133660 -835484644\"]}, {\"input\": \"294352484134170081\\r\\n\", \"output\": [\"-264428508 -626474244\"]}, {\"input\": \"34761473798667069\\r\\n\", \"output\": [\"-107643660 215287324\"]}, {\"input\": \"247761054921329978\\r\\n\", \"output\": [\"-287379568 574759144\"]}, {\"input\": \"88904985049714519\\r\\n\", \"output\": [\"344296355 2\"]}, {\"input\": \"64695994584418558\\r\\n\", \"output\": [\"146851396 293702780\"]}, {\"input\": \"2999472947040002\\r\\n\", \"output\": [\"31620002 63239992\"]}, {\"input\": \"134013960807648841\\r\\n\", \"output\": [\"-422711816 4\"]}, {\"input\": \"27719767248080188\\r\\n\", \"output\": [\"-96124517 -192249026\"]}, {\"input\": \"228296921967681448\\r\\n\", \"output\": [\"-275860421 551720850\"]}, {\"input\": \"622704061396296670\\r\\n\", \"output\": [\"-911192665 10\"]}, {\"input\": \"382830415035226081\\r\\n\", \"output\": [\"357225613 714451226\"]}, {\"input\": \"175683606088259879\\r\\n\", \"output\": [\"-483988434 8\"]}, {\"input\": \"533568904697339792\\r\\n\", \"output\": [\"-421730125 843460258\"]}, {\"input\": \"281824423976299408\\r\\n\", \"output\": [\"-306498737 -612997466\"]}, {\"input\": \"237223610332609448\\r\\n\", \"output\": [\"-281201952 -562403896\"]}, {\"input\": \"82638676376847406\\r\\n\", \"output\": [\"-331941110 4\"]}, {\"input\": \"358538881902627465\\r\\n\", \"output\": [\"-691412929 6\"]}, {\"input\": \"1941943667672759\\r\\n\", \"output\": [\"-25442382 -50884744\"]}, {\"input\": \"504819148029580024\\r\\n\", \"output\": [\"820421960 -4\"]}, {\"input\": \"24271330411219667\\r\\n\", \"output\": [\"179893783 -2\"]}, {\"input\": \"108364135632524999\\r\\n\", \"output\": [\"-380112498 8\"]}, {\"input\": \"16796277375911920\\r\\n\", \"output\": [\"74824856 -149649712\"]}, {\"input\": \"194403552286884865\\r\\n\", \"output\": [\"-509121532 4\"]}, {\"input\": \"565840809656836956\\r\\n\", \"output\": [\"868593352 0\"]}, {\"input\": \"39010293491965817\\r\\n\", \"output\": [\"-114032591 -228065170\"]}, {\"input\": \"746407891412272132\\r\\n\", \"output\": [\"498801191 -997602386\"]}, {\"input\": \"95626493228268863\\r\\n\", \"output\": [\"178537107 357074206\"]}, {\"input\": \"385078658398478614\\r\\n\", \"output\": [\"358273010 -716546028\"]}, {\"input\": \"177207687885798058\\r\\n\", \"output\": [\"486083238 -4\"]}, {\"input\": \"536222521732590352\\r\\n\", \"output\": [\"-422777531 845555062\"]}, {\"input\": \"1571429132955632\\r\\n\", \"output\": [\"45773778 4\"]}, {\"input\": \"498549006180463098\\r\\n\", \"output\": [\"407655496 -815310984\"]}, {\"input\": \"438594547809157461\\r\\n\", \"output\": [\"382358709 -764717418\"]}, {\"input\": \"214071008058709620\\r\\n\", \"output\": [\"534254630 0\"]}, {\"input\": \"599060227806517999\\r\\n\", \"output\": [\"-446863220 893726452\"]}, {\"input\": \"329939015655396840\\r\\n\", \"output\": [\"-331631832 663263664\"]}, {\"input\": \"281523482448806534\\r\\n\", \"output\": [\"306335045 612670094\"]}, {\"input\": \"109561818187625921\\r\\n\", \"output\": [\"191103653 382207306\"]}, {\"input\": \"412565943716413781\\r\\n\", \"output\": [\"370839563 741679126\"]}, {\"input\": \"196006607922989510\\r\\n\", \"output\": [\"-255608161 511216338\"]}, {\"input\": \"379604878823574823\\r\\n\", \"output\": [\"-355717526 711435056\"]}, {\"input\": \"173500741457825598\\r\\n\", \"output\": [\"240486136 480972264\"]}, {\"input\": \"138919367769131398\\r\\n\", \"output\": [\"-430378693 10\"]}, {\"input\": \"29974778103430162\\r\\n\", \"output\": [\"99957958 199915904\"]}, {\"input\": \"234685974076220810\\r\\n\", \"output\": [\"-279693865 559387730\"]}, {\"input\": \"633227154929081648\\r\\n\", \"output\": [\"-459429777 -918859546\"]}, {\"input\": \"58101264340386100\\r\\n\", \"output\": [\"-139165682 278331372\"]}, {\"input\": \"1718550904886625\\r\\n\", \"output\": [\"23934291 -47868582\"]}, {\"input\": \"124444652733481603\\r\\n\", \"output\": [\"203670197 -407340402\"]}, {\"input\": \"441000740540275741\\r\\n\", \"output\": [\"-383406115 -766812218\"]}, {\"input\": \"545168342596476149\\r\\n\", \"output\": [\"852579099 -2\"]}, {\"input\": \"138919367769131403\\r\\n\", \"output\": [\"-430378698 0\"]}, {\"input\": \"138919367984320752\\r\\n\", \"output\": [\"-215189349 -430378698\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"-1 2\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"-1 -2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"1 -2\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"2 0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '11\\r\\n', 'output': ['-3 2']}, {'input': '486639\\r\\n', 'output': ['-33 806']}, {'input': '0\\r\\n', 'output': ['0 0']}, {'input': '39\\r\\n', 'output': ['5 6']}, {'input': '26\\r\\n', 'output': ['-5 2']}]","human_sample_testcases_2":"[{'input': '8\\r\\n', 'output': ['2 4']}, {'input': '385078658398478614\\r\\n', 'output': ['358273010 -716546028']}, {'input': '39\\r\\n', 'output': ['5 6']}, {'input': '302486639\\r\\n', 'output': ['11555 -17054']}, {'input': '27719767248080188\\r\\n', 'output': ['-96124517 -192249026']}]","human_sample_testcases_3":"[{'input': '1941943667672759\\r\\n', 'output': ['-25442382 -50884744']}, {'input': '261252157843454379\\r\\n', 'output': ['-164822562 -590200144']}, {'input': '262078401021537803\\r\\n', 'output': ['439863347 302538706']}, {'input': '25\\r\\n', 'output': ['-4 4']}, {'input': '329939015655396840\\r\\n', 'output': ['-331631832 663263664']}]","human_sample_testcases_4":"[{'input': '13\\r\\n', 'output': ['-3 -2']}, {'input': '60\\r\\n', 'output': ['8 0']}, {'input': '441000740540275741\\r\\n', 'output': ['-383406115 -766812218']}, {'input': '262904639904653932\\r\\n', 'output': ['-378326148 -427475264']}, {'input': '2\\r\\n', 'output': ['-1 2']}]","human_sample_testcases_5":"[{'input': '259599671487287531\\r\\n', 'output': ['-252460838 -588330600']}, {'input': '257947185131120683\\r\\n', 'output': ['-53995102 -586455096']}, {'input': '94\\r\\n', 'output': ['8 8']}, {'input': '15\\r\\n', 'output': ['0 -4']}, {'input': '281824423976299408\\r\\n', 'output': ['-306498737 -612997466']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":86.96,"human_sample_line_coverage_2":95.65,"human_sample_line_coverage_3":91.3,"human_sample_line_coverage_4":91.3,"human_sample_line_coverage_5":91.3,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":88.89,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":88.89,"human_sample_branch_coverage_5":83.33,"id":254,"human_sample_pass_rate":100.0,"human_sample_line_coverage":91.302,"human_sample_branch_coverage":85.554} {"sample_inputs":"[\"6 1\", \"6 2\", \"60 5\"]","input_specification":"The only line of the input contains two integers $$$n$$$ and $$$k$$$ ($$$1 \\leq n \\leq 10^{15}$$$, $$$1 \\leq k \\leq 10^4$$$).","src_uid":"dc466d9c24b7dcb37c0e99337b4124d2","source_code":"import java.lang.*;\nimport java.math.*;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\nclass Node {\n long p;\n int a;\n public Node(long p,int a){\n this.p=p;\n this.a=a;\n }\n}\n void solve() {\n long n=nl(); int k=ni();\n ArrayList vec=new ArrayList<>();\n for(long i=2;i*i<=n;i++){\n if(n%i==0){\n int cc=0;\n while(n%i==0){\n n\/=i;\n cc++;\n }\n vec.add(new Node(i,cc));\n }\n }\n if(n>1) vec.add(new Node(n,1));\n long dp[][]=new long[51][k+1];\n long ans=1;\n long suf[]=new long[51];\n long curSuf[]=new long[51];\n long inv[]=new long[52];\n for(int i=0;i<52;i++) inv[i]=modInverse(i);\n\n for(Node P : vec){\n long p=P.p; int a=P.a;\n for(int i=0;i<=50;i++) Arrays.fill(dp[i],0);\n\n dp[a][0]=1;\n Arrays.fill(suf,inv[a+1]);\n\n for(int s=1;s<=k;s++){\n Arrays.fill(curSuf,0);\n for(int i=a;i>=0;i--){\n dp[i][s]=suf[i];\n curSuf[i]=mul(dp[i][s],inv[i+1]);\n if(i+1<=a) curSuf[i]=add(curSuf[i],curSuf[i+1]);\n \/\/ for(int j=i;j<=a;j++) dp[i][s]=add(dp[i][s],mul(dp[j][s-1],inv[j+1]));\n\n }\n for(int i=0;i<=a;i++) suf[i]=curSuf[i];\n }\n long ex=0;\n for(int i=0;i<=a;i++){\n ex=add(ex,mul(dp[i][k],modpow(p,i)));\n\n }\n \/\/ if(p==2) pw.println(dp[0][k]+\" \"+dp[1][k]+\" \"+modInverse(2)+\" \"+ex+\" \"+mul(3,modInverse(2)));\n ans=mul(ans,ex);\n\n }\n pw.println(ans);\n\n }\n long add(long x,long y){\n x+=y;\n if(x>=M) x-=M;\n return x;\n }\n long sub(long x,long y){\n x-=y;\n if(x<0) x+=M;\n return x;\n }\n long mul(long x,long y){\n x*=y;\n if(x>=M) x%=M;\n return x;\n }\n long modpow(long a, long b)\n {\n long r=1;\n while(b>0)\n {\n if((b&1)>0) r=mul(r,a);\n a=mul(a,a);\n b>>=1;\n }\n return r;\n }\n\n long modInverse(long A)\n {\n\n return modpow(A,M-2);\n }\n\n\n\n\n long M= (long)1e9+7;\n InputStream is;\n PrintWriter pw;\n String INPUT = \"\";\n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n pw = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n solve();\n pw.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n\n }\n public static void main(String[] args) throws Exception { new Main().run(); }\n\n private byte[] inbuf = new byte[1024];\n public int lenbuf = 0, ptrbuf = 0;\n\n private int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n }\n return inbuf[ptrbuf++];\n }\n\n private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n\n private double nd() { return Double.parseDouble(ns()); }\n private char nc() { return (char)skip(); }\n\n private String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ \/\/ when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n private char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n }\n return n == p ? buf : Arrays.copyOf(buf, p);\n }\n\n private char[][] nm(int n, int m) {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }\n\n private int[] na(int n) {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }\n\n private int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-'){\n minus = true;\n b = readByte();\n }\n\n while(true){\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n }else{\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n\n private long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-'){\n minus = true;\n b = readByte();\n }\n\n while(true){\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n }else{\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n private boolean oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n\n}","sample_outputs":"[\"3\", \"875000008\", \"237178099\"]","lang_cluster":"Java","notes":"NoteIn the first example, after one step, the number written on the blackboard is $$$1$$$, $$$2$$$, $$$3$$$ or $$$6$$$ \u2014 each occurring with equal probability. Hence, the answer is $$$\\frac{1+2+3+6}{4}=3$$$.In the second example, the answer is equal to $$$1 \\cdot \\frac{9}{16}+2 \\cdot \\frac{3}{16}+3 \\cdot \\frac{3}{16}+6 \\cdot \\frac{1}{16}=\\frac{15}{8}$$$.","output_specification":"Print a single integer \u2014 the expected value of the number on the blackboard after $$$k$$$ steps as $$$P \\cdot Q^{-1} \\pmod{10^9+7}$$$ for $$$P$$$, $$$Q$$$ defined above.","description":"Makoto has a big blackboard with a positive integer $$$n$$$ written on it. He will perform the following action exactly $$$k$$$ times:Suppose the number currently written on the blackboard is $$$v$$$. He will randomly pick one of the divisors of $$$v$$$ (possibly $$$1$$$ and $$$v$$$) and replace $$$v$$$ with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses $$$58$$$ as his generator seed, each divisor is guaranteed to be chosen with equal probability.He now wonders what is the expected value of the number written on the blackboard after $$$k$$$ steps.It can be shown that this value can be represented as $$$\\frac{P}{Q}$$$ where $$$P$$$ and $$$Q$$$ are coprime integers and $$$Q \\not\\equiv 0 \\pmod{10^9+7}$$$. Print the value of $$$P \\cdot Q^{-1}$$$ modulo $$$10^9+7$$$.","human_testcases":"[{\"input\": \"6 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6 2\\r\\n\", \"output\": [\"875000008\"]}, {\"input\": \"60 5\\r\\n\", \"output\": [\"237178099\"]}, {\"input\": \"2 4\\r\\n\", \"output\": [\"562500005\"]}, {\"input\": \"12 3\\r\\n\", \"output\": [\"775462970\"]}, {\"input\": \"55 5\\r\\n\", \"output\": [\"789062507\"]}, {\"input\": \"935 9\\r\\n\", \"output\": [\"658825880\"]}, {\"input\": \"1 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"120 1\\r\\n\", \"output\": [\"500000026\"]}, {\"input\": \"1000000000000000 10000\\r\\n\", \"output\": [\"215514159\"]}, {\"input\": \"671058194037157 8673\\r\\n\", \"output\": [\"298638658\"]}, {\"input\": \"900018062553298 4801\\r\\n\", \"output\": [\"345432320\"]}, {\"input\": \"128973636102142 5521\\r\\n\", \"output\": [\"99152648\"]}, {\"input\": \"999999999999993 8123\\r\\n\", \"output\": [\"868053217\"]}, {\"input\": \"260858031033600 9696\\r\\n\", \"output\": [\"692221824\"]}, {\"input\": \"562949953421312 9779\\r\\n\", \"output\": [\"98057767\"]}, {\"input\": \"357933504618282 1649\\r\\n\", \"output\": [\"197730476\"]}, {\"input\": \"586884783199831 5073\\r\\n\", \"output\": [\"883678085\"]}, {\"input\": \"187877211524483 8497\\r\\n\", \"output\": [\"562808746\"]}, {\"input\": \"866421317361600 10000\\r\\n\", \"output\": [\"82212846\"]}, {\"input\": \"782574093100800 9999\\r\\n\", \"output\": [\"293217028\"]}, {\"input\": \"577614211574400 9998\\r\\n\", \"output\": [\"681915605\"]}, {\"input\": \"65214507758400 9997\\r\\n\", \"output\": [\"677959603\"]}, {\"input\": \"963761198400 9996\\r\\n\", \"output\": [\"669401143\"]}, {\"input\": \"5587021440 9995\\r\\n\", \"output\": [\"360750834\"]}, {\"input\": \"17297280 9994\\r\\n\", \"output\": [\"94383698\"]}, {\"input\": \"7560 9993\\r\\n\", \"output\": [\"412712546\"]}, {\"input\": \"120 9992\\r\\n\", \"output\": [\"167656619\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"609359740010496 1337\\r\\n\", \"output\": [\"263703037\"]}, {\"input\": \"912750790581630 9876\\r\\n\", \"output\": [\"291557094\"]}, {\"input\": \"617673396283947 7777\\r\\n\", \"output\": [\"488769014\"]}, {\"input\": \"890604418498560 9119\\r\\n\", \"output\": [\"185509970\"]}, {\"input\": \"524288004718592 8888\\r\\n\", \"output\": [\"851726115\"]}, {\"input\": \"999999999999989 8998\\r\\n\", \"output\": [\"391873310\"]}, {\"input\": \"999999999999999 8123\\r\\n\", \"output\": [\"41003922\"]}, {\"input\": \"817237005720659 4233\\r\\n\", \"output\": [\"533017938\"]}, {\"input\": \"1000000007 1\\r\\n\", \"output\": [\"500000004\"]}, {\"input\": \"1000000007 2\\r\\n\", \"output\": [\"750000006\"]}, {\"input\": \"999999999999970 8998\\r\\n\", \"output\": [\"939941657\"]}, {\"input\": \"900000060000001 8123\\r\\n\", \"output\": [\"865356488\"]}, {\"input\": \"999011322032079 4233\\r\\n\", \"output\": [\"546309400\"]}, {\"input\": \"999005327998113 9119\\r\\n\", \"output\": [\"106270540\"]}, {\"input\": \"900000720000023 9876\\r\\n\", \"output\": [\"511266473\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '866421317361600 10000\\r\\n', 'output': ['82212846']}, {'input': '60 5\\r\\n', 'output': ['237178099']}, {'input': '935 9\\r\\n', 'output': ['658825880']}, {'input': '890604418498560 9119\\r\\n', 'output': ['185509970']}, {'input': '817237005720659 4233\\r\\n', 'output': ['533017938']}]","human_sample_testcases_2":"[{'input': '1 1\\r\\n', 'output': ['1']}, {'input': '6 1\\r\\n', 'output': ['3']}, {'input': '999999999999999 8123\\r\\n', 'output': ['41003922']}, {'input': '128973636102142 5521\\r\\n', 'output': ['99152648']}, {'input': '357933504618282 1649\\r\\n', 'output': ['197730476']}]","human_sample_testcases_3":"[{'input': '5587021440 9995\\r\\n', 'output': ['360750834']}, {'input': '17297280 9994\\r\\n', 'output': ['94383698']}, {'input': '617673396283947 7777\\r\\n', 'output': ['488769014']}, {'input': '260858031033600 9696\\r\\n', 'output': ['692221824']}, {'input': '65214507758400 9997\\r\\n', 'output': ['677959603']}]","human_sample_testcases_4":"[{'input': '900018062553298 4801\\r\\n', 'output': ['345432320']}, {'input': '2 4\\r\\n', 'output': ['562500005']}, {'input': '890604418498560 9119\\r\\n', 'output': ['185509970']}, {'input': '617673396283947 7777\\r\\n', 'output': ['488769014']}, {'input': '900000720000023 9876\\r\\n', 'output': ['511266473']}]","human_sample_testcases_5":"[{'input': '17297280 9994\\r\\n', 'output': ['94383698']}, {'input': '2 4\\r\\n', 'output': ['562500005']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '999999999999993 8123\\r\\n', 'output': ['868053217']}, {'input': '609359740010496 1337\\r\\n', 'output': ['263703037']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":255,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1 3 3 2\", \"3\\n1 1 1\", \"4\\n42 0 0 42\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100)\u00a0\u2014 the number of participants. The next line contains a sequence of n integers a1,\u2009a2,\u2009...,\u2009an (0\u2009\u2264\u2009ai\u2009\u2264\u2009600)\u00a0\u2014 participants' scores. It's guaranteed that at least one participant has non-zero score.","src_uid":"3b520c15ea9a11b16129da30dcfb5161","source_code":"import java.io.BufferedReader;\n \nimport java.io.IOException; \nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.Scanner; \nimport java.util.StringTokenizer;\nimport java.util.ArrayList;\nimport java.util.TreeSet;\nimport java.util.Collections;\n \npublic class Hello\n{ \n static class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n \n public static void main(String[] args) \n { \n FastReader in=new FastReader(); \n \n \n \/\/start code here\n int n=in.nextInt();\n int res=0;\n ArrayList al = new ArrayList<>();\n for(int i=0;i= H)\n\t\t\tsum -= H++;\n\t\tH--;\n\t\t\n\t\tint[] acc = new int[H + 1];\n\t\t\n\t\tfor (int i = 1; i <= H; i++)\n\t\t\tacc[i] = acc[i - 1] + i;\n\t\t\n\t\t\n\t\tint[] last = new int[R + 1];\n\t\tArrays.fill(last, 1);\n\t\t\n\t\tfor (int i = H - 1; i >= 0; i--) {\n\t\t\tint[] cur = new int[R + 1];\n\t\t\t\n\t\t\tfor (int j = 0; j < cur.length; j++) {\n\t\t\t\tint r = j;\n\t\t\t\tint g = G - (acc[i] - (R - r));\n\t\t\t\t\n\t\t\t\tif(g - i >= 1)\n\t\t\t\t\tcur[j] += last[j];\n\t\t\t\tif(r - i >= 1)\n\t\t\t\t\tcur[j] += last[j - (i + 1)];\n\t\t\t\t\n\t\t\t\tcur[j] %= (int) 1e9 + 7;\n\t\t\t}\n\t\t\tlast = cur;\n\t\t}\n\t\t\n\t\tout.print(last[R]);\n\n\t\tout.flush();\n\n\t}\n\n\n\n\tstatic class Scanner \n\n\n\n\t{\n\t\tStringTokenizer st;\n\t\tBufferedReader br;\n\n\t\tpublic Scanner(InputStream s){\tbr = new BufferedReader(new InputStreamReader(s));}\n\n\t\tpublic String next() throws IOException \n\t\t{\n\t\t\twhile (st == null || !st.hasMoreTokens()) \n\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {return Integer.parseInt(next());}\n\n\t\tpublic long nextLong() throws IOException {return Long.parseLong(next());}\n\n\t\tpublic String nextLine() throws IOException {return br.readLine();}\n\n\n\t\tpublic double nextDouble() throws IOException\n\t\t{\n\t\t\tString x = next();\n\t\t\tStringBuilder sb = new StringBuilder(\"0\");\n\t\t\tdouble res = 0, f = 1;\n\t\t\tboolean dec = false, neg = false;\n\t\t\tint start = 0;\n\t\t\tif(x.charAt(0) == '-')\n\t\t\t{\n\t\t\t\tneg = true;\n\t\t\t\tstart++;\n\t\t\t}\n\t\t\tfor(int i = start; i < x.length(); i++)\n\t\t\t\tif(x.charAt(i) == '.')\n\t\t\t\t{\n\t\t\t\t\tres = Long.parseLong(sb.toString());\n\t\t\t\t\tsb = new StringBuilder(\"0\");\n\t\t\t\t\tdec = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsb.append(x.charAt(i));\n\t\t\t\t\tif(dec)\n\t\t\t\t\t\tf *= 10;\n\t\t\t\t}\n\t\t\tres += Long.parseLong(sb.toString()) \/ f;\n\t\t\treturn res * (neg?-1:1);\n\t\t}\n\n\t\tpublic boolean ready() throws IOException {return br.ready();}\n\n\n\n\t}\n\n\n}","sample_outputs":"[\"2\", \"6\", \"2\"]","lang_cluster":"Java","notes":"NoteThe image in the problem statement shows all possible red-green towers for the first sample.","output_specification":"Output the only integer \u2014 the number of different possible red-green towers of height h modulo\u00a0109\u2009+\u20097.","description":"There are r red and g green blocks for construction of the red-green tower. Red-green tower can be built following next rules: Red-green tower is consisting of some number of levels; Let the red-green tower consist of n levels, then the first level of this tower should consist of n blocks, second level \u2014 of n\u2009-\u20091 blocks, the third one \u2014 of n\u2009-\u20092 blocks, and so on \u2014 the last level of such tower should consist of the one block. In other words, each successive level should contain one block less than the previous one; Each level of the red-green tower should contain blocks of the same color. Let h be the maximum possible number of levels of red-green tower, that can be built out of r red and g green blocks meeting the rules above. The task is to determine how many different red-green towers having h levels can be built out of the available blocks.Two red-green towers are considered different if there exists some level, that consists of red blocks in the one tower and consists of green blocks in the other tower.You are to write a program that will find the number of different red-green towers of height h modulo\u00a0109\u2009+\u20097.","human_testcases":"[{\"input\": \"4 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9 7\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 19\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"18 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 100000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10 10\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"200000 200000\\r\\n\", \"output\": [\"206874596\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 200000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"200000 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"199396 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"199395 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 199397\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"121147 78249\\r\\n\", \"output\": [\"64290784\"]}, {\"input\": \"78250 121147\\r\\n\", \"output\": [\"981737243\"]}, {\"input\": \"121146 78249\\r\\n\", \"output\": [\"832902708\"]}, {\"input\": \"199585 199586\\r\\n\", \"output\": [\"438320405\"]}, {\"input\": \"199586 199586\\r\\n\", \"output\": [\"876640810\"]}, {\"input\": \"199585 199585\\r\\n\", \"output\": [\"199771918\"]}, {\"input\": \"107344 159729\\r\\n\", \"output\": [\"849320920\"]}, {\"input\": \"2954 1977\\r\\n\", \"output\": [\"835530858\"]}, {\"input\": \"25580 17318\\r\\n\", \"output\": [\"263898876\"]}, {\"input\": \"89671 32487\\r\\n\", \"output\": [\"654128709\"]}, {\"input\": \"38 36\\r\\n\", \"output\": [\"612\"]}, {\"input\": \"136749 183300\\r\\n\", \"output\": [\"906576609\"]}, {\"input\": \"10000 10000\\r\\n\", \"output\": [\"885988055\"]}, {\"input\": \"200000 199999\\r\\n\", \"output\": [\"396481680\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '18 3\\r\\n', 'output': ['2']}, {'input': '100000 1\\r\\n', 'output': ['2']}, {'input': '78250 121147\\r\\n', 'output': ['981737243']}, {'input': '121147 78249\\r\\n', 'output': ['64290784']}, {'input': '121146 78249\\r\\n', 'output': ['832902708']}]","human_sample_testcases_2":"[{'input': '10 10\\r\\n', 'output': ['18']}, {'input': '38 36\\r\\n', 'output': ['612']}, {'input': '100000 1\\r\\n', 'output': ['2']}, {'input': '199396 0\\r\\n', 'output': ['1']}, {'input': '199395 0\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '0 199397\\r\\n', 'output': ['1']}, {'input': '199586 199586\\r\\n', 'output': ['876640810']}, {'input': '25580 17318\\r\\n', 'output': ['263898876']}, {'input': '1 1\\r\\n', 'output': ['2']}, {'input': '0 1\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '0 199397\\r\\n', 'output': ['1']}, {'input': '200000 0\\r\\n', 'output': ['1']}, {'input': '18 3\\r\\n', 'output': ['2']}, {'input': '25580 17318\\r\\n', 'output': ['263898876']}, {'input': '100000 1\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '200000 200000\\r\\n', 'output': ['206874596']}, {'input': '6 6\\r\\n', 'output': ['6']}, {'input': '199585 199585\\r\\n', 'output': ['199771918']}, {'input': '200000 0\\r\\n', 'output': ['1']}, {'input': '1 1\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":92.86,"human_sample_branch_coverage_2":92.86,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":92.86,"human_sample_branch_coverage_5":92.86,"id":258,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":94.288} {"sample_inputs":"[\"19\", \"16\"]","input_specification":"The first and only line contains an integer $$$r$$$ ($$$1 \\le r \\le 10^{12}$$$).","src_uid":"3ff1c25a1026c90aeb14d148d7fb96ba","source_code":"\/\/1184A1\nimport java.util.*;\npublic class heidiA1{\n public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n long r=sc.nextLong();\n if(r%2==0||r<=3)\n System.out.println(\"NO\");\n else{\n System.out.println(\"1\"+\" \"+((r-3)\/2));\n }\n }\n}\n","sample_outputs":"[\"1 8\", \"NO\"]","lang_cluster":"Java","notes":null,"output_specification":"Output integers $$$x, y$$$ such that $$$H(x,y) = r$$$ and $$$x$$$ is smallest possible, or \"NO\" if no such pair exists.","description":"Melody Pond was stolen from her parents as a newborn baby by Madame Kovarian, to become a weapon of the Silence in their crusade against the Doctor. Madame Kovarian changed Melody's name to River Song, giving her a new identity that allowed her to kill the Eleventh Doctor.Heidi figured out that Madame Kovarian uses a very complicated hashing function in order to change the names of the babies she steals. In order to prevent this from happening to future Doctors, Heidi decided to prepare herself by learning some basic hashing techniques.The first hashing function she designed is as follows.Given two positive integers $$$(x, y)$$$ she defines $$$H(x,y):=x^2+2xy+x+1$$$.Now, Heidi wonders if the function is reversible. That is, given a positive integer $$$r$$$, can you find a pair $$$(x, y)$$$ (of positive integers) such that $$$H(x, y) = r$$$?If multiple such pairs exist, output the one with smallest possible $$$x$$$. If there is no such pair, output \"NO\".","human_testcases":"[{\"input\": \"19\\r\\n\", \"output\": [\"1 8\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"1 3\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"1 4\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"1 5\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"1 7\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"1 9\"]}, {\"input\": \"260158260522\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"250877914575\\r\\n\", \"output\": [\"1 125438957286\"]}, {\"input\": \"116602436426\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"540024979445\\r\\n\", \"output\": [\"1 270012489721\"]}, {\"input\": \"917861648772\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"962623690081\\r\\n\", \"output\": [\"1 481311845039\"]}, {\"input\": \"54433933447\\r\\n\", \"output\": [\"1 27216966722\"]}, {\"input\": \"16476190629\\r\\n\", \"output\": [\"1 8238095313\"]}, {\"input\": \"426262703497\\r\\n\", \"output\": [\"1 213131351747\"]}, {\"input\": \"723211047202\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"652509336151\\r\\n\", \"output\": [\"1 326254668074\"]}, {\"input\": \"215283472163\\r\\n\", \"output\": [\"1 107641736080\"]}, {\"input\": \"29617919\\r\\n\", \"output\": [\"1 14808958\"]}, {\"input\": \"7505295085\\r\\n\", \"output\": [\"1 3752647541\"]}, {\"input\": \"149890929717\\r\\n\", \"output\": [\"1 74945464857\"]}, {\"input\": \"185589070745\\r\\n\", \"output\": [\"1 92794535371\"]}, {\"input\": \"419450839\\r\\n\", \"output\": [\"1 209725418\"]}, {\"input\": \"519397679401\\r\\n\", \"output\": [\"1 259698839699\"]}, {\"input\": \"943447972637\\r\\n\", \"output\": [\"1 471723986317\"]}, {\"input\": \"54336309171\\r\\n\", \"output\": [\"1 27168154584\"]}, {\"input\": \"688373050717\\r\\n\", \"output\": [\"1 344186525357\"]}, {\"input\": \"156231653273\\r\\n\", \"output\": [\"1 78115826635\"]}, {\"input\": \"23744498401\\r\\n\", \"output\": [\"1 11872249199\"]}, {\"input\": \"768407398177\\r\\n\", \"output\": [\"1 384203699087\"]}, {\"input\": \"963761198401\\r\\n\", \"output\": [\"1 481880599199\"]}, {\"input\": \"240940299601\\r\\n\", \"output\": [\"1 120470149799\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '943447972637\\r\\n', 'output': ['1 471723986317']}, {'input': '16\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n', 'output': ['NO']}, {'input': '540024979445\\r\\n', 'output': ['1 270012489721']}, {'input': '16476190629\\r\\n', 'output': ['1 8238095313']}]","human_sample_testcases_2":"[{'input': '8\\r\\n', 'output': ['NO']}, {'input': '54433933447\\r\\n', 'output': ['1 27216966722']}, {'input': '7\\r\\n', 'output': ['1 2']}, {'input': '917861648772\\r\\n', 'output': ['NO']}, {'input': '29617919\\r\\n', 'output': ['1 14808958']}]","human_sample_testcases_3":"[{'input': '15\\r\\n', 'output': ['1 6']}, {'input': '18\\r\\n', 'output': ['NO']}, {'input': '29617919\\r\\n', 'output': ['1 14808958']}, {'input': '260158260522\\r\\n', 'output': ['NO']}, {'input': '2\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '10\\r\\n', 'output': ['NO']}, {'input': '15\\r\\n', 'output': ['1 6']}, {'input': '652509336151\\r\\n', 'output': ['1 326254668074']}, {'input': '426262703497\\r\\n', 'output': ['1 213131351747']}, {'input': '19\\r\\n', 'output': ['1 8']}]","human_sample_testcases_5":"[{'input': '688373050717\\r\\n', 'output': ['1 344186525357']}, {'input': '54336309171\\r\\n', 'output': ['1 27168154584']}, {'input': '962623690081\\r\\n', 'output': ['1 481311845039']}, {'input': '7505295085\\r\\n', 'output': ['1 3752647541']}, {'input': '250877914575\\r\\n', 'output': ['1 125438957286']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":83.33,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":50.0,"id":259,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.666,"human_sample_branch_coverage":70.0} {"sample_inputs":"[\"24 0\", \"24 1\", \"24 -1\", \"4 -7\", \"1 1\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$p$$$ ($$$1 \\leq n \\leq 10^9$$$, $$$-1000 \\leq p \\leq 1000$$$).","src_uid":"9e86d87ce5a75c6a982894af84eb4ba8","source_code":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.Reader;\nimport java.util.StringTokenizer;\n\npublic class TaskC {\n public static String doMain(Reader reader) throws IOException {\n MyReader in = new MyReader(reader);\n int n = in.nextInt();\n int p = in.nextInt();\n StringBuilder sb = new StringBuilder();\n for (int i = 0; n - i * p >= i; ++i) {\n int count = check(n - p * i);\n if (count > i){\n continue;\n }\n return i+\"\";\n }\n return \"-1\";\n }\n\n private static int check(int n) {\n int answer = 0;\n while (n > 0) {\n answer += n % 2;\n n \/= 2;\n }\n return answer;\n }\n\n public static void main(String[] args) throws IOException {\n String result = doMain(new InputStreamReader(System.in));\n System.out.println(result);\n }\n\n static class MyReader {\n BufferedReader bf;\n\n StringTokenizer st;\n\n String last;\n\n MyReader(Reader reader) throws IOException {\n bf = new BufferedReader(reader);\n readNextLine();\n }\n\n String nextToken() throws IOException {\n while (!st.hasMoreTokens()) {\n readNextLine();\n }\n return st.nextToken();\n }\n\n void readNextLine() throws IOException {\n last = bf.readLine();\n if (last == null) last = \"\";\n st = new StringTokenizer(last);\n }\n\n String nextLine() throws IOException {\n String s = last;\n readNextLine();\n return s;\n }\n\n long nextLong() throws IOException {\n return Long.parseLong(nextToken());\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(nextToken());\n }\n\n double nextDouble() throws IOException {\n return Double.parseDouble(nextToken());\n }\n\n int[] readIntArray(int n) throws IOException {\n int[] answer = new int[n];\n for (int i = 0; i < n; ++i) {\n answer[i] = nextInt();\n }\n return answer;\n }\n\n long[] readLongArray(int n) throws IOException {\n long[] answer = new long[n];\n for (int i = 0; i < n; ++i) {\n answer[i] = nextLong();\n }\n return answer;\n }\n\n double[] readDoubleArray(int n) throws IOException {\n double[] answer = new double[n];\n for (int i = 0; i < n; ++i) {\n answer[i] = nextDouble();\n }\n return answer;\n }\n }\n}\n","sample_outputs":"[\"2\", \"3\", \"4\", \"2\", \"-1\"]","lang_cluster":"Java","notes":"Note$$$0$$$-binary numbers are just regular binary powers, thus in the first sample case we can represent $$$24 = (2^4 + 0) + (2^3 + 0)$$$.In the second sample case, we can represent $$$24 = (2^4 + 1) + (2^2 + 1) + (2^0 + 1)$$$.In the third sample case, we can represent $$$24 = (2^4 - 1) + (2^2 - 1) + (2^2 - 1) + (2^2 - 1)$$$. Note that repeated summands are allowed.In the fourth sample case, we can represent $$$4 = (2^4 - 7) + (2^1 - 7)$$$. Note that the second summand is negative, which is allowed.In the fifth sample case, no representation is possible.","output_specification":"If it is impossible to represent $$$n$$$ as the sum of any number of $$$p$$$-binary numbers, print a single integer $$$-1$$$. Otherwise, print the smallest possible number of summands.","description":"Vasya will fancy any number as long as it is an integer power of two. Petya, on the other hand, is very conservative and only likes a single integer $$$p$$$ (which may be positive, negative, or zero). To combine their tastes, they invented $$$p$$$-binary numbers of the form $$$2^x + p$$$, where $$$x$$$ is a non-negative integer.For example, some $$$-9$$$-binary (\"minus nine\" binary) numbers are: $$$-8$$$ (minus eight), $$$7$$$ and $$$1015$$$ ($$$-8=2^0-9$$$, $$$7=2^4-9$$$, $$$1015=2^{10}-9$$$).The boys now use $$$p$$$-binary numbers to represent everything. They now face a problem: given a positive integer $$$n$$$, what's the smallest number of $$$p$$$-binary numbers (not necessarily distinct) they need to represent $$$n$$$ as their sum? It may be possible that representation is impossible altogether. Help them solve this problem.For example, if $$$p=0$$$ we can represent $$$7$$$ as $$$2^0 + 2^1 + 2^2$$$.And if $$$p=-9$$$ we can represent $$$7$$$ as one number $$$(2^4-9)$$$.Note that negative $$$p$$$-binary numbers are allowed to be in the sum (see the Notes section for an example).","human_testcases":"[{\"input\": \"24 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"24 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"24 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 -7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"10 7\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 -179\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"12345678 -123\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"1000000000 1000\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"536870912 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"536870911 0\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"1 -1000\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100500 -179\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000000000 -1000\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"536870812 1\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"536870812 -1\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"1 1000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1001 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"13 -987\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"101 50\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1001 500\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"13 6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"67108838 -1\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"11 5\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"19 6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"21 10\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2001 1000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"17 8\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3002 1000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"332639425 -399\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"9 8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"678 169\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"29 9\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"782 156\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1999 999\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"47 23\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3998 999\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"746 248\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 -1000\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"35 11\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"16777215 0\\r\\n\", \"output\": [\"24\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '24 1\\r\\n', 'output': ['3']}, {'input': '2 1\\r\\n', 'output': ['1']}, {'input': '536870812 1\\r\\n', 'output': ['24']}, {'input': '536870812 -1\\r\\n', 'output': ['26']}, {'input': '9 8\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '24 1\\r\\n', 'output': ['3']}, {'input': '1 -1\\r\\n', 'output': ['1']}, {'input': '13 6\\r\\n', 'output': ['-1']}, {'input': '12345678 -123\\r\\n', 'output': ['12']}, {'input': '3 2\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '1 1\\r\\n', 'output': ['-1']}, {'input': '17 8\\r\\n', 'output': ['-1']}, {'input': '1999 999\\r\\n', 'output': ['-1']}, {'input': '2 1\\r\\n', 'output': ['1']}, {'input': '67108838 -1\\r\\n', 'output': ['26']}]","human_sample_testcases_4":"[{'input': '10 7\\r\\n', 'output': ['-1']}, {'input': '1001 500\\r\\n', 'output': ['-1']}, {'input': '13 -987\\r\\n', 'output': ['7']}, {'input': '536870812 1\\r\\n', 'output': ['24']}, {'input': '3 2\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '24 1\\r\\n', 'output': ['3']}, {'input': '782 156\\r\\n', 'output': ['-1']}, {'input': '1 -1000\\r\\n', 'output': ['8']}, {'input': '1 1\\r\\n', 'output': ['-1']}, {'input': '678 169\\r\\n', 'output': ['-1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.44,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":260,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.888,"human_sample_branch_coverage":96.666} {"sample_inputs":"[\"4\", \"3\"]","input_specification":"The only line contains a single integer $$$n$$$ ($$$1 \\le n \\le 10^6$$$), denoting the required number of vertices.","src_uid":"821409c1b9bdcd18c4dcf35dc5116501","source_code":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class E {\n\t\n\tstatic int[] tree;\n\t\n\tstatic void fill(int idx) {\n\t\tif (idx >= tree.length) return;\n\t\tfill(2 * idx);\n\t\tfill(2 * idx + 1);\n\t\ttree[idx] = 1;\n\t\tif (2 * idx < tree.length) tree[idx] += tree[2 * idx];\n\t\tif (2 * idx + 1 < tree.length) tree[idx] += tree[2 * idx + 1];\n\t}\n\t\n\tstatic boolean shouldAdd(int idx) {\n\t\tif (idx % 2 == 1) return true;\n\t\twhile (idx % 2 == 0) {\n\t\t\tidx \/= 2;\n\t\t}\n\t\treturn tree[2 * idx] % 2 == 0;\n\t}\n\t\n\tstatic void add(int idx) {\n\t\twhile (idx >= 1) {\n\t\t\ttree[idx]++;\n\t\t\tidx \/= 2;\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args) throws IOException {\n\t\tMyScanner sc = new MyScanner();\n\t\tPrintWriter out = new PrintWriter(System.out);\n\t\tint N = sc.nextInt();\n\t\tint level = 0, got = 1;\n\t\twhile (N >= got) {\n\t\t\tN -= got;\n\t\t\tlevel++;\n\t\t\tgot *= 2;\n\t\t}\n\t\ttree = new int[1 << level];\n\t\tfill(1);\n\t\tfor (int i = tree.length - 1; i > 1 << (level-1); i--) {\n\t\t\tif (shouldAdd(i)) {\n\t\t\t\tadd(i);\n\t\t\t\tN--;\n\t\t\t}\n\t\t}\n\t\t\n\t\tout.println(N == 0 || N == 1 ? 1 : 0);\n\t\t\n\t\tout.flush();\n\t}\n\t\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\t\t\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}\n","sample_outputs":"[\"1\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first example, this is the only tree that satisfies the conditions: In the second example, here are various trees that don't satisfy some condition: ","output_specification":"Output the number of perfectly balanced striped binary search trees with $$$n$$$ vertices and distinct integer keys between $$$1$$$ and $$$n$$$, inclusive, modulo $$$998\\,244\\,353$$$.","description":"Recall that a binary search tree is a rooted binary tree, whose nodes each store a key and each have at most two distinguished subtrees, left and right. The key in each node must be greater than any key stored in the left subtree, and less than any key stored in the right subtree.The depth of a vertex is the number of edges on the simple path from the vertex to the root. In particular, the depth of the root is $$$0$$$.Let's call a binary search tree perfectly balanced if there doesn't exist a binary search tree with the same number of vertices that has a strictly smaller sum of depths of its vertices.Let's call a binary search tree with integer keys striped if both of the following conditions are satisfied for every vertex $$$v$$$: If $$$v$$$ has a left subtree whose root is $$$u$$$, then the parity of the key of $$$v$$$ is different from the parity of the key of $$$u$$$. If $$$v$$$ has a right subtree whose root is $$$w$$$, then the parity of the key of $$$v$$$ is the same as the parity of the key of $$$w$$$. You are given a single integer $$$n$$$. Find the number of perfectly balanced striped binary search trees with $$$n$$$ vertices that have distinct integer keys between $$$1$$$ and $$$n$$$, inclusive. Output this number modulo $$$998\\,244\\,353$$$.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"360561\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"85\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"699049\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"699047\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"699050\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"699048\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"786432\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"750096\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10922\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"699051\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"87380\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"308545\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"170\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"84\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"174762\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"341\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"530259\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"181407\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5461\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"21844\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"472032\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"325193\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"43689\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"43690\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"524288\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"546029\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5460\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"682\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"621012\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"334846\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"549836\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"797049\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"174761\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"320507\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"699046\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"681\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"87381\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"503375\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"557479\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13156\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"349525\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10921\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"259060\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"21845\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"175466\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"796867\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"527730\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"737480\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"740812\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"631649\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1365\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"581472\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"622262\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"42\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"629191\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2730\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"988727\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"169\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '740812\\r\\n', 'output': ['0']}, {'input': '17\\r\\n', 'output': ['0']}, {'input': '549836\\r\\n', 'output': ['0']}, {'input': '796867\\r\\n', 'output': ['0']}, {'input': '7\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '174762\\r\\n', 'output': ['1']}, {'input': '87380\\r\\n', 'output': ['1']}, {'input': '28\\r\\n', 'output': ['0']}, {'input': '43690\\r\\n', 'output': ['1']}, {'input': '360561\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '16\\r\\n', 'output': ['0']}, {'input': '341\\r\\n', 'output': ['1']}, {'input': '175466\\r\\n', 'output': ['0']}, {'input': '174762\\r\\n', 'output': ['1']}, {'input': '20\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '2730\\r\\n', 'output': ['1']}, {'input': '5460\\r\\n', 'output': ['1']}, {'input': '87381\\r\\n', 'output': ['1']}, {'input': '174761\\r\\n', 'output': ['1']}, {'input': '999999\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '22\\r\\n', 'output': ['0']}, {'input': '988727\\r\\n', 'output': ['0']}, {'input': '699051\\r\\n', 'output': ['0']}, {'input': '11\\r\\n', 'output': ['0']}, {'input': '259060\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":91.67,"id":261,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":96.668} {"sample_inputs":"[\"1 3\", \"10 15\"]","input_specification":"The only line contains two integers a,\u2009b (1\u2009\u2264\u2009a\u2009\u2264\u2009b\u2009\u2264\u2009106) \u2014 the first and the last number typed by Max.","src_uid":"1193de6f80a9feee8522a404d16425b9","source_code":"\/*package whatever \/\/do not write package name here *\/\n\nimport java.io.*;\nimport java.util.*;\nimport java.math.*;\npublic class S {\n\tpublic static void main (String[] args) {\n\t Scanner in=new Scanner(System.in);\n\t\tint a=in.nextInt();\n\t\tint b=in.nextInt();\n\t\tMap m= new HashMap<>();\n\t\tm.put('0',6);m.put('1',2);m.put('2',5);m.put('3',5);m.put('4',4);m.put('5',5);m.put('6',6);m.put('7',3);\n\t\tm.put('8',7);m.put('9',6);\n\t\tint r=0;\n\t\tfor(int i=a;i<=b;i++)\n\t\t{\n\t\t String s=String.valueOf(i);\n\t\t for(int j=0;j list = new PriorityQueue();\n String s = lector.next();\n int x;\n \n for(char c:s.toCharArray()){\n if(c!='+'){\n list.add(c-48);\n } \n }\n \n x = list.size();\n \n for (int i = 0; i < (x-1); i++) {\n System.out.print(list.poll()+\"+\");\n }\n System.out.println(list.poll());\n } }\n\/\/ 1509316386944\n","sample_outputs":"[\"1+2+3\", \"1+1+1+3+3\", \"2\"]","lang_cluster":"Java","notes":null,"output_specification":"Print the new sum that Xenia can count.","description":"Xenia the beginner mathematician is a third year student at elementary school. She is now learning the addition operation.The teacher has written down the sum of multiple numbers. Pupils should calculate the sum. To make the calculation easier, the sum only contains numbers 1, 2 and 3. Still, that isn't enough for Xenia. She is only beginning to count, so she can calculate a sum only if the summands follow in non-decreasing order. For example, she can't calculate sum 1+3+2+1 but she can calculate sums 1+1+2 and 3+3.You've got the sum that was written on the board. Rearrange the summans and print the sum in such a way that Xenia can calculate the sum.","human_testcases":"[{\"input\": \"3+2+1\\r\\n\", \"output\": [\"1+2+3\"]}, {\"input\": \"1+1+3+1+3\\r\\n\", \"output\": [\"1+1+1+3+3\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2+2+1+1+3\\r\\n\", \"output\": [\"1+1+2+2+3\"]}, {\"input\": \"2+1+2+2+2+3+1+3+1+2\\r\\n\", \"output\": [\"1+1+1+2+2+2+2+2+3+3\"]}, {\"input\": \"1+2+1+2+2+2+2+1+3+3\\r\\n\", \"output\": [\"1+1+1+2+2+2+2+2+3+3\"]}, {\"input\": \"2+3+3+1+2+2+2+1+1+2+1+3+2+2+3+3+2+2+3+3+3+1+1+1+3+3+3+2+1+3+2+3+2+1+1+3+3+3+1+2+2+1+2+2+1+2+1+3+1+1\\r\\n\", \"output\": [\"1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2+1+2+2+1+3+2+3+1+1+2+1+2+2+3+1+1+3+3+3+2+2+3+2+2+2+1+2+1+2+3+2+2+2+1+3+1+3+3+3+1+2+1+2+2+2+2+3+1+1\\r\\n\", \"output\": [\"1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3\"]}, {\"input\": \"2+2+1+1+1+3+1+1+3+3+2+3+1+3+1+1+3+1+1+2+2+2+2+1+2+1+2+1+1+1+3+1+3+2+3+2+3+3+1+1+1+2+3+2+1+3+1+3+2+2\\r\\n\", \"output\": [\"1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3\"]}, {\"input\": \"3+2+3+3+2+2+1+2+1+2+3+1+2+3+2+3+2+1+2+2+1+1+2+2+3+2+1+3+1+1+3+2+2+2+2+3+3+2+2+3+3+1+1+2+3+3+2+3+3+3\\r\\n\", \"output\": [\"1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1+1\\r\\n\", \"output\": [\"1+1\"]}, {\"input\": \"1+2\\r\\n\", \"output\": [\"1+2\"]}, {\"input\": \"1+3\\r\\n\", \"output\": [\"1+3\"]}, {\"input\": \"2+1\\r\\n\", \"output\": [\"1+2\"]}, {\"input\": \"2+2\\r\\n\", \"output\": [\"2+2\"]}, {\"input\": \"2+3\\r\\n\", \"output\": [\"2+3\"]}, {\"input\": \"3+1\\r\\n\", \"output\": [\"1+3\"]}, {\"input\": \"3+2\\r\\n\", \"output\": [\"2+3\"]}, {\"input\": \"3+3\\r\\n\", \"output\": [\"3+3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2+2+1+1+3\\r\\n', 'output': ['1+1+2+2+3']}, {'input': '3+2+3+3+2+2+1+2+1+2+3+1+2+3+2+3+2+1+2+2+1+1+2+2+3+2+1+3+1+1+3+2+2+2+2+3+3+2+2+3+3+1+1+2+3+3+2+3+3+3\\r\\n', 'output': ['1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3']}, {'input': '3+2\\r\\n', 'output': ['2+3']}, {'input': '3+1\\r\\n', 'output': ['1+3']}, {'input': '2+1+2+2+1+3+2+3+1+1+2+1+2+2+3+1+1+3+3+3+2+2+3+2+2+2+1+2+1+2+3+2+2+2+1+3+1+3+3+3+1+2+1+2+2+2+2+3+1+1\\r\\n', 'output': ['1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3']}]","human_sample_testcases_2":"[{'input': '1\\r\\n', 'output': ['1']}, {'input': '2+2+1+1+3\\r\\n', 'output': ['1+1+2+2+3']}, {'input': '2+2\\r\\n', 'output': ['2+2']}, {'input': '1+1+3+1+3\\r\\n', 'output': ['1+1+1+3+3']}, {'input': '3+2+1\\r\\n', 'output': ['1+2+3']}]","human_sample_testcases_3":"[{'input': '3+2+1\\r\\n', 'output': ['1+2+3']}, {'input': '3\\r\\n', 'output': ['3']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '2+1+2+2+2+3+1+3+1+2\\r\\n', 'output': ['1+1+1+2+2+2+2+2+3+3']}, {'input': '2+1+2+2+1+3+2+3+1+1+2+1+2+2+3+1+1+3+3+3+2+2+3+2+2+2+1+2+1+2+3+2+2+2+1+3+1+3+3+3+1+2+1+2+2+2+2+3+1+1\\r\\n', 'output': ['1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3']}]","human_sample_testcases_4":"[{'input': '2+2\\r\\n', 'output': ['2+2']}, {'input': '3+2+1\\r\\n', 'output': ['1+2+3']}, {'input': '2+1\\r\\n', 'output': ['1+2']}, {'input': '2+2+1+1+3\\r\\n', 'output': ['1+1+2+2+3']}, {'input': '1+3\\r\\n', 'output': ['1+3']}]","human_sample_testcases_5":"[{'input': '3+1\\r\\n', 'output': ['1+3']}, {'input': '2+2+1+1+1+3+1+1+3+3+2+3+1+3+1+1+3+1+1+2+2+2+2+1+2+1+2+1+1+1+3+1+3+2+3+2+3+3+1+1+1+2+3+2+1+3+1+3+2+2\\r\\n', 'output': ['1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3']}, {'input': '2\\r\\n', 'output': ['2']}, {'input': '3+2+3+3+2+2+1+2+1+2+3+1+2+3+2+3+2+1+2+2+1+1+2+2+3+2+1+3+1+1+3+2+2+2+2+3+3+2+2+3+3+1+1+2+3+3+2+3+3+3\\r\\n', 'output': ['1+1+1+1+1+1+1+1+1+1+1+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+2+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3+3']}, {'input': '3+2+1\\r\\n', 'output': ['1+2+3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":265,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"18 2\", \"9 10\", \"1000000000000 5\", \"1000000000000 499999999999\"]","input_specification":"The first (and the only) line of input contains two integers n and k (1\u2009\u2264\u2009n,\u2009k\u2009\u2264\u20091012), where n is the number of students and k is the ratio between the number of certificates and the number of diplomas.","src_uid":"405a70c3b3f1561a9546910ab3fb5c80","source_code":"\n\n \nimport java.io.*;\n \n \n import java.util.*;\n\n public class Training {\n \n public static void main(String[] args) throws IOException {\n Scanner input = new Scanner(System.in);\n long n = input.nextLong(),k= input.nextLong();\n \n long a = n\/2\/(k+1);\n long b = a *k ;\n System.out.println(a +\" \"+b+\" \"+(n-a-b));\n \n \n\n } \/\/ end main \n \n }","sample_outputs":"[\"3 6 9\", \"0 0 9\", \"83333333333 416666666665 500000000002\", \"1 499999999999 500000000000\"]","lang_cluster":"Java","notes":null,"output_specification":"Output three numbers: the number of students with diplomas, the number of students with certificates and the number of students who are not winners in case when the number of winners is maximum possible. It's possible that there are no winners.","description":"There are n students who have taken part in an olympiad. Now it's time to award the students.Some of them will receive diplomas, some wiil get certificates, and others won't receive anything. Students with diplomas and certificates are called winners. But there are some rules of counting the number of diplomas and certificates. The number of certificates must be exactly k times greater than the number of diplomas. The number of winners must not be greater than half of the number of all students (i.e. not be greater than half of n). It's possible that there are no winners.You have to identify the maximum possible number of winners, according to these rules. Also for this case you have to calculate the number of students with diplomas, the number of students with certificates and the number of students who are not winners.","human_testcases":"[{\"input\": \"18 2\\r\\n\", \"output\": [\"3 6 9\"]}, {\"input\": \"9 10\\r\\n\", \"output\": [\"0 0 9\"]}, {\"input\": \"1000000000000 5\\r\\n\", \"output\": [\"83333333333 416666666665 500000000002\"]}, {\"input\": \"1000000000000 499999999999\\r\\n\", \"output\": [\"1 499999999999 500000000000\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0 0 1\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"0 0 5\"]}, {\"input\": \"42 6\\r\\n\", \"output\": [\"3 18 21\"]}, {\"input\": \"1000000000000 1000\\r\\n\", \"output\": [\"499500499 499500499000 500000000501\"]}, {\"input\": \"999999999999 999999\\r\\n\", \"output\": [\"499999 499998500001 500000999999\"]}, {\"input\": \"732577309725 132613\\r\\n\", \"output\": [\"2762066 366285858458 366288689201\"]}, {\"input\": \"152326362626 15\\r\\n\", \"output\": [\"4760198832 71402982480 76163181314\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"0 0 2\"]}, {\"input\": \"1000000000000 500000000000\\r\\n\", \"output\": [\"0 0 1000000000000\"]}, {\"input\": \"100000000000 50000000011\\r\\n\", \"output\": [\"0 0 100000000000\"]}, {\"input\": \"1000000000000 32416187567\\r\\n\", \"output\": [\"15 486242813505 513757186480\"]}, {\"input\": \"1000000000000 7777777777\\r\\n\", \"output\": [\"64 497777777728 502222222208\"]}, {\"input\": \"1000000000000 77777777777\\r\\n\", \"output\": [\"6 466666666662 533333333332\"]}, {\"input\": \"100000000000 578485652\\r\\n\", \"output\": [\"86 49749766072 50250233842\"]}, {\"input\": \"999999999999 10000000000\\r\\n\", \"output\": [\"49 490000000000 509999999950\"]}, {\"input\": \"7 2\\r\\n\", \"output\": [\"1 2 4\"]}, {\"input\": \"420506530901 752346673804\\r\\n\", \"output\": [\"0 0 420506530901\"]}, {\"input\": \"960375521135 321688347872\\r\\n\", \"output\": [\"1 321688347872 638687173262\"]}, {\"input\": \"1000000000000 1000000000000\\r\\n\", \"output\": [\"0 0 1000000000000\"]}, {\"input\": \"99999999999 15253636363\\r\\n\", \"output\": [\"3 45760909089 54239090907\"]}, {\"input\": \"19 2\\r\\n\", \"output\": [\"3 6 10\"]}, {\"input\": \"999999999999 1000000000000\\r\\n\", \"output\": [\"0 0 999999999999\"]}, {\"input\": \"1000000000000 5915587276\\r\\n\", \"output\": [\"84 496909331184 503090668732\"]}, {\"input\": \"1000000000000 1000000006\\r\\n\", \"output\": [\"499 499000002994 500999996507\"]}, {\"input\": \"549755813888 134217728\\r\\n\", \"output\": [\"2047 274743689216 275012122625\"]}, {\"input\": \"99999999999 3333333\\r\\n\", \"output\": [\"14999 49996661667 50003323333\"]}, {\"input\": \"9 1\\r\\n\", \"output\": [\"2 2 5\"]}, {\"input\": \"1000000000000 250000000001\\r\\n\", \"output\": [\"1 250000000001 749999999998\"]}, {\"input\": \"5 1\\r\\n\", \"output\": [\"1 1 3\"]}, {\"input\": \"3107038133 596040207\\r\\n\", \"output\": [\"2 1192080414 1914957717\"]}, {\"input\": \"1000000000000 73786977\\r\\n\", \"output\": [\"6776 499980556152 500019437072\"]}, {\"input\": \"1000000000000 73786976\\r\\n\", \"output\": [\"6776 499980549376 500019443848\"]}, {\"input\": \"1000000000000 25000000000\\r\\n\", \"output\": [\"19 475000000000 524999999981\"]}, {\"input\": \"216929598879 768233755932\\r\\n\", \"output\": [\"0 0 216929598879\"]}, {\"input\": \"1000000000000 250000000000\\r\\n\", \"output\": [\"1 250000000000 749999999999\"]}, {\"input\": \"1000000000000 100000000001\\r\\n\", \"output\": [\"4 400000000004 599999999992\"]}, {\"input\": \"100000000000 100000000001\\r\\n\", \"output\": [\"0 0 100000000000\"]}, {\"input\": \"900000000000 100281800001\\r\\n\", \"output\": [\"4 401127200004 498872799992\"]}, {\"input\": \"906028900004 109123020071\\r\\n\", \"output\": [\"4 436492080284 469536819716\"]}, {\"input\": \"1000000000000 1\\r\\n\", \"output\": [\"250000000000 250000000000 500000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '42 6\\r\\n', 'output': ['3 18 21']}, {'input': '1000000000000 1000000006\\r\\n', 'output': ['499 499000002994 500999996507']}, {'input': '1000000000000 100000000001\\r\\n', 'output': ['4 400000000004 599999999992']}, {'input': '420506530901 752346673804\\r\\n', 'output': ['0 0 420506530901']}, {'input': '999999999999 1000000000000\\r\\n', 'output': ['0 0 999999999999']}]","human_sample_testcases_2":"[{'input': '1000000000000 250000000001\\r\\n', 'output': ['1 250000000001 749999999998']}, {'input': '549755813888 134217728\\r\\n', 'output': ['2047 274743689216 275012122625']}, {'input': '420506530901 752346673804\\r\\n', 'output': ['0 0 420506530901']}, {'input': '1000000000000 32416187567\\r\\n', 'output': ['15 486242813505 513757186480']}, {'input': '1000000000000 250000000000\\r\\n', 'output': ['1 250000000000 749999999999']}]","human_sample_testcases_3":"[{'input': '100000000000 578485652\\r\\n', 'output': ['86 49749766072 50250233842']}, {'input': '732577309725 132613\\r\\n', 'output': ['2762066 366285858458 366288689201']}, {'input': '1000000000000 250000000001\\r\\n', 'output': ['1 250000000001 749999999998']}, {'input': '1000000000000 1000\\r\\n', 'output': ['499500499 499500499000 500000000501']}, {'input': '19 2\\r\\n', 'output': ['3 6 10']}]","human_sample_testcases_4":"[{'input': '1 1\\r\\n', 'output': ['0 0 1']}, {'input': '99999999999 15253636363\\r\\n', 'output': ['3 45760909089 54239090907']}, {'input': '1000000000000 7777777777\\r\\n', 'output': ['64 497777777728 502222222208']}, {'input': '999999999999 1000000000000\\r\\n', 'output': ['0 0 999999999999']}, {'input': '99999999999 3333333\\r\\n', 'output': ['14999 49996661667 50003323333']}]","human_sample_testcases_5":"[{'input': '99999999999 15253636363\\r\\n', 'output': ['3 45760909089 54239090907']}, {'input': '3107038133 596040207\\r\\n', 'output': ['2 1192080414 1914957717']}, {'input': '999999999999 10000000000\\r\\n', 'output': ['49 490000000000 509999999950']}, {'input': '100000000000 578485652\\r\\n', 'output': ['86 49749766072 50250233842']}, {'input': '960375521135 321688347872\\r\\n', 'output': ['1 321688347872 638687173262']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":266,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\", \"12\"]","input_specification":"The first line of the input contains an integer x (1\u2009\u2264\u2009x\u2009\u2264\u20091\u2009000\u2009000)\u00a0\u2014 The coordinate of the friend's house.","src_uid":"4b3d65b1b593829e92c852be213922b6","source_code":"import java.util.Scanner;\npublic class Slonik {\n\n public static void main(String[] args){\n Scanner scan = new Scanner(System.in);\n int input = scan.nextInt();\n\n float min = input \/ 5f;\n System.out.println((int)Math.ceil(min));\n }\n }\n","sample_outputs":"[\"1\", \"3\"]","lang_cluster":"Java","notes":"NoteIn the first sample the elephant needs to make one step of length 5 to reach the point x.In the second sample the elephant can get to point x if he moves by 3, 5 and 4. There are other ways to get the optimal answer but the elephant cannot reach x in less than three moves.","output_specification":"Print the minimum number of steps that elephant needs to make to get from point 0 to point x.","description":"An elephant decided to visit his friend. It turned out that the elephant's house is located at point 0 and his friend's house is located at point x(x\u2009>\u20090) of the coordinate line. In one step the elephant can move 1, 2, 3, 4 or 5 positions forward. Determine, what is the minimum number of steps he need to make in order to get to his friend's house.","human_testcases":"[{\"input\": \"5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"999999\\r\\n\", \"output\": [\"200000\"]}, {\"input\": \"41\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1000000\\r\\n\", \"output\": [\"200000\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"534204\\r\\n\", \"output\": [\"106841\"]}, {\"input\": \"469569\\r\\n\", \"output\": [\"93914\"]}, {\"input\": \"502877\\r\\n\", \"output\": [\"100576\"]}, {\"input\": \"942212\\r\\n\", \"output\": [\"188443\"]}, {\"input\": \"97\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"53\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"89\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"574\\r\\n\", \"output\": [\"115\"]}, {\"input\": \"716\\r\\n\", \"output\": [\"144\"]}, {\"input\": \"729\\r\\n\", \"output\": [\"146\"]}, {\"input\": \"8901\\r\\n\", \"output\": [\"1781\"]}, {\"input\": \"3645\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"4426\\r\\n\", \"output\": [\"886\"]}, {\"input\": \"46573\\r\\n\", \"output\": [\"9315\"]}, {\"input\": \"86380\\r\\n\", \"output\": [\"17276\"]}, {\"input\": \"94190\\r\\n\", \"output\": [\"18838\"]}, {\"input\": \"999990\\r\\n\", \"output\": [\"199998\"]}, {\"input\": \"999991\\r\\n\", \"output\": [\"199999\"]}, {\"input\": \"999992\\r\\n\", \"output\": [\"199999\"]}, {\"input\": \"999993\\r\\n\", \"output\": [\"199999\"]}, {\"input\": \"999994\\r\\n\", \"output\": [\"199999\"]}, {\"input\": \"999995\\r\\n\", \"output\": [\"199999\"]}, {\"input\": \"999996\\r\\n\", \"output\": [\"200000\"]}, {\"input\": \"999997\\r\\n\", \"output\": [\"200000\"]}, {\"input\": \"999998\\r\\n\", \"output\": [\"200000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999998\\r\\n', 'output': ['200000']}, {'input': '999995\\r\\n', 'output': ['199999']}, {'input': '999996\\r\\n', 'output': ['200000']}, {'input': '3\\r\\n', 'output': ['1']}, {'input': '999991\\r\\n', 'output': ['199999']}]","human_sample_testcases_2":"[{'input': '1\\r\\n', 'output': ['1']}, {'input': '8901\\r\\n', 'output': ['1781']}, {'input': '3\\r\\n', 'output': ['1']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '999994\\r\\n', 'output': ['199999']}]","human_sample_testcases_3":"[{'input': '502877\\r\\n', 'output': ['100576']}, {'input': '999998\\r\\n', 'output': ['200000']}, {'input': '53\\r\\n', 'output': ['11']}, {'input': '999996\\r\\n', 'output': ['200000']}, {'input': '1\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '534204\\r\\n', 'output': ['106841']}, {'input': '999999\\r\\n', 'output': ['200000']}, {'input': '2\\r\\n', 'output': ['1']}, {'input': '999993\\r\\n', 'output': ['199999']}, {'input': '5\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '999992\\r\\n', 'output': ['199999']}, {'input': '729\\r\\n', 'output': ['146']}, {'input': '999999\\r\\n', 'output': ['200000']}, {'input': '53\\r\\n', 'output': ['11']}, {'input': '3\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":267,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\\n0 0 2 3\\n0 3 3 5\\n2 0 5 2\\n3 2 5 5\\n2 2 3 3\", \"4\\n0 0 2 3\\n0 3 3 5\\n2 0 5 2\\n3 2 5 5\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u20095). Next n lines contain four integers each, describing a single rectangle: x1, y1, x2, y2 (0\u2009\u2264\u2009x1\u2009<\u2009x2\u2009\u2264\u200931400,\u20090\u2009\u2264\u2009y1\u2009<\u2009y2\u2009\u2264\u200931400) \u2014 x1 and x2 are x-coordinates of the left and right edges of the rectangle, and y1 and y2 are y-coordinates of the bottom and top edges of the rectangle. No two rectangles overlap (that is, there are no points that belong to the interior of more than one rectangle).","src_uid":"f63fc2d97fd88273241fce206cc217f2","source_code":"import java.util.Scanner;\n\npublic class Main {\n private static final int MAXN = 4000000;\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] areas = new int[n];\n int left = MAXN, right = 0, top = MAXN, bottom = 0;\n for(int i = 0; i < n; i++) {\n int x1, y1, x2, y2;\n x1 = scanner.nextInt();\n y1 = scanner.nextInt();\n x2 = scanner.nextInt();\n y2 = scanner.nextInt();\n\n areas[i] = (x2 - x1) * (y2 - y1);\n left = Math.min(x1, left);\n right = Math.max(x2, right);\n top = Math.min(y1, top);\n bottom = Math.max(y2, bottom);\n }\n\n int total = (right - left) * (bottom - top);\n int result = 0;\n for(int i = 0; i < n; i++) {\n result += areas[i];\n }\n\n if((total == result) && ((right - left) == (bottom - top))) {\n System.out.println(\"YES\");\n } else {\n System.out.println(\"NO\");\n }\n }\n}","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Java","notes":null,"output_specification":"In a single line print \"YES\", if the given rectangles form a square, or \"NO\" otherwise.","description":"You are given n rectangles. The corners of rectangles have integer coordinates and their edges are parallel to the Ox and Oy axes. The rectangles may touch each other, but they do not overlap (that is, there are no points that belong to the interior of more than one rectangle). Your task is to determine if the rectangles form a square. In other words, determine if the set of points inside or on the border of at least one rectangle is precisely equal to the set of points inside or on the border of some square.","human_testcases":"[{\"input\": \"5\\r\\n0 0 2 3\\r\\n0 3 3 5\\r\\n2 0 5 2\\r\\n3 2 5 5\\r\\n2 2 3 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4\\r\\n0 0 2 3\\r\\n0 3 3 5\\r\\n2 0 5 2\\r\\n3 2 5 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 14999 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 15000 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n10359 859 28918 4384\\r\\n2895 26520 28918 26882\\r\\n2895 26424 28918 26520\\r\\n2895 859 10359 4384\\r\\n2895 4384 28918 26424\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n12750 0 25688 1\\r\\n1094 0 12750 1\\r\\n0 0 956 1\\r\\n956 0 1094 1\\r\\n25688 0 31400 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n18006 16484 25725 31400\\r\\n0 0 31400 16484\\r\\n29563 16484 31400 31400\\r\\n25725 16484 29563 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2\\r\\n0 0 31400 13313\\r\\n0 13313 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3\\r\\n0 9388 31400 31400\\r\\n26020 0 31400 9388\\r\\n0 0 26020 9388\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n15164 0 19356 3925\\r\\n0 0 15164 31400\\r\\n15164 3925 31400 31400\\r\\n19356 3278 31400 3925\\r\\n19356 0 31400 3278\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n20421 5189 23141 12511\\r\\n16414 10436 17880 12511\\r\\n17880 10436 20421 12511\\r\\n15819 10436 16414 12511\\r\\n15819 5189 20421 10436\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n15819 5189 23141 12511\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3\\r\\n12052 12345 12343 18147\\r\\n12343 12345 12345 18147\\r\\n6543 12345 12052 18147\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n12750 0 25688 1\\r\\n1094 0 12750 1\\r\\n0 0 956 1\\r\\n956 0 1094 1\\r\\n25688 0 31400 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n0 7098 1 7460\\r\\n0 7460 1 15218\\r\\n0 15218 1 31400\\r\\n0 4974 1 7098\\r\\n0 0 1 4974\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 31400 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 1 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n0 25169 1 27914\\r\\n0 0 1 1366\\r\\n0 10763 1 25169\\r\\n0 1366 1 10138\\r\\n0 27914 1 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 10575 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 3006 1 17592\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n123 4819 5819 29511\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n123 4819 5819 6612\\r\\n123 6612 5819 12692\\r\\n123 12692 5819 29511\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n3091 4819 5743 13222\\r\\n123 13222 5819 29511\\r\\n5743 4819 5819 13222\\r\\n123 4819 2215 13222\\r\\n2215 4819 3091 13222\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n8030 7681 8491 7682\\r\\n8491 7681 8961 7682\\r\\n7666 7681 7963 7682\\r\\n7963 7681 8030 7682\\r\\n678 7681 7666 7682\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n1234 1234 1235 1235\\r\\n1238 1234 1239 1235\\r\\n1235 1234 1236 1235\\r\\n1237 1234 1238 1235\\r\\n1236 1234 1237 1235\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n20812 5661 27208 5898\\r\\n20812 581 29415 5661\\r\\n27539 5661 29415 5898\\r\\n18961 581 20812 5898\\r\\n27208 5661 27539 5898\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n31399 31399 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n20499 0 31400 22815\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 1273 26470 9100\\r\\n0 16615 31400 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n25784 0 31400 20408\\r\\n0 20408 31400 20582\\r\\n15802 0 18106 20408\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n18006 16484 25725 31400\\r\\n0 0 31400 16484\\r\\n29563 16484 31400 31400\\r\\n25725 16484 29563 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n26466 0 26474 6206\\r\\n10906 0 17073 6321\\r\\n19720 0 26356 31400\\r\\n0 0 10906 7852\\r\\n0 21437 18466 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n1338 31399 1525 31400\\r\\n1525 31399 2595 31400\\r\\n961 31399 1338 31400\\r\\n2956 31399 31400 31400\\r\\n2595 31399 2956 31400\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n1349 0 1391 3766\\r\\n1234 0 1238 417\\r\\n1391 0 5000 3766\\r\\n1234 417 1238 3766\\r\\n1238 0 1349 3766\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n0 0 100 30000\\r\\n100 0 31400 5000\\r\\n100 5000 20000 30000\\r\\n0 30000 20000 31400\\r\\n20000 5000 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n0 0 100 30000\\r\\n100 0 31400 5000\\r\\n100 5000 20000 30000\\r\\n0 30000 20000 31000\\r\\n20000 5000 31400 31000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n8591 1234 9517 19512\\r\\n696 19512 9517 31400\\r\\n696 696 8591 19512\\r\\n8591 696 31400 1234\\r\\n9517 1234 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5\\r\\n0 0 1 1\\r\\n0 3 1 4\\r\\n0 1 1 2\\r\\n0 2 1 3\\r\\n0 4 1 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 1 2\\r\\n0 3 1 4\\r\\n0 4 1 5\\r\\n0 2 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n0 1 1 3\\r\\n0 3 1 5\\r\\n0 0 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 1 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 2 1\\r\\n2 0 3 2\\r\\n0 1 1 3\\r\\n1 2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n0 0 2 1\\r\\n2 0 3 2\\r\\n0 1 1 3\\r\\n1 2 3 3\\r\\n1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n0 0 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1\\r\\n0 0 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2\\r\\n0 0 10000 31400\\r\\n10000 0 31400 31400\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2\\r\\n0 0 10000 31400\\r\\n10000 0 31400 31399\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 1 18\\r\\n5 0 6 18\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 2 6\\r\\n2 2 4 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n2 2 3 3\\r\\n4 4 6 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 1 1\\r\\n1 0 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 1 1\\r\\n2 2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 1 1\\r\\n5 5 6 6\\r\\n10 10 11 11\\r\\n13 13 14 14\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n1 1 3 5\\r\\n3 3 5 5\\r\\n4 1 5 3\\r\\n3 1 4 2\\r\\n2 5 3 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n10 10 11 11\\r\\n11 11 12 12\\r\\n11 10 12 11\\r\\n9 12 10 13\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 2 4\\r\\n10 0 12 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 1 1\\r\\n0 1 1 2\\r\\n0 2 1 3\\r\\n0 3 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 1 1\\r\\n3 3 4 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 3 1\\r\\n0 2 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n1 1 5 5\\r\\n1 5 5 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n0 0 1 1\\r\\n1 0 3 3\\r\\n0 2 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 10 10\\r\\n10 10 20 20\\r\\n10 0 20 10\\r\\n10 20 11 120\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n0 0 1 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n0 0 4 2\\r\\n0 2 3 6\\r\\n3 4 6 6\\r\\n4 0 6 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n0 0 1 1\\r\\n1 1 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n1 1 2 2\\r\\n3 3 4 4\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 15000 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n', 'output': ['YES']}, {'input': '3\\r\\n25784 0 31400 20408\\r\\n0 20408 31400 20582\\r\\n15802 0 18106 20408\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n0 0 1 2\\r\\n0 3 1 4\\r\\n0 4 1 5\\r\\n0 2 1 3\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 14999 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n', 'output': ['NO']}, {'input': '2\\r\\n0 0 10000 31400\\r\\n10000 0 31400 31399\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '2\\r\\n0 0 1 1\\r\\n2 2 3 3\\r\\n', 'output': ['NO']}, {'input': '2\\r\\n0 0 1 1\\r\\n1 1 2 2\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n0 0 1 1\\r\\n5 5 6 6\\r\\n10 10 11 11\\r\\n13 13 14 14\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n1349 0 1391 3766\\r\\n1234 0 1238 417\\r\\n1391 0 5000 3766\\r\\n1234 417 1238 3766\\r\\n1238 0 1349 3766\\r\\n', 'output': ['YES']}, {'input': '5\\r\\n0 7098 1 7460\\r\\n0 7460 1 15218\\r\\n0 15218 1 31400\\r\\n0 4974 1 7098\\r\\n0 0 1 4974\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '5\\r\\n0 7098 1 7460\\r\\n0 7460 1 15218\\r\\n0 15218 1 31400\\r\\n0 4974 1 7098\\r\\n0 0 1 4974\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 14999 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n', 'output': ['NO']}, {'input': '2\\r\\n1 1 5 5\\r\\n1 5 5 7\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n0 0 1 2\\r\\n0 3 1 4\\r\\n0 4 1 5\\r\\n0 2 1 3\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n1349 0 1391 3766\\r\\n1234 0 1238 417\\r\\n1391 0 5000 3766\\r\\n1234 417 1238 3766\\r\\n1238 0 1349 3766\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '1\\r\\n123 4819 5819 29511\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n10359 859 28918 4384\\r\\n2895 26520 28918 26882\\r\\n2895 26424 28918 26520\\r\\n2895 859 10359 4384\\r\\n2895 4384 28918 26424\\r\\n', 'output': ['YES']}, {'input': '5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 15000 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n', 'output': ['YES']}, {'input': '1\\r\\n0 0 10575 1\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n0 0 1 1\\r\\n0 1 1 2\\r\\n0 2 1 3\\r\\n0 3 1 4\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '5\\r\\n0 0 10000 20000\\r\\n10000 0 15000 19999\\r\\n10000 19999 15000 20000\\r\\n0 20000 15000 31400\\r\\n15000 0 31400 31400\\r\\n', 'output': ['YES']}, {'input': '5\\r\\n26466 0 26474 6206\\r\\n10906 0 17073 6321\\r\\n19720 0 26356 31400\\r\\n0 0 10906 7852\\r\\n0 21437 18466 31400\\r\\n', 'output': ['NO']}, {'input': '4\\r\\n18006 16484 25725 31400\\r\\n0 0 31400 16484\\r\\n29563 16484 31400 31400\\r\\n25725 16484 29563 31400\\r\\n', 'output': ['NO']}, {'input': '1\\r\\n0 0 1 31400\\r\\n', 'output': ['NO']}, {'input': '5\\r\\n0 0 100 30000\\r\\n100 0 31400 5000\\r\\n100 5000 20000 30000\\r\\n0 30000 20000 31400\\r\\n20000 5000 31400 31400\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":87.5,"human_sample_branch_coverage_5":100.0,"id":268,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":97.5} {"sample_inputs":"[\"2 3 1000000\", \"3 3 2\"]","input_specification":"The first line contains three integers n, m, s (1\u2009\u2264\u2009n,\u2009m,\u2009s\u2009\u2264\u2009106) \u2014 length of the board, width of the board and length of the flea's jump.","src_uid":"e853733fb2ed87c56623ff9a5ac09c36","source_code":"import java.io.*;\nimport java.util.*;\n\npublic class practice {\n\tstatic class FastReader \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n } \n\tstatic class Print\n\t{\n\t private final BufferedWriter bw;\n\t public Print()\n\t {\n\t bw=new BufferedWriter(new OutputStreamWriter(System.out));\n\t }\n\t public void print(String str)throws IOException\n\t {\n\t bw.append(str);\n\t }\n\t public void println(String str)throws IOException\n\t {\n\t print(str);\n\t bw.append(\"\\n\");\n\t }\n\t public void close()throws IOException\n\t {\n\t bw.close();\n\t }}\n\t\tpublic static void main(String[] args) throws IOException {\t\t\t\n\t\t\tFastReader scn=new FastReader();\n\t\t\tPrint p=new Print();\n\t\t\tlong n=scn.nextLong(),m=scn.nextLong(),s=scn.nextLong();\n\t\t\tlong ans=((n-1)\/s+1)*((m-1)\/s+1)*((n-1)%s+1)*((m-1)%s+1);\n\t\t\tp.println(Long.toString(ans));\n\t\t\t\n\t\t\tp.close();\n\t\t\t\n\t\t}\n}","sample_outputs":"[\"6\", \"4\"]","lang_cluster":"Java","notes":null,"output_specification":"Output the only integer \u2014 the number of the required starting positions of the flea.","description":"It is known that fleas in Berland can jump only vertically and horizontally, and the length of the jump is always equal to s centimeters. A flea has found herself at the center of some cell of the checked board of the size n\u2009\u00d7\u2009m centimeters (each cell is 1\u2009\u00d7\u20091 centimeters). She can jump as she wishes for an arbitrary number of times, she can even visit a cell more than once. The only restriction is that she cannot jump out of the board.The flea can count the amount of cells that she can reach from the starting position (x,\u2009y). Let's denote this amount by dx,\u2009y. Your task is to find the number of such starting positions (x,\u2009y), which have the maximum possible value of dx,\u2009y.","human_testcases":"[{\"input\": \"2 3 1000000\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 3 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 5 6\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"9 8 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000 1000 1000\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000 1000000 1\\r\\n\", \"output\": [\"1000000000000\"]}, {\"input\": \"1000000 1000000 2\\r\\n\", \"output\": [\"1000000000000\"]}, {\"input\": \"1000000 1000000 999999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000000 1000000 12345\\r\\n\", \"output\": [\"20340100\"]}, {\"input\": \"1000000 1000000 123456\\r\\n\", \"output\": [\"12358324224\"]}, {\"input\": \"43496 179847 327622\\r\\n\", \"output\": [\"7822625112\"]}, {\"input\": \"105126 379125 460772\\r\\n\", \"output\": [\"39855894750\"]}, {\"input\": \"999463 261665 981183\\r\\n\", \"output\": [\"9566472400\"]}, {\"input\": \"836832 336228 50\\r\\n\", \"output\": [\"100850467200\"]}, {\"input\": \"303307 400683 999941\\r\\n\", \"output\": [\"121529958681\"]}, {\"input\": \"40224 890892 54\\r\\n\", \"output\": [\"31858297920\"]}, {\"input\": \"109785 447109 990618\\r\\n\", \"output\": [\"49085861565\"]}, {\"input\": \"228385 744978 699604\\r\\n\", \"output\": [\"20725481980\"]}, {\"input\": \"694117 431924 737\\r\\n\", \"output\": [\"13934440800\"]}, {\"input\": \"923179 799988 998430\\r\\n\", \"output\": [\"738532121852\"]}, {\"input\": \"61043 55049 998379\\r\\n\", \"output\": [\"3360356107\"]}, {\"input\": \"402841 635488 997633\\r\\n\", \"output\": [\"256000621408\"]}, {\"input\": \"213927 672636 865\\r\\n\", \"output\": [\"27867287808\"]}, {\"input\": \"391814 220151 3756\\r\\n\", \"output\": [\"16977831150\"]}, {\"input\": \"313667 778854 999813\\r\\n\", \"output\": [\"244300797618\"]}, {\"input\": \"933241 558702 1\\r\\n\", \"output\": [\"521403613182\"]}, {\"input\": \"38614 941895 999986\\r\\n\", \"output\": [\"36370333530\"]}, {\"input\": \"242366 216591 4\\r\\n\", \"output\": [\"19685613696\"]}, {\"input\": \"282798 941695 999998\\r\\n\", \"output\": [\"266309462610\"]}, {\"input\": \"43054 191 1\\r\\n\", \"output\": [\"8223314\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 2 3\\r\\n', 'output': ['2']}, {'input': '1000000 1000000 2\\r\\n', 'output': ['1000000000000']}, {'input': '1000 1000 1000\\r\\n', 'output': ['1000000']}, {'input': '303307 400683 999941\\r\\n', 'output': ['121529958681']}, {'input': '3 3 2\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '9 8 7\\r\\n', 'output': ['8']}, {'input': '109785 447109 990618\\r\\n', 'output': ['49085861565']}, {'input': '923179 799988 998430\\r\\n', 'output': ['738532121852']}, {'input': '282798 941695 999998\\r\\n', 'output': ['266309462610']}, {'input': '105126 379125 460772\\r\\n', 'output': ['39855894750']}]","human_sample_testcases_3":"[{'input': '1 2 3\\r\\n', 'output': ['2']}, {'input': '999463 261665 981183\\r\\n', 'output': ['9566472400']}, {'input': '213927 672636 865\\r\\n', 'output': ['27867287808']}, {'input': '1000000 1000000 999999\\r\\n', 'output': ['4']}, {'input': '391814 220151 3756\\r\\n', 'output': ['16977831150']}]","human_sample_testcases_4":"[{'input': '43054 191 1\\r\\n', 'output': ['8223314']}, {'input': '1000000 1000000 123456\\r\\n', 'output': ['12358324224']}, {'input': '1000000 1000000 999999\\r\\n', 'output': ['4']}, {'input': '313667 778854 999813\\r\\n', 'output': ['244300797618']}, {'input': '61043 55049 998379\\r\\n', 'output': ['3360356107']}]","human_sample_testcases_5":"[{'input': '2 3 1000000\\r\\n', 'output': ['6']}, {'input': '3 3 2\\r\\n', 'output': ['4']}, {'input': '694117 431924 737\\r\\n', 'output': ['13934440800']}, {'input': '836832 336228 50\\r\\n', 'output': ['100850467200']}, {'input': '43496 179847 327622\\r\\n', 'output': ['7822625112']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":269,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"7\", \"8\", \"9\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$1 \\leq n \\leq 10^9$$$).","src_uid":"5551742f6ab39fdac3930d866f439e3e","source_code":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Calendar;\nimport java.util.Scanner;\n\npublic class Main {\n\n\n public static void main(String[] args) throws ParseException, IOException {\n\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n long n=Long.parseLong(br.readLine());\n System.out.println((int)Math.ceil(1.0*(n+1)\/2));\n \n \n \n\n }\n}\n\n ","sample_outputs":"[\"4\", \"5\", \"5\"]","lang_cluster":"Java","notes":"NoteIn the first sample, there are following possible weights of splits of $$$7$$$:Weight 1: [$$$\\textbf 7$$$] Weight 2: [$$$\\textbf 3$$$, $$$\\textbf 3$$$, 1] Weight 3: [$$$\\textbf 2$$$, $$$\\textbf 2$$$, $$$\\textbf 2$$$, 1] Weight 7: [$$$\\textbf 1$$$, $$$\\textbf 1$$$, $$$\\textbf 1$$$, $$$\\textbf 1$$$, $$$\\textbf 1$$$, $$$\\textbf 1$$$, $$$\\textbf 1$$$]","output_specification":"Output one integer\u00a0\u2014 the answer to the problem.","description":"Let's define a split of $$$n$$$ as a nonincreasing sequence of positive integers, the sum of which is $$$n$$$. For example, the following sequences are splits of $$$8$$$: $$$[4, 4]$$$, $$$[3, 3, 2]$$$, $$$[2, 2, 1, 1, 1, 1]$$$, $$$[5, 2, 1]$$$.The following sequences aren't splits of $$$8$$$: $$$[1, 7]$$$, $$$[5, 4]$$$, $$$[11, -3]$$$, $$$[1, 1, 4, 1, 1]$$$.The weight of a split is the number of elements in the split that are equal to the first element. For example, the weight of the split $$$[1, 1, 1, 1, 1]$$$ is $$$5$$$, the weight of the split $$$[5, 5, 3, 3, 3]$$$ is $$$2$$$ and the weight of the split $$$[9]$$$ equals $$$1$$$.For a given $$$n$$$, find out the number of different weights of its splits.","human_testcases":"[{\"input\": \"7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"286\\r\\n\", \"output\": [\"144\"]}, {\"input\": \"48\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"941\\r\\n\", \"output\": [\"471\"]}, {\"input\": \"45154\\r\\n\", \"output\": [\"22578\"]}, {\"input\": \"60324\\r\\n\", \"output\": [\"30163\"]}, {\"input\": \"91840\\r\\n\", \"output\": [\"45921\"]}, {\"input\": \"41909\\r\\n\", \"output\": [\"20955\"]}, {\"input\": \"58288\\r\\n\", \"output\": [\"29145\"]}, {\"input\": \"91641\\r\\n\", \"output\": [\"45821\"]}, {\"input\": \"62258\\r\\n\", \"output\": [\"31130\"]}, {\"input\": \"79811\\r\\n\", \"output\": [\"39906\"]}, {\"input\": \"88740\\r\\n\", \"output\": [\"44371\"]}, {\"input\": \"12351\\r\\n\", \"output\": [\"6176\"]}, {\"input\": \"1960\\r\\n\", \"output\": [\"981\"]}, {\"input\": \"29239\\r\\n\", \"output\": [\"14620\"]}, {\"input\": \"85801\\r\\n\", \"output\": [\"42901\"]}, {\"input\": \"43255\\r\\n\", \"output\": [\"21628\"]}, {\"input\": \"13439\\r\\n\", \"output\": [\"6720\"]}, {\"input\": \"35668\\r\\n\", \"output\": [\"17835\"]}, {\"input\": \"19122\\r\\n\", \"output\": [\"9562\"]}, {\"input\": \"60169\\r\\n\", \"output\": [\"30085\"]}, {\"input\": \"50588\\r\\n\", \"output\": [\"25295\"]}, {\"input\": \"2467\\r\\n\", \"output\": [\"1234\"]}, {\"input\": \"39315\\r\\n\", \"output\": [\"19658\"]}, {\"input\": \"29950\\r\\n\", \"output\": [\"14976\"]}, {\"input\": \"17286\\r\\n\", \"output\": [\"8644\"]}, {\"input\": \"7359066\\r\\n\", \"output\": [\"3679534\"]}, {\"input\": \"1016391\\r\\n\", \"output\": [\"508196\"]}, {\"input\": \"7928871\\r\\n\", \"output\": [\"3964436\"]}, {\"input\": \"3968891\\r\\n\", \"output\": [\"1984446\"]}, {\"input\": \"2636452\\r\\n\", \"output\": [\"1318227\"]}, {\"input\": \"5076901\\r\\n\", \"output\": [\"2538451\"]}, {\"input\": \"9870265\\r\\n\", \"output\": [\"4935133\"]}, {\"input\": \"2453786\\r\\n\", \"output\": [\"1226894\"]}, {\"input\": \"7263670\\r\\n\", \"output\": [\"3631836\"]}, {\"input\": \"1890845\\r\\n\", \"output\": [\"945423\"]}, {\"input\": \"574128507\\r\\n\", \"output\": [\"287064254\"]}, {\"input\": \"648476655\\r\\n\", \"output\": [\"324238328\"]}, {\"input\": \"97349542\\r\\n\", \"output\": [\"48674772\"]}, {\"input\": \"716489761\\r\\n\", \"output\": [\"358244881\"]}, {\"input\": \"858771038\\r\\n\", \"output\": [\"429385520\"]}, {\"input\": \"520778784\\r\\n\", \"output\": [\"260389393\"]}, {\"input\": \"439004204\\r\\n\", \"output\": [\"219502103\"]}, {\"input\": \"589992198\\r\\n\", \"output\": [\"294996100\"]}, {\"input\": \"371106544\\r\\n\", \"output\": [\"185553273\"]}, {\"input\": \"894241590\\r\\n\", \"output\": [\"447120796\"]}, {\"input\": \"123957268\\r\\n\", \"output\": [\"61978635\"]}, {\"input\": \"234149297\\r\\n\", \"output\": [\"117074649\"]}, {\"input\": \"789954052\\r\\n\", \"output\": [\"394977027\"]}, {\"input\": \"667978920\\r\\n\", \"output\": [\"333989461\"]}, {\"input\": \"154647261\\r\\n\", \"output\": [\"77323631\"]}, {\"input\": \"751453521\\r\\n\", \"output\": [\"375726761\"]}, {\"input\": \"848862308\\r\\n\", \"output\": [\"424431155\"]}, {\"input\": \"323926781\\r\\n\", \"output\": [\"161963391\"]}, {\"input\": \"576768825\\r\\n\", \"output\": [\"288384413\"]}, {\"input\": \"31293802\\r\\n\", \"output\": [\"15646902\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"500000001\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '41909\\r\\n', 'output': ['20955']}, {'input': '97349542\\r\\n', 'output': ['48674772']}, {'input': '574128507\\r\\n', 'output': ['287064254']}, {'input': '5076901\\r\\n', 'output': ['2538451']}, {'input': '123957268\\r\\n', 'output': ['61978635']}]","human_sample_testcases_2":"[{'input': '60169\\r\\n', 'output': ['30085']}, {'input': '323926781\\r\\n', 'output': ['161963391']}, {'input': '751453521\\r\\n', 'output': ['375726761']}, {'input': '858771038\\r\\n', 'output': ['429385520']}, {'input': '58288\\r\\n', 'output': ['29145']}]","human_sample_testcases_3":"[{'input': '43255\\r\\n', 'output': ['21628']}, {'input': '29239\\r\\n', 'output': ['14620']}, {'input': '576768825\\r\\n', 'output': ['288384413']}, {'input': '31293802\\r\\n', 'output': ['15646902']}, {'input': '45154\\r\\n', 'output': ['22578']}]","human_sample_testcases_4":"[{'input': '17286\\r\\n', 'output': ['8644']}, {'input': '574128507\\r\\n', 'output': ['287064254']}, {'input': '29950\\r\\n', 'output': ['14976']}, {'input': '60324\\r\\n', 'output': ['30163']}, {'input': '79811\\r\\n', 'output': ['39906']}]","human_sample_testcases_5":"[{'input': '520778784\\r\\n', 'output': ['260389393']}, {'input': '2\\r\\n', 'output': ['2']}, {'input': '1960\\r\\n', 'output': ['981']}, {'input': '79811\\r\\n', 'output': ['39906']}, {'input': '60169\\r\\n', 'output': ['30085']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":270,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"390\", \"7\", \"1000000000\"]","input_specification":"The only input line contains the integer $$$n$$$ ($$$1 \\le n \\le 2\\cdot10^9$$$).","src_uid":"38690bd32e7d0b314f701f138ce19dfb","source_code":"\n\nimport java.util.Scanner;\n\npublic class Nirvana {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n=in.nextInt();\n\t\tNirvana obj = new Nirvana();\n\t\tSystem.out.println(obj.maxMultiply(n));\n\t\t\n\t\tin.close();\n\t}\n\tint maxMultiply(int n) {\n\t\tif(n == 0)\n\t\t\treturn 1;\n\t\tint nextNum = n\/10;\n\t\tint digit = n%10;\n\t\tif(digit == 9) {\n\t\t\t\/\/ No need to borrow\n\t\t\treturn 9*maxMultiply(nextNum);\n\t\t}\n\t\tint result9 = -1;\n\t\tint resultNormal = -1;\n\t\tif(nextNum>0) {\n\t\t\t\/\/ Can borrow\n\t\t\tresult9 = 9*maxMultiply(nextNum-1);\n\t\t}\n\t\tresultNormal = digit*maxMultiply(nextNum);\n\t\treturn Math.max(result9, resultNormal);\n\t}\n\n}\n","sample_outputs":"[\"216\", \"7\", \"387420489\"]","lang_cluster":"Java","notes":"NoteIn the first example the maximum product is achieved for $$$389$$$ (the product of digits is $$$3\\cdot8\\cdot9=216$$$).In the second example the maximum product is achieved for $$$7$$$ (the product of digits is $$$7$$$).In the third example the maximum product is achieved for $$$999999999$$$ (the product of digits is $$$9^9=387420489$$$).","output_specification":"Print the maximum product of digits among all integers from $$$1$$$ to $$$n$$$.","description":"Kurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deeper.Help Kurt find the maximum possible product of digits among all integers from $$$1$$$ to $$$n$$$.","human_testcases":"[{\"input\": \"390\\r\\n\", \"output\": [\"216\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2000000000\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"4876\\r\\n\", \"output\": [\"2268\"]}, {\"input\": \"889878787\\r\\n\", \"output\": [\"301327047\"]}, {\"input\": \"1382011913\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"396579088\\r\\n\", \"output\": [\"114791256\"]}, {\"input\": \"890133136\\r\\n\", \"output\": [\"306110016\"]}, {\"input\": \"485908655\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"261560170\\r\\n\", \"output\": [\"47829690\"]}, {\"input\": \"391789744\\r\\n\", \"output\": [\"114791256\"]}, {\"input\": \"480330141\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"691993260\\r\\n\", \"output\": [\"229582512\"]}, {\"input\": \"483212601\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"892295273\\r\\n\", \"output\": [\"306110016\"]}, {\"input\": \"389041744\\r\\n\", \"output\": [\"102036672\"]}, {\"input\": \"282587478\\r\\n\", \"output\": [\"66961566\"]}, {\"input\": \"791812587\\r\\n\", \"output\": [\"267846264\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"98\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"997\\r\\n\", \"output\": [\"648\"]}, {\"input\": \"998\\r\\n\", \"output\": [\"648\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"1001\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"278\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"1999999999\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"2690\\r\\n\", \"output\": [\"864\"]}, {\"input\": \"268\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"289664200\\r\\n\", \"output\": [\"68024448\"]}, {\"input\": \"288\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"1999999998\\r\\n\", \"output\": [\"387420489\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1999999999\\r\\n', 'output': ['387420489']}, {'input': '261560170\\r\\n', 'output': ['47829690']}, {'input': '4876\\r\\n', 'output': ['2268']}, {'input': '480330141\\r\\n', 'output': ['133923132']}, {'input': '999\\r\\n', 'output': ['729']}]","human_sample_testcases_2":"[{'input': '1000000000\\r\\n', 'output': ['387420489']}, {'input': '25\\r\\n', 'output': ['10']}, {'input': '691993260\\r\\n', 'output': ['229582512']}, {'input': '19\\r\\n', 'output': ['9']}, {'input': '1\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '3\\r\\n', 'output': ['3']}, {'input': '278\\r\\n', 'output': ['112']}, {'input': '389041744\\r\\n', 'output': ['102036672']}, {'input': '100\\r\\n', 'output': ['81']}, {'input': '9\\r\\n', 'output': ['9']}]","human_sample_testcases_4":"[{'input': '997\\r\\n', 'output': ['648']}, {'input': '2690\\r\\n', 'output': ['864']}, {'input': '480330141\\r\\n', 'output': ['133923132']}, {'input': '396579088\\r\\n', 'output': ['114791256']}, {'input': '1\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '389041744\\r\\n', 'output': ['102036672']}, {'input': '892295273\\r\\n', 'output': ['306110016']}, {'input': '1999999999\\r\\n', 'output': ['387420489']}, {'input': '289664200\\r\\n', 'output': ['68024448']}, {'input': '997\\r\\n', 'output': ['648']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":271,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 2\", \"2 0\", \"2 2\", \"2000 2000\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$m$$$ ($$$0 \\le n,m \\le 2\\,000$$$).","src_uid":"a2fcad987e9b2bb3e6395654cd4fcfbb","source_code":"\/*\nIf you want to aim high, aim high\nDon't let that studying and grades consume you\nJust live life young\n******************************\nIf I'm the sun, you're the moon\nBecause when I go up, you go down\n*******************************\nI'm working for the day I will surpass you\nhttps:\/\/www.a2oj.com\/Ladder16.html\n*\/\nimport java.util.*;\nimport java.io.*;\nimport java.math.*;\n\n public class x1204E\n {\n static long MOD = 998244853L;\n public static void main(String omkar[]) throws Exception\n {\n BufferedReader infile = new BufferedReader(new InputStreamReader(System.in)); \n StringTokenizer st = new StringTokenizer(infile.readLine());\n int N = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n fac = new long[4001];\n invfac = new long[4001];\n fac[0] = invfac[0] = 1L;\n for(int i=1; i <= 4000; i++)\n {\n fac[i] = (fac[i-1]*i)%MOD;\n invfac[i] = power(fac[i], MOD-2, MOD);\n }\n long[][] zero = new long[N+1][M+1];\n Arrays.fill(zero[0], 1L);\n for(int a=1; a <= N; a++)\n for(int b=a; b <= M; b++)\n zero[a][b] = (zero[a-1][b]+zero[a][b-1])%MOD;\n long[][] dp = new long[N+1][M+1];\n for(int a=0; a <= N; a++)\n dp[a][0] = a;\n for(int a=1; a <= N; a++)\n for(int b=1; b <= M; b++)\n {\n long temp = (dp[a-1][b]+dp[a][b-1])%MOD;\n temp = (temp+cnt(a-1,b)-cnt(a,b-1)+MOD)%MOD;\n dp[a][b] = (temp+zero[a][b-1])%MOD;\n }\n System.out.println(dp[N][M]);\n }\n static long fac[];\n static long invfac[];\n public static long cnt(int a, int b)\n {\n long val = fac[a+b];\n val = (val*invfac[a])%MOD;\n return (val*invfac[b])%MOD;\n }\n public static long power(long x, long y, long p) \n { \n long res = 1L; \n x = x % p; \n while (y > 0) \n { \n if((y & 1)==1) \n res = (res * x) % p; \n y = y >> 1; \n x = (x * x) % p; \n } \n return res; \n } \n }","sample_outputs":"[\"0\", \"2\", \"5\", \"674532367\"]","lang_cluster":"Java","notes":"NoteIn the first example the only possible array is [-1,-1], its maximal prefix sum is equal to $$$0$$$. In the second example the only possible array is [1,1], its maximal prefix sum is equal to $$$2$$$. There are $$$6$$$ possible arrays in the third example:[1,1,-1,-1], f([1,1,-1,-1]) = 2[1,-1,1,-1], f([1,-1,1,-1]) = 1[1,-1,-1,1], f([1,-1,-1,1]) = 1[-1,1,1,-1], f([-1,1,1,-1]) = 1[-1,1,-1,1], f([-1,1,-1,1]) = 0[-1,-1,1,1], f([-1,-1,1,1]) = 0So the answer for the third example is $$$2+1+1+1+0+0 = 5$$$.","output_specification":"Output the answer to the problem modulo $$$998\\: 244\\: 853$$$.","description":"Natasha's favourite numbers are $$$n$$$ and $$$1$$$, and Sasha's favourite numbers are $$$m$$$ and $$$-1$$$. One day Natasha and Sasha met and wrote down every possible array of length $$$n+m$$$ such that some $$$n$$$ of its elements are equal to $$$1$$$ and another $$$m$$$ elements are equal to $$$-1$$$. For each such array they counted its maximal prefix sum, probably an empty one which is equal to $$$0$$$ (in another words, if every nonempty prefix sum is less to zero, then it is considered equal to zero). Formally, denote as $$$f(a)$$$ the maximal prefix sum of an array $$$a_{1, \\ldots ,l}$$$ of length $$$l \\geq 0$$$. Then: $$$$$$f(a) = \\max (0, \\smash{\\displaystyle\\max_{1 \\leq i \\leq l}} \\sum_{j=1}^{i} a_j )$$$$$$Now they want to count the sum of maximal prefix sums for each such an array and they are asking you to help. As this sum can be very large, output it modulo $$$998\\: 244\\: 853$$$.","human_testcases":"[{\"input\": \"0 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2000 2000\\r\\n\", \"output\": [\"674532367\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 2\\r\\n\", \"output\": [\"716\"]}, {\"input\": \"1 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 13\\r\\n\", \"output\": [\"4048\"]}, {\"input\": \"60 59\\r\\n\", \"output\": [\"271173738\"]}, {\"input\": \"27 16\\r\\n\", \"output\": [\"886006554\"]}, {\"input\": \"1134 1092\\r\\n\", \"output\": [\"134680101\"]}, {\"input\": \"756 1061\\r\\n\", \"output\": [\"72270489\"]}, {\"input\": \"953 1797\\r\\n\", \"output\": [\"557692333\"]}, {\"input\": \"76 850\\r\\n\", \"output\": [\"103566263\"]}, {\"input\": \"24 1508\\r\\n\", \"output\": [\"540543518\"]}, {\"input\": \"1087 1050\\r\\n\", \"output\": [\"973930225\"]}, {\"input\": \"149 821\\r\\n\", \"output\": [\"64450770\"]}, {\"input\": \"983 666\\r\\n\", \"output\": [\"917123830\"]}, {\"input\": \"45 1323\\r\\n\", \"output\": [\"357852234\"]}, {\"input\": \"1994 1981\\r\\n\", \"output\": [\"596939902\"]}, {\"input\": \"1942 1523\\r\\n\", \"output\": [\"89088577\"]}, {\"input\": \"1891 1294\\r\\n\", \"output\": [\"696966158\"]}, {\"input\": \"1132 1727\\r\\n\", \"output\": [\"878164775\"]}, {\"input\": \"1080 383\\r\\n\", \"output\": [\"161999131\"]}, {\"input\": \"1028 1040\\r\\n\", \"output\": [\"119840364\"]}, {\"input\": \"976 1698\\r\\n\", \"output\": [\"621383232\"]}, {\"input\": \"38 656\\r\\n\", \"output\": [\"814958661\"]}, {\"input\": \"872 1313\\r\\n\", \"output\": [\"261808476\"]}, {\"input\": \"1935 856\\r\\n\", \"output\": [\"707458926\"]}, {\"input\": \"1883 1513\\r\\n\", \"output\": [\"265215482\"]}, {\"input\": \"0 2000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2000 0\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"1991 1992\\r\\n\", \"output\": [\"518738831\"]}, {\"input\": \"1935 1977\\r\\n\", \"output\": [\"16604630\"]}, {\"input\": \"1990 2000\\r\\n\", \"output\": [\"516468539\"]}, {\"input\": \"1915 1915\\r\\n\", \"output\": [\"534527105\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '983 666\\r\\n', 'output': ['917123830']}, {'input': '2 0\\r\\n', 'output': ['2']}, {'input': '0 2000\\r\\n', 'output': ['0']}, {'input': '953 1797\\r\\n', 'output': ['557692333']}, {'input': '1 4\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '1132 1727\\r\\n', 'output': ['878164775']}, {'input': '27 16\\r\\n', 'output': ['886006554']}, {'input': '1080 383\\r\\n', 'output': ['161999131']}, {'input': '983 666\\r\\n', 'output': ['917123830']}, {'input': '1942 1523\\r\\n', 'output': ['89088577']}]","human_sample_testcases_3":"[{'input': '756 1061\\r\\n', 'output': ['72270489']}, {'input': '27 16\\r\\n', 'output': ['886006554']}, {'input': '45 1323\\r\\n', 'output': ['357852234']}, {'input': '60 59\\r\\n', 'output': ['271173738']}, {'input': '149 821\\r\\n', 'output': ['64450770']}]","human_sample_testcases_4":"[{'input': '0 2\\r\\n', 'output': ['0']}, {'input': '1883 1513\\r\\n', 'output': ['265215482']}, {'input': '1994 1981\\r\\n', 'output': ['596939902']}, {'input': '2000 2000\\r\\n', 'output': ['674532367']}, {'input': '149 821\\r\\n', 'output': ['64450770']}]","human_sample_testcases_5":"[{'input': '1087 1050\\r\\n', 'output': ['973930225']}, {'input': '976 1698\\r\\n', 'output': ['621383232']}, {'input': '0 2000\\r\\n', 'output': ['0']}, {'input': '1132 1727\\r\\n', 'output': ['878164775']}, {'input': '2000 2000\\r\\n', 'output': ['674532367']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":272,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\", \"5\"]","input_specification":"The single line contains the positive integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091015).","src_uid":"689e7876048ee4eb7479e838c981f068","source_code":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\n\npublic class _486A_CalculatingFunction {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t\/\/ TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBigInteger n = new BigInteger(br.readLine());\n\t\t\n\t\tif (n.remainder(new BigInteger(\"2\")).equals(new BigInteger(\"0\"))) {\n\t\t\tSystem.out.println(n.divide(new BigInteger(\"2\")));\n\t\t} else {\n\t\t\tSystem.out.println(n.divide(new BigInteger(\"2\")).add(new BigInteger(\"1\")).multiply(new BigInteger(\"-1\")));\n\t\t}\n\t\t\n\t\tbr.close();\n\t}\n\n}","sample_outputs":"[\"2\", \"-3\"]","lang_cluster":"Java","notes":"Notef(4)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u20094\u2009=\u20092f(5)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u20094\u2009-\u20095\u2009=\u2009\u2009-\u20093","output_specification":"Print f(n) in a single line.","description":"For a positive integer n let's define a function f:f(n)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u2009..\u2009+\u2009(\u2009-\u20091)nn Your task is to calculate f(n) for a given integer n.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"-3\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"500000000\"]}, {\"input\": \"1000000001\\r\\n\", \"output\": [\"-500000001\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"500000000000000\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"-51\"]}, {\"input\": \"102\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"103\\r\\n\", \"output\": [\"-52\"]}, {\"input\": \"104\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"105\\r\\n\", \"output\": [\"-53\"]}, {\"input\": \"106\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"107\\r\\n\", \"output\": [\"-54\"]}, {\"input\": \"108\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"109\\r\\n\", \"output\": [\"-55\"]}, {\"input\": \"208170109961052\\r\\n\", \"output\": [\"104085054980526\"]}, {\"input\": \"46017661651072\\r\\n\", \"output\": [\"23008830825536\"]}, {\"input\": \"4018154546667\\r\\n\", \"output\": [\"-2009077273334\"]}, {\"input\": \"288565475053\\r\\n\", \"output\": [\"-144282737527\"]}, {\"input\": \"3052460231\\r\\n\", \"output\": [\"-1526230116\"]}, {\"input\": \"29906716\\r\\n\", \"output\": [\"14953358\"]}, {\"input\": \"87897701693326\\r\\n\", \"output\": [\"43948850846663\"]}, {\"input\": \"8240\\r\\n\", \"output\": [\"4120\"]}, {\"input\": \"577935\\r\\n\", \"output\": [\"-288968\"]}, {\"input\": \"62\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9999999999999\\r\\n\", \"output\": [\"-5000000000000\"]}, {\"input\": \"1000000000000\\r\\n\", \"output\": [\"500000000000\"]}, {\"input\": \"99999999999999\\r\\n\", \"output\": [\"-50000000000000\"]}, {\"input\": \"999999999999999\\r\\n\", \"output\": [\"-500000000000000\"]}, {\"input\": \"42191359342\\r\\n\", \"output\": [\"21095679671\"]}, {\"input\": \"100000000000000\\r\\n\", \"output\": [\"50000000000000\"]}, {\"input\": \"145645214654154\\r\\n\", \"output\": [\"72822607327077\"]}, {\"input\": \"4294967296\\r\\n\", \"output\": [\"2147483648\"]}, {\"input\": \"3037000499\\r\\n\", \"output\": [\"-1518500250\"]}, {\"input\": \"10000000000001\\r\\n\", \"output\": [\"-5000000000001\"]}, {\"input\": \"100000017040846\\r\\n\", \"output\": [\"50000008520423\"]}, {\"input\": \"98979894985999\\r\\n\", \"output\": [\"-49489947493000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5\\r\\n', 'output': ['-3']}, {'input': '10000000000001\\r\\n', 'output': ['-5000000000001']}, {'input': '101\\r\\n', 'output': ['-51']}, {'input': '29906716\\r\\n', 'output': ['14953358']}, {'input': '62\\r\\n', 'output': ['31']}]","human_sample_testcases_2":"[{'input': '105\\r\\n', 'output': ['-53']}, {'input': '10000000000001\\r\\n', 'output': ['-5000000000001']}, {'input': '103\\r\\n', 'output': ['-52']}, {'input': '100000000000000\\r\\n', 'output': ['50000000000000']}, {'input': '999999999999999\\r\\n', 'output': ['-500000000000000']}]","human_sample_testcases_3":"[{'input': '104\\r\\n', 'output': ['52']}, {'input': '145645214654154\\r\\n', 'output': ['72822607327077']}, {'input': '5\\r\\n', 'output': ['-3']}, {'input': '100\\r\\n', 'output': ['50']}, {'input': '98979894985999\\r\\n', 'output': ['-49489947493000']}]","human_sample_testcases_4":"[{'input': '208170109961052\\r\\n', 'output': ['104085054980526']}, {'input': '4018154546667\\r\\n', 'output': ['-2009077273334']}, {'input': '103\\r\\n', 'output': ['-52']}, {'input': '109\\r\\n', 'output': ['-55']}, {'input': '100\\r\\n', 'output': ['50']}]","human_sample_testcases_5":"[{'input': '98979894985999\\r\\n', 'output': ['-49489947493000']}, {'input': '1000000000\\r\\n', 'output': ['500000000']}, {'input': '1000000000000000\\r\\n', 'output': ['500000000000000']}, {'input': '5\\r\\n', 'output': ['-3']}, {'input': '100\\r\\n', 'output': ['50']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":273,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n6\\n1\\n1\\n1\\n1\", \"1\\n10\\n5\", \"3\\n6\\n1\\n6\\n5\", \"3\\n7\\n1\\n6\\n5\"]","input_specification":"The first line contains a single integer $$$n$$$ $$$(1 \\le n \\le 100)$$$ \u2014 the number of benches in the park. The second line contains a single integer $$$m$$$ $$$(1 \\le m \\le 10\\,000)$$$ \u2014 the number of people additionally coming to the park. Each of the next $$$n$$$ lines contains a single integer $$$a_i$$$ $$$(1 \\le a_i \\le 100)$$$ \u2014 the initial number of people on the $$$i$$$-th bench.","src_uid":"78f696bd954c9f0f9bb502e515d85a8d","source_code":"import java.util.* ;\npublic class contes\n{\n public static void main(String ar[])\n {\n Scanner sc = new Scanner(System.in) ;\n int n = sc.nextInt() ;\n int m = sc.nextInt() ;\n int max = 0 ;\n int sum = 0 ;\n for(int i = 0 ; i tre){\n tre= tab[l+1]-tab[l];\n }\n else if (l==j&&tab[l+1]-tab[l-1]>tre){\n tre= tab[l+1]-tab[l-1];\n }\n else if (l+1==j&&tab[l+2]-tal[l]>tre){\n tre = tab[l+2]-tab[l]; \n }\n *\/\n\n }\n\n if (tre primes = Arrays.asList(a);\n if (primes.indexOf(n) + 1 < primes.size() && primes.get(primes.indexOf(n) + 1) == m) {\n System.out.println(\"YES\");\n } else {\n System.out.println(\"NO\");\n }\n sc.close();\n }\n}\n","sample_outputs":"[\"YES\", \"YES\", \"NO\"]","lang_cluster":"Java","notes":null,"output_specification":"Print YES, if m is the next prime number after n, or NO otherwise.","description":"A prime number is a number which has exactly two distinct divisors: one and itself. For example, numbers 2, 7, 3 are prime, and 1, 6, 4 are not.The next prime number after x is the smallest prime number greater than x. For example, the next prime number after 2 is 3, and the next prime number after 3 is 5. Note that there is exactly one next prime number after each number. So 5 is\u00a0not the next prime number for 2.One cold April morning Panoramix predicted that soon Kakofonix will break free from his straitjacket, and this will be a black day for the residents of the Gallic countryside.Panoramix's prophecy tells that if some day Asterix and Obelix beat exactly x Roman soldiers, where x is a prime number, and next day they beat exactly y Roman soldiers, where y is the next prime number after x, then it's time to wait for Armageddon, for nothing can shut Kakofonix up while he sings his infernal song.Yesterday the Gauls beat n Roman soldiers and it turned out that the number n was prime! Today their victims were a troop of m Romans (m\u2009>\u2009n). Determine whether the Gauls should wait for the black day after today's victory of Asterix and Obelix?","human_testcases":"[{\"input\": \"3 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 11\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"7 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11 13\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13 17\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"17 19\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19 23\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23 29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29 31\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"31 37\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"37 41\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"41 43\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"43 47\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 11\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 9\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 11\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 13\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 15\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 13\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13 15\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"19 21\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13 20\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"41 49\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"43 49\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"47 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"47 49\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"47 48\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"23 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"31 33\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '47 48\\r\\n', 'output': ['NO']}, {'input': '5 15\\r\\n', 'output': ['NO']}, {'input': '17 19\\r\\n', 'output': ['YES']}, {'input': '3 4\\r\\n', 'output': ['NO']}, {'input': '19 23\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '41 43\\r\\n', 'output': ['YES']}, {'input': '41 49\\r\\n', 'output': ['NO']}, {'input': '3 7\\r\\n', 'output': ['NO']}, {'input': '23 25\\r\\n', 'output': ['NO']}, {'input': '7 11\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '2 11\\r\\n', 'output': ['NO']}, {'input': '5 7\\r\\n', 'output': ['YES']}, {'input': '47 50\\r\\n', 'output': ['NO']}, {'input': '31 33\\r\\n', 'output': ['NO']}, {'input': '5 11\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '41 43\\r\\n', 'output': ['YES']}, {'input': '19 23\\r\\n', 'output': ['YES']}, {'input': '7 8\\r\\n', 'output': ['NO']}, {'input': '31 33\\r\\n', 'output': ['NO']}, {'input': '3 7\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '7 8\\r\\n', 'output': ['NO']}, {'input': '3 9\\r\\n', 'output': ['NO']}, {'input': '3 4\\r\\n', 'output': ['NO']}, {'input': '3 6\\r\\n', 'output': ['NO']}, {'input': '37 41\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":75.0,"id":277,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"3 5\", \"4 8\"]","input_specification":"The only line of the input contains two integers n and t (1\u2009\u2264\u2009n\u2009\u2264\u200910,\u20090\u2009\u2264\u2009t\u2009\u2264\u200910\u2009000)\u00a0\u2014 the height of the pyramid and the number of seconds Vlad will be pouring champagne from the bottle.","src_uid":"b2b49b7f6e3279d435766085958fb69d","source_code":"import java.io.*;\nimport java.util.StringTokenizer;\n\n\/**\n * Created by sachin.goyal on 16\/05\/16.\n *\/\npublic class MainB {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class Task {\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n int n = in.nextInt();\n int t = in.nextInt();\n if(t == 0){\n out.print(0);\n return;\n }\n double[][] ans = new double[11][11];\n for(int i=0;i=0 && ans[i-1][left] > 1? (ans[i-1][left] -1)\/2 : 0;\n ans[i][j] += right<=i-1 && ans[i-1][right] > 1 ? (ans[i-1][right] -1)\/2 : 0;\n if(ans[i][j] >= 1d) finalAns++;\n }\n }\n out.print(finalAns);\n\n }\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}\n","sample_outputs":"[\"4\", \"6\"]","lang_cluster":"Java","notes":"NoteIn the first sample, the glasses full after 5 seconds are: the top glass, both glasses on the second level and the middle glass at the bottom level. Left and right glasses of the bottom level will be half-empty.","output_specification":"Print the single integer\u00a0\u2014 the number of completely full glasses after t seconds.","description":"Mary has just graduated from one well-known University and is now attending celebration party. Students like to dream of a beautiful life, so they used champagne glasses to construct a small pyramid. The height of the pyramid is n. The top level consists of only 1 glass, that stands on 2 glasses on the second level (counting from the top), then 3 glasses on the third level and so on.The bottom level consists of n glasses.Vlad has seen in the movies many times how the champagne beautifully flows from top levels to bottom ones, filling all the glasses simultaneously. So he took a bottle and started to pour it in the glass located at the top of the pyramid.Each second, Vlad pours to the top glass the amount of champagne equal to the size of exactly one glass. If the glass is already full, but there is some champagne flowing in it, then it pours over the edge of the glass and is equally distributed over two glasses standing under. If the overflowed glass is at the bottom level, then the champagne pours on the table. For the purpose of this problem we consider that champagne is distributed among pyramid glasses immediately. Vlad is interested in the number of completely full glasses if he stops pouring champagne in t seconds.Pictures below illustrate the pyramid consisting of three levels. ","human_testcases":"[{\"input\": \"3 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 10000\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"1 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 1022\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 1023\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"10 1024\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 200\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 128\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"8 198\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 100\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 10000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 7\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 12\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 15\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 14\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4 16\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 999\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 31\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"5 30\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"5 28\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"5 25\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"5 15\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"5 32\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"5 9999\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"5 14\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"6 63\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"6 62\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 61\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 52\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 31\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 32\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 39\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"6 15\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"6 14\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"6 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6 7653\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"7 127\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"6 64\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"7 126\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 125\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 120\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 98\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 110\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 65\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 63\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 15\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"7 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 83\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"7 214\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"8 2555\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"8 257\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"8 256\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"8 255\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"8 254\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 253\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 251\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 240\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 128\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 127\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"8 100\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"8 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 10000\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"8 94\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"8 33\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"9 10000\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"9 513\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"9 512\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"9 511\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"9 510\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"9 255\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"9 256\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"9 254\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"9 253\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"9 200\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"9 100\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"9 150\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"10 9999\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"10 1025\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"10 1021\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 512\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 689\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 754\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 985\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 255\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"10 256\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"10 254\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"10 153\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"10 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 63\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"10 64\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"10 126\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"10 127\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"10 128\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"10 55\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"10 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10 37\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"10 68\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"3 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 23\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 2\\r\\n', 'output': ['1']}, {'input': '9 256\\r\\n', 'output': ['43']}, {'input': '7 214\\r\\n', 'output': ['28']}, {'input': '10 153\\r\\n', 'output': ['47']}, {'input': '9 511\\r\\n', 'output': ['45']}]","human_sample_testcases_2":"[{'input': '10 1023\\r\\n', 'output': ['55']}, {'input': '7 120\\r\\n', 'output': ['26']}, {'input': '10 512\\r\\n', 'output': ['53']}, {'input': '5 9999\\r\\n', 'output': ['15']}, {'input': '9 254\\r\\n', 'output': ['41']}]","human_sample_testcases_3":"[{'input': '9 253\\r\\n', 'output': ['41']}, {'input': '5 30\\r\\n', 'output': ['13']}, {'input': '10 5\\r\\n', 'output': ['4']}, {'input': '10 127\\r\\n', 'output': ['47']}, {'input': '6 52\\r\\n', 'output': ['19']}]","human_sample_testcases_4":"[{'input': '6 32\\r\\n', 'output': ['19']}, {'input': '10 153\\r\\n', 'output': ['47']}, {'input': '9 512\\r\\n', 'output': ['45']}, {'input': '5 31\\r\\n', 'output': ['15']}, {'input': '7 128\\r\\n', 'output': ['28']}]","human_sample_testcases_5":"[{'input': '8 254\\r\\n', 'output': ['34']}, {'input': '5 30\\r\\n', 'output': ['13']}, {'input': '3 6\\r\\n', 'output': ['4']}, {'input': '7 127\\r\\n', 'output': ['28']}, {'input': '10 68\\r\\n', 'output': ['41']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":90.48,"human_sample_line_coverage_2":90.48,"human_sample_line_coverage_3":90.48,"human_sample_line_coverage_4":90.48,"human_sample_line_coverage_5":90.48,"human_sample_branch_coverage_1":95.0,"human_sample_branch_coverage_2":95.0,"human_sample_branch_coverage_3":95.0,"human_sample_branch_coverage_4":95.0,"human_sample_branch_coverage_5":95.0,"id":278,"human_sample_pass_rate":100.0,"human_sample_line_coverage":90.48,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"3\\n0 2 1\", \"2\\n1 1\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$1 \\leq n \\leq 100$$$)\u00a0\u2014 the number of floors. The second line contains $$$n$$$ integers $$$a_1, a_2, \\ldots, a_n$$$ ($$$0 \\leq a_i \\leq 100$$$)\u00a0\u2014 the number of people on each floor.","src_uid":"a5002ddf9e792cb4b4685e630f1e1b8f","source_code":"\/* package whatever; \/\/ don't place package name! *\/\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n\/* Name of the class has to be \"Main\" only if the class is public. *\/\npublic class Ideone\n{\n public static void main (String[] args) throws java.lang.Exception\n {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int arr[] = new int[n];\n for(int i = 0 ; i < n ;++i) {\n arr[i] = scanner.nextInt();\n }\n\n int finalCount = Integer.MAX_VALUE;\n for(int maxPos = 0; maxPos < n ;++maxPos) {\n int totalCount = 0;\n for (int i = 0; i < n; ++i) {\n int singleVal = 2 * Math.abs(maxPos - i) + 2 * i + 2 * maxPos;\n totalCount += (arr[i] * singleVal);\n }\n if(finalCount > totalCount) {\n finalCount = totalCount;\n }\n }\n\n System.out.println(finalCount);\n }\n}","sample_outputs":"[\"16\", \"4\"]","lang_cluster":"Java","notes":"NoteIn the first example, the answer can be achieved by choosing the second floor as the $$$x$$$-th floor. Each person from the second floor (there are two of them) would spend $$$4$$$ units of electricity per day ($$$2$$$ to get down and $$$2$$$ to get up), and one person from the third would spend $$$8$$$ units of electricity per day ($$$4$$$ to get down and $$$4$$$ to get up). $$$4 \\cdot 2 + 8 \\cdot 1 = 16$$$.In the second example, the answer can be achieved by choosing the first floor as the $$$x$$$-th floor.","output_specification":"In a single line, print the answer to the problem\u00a0\u2014 the minimum number of electricity units.","description":"The Fair Nut lives in $$$n$$$ story house. $$$a_i$$$ people live on the $$$i$$$-th floor of the house. Every person uses elevator twice a day: to get from the floor where he\/she lives to the ground (first) floor and to get from the first floor to the floor where he\/she lives, when he\/she comes back home in the evening. It was decided that elevator, when it is not used, will stay on the $$$x$$$-th floor, but $$$x$$$ hasn't been chosen yet. When a person needs to get from floor $$$a$$$ to floor $$$b$$$, elevator follows the simple algorithm: Moves from the $$$x$$$-th floor (initially it stays on the $$$x$$$-th floor) to the $$$a$$$-th and takes the passenger. Moves from the $$$a$$$-th floor to the $$$b$$$-th floor and lets out the passenger (if $$$a$$$ equals $$$b$$$, elevator just opens and closes the doors, but still comes to the floor from the $$$x$$$-th floor). Moves from the $$$b$$$-th floor back to the $$$x$$$-th. The elevator never transposes more than one person and always goes back to the floor $$$x$$$ before transposing a next passenger. The elevator spends one unit of electricity to move between neighboring floors. So moving from the $$$a$$$-th floor to the $$$b$$$-th floor requires $$$|a - b|$$$ units of electricity.Your task is to help Nut to find the minimum number of electricity units, that it would be enough for one day, by choosing an optimal the $$$x$$$-th floor. Don't forget than elevator initially stays on the $$$x$$$-th floor. ","human_testcases":"[{\"input\": \"3\\r\\n0 2 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"2\\r\\n1 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n1 3 3\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"3\\r\\n3 2 3\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"5\\r\\n2 10 6 3 1\\r\\n\", \"output\": [\"140\"]}, {\"input\": \"5\\r\\n6 4 10 5 10\\r\\n\", \"output\": [\"316\"]}, {\"input\": \"100\\r\\n23 39 85 46 97 72 41 70 37 18 8 40 33 61 12 79 51 78 61 66 85 97 78 14 70 47 100 40 15 40 61 52 19 30 14 91 82 56 10 6 68 24 97 61 31 78 18 45 88 6 37 38 51 86 37 42 58 30 79 56 50 14 61 18 13 20 57 3 93 15 24 74 32 21 71 93 2 66 25 75 75 10 86 82 30 31 6 49 15 33 100 35 1 96 87 83 29 21 41 22\\r\\n\", \"output\": [\"921748\"]}, {\"input\": \"100\\r\\n47 79 39 24 51 37 29 54 96 100 48 80 32 98 27 88 73 36 79 11 33 78 87 94 27 55 21 1 24 6 83 27 7 66 27 91 12 35 43 17 57 46 78 19 20 61 29 89 6 73 51 82 48 14 33 81 37 51 34 64 57 19 1 96 49 81 34 27 84 49 72 56 47 37 50 23 58 53 78 82 25 66 13 10 61 3 73 96 64 59 38 48 12 61 96 81 37 80 83 39\\r\\n\", \"output\": [\"1005500\"]}, {\"input\": \"3\\r\\n2 1 3\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"3\\r\\n1 1 2\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"3\\r\\n3 1 1\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"3\\r\\n4 5 5\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"3\\r\\n2 1 4\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"3\\r\\n1 2 2\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"3\\r\\n5 2 2\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"3\\r\\n3 2 5\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"3\\r\\n10 1 8\\r\\n\", \"output\": [\"68\"]}, {\"input\": \"3\\r\\n4 2 5\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"3\\r\\n8 6 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"3\\r\\n2 7 4\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"3\\r\\n10 5 8\\r\\n\", \"output\": [\"84\"]}, {\"input\": \"5\\r\\n4 9 4 2 6\\r\\n\", \"output\": [\"188\"]}, {\"input\": \"5\\r\\n8 1 3 4 9\\r\\n\", \"output\": [\"220\"]}, {\"input\": \"5\\r\\n6 1 1 8 3\\r\\n\", \"output\": [\"156\"]}, {\"input\": \"100\\r\\n71 23 84 98 8 14 4 42 56 83 87 28 22 32 50 5 96 90 1 59 74 56 96 77 88 71 38 62 36 85 1 97 98 98 32 99 42 6 81 20 49 57 71 66 9 45 41 29 28 32 68 38 29 35 29 19 27 76 85 68 68 41 32 78 72 38 19 55 83 83 25 46 62 48 26 53 14 39 31 94 84 22 39 34 96 63 37 42 6 78 76 64 16 26 6 79 53 24 29 63\\r\\n\", \"output\": [\"971496\"]}, {\"input\": \"100\\r\\n95 72 38 75 62 87 87 30 11 65 35 75 16 73 65 23 18 48 19 4 22 42 14 60 49 83 59 15 60 51 27 80 97 35 37 100 64 81 22 38 54 71 52 20 5 20 52 73 42 98 78 86 26 55 25 57 14 97 36 81 71 54 71 51 3 4 8 74 82 21 74 29 81 52 1 87 75 22 76 2 27 79 73 61 39 39 9 89 60 1 14 77 27 87 11 70 61 75 63 75\\r\\n\", \"output\": [\"997408\"]}, {\"input\": \"100\\r\\n23 20 87 49 15 59 70 18 67 47 79 19 7 6 88 40 33 7 37 45 75 16 19 43 6 96 77 79 69 21 54 46 84 67 49 4 97 52 60 45 47 90 33 79 94 4 64 13 56 57 96 33 7 83 17 92 5 18 83 93 87 63 10 33 38 65 85 98 73 47 19 15 92 64 72 18 23 9 33 18 81 35 100 85 70 7 85 35 9 19 44 89 34 48 20 64 70 26 5 95\\r\\n\", \"output\": [\"991208\"]}, {\"input\": \"100\\r\\n47 64 41 30 77 36 50 10 22 29 18 59 93 35 3 61 55 57 63 94 15 97 28 14 63 12 2 36 89 91 72 24 75 3 54 8 23 27 94 56 48 4 26 33 91 92 75 53 74 24 18 85 97 8 9 26 96 39 39 97 90 80 45 11 69 30 70 22 76 81 76 1 8 75 48 48 83 92 86 26 32 83 34 9 4 71 45 78 59 34 82 2 45 13 37 54 86 74 39 12\\r\\n\", \"output\": [\"981464\"]}, {\"input\": \"100\\r\\n71 5 95 8 30 9 29 94 82 12 62 2 87 76 22 70 82 19 82 38 64 83 38 98 24 20 23 89 97 62 98 95 70 32 63 16 57 1 35 70 40 15 11 88 79 75 83 97 100 78 27 37 90 32 13 64 83 64 94 9 93 89 84 89 92 88 58 53 67 15 21 96 35 87 23 78 39 75 31 30 86 43 60 29 47 42 16 28 9 57 19 14 49 74 46 52 94 21 81 36\\r\\n\", \"output\": [\"1066920\"]}, {\"input\": \"100\\r\\n95 49 40 82 80 78 4 86 37 94 1 46 85 6 41 87 100 69 100 87 12 61 55 81 81 32 40 54 22 32 24 73 61 68 76 16 83 76 73 77 41 37 88 46 72 63 2 37 14 49 45 81 75 56 10 99 73 85 41 17 5 2 16 75 28 53 35 77 66 53 69 82 50 95 2 12 95 62 84 46 29 95 91 49 78 14 88 75 58 83 49 31 56 43 55 39 10 72 23 60\\r\\n\", \"output\": [\"1063232\"]}, {\"input\": \"100\\r\\n23 94 2 59 41 51 92 74 92 76 37 98 76 47 60 4 22 32 22 32 57 39 68 60 38 41 61 7 34 98 42 44 52 100 81 24 16 51 10 84 34 52 73 100 69 38 14 77 32 4 59 37 68 81 6 37 52 6 96 22 12 23 63 57 59 18 20 1 57 87 22 68 65 7 70 39 55 49 41 54 84 51 17 73 13 78 52 10 4 6 87 47 67 8 65 41 19 24 65 76\\r\\n\", \"output\": [\"902296\"]}, {\"input\": \"100\\r\\n94 69 43 36 54 93 30 74 56 95 70 49 11 36 57 30 59 3 52 59 90 82 39 67 32 8 80 64 8 65 51 48 89 90 35 4 54 66 96 68 90 30 4 13 97 41 90 85 17 45 94 31 58 4 39 76 95 92 59 67 46 96 55 82 64 20 20 83 46 37 15 60 37 79 45 47 63 73 76 31 52 36 32 49 26 61 91 31 25 62 90 65 65 5 94 7 15 97 88 68\\r\\n\", \"output\": [\"1077508\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3\\r\\n4 2 5\\r\\n', 'output': ['48']}, {'input': '100\\r\\n95 49 40 82 80 78 4 86 37 94 1 46 85 6 41 87 100 69 100 87 12 61 55 81 81 32 40 54 22 32 24 73 61 68 76 16 83 76 73 77 41 37 88 46 72 63 2 37 14 49 45 81 75 56 10 99 73 85 41 17 5 2 16 75 28 53 35 77 66 53 69 82 50 95 2 12 95 62 84 46 29 95 91 49 78 14 88 75 58 83 49 31 56 43 55 39 10 72 23 60\\r\\n', 'output': ['1063232']}, {'input': '5\\r\\n6 4 10 5 10\\r\\n', 'output': ['316']}, {'input': '3\\r\\n8 6 1\\r\\n', 'output': ['32']}, {'input': '3\\r\\n1 1 2\\r\\n', 'output': ['20']}]","human_sample_testcases_2":"[{'input': '100\\r\\n23 39 85 46 97 72 41 70 37 18 8 40 33 61 12 79 51 78 61 66 85 97 78 14 70 47 100 40 15 40 61 52 19 30 14 91 82 56 10 6 68 24 97 61 31 78 18 45 88 6 37 38 51 86 37 42 58 30 79 56 50 14 61 18 13 20 57 3 93 15 24 74 32 21 71 93 2 66 25 75 75 10 86 82 30 31 6 49 15 33 100 35 1 96 87 83 29 21 41 22\\r\\n', 'output': ['921748']}, {'input': '3\\r\\n8 6 1\\r\\n', 'output': ['32']}, {'input': '3\\r\\n2 1 4\\r\\n', 'output': ['36']}, {'input': '100\\r\\n23 20 87 49 15 59 70 18 67 47 79 19 7 6 88 40 33 7 37 45 75 16 19 43 6 96 77 79 69 21 54 46 84 67 49 4 97 52 60 45 47 90 33 79 94 4 64 13 56 57 96 33 7 83 17 92 5 18 83 93 87 63 10 33 38 65 85 98 73 47 19 15 92 64 72 18 23 9 33 18 81 35 100 85 70 7 85 35 9 19 44 89 34 48 20 64 70 26 5 95\\r\\n', 'output': ['991208']}, {'input': '100\\r\\n47 79 39 24 51 37 29 54 96 100 48 80 32 98 27 88 73 36 79 11 33 78 87 94 27 55 21 1 24 6 83 27 7 66 27 91 12 35 43 17 57 46 78 19 20 61 29 89 6 73 51 82 48 14 33 81 37 51 34 64 57 19 1 96 49 81 34 27 84 49 72 56 47 37 50 23 58 53 78 82 25 66 13 10 61 3 73 96 64 59 38 48 12 61 96 81 37 80 83 39\\r\\n', 'output': ['1005500']}]","human_sample_testcases_3":"[{'input': '3\\r\\n1 2 2\\r\\n', 'output': ['24']}, {'input': '3\\r\\n4 5 5\\r\\n', 'output': ['60']}, {'input': '3\\r\\n10 5 8\\r\\n', 'output': ['84']}, {'input': '3\\r\\n0 2 1\\r\\n', 'output': ['16']}, {'input': '5\\r\\n8 1 3 4 9\\r\\n', 'output': ['220']}]","human_sample_testcases_4":"[{'input': '3\\r\\n2 1 3\\r\\n', 'output': ['28']}, {'input': '5\\r\\n8 1 3 4 9\\r\\n', 'output': ['220']}, {'input': '100\\r\\n95 72 38 75 62 87 87 30 11 65 35 75 16 73 65 23 18 48 19 4 22 42 14 60 49 83 59 15 60 51 27 80 97 35 37 100 64 81 22 38 54 71 52 20 5 20 52 73 42 98 78 86 26 55 25 57 14 97 36 81 71 54 71 51 3 4 8 74 82 21 74 29 81 52 1 87 75 22 76 2 27 79 73 61 39 39 9 89 60 1 14 77 27 87 11 70 61 75 63 75\\r\\n', 'output': ['997408']}, {'input': '5\\r\\n4 9 4 2 6\\r\\n', 'output': ['188']}, {'input': '3\\r\\n3 2 5\\r\\n', 'output': ['48']}]","human_sample_testcases_5":"[{'input': '3\\r\\n5 2 2\\r\\n', 'output': ['24']}, {'input': '3\\r\\n8 6 1\\r\\n', 'output': ['32']}, {'input': '100\\r\\n95 72 38 75 62 87 87 30 11 65 35 75 16 73 65 23 18 48 19 4 22 42 14 60 49 83 59 15 60 51 27 80 97 35 37 100 64 81 22 38 54 71 52 20 5 20 52 73 42 98 78 86 26 55 25 57 14 97 36 81 71 54 71 51 3 4 8 74 82 21 74 29 81 52 1 87 75 22 76 2 27 79 73 61 39 39 9 89 60 1 14 77 27 87 11 70 61 75 63 75\\r\\n', 'output': ['997408']}, {'input': '3\\r\\n3 2 3\\r\\n', 'output': ['32']}, {'input': '5\\r\\n8 1 3 4 9\\r\\n', 'output': ['220']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":279,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\\n1 -2 0\", \"6\\n16 23 16 15 42 8\"]","input_specification":"The first line contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the number of elements in a. The second line contains n integers a1, a2, ..., an (\u2009-\u2009100\u2009\u2264\u2009ai\u2009\u2264\u2009100) \u2014 the elements of sequence a.","src_uid":"4b5d14833f9b51bfd336cc0e661243a5","source_code":"import java.util.Scanner;\n\npublic class a {\n\tpublic static void main(String[]args) {\n\t\tScanner input=new Scanner (System.in);\n\t\tint n=input.nextInt();\n\t int b=0;\n\t int c=0;\n\t int []x=new int [101];\n\t int k=0;\n\t while (k=0) {\n\t \tfor (int q=0;q=0)\n\t \t\t\tb=b+x[w];\n\t \t\telse c=c+x[w];\n\t \t}\n\t \t\t\n\t }\n\t System.out.print(b-c);\n\t}\n\n}","sample_outputs":"[\"3\", \"120\"]","lang_cluster":"Java","notes":"NoteIn the first example we may choose b\u2009=\u2009{1,\u20090}, c\u2009=\u2009{\u2009-\u20092}. Then B\u2009=\u20091, C\u2009=\u2009\u2009-\u20092, B\u2009-\u2009C\u2009=\u20093.In the second example we choose b\u2009=\u2009{16,\u200923,\u200916,\u200915,\u200942,\u20098}, c\u2009=\u2009{} (an empty sequence). Then B\u2009=\u2009120, C\u2009=\u20090, B\u2009-\u2009C\u2009=\u2009120.","output_specification":"Print the maximum possible value of B\u2009-\u2009C, where B is the sum of elements of sequence b, and C is the sum of elements of sequence c.","description":"You are given a sequence a consisting of n integers. You may partition this sequence into two sequences b and c in such a way that every element belongs exactly to one of these sequences. Let B be the sum of elements belonging to b, and C be the sum of elements belonging to c (if some of these sequences is empty, then its sum is 0). What is the maximum possible value of B\u2009-\u2009C?","human_testcases":"[{\"input\": \"3\\r\\n1 -2 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n16 23 16 15 42 8\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"1\\r\\n-1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n-100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100 -100\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"2\\r\\n-1 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-2 0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"12\\r\\n-1 -2 -3 4 4 -6 -6 56 3 3 -3 3\\r\\n\", \"output\": [\"94\"]}, {\"input\": \"4\\r\\n1 -1 1 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4\\r\\n100 -100 100 -100\\r\\n\", \"output\": [\"400\"]}, {\"input\": \"3\\r\\n-2 -5 10\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"5\\r\\n1 -2 3 -4 5\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"3\\r\\n-100 100 -100\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"6\\r\\n1 -1 1 -1 1 -1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"6\\r\\n2 -2 2 -2 2 -2\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"9\\r\\n12 93 -2 0 0 0 3 -3 -9\\r\\n\", \"output\": [\"122\"]}, {\"input\": \"6\\r\\n-1 2 4 -5 -3 55\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"6\\r\\n-12 8 68 -53 1 -15\\r\\n\", \"output\": [\"157\"]}, {\"input\": \"2\\r\\n-2 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n100 -100 100\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"5\\r\\n100 100 -1 -100 2\\r\\n\", \"output\": [\"303\"]}, {\"input\": \"6\\r\\n-5 -4 -3 -2 -1 0\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"6\\r\\n4 4 4 -3 -3 2\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"2\\r\\n-1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1\\r\\n100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"5\\r\\n-1 -2 3 1 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5\\r\\n100 -100 100 -100 100\\r\\n\", \"output\": [\"500\"]}, {\"input\": \"5\\r\\n1 -1 1 -1 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"4\\r\\n0 0 0 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n100 -100 -1 2 100\\r\\n\", \"output\": [\"303\"]}, {\"input\": \"2\\r\\n75 0\\r\\n\", \"output\": [\"75\"]}, {\"input\": \"4\\r\\n55 56 -59 -58\\r\\n\", \"output\": [\"228\"]}, {\"input\": \"2\\r\\n9 71\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"2\\r\\n9 70\\r\\n\", \"output\": [\"79\"]}, {\"input\": \"2\\r\\n9 69\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"2\\r\\n100 -100\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"4\\r\\n-9 4 -9 5\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"42\\r\\n91 -27 -79 -56 80 -93 -23 10 80 94 61 -89 -64 81 34 99 31 -32 -69 92 79 -9 73 66 -8 64 99 99 58 -19 -40 21 1 -33 93 -23 -62 27 55 41 57 36\\r\\n\", \"output\": [\"2348\"]}, {\"input\": \"7\\r\\n-1 2 2 2 -1 2 -1\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"6\\r\\n-12 8 17 -69 7 -88\\r\\n\", \"output\": [\"201\"]}, {\"input\": \"3\\r\\n1 -2 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6\\r\\n-2 3 -4 5 6 -1\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"2\\r\\n-5 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4\\r\\n2 2 -2 4\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"68\\r\\n21 47 -75 -25 64 83 83 -21 89 24 43 44 -35 34 -42 92 -96 -52 -66 64 14 -87 25 -61 -78 83 -96 -18 95 83 -93 -28 75 49 87 65 -93 -69 -2 95 -24 -36 -61 -71 88 -53 -93 -51 -81 -65 -53 -46 -56 6 65 58 19 100 57 61 -53 44 -58 48 -8 80 -88 72\\r\\n\", \"output\": [\"3991\"]}, {\"input\": \"5\\r\\n5 5 -10 -1 1\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"3\\r\\n-1 2 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"76\\r\\n57 -38 -48 -81 93 -32 96 55 -44 2 38 -46 42 64 71 -73 95 31 -39 -62 -1 75 -17 57 28 52 12 -11 82 -84 59 -86 73 -97 34 97 -57 -85 -6 39 -5 -54 95 24 -44 35 -18 9 91 7 -22 -61 -80 54 -40 74 -90 15 -97 66 -52 -49 -24 65 21 -93 -29 -24 -4 -1 76 -93 7 -55 -53 1\\r\\n\", \"output\": [\"3787\"]}, {\"input\": \"5\\r\\n-1 -2 1 2 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4\\r\\n2 2 -2 -2\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"6\\r\\n100 -100 100 -100 100 -100\\r\\n\", \"output\": [\"600\"]}, {\"input\": \"100\\r\\n-59 -33 34 0 69 24 -22 58 62 -36 5 45 -19 -73 61 -9 95 42 -73 -64 91 -96 2 53 -8 82 -79 16 18 -5 -53 26 71 38 -31 12 -33 -1 -65 -6 3 -89 22 33 -27 -36 41 11 -47 -32 47 -56 -38 57 -63 -41 23 41 29 78 16 -65 90 -58 -12 6 -60 42 -36 -52 -54 -95 -10 29 70 50 -94 1 93 48 -71 -77 -16 54 56 -60 66 76 31 8 44 -61 -74 23 37 38 18 -18 29 41\\r\\n\", \"output\": [\"4362\"]}, {\"input\": \"2\\r\\n-1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n1 -2 100\\r\\n\", \"output\": [\"103\"]}, {\"input\": \"5\\r\\n1 -2 3 1 2\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10\\r\\n100 -10 -100 10 10 10 10 10 10 10\\r\\n\", \"output\": [\"280\"]}, {\"input\": \"4\\r\\n2 0 -2 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4\\r\\n3 -3 1 -1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n1 -1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n2 5 -2 4\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"2\\r\\n-2 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n1 -2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n-1 -2 1 1 -1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4\\r\\n-2 0 2 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"8\\r\\n-42 7 87 -16 -5 65 -88 1\\r\\n\", \"output\": [\"311\"]}, {\"input\": \"3\\r\\n1 -3 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n-1 2 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"18\\r\\n-21 12 65 66 -24 62 82 35 -45 -47 28 37 5 -32 22 -14 -69 -95\\r\\n\", \"output\": [\"761\"]}, {\"input\": \"4\\r\\n-1 1 -1 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n-1 2 1 1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n1 1 1\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\n1 -1 1 -1\\r\\n', 'output': ['4']}, {'input': '5\\r\\n100 -100 -1 2 100\\r\\n', 'output': ['303']}, {'input': '2\\r\\n9 69\\r\\n', 'output': ['78']}, {'input': '4\\r\\n2 5 -2 4\\r\\n', 'output': ['13']}, {'input': '1\\r\\n-1\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '6\\r\\n4 4 4 -3 -3 2\\r\\n', 'output': ['20']}, {'input': '1\\r\\n-1\\r\\n', 'output': ['1']}, {'input': '2\\r\\n9 71\\r\\n', 'output': ['80']}, {'input': '5\\r\\n5 5 -10 -1 1\\r\\n', 'output': ['22']}, {'input': '6\\r\\n-1 2 4 -5 -3 55\\r\\n', 'output': ['70']}]","human_sample_testcases_3":"[{'input': '3\\r\\n1 1 1\\r\\n', 'output': ['3']}, {'input': '4\\r\\n0 0 0 -1\\r\\n', 'output': ['1']}, {'input': '6\\r\\n-5 -4 -3 -2 -1 0\\r\\n', 'output': ['15']}, {'input': '3\\r\\n-2 -5 10\\r\\n', 'output': ['17']}, {'input': '5\\r\\n-1 -2 3 1 2\\r\\n', 'output': ['9']}]","human_sample_testcases_4":"[{'input': '6\\r\\n-2 3 -4 5 6 -1\\r\\n', 'output': ['21']}, {'input': '3\\r\\n1 1 1\\r\\n', 'output': ['3']}, {'input': '2\\r\\n-5 1\\r\\n', 'output': ['6']}, {'input': '4\\r\\n1 -1 1 -1\\r\\n', 'output': ['4']}, {'input': '6\\r\\n4 4 4 -3 -3 2\\r\\n', 'output': ['20']}]","human_sample_testcases_5":"[{'input': '18\\r\\n-21 12 65 66 -24 62 82 35 -45 -47 28 37 5 -32 22 -14 -69 -95\\r\\n', 'output': ['761']}, {'input': '5\\r\\n1 -2 3 1 2\\r\\n', 'output': ['9']}, {'input': '3\\r\\n-1 2 3\\r\\n', 'output': ['6']}, {'input': '4\\r\\n2 2 -2 4\\r\\n', 'output': ['10']}, {'input': '100\\r\\n-59 -33 34 0 69 24 -22 58 62 -36 5 45 -19 -73 61 -9 95 42 -73 -64 91 -96 2 53 -8 82 -79 16 18 -5 -53 26 71 38 -31 12 -33 -1 -65 -6 3 -89 22 33 -27 -36 41 11 -47 -32 47 -56 -38 57 -63 -41 23 41 29 78 16 -65 90 -58 -12 6 -60 42 -36 -52 -54 -95 -10 29 70 50 -94 1 93 48 -71 -77 -16 54 56 -60 66 76 31 8 44 -61 -74 23 37 38 18 -18 29 41\\r\\n', 'output': ['4362']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":86.96,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":78.57,"id":280,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.392,"human_sample_branch_coverage":95.714} {"sample_inputs":"[\"12345\"]","input_specification":"The only line of the input contains a positive integer five digit number for which the activation code should be found.","src_uid":"51b1c216948663fff721c28d131bf18f","source_code":"import java.util.Scanner;\n\npublic class Problem_11 {\n static long p = 100000;\n\n public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String s = input.nextLine();\n \/\/13542\n long n = Long.valueOf(s.substring(0, 1) + s.substring(2, 3) + s.substring(4, 5) + s.substring(3, 4) + s.substring\n (1,2));\n\n System.out.printf(\"%05d\", (((((n * n * n) % p) * n) % p) * n) % p);\n }\n}\n","sample_outputs":"[\"71232\"]","lang_cluster":"Java","notes":null,"output_specification":"Output exactly 5 digits without spaces between them \u2014 the found activation code of the program.","description":"The protection of a popular program developed by one of IT City companies is organized the following way. After installation it outputs a random five digit number which should be sent in SMS to a particular phone number. In response an SMS activation code arrives.A young hacker Vasya disassembled the program and found the algorithm that transforms the shown number into the activation code. Note: it is clear that Vasya is a law-abiding hacker, and made it for a noble purpose \u2014 to show the developer the imperfection of their protection.The found algorithm looks the following way. At first the digits of the number are shuffled in the following order <first digit><third digit><fifth digit><fourth digit><second digit>. For example the shuffle of 12345 should lead to 13542. On the second stage the number is raised to the fifth power. The result of the shuffle and exponentiation of the number 12345 is 455\u00a0422\u00a0043\u00a0125\u00a0550\u00a0171\u00a0232. The answer is the 5 last digits of this result. For the number 12345 the answer should be 71232.Vasya is going to write a keygen program implementing this algorithm. Can you do the same?","human_testcases":"[{\"input\": \"12345\\r\\n\", \"output\": [\"71232\"]}, {\"input\": \"13542\\r\\n\", \"output\": [\"84443\"]}, {\"input\": \"71232\\r\\n\", \"output\": [\"10151\"]}, {\"input\": \"11111\\r\\n\", \"output\": [\"36551\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"00000\"]}, {\"input\": \"99999\\r\\n\", \"output\": [\"99999\"]}, {\"input\": \"91537\\r\\n\", \"output\": [\"27651\"]}, {\"input\": \"70809\\r\\n\", \"output\": [\"00000\"]}, {\"input\": \"41675\\r\\n\", \"output\": [\"61851\"]}, {\"input\": \"32036\\r\\n\", \"output\": [\"82432\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '13542\\r\\n', 'output': ['84443']}, {'input': '10000\\r\\n', 'output': ['00000']}, {'input': '12345\\r\\n', 'output': ['71232']}, {'input': '41675\\r\\n', 'output': ['61851']}, {'input': '11111\\r\\n', 'output': ['36551']}]","human_sample_testcases_2":"[{'input': '71232\\r\\n', 'output': ['10151']}, {'input': '32036\\r\\n', 'output': ['82432']}, {'input': '91537\\r\\n', 'output': ['27651']}, {'input': '12345\\r\\n', 'output': ['71232']}, {'input': '70809\\r\\n', 'output': ['00000']}]","human_sample_testcases_3":"[{'input': '71232\\r\\n', 'output': ['10151']}, {'input': '70809\\r\\n', 'output': ['00000']}, {'input': '10000\\r\\n', 'output': ['00000']}, {'input': '41675\\r\\n', 'output': ['61851']}, {'input': '12345\\r\\n', 'output': ['71232']}]","human_sample_testcases_4":"[{'input': '70809\\r\\n', 'output': ['00000']}, {'input': '13542\\r\\n', 'output': ['84443']}, {'input': '91537\\r\\n', 'output': ['27651']}, {'input': '32036\\r\\n', 'output': ['82432']}, {'input': '99999\\r\\n', 'output': ['99999']}]","human_sample_testcases_5":"[{'input': '71232\\r\\n', 'output': ['10151']}, {'input': '41675\\r\\n', 'output': ['61851']}, {'input': '32036\\r\\n', 'output': ['82432']}, {'input': '70809\\r\\n', 'output': ['00000']}, {'input': '91537\\r\\n', 'output': ['27651']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":281,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\\n11 23\", \"5\\n01 07\"]","input_specification":"The first line contains a single integer x (1\u2009\u2264\u2009x\u2009\u2264\u200960). The second line contains two two-digit integers, hh and mm (00\u2009\u2264\u2009hh\u2009\u2264\u200923,\u200900\u2009\u2264\u2009mm\u2009\u2264\u200959).","src_uid":"5ecd569e02e0164a5da9ff549fca3ceb","source_code":"import java.util.*;\npublic class JamieAndAlarmSnooze {\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint x=sc.nextInt();\n\t\tint h=sc.nextInt();\n\t\tint m=sc.nextInt();\n\t\tint c=0;\n\t\twhile (h%10!=7 && m%10!=7)\n\t\t{\n\t\t\tm-=x;\n\t\t\tc++;\n\t\t\tif (m<0) \n\t\t\t{\n\t\t\t\th--;\n\t\t\t\tm+=60;\n\t\t\t}\n\t\t\t\t\n\t\t\tif (h<0) \n\t\t\t\th+=24;\n\t\t}\n\t\t\n\t\tSystem.out.println(c);\n\t\tsc.close();\n\t}\n}\n","sample_outputs":"[\"2\", \"0\"]","lang_cluster":"Java","notes":"NoteIn the first sample, Jamie needs to wake up at 11:23. So, he can set his alarm at 11:17. He would press the snooze button when the alarm rings at 11:17 and at 11:20.In the second sample, Jamie can set his alarm at exactly at 01:07 which is lucky.","output_specification":"Print the minimum number of times he needs to press the button.","description":"Jamie loves sleeping. One day, he decides that he needs to wake up at exactly hh:\u2009mm. However, he hates waking up, so he wants to make waking up less painful by setting the alarm at a lucky time. He will then press the snooze button every x minutes until hh:\u2009mm is reached, and only then he will wake up. He wants to know what is the smallest number of times he needs to press the snooze button.A time is considered lucky if it contains a digit '7'. For example, 13:\u200907 and 17:\u200927 are lucky, while 00:\u200948 and 21:\u200934 are not lucky.Note that it is not necessary that the time set for the alarm and the wake-up time are on the same day. It is guaranteed that there is a lucky time Jamie can set so that he can wake at hh:\u2009mm.Formally, find the smallest possible non-negative integer y such that the time representation of the time x\u00b7y minutes before hh:\u2009mm contains the digit '7'.Jamie uses 24-hours clock, so after 23:\u200959 comes 00:\u200900.","human_testcases":"[{\"input\": \"3\\r\\n11 23\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n01 07\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"34\\r\\n09 24\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n14 37\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"14\\r\\n19 54\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"42\\r\\n15 44\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"46\\r\\n02 43\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"14\\r\\n06 41\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"26\\r\\n04 58\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"54\\r\\n16 47\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"38\\r\\n20 01\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"11\\r\\n02 05\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"55\\r\\n22 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"23\\r\\n10 08\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"23\\r\\n23 14\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"51\\r\\n03 27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"35\\r\\n15 25\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"3\\r\\n12 15\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"47\\r\\n00 28\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"31\\r\\n13 34\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"59\\r\\n17 32\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"25\\r\\n11 03\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"9\\r\\n16 53\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"53\\r\\n04 06\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"37\\r\\n00 12\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5\\r\\n13 10\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"50\\r\\n01 59\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"34\\r\\n06 13\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2\\r\\n18 19\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"46\\r\\n06 16\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"14\\r\\n03 30\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"40\\r\\n13 37\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24\\r\\n17 51\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\n14 57\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"52\\r\\n18 54\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"20\\r\\n15 52\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"20\\r\\n03 58\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"48\\r\\n07 11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"32\\r\\n04 01\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"60\\r\\n08 15\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"44\\r\\n20 20\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"55\\r\\n15 35\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"55\\r\\n03 49\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"23\\r\\n16 39\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"7\\r\\n20 36\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"35\\r\\n16 42\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"35\\r\\n05 56\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"3\\r\\n17 45\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"47\\r\\n05 59\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"15\\r\\n10 13\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"59\\r\\n06 18\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"34\\r\\n17 18\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18\\r\\n05 23\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"46\\r\\n17 21\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"30\\r\\n06 27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"14\\r\\n18 40\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"58\\r\\n22 54\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"26\\r\\n19 44\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10\\r\\n15 57\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"54\\r\\n20 47\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"22\\r\\n08 45\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"48\\r\\n18 08\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32\\r\\n07 06\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"60\\r\\n19 19\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"45\\r\\n07 25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"29\\r\\n12 39\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"13\\r\\n08 28\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"41\\r\\n21 42\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"41\\r\\n09 32\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9\\r\\n21 45\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"37\\r\\n10 43\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n20 50\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"47\\r\\n00 04\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15\\r\\n13 10\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"15\\r\\n17 23\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"43\\r\\n22 13\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"27\\r\\n10 26\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"55\\r\\n22 24\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"55\\r\\n03 30\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"24\\r\\n23 27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"52\\r\\n11 33\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"18\\r\\n22 48\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"1\\r\\n12 55\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n04 27\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n12 52\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n20 16\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1\\r\\n04 41\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n20 21\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n04 45\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n12 18\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n04 42\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1\\r\\n02 59\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n18 24\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n02 04\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n18 28\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n18 01\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n10 25\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n02 49\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n02 30\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1\\r\\n18 54\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1\\r\\n02 19\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n05 25\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"60\\r\\n23 55\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"60\\r\\n08 19\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n00 00\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"60\\r\\n08 24\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n16 13\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"60\\r\\n08 21\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n16 45\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"60\\r\\n08 26\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n08 50\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n05 21\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"60\\r\\n13 29\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"60\\r\\n05 18\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"60\\r\\n13 42\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"60\\r\\n05 07\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"60\\r\\n05 47\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"60\\r\\n21 55\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"60\\r\\n05 36\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"60\\r\\n21 08\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"60\\r\\n21 32\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"60\\r\\n16 31\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5\\r\\n00 00\\r\\n\", \"output\": [\"73\"]}, {\"input\": \"2\\r\\n06 58\\r\\n\", \"output\": [\"390\"]}, {\"input\": \"2\\r\\n00 00\\r\\n\", \"output\": [\"181\"]}, {\"input\": \"10\\r\\n00 00\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"60\\r\\n01 00\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"12\\r\\n00 06\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1\\r\\n00 01\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n00 05\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"60\\r\\n01 01\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"11\\r\\n18 11\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"60\\r\\n01 15\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10\\r\\n00 16\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"60\\r\\n00 59\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"30\\r\\n00 00\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"60\\r\\n01 05\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4\\r\\n00 03\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4\\r\\n00 00\\r\\n\", \"output\": [\"91\"]}, {\"input\": \"60\\r\\n00 01\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6\\r\\n00 03\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"13\\r\\n00 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n06 00\\r\\n\", \"output\": [\"145\"]}, {\"input\": \"60\\r\\n04 08\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"5\\r\\n01 55\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"8\\r\\n00 08\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"23\\r\\n18 23\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6\\r\\n00 06\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"59\\r\\n18 59\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n00 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10\\r\\n00 01\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"59\\r\\n00 00\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10\\r\\n18 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n00 01\\r\\n\", \"output\": [\"73\"]}, {\"input\": \"1\\r\\n00 00\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\n00 14\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"60\\r\\n03 00\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"60\\r\\n00 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n01 13\\r\\n\", \"output\": [\"87\"]}, {\"input\": \"30\\r\\n02 43\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"17\\r\\n00 08\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n00 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n00 05\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n18 05\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"30\\r\\n00 30\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"1\\r\\n00 06\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"55\\r\\n00 00\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8\\r\\n02 08\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"7\\r\\n00 00\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"6\\r\\n08 06\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"48\\r\\n06 24\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"8\\r\\n06 58\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"3\\r\\n12 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n01 06\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"2\\r\\n00 08\\r\\n\", \"output\": [\"185\"]}, {\"input\": \"3\\r\\n18 03\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n17 00\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"59\\r\\n00 48\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n12 01\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"55\\r\\n01 25\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2\\r\\n07 23\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\n01 10\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"2\\r\\n00 01\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"59\\r\\n00 01\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5\\r\\n00 02\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n01 02\\r\\n\", \"output\": [\"106\"]}, {\"input\": \"5\\r\\n00 06\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"42\\r\\n00 08\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"60\\r\\n01 20\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n06 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4\\r\\n00 01\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n00 06\\r\\n\", \"output\": [\"184\"]}, {\"input\": \"1\\r\\n00 57\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\n00 00\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"5\\r\\n08 40\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"58\\r\\n00 55\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n00 02\\r\\n\", \"output\": [\"182\"]}, {\"input\": \"1\\r\\n08 01\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n10 10\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"60\\r\\n01 11\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2\\r\\n07 00\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"15\\r\\n00 03\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"6\\r\\n04 34\\r\\n\", \"output\": [\"106\"]}, {\"input\": \"16\\r\\n00 16\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"2\\r\\n00 59\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"59\\r\\n00 08\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10\\r\\n03 10\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"3\\r\\n08 03\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"20\\r\\n06 11\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"4\\r\\n01 00\\r\\n\", \"output\": [\"106\"]}, {\"input\": \"38\\r\\n01 08\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"60\\r\\n00 06\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5\\r\\n12 00\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"6\\r\\n01 42\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"4\\r\\n00 04\\r\\n\", \"output\": [\"92\"]}, {\"input\": \"60\\r\\n04 05\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"1\\r\\n00 53\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5\\r\\n08 05\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"60\\r\\n18 45\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60\\r\\n06 23\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"6\\r\\n00 15\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"58\\r\\n00 06\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n06 44\\r\\n\", \"output\": [\"383\"]}, {\"input\": \"1\\r\\n08 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n06 58\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"59\\r\\n00 58\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n18 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50\\r\\n00 42\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30\\r\\n18 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"60\\r\\n21 59\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2\\r\\n10 52\\r\\n\", \"output\": [\"87\"]}, {\"input\": \"56\\r\\n00 00\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"16\\r\\n18 16\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n01 05\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"5\\r\\n05 00\\r\\n\", \"output\": [\"133\"]}, {\"input\": \"5\\r\\n23 59\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"7\\r\\n17 13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"58\\r\\n00 00\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"15\\r\\n00 07\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"59\\r\\n08 00\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"46\\r\\n00 00\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"59\\r\\n01 05\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n01 00\\r\\n\", \"output\": [\"211\"]}, {\"input\": \"60\\r\\n00 24\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"10\\r\\n00 08\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"10\\r\\n00 06\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"60\\r\\n01 24\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"50\\r\\n00 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2\\r\\n03 00\\r\\n\", \"output\": [\"271\"]}, {\"input\": \"4\\r\\n19 04\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"25\\r\\n00 23\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"10\\r\\n01 01\\r\\n\", \"output\": [\"43\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '16\\r\\n00 16\\r\\n', 'output': ['24']}, {'input': '58\\r\\n22 54\\r\\n', 'output': ['6']}, {'input': '1\\r\\n00 53\\r\\n', 'output': ['6']}, {'input': '59\\r\\n08 00\\r\\n', 'output': ['1']}, {'input': '60\\r\\n05 47\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '13\\r\\n08 28\\r\\n', 'output': ['3']}, {'input': '20\\r\\n03 58\\r\\n', 'output': ['30']}, {'input': '60\\r\\n16 13\\r\\n', 'output': ['9']}, {'input': '11\\r\\n00 10\\r\\n', 'output': ['3']}, {'input': '60\\r\\n05 36\\r\\n', 'output': ['12']}]","human_sample_testcases_3":"[{'input': '60\\r\\n01 05\\r\\n', 'output': ['8']}, {'input': '40\\r\\n13 37\\r\\n', 'output': ['0']}, {'input': '58\\r\\n22 54\\r\\n', 'output': ['6']}, {'input': '31\\r\\n13 34\\r\\n', 'output': ['7']}, {'input': '29\\r\\n12 39\\r\\n', 'output': ['8']}]","human_sample_testcases_4":"[{'input': '1\\r\\n00 01\\r\\n', 'output': ['4']}, {'input': '60\\r\\n01 20\\r\\n', 'output': ['8']}, {'input': '1\\r\\n05 25\\r\\n', 'output': ['8']}, {'input': '40\\r\\n13 37\\r\\n', 'output': ['0']}, {'input': '44\\r\\n20 20\\r\\n', 'output': ['4']}]","human_sample_testcases_5":"[{'input': '60\\r\\n05 07\\r\\n', 'output': ['0']}, {'input': '1\\r\\n20 21\\r\\n', 'output': ['4']}, {'input': '59\\r\\n06 18\\r\\n', 'output': ['9']}, {'input': '2\\r\\n00 02\\r\\n', 'output': ['182']}, {'input': '35\\r\\n15 25\\r\\n', 'output': ['13']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":282,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"047\", \"16\", \"472747\"]","input_specification":"The single line contains a non-empty string s whose length can range from 1 to 50, inclusive. The string only contains digits. The string can contain leading zeroes.","src_uid":"639b8b8d0dc42df46b139f0aeb3a7a0a","source_code":"import java.lang.*;\nimport java.util.*;\n\npublic class Luckysubstring {\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n String input = in.nextLine();\n int count4 = 0;\n int count7 = 0;\n in.close();\n if (input.contains(\"4\") || input.contains(\"7\")) {\n for (int i = 0; i < input.length(); i++) {\n if (input.charAt(i) == '4') {\n count4++;\n } else if (input.charAt(i) == '7') {\n count7++;\n }\n }\n if (count4 >= count7) {\n System.out.println(4);\n } else {\n System.out.println(7);\n }\n } else {\n System.out.println(-1);\n }\n\n }\n}","sample_outputs":"[\"4\", \"-1\", \"7\"]","lang_cluster":"Java","notes":"NoteThe lexicographical comparison of strings is performed by the < operator in the modern programming languages. String x is lexicographically less than string y either if x is a prefix of y, or exists such i (1\u2009\u2264\u2009i\u2009\u2264\u2009min(|x|,\u2009|y|)), that xi\u2009<\u2009yi and for any j (1\u2009\u2264\u2009j\u2009<\u2009i) xj\u2009=\u2009yj. Here |a| denotes the length of string a.In the first sample three conditions are fulfilled for strings \"4\", \"7\" and \"47\". The lexicographically minimum one is \"4\".In the second sample s has no substrings which are lucky numbers.In the third sample the three conditions are only fulfilled for string \"7\".","output_specification":"In the only line print the answer to Petya's problem. If the sought string does not exist, print \"-1\" (without quotes).","description":"Petya loves lucky numbers. Everybody knows that lucky numbers are positive integers whose decimal representation contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.One day Petya was delivered a string s, containing only digits. He needs to find a string that represents a lucky number without leading zeroes, is not empty, is contained in s as a substring the maximum number of times.Among all the strings for which the three conditions given above are fulfilled, Petya only needs the lexicographically minimum one. Find this string for Petya.","human_testcases":"[{\"input\": \"047\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"472747\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1925\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5486846414848445484\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"516160414\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"9458569865994896\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"94894948577777777884888\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"00000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"9589\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"7665711\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"538772857\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8679647744\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"23607019991994\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"86145305734278927901987281894864719533015270066521\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22438808523154336905543301642540261833729318191\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"290732082244359495795943967215788554387079\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6363333480463521971676988087733137609715\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"637789221789855555993957058\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"11536708648794535307468278326553811\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"619433861636130069773\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"00000000000000000000000000000000000000000000000000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"0000000000000000000000000000000000000047\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8175012266795100056032281135654854227489558885698\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8862708665262955384044574268728167940741129\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"538772857\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"94872076199824813574576121510803\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"44101164480392494025995467\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0445460407410702955646485\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"91076008557028243309\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"33120039\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74747474747474747474747474747474747474747474747474\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74747474747474747474747774747474747474747474747474\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"74747474747474747474747474747474744474747474747474\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"47474747474747474747474747474747474747474747474747\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"40\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"07\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"007\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"44\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"74\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\n', 'output': ['4']}, {'input': '74747474747474747474747774747474747474747474747474\\r\\n', 'output': ['7']}, {'input': '44101164480392494025995467\\r\\n', 'output': ['4']}, {'input': '16\\r\\n', 'output': ['-1']}, {'input': '74747474747474747474747474747474744474747474747474\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '11536708648794535307468278326553811\\r\\n', 'output': ['7']}, {'input': '472747\\r\\n', 'output': ['7']}, {'input': '8679647744\\r\\n', 'output': ['4']}, {'input': '538772857\\r\\n', 'output': ['7']}, {'input': '7665711\\r\\n', 'output': ['7']}]","human_sample_testcases_3":"[{'input': '16\\r\\n', 'output': ['-1']}, {'input': '44\\r\\n', 'output': ['4']}, {'input': '74747474747474747474747474747474747474747474747474\\r\\n', 'output': ['4']}, {'input': '9589\\r\\n', 'output': ['-1']}, {'input': '8175012266795100056032281135654854227489558885698\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '23607019991994\\r\\n', 'output': ['4']}, {'input': '8175012266795100056032281135654854227489558885698\\r\\n', 'output': ['4']}, {'input': '007\\r\\n', 'output': ['7']}, {'input': '22438808523154336905543301642540261833729318191\\r\\n', 'output': ['4']}, {'input': '637789221789855555993957058\\r\\n', 'output': ['7']}]","human_sample_testcases_5":"[{'input': '74\\r\\n', 'output': ['4']}, {'input': '047\\r\\n', 'output': ['4']}, {'input': '07\\r\\n', 'output': ['7']}, {'input': '4\\r\\n', 'output': ['4']}, {'input': '91076008557028243309\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":93.75,"human_sample_line_coverage_3":93.75,"human_sample_line_coverage_4":93.75,"human_sample_line_coverage_5":93.75,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":91.67,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":91.67,"human_sample_branch_coverage_5":91.67,"id":283,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.0,"human_sample_branch_coverage":90.002} {"sample_inputs":"[\"2\\n2 8\", \"3\\n5 1 10\", \"7\\n3 3 2 7 9 6 8\"]","input_specification":"The first line contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u200920). The second line contains n integers a1,\u2009a2,\u2009...,\u2009an (1\u2009\u2264\u2009ai\u2009\u2264\u200925) \u2014 the number of times Greg repeats the exercises.","src_uid":"579021de624c072f5e0393aae762117e","source_code":"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n\npublic class Main{\n\n public static void main(String[] args) throws IOException {\nBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\nStringTokenizer st=new StringTokenizer(br.readLine());\nint n=Integer.parseInt(st.nextToken());\nst=new StringTokenizer(br.readLine());\nint Nchest=0;\nint Nbiceps=0;\nint Nback=0;\nint w=2;\n for (int i =1; i <=n; i++) {\n if(i % 3==0)\n Nback+=Integer.parseInt(st.nextToken());\n else if(i==w){\n w=w+3;\n Nbiceps+=Integer.parseInt(st.nextToken());\n }\n else\n Nchest+=Integer.parseInt(st.nextToken());\n\n }\nif(Nchest > Nbiceps && Nchest > Nback)\n System.out.println(\"chest\");\nelse if( Nbiceps> Nchest && Nbiceps > Nback)\n System.out.println(\"biceps\");\nelse\n System.out.println(\"back\");\n }\n\n}\n","sample_outputs":"[\"biceps\", \"back\", \"chest\"]","lang_cluster":"Java","notes":"NoteIn the first sample Greg does 2 chest, 8 biceps and zero back exercises, so the biceps gets the most exercises.In the second sample Greg does 5 chest, 1 biceps and 10 back exercises, so the back gets the most exercises.In the third sample Greg does 18 chest, 12 biceps and 8 back exercises, so the chest gets the most exercise.","output_specification":"Print word \"chest\" (without the quotes), if the chest gets the most exercise, \"biceps\" (without the quotes), if the biceps gets the most exercise and print \"back\" (without the quotes) if the back gets the most exercise. It is guaranteed that the input is such that the answer to the problem is unambiguous.","description":"Greg is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n integers a1,\u2009a2,\u2009...,\u2009an. These numbers mean that Greg needs to do exactly n exercises today. Besides, Greg should repeat the i-th in order exercise ai times.Greg now only does three types of exercises: \"chest\" exercises, \"biceps\" exercises and \"back\" exercises. Besides, his training is cyclic, that is, the first exercise he does is a \"chest\" one, the second one is \"biceps\", the third one is \"back\", the fourth one is \"chest\", the fifth one is \"biceps\", and so on to the n-th exercise.Now Greg wonders, which muscle will get the most exercise during his training. We know that the exercise Greg repeats the maximum number of times, trains the corresponding muscle the most. Help Greg, determine which muscle will get the most training.","human_testcases":"[{\"input\": \"2\\r\\n2 8\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"3\\r\\n5 1 10\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"7\\r\\n3 3 2 7 9 6 8\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"4\\r\\n5 6 6 2\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"5\\r\\n8 2 2 6 3\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"6\\r\\n8 7 2 5 3 4\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"8\\r\\n7 2 9 10 3 8 10 6\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"9\\r\\n5 4 2 3 4 4 5 2 2\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"10\\r\\n4 9 8 5 3 8 8 10 4 2\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"11\\r\\n10 9 7 6 1 3 9 7 1 3 5\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"12\\r\\n24 22 6 16 5 21 1 7 2 19 24 5\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"13\\r\\n24 10 5 7 16 17 2 7 9 20 15 2 24\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"14\\r\\n13 14 19 8 5 17 9 16 15 9 5 6 3 7\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"15\\r\\n24 12 22 21 25 23 21 5 3 24 23 13 12 16 12\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"16\\r\\n12 6 18 6 25 7 3 1 1 17 25 17 6 8 17 8\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"17\\r\\n13 8 13 4 9 21 10 10 9 22 14 23 22 7 6 14 19\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"18\\r\\n1 17 13 6 11 10 25 13 24 9 21 17 3 1 17 12 25 21\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"19\\r\\n22 22 24 25 19 10 7 10 4 25 19 14 1 14 3 18 4 19 24\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"20\\r\\n9 8 22 11 18 14 15 10 17 11 2 1 25 20 7 24 4 25 9 20\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"1\\r\\n10\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"2\\r\\n15 3\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"3\\r\\n21 11 19\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"4\\r\\n19 24 13 15\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"5\\r\\n4 24 1 9 19\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"6\\r\\n6 22 24 7 15 24\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"7\\r\\n10 8 23 23 14 18 14\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"8\\r\\n5 16 8 9 17 16 14 7\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"9\\r\\n12 3 10 23 6 4 22 13 12\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"10\\r\\n1 9 20 18 20 17 7 24 23 2\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"11\\r\\n22 25 8 2 18 15 1 13 1 11 4\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"12\\r\\n20 12 14 2 15 6 24 3 11 8 11 14\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"13\\r\\n2 18 8 8 8 20 5 22 15 2 5 19 18\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"14\\r\\n1 6 10 25 17 13 21 11 19 4 15 24 5 22\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"15\\r\\n13 5 25 13 17 25 19 21 23 17 12 6 14 8 6\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"16\\r\\n10 15 2 17 22 12 14 14 6 11 4 13 9 8 21 14\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"17\\r\\n7 22 9 22 8 7 20 22 23 5 12 11 1 24 17 20 10\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"18\\r\\n18 15 4 25 5 11 21 25 12 14 25 23 19 19 13 6 9 17\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"19\\r\\n3 1 3 15 15 25 10 25 23 10 9 21 13 23 19 3 24 21 14\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"20\\r\\n19 18 11 3 6 14 3 3 25 3 1 19 25 24 23 12 7 4 8 6\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"1\\r\\n19\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"2\\r\\n1 7\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"3\\r\\n18 18 23\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"4\\r\\n12 15 1 13\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"5\\r\\n11 14 25 21 21\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"6\\r\\n11 9 12 11 22 18\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"7\\r\\n11 1 16 20 21 25 20\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"8\\r\\n1 2 20 9 3 22 17 4\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"9\\r\\n19 2 10 19 15 20 3 1 13\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"10\\r\\n11 2 11 8 21 16 2 3 19 9\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"20\\r\\n25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 25 24\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"12\\r\\n4 24 21 3 13 24 22 13 12 21 1 15\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"13\\r\\n14 14 16 2 13 5 1 14 9 4 16 8 3\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"14\\r\\n1 9 15 4 11 8 25 3 9 14 13 2 1 11\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"15\\r\\n4 19 10 6 16 12 5 11 7 23 1 24 11 7 17\\r\\n\", \"output\": [\"back\"]}, {\"input\": \"16\\r\\n2 8 2 8 13 22 20 12 22 23 18 13 18 22 11 17\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"17\\r\\n24 5 5 16 10 8 22 6 4 13 10 10 5 23 8 20 8\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"18\\r\\n14 8 9 12 11 18 24 1 14 24 18 5 12 17 1 10 1 22\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"19\\r\\n21 2 10 6 9 1 24 5 2 19 10 13 10 7 19 2 6 13 24\\r\\n\", \"output\": [\"chest\"]}, {\"input\": \"20\\r\\n7 1 14 17 6 6 18 13 12 3 25 4 3 19 22 24 16 14 1 23\\r\\n\", \"output\": [\"biceps\"]}, {\"input\": \"20\\r\\n2 1 2 2 1 2 2 1 2 1 1 1 1 1 1 1 1 1 1 22\\r\\n\", \"output\": [\"biceps\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3\\r\\n21 11 19\\r\\n', 'output': ['chest']}, {'input': '18\\r\\n1 17 13 6 11 10 25 13 24 9 21 17 3 1 17 12 25 21\\r\\n', 'output': ['back']}, {'input': '19\\r\\n3 1 3 15 15 25 10 25 23 10 9 21 13 23 19 3 24 21 14\\r\\n', 'output': ['back']}, {'input': '10\\r\\n4 9 8 5 3 8 8 10 4 2\\r\\n', 'output': ['biceps']}, {'input': '2\\r\\n2 8\\r\\n', 'output': ['biceps']}]","human_sample_testcases_2":"[{'input': '11\\r\\n10 9 7 6 1 3 9 7 1 3 5\\r\\n', 'output': ['chest']}, {'input': '16\\r\\n10 15 2 17 22 12 14 14 6 11 4 13 9 8 21 14\\r\\n', 'output': ['chest']}, {'input': '7\\r\\n3 3 2 7 9 6 8\\r\\n', 'output': ['chest']}, {'input': '6\\r\\n8 7 2 5 3 4\\r\\n', 'output': ['chest']}, {'input': '8\\r\\n5 16 8 9 17 16 14 7\\r\\n', 'output': ['biceps']}]","human_sample_testcases_3":"[{'input': '17\\r\\n7 22 9 22 8 7 20 22 23 5 12 11 1 24 17 20 10\\r\\n', 'output': ['biceps']}, {'input': '4\\r\\n12 15 1 13\\r\\n', 'output': ['chest']}, {'input': '3\\r\\n21 11 19\\r\\n', 'output': ['chest']}, {'input': '7\\r\\n11 1 16 20 21 25 20\\r\\n', 'output': ['chest']}, {'input': '20\\r\\n2 1 2 2 1 2 2 1 2 1 1 1 1 1 1 1 1 1 1 22\\r\\n', 'output': ['biceps']}]","human_sample_testcases_4":"[{'input': '6\\r\\n8 7 2 5 3 4\\r\\n', 'output': ['chest']}, {'input': '1\\r\\n10\\r\\n', 'output': ['chest']}, {'input': '8\\r\\n7 2 9 10 3 8 10 6\\r\\n', 'output': ['chest']}, {'input': '16\\r\\n12 6 18 6 25 7 3 1 1 17 25 17 6 8 17 8\\r\\n', 'output': ['biceps']}, {'input': '16\\r\\n10 15 2 17 22 12 14 14 6 11 4 13 9 8 21 14\\r\\n', 'output': ['chest']}]","human_sample_testcases_5":"[{'input': '9\\r\\n5 4 2 3 4 4 5 2 2\\r\\n', 'output': ['chest']}, {'input': '15\\r\\n4 19 10 6 16 12 5 11 7 23 1 24 11 7 17\\r\\n', 'output': ['back']}, {'input': '7\\r\\n3 3 2 7 9 6 8\\r\\n', 'output': ['chest']}, {'input': '17\\r\\n13 8 13 4 9 21 10 10 9 22 14 23 22 7 6 14 19\\r\\n', 'output': ['chest']}, {'input': '10\\r\\n1 9 20 18 20 17 7 24 23 2\\r\\n', 'output': ['back']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":95.24,"human_sample_line_coverage_3":95.24,"human_sample_line_coverage_4":95.24,"human_sample_line_coverage_5":95.24,"human_sample_branch_coverage_1":85.71,"human_sample_branch_coverage_2":78.57,"human_sample_branch_coverage_3":78.57,"human_sample_branch_coverage_4":78.57,"human_sample_branch_coverage_5":78.57,"id":284,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.192,"human_sample_branch_coverage":79.998} {"sample_inputs":"[\"6 3\"]","input_specification":"The only line of the input contains two integers: n and k (1\u2009\u2264\u2009n\u2009\u2264\u2009109, 0\u2009\u2264\u2009k\u2009\u2264\u2009n).","src_uid":"bdccf34b5a5ae13238c89a60814b9f86","source_code":"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n\n\npublic class scorify{\n\tpublic static void main(String[] args){\n\tScanner in=new Scanner(System.in);\n int n = in.nextInt();\n int k = in.nextInt();\n \n System.out.print((n>k && k>0) ? 1 : 0 );\n if(k!=n){\n if(k>1) System.out.print(\" \" + ( ( (k>=(n\/2)) ? n-k : ( (n>=k*3) ? k*2 : n-k ) ) ) );\n \tif(k==1) System.out.print( ( n-k==1 ? (\" \" + 1) : (\" \"+2) ) );\n \tif(k==0) System.out.print(\" \" + 0);\n }else{System.out.print(\" \" + 0);}\n \n }\n}","sample_outputs":"[\"1 3\"]","lang_cluster":"Java","notes":"NoteIn the sample test, the number of good apartments could be minimum possible if, for example, apartments with indices 1, 2 and 3 were inhabited. In this case only apartment 4 is good. The maximum possible number could be, for example, if apartments with indices 1, 3 and 5 were inhabited. In this case all other apartments: 2, 4 and 6 are good.","output_specification":"Print the minimum possible and the maximum possible number of apartments good for Maxim.","description":"Maxim wants to buy an apartment in a new house at Line Avenue of Metropolis. The house has n apartments that are numbered from 1 to n and are arranged in a row. Two apartments are adjacent if their indices differ by 1. Some of the apartments can already be inhabited, others are available for sale.Maxim often visits his neighbors, so apartment is good for him if it is available for sale and there is at least one already inhabited apartment adjacent to it. Maxim knows that there are exactly k already inhabited apartments, but he doesn't know their indices yet.Find out what could be the minimum possible and the maximum possible number of apartments that are good for Maxim.","human_testcases":"[{\"input\": \"6 3\\r\\n\", \"output\": [\"1 3\"]}, {\"input\": \"10 1\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"10 9\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"8 0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"8 8\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"966871928 890926970\\r\\n\", \"output\": [\"1 75944958\"]}, {\"input\": \"20 2\\r\\n\", \"output\": [\"1 4\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"7 2\\r\\n\", \"output\": [\"1 4\"]}, {\"input\": \"8 3\\r\\n\", \"output\": [\"1 5\"]}, {\"input\": \"9 4\\r\\n\", \"output\": [\"1 5\"]}, {\"input\": \"10 3\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"10 4\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"10 5\\r\\n\", \"output\": [\"1 5\"]}, {\"input\": \"1000 1000\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1000 333\\r\\n\", \"output\": [\"1 666\"]}, {\"input\": \"1000 334\\r\\n\", \"output\": [\"1 666\"]}, {\"input\": \"999 333\\r\\n\", \"output\": [\"1 666\"]}, {\"input\": \"999 334\\r\\n\", \"output\": [\"1 665\"]}, {\"input\": \"998 332\\r\\n\", \"output\": [\"1 664\"]}, {\"input\": \"998 333\\r\\n\", \"output\": [\"1 665\"]}, {\"input\": \"89 4\\r\\n\", \"output\": [\"1 8\"]}, {\"input\": \"66 50\\r\\n\", \"output\": [\"1 16\"]}, {\"input\": \"88 15\\r\\n\", \"output\": [\"1 30\"]}, {\"input\": \"95 43\\r\\n\", \"output\": [\"1 52\"]}, {\"input\": \"900 344\\r\\n\", \"output\": [\"1 556\"]}, {\"input\": \"777 113\\r\\n\", \"output\": [\"1 226\"]}, {\"input\": \"964 42\\r\\n\", \"output\": [\"1 84\"]}, {\"input\": \"982 867\\r\\n\", \"output\": [\"1 115\"]}, {\"input\": \"1000000000 0\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"1000000000 333333333\\r\\n\", \"output\": [\"1 666666666\"]}, {\"input\": \"1000000000 333333334\\r\\n\", \"output\": [\"1 666666666\"]}, {\"input\": \"999999999 333333333\\r\\n\", \"output\": [\"1 666666666\"]}, {\"input\": \"999999999 333333334\\r\\n\", \"output\": [\"1 666666665\"]}, {\"input\": \"999999998 333333332\\r\\n\", \"output\": [\"1 666666664\"]}, {\"input\": \"999999998 333333333\\r\\n\", \"output\": [\"1 666666665\"]}, {\"input\": \"78602604 42160832\\r\\n\", \"output\": [\"1 36441772\"]}, {\"input\": \"35679021 9137902\\r\\n\", \"output\": [\"1 18275804\"]}, {\"input\": \"41949373 13173511\\r\\n\", \"output\": [\"1 26347022\"]}, {\"input\": \"77855558 49163875\\r\\n\", \"output\": [\"1 28691683\"]}, {\"input\": \"87187123 2851901\\r\\n\", \"output\": [\"1 5703802\"]}, {\"input\": \"66849627 25004217\\r\\n\", \"output\": [\"1 41845410\"]}, {\"input\": \"873046672 517064947\\r\\n\", \"output\": [\"1 355981725\"]}, {\"input\": \"639857373 1393427\\r\\n\", \"output\": [\"1 2786854\"]}, {\"input\": \"637563683 69636269\\r\\n\", \"output\": [\"1 139272538\"]}, {\"input\": \"911669737 141068293\\r\\n\", \"output\": [\"1 282136586\"]}, {\"input\": \"547575919 313272818\\r\\n\", \"output\": [\"1 234303101\"]}, {\"input\": \"955020006 297895809\\r\\n\", \"output\": [\"1 595791618\"]}, {\"input\": \"11 3\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"9 3\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"7 3\\r\\n\", \"output\": [\"1 4\"]}, {\"input\": \"12 5\\r\\n\", \"output\": [\"1 7\"]}, {\"input\": \"1000 8\\r\\n\", \"output\": [\"1 16\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 1000000000\\r\\n', 'output': ['0 0']}, {'input': '982 867\\r\\n', 'output': ['1 115']}, {'input': '1000000000 0\\r\\n', 'output': ['0 0']}, {'input': '998 333\\r\\n', 'output': ['1 665']}, {'input': '8 0\\r\\n', 'output': ['0 0']}]","human_sample_testcases_2":"[{'input': '9 4\\r\\n', 'output': ['1 5']}, {'input': '1000000000 1000000000\\r\\n', 'output': ['0 0']}, {'input': '2 1\\r\\n', 'output': ['1 1']}, {'input': '4 1\\r\\n', 'output': ['1 2']}, {'input': '10 3\\r\\n', 'output': ['1 6']}]","human_sample_testcases_3":"[{'input': '35679021 9137902\\r\\n', 'output': ['1 18275804']}, {'input': '2 0\\r\\n', 'output': ['0 0']}, {'input': '2 2\\r\\n', 'output': ['0 0']}, {'input': '89 4\\r\\n', 'output': ['1 8']}, {'input': '8 0\\r\\n', 'output': ['0 0']}]","human_sample_testcases_4":"[{'input': '777 113\\r\\n', 'output': ['1 226']}, {'input': '1000000000 1000000000\\r\\n', 'output': ['0 0']}, {'input': '12 5\\r\\n', 'output': ['1 7']}, {'input': '999 333\\r\\n', 'output': ['1 666']}, {'input': '10 9\\r\\n', 'output': ['1 1']}]","human_sample_testcases_5":"[{'input': '6 3\\r\\n', 'output': ['1 3']}, {'input': '2 0\\r\\n', 'output': ['0 0']}, {'input': '966871928 890926970\\r\\n', 'output': ['1 75944958']}, {'input': '1000 333\\r\\n', 'output': ['1 666']}, {'input': '1000000000 0\\r\\n', 'output': ['0 0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":90.0,"human_sample_branch_coverage_1":77.78,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":72.22,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":66.67,"id":285,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.0,"human_sample_branch_coverage":73.334} {"sample_inputs":"[\"5 3\\nxyabd\", \"7 4\\nproblem\", \"2 2\\nab\", \"12 1\\nabaabbaaabbb\"]","input_specification":"The first line of input contains two integers\u00a0\u2014 $$$n$$$ and $$$k$$$ ($$$1 \\le k \\le n \\le 50$$$)\u00a0\u2013 the number of available stages and the number of stages to use in the rocket. The second line contains string $$$s$$$, which consists of exactly $$$n$$$ lowercase Latin letters. Each letter defines a new stage, which can be used to build the rocket. Each stage can be used at most once.","src_uid":"56b13d313afef9dc6c6ba2758b5ea313","source_code":"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\n\npublic class Main{\n public static void main(String[] args)throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tPrintWriter out = new PrintWriter(System.out);\n\tString s[] = br.readLine().split(\" \");\n\tint n = Integer.parseInt(s[0]);\n\tint k = Integer.parseInt(s[1]);\n\tchar d[] = br.readLine().toCharArray();\n\tArrays.sort(d);\n\tint ans = Integer.MAX_VALUE;\n\tfor(int i = 0; i=2){\n\t\t ul = d[j];\n\t\t p++;\n\t\t c+=d[j]-'a'+1;\n\t\t}\n\t\tif(p==k){\n\t\t break;\n\t\t}\n\t }\n\t if(p==k){\n\t\tans = Math.min(ans,c);\n\t }\n\t}\n\tout.println(ans==Integer.MAX_VALUE?-1:ans);\n\tout.close();\n }\n}\n","sample_outputs":"[\"29\", \"34\", \"-1\", \"1\"]","lang_cluster":"Java","notes":"NoteIn the first example, the following rockets satisfy the condition: \"adx\" (weight is $$$1+4+24=29$$$); \"ady\" (weight is $$$1+4+25=30$$$); \"bdx\" (weight is $$$2+4+24=30$$$); \"bdy\" (weight is $$$2+4+25=31$$$).Rocket \"adx\" has the minimal weight, so the answer is $$$29$$$.In the second example, target rocket is \"belo\". Its weight is $$$2+5+12+15=34$$$.In the third example, $$$n=k=2$$$, so the rocket must have both stages: 'a' and 'b'. This rocket doesn't satisfy the condition, because these letters are adjacent in the alphabet. Answer is -1.","output_specification":"Print a single integer\u00a0\u2014 the minimal total weight of the rocket or -1, if it is impossible to build the rocket at all.","description":"Natasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order. Each of the stages is defined by a lowercase Latin letter. This way, the rocket can be described by the string\u00a0\u2014 concatenation of letters, which correspond to the stages.There are $$$n$$$ stages available. The rocket must contain exactly $$$k$$$ of them. Stages in the rocket should be ordered by their weight. So, after the stage with some letter can go only stage with a letter, which is at least two positions after in the alphabet (skipping one letter in between, or even more). For example, after letter 'c' can't go letters 'a', 'b', 'c' and 'd', but can go letters 'e', 'f', ..., 'z'.For the rocket to fly as far as possible, its weight should be minimal. The weight of the rocket is equal to the sum of the weights of its stages. The weight of the stage is the number of its letter in the alphabet. For example, the stage 'a 'weighs one ton,' b 'weighs two tons, and' z'\u00a0\u2014 $$$26$$$ tons.Build the rocket with the minimal weight or determine, that it is impossible to build a rocket at all. Each stage can be used at most once.","human_testcases":"[{\"input\": \"5 3\\r\\nxyabd\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"7 4\\r\\nproblem\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"2 2\\r\\nab\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"12 1\\r\\nabaabbaaabbb\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 13\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"169\"]}, {\"input\": \"50 14\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1 1\\r\\na\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 1\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"50 2\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"13 13\\r\\nuwgmkyqeiaocs\\r\\n\", \"output\": [\"169\"]}, {\"input\": \"13 13\\r\\nhzdxpbfvrltnj\\r\\n\", \"output\": [\"182\"]}, {\"input\": \"1 1\\r\\nn\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"10 8\\r\\nsmzeblyjqw\\r\\n\", \"output\": [\"113\"]}, {\"input\": \"20 20\\r\\ntzmvhskkyugkuuxpvtbh\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"30 15\\r\\nwjzolzzkfulwgioksfxmcxmnnjtoav\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"40 30\\r\\nxumfrflllrrgswehqtsskefixhcxjrxbjmrpsshv\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"50 31\\r\\nahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqiabpz\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"10 7\\r\\niuiukrxcml\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"38 2\\r\\nvjzarfykmrsrvwbwfwldsulhxtykmjbnwmdufa\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"12 6\\r\\nfwseyrarkwcd\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"2 2\\r\\nac\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1\\r\\nc\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 2\\r\\nad\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 1\\r\\nac\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 3\\r\\nadjz\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"3 3\\r\\naoz\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"3 1\\r\\nzzz\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"2 1\\r\\nxz\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"5 1\\r\\naaddd\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 2\\r\\nab\\r\\n', 'output': ['-1']}, {'input': '7 4\\r\\nproblem\\r\\n', 'output': ['34']}, {'input': '3 1\\r\\nzzz\\r\\n', 'output': ['26']}, {'input': '2 2\\r\\nad\\r\\n', 'output': ['5']}, {'input': '13 13\\r\\nuwgmkyqeiaocs\\r\\n', 'output': ['169']}]","human_sample_testcases_2":"[{'input': '50 13\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['169']}, {'input': '13 13\\r\\nhzdxpbfvrltnj\\r\\n', 'output': ['182']}, {'input': '2 2\\r\\nad\\r\\n', 'output': ['5']}, {'input': '10 8\\r\\nsmzeblyjqw\\r\\n', 'output': ['113']}, {'input': '50 1\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '10 8\\r\\nsmzeblyjqw\\r\\n', 'output': ['113']}, {'input': '38 2\\r\\nvjzarfykmrsrvwbwfwldsulhxtykmjbnwmdufa\\r\\n', 'output': ['5']}, {'input': '5 3\\r\\nxyabd\\r\\n', 'output': ['29']}, {'input': '2 1\\r\\nac\\r\\n', 'output': ['1']}, {'input': '40 30\\r\\nxumfrflllrrgswehqtsskefixhcxjrxbjmrpsshv\\r\\n', 'output': ['-1']}]","human_sample_testcases_4":"[{'input': '3 3\\r\\naoz\\r\\n', 'output': ['42']}, {'input': '50 31\\r\\nahbyyoxltryqdmvenemaqnbakglgqolxnaifnqtoclnnqiabpz\\r\\n', 'output': ['-1']}, {'input': '3 1\\r\\nzzz\\r\\n', 'output': ['26']}, {'input': '4 3\\r\\nadjz\\r\\n', 'output': ['15']}, {'input': '50 13\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['169']}]","human_sample_testcases_5":"[{'input': '2 2\\r\\nab\\r\\n', 'output': ['-1']}, {'input': '50 13\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['169']}, {'input': '1 1\\r\\nc\\r\\n', 'output': ['3']}, {'input': '50 14\\r\\nqwertyuiopasdfghjklzxcvbnmaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['-1']}, {'input': '50 1\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":92.86,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":286,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":98.572} {"sample_inputs":"[\"...QK...\\n........\\n........\\n........\\n........\\n........\\n........\\n...rk...\", \"rnbqkbnr\\npppppppp\\n........\\n........\\n........\\n........\\nPPPPPPPP\\nRNBQKBNR\", \"rppppppr\\n...k....\\n........\\n........\\n........\\n........\\nK...Q...\\n........\"]","input_specification":"The input contains eight lines, eight characters each \u2014 the board's description. The white pieces on the board are marked with uppercase letters, the black pieces are marked with lowercase letters. The white pieces are denoted as follows: the queen is represented is 'Q', the rook \u2014 as 'R', the bishop \u2014 as'B', the knight \u2014 as 'N', the pawn \u2014 as 'P', the king \u2014 as 'K'. The black pieces are denoted as 'q', 'r', 'b', 'n', 'p', 'k', respectively. An empty square of the board is marked as '.' (a dot). It is not guaranteed that the given chess position can be achieved in a real game. Specifically, there can be an arbitrary (possibly zero) number pieces of each type, the king may be under attack and so on.","src_uid":"44bed0ca7a8fb42fb72c1584d39a4442","source_code":"import java.io.*;\nimport java.util.Scanner;\n\npublic class codeforce519A {\n\n static PrintWriter out;\n static StreamTokenizer sin;\n static BufferedReader bin;\n\n static void setupOut() {\n out = new PrintWriter(System.out);\n }\n\n static void setupString() {\n bin = new BufferedReader(new InputStreamReader(System.in));\n }\n\n public static void main(String[] args) throws IOException {\n setupOut();\n setupString();\n Scanner in = new Scanner(System.in);\n int x = 0;\n int y = 0;\n\n for (int i = 0; i < 8; i++) {\n String s = in.next();\n for (int j = 0; j < 8; j++) {\n char c = s.charAt(j);\n if (c=='Q')\n x+=9;\n if (c=='R')\n x+=5;\n if (c=='B')\n x+=3;\n if (c=='N')\n x+=3;\n if (c=='P')\n x+=1;\n if (c=='q')\n y+=9;\n if (c=='r')\n y+=5;\n if (c=='n')\n y+=3;\n if (c=='p')\n y+=1;\n if (c=='b'){\n y+=3;\n }\n\n }\n }\n if (x==y)\n out.print(\"Draw\");\n if (x>y)\n out.print(\"White\");\n if (x 0) {\n grid[i][j] = 1;\n k--;\n }\n }\n }\n\n if (k > 0 && n != 1) {\n long mid = (k \/ (m * n - m));\n boolean isUp = (k \/ (m * n - m)) % 2 == 0;\n long topRow = (k \/ (m * n - m)) \/ 2 + (!isUp ? 1 : 0);\n long bottomRow = ((k \/ (m * n - m)) \/ 2);\n long remK = (k % (m * n - m));\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n if (i == 0) {\n grid[i][j] += topRow;\n } else if (i == n - 1) {\n grid[i][j] += bottomRow;\n } else {\n grid[i][j] += mid;\n }\n }\n }\n for (int i = isUp ? n - 2 : 1; i >= 0 && i < n; i += isUp ? -1 : 1) {\n for (int j = 0; j < m; j++) {\n if (remK > 0) {\n grid[i][j] += 1;\n remK--;\n } else {\n break;\n }\n }\n }\n } else if (n == 1) {\n for (int i = 0; i < m; i++) {\n grid[0][i] += k \/ m;\n }\n k = k % m;\n for (int i = 0; i < m; i++) {\n if (k > 0) {\n grid[0][i] += 1;\n k--;\n }\n\n }\n }\n long max = Long.MIN_VALUE;\n long min = Long.MAX_VALUE;\n for (long column[] : grid) {\n for (long cell : column) {\n max = Math.max(max, cell);\n min = Math.min(min, cell);\n }\n }\n out.println(max + \" \" + min + \" \" + grid[x - 1][y - 1]);\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int readInt() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long readLong() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n private boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public int nextInt() {\n return readInt();\n }\n\n public long nextLong() {\n return readLong();\n }\n\n }\n}\n\n","sample_outputs":"[\"3 2 3\", \"2 1 1\", \"1 1 1\", \"101010101010101 50505050505051 50505050505051\"]","lang_cluster":"Java","notes":"NoteThe order of asking pupils in the first test: the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; the pupil from the first row who seats at the third table; the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; the pupil from the first row who seats at the third table; the pupil from the first row who seats at the first table, it means it is Sergei; the pupil from the first row who seats at the second table; The order of asking pupils in the second test: the pupil from the first row who seats at the first table; the pupil from the first row who seats at the second table; the pupil from the second row who seats at the first table; the pupil from the second row who seats at the second table; the pupil from the third row who seats at the first table; the pupil from the third row who seats at the second table; the pupil from the fourth row who seats at the first table; the pupil from the fourth row who seats at the second table, it means it is Sergei; the pupil from the third row who seats at the first table; ","output_specification":"Print three integers: the maximum number of questions a particular pupil is asked, the minimum number of questions a particular pupil is asked, how many times the teacher asked Sergei. ","description":"On the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.Seating in the class looks like a rectangle, where n rows with m pupils in each. The teacher asks pupils in the following order: at first, she asks all pupils from the first row in the order of their seating, then she continues to ask pupils from the next row. If the teacher asked the last row, then the direction of the poll changes, it means that she asks the previous row. The order of asking the rows looks as follows: the 1-st row, the 2-nd row, ..., the n\u2009-\u20091-st row, the n-th row, the n\u2009-\u20091-st row, ..., the 2-nd row, the 1-st row, the 2-nd row, ...The order of asking of pupils on the same row is always the same: the 1-st pupil, the 2-nd pupil, ..., the m-th pupil.During the lesson the teacher managed to ask exactly k questions from pupils in order described above. Sergei seats on the x-th row, on the y-th place in the row. Sergei decided to prove to the teacher that pupils are asked irregularly, help him count three values: the maximum number of questions a particular pupil is asked, the minimum number of questions a particular pupil is asked, how many times the teacher asked Sergei. If there is only one row in the class, then the teacher always asks children from this row.","human_testcases":"[{\"input\": \"1 3 8 1 1\\r\\n\", \"output\": [\"3 2 3\", \"3 2 3\"]}, {\"input\": \"4 2 9 4 2\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"5 5 25 4 3\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"100 100 1000000000000000000 100 100\\r\\n\", \"output\": [\"101010101010101 50505050505051 50505050505051\"]}, {\"input\": \"3 2 15 2 2\\r\\n\", \"output\": [\"4 2 3\"]}, {\"input\": \"4 1 8 3 1\\r\\n\", \"output\": [\"3 1 2\"]}, {\"input\": \"3 2 8 2 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"4 2 9 4 1\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"1 3 7 1 1\\r\\n\", \"output\": [\"3 2 3\", \"3 2 3\"]}, {\"input\": \"2 2 8 2 1\\r\\n\", \"output\": [\"2 2 2\"]}, {\"input\": \"3 1 6 2 1\\r\\n\", \"output\": [\"3 1 3\"]}, {\"input\": \"5 6 30 5 4\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"3 8 134010 3 4\\r\\n\", \"output\": [\"8376 4188 4188\"]}, {\"input\": \"10 10 25 5 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"100 100 1000000000 16 32\\r\\n\", \"output\": [\"101011 50505 101010\"]}, {\"input\": \"100 100 1 23 39\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 1 1000000000 1 1\\r\\n\", \"output\": [\"1000000000 1000000000 1000000000\", \"1000000000 1000000000 1000000000\"]}, {\"input\": \"1 1 1 1 1\\r\\n\", \"output\": [\"1 1 1\", \"1 1 1\"]}, {\"input\": \"47 39 1772512 1 37\\r\\n\", \"output\": [\"989 494 495\"]}, {\"input\": \"37 61 421692 24 49\\r\\n\", \"output\": [\"192 96 192\"]}, {\"input\": \"89 97 875341288 89 96\\r\\n\", \"output\": [\"102547 51273 51274\"]}, {\"input\": \"100 1 1000000000000 100 1\\r\\n\", \"output\": [\"10101010101 5050505051 5050505051\"]}, {\"input\": \"1 100 1000000000000 1 100\\r\\n\", \"output\": [\"10000000000 10000000000 10000000000\", \"10000000000 10000000000 10000000000\"]}, {\"input\": \"2 4 6 1 4\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"2 4 6 1 3\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"2 4 49 1 1\\r\\n\", \"output\": [\"7 6 7\"]}, {\"input\": \"3 3 26 1 1\\r\\n\", \"output\": [\"4 2 3\"]}, {\"input\": \"5 2 77 4 2\\r\\n\", \"output\": [\"10 5 10\"]}, {\"input\": \"2 5 73 2 3\\r\\n\", \"output\": [\"8 7 7\"]}, {\"input\": \"5 2 81 5 1\\r\\n\", \"output\": [\"10 5 5\"]}, {\"input\": \"4 5 93 1 2\\r\\n\", \"output\": [\"6 3 4\"]}, {\"input\": \"4 4 74 4 1\\r\\n\", \"output\": [\"6 3 3\"]}, {\"input\": \"5 3 47 2 1\\r\\n\", \"output\": [\"4 2 4\"]}, {\"input\": \"5 4 61 1 1\\r\\n\", \"output\": [\"4 2 2\"]}, {\"input\": \"4 4 95 1 1\\r\\n\", \"output\": [\"8 4 4\"]}, {\"input\": \"2 5 36 1 3\\r\\n\", \"output\": [\"4 3 4\"]}, {\"input\": \"5 2 9 5 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"4 1 50 1 1\\r\\n\", \"output\": [\"17 8 9\"]}, {\"input\": \"3 2 83 1 2\\r\\n\", \"output\": [\"21 10 11\"]}, {\"input\": \"3 5 88 1 5\\r\\n\", \"output\": [\"9 4 5\"]}, {\"input\": \"4 2 89 1 2\\r\\n\", \"output\": [\"15 7 8\"]}, {\"input\": \"2 1 1 1 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"5 3 100 2 1\\r\\n\", \"output\": [\"9 4 9\"]}, {\"input\": \"4 4 53 3 1\\r\\n\", \"output\": [\"5 2 4\"]}, {\"input\": \"4 3 1 3 3\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 5 1 2 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"5 2 2 4 1\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 3 1 3 2\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 1 100 1 1\\r\\n\", \"output\": [\"100 100 100\", \"100 100 100\"]}, {\"input\": \"4 30 766048376 1 23\\r\\n\", \"output\": [\"8511649 4255824 4255825\"]}, {\"input\": \"3 90 675733187 1 33\\r\\n\", \"output\": [\"3754073 1877036 1877037\"]}, {\"input\": \"11 82 414861345 1 24\\r\\n\", \"output\": [\"505929 252964 252965\"]}, {\"input\": \"92 10 551902461 1 6\\r\\n\", \"output\": [\"606487 303243 303244\"]}, {\"input\": \"18 83 706805205 1 17\\r\\n\", \"output\": [\"500925 250462 250463\"]}, {\"input\": \"1 12 943872212 1 1\\r\\n\", \"output\": [\"78656018 78656017 78656018\", \"78656018 78656017 78656018\"]}, {\"input\": \"91 15 237966754 78 6\\r\\n\", \"output\": [\"176272 88136 176272\"]}, {\"input\": \"58 66 199707458 15 9\\r\\n\", \"output\": [\"53086 26543 53085\"]}, {\"input\": \"27 34 77794947 24 4\\r\\n\", \"output\": [\"88004 44002 88004\"]}, {\"input\": \"22 89 981099971 16 48\\r\\n\", \"output\": [\"524934 262467 524933\"]}, {\"input\": \"10 44 222787770 9 25\\r\\n\", \"output\": [\"562596 281298 562596\"]}, {\"input\": \"9 64 756016805 7 55\\r\\n\", \"output\": [\"1476596 738298 1476595\"]}, {\"input\": \"91 86 96470485 12 43\\r\\n\", \"output\": [\"12464 6232 12464\"]}, {\"input\": \"85 53 576663715 13 1\\r\\n\", \"output\": [\"129530 64765 129529\"]}, {\"input\": \"2 21 196681588 2 18\\r\\n\", \"output\": [\"4682895 4682894 4682895\"]}, {\"input\": \"8 29 388254841 6 29\\r\\n\", \"output\": [\"1912586 956293 1912585\"]}, {\"input\": \"2 59 400923999 2 43\\r\\n\", \"output\": [\"3397662 3397661 3397661\"]}, {\"input\": \"3 71 124911502 1 67\\r\\n\", \"output\": [\"879658 439829 439829\"]}, {\"input\": \"1 17 523664480 1 4\\r\\n\", \"output\": [\"30803793 30803792 30803793\", \"30803793 30803792 30803793\"]}, {\"input\": \"11 27 151005021 3 15\\r\\n\", \"output\": [\"559278 279639 559278\"]}, {\"input\": \"7 32 461672865 4 11\\r\\n\", \"output\": [\"2404547 1202273 2404546\"]}, {\"input\": \"2 90 829288586 1 57\\r\\n\", \"output\": [\"4607159 4607158 4607159\"]}, {\"input\": \"17 5 370710486 2 1\\r\\n\", \"output\": [\"4633882 2316941 4633881\"]}, {\"input\": \"88 91 6317 70 16\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"19 73 1193 12 46\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"84 10 405 68 8\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"92 80 20 9 69\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"69 21 203 13 16\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"63 22 1321 61 15\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"56 83 4572 35 22\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"36 19 684 20 15\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"33 2 1 8 2\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"76 74 1 38 39\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"1 71 1000000000000000000 1 5\\r\\n\", \"output\": [\"14084507042253522 14084507042253521 14084507042253522\", \"14084507042253522 14084507042253521 14084507042253522\"]}, {\"input\": \"13 89 1000000000000000000 10 14\\r\\n\", \"output\": [\"936329588014982 468164794007491 936329588014982\"]}, {\"input\": \"1 35 1000000000000000000 1 25\\r\\n\", \"output\": [\"28571428571428572 28571428571428571 28571428571428571\", \"28571428571428572 28571428571428571 28571428571428571\"]}, {\"input\": \"81 41 1000000000000000000 56 30\\r\\n\", \"output\": [\"304878048780488 152439024390244 304878048780488\"]}, {\"input\": \"4 39 1000000000000000000 3 32\\r\\n\", \"output\": [\"8547008547008547 4273504273504273 8547008547008547\"]}, {\"input\": \"21 49 1000000000000000000 18 11\\r\\n\", \"output\": [\"1020408163265307 510204081632653 1020408163265306\"]}, {\"input\": \"91 31 1000000000000000000 32 7\\r\\n\", \"output\": [\"358422939068101 179211469534050 358422939068101\"]}, {\"input\": \"51 99 1000000000000000000 48 79\\r\\n\", \"output\": [\"202020202020203 101010101010101 202020202020202\"]}, {\"input\": \"5 99 1000000000000000000 4 12\\r\\n\", \"output\": [\"2525252525252526 1262626262626263 2525252525252525\"]}, {\"input\": \"100 100 1000000000000000000 1 1\\r\\n\", \"output\": [\"101010101010101 50505050505051 50505050505051\"]}, {\"input\": \"100 100 1000000000000000000 31 31\\r\\n\", \"output\": [\"101010101010101 50505050505051 101010101010101\"]}, {\"input\": \"1 100 1000000000000000000 1 1\\r\\n\", \"output\": [\"10000000000000000 10000000000000000 10000000000000000\", \"10000000000000000 10000000000000000 10000000000000000\"]}, {\"input\": \"1 100 1000000000000000000 1 35\\r\\n\", \"output\": [\"10000000000000000 10000000000000000 10000000000000000\", \"10000000000000000 10000000000000000 10000000000000000\"]}, {\"input\": \"100 1 1000000000000000000 1 1\\r\\n\", \"output\": [\"10101010101010101 5050505050505051 5050505050505051\"]}, {\"input\": \"100 1 1000000000000000000 35 1\\r\\n\", \"output\": [\"10101010101010101 5050505050505051 10101010101010101\"]}, {\"input\": \"1 1 1000000000000000000 1 1\\r\\n\", \"output\": [\"1000000000000000000 1000000000000000000 1000000000000000000\", \"1000000000000000000 1000000000000000000 1000000000000000000\"]}, {\"input\": \"3 2 5 1 1\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"100 100 10001 1 1\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"1 5 7 1 3\\r\\n\", \"output\": [\"2 1 1\", \"2 1 1\"]}, {\"input\": \"2 2 7 1 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"4 1 5 3 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"2 3 4 2 3\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"3 5 21 1 2\\r\\n\", \"output\": [\"2 1 1\"]}, {\"input\": \"2 4 14 1 1\\r\\n\", \"output\": [\"2 1 2\"]}, {\"input\": \"5 9 8 5 4\\r\\n\", \"output\": [\"1 0 0\"]}, {\"input\": \"2 6 4 1 3\\r\\n\", \"output\": [\"1 0 1\"]}, {\"input\": \"1 5 9 1 1\\r\\n\", \"output\": [\"2 1 2\", \"2 1 2\"]}, {\"input\": \"1 5 3 1 2\\r\\n\", \"output\": [\"1 0 1\", \"1 0 1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 30 766048376 1 23\\r\\n', 'output': ['8511649 4255824 4255825']}, {'input': '4 1 5 3 1\\r\\n', 'output': ['2 1 2']}, {'input': '1 100 1000000000000000000 1 35\\r\\n', 'output': ['10000000000000000 10000000000000000 10000000000000000', '10000000000000000 10000000000000000 10000000000000000']}, {'input': '100 100 1 23 39\\r\\n', 'output': ['1 0 0']}, {'input': '3 3 26 1 1\\r\\n', 'output': ['4 2 3']}]","human_sample_testcases_2":"[{'input': '4 5 93 1 2\\r\\n', 'output': ['6 3 4']}, {'input': '2 6 4 1 3\\r\\n', 'output': ['1 0 1']}, {'input': '3 1 6 2 1\\r\\n', 'output': ['3 1 3']}, {'input': '5 99 1000000000000000000 4 12\\r\\n', 'output': ['2525252525252526 1262626262626263 2525252525252525']}, {'input': '3 5 21 1 2\\r\\n', 'output': ['2 1 1']}]","human_sample_testcases_3":"[{'input': '7 32 461672865 4 11\\r\\n', 'output': ['2404547 1202273 2404546']}, {'input': '2 3 4 2 3\\r\\n', 'output': ['1 0 0']}, {'input': '56 83 4572 35 22\\r\\n', 'output': ['1 0 1']}, {'input': '19 73 1193 12 46\\r\\n', 'output': ['1 0 1']}, {'input': '4 2 9 4 2\\r\\n', 'output': ['2 1 1']}]","human_sample_testcases_4":"[{'input': '91 15 237966754 78 6\\r\\n', 'output': ['176272 88136 176272']}, {'input': '27 34 77794947 24 4\\r\\n', 'output': ['88004 44002 88004']}, {'input': '4 1 8 3 1\\r\\n', 'output': ['3 1 2']}, {'input': '100 100 1000000000000000000 1 1\\r\\n', 'output': ['101010101010101 50505050505051 50505050505051']}, {'input': '92 10 551902461 1 6\\r\\n', 'output': ['606487 303243 303244']}]","human_sample_testcases_5":"[{'input': '4 5 93 1 2\\r\\n', 'output': ['6 3 4']}, {'input': '5 3 100 2 1\\r\\n', 'output': ['9 4 9']}, {'input': '10 44 222787770 9 25\\r\\n', 'output': ['562596 281298 562596']}, {'input': '56 83 4572 35 22\\r\\n', 'output': ['1 0 1']}, {'input': '2 6 4 1 3\\r\\n', 'output': ['1 0 1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.65,"human_sample_line_coverage_2":84.78,"human_sample_line_coverage_3":84.78,"human_sample_line_coverage_4":84.78,"human_sample_line_coverage_5":84.78,"human_sample_branch_coverage_1":97.83,"human_sample_branch_coverage_2":82.61,"human_sample_branch_coverage_3":80.43,"human_sample_branch_coverage_4":76.09,"human_sample_branch_coverage_5":82.61,"id":290,"human_sample_pass_rate":100.0,"human_sample_line_coverage":86.954,"human_sample_branch_coverage":83.914} {"sample_inputs":"[\"5 2 3\", \"8 2 4\"]","input_specification":"The only line contains three integers n,\u2009b,\u2009p (1\u2009\u2264\u2009n,\u2009b,\u2009p\u2009\u2264\u2009500) \u2014 the number of participants and the parameters described in the problem statement.","src_uid":"eb815f35e9f29793a120d120968cfe34","source_code":"import java.util.Scanner;\n\n\/**\n * Created by Peter on 13.04.2016.\n *\/\npublic class TaskA {\n int n, b, p;\n TaskA(Scanner sc) {\n n = sc.nextInt();\n b = sc.nextInt();\n p = sc.nextInt();\n\n\n }\n private int getGamePlayed() {\n int nn = n;\n int ans = 0;\n while (nn > 1 ) {\n int k = 1;\n while (k*2 <= nn) {\n k *= 2;\n }\n ans += k\/2;\n nn = nn - k\/2;\n\n }\n return ans;\n }\n\n private void solve(){\n int totalP = p * n;\n int gamePlayed = getGamePlayed();\n int totalB = gamePlayed * (2 * b + 1);\n System.out.printf(\"%d %d\", totalB, totalP);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n new TaskA(sc).solve();\n sc.close();\n }\n}\n","sample_outputs":"[\"20 15\", \"35 32\"]","lang_cluster":"Java","notes":"NoteIn the first example will be three rounds: in the first round will be two matches and for each match 5 bottles of water are needed (two for each of the participants and one for the judge), in the second round will be only one match, so we need another 5 bottles of water, in the third round will also be only one match, so we need another 5 bottles of water. So in total we need 20 bottles of water.In the second example no participant will move on to some round directly.","output_specification":"Print two integers x and y \u2014 the number of bottles and towels need for the tournament.","description":"A tennis tournament with n participants is running. The participants are playing by an olympic system, so the winners move on and the losers drop out.The tournament takes place in the following way (below, m is the number of the participants of the current round): let k be the maximal power of the number 2 such that k\u2009\u2264\u2009m, k participants compete in the current round and a half of them passes to the next round, the other m\u2009-\u2009k participants pass to the next round directly, when only one participant remains, the tournament finishes. Each match requires b bottles of water for each participant and one bottle for the judge. Besides p towels are given to each participant for the whole tournament.Find the number of bottles and towels needed for the tournament.Note that it's a tennis tournament so in each match two participants compete (one of them will win and the other will lose).","human_testcases":"[{\"input\": \"5 2 3\\r\\n\", \"output\": [\"20\\r\\n15\", \"20 15\"]}, {\"input\": \"8 2 4\\r\\n\", \"output\": [\"35\\r\\n32\", \"35 32\"]}, {\"input\": \"10 1 500\\r\\n\", \"output\": [\"27 5000\", \"27\\r\\n5000\"]}, {\"input\": \"20 500 1\\r\\n\", \"output\": [\"19019\\r\\n20\", \"19019 20\"]}, {\"input\": \"100 123 99\\r\\n\", \"output\": [\"24453\\r\\n9900\", \"24453 9900\"]}, {\"input\": \"500 1 1\\r\\n\", \"output\": [\"1497 500\", \"1497\\r\\n500\"]}, {\"input\": \"500 500 500\\r\\n\", \"output\": [\"499499\\r\\n250000\", \"499499 250000\"]}, {\"input\": \"500 237 474\\r\\n\", \"output\": [\"237025 237000\", \"237025\\r\\n237000\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"0\\r\\n3\", \"0 3\"]}, {\"input\": \"1 2 133\\r\\n\", \"output\": [\"0 133\", \"0\\r\\n133\"]}, {\"input\": \"1 2 100\\r\\n\", \"output\": [\"0 100\", \"0\\r\\n100\"]}, {\"input\": \"1 3 4\\r\\n\", \"output\": [\"0\\r\\n4\", \"0 4\"]}, {\"input\": \"1 10 15\\r\\n\", \"output\": [\"0 15\", \"0\\r\\n15\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 2 5\\r\\n\", \"output\": [\"0 5\", \"0\\r\\n5\"]}, {\"input\": \"1 500 500\\r\\n\", \"output\": [\"0\\r\\n500\", \"0 500\"]}, {\"input\": \"1 3 8\\r\\n\", \"output\": [\"0 8\", \"0\\r\\n8\"]}, {\"input\": \"10 10 10\\r\\n\", \"output\": [\"189\\r\\n100\", \"189 100\"]}, {\"input\": \"1 3 5\\r\\n\", \"output\": [\"0 5\", \"0\\r\\n5\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 2 4\\r\\n\", \"output\": [\"0\\r\\n4\", \"0 4\"]}, {\"input\": \"1 10 10\\r\\n\", \"output\": [\"0\\r\\n10\", \"0 10\"]}, {\"input\": \"1 345 345\\r\\n\", \"output\": [\"0 345\", \"0\\r\\n345\"]}, {\"input\": \"7 12 13\\r\\n\", \"output\": [\"150\\r\\n91\", \"150 91\"]}, {\"input\": \"1 500 1\\r\\n\", \"output\": [\"0 1\", \"0\\r\\n1\"]}, {\"input\": \"1 12 13\\r\\n\", \"output\": [\"0 13\", \"0\\r\\n13\"]}, {\"input\": \"1 500 499\\r\\n\", \"output\": [\"0\\r\\n499\", \"0 499\"]}, {\"input\": \"1 100 90\\r\\n\", \"output\": [\"0 90\", \"0\\r\\n90\"]}, {\"input\": \"2 100 90\\r\\n\", \"output\": [\"201 180\", \"201\\r\\n180\"]}, {\"input\": \"53 1 1\\r\\n\", \"output\": [\"156\\r\\n53\", \"156 53\"]}, {\"input\": \"73 73 73\\r\\n\", \"output\": [\"10584 5329\", \"10584\\r\\n5329\"]}, {\"input\": \"67 1 1\\r\\n\", \"output\": [\"198 67\", \"198\\r\\n67\"]}, {\"input\": \"63 1 1\\r\\n\", \"output\": [\"186\\r\\n63\", \"186 63\"]}, {\"input\": \"59 1 1\\r\\n\", \"output\": [\"174\\r\\n59\", \"174 59\"]}, {\"input\": \"57 1 1\\r\\n\", \"output\": [\"168 57\", \"168\\r\\n57\"]}, {\"input\": \"13 1 1\\r\\n\", \"output\": [\"36 13\", \"36\\r\\n13\"]}, {\"input\": \"349 2 5\\r\\n\", \"output\": [\"1740\\r\\n1745\", \"1740 1745\"]}, {\"input\": \"456 456 456\\r\\n\", \"output\": [\"415415\\r\\n207936\", \"415415 207936\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 1 500\\r\\n', 'output': ['27 5000', '27\\r\\n5000']}, {'input': '1 2 100\\r\\n', 'output': ['0 100', '0\\r\\n100']}, {'input': '1 3 4\\r\\n', 'output': ['0\\r\\n4', '0 4']}, {'input': '53 1 1\\r\\n', 'output': ['156\\r\\n53', '156 53']}, {'input': '67 1 1\\r\\n', 'output': ['198 67', '198\\r\\n67']}]","human_sample_testcases_2":"[{'input': '349 2 5\\r\\n', 'output': ['1740\\r\\n1745', '1740 1745']}, {'input': '1 100 90\\r\\n', 'output': ['0 90', '0\\r\\n90']}, {'input': '1 2 1\\r\\n', 'output': ['0 1', '0\\r\\n1']}, {'input': '20 500 1\\r\\n', 'output': ['19019\\r\\n20', '19019 20']}, {'input': '1 500 499\\r\\n', 'output': ['0\\r\\n499', '0 499']}]","human_sample_testcases_3":"[{'input': '10 1 500\\r\\n', 'output': ['27 5000', '27\\r\\n5000']}, {'input': '53 1 1\\r\\n', 'output': ['156\\r\\n53', '156 53']}, {'input': '1 3 5\\r\\n', 'output': ['0 5', '0\\r\\n5']}, {'input': '1 2 133\\r\\n', 'output': ['0 133', '0\\r\\n133']}, {'input': '57 1 1\\r\\n', 'output': ['168 57', '168\\r\\n57']}]","human_sample_testcases_4":"[{'input': '1 100 90\\r\\n', 'output': ['0 90', '0\\r\\n90']}, {'input': '10 10 10\\r\\n', 'output': ['189\\r\\n100', '189 100']}, {'input': '1 500 500\\r\\n', 'output': ['0\\r\\n500', '0 500']}, {'input': '1 345 345\\r\\n', 'output': ['0 345', '0\\r\\n345']}, {'input': '10 1 500\\r\\n', 'output': ['27 5000', '27\\r\\n5000']}]","human_sample_testcases_5":"[{'input': '1 3 4\\r\\n', 'output': ['0\\r\\n4', '0 4']}, {'input': '1 2 133\\r\\n', 'output': ['0 133', '0\\r\\n133']}, {'input': '1 12 13\\r\\n', 'output': ['0 13', '0\\r\\n13']}, {'input': '67 1 1\\r\\n', 'output': ['198 67', '198\\r\\n67']}, {'input': '1 1 1\\r\\n', 'output': ['0 1', '0\\r\\n1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":291,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4 5\\n2 3 1 4 4\", \"3 3\\n3 1 2\"]","input_specification":"The first line contains two integer numbers n, m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u2009100). The second line contains m integer numbers l1,\u2009l2,\u2009...,\u2009lm (1\u2009\u2264\u2009li\u2009\u2264\u2009n) \u2014 indices of leaders in the beginning of each step.","src_uid":"4a7c959ca279d0a9bd9bbf0ce88cf72b","source_code":"import java.io.BufferedReader;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\n\nimport java.util.StringTokenizer;\n\n public class Test\n {\n static PrintWriter pw = new PrintWriter(System.out);\n static ArrayList list = new ArrayList();\n \n public static void main(String[] args)throws Exception\n {\n Reader.init(System.in);\n int n = Reader.nextInt();\n int k = Reader.nextInt();\n HashMap set = new HashMap();\n boolean[] flags = new boolean[n+1];\n int[] res = new int[n+1];\n int[] game = new int[k];\n int count = 0;\n int temp = 0;\n \n\n for(int i = 0 ; ia)\n temp = b - a;\n else\n temp = b + (n-a);\n \n \n if(set.containsKey(temp) && set.get(temp) != a)\n {\n pw.print(-1);\n pw.close();\n return;\n }\n else if(res[a] != 0 && res[a] != temp)\n {\n pw.print(-1);\n pw.close();\n return;\n }\n else if(!set.containsKey(res[a]))\n {\n \n set.put(temp , a);\n res[a] = temp;\n count ++;\n flags[res[a]] = true;\n }\n \n \n \n \n }\n \n if(count itr = list.iterator();\n \n for(int i = 1 ; i<=n ; i++)\n if(res[i] == 0)\n {\n str.append(itr.next()).append(\" \");\n \n }\n else\n str.append(res[i]).append(\" \");\n \n pw.print(str);\n pw.close();\n }\n \n}\n\nclass Reader {\n\n static BufferedReader reader;\n static StringTokenizer tokenizer;\n\n public static int pars(String x) {\n int num = 0;\n int i = 0;\n if (x.charAt(0) == '-') {\n i = 1;\n }\n for (; i < x.length(); i++) {\n num = num * 10 + (x.charAt(i) - '0');\n }\n\n if (x.charAt(0) == '-') {\n return -num;\n }\n\n return num;\n }\n\n static void init(InputStream input) {\n reader = new BufferedReader(\n new InputStreamReader(input));\n tokenizer = new StringTokenizer(\"\");\n }\n\n static void init(FileReader input) {\n reader = new BufferedReader(input);\n tokenizer = new StringTokenizer(\"\");\n }\n\n static String next() throws IOException {\n while (!tokenizer.hasMoreTokens()) {\n tokenizer = new StringTokenizer(\n reader.readLine());\n }\n return tokenizer.nextToken();\n }\n\n static int nextInt() throws IOException {\n return pars(next());\n }\n\n static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n}","sample_outputs":"[\"3 1 2 4\", \"-1\"]","lang_cluster":"Java","notes":"NoteLet's follow leadership in the first example: Child 2 starts. Leadership goes from 2 to 2\u2009+\u2009a2\u2009=\u20093. Leadership goes from 3 to 3\u2009+\u2009a3\u2009=\u20095. As it's greater than 4, it's going in a circle to 1. Leadership goes from 1 to 1\u2009+\u2009a1\u2009=\u20094. Leadership goes from 4 to 4\u2009+\u2009a4\u2009=\u20098. Thus in circle it still remains at 4. ","output_specification":"Print such permutation of n numbers a1,\u2009a2,\u2009...,\u2009an that leaders in the game will be exactly l1,\u2009l2,\u2009...,\u2009lm if all the rules are followed. If there are multiple solutions print any of them. If there is no permutation which satisfies all described conditions print -1.","description":"n children are standing in a circle and playing a game. Children's numbers in clockwise order form a permutation a1,\u2009a2,\u2009...,\u2009an of length n. It is an integer sequence such that each integer from 1 to n appears exactly once in it.The game consists of m steps. On each step the current leader with index i counts out ai people in clockwise order, starting from the next person. The last one to be pointed at by the leader becomes the new leader.You are given numbers l1,\u2009l2,\u2009...,\u2009lm \u2014 indices of leaders in the beginning of each step. Child with number l1 is the first leader in the game. Write a program which will restore a possible permutation a1,\u2009a2,\u2009...,\u2009an. If there are multiple solutions then print any of them. If there is no solution then print -1.","human_testcases":"[{\"input\": \"4 5\\r\\n2 3 1 4 4\\r\\n\", \"output\": [\"3 1 2 4\"]}, {\"input\": \"3 3\\r\\n3 1 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1 100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 8\\r\\n2 5 4 2 5 4 2 5\\r\\n\", \"output\": [\"1 3 2 4 5 6\"]}, {\"input\": \"100 1\\r\\n6\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\"]}, {\"input\": \"10 5\\r\\n7 7 9 9 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"10 20\\r\\n10 1 5 7 1 2 5 3 6 3 9 4 3 4 9 6 8 4 9 6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"20 15\\r\\n11 19 1 8 17 12 3 1 8 17 12 3 1 8 17\\r\\n\", \"output\": [\"7 1 18 3 4 5 6 9 10 12 8 11 13 14 16 17 15 19 2 20\"]}, {\"input\": \"100 100\\r\\n96 73 23 74 35 44 75 13 62 50 76 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63 29 45 24 63\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 10 11 12 13 49 14 15 17 18 19 20 21 22 23 51 39 24 25 27 28 16 29 30 32 33 34 9 35 36 37 40 41 42 43 44 31 79 45 46 47 48 26 52 53 54 55 56 57 58 59 60 62 63 88 66 64 65 67 68 69 70 71 72 73 50 61 38 87 74 75 76 78 80 81 82 83 84 85 86 89 90 91 92 93 94 95 96 77 97 98 99 100\"]}, {\"input\": \"100 100\\r\\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77 63 17 62 91\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"20 20\\r\\n1 20 2 19 3 18 4 17 5 16 6 15 7 14 8 13 9 12 10 11\\r\\n\", \"output\": [\"19 17 15 13 11 9 7 5 3 1 20 18 16 14 12 10 8 6 4 2\"]}, {\"input\": \"20 5\\r\\n1 20 2 19 3\\r\\n\", \"output\": [\"19 17 1 3 5 6 7 8 9 10 11 12 13 14 15 16 18 20 4 2\"]}, {\"input\": \"19 19\\r\\n1 19 2 18 3 17 4 16 5 15 6 14 7 13 8 12 9 11 10\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"100 100\\r\\n1 99 2 98 3 97 4 96 5 95 6 94 7 93 8 92 9 91 10 90 11 89 12 88 13 87 14 86 15 85 16 84 17 83 18 82 19 81 20 80 21 79 22 78 23 77 24 76 25 75 26 74 27 73 28 72 29 71 30 70 31 69 32 68 33 67 34 66 35 65 36 64 37 63 38 62 39 61 40 60 41 59 42 58 43 57 44 56 45 55 46 54 47 53 48 52 49 51 50 50\\r\\n\", \"output\": [\"98 96 94 92 90 88 86 84 82 80 78 76 74 72 70 68 66 64 62 60 58 56 54 52 50 48 46 44 42 40 38 36 34 32 30 28 26 24 22 20 18 16 14 12 10 8 6 4 2 100 99 97 95 93 91 89 87 85 83 81 79 77 75 73 71 69 67 65 63 61 59 57 55 53 51 49 47 45 43 41 39 37 35 33 31 29 27 25 23 21 19 17 15 13 11 9 7 5 3 1\"]}, {\"input\": \"51 18\\r\\n8 32 24 19 1 29 49 24 39 33 5 37 37 26 17 28 2 19\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5 5\\r\\n1 2 5 2 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"6 6\\r\\n1 2 1 1 3 6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 4\\r\\n4 3 4 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 3\\r\\n2 2 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 6\\r\\n1 1 2 4 4 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"9 4\\r\\n8 2 8 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 6\\r\\n2 3 1 4 4 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 3\\r\\n1 1 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5 7\\r\\n4 3 4 3 3 4 5\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 9\\r\\n1 1 1 1 2 1 1 1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 4\\r\\n2 4 4 4\\r\\n\", \"output\": [\"1 2 3 4\"]}, {\"input\": \"3 3\\r\\n1 1 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 5\\r\\n1 2 2 1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 4\\r\\n1 4 1 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 4\\r\\n1 3 1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 4\\r\\n1 4 1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"66 67\\r\\n19 9 60 40 19 48 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 3\\r\\n3 3 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"27 28\\r\\n8 18 27 24 20 8 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 3\\r\\n1 1 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 4\\r\\n2 4 2 3\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 3\\r\\n2 2 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 2\\r\\n2 2\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"3 4\\r\\n2 3 3 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5 6\\r\\n1 4 4 2 1 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 3\\r\\n2 3 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 3\\r\\n1 2 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"10 4\\r\\n5 6 5 7\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 3\\r\\n1 1 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 5\\r\\n1 4 1 3 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"6 5\\r\\n1 2 4 1 3\\r\\n\", \"output\": [\"-1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 4\\r\\n1 4 1 1\\r\\n', 'output': ['-1']}, {'input': '10 20\\r\\n10 1 5 7 1 2 5 3 6 3 9 4 3 4 9 6 8 4 9 6\\r\\n', 'output': ['-1']}, {'input': '66 67\\r\\n19 9 60 40 19 48 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5\\r\\n', 'output': ['-1']}, {'input': '4 4\\r\\n2 4 2 3\\r\\n', 'output': ['-1']}, {'input': '3 3\\r\\n2 2 3\\r\\n', 'output': ['-1']}]","human_sample_testcases_2":"[{'input': '20 5\\r\\n1 20 2 19 3\\r\\n', 'output': ['19 17 1 3 5 6 7 8 9 10 11 12 13 14 15 16 18 20 4 2']}, {'input': '6 5\\r\\n1 2 4 1 3\\r\\n', 'output': ['-1']}, {'input': '2 3\\r\\n1 1 2\\r\\n', 'output': ['-1']}, {'input': '2 5\\r\\n1 2 2 1 1\\r\\n', 'output': ['-1']}, {'input': '66 67\\r\\n19 9 60 40 19 48 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5 58 5\\r\\n', 'output': ['-1']}]","human_sample_testcases_3":"[{'input': '3 3\\r\\n3 1 2\\r\\n', 'output': ['-1']}, {'input': '2 3\\r\\n2 2 1\\r\\n', 'output': ['-1']}, {'input': '6 8\\r\\n2 5 4 2 5 4 2 5\\r\\n', 'output': ['1 3 2 4 5 6']}, {'input': '20 5\\r\\n1 20 2 19 3\\r\\n', 'output': ['19 17 1 3 5 6 7 8 9 10 11 12 13 14 15 16 18 20 4 2']}, {'input': '19 19\\r\\n1 19 2 18 3 17 4 16 5 15 6 14 7 13 8 12 9 11 10\\r\\n', 'output': ['-1']}]","human_sample_testcases_4":"[{'input': '2 3\\r\\n2 2 1\\r\\n', 'output': ['-1']}, {'input': '6 5\\r\\n1 2 4 1 3\\r\\n', 'output': ['-1']}, {'input': '2 3\\r\\n1 1 2\\r\\n', 'output': ['-1']}, {'input': '10 5\\r\\n7 7 9 9 3\\r\\n', 'output': ['-1']}, {'input': '4 3\\r\\n2 3 4\\r\\n', 'output': ['-1']}]","human_sample_testcases_5":"[{'input': '10 5\\r\\n7 7 9 9 3\\r\\n', 'output': ['-1']}, {'input': '4 6\\r\\n2 3 1 4 4 1\\r\\n', 'output': ['-1']}, {'input': '4 5\\r\\n2 3 1 4 4\\r\\n', 'output': ['3 1 2 4']}, {'input': '27 28\\r\\n8 18 27 24 20 8 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23\\r\\n', 'output': ['-1']}, {'input': '4 3\\r\\n2 3 4\\r\\n', 'output': ['-1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":70.45,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":70.45,"human_sample_line_coverage_5":90.91,"human_sample_branch_coverage_1":46.15,"human_sample_branch_coverage_2":84.62,"human_sample_branch_coverage_3":96.15,"human_sample_branch_coverage_4":46.15,"human_sample_branch_coverage_5":65.38,"id":292,"human_sample_pass_rate":100.0,"human_sample_line_coverage":86.362,"human_sample_branch_coverage":67.69} {"sample_inputs":"[\"abacaba\", \"jinotega\"]","input_specification":"In the only line of input there is a string S of lowercase English letters (1\u2009\u2264\u2009|S|\u2009\u2264\u2009500)\u00a0\u2014 the identifiers of a program with removed whitespace characters.","src_uid":"c4551f66a781b174f95865fa254ca972","source_code":"\nimport java.util.HashMap;\nimport java.util.Scanner;\n\npublic class CODE_OBSTUFICATIION {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner nik = new Scanner(System.in);\n\t\tString s = nik.next();\n\t\tboolean b = true;\n\t\tHashMap hm = new HashMap<>();\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tint temp = s.charAt(i) - 'a';\n\t\t\tif (hm.size() < temp) {\n\t\t\t\tb = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\thm.put(s.charAt(i), hm.getOrDefault(s.charAt(i) + 1, 0));\n\t\t\t}\n\n\t\t}\n\n\t\tSystem.out.println(b == true ? \"YES\" : \"NO\");\n\n\t}\n\n}\n","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Java","notes":"NoteIn the first sample case, one possible list of identifiers would be \"number string number character number string number\". Here how Kostya would obfuscate the program: replace all occurences of number with a, the result would be \"a string a character a string a\", replace all occurences of string with b, the result would be \"a b a character a b a\", replace all occurences of character with c, the result would be \"a b a c a b a\", all identifiers have been replaced, thus the obfuscation is finished.","output_specification":"If this program can be a result of Kostya's obfuscation, print \"YES\" (without quotes), otherwise print \"NO\".","description":"Kostya likes Codeforces contests very much. However, he is very disappointed that his solutions are frequently hacked. That's why he decided to obfuscate (intentionally make less readable) his code before upcoming contest.To obfuscate the code, Kostya first looks at the first variable name used in his program and replaces all its occurrences with a single symbol a, then he looks at the second variable name that has not been replaced yet, and replaces all its occurrences with b, and so on. Kostya is well-mannered, so he doesn't use any one-letter names before obfuscation. Moreover, there are at most 26 unique identifiers in his programs.You are given a list of identifiers of some program with removed spaces and line breaks. Check if this program can be a result of Kostya's obfuscation.","human_testcases":"[{\"input\": \"abacaba\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"jinotega\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aba\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bab\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"a\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"abcdefghijklmnopqrstuvwxyz\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"fihyxmbnzq\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aamlaswqzotaanasdhcvjoaiwdhctezzawagkdgfffeqkyrvbcrfqgkdsvximsnvmkmjyofswmtjdoxgwamsaatngenqvsvrvwlbzuoeaolfcnmdacrmdleafbsmerwmxzyylfhemnkoayuhtpbikm\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"darbbbcwynbbbbaacbkvbakavabbbabzajlbajryaabbbccxraakgniagbtsswcfbkubdmcasccepybkaefcfsbzdddxgcjadybcfjtmqbspflqrdghgfwnccfveogdmifkociqscahdejctacwzbkhihajfilrgcjiofwfklifobozikcmvcfeqlidrgsgdfxffaaebzjxngsjxiclyolhjokqpdbfffooticxsezpgqkhhzmbmqgskkqvefzyijrwhpftcmbedmaflapmeljaudllojfpgfkpvgylaglrhrslxlprbhgknrctilngqccbddvpamhifsbmyowohczizjcbleehfrecjbqtxertnpfmalejmbxkhkkbyopuwlhkxuqellsybgcndvniyyxfoufalstdsdfjoxlnmigkqwmgojsppaannfstxytelluvvkdcezlqfsperwyjsdsmkvgjdbksswamhmoukcawiigkggztr\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"bbbbbb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aabbbd\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abdefghijklmnopqrstuvwxyz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcdeghijklmnopqrstuvwxyz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcdefghijklmnopqrsuvwxyz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcdefghijklmnopqrstuvwxy\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"abcdefghijklmnopqrsutvwxyz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"acdef\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"z\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababaaababaabababccbabdbcbadccacdbdedabbeecbcabbdcaecdabbedddafeffaccgeacefbcahabfiiegecdbebabhhbdgfeghhbfahgagefbgghdbhadeicbdfgdchhefhigfcgdhcihecacfhadfgfejccibcjkfhbigbealjjkfldiecfdcafbamgfkbjlbifldghmiifkkglaflmjfmkfdjlbliijkgfdelklfnadbifgbmklfbqkhirhcadoadhmjrghlmelmjfpakqkdfcgqdkaeqpbcdoeqglqrarkipncckpfmajrqsfffldegbmahsfcqdfdqtrgrouqajgsojmmukptgerpanpcbejmergqtavwsvtveufdseuemwrhfmjqinxjodddnpcgqullrhmogflsxgsbapoghortiwcovejtinncozk\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbabbbabbaaabbaaaaabaabbaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aababbabbaabbbbbaabababaabbbaaaaabbabbabbaabbbbabaabbaaababbaaacbbabbbbbbcbcababbccaaacbaccaccaababbccaacccaabaaccaaabacacbaabacbaacbaaabcbbbcbbaacaabcbcbccbacabbcbabcaccaaaaaabcbacabcbabbbbbabccbbcacbaaabbccbbaaaaaaaaaaaadbbbabdacabdaddddbaabbddbdabbdacbacbacaaaabbacadbcddddadaddabbdccaddbaaacbceebbceadbeaadecddbbbcaaecbdeaebaddbbdebbcbaabcacbdcdc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbaabaabaababbbabbacacbbbacbbaaaabbccacbaabaaccbbbbbcbbbacabbccaaabbaaacabcbacbcabbbbecbecadcbacbaadeeadabeacdebccdbbcaecdbeeebbebcaaaeacdcbdeccdbbdcdebdcbdacebcecbacddeeaebcedffedfggbeedceacaecagdfedfabcfchffceachgcbicbcffeeebgcgiefcafhibhceiedgbfebbccegbehhibhhfedbaeedbghggffehggaeaidifhdhaggdjcfjhiaieaichjacedchejg\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"b\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"ac\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"cde\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abd\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"zx\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"bcd\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaac\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aacb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"acd\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcdefghijklmnopqrstuvwxyzz\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bc\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaad\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"abcb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aac\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcbcb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abbb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bbb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"x\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaazz\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"acbccccccccccc\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"za\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"ade\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"bbbbbbbbbb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"bac\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"bcddcb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaacb\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaac\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"aaaaaaaaaaad\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"c\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"abcccccccc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aaaaaaac\\r\\n\", \"output\": [\"No\", \"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'bb\\r\\n', 'output': ['No', 'NO']}, {'input': 'aaaaaaaaaaa\\r\\n', 'output': ['YES']}, {'input': 'darbbbcwynbbbbaacbkvbakavabbbabzajlbajryaabbbccxraakgniagbtsswcfbkubdmcasccepybkaefcfsbzdddxgcjadybcfjtmqbspflqrdghgfwnccfveogdmifkociqscahdejctacwzbkhihajfilrgcjiofwfklifobozikcmvcfeqlidrgsgdfxffaaebzjxngsjxiclyolhjokqpdbfffooticxsezpgqkhhzmbmqgskkqvefzyijrwhpftcmbedmaflapmeljaudllojfpgfkpvgylaglrhrslxlprbhgknrctilngqccbddvpamhifsbmyowohczizjcbleehfrecjbqtxertnpfmalejmbxkhkkbyopuwlhkxuqellsybgcndvniyyxfoufalstdsdfjoxlnmigkqwmgojsppaannfstxytelluvvkdcezlqfsperwyjsdsmkvgjdbksswamhmoukcawiigkggztr\\r\\n', 'output': ['No', 'NO']}, {'input': 'cde\\r\\n', 'output': ['No', 'NO']}, {'input': 'abcbcb\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': 'aacb\\r\\n', 'output': ['No', 'NO']}, {'input': 'aabbbd\\r\\n', 'output': ['No', 'NO']}, {'input': 'aaac\\r\\n', 'output': ['No', 'NO']}, {'input': 'bc\\r\\n', 'output': ['No', 'NO']}, {'input': 'abcdeghijklmnopqrstuvwxyz\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_3":"[{'input': 'ade\\r\\n', 'output': ['No', 'NO']}, {'input': 'bcd\\r\\n', 'output': ['No', 'NO']}, {'input': 'darbbbcwynbbbbaacbkvbakavabbbabzajlbajryaabbbccxraakgniagbtsswcfbkubdmcasccepybkaefcfsbzdddxgcjadybcfjtmqbspflqrdghgfwnccfveogdmifkociqscahdejctacwzbkhihajfilrgcjiofwfklifobozikcmvcfeqlidrgsgdfxffaaebzjxngsjxiclyolhjokqpdbfffooticxsezpgqkhhzmbmqgskkqvefzyijrwhpftcmbedmaflapmeljaudllojfpgfkpvgylaglrhrslxlprbhgknrctilngqccbddvpamhifsbmyowohczizjcbleehfrecjbqtxertnpfmalejmbxkhkkbyopuwlhkxuqellsybgcndvniyyxfoufalstdsdfjoxlnmigkqwmgojsppaannfstxytelluvvkdcezlqfsperwyjsdsmkvgjdbksswamhmoukcawiigkggztr\\r\\n', 'output': ['No', 'NO']}, {'input': 'bc\\r\\n', 'output': ['No', 'NO']}, {'input': 'aaaaac\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_4":"[{'input': 'za\\r\\n', 'output': ['No', 'NO']}, {'input': 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaababaaababaabababccbabdbcbadccacdbdedabbeecbcabbdcaecdabbedddafeffaccgeacefbcahabfiiegecdbebabhhbdgfeghhbfahgagefbgghdbhadeicbdfgdchhefhigfcgdhcihecacfhadfgfejccibcjkfhbigbealjjkfldiecfdcafbamgfkbjlbifldghmiifkkglaflmjfmkfdjlbliijkgfdelklfnadbifgbmklfbqkhirhcadoadhmjrghlmelmjfpakqkdfcgqdkaeqpbcdoeqglqrarkipncckpfmajrqsfffldegbmahsfcqdfdqtrgrouqajgsojmmukptgerpanpcbejmergqtavwsvtveufdseuemwrhfmjqinxjodddnpcgqullrhmogflsxgsbapoghortiwcovejtinncozk\\r\\n', 'output': ['No', 'NO']}, {'input': 'fihyxmbnzq\\r\\n', 'output': ['No', 'NO']}, {'input': 'a\\r\\n', 'output': ['YES']}, {'input': 'abcccccccc\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': 'abd\\r\\n', 'output': ['No', 'NO']}, {'input': 'zx\\r\\n', 'output': ['No', 'NO']}, {'input': 'aaaaaaac\\r\\n', 'output': ['No', 'NO']}, {'input': 'aabbbd\\r\\n', 'output': ['No', 'NO']}, {'input': 'fihyxmbnzq\\r\\n', 'output': ['No', 'NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":66.67,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":66.67,"id":293,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":80.002} {"sample_inputs":"[\"20 2\\n9 19\", \"2 1\\n16 12\"]","input_specification":"The first line of input contains two integers a and b (1\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009100). The second line contains two integers c and d (1\u2009\u2264\u2009c,\u2009d\u2009\u2264\u2009100).","src_uid":"158cb12d45f4ee3368b94b2b622693e7","source_code":"import java.util.Scanner;\n\npublic class A787 {\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint accel1 = scanner.nextInt();\n\t\tint initialVal1 = scanner.nextInt();\n\t\tint accel2 = scanner.nextInt();\n\t\tint initialVal2 = scanner.nextInt();\n\t\tint time = checkHit(accel1, initialVal1, accel2, initialVal2);\n\t\tSystem.out.println(time);\n\t}\n\n\tprivate static int checkHit(int accel1, int initialVal1, int accel2, int initialVal2) {\n\t\tif(initialVal1 % 2 != initialVal2 % 2 && accel1 % 2 == 0 && accel2 % 2 == 0)\n\t\t\treturn -1;\n\t\tint difference = initialVal2 - initialVal1;\n\t\tint i = 0;\n\t\tint j = 0;\n\t\twhile(i * accel1 - j * accel2 != difference) {\n\t\t\tif(i * accel1 - j * accel2 < difference)\n\t\t\t\ti++;\n\t\t\telse\n\t\t\t\tj++;\n\t\t\tif(i > accel1 * accel2 + 100|| j >= 100 + accel1 * accel2)\n\t\t\t\treturn -1;\n\t\t}\n\t\t\t\n\t\treturn accel1 * i + initialVal1;\n\t}\n}\n","sample_outputs":"[\"82\", \"-1\"]","lang_cluster":"Java","notes":"NoteIn the first sample testcase, Rick's 5th scream and Morty's 8th time are at time 82. In the second sample testcase, all Rick's screams will be at odd times and Morty's will be at even times, so they will never scream at the same time.","output_specification":"Print the first time Rick and Morty will scream at the same time, or \u2009-\u20091 if they will never scream at the same time.","description":"A monster is chasing after Rick and Morty on another planet. They're so frightened that sometimes they scream. More accurately, Rick screams at times b,\u2009b\u2009+\u2009a,\u2009b\u2009+\u20092a,\u2009b\u2009+\u20093a,\u2009... and Morty screams at times d,\u2009d\u2009+\u2009c,\u2009d\u2009+\u20092c,\u2009d\u2009+\u20093c,\u2009.... The Monster will catch them if at any point they scream at the same time, so it wants to know when it will catch them (the first time they scream at the same time) or that they will never scream at the same time.","human_testcases":"[{\"input\": \"20 2\\r\\n9 19\\r\\n\", \"output\": [\"82\"]}, {\"input\": \"2 1\\r\\n16 12\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"39 52\\r\\n88 78\\r\\n\", \"output\": [\"1222\"]}, {\"input\": \"59 96\\r\\n34 48\\r\\n\", \"output\": [\"1748\"]}, {\"input\": \"87 37\\r\\n91 29\\r\\n\", \"output\": [\"211\"]}, {\"input\": \"11 81\\r\\n49 7\\r\\n\", \"output\": [\"301\"]}, {\"input\": \"39 21\\r\\n95 89\\r\\n\", \"output\": [\"3414\"]}, {\"input\": \"59 70\\r\\n48 54\\r\\n\", \"output\": [\"1014\"]}, {\"input\": \"87 22\\r\\n98 32\\r\\n\", \"output\": [\"718\"]}, {\"input\": \"15 63\\r\\n51 13\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"39 7\\r\\n97 91\\r\\n\", \"output\": [\"1255\"]}, {\"input\": \"18 18\\r\\n71 71\\r\\n\", \"output\": [\"1278\"]}, {\"input\": \"46 71\\r\\n16 49\\r\\n\", \"output\": [\"209\"]}, {\"input\": \"70 11\\r\\n74 27\\r\\n\", \"output\": [\"2321\"]}, {\"input\": \"94 55\\r\\n20 96\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"18 4\\r\\n77 78\\r\\n\", \"output\": [\"1156\"]}, {\"input\": \"46 44\\r\\n23 55\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"74 88\\r\\n77 37\\r\\n\", \"output\": [\"1346\"]}, {\"input\": \"94 37\\r\\n34 7\\r\\n\", \"output\": [\"789\"]}, {\"input\": \"22 81\\r\\n80 88\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"46 30\\r\\n34 62\\r\\n\", \"output\": [\"674\"]}, {\"input\": \"40 4\\r\\n81 40\\r\\n\", \"output\": [\"364\"]}, {\"input\": \"69 48\\r\\n39 9\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"89 93\\r\\n84 87\\r\\n\", \"output\": [\"5967\"]}, {\"input\": \"17 45\\r\\n42 65\\r\\n\", \"output\": [\"317\"]}, {\"input\": \"41 85\\r\\n95 46\\r\\n\", \"output\": [\"331\"]}, {\"input\": \"69 30\\r\\n41 16\\r\\n\", \"output\": [\"1410\"]}, {\"input\": \"93 74\\r\\n99 93\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"17 19\\r\\n44 75\\r\\n\", \"output\": [\"427\"]}, {\"input\": \"45 63\\r\\n98 53\\r\\n\", \"output\": [\"3483\"]}, {\"input\": \"69 11\\r\\n48 34\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"55 94\\r\\n3 96\\r\\n\", \"output\": [\"204\"]}, {\"input\": \"100 100\\r\\n100 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 1\\r\\n1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n1 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 100\\r\\n100 1\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"98 1\\r\\n99 100\\r\\n\", \"output\": [\"9703\"]}, {\"input\": \"98 1\\r\\n99 2\\r\\n\", \"output\": [\"9605\"]}, {\"input\": \"97 2\\r\\n99 100\\r\\n\", \"output\": [\"4852\"]}, {\"input\": \"3 3\\r\\n3 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 2\\r\\n7 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 3\\r\\n2 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 3\\r\\n2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 3\\r\\n100 5\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"6 10\\r\\n12 14\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"4 2\\r\\n4 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 3\\r\\n2 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 3\\r\\n4 99\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"1 5\\r\\n1 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 100\\r\\n3 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 10\\r\\n6 20\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"2 2\\r\\n2 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3 7\\r\\n3 6\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1 100\\r\\n1 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"7 25\\r\\n39 85\\r\\n\", \"output\": [\"319\"]}, {\"input\": \"84 82\\r\\n38 6\\r\\n\", \"output\": [\"82\"]}, {\"input\": \"7 7\\r\\n7 14\\r\\n\", \"output\": [\"14\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '69 30\\r\\n41 16\\r\\n', 'output': ['1410']}, {'input': '7 25\\r\\n39 85\\r\\n', 'output': ['319']}, {'input': '94 55\\r\\n20 96\\r\\n', 'output': ['-1']}, {'input': '87 22\\r\\n98 32\\r\\n', 'output': ['718']}, {'input': '41 85\\r\\n95 46\\r\\n', 'output': ['331']}]","human_sample_testcases_2":"[{'input': '2 2\\r\\n2 10\\r\\n', 'output': ['10']}, {'input': '97 2\\r\\n99 100\\r\\n', 'output': ['4852']}, {'input': '40 4\\r\\n81 40\\r\\n', 'output': ['364']}, {'input': '2 3\\r\\n2 5\\r\\n', 'output': ['5']}, {'input': '2 3\\r\\n4 99\\r\\n', 'output': ['99']}]","human_sample_testcases_3":"[{'input': '87 22\\r\\n98 32\\r\\n', 'output': ['718']}, {'input': '94 37\\r\\n34 7\\r\\n', 'output': ['789']}, {'input': '97 2\\r\\n99 100\\r\\n', 'output': ['4852']}, {'input': '98 1\\r\\n99 2\\r\\n', 'output': ['9605']}, {'input': '59 70\\r\\n48 54\\r\\n', 'output': ['1014']}]","human_sample_testcases_4":"[{'input': '98 1\\r\\n99 2\\r\\n', 'output': ['9605']}, {'input': '100 100\\r\\n100 100\\r\\n', 'output': ['100']}, {'input': '3 2\\r\\n7 2\\r\\n', 'output': ['2']}, {'input': '18 18\\r\\n71 71\\r\\n', 'output': ['1278']}, {'input': '2 10\\r\\n6 20\\r\\n', 'output': ['20']}]","human_sample_testcases_5":"[{'input': '2 3\\r\\n2 3\\r\\n', 'output': ['3']}, {'input': '18 18\\r\\n71 71\\r\\n', 'output': ['1278']}, {'input': '1 5\\r\\n1 5\\r\\n', 'output': ['5']}, {'input': '3 7\\r\\n3 6\\r\\n', 'output': ['-1']}, {'input': '17 19\\r\\n44 75\\r\\n', 'output': ['427']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.0,"human_sample_line_coverage_2":90.0,"human_sample_line_coverage_3":90.0,"human_sample_line_coverage_4":90.0,"human_sample_line_coverage_5":95.0,"human_sample_branch_coverage_1":78.57,"human_sample_branch_coverage_2":50.0,"human_sample_branch_coverage_3":71.43,"human_sample_branch_coverage_4":71.43,"human_sample_branch_coverage_5":85.71,"id":294,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.0,"human_sample_branch_coverage":71.428} {"sample_inputs":"[\"4 2\", \"3 1\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$m~(1 \\le n \\le 10^5, 0 \\le m \\le \\frac{n (n - 1)}{2})$$$. It is guaranteed that there exists a graph without any self-loops or multiple edges with such number of vertices and edges.","src_uid":"daf0dd781bf403f7c1bb668925caa64d","source_code":"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n long vertexes = in.nextLong();\n long edges = in.nextLong();\n\n long max = 0;\n\n if (edges == 0) {\n System.out.println(vertexes + \" \" + vertexes);\n return;\n }\n\n for (long i = 1; i < vertexes; i++) {\n long currentEdges = (i * (i - 1)) \/ 2;\n if (currentEdges >= edges) {\n max = vertexes - i;\n break;\n }\n }\n\n for (long i = 0; i < edges; i++) {\n vertexes -= 2;\n\n if (vertexes < 0) {\n break;\n }\n }\n\n vertexes = vertexes > 0 ? vertexes : 0;\n\n System.out.println(vertexes + \" \" + max);\n }\n}\n","sample_outputs":"[\"0 1\", \"1 1\"]","lang_cluster":"Java","notes":"NoteIn the first example it is possible to construct a graph with $$$0$$$ isolated vertices: for example, it should contain edges $$$(1, 2)$$$ and $$$(3, 4)$$$. To get one isolated vertex, we may construct a graph with edges $$$(1, 2)$$$ and $$$(1, 3)$$$. In the second example the graph will always contain exactly one isolated vertex.","output_specification":"In the only line print two numbers $$$min$$$ and $$$max$$$ \u2014 the minimum and maximum number of isolated vertices, respectively.","description":"Vasya has got an undirected graph consisting of $$$n$$$ vertices and $$$m$$$ edges. This graph doesn't contain any self-loops or multiple edges. Self-loop is an edge connecting a vertex to itself. Multiple edges are a pair of edges such that they connect the same pair of vertices. Since the graph is undirected, the pair of edges $$$(1, 2)$$$ and $$$(2, 1)$$$ is considered to be multiple edges. Isolated vertex of the graph is a vertex such that there is no edge connecting this vertex to any other vertex.Vasya wants to know the minimum and maximum possible number of isolated vertices in an undirected graph consisting of $$$n$$$ vertices and $$$m$$$ edges. ","human_testcases":"[{\"input\": \"4 2\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"20 55\\r\\n\", \"output\": [\"0 9\"]}, {\"input\": \"20 54\\r\\n\", \"output\": [\"0 9\"]}, {\"input\": \"20 56\\r\\n\", \"output\": [\"0 8\"]}, {\"input\": \"100000 3950493829\\r\\n\", \"output\": [\"0 11111\"]}, {\"input\": \"100000 49997\\r\\n\", \"output\": [\"6 99683\"]}, {\"input\": \"100 0\\r\\n\", \"output\": [\"100 100\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"15 4\\r\\n\", \"output\": [\"7 11\"]}, {\"input\": \"100000 4999950000\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"18889 138011083\\r\\n\", \"output\": [\"0 2274\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"0 85\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"4 6\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"10 2\\r\\n\", \"output\": [\"6 7\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"6 15\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"2 2\"]}, {\"input\": \"6740 22710430\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"10 45\\r\\n\", \"output\": [\"0 0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100000 3950493829\\r\\n', 'output': ['0 11111']}, {'input': '2 1\\r\\n', 'output': ['0 0']}, {'input': '5 10\\r\\n', 'output': ['0 0']}, {'input': '6 15\\r\\n', 'output': ['0 0']}, {'input': '5 5\\r\\n', 'output': ['0 1']}]","human_sample_testcases_2":"[{'input': '4 2\\r\\n', 'output': ['0 1']}, {'input': '100 100\\r\\n', 'output': ['0 85']}, {'input': '4 6\\r\\n', 'output': ['0 0']}, {'input': '3 1\\r\\n', 'output': ['1 1']}, {'input': '100000 4999950000\\r\\n', 'output': ['0 0']}]","human_sample_testcases_3":"[{'input': '5 10\\r\\n', 'output': ['0 0']}, {'input': '2 0\\r\\n', 'output': ['2 2']}, {'input': '6740 22710430\\r\\n', 'output': ['0 0']}, {'input': '10 45\\r\\n', 'output': ['0 0']}, {'input': '6 15\\r\\n', 'output': ['0 0']}]","human_sample_testcases_4":"[{'input': '1 0\\r\\n', 'output': ['1 1']}, {'input': '20 56\\r\\n', 'output': ['0 8']}, {'input': '5 5\\r\\n', 'output': ['0 1']}, {'input': '5 10\\r\\n', 'output': ['0 0']}, {'input': '15 4\\r\\n', 'output': ['7 11']}]","human_sample_testcases_5":"[{'input': '6 15\\r\\n', 'output': ['0 0']}, {'input': '1 0\\r\\n', 'output': ['1 1']}, {'input': '100000 4999950000\\r\\n', 'output': ['0 0']}, {'input': '5 5\\r\\n', 'output': ['0 1']}, {'input': '100 0\\r\\n', 'output': ['100 100']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":89.47,"human_sample_line_coverage_2":89.47,"human_sample_line_coverage_3":89.47,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":91.67,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":83.33,"id":295,"human_sample_pass_rate":100.0,"human_sample_line_coverage":93.682,"human_sample_branch_coverage":86.666} {"sample_inputs":"[\"3 2\\n50 85 250\\n10 15 25\", \"3 6\\n50 85 250\\n10 15 25\", \"8 1\\n10 20 30 40 50 60 70 80\\n8 10 58 63 71 72 75 76\"]","input_specification":"The first line contains two integers n and c (1\u2009\u2264\u2009n\u2009\u2264\u200950,\u20091\u2009\u2264\u2009c\u2009\u2264\u20091000)\u00a0\u2014 the number of problems and the constant representing the speed of loosing points. The second line contains n integers p1,\u2009p2,\u2009...,\u2009pn (1\u2009\u2264\u2009pi\u2009\u2264\u20091000,\u2009pi\u2009<\u2009pi\u2009+\u20091)\u00a0\u2014 initial scores. The third line contains n integers t1,\u2009t2,\u2009...,\u2009tn (1\u2009\u2264\u2009ti\u2009\u2264\u20091000,\u2009ti\u2009<\u2009ti\u2009+\u20091) where ti denotes the number of minutes one needs to solve the i-th problem.","src_uid":"8c704de75ab85f9e2c04a926143c8b4a","source_code":"import java.util.Scanner;\n\npublic class A17 {\n\n\tpublic static void main(String[] args) {\n\t\t\/\/ TODO Auto-generated method stub\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint c = sc.nextInt();\n\t\tint[] score = new int[n];\n\t\tint[] minute = new int[n];\n\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tscore[i] = sc.nextInt();\n\t\t}\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tminute[i] = sc.nextInt();\n\t\t}\n\n\t\tint Limak = 0;\n\t\tint l;\n\t\tint currmin = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tcurrmin += minute[i];\n\t\t\tl = score[i] - (c * currmin);\n\n\t\t\tif (l > 0) {\n\t\t\t\tLimak += l;\n\t\t\t}\n\t\t}\n\n\t\tint Radewoosh = 0;\n\t\tint r;\n\t\tint curr = 0;\n\n\t\tfor (int i = n - 1; i >= 0; i--) {\n\t\t\tcurr += minute[i];\n\t\t\tr = score[i] - (c * curr);\n\n\t\t\tif (r > 0) {\n\t\t\t\tRadewoosh += r;\n\t\t\t}\n\n\t\t}\n\n\t\tif (Radewoosh == Limak) {\n\t\t\tSystem.out.println(\"Tie\");\n\t\t} \n\t\telse\n\t\t\tSystem.out.println((Radewoosh > Limak) ? \"Radewoosh\" : \"Limak\");\n\n\t}\n\n}","sample_outputs":"[\"Limak\", \"Radewoosh\", \"Tie\"]","lang_cluster":"Java","notes":"NoteIn the first sample, there are 3 problems. Limak solves them as follows: Limak spends 10 minutes on the 1-st problem and he gets 50\u2009-\u2009c\u00b710\u2009=\u200950\u2009-\u20092\u00b710\u2009=\u200930 points. Limak spends 15 minutes on the 2-nd problem so he submits it 10\u2009+\u200915\u2009=\u200925 minutes after the start of the contest. For the 2-nd problem he gets 85\u2009-\u20092\u00b725\u2009=\u200935 points. He spends 25 minutes on the 3-rd problem so he submits it 10\u2009+\u200915\u2009+\u200925\u2009=\u200950 minutes after the start. For this problem he gets 250\u2009-\u20092\u00b750\u2009=\u2009150 points. So, Limak got 30\u2009+\u200935\u2009+\u2009150\u2009=\u2009215 points.Radewoosh solves problem in the reversed order: Radewoosh solves 3-rd problem after 25 minutes so he gets 250\u2009-\u20092\u00b725\u2009=\u2009200 points. He spends 15 minutes on the 2-nd problem so he submits it 25\u2009+\u200915\u2009=\u200940 minutes after the start. He gets 85\u2009-\u20092\u00b740\u2009=\u20095 points for this problem. He spends 10 minutes on the 1-st problem so he submits it 25\u2009+\u200915\u2009+\u200910\u2009=\u200950 minutes after the start. He gets max(0,\u200950\u2009-\u20092\u00b750)\u2009=\u2009max(0,\u2009\u2009-\u200950)\u2009=\u20090 points. Radewoosh got 200\u2009+\u20095\u2009+\u20090\u2009=\u2009205 points in total. Limak has 215 points so Limak wins.In the second sample, Limak will get 0 points for each problem and Radewoosh will first solve the hardest problem and he will get 250\u2009-\u20096\u00b725\u2009=\u2009100 points for that. Radewoosh will get 0 points for other two problems but he is the winner anyway.In the third sample, Limak will get 2 points for the 1-st problem and 2 points for the 2-nd problem. Radewoosh will get 4 points for the 8-th problem. They won't get points for other problems and thus there is a tie because 2\u2009+\u20092\u2009=\u20094.","output_specification":"Print \"Limak\" (without quotes) if Limak will get more points in total. Print \"Radewoosh\" (without quotes) if Radewoosh will get more points in total. Print \"Tie\" (without quotes) if Limak and Radewoosh will get the same total number of points.","description":"Limak and Radewoosh are going to compete against each other in the upcoming algorithmic contest. They are equally skilled but they won't solve problems in the same order.There will be n problems. The i-th problem has initial score pi and it takes exactly ti minutes to solve it. Problems are sorted by difficulty\u00a0\u2014 it's guaranteed that pi\u2009<\u2009pi\u2009+\u20091 and ti\u2009<\u2009ti\u2009+\u20091.A constant c is given too, representing the speed of loosing points. Then, submitting the i-th problem at time x (x minutes after the start of the contest) gives max(0,\u2009 pi\u2009-\u2009c\u00b7x) points.Limak is going to solve problems in order 1,\u20092,\u2009...,\u2009n (sorted increasingly by pi). Radewoosh is going to solve them in order n,\u2009n\u2009-\u20091,\u2009...,\u20091 (sorted decreasingly by pi). Your task is to predict the outcome\u00a0\u2014 print the name of the winner (person who gets more points at the end) or a word \"Tie\" in case of a tie.You may assume that the duration of the competition is greater or equal than the sum of all ti. That means both Limak and Radewoosh will accept all n problems.","human_testcases":"[{\"input\": \"3 2\\r\\n50 85 250\\r\\n10 15 25\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"3 6\\r\\n50 85 250\\r\\n10 15 25\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"8 1\\r\\n10 20 30 40 50 60 70 80\\r\\n8 10 58 63 71 72 75 76\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"4 1\\r\\n3 5 6 9\\r\\n1 2 4 8\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"4 1\\r\\n1 3 6 10\\r\\n1 5 7 8\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"4 1\\r\\n2 4 5 10\\r\\n2 3 9 10\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"18 4\\r\\n68 97 121 132 146 277 312 395 407 431 458 461 595 634 751 855 871 994\\r\\n1 2 3 4 9 10 13 21 22 29 31 34 37 38 39 41 48 49\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"50 1\\r\\n5 14 18 73 137 187 195 197 212 226 235 251 262 278 287 304 310 322 342 379 393 420 442 444 448 472 483 485 508 515 517 523 559 585 618 627 636 646 666 682 703 707 780 853 937 951 959 989 991 992\\r\\n30 84 113 173 199 220 235 261 266 277 300 306 310 312 347 356 394 396 397 409 414 424 446 462 468 487 507 517 537 566 594 643 656 660 662 668 706 708 773 774 779 805 820 827 868 896 929 942 961 995\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"4 1\\r\\n4 6 9 10\\r\\n2 3 4 5\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"4 1\\r\\n4 6 9 10\\r\\n3 4 5 7\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"4 1\\r\\n1 6 7 10\\r\\n2 7 8 10\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"4 1\\r\\n4 5 7 9\\r\\n1 4 5 8\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"50 1\\r\\n6 17 44 82 94 127 134 156 187 211 212 252 256 292 294 303 352 355 379 380 398 409 424 434 480 524 584 594 631 714 745 756 777 778 789 793 799 821 841 849 859 878 879 895 925 932 944 952 958 990\\r\\n15 16 40 42 45 71 99 100 117 120 174 181 186 204 221 268 289 332 376 394 403 409 411 444 471 487 499 539 541 551 567 589 619 623 639 669 689 722 735 776 794 822 830 840 847 907 917 927 936 988\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"50 10\\r\\n25 49 52 73 104 117 127 136 149 164 171 184 226 251 257 258 286 324 337 341 386 390 428 453 464 470 492 517 543 565 609 634 636 660 678 693 710 714 729 736 739 749 781 836 866 875 956 960 977 979\\r\\n2 4 7 10 11 22 24 26 27 28 31 35 37 38 42 44 45 46 52 53 55 56 57 59 60 61 64 66 67 68 69 71 75 76 77 78 79 81 83 85 86 87 89 90 92 93 94 98 99 100\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"50 10\\r\\n11 15 25 71 77 83 95 108 143 150 182 183 198 203 213 223 279 280 346 348 350 355 375 376 412 413 415 432 470 545 553 562 589 595 607 633 635 637 688 719 747 767 771 799 842 883 905 924 942 944\\r\\n1 3 5 6 7 10 11 12 13 14 15 16 19 20 21 23 25 32 35 36 37 38 40 41 42 43 47 50 51 54 55 56 57 58 59 60 62 63 64 65 66 68 69 70 71 72 73 75 78 80\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"32 6\\r\\n25 77 141 148 157 159 192 196 198 244 245 255 332 392 414 457 466 524 575 603 629 700 738 782 838 841 845 847 870 945 984 985\\r\\n1 2 4 5 8 9 10 12 13 14 15 16 17 18 20 21 22 23 24 26 28 31 38 39 40 41 42 43 45 47 48 49\\r\\n\", \"output\": [\"Radewoosh\"]}, {\"input\": \"5 1\\r\\n256 275 469 671 842\\r\\n7 9 14 17 26\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"2 1000\\r\\n1 2\\r\\n1 2\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"3 1\\r\\n1 50 809\\r\\n2 8 800\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"1 13\\r\\n866\\r\\n10\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"15 1\\r\\n9 11 66 128 199 323 376 386 393 555 585 718 935 960 971\\r\\n3 11 14 19 20 21 24 26 32 38 40 42 44 47 50\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"1 10\\r\\n546\\r\\n45\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"50 20\\r\\n21 43 51 99 117 119 158 167 175 190 196 244 250 316 335 375 391 403 423 428 451 457 460 480 487 522 539 559 566 584 598 602 604 616 626 666 675 730 771 787 828 841 861 867 886 889 898 970 986 991\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n\", \"output\": [\"Limak\"]}, {\"input\": \"50 21\\r\\n13 20 22 38 62 84 118 135 141 152 170 175 194 218 227 229 232 253 260 263 278 313 329 357 396 402 422 452 454 533 575 576 580 594 624 644 653 671 676 759 789 811 816 823 831 833 856 924 933 987\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1 36\\r\\n312\\r\\n42\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1 1000\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1 1\\r\\n1000\\r\\n1\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"50 35\\r\\n9 17 28 107 136 152 169 174 186 188 201 262 291 312 324 330 341 358 385 386 393 397 425 431 479 498 502 523 530 540 542 554 578 588 622 623 684 696 709 722 784 819 836 845 850 932 945 969 983 984\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"50 20\\r\\n12 113 116 120 138 156 167 183 185 194 211 228 234 261 278 287 310 317 346 361 364 397 424 470 496 522 527 536 611 648 668 704 707 712 717 752 761 766 815 828 832 864 872 885 889 901 904 929 982 993\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n\", \"output\": [\"Limak\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 13\\r\\n866\\r\\n10\\r\\n', 'output': ['Tie']}, {'input': '1 10\\r\\n546\\r\\n45\\r\\n', 'output': ['Tie']}, {'input': '4 1\\r\\n4 6 9 10\\r\\n3 4 5 7\\r\\n', 'output': ['Radewoosh']}, {'input': '3 2\\r\\n50 85 250\\r\\n10 15 25\\r\\n', 'output': ['Limak']}, {'input': '50 20\\r\\n21 43 51 99 117 119 158 167 175 190 196 244 250 316 335 375 391 403 423 428 451 457 460 480 487 522 539 559 566 584 598 602 604 616 626 666 675 730 771 787 828 841 861 867 886 889 898 970 986 991\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n', 'output': ['Limak']}]","human_sample_testcases_2":"[{'input': '4 1\\r\\n3 5 6 9\\r\\n1 2 4 8\\r\\n', 'output': ['Limak']}, {'input': '4 1\\r\\n4 6 9 10\\r\\n2 3 4 5\\r\\n', 'output': ['Radewoosh']}, {'input': '50 35\\r\\n9 17 28 107 136 152 169 174 186 188 201 262 291 312 324 330 341 358 385 386 393 397 425 431 479 498 502 523 530 540 542 554 578 588 622 623 684 696 709 722 784 819 836 845 850 932 945 969 983 984\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n', 'output': ['Tie']}, {'input': '50 10\\r\\n11 15 25 71 77 83 95 108 143 150 182 183 198 203 213 223 279 280 346 348 350 355 375 376 412 413 415 432 470 545 553 562 589 595 607 633 635 637 688 719 747 767 771 799 842 883 905 924 942 944\\r\\n1 3 5 6 7 10 11 12 13 14 15 16 19 20 21 23 25 32 35 36 37 38 40 41 42 43 47 50 51 54 55 56 57 58 59 60 62 63 64 65 66 68 69 70 71 72 73 75 78 80\\r\\n', 'output': ['Radewoosh']}, {'input': '3 6\\r\\n50 85 250\\r\\n10 15 25\\r\\n', 'output': ['Radewoosh']}]","human_sample_testcases_3":"[{'input': '32 6\\r\\n25 77 141 148 157 159 192 196 198 244 245 255 332 392 414 457 466 524 575 603 629 700 738 782 838 841 845 847 870 945 984 985\\r\\n1 2 4 5 8 9 10 12 13 14 15 16 17 18 20 21 22 23 24 26 28 31 38 39 40 41 42 43 45 47 48 49\\r\\n', 'output': ['Radewoosh']}, {'input': '50 20\\r\\n21 43 51 99 117 119 158 167 175 190 196 244 250 316 335 375 391 403 423 428 451 457 460 480 487 522 539 559 566 584 598 602 604 616 626 666 675 730 771 787 828 841 861 867 886 889 898 970 986 991\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n', 'output': ['Limak']}, {'input': '15 1\\r\\n9 11 66 128 199 323 376 386 393 555 585 718 935 960 971\\r\\n3 11 14 19 20 21 24 26 32 38 40 42 44 47 50\\r\\n', 'output': ['Limak']}, {'input': '8 1\\r\\n10 20 30 40 50 60 70 80\\r\\n8 10 58 63 71 72 75 76\\r\\n', 'output': ['Tie']}, {'input': '4 1\\r\\n4 6 9 10\\r\\n2 3 4 5\\r\\n', 'output': ['Radewoosh']}]","human_sample_testcases_4":"[{'input': '4 1\\r\\n3 5 6 9\\r\\n1 2 4 8\\r\\n', 'output': ['Limak']}, {'input': '4 1\\r\\n1 6 7 10\\r\\n2 7 8 10\\r\\n', 'output': ['Tie']}, {'input': '3 1\\r\\n1 50 809\\r\\n2 8 800\\r\\n', 'output': ['Limak']}, {'input': '50 1\\r\\n5 14 18 73 137 187 195 197 212 226 235 251 262 278 287 304 310 322 342 379 393 420 442 444 448 472 483 485 508 515 517 523 559 585 618 627 636 646 666 682 703 707 780 853 937 951 959 989 991 992\\r\\n30 84 113 173 199 220 235 261 266 277 300 306 310 312 347 356 394 396 397 409 414 424 446 462 468 487 507 517 537 566 594 643 656 660 662 668 706 708 773 774 779 805 820 827 868 896 929 942 961 995\\r\\n', 'output': ['Tie']}, {'input': '1 10\\r\\n546\\r\\n45\\r\\n', 'output': ['Tie']}]","human_sample_testcases_5":"[{'input': '50 20\\r\\n21 43 51 99 117 119 158 167 175 190 196 244 250 316 335 375 391 403 423 428 451 457 460 480 487 522 539 559 566 584 598 602 604 616 626 666 675 730 771 787 828 841 861 867 886 889 898 970 986 991\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n', 'output': ['Limak']}, {'input': '50 1\\r\\n5 14 18 73 137 187 195 197 212 226 235 251 262 278 287 304 310 322 342 379 393 420 442 444 448 472 483 485 508 515 517 523 559 585 618 627 636 646 666 682 703 707 780 853 937 951 959 989 991 992\\r\\n30 84 113 173 199 220 235 261 266 277 300 306 310 312 347 356 394 396 397 409 414 424 446 462 468 487 507 517 537 566 594 643 656 660 662 668 706 708 773 774 779 805 820 827 868 896 929 942 961 995\\r\\n', 'output': ['Tie']}, {'input': '50 20\\r\\n12 113 116 120 138 156 167 183 185 194 211 228 234 261 278 287 310 317 346 361 364 397 424 470 496 522 527 536 611 648 668 704 707 712 717 752 761 766 815 828 832 864 872 885 889 901 904 929 982 993\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50\\r\\n', 'output': ['Limak']}, {'input': '3 2\\r\\n50 85 250\\r\\n10 15 25\\r\\n', 'output': ['Limak']}, {'input': '4 1\\r\\n1 3 6 10\\r\\n1 5 7 8\\r\\n', 'output': ['Radewoosh']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":93.75,"human_sample_branch_coverage_5":100.0,"id":296,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":98.75} {"sample_inputs":"[\"6\\n1 2 4 3 3 2\", \"1\\n100\"]","input_specification":"The first line of the input contains one integer $$$n$$$ ($$$1 \\le n \\le 100$$$) \u2014 the number of coins. The second line of the input contains $$$n$$$ integers $$$a_1, a_2, \\dots, a_n$$$ ($$$1 \\le a_i \\le 100$$$) \u2014 values of coins.","src_uid":"f30329023e84b4c50b1b118dc98ae73c","source_code":"import java.util.*;\n\npublic class Watermelon\n{\t\n public static void main(String[] args)\n {\n \tScanner sc = new Scanner(System.in);\n \tint n = sc.nextInt();\n \tint a[] = new int[n];\n \tint c[] = new int[101];\n \tfor(int i=0; imax)\n \t\t\tmax = c[i];\n \t}\n \tSystem.out.println(max);\n }\n}","sample_outputs":"[\"2\", \"1\"]","lang_cluster":"Java","notes":null,"output_specification":"Print only one integer \u2014 the minimum number of pockets Polycarp needs to distribute all the coins so no two coins with the same value are put into the same pocket.","description":"Polycarp has $$$n$$$ coins, the value of the $$$i$$$-th coin is $$$a_i$$$. Polycarp wants to distribute all the coins between his pockets, but he cannot put two coins with the same value into the same pocket.For example, if Polycarp has got six coins represented as an array $$$a = [1, 2, 4, 3, 3, 2]$$$, he can distribute the coins into two pockets as follows: $$$[1, 2, 3], [2, 3, 4]$$$.Polycarp wants to distribute all the coins with the minimum number of used pockets. Help him to do that.","human_testcases":"[{\"input\": \"6\\r\\n1 2 4 3 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n59 47 39 47 47 71 47 28 58 47 35 79 58 47 38 47 47 47 47 27 47 43 29 95 47 49 46 71 47 74 79 47 47 32 45 67 47 47 30 37 47 47 16 67 22 76 47 86 84 10 5 47 47 47 47 47 1 51 47 54 47 8 47 47 9 47 47 47 47 28 47 47 26 47 47 47 47 47 47 92 47 47 77 47 47 24 45 47 10 47 47 89 47 27 47 89 47 67 24 71\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"100\\r\\n45 99 10 27 16 85 39 38 17 32 15 23 67 48 50 97 42 70 62 30 44 81 64 73 34 22 46 5 83 52 58 60 33 74 47 88 18 61 78 53 25 95 94 31 3 75 1 57 20 54 59 9 68 7 77 43 21 87 86 24 4 80 11 49 2 72 36 84 71 8 65 55 79 100 41 14 35 89 66 69 93 37 56 82 90 91 51 19 26 92 6 96 13 98 12 28 76 40 63 29\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n45 29 5 2 6 50 22 36 14 15 9 48 46 20 8 37 7 47 12 50 21 38 18 27 33 19 40 10 5 49 38 42 34 37 27 30 35 24 10 3 40 49 41 3 4 44 13 25 28 31 46 36 23 1 1 23 7 22 35 26 21 16 48 42 32 8 11 16 34 11 39 32 47 28 43 41 39 4 14 19 26 45 13 18 15 25 2 44 17 29 17 33 43 6 12 30 9 20 31 24\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"50\\r\\n7 7 3 3 7 4 5 6 4 3 7 5 6 4 5 4 4 5 6 7 7 7 4 5 5 5 3 7 6 3 4 6 3 6 4 4 5 4 6 6 3 5 6 3 5 3 3 7 7 6\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 99 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"7\\r\\n1 2 3 3 3 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n1 2 3 4 5 6 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8\\r\\n1 2 3 4 5 6 7 8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n1 2 3 4 5 6 7 8 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n1 2 3 4 5 6 7 8 9 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n2 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11\\r\\n1 2 3 4 5 6 7 8 9 1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"12\\r\\n1 2 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"13\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"14\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"15\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"16\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"3\\r\\n1 1 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n1 2 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10\\r\\n1 1 1 1 2 2 1 1 9 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2\\r\\n1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"56\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"99\\r\\n35 96 73 72 70 83 22 93 98 75 45 32 81 82 45 54 25 7 53 72 29 2 94 19 21 98 34 28 39 99 55 85 44 23 6 47 98 2 33 34 19 57 49 35 67 4 60 4 4 23 55 6 57 66 16 68 34 45 84 79 48 63 4 9 46 88 98 13 19 27 83 12 4 63 57 22 44 77 44 62 28 52 44 64 9 24 55 22 48 4 2 9 80 76 45 1 56 22 92\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"10\\r\\n1 2 2 3 3 3 4 4 4 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"99\\r\\n97 44 33 56 42 10 61 85 64 26 40 39 82 34 75 9 51 51 39 73 58 38 74 31 13 99 58 1 28 89 76 19 52 7 40 56 12 27 72 72 67 75 62 46 22 55 35 16 18 39 60 63 92 42 85 69 34 61 73 50 57 95 30 4 45 63 76 58 32 35 48 81 10 78 95 79 55 97 21 21 22 94 30 17 78 57 89 93 100 44 16 89 68 55 19 46 42 73 21\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n5 5 5 5 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\n2 3 2 5 2 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n58 59 58\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9\\r\\n1 2 3 4 5 6 7 8 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"97\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"3\\r\\n95 95 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n2 2 5\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '11\\r\\n1 2 3 4 5 6 7 8 9 1 1\\r\\n', 'output': ['3']}, {'input': '100\\r\\n45 29 5 2 6 50 22 36 14 15 9 48 46 20 8 37 7 47 12 50 21 38 18 27 33 19 40 10 5 49 38 42 34 37 27 30 35 24 10 3 40 49 41 3 4 44 13 25 28 31 46 36 23 1 1 23 7 22 35 26 21 16 48 42 32 8 11 16 34 11 39 32 47 28 43 41 39 4 14 19 26 45 13 18 15 25 2 44 17 29 17 33 43 6 12 30 9 20 31 24\\r\\n', 'output': ['2']}, {'input': '5\\r\\n5 5 5 5 1\\r\\n', 'output': ['4']}, {'input': '7\\r\\n1 2 3 3 3 1 2\\r\\n', 'output': ['3']}, {'input': '7\\r\\n1 2 3 4 5 6 7\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '56\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['56']}, {'input': '16\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['16']}, {'input': '14\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['14']}, {'input': '100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n', 'output': ['100']}, {'input': '3\\r\\n1 2 3\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '6\\r\\n1 2 4 3 3 2\\r\\n', 'output': ['2']}, {'input': '1\\r\\n100\\r\\n', 'output': ['1']}, {'input': '99\\r\\n35 96 73 72 70 83 22 93 98 75 45 32 81 82 45 54 25 7 53 72 29 2 94 19 21 98 34 28 39 99 55 85 44 23 6 47 98 2 33 34 19 57 49 35 67 4 60 4 4 23 55 6 57 66 16 68 34 45 84 79 48 63 4 9 46 88 98 13 19 27 83 12 4 63 57 22 44 77 44 62 28 52 44 64 9 24 55 22 48 4 2 9 80 76 45 1 56 22 92\\r\\n', 'output': ['6']}, {'input': '6\\r\\n2 3 2 5 2 6\\r\\n', 'output': ['3']}, {'input': '11\\r\\n1 2 3 4 5 6 7 8 9 1 1\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '10\\r\\n1 2 3 4 5 6 7 8 9 10\\r\\n', 'output': ['1']}, {'input': '7\\r\\n1 2 3 4 5 6 7\\r\\n', 'output': ['1']}, {'input': '99\\r\\n35 96 73 72 70 83 22 93 98 75 45 32 81 82 45 54 25 7 53 72 29 2 94 19 21 98 34 28 39 99 55 85 44 23 6 47 98 2 33 34 19 57 49 35 67 4 60 4 4 23 55 6 57 66 16 68 34 45 84 79 48 63 4 9 46 88 98 13 19 27 83 12 4 63 57 22 44 77 44 62 28 52 44 64 9 24 55 22 48 4 2 9 80 76 45 1 56 22 92\\r\\n', 'output': ['6']}, {'input': '3\\r\\n2 2 5\\r\\n', 'output': ['2']}, {'input': '6\\r\\n2 3 2 5 2 6\\r\\n', 'output': ['3']}]","human_sample_testcases_5":"[{'input': '14\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['14']}, {'input': '6\\r\\n1 2 4 3 3 2\\r\\n', 'output': ['2']}, {'input': '1\\r\\n100\\r\\n', 'output': ['1']}, {'input': '7\\r\\n1 2 3 3 3 1 2\\r\\n', 'output': ['3']}, {'input': '7\\r\\n1 2 3 4 5 6 7\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":297,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 4\", \"2 1\"]","input_specification":"The only line contains two integers $$$N$$$ and $$$M$$$ ($$$1 \\leq N, M \\leq 10^9$$$) \u2014 the number of rows and columns in the grid.","src_uid":"a91aab4c0618d036c81022232814ef44","source_code":"import java.util.*;\r\nimport java.math.*;\r\n\r\npublic class Dominoes {\r\n\tpublic static void main(String[] args) {\r\n\t\tScanner o = new Scanner(System.in);\r\n\t\tint n = o.nextInt(), m = o.nextInt();\r\n\t\tBigInteger b1 = BigInteger.valueOf(n), b2 = BigInteger.valueOf(m);\r\n\t\tif( n == 1 && m == 1)\r\n\t\t\tSystem.out.println(0);\r\n\t\telse if( m == 1 )\r\n\t\t\tSystem.out.println(n - 1);\r\n\t\telse\r\n\t\t\tSystem.out.println(BigInteger.valueOf(m - 1).multiply(b1));\r\n\t}\r\n}\r\n","sample_outputs":"[\"9\", \"1\"]","lang_cluster":"Java","notes":"NoteThe picture below is the grid that Pak Chanek has in the first example. The picture below is an example of a tight domino in the grid. ","output_specification":"An integer representing the number of distinct tight dominoes in the grid.","description":"Pak Chanek has a grid that has $$$N$$$ rows and $$$M$$$ columns. Each row is numbered from $$$1$$$ to $$$N$$$ from top to bottom. Each column is numbered from $$$1$$$ to $$$M$$$ from left to right.Each tile in the grid contains a number. The numbers are arranged as follows: Row $$$1$$$ contains integers from $$$1$$$ to $$$M$$$ from left to right. Row $$$2$$$ contains integers from $$$M+1$$$ to $$$2 \\times M$$$ from left to right. Row $$$3$$$ contains integers from $$$2 \\times M+1$$$ to $$$3 \\times M$$$ from left to right. And so on until row $$$N$$$. A domino is defined as two different tiles in the grid that touch by their sides. A domino is said to be tight if and only if the two numbers in the domino have a difference of exactly $$$1$$$. Count the number of distinct tight dominoes in the grid.Two dominoes are said to be distinct if and only if there exists at least one tile that is in one domino, but not in the other.","human_testcases":"[{\"input\": \"3 4\\n\", \"output\": [\"\\n9\", \"9\", \"9\\n\\n\", \"9\\n\\n\", \"\\n\\n\\n9\\n\", \"9\\n\", \"\\n9\\n\", \"\\n\\n\\n\\n\\n\\n\\n\\n9\\n\", \"9\\n\"]}, {\"input\": \"2 1\\n\", \"output\": [\"\\n1\", \"1\\n\", \"1\", \"1\\n\\n\", \"\\n1\\n\", \"1\\n\\n\", \"\\n\\n1\\n\", \"1\\n\", \"\\n\\n\\n\\n\\n1\\n\"]}, {\"input\": \"1 1\\n\", \"output\": [\"\\n0\\n\", \"\\n0\", \"0\\n\\n\", \"0\\n\\n\", \"0\\n\", \"0\\n\", \"\\n\\n0\\n\", \"0\"]}, {\"input\": \"1 2\\n\", \"output\": [\"\\n1\", \"1\\n\", \"1\", \"1\\n\\n\", \"\\n1\\n\", \"1\\n\\n\", \"\\n\\n1\\n\", \"1\\n\"]}, {\"input\": \"2 2\\n\", \"output\": [\"2\\n\", \"2\", \"\\n\\n\\n\\n\\n2\\n\", \"2\\n\\n\", \"\\n\\n2\\n\", \"\\n2\", \"2\\n\\n\", \"\\n2\\n\", \"2\\n\"]}, {\"input\": \"1 1000000000\\n\", \"output\": [\"999999999\\n\", \"\\n999999999\\n\", \"\\n999999999\", \"999999999\\n\", \"999999999\\n\\n\", \"999999999\", \"999999999\\n\\n\"]}, {\"input\": \"1 999999997\\n\", \"output\": [\"999999996\\n\\n\", \"\\n999999996\", \"999999996\\n\\n\", \"999999996\\n\", \"999999996\\n\", \"\\n999999996\\n\", \"999999996\"]}, {\"input\": \"1 589284012\\n\", \"output\": [\"589284011\\n\", \"\\n589284011\", \"589284011\", \"589284011\\n\\n\", \"589284011\\n\\n\", \"\\n589284011\\n\", \"589284011\\n\"]}, {\"input\": \"1000000000 1\\n\", \"output\": [\"999999999\\n\", \"\\n999999999\\n\", \"\\n999999999\", \"999999999\\n\", \"999999999\\n\\n\", \"999999999\", \"999999999\\n\\n\"]}, {\"input\": \"999999999 1\\n\", \"output\": [\"\\n999999998\", \"\\n999999998\\n\", \"999999998\", \"999999998\\n\\n\", \"999999998\\n\", \"999999998\\n\\n\", \"999999998\\n\"]}, {\"input\": \"636562060 1\\n\", \"output\": [\"\\n636562059\", \"636562059\\n\\n\", \"636562059\\n\", \"636562059\", \"\\n636562059\\n\", \"636562059\\n\", \"636562059\\n\\n\"]}, {\"input\": \"2 1000000000\\n\", \"output\": [\"1999999998\\n\\n\", \"\\n1999999998\\n\", \"1999999998\\n\", \"1999999998\", \"1999999998\\n\", \"\\n1999999998\", \"1999999998\\n\\n\"]}, {\"input\": \"1000000000 2\\n\", \"output\": [\"1000000000\", \"1000000000\\n\\n\", \"1000000000\\n\", \"1000000000\\n\", \"\\n1000000000\", \"\\n1000000000\\n\", \"1000000000\\n\\n\"]}, {\"input\": \"30001 30001\\n\", \"output\": [\"900030000\\n\", \"\\n900030000\\n\", \"900030000\", \"\\n900030000\", \"900030000\\n\\n\", \"900030000\\n\\n\", \"900030000\\n\"]}, {\"input\": \"1000000000 1000000000\\n\", \"output\": [\"999999999000000000\\n\", \"999999999000000000\\n\\n\", \"999999999000000000\\n\\n\", \"999999999000000000\\n\", \"999999999000000000\"]}, {\"input\": \"767928735 1000000000\\n\", \"output\": [\"767928734232071265\\n\\n\", \"767928734232071265\\n\", \"767928734232071265\\n\\n\", \"767928734232071265\\n\", \"767928734232071265\"]}, {\"input\": \"1000000000 906523442\\n\", \"output\": [\"906523441000000000\\n\\n\", \"906523441000000000\", \"906523441000000000\\n\", \"906523441000000000\\n\\n\", \"906523441000000000\\n\"]}, {\"input\": \"647242241 921242095\\n\", \"output\": [\"596266797424092654\\n\", \"596266797424092654\\n\\n\", \"596266797424092654\\n\", \"596266797424092654\", \"596266797424092654\\n\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '636562060 1\\n', 'output': ['\\n636562059', '636562059\\n\\n', '636562059\\n', '636562059', '\\n636562059\\n', '636562059\\n', '636562059\\n\\n']}, {'input': '2 1\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n', '\\n\\n\\n\\n\\n1\\n']}, {'input': '1000000000 1000000000\\n', 'output': ['999999999000000000\\n', '999999999000000000\\n\\n', '999999999000000000\\n\\n', '999999999000000000\\n', '999999999000000000']}, {'input': '2 1000000000\\n', 'output': ['1999999998\\n\\n', '\\n1999999998\\n', '1999999998\\n', '1999999998', '1999999998\\n', '\\n1999999998', '1999999998\\n\\n']}, {'input': '30001 30001\\n', 'output': ['900030000\\n', '\\n900030000\\n', '900030000', '\\n900030000', '900030000\\n\\n', '900030000\\n\\n', '900030000\\n']}]","human_sample_testcases_2":"[{'input': '1 2\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n']}, {'input': '1000000000 1\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '3 4\\n', 'output': ['\\n9', '9', '9\\n\\n', '9\\n\\n', '\\n\\n\\n9\\n', '9\\n', '\\n9\\n', '\\n\\n\\n\\n\\n\\n\\n\\n9\\n', '9\\n']}, {'input': '1 589284012\\n', 'output': ['589284011\\n', '\\n589284011', '589284011', '589284011\\n\\n', '589284011\\n\\n', '\\n589284011\\n', '589284011\\n']}, {'input': '1000000000 906523442\\n', 'output': ['906523441000000000\\n\\n', '906523441000000000', '906523441000000000\\n', '906523441000000000\\n\\n', '906523441000000000\\n']}]","human_sample_testcases_3":"[{'input': '1 589284012\\n', 'output': ['589284011\\n', '\\n589284011', '589284011', '589284011\\n\\n', '589284011\\n\\n', '\\n589284011\\n', '589284011\\n']}, {'input': '1000000000 1000000000\\n', 'output': ['999999999000000000\\n', '999999999000000000\\n\\n', '999999999000000000\\n\\n', '999999999000000000\\n', '999999999000000000']}, {'input': '1 999999997\\n', 'output': ['999999996\\n\\n', '\\n999999996', '999999996\\n\\n', '999999996\\n', '999999996\\n', '\\n999999996\\n', '999999996']}, {'input': '1000000000 2\\n', 'output': ['1000000000', '1000000000\\n\\n', '1000000000\\n', '1000000000\\n', '\\n1000000000', '\\n1000000000\\n', '1000000000\\n\\n']}, {'input': '767928735 1000000000\\n', 'output': ['767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265']}]","human_sample_testcases_4":"[{'input': '2 1000000000\\n', 'output': ['1999999998\\n\\n', '\\n1999999998\\n', '1999999998\\n', '1999999998', '1999999998\\n', '\\n1999999998', '1999999998\\n\\n']}, {'input': '636562060 1\\n', 'output': ['\\n636562059', '636562059\\n\\n', '636562059\\n', '636562059', '\\n636562059\\n', '636562059\\n', '636562059\\n\\n']}, {'input': '2 2\\n', 'output': ['2\\n', '2', '\\n\\n\\n\\n\\n2\\n', '2\\n\\n', '\\n\\n2\\n', '\\n2', '2\\n\\n', '\\n2\\n', '2\\n']}, {'input': '1 1000000000\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '1 1\\n', 'output': ['\\n0\\n', '\\n0', '0\\n\\n', '0\\n\\n', '0\\n', '0\\n', '\\n\\n0\\n', '0']}]","human_sample_testcases_5":"[{'input': '1000000000 1\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '1 1000000000\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '30001 30001\\n', 'output': ['900030000\\n', '\\n900030000\\n', '900030000', '\\n900030000', '900030000\\n\\n', '900030000\\n\\n', '900030000\\n']}, {'input': '636562060 1\\n', 'output': ['\\n636562059', '636562059\\n\\n', '636562059\\n', '636562059', '\\n636562059\\n', '636562059\\n', '636562059\\n\\n']}, {'input': '3 4\\n', 'output': ['\\n9', '9', '9\\n\\n', '9\\n\\n', '\\n\\n\\n9\\n', '9\\n', '\\n9\\n', '\\n\\n\\n\\n\\n\\n\\n\\n9\\n', '9\\n']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.89,"human_sample_line_coverage_2":88.89,"human_sample_line_coverage_3":77.78,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":66.67,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":83.33,"id":298,"human_sample_pass_rate":100.0,"human_sample_line_coverage":88.89,"human_sample_branch_coverage":76.666} {"sample_inputs":"[\"3 3 1\", \"4 4 1\", \"6 7 2\"]","input_specification":"The first and only line contains three integers: n,\u2009m,\u2009k (1\u2009\u2264\u2009n,\u2009m,\u2009k\u2009\u2264\u20091000).","src_uid":"309d2d46086d526d160292717dfef308","source_code":"\/* package whatever; \/\/ don't place package name! *\/\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n\/* Name of the class has to be \"Main\" only if the class is public. *\/\npublic class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t long mod = 1000000007;\n\t Scanner in = new Scanner(System.in);\n\t int n = in.nextInt();\n\t int m = in.nextInt();\n\t int k = in.nextInt();\n if (k * 2 > n - 1 || k * 2 > m - 1) \n System.out.println(\"0\"); \n else {\n long c[][] = new long [1001][1001];\n c[0][0] = 1;\n for (int i = 1; i <= Math.max(n - 1, m - 1); ++i) { \n\t c[i][0] = 1;\n\t for (int j = 1; j <= i; ++j)\n\t c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;\n\t\t\t}\n\t System.out.println((c[n - 1][2 * k] * c[m - 1][2 * k]) % mod); \n }\n\t}\n}\n","sample_outputs":"[\"1\", \"9\", \"75\"]","lang_cluster":"Java","notes":"NoteTwo ways to play the game are considered different if the final pictures are different. In other words, if one way contains a rectangle that is not contained in the other way.In the first sample Anna, who performs her first and only move, has only one possible action plan \u2014 insert a 1\u2009\u00d7\u20091 square inside the given 3\u2009\u00d7\u20093 square.In the second sample Anna has as much as 9 variants: 4 ways to paint a 1\u2009\u00d7\u20091 square, 2 ways to insert a 1\u2009\u00d7\u20092 rectangle vertically, 2 more ways to insert it horizontally and one more way is to insert a 2\u2009\u00d7\u20092 square.","output_specification":"Print the single number \u2014 the number of the ways to play the game. As this number can be very big, print the value modulo 1000000007 (109\u2009+\u20097).","description":"In this task Anna and Maria play the following game. Initially they have a checkered piece of paper with a painted n\u2009\u00d7\u2009m rectangle (only the border, no filling). Anna and Maria move in turns and Anna starts. During each move one should paint inside the last-painted rectangle a new lesser rectangle (along the grid lines). The new rectangle should have no common points with the previous one. Note that when we paint a rectangle, we always paint only the border, the rectangles aren't filled.Nobody wins the game \u2014 Anna and Maria simply play until they have done k moves in total. Count the number of different ways to play this game.","human_testcases":"[{\"input\": \"3 3 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4 1\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"6 7 2\\r\\n\", \"output\": [\"75\"]}, {\"input\": \"5 5 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999 999 499\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"456 876 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 5 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"5 7 2\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"10 13 3\\r\\n\", \"output\": [\"77616\"]}, {\"input\": \"1000 1000 499\\r\\n\", \"output\": [\"998001\"]}, {\"input\": \"1000 1000 500\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 1000 1\\r\\n\", \"output\": [\"498501\"]}, {\"input\": \"1000 3 1\\r\\n\", \"output\": [\"498501\"]}, {\"input\": \"998 1000 499\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 1000 250\\r\\n\", \"output\": [\"263321201\"]}, {\"input\": \"999 996 247\\r\\n\", \"output\": [\"729817056\"]}, {\"input\": \"86 564 16\\r\\n\", \"output\": [\"966200617\"]}, {\"input\": \"711 390 95\\r\\n\", \"output\": [\"187455436\"]}, {\"input\": \"963 415 36\\r\\n\", \"output\": [\"336772492\"]}, {\"input\": \"356 628 17\\r\\n\", \"output\": [\"665796305\"]}, {\"input\": \"214 538 33\\r\\n\", \"output\": [\"661877504\"]}, {\"input\": \"840 474 207\\r\\n\", \"output\": [\"895622621\"]}, {\"input\": \"589 898 280\\r\\n\", \"output\": [\"752764170\"]}, {\"input\": \"227 405 404\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"351 286 60\\r\\n\", \"output\": [\"414370922\"]}, {\"input\": \"531 131 43\\r\\n\", \"output\": [\"102593830\"]}, {\"input\": \"980 811 236\\r\\n\", \"output\": [\"542553202\"]}, {\"input\": \"638 119 38\\r\\n\", \"output\": [\"73514263\"]}, {\"input\": \"897 301 47\\r\\n\", \"output\": [\"886904759\"]}, {\"input\": \"569 191 164\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"409 92 105\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"307 190 52\\r\\n\", \"output\": [\"186536168\"]}, {\"input\": \"354 923 125\\r\\n\", \"output\": [\"708700715\"]}, {\"input\": \"705 155 490\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"188 413 35\\r\\n\", \"output\": [\"103598368\"]}, {\"input\": \"954 950 732\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"580 1000 203\\r\\n\", \"output\": [\"693824000\"]}, {\"input\": \"104 935 326\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"611 229 104\\r\\n\", \"output\": [\"737450171\"]}, {\"input\": \"277 939 15\\r\\n\", \"output\": [\"934000455\"]}, {\"input\": \"338 949 121\\r\\n\", \"output\": [\"67858020\"]}, {\"input\": \"734 917 148\\r\\n\", \"output\": [\"80695422\"]}, {\"input\": \"505 380 86\\r\\n\", \"output\": [\"926905224\"]}, {\"input\": \"340 124 41\\r\\n\", \"output\": [\"801948369\"]}, {\"input\": \"565 606 234\\r\\n\", \"output\": [\"509636173\"]}, {\"input\": \"956 926 201\\r\\n\", \"output\": [\"186215807\"]}, {\"input\": \"1000 1000 20\\r\\n\", \"output\": [\"155086097\"]}, {\"input\": \"1000 1000 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000 1000 100\\r\\n\", \"output\": [\"58573582\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '956 926 201\\r\\n', 'output': ['186215807']}, {'input': '5 7 2\\r\\n', 'output': ['15']}, {'input': '456 876 1000\\r\\n', 'output': ['0']}, {'input': '188 413 35\\r\\n', 'output': ['103598368']}, {'input': '589 898 280\\r\\n', 'output': ['752764170']}]","human_sample_testcases_2":"[{'input': '277 939 15\\r\\n', 'output': ['934000455']}, {'input': '954 950 732\\r\\n', 'output': ['0']}, {'input': '5 5 3\\r\\n', 'output': ['0']}, {'input': '611 229 104\\r\\n', 'output': ['737450171']}, {'input': '3 1000 1\\r\\n', 'output': ['498501']}]","human_sample_testcases_3":"[{'input': '611 229 104\\r\\n', 'output': ['737450171']}, {'input': '354 923 125\\r\\n', 'output': ['708700715']}, {'input': '580 1000 203\\r\\n', 'output': ['693824000']}, {'input': '734 917 148\\r\\n', 'output': ['80695422']}, {'input': '1000 1000 500\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '705 155 490\\r\\n', 'output': ['0']}, {'input': '3 5 1\\r\\n', 'output': ['6']}, {'input': '356 628 17\\r\\n', 'output': ['665796305']}, {'input': '409 92 105\\r\\n', 'output': ['0']}, {'input': '86 564 16\\r\\n', 'output': ['966200617']}]","human_sample_testcases_5":"[{'input': '307 190 52\\r\\n', 'output': ['186536168']}, {'input': '3 3 1\\r\\n', 'output': ['1']}, {'input': '6 7 2\\r\\n', 'output': ['75']}, {'input': '840 474 207\\r\\n', 'output': ['895622621']}, {'input': '10 13 3\\r\\n', 'output': ['77616']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":93.33,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":75.0,"id":299,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.666,"human_sample_branch_coverage":87.5} {"sample_inputs":"[\"3\\n7 20 88\", \"9\\n16 20 30 40 50 60 70 80 90\", \"9\\n15 20 30 40 50 60 70 80 90\"]","input_specification":"The first line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u200990)\u00a0\u2014 the number of interesting minutes. The second line contains n integers t1,\u2009t2,\u2009...,\u2009tn (1\u2009\u2264\u2009t1\u2009<\u2009t2\u2009<\u2009... tn\u2009\u2264\u200990), given in the increasing order.","src_uid":"5031b15e220f0ff6cc1dd3731ecdbf27","source_code":"import static java.lang.System.*;\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(in);\n \n int n = sc.nextInt();\n int sum = 0;\n int m = 0;\n while (n --> 0 && (m - (m = sc.nextInt())) * -1 <= 15) {\n sum = m;\n }\n if (n >= 0) {\n while (n --> 0) {\n sc.nextInt();\n }\n }\n sum += 15;\n if (sum > 90) sum = 90;\n out.println(sum);\n }\n}\n","sample_outputs":"[\"35\", \"15\", \"90\"]","lang_cluster":"Java","notes":"NoteIn the first sample, minutes 21,\u200922,\u2009...,\u200935 are all boring and thus Limak will turn TV off immediately after the 35-th minute. So, he would watch the game for 35 minutes.In the second sample, the first 15 minutes are boring.In the third sample, there are no consecutive 15 boring minutes. So, Limak will watch the whole game.","output_specification":"Print the number of minutes Limak will watch the game.","description":"Bear Limak likes watching sports on TV. He is going to watch a game today. The game lasts 90 minutes and there are no breaks.Each minute can be either interesting or boring. If 15 consecutive minutes are boring then Limak immediately turns TV off.You know that there will be n interesting minutes t1,\u2009t2,\u2009...,\u2009tn. Your task is to calculate for how many minutes Limak will watch the game.","human_testcases":"[{\"input\": \"3\\r\\n7 20 88\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"9\\r\\n16 20 30 40 50 60 70 80 90\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"9\\r\\n15 20 30 40 50 60 70 80 90\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"30\\r\\n6 11 12 15 22 24 30 31 32 33 34 35 40 42 44 45 47 50 53 54 57 58 63 67 75 77 79 81 83 88\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"60\\r\\n1 2 4 5 6 7 11 14 16 18 20 21 22 23 24 25 26 33 34 35 36 37 38 39 41 42 43 44 46 47 48 49 52 55 56 57 58 59 60 61 63 64 65 67 68 70 71 72 73 74 75 77 78 80 82 83 84 85 86 88\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"90\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"5\\r\\n15 30 45 60 75\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"6\\r\\n14 29 43 59 70 74\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"1\\r\\n15\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"1\\r\\n16\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"14\\r\\n14 22 27 31 35 44 46 61 62 69 74 79 88 89\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"76\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"1\\r\\n90\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"6\\r\\n13 17 32 47 60 66\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"84\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"9\\r\\n6 20 27 28 40 53 59 70 85\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"12\\r\\n14 22 27 31 35 44 62 69 74 79 88 89\\r\\n\", \"output\": [\"59\"]}, {\"input\": \"5\\r\\n15 30 45 60 74\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"72\\r\\n3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"8\\r\\n1 16 30 31 32 33 34 50\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"12\\r\\n1 3 6 10 15 21 28 36 45 55 66 78\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"25\\r\\n1 2 3 4 5 6 7 8 9 10 11 23 36 50 65 81 82 83 84 85 86 87 88 89 90\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"8\\r\\n5 17 20 35 42 53 67 76\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"9\\r\\n15 28 39 48 55 60 63 64 74\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"10\\r\\n15 28 39 48 55 60 63 64 74 82\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"2\\r\\n1 18\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"9\\r\\n10 20 30 40 50 60 70 80 84\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"2\\r\\n16 50\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"6\\r\\n15 30 45 60 75 84\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"8\\r\\n15 20 30 40 50 60 73 83\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"8\\r\\n10 20 30 40 50 60 70 80\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"3\\r\\n1 20 90\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"6\\r\\n15 30 45 60 74 89\\r\\n\", \"output\": [\"90\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '8\\r\\n15 20 30 40 50 60 73 83\\r\\n', 'output': ['90']}, {'input': '25\\r\\n1 2 3 4 5 6 7 8 9 10 11 23 36 50 65 81 82 83 84 85 86 87 88 89 90\\r\\n', 'output': ['80']}, {'input': '9\\r\\n15 20 30 40 50 60 70 80 90\\r\\n', 'output': ['90']}, {'input': '1\\r\\n1\\r\\n', 'output': ['16']}, {'input': '12\\r\\n14 22 27 31 35 44 62 69 74 79 88 89\\r\\n', 'output': ['59']}]","human_sample_testcases_2":"[{'input': '2\\r\\n1 18\\r\\n', 'output': ['16']}, {'input': '8\\r\\n1 16 30 31 32 33 34 50\\r\\n', 'output': ['49']}, {'input': '9\\r\\n16 20 30 40 50 60 70 80 90\\r\\n', 'output': ['15']}, {'input': '9\\r\\n15 28 39 48 55 60 63 64 74\\r\\n', 'output': ['89']}, {'input': '1\\r\\n16\\r\\n', 'output': ['15']}]","human_sample_testcases_3":"[{'input': '84\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84\\r\\n', 'output': ['90']}, {'input': '14\\r\\n14 22 27 31 35 44 46 61 62 69 74 79 88 89\\r\\n', 'output': ['90']}, {'input': '1\\r\\n1\\r\\n', 'output': ['16']}, {'input': '1\\r\\n90\\r\\n', 'output': ['15']}, {'input': '6\\r\\n13 17 32 47 60 66\\r\\n', 'output': ['81']}]","human_sample_testcases_4":"[{'input': '3\\r\\n1 20 90\\r\\n', 'output': ['16']}, {'input': '72\\r\\n3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89\\r\\n', 'output': ['54']}, {'input': '8\\r\\n5 17 20 35 42 53 67 76\\r\\n', 'output': ['90']}, {'input': '6\\r\\n13 17 32 47 60 66\\r\\n', 'output': ['81']}, {'input': '9\\r\\n6 20 27 28 40 53 59 70 85\\r\\n', 'output': ['90']}]","human_sample_testcases_5":"[{'input': '8\\r\\n10 20 30 40 50 60 70 80\\r\\n', 'output': ['90']}, {'input': '3\\r\\n1 20 90\\r\\n', 'output': ['16']}, {'input': '84\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84\\r\\n', 'output': ['90']}, {'input': '6\\r\\n13 17 32 47 60 66\\r\\n', 'output': ['81']}, {'input': '72\\r\\n3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89\\r\\n', 'output': ['54']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":92.31,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":90.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":300,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.462,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"127\", \"130\", \"123456789101112131415161718192021222324\"]","input_specification":"The first line contains a positive number n. It consists of no more than 100 digits and doesn't contain any leading zeros. The number n can't be represented as an empty string. Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cout (also you may use %I64d).","src_uid":"33041f1832fa7f641e37c4c638ab08a1","source_code":"n = int(input())\n\nif n >= -128 and n <= 127:\n print(\"byte\")\nelif n >= -32768 and n <= 32767:\n print(\"short\")\nelif n >= -2147483648 and n <= 2147483647:\n print(\"int\")\nelif n >= -9223372036854775808 and n <= 9223372036854775807:\n print(\"long\")\nelse:\n print(\"BigInteger\")","sample_outputs":"[\"byte\", \"short\", \"BigInteger\"]","lang_cluster":"Python","notes":null,"output_specification":"Print the first type from the list \"byte, short, int, long, BigInteger\", that can store the natural number n, in accordance with the data given above.","description":"Little Petya has recently started attending a programming club. Naturally he is facing the problem of choosing a programming language. After long considerations he realized that Java is the best choice. The main argument in favor of choosing Java was that it has a very large integer data type, called BigInteger.But having attended several classes of the club, Petya realized that not all tasks require using the BigInteger type. It turned out that in some tasks it is much easier to use small data types. That's why a question arises: \"Which integer type to use if one wants to store a positive integer n?\"Petya knows only 5 integer types:1) byte occupies 1 byte and allows you to store numbers from \u2009-\u2009128 to 1272) short occupies 2 bytes and allows you to store numbers from \u2009-\u200932768 to 327673) int occupies 4 bytes and allows you to store numbers from \u2009-\u20092147483648 to 21474836474) long occupies 8 bytes and allows you to store numbers from \u2009-\u20099223372036854775808 to 92233720368547758075) BigInteger can store any integer number, but at that it is not a primitive type, and operations with it are much slower.For all the types given above the boundary values are included in the value range.From this list, Petya wants to choose the smallest type that can store a positive integer n. Since BigInteger works much slower, Peter regards it last. Help him.","human_testcases":"[{\"input\": \"127\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"130\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"123456789101112131415161718192021222324\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"126\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"128\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"32766\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"111111\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"22222\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"32767\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"32768\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"32769\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"2147483645\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"2147483646\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"2147483647\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"2147483648\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"2147483649\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"9223372036854775805\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"9223372036854775806\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"9223372036854775807\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"9223372036854775808\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"9223372036854775809\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1111111111111111111111111111111111111111111111\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"232\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"241796563564014133460267652699\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"29360359146807441660707083821018832188095237636414144034857851003419752010124705615779249\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"337300529263821789926982715723773719445001702036602052198530564\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"381127467969689863953686682245136076127159921\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"2158324958633591462\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"268659422768117401499491767189496733446324586965055954729177892248858259490346\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"3023764505449745844381036446038799100004717936344985\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"13408349824892484976400774\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"18880842614378213198381172973704766723997934818440985546083314104481253291692101136681\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1180990956946757129733650596194933741\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"73795216631038776655609800540262114612084443385902708034055020082090470662930545328551\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1658370691480968202384509492140362150472696196949\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"59662093286671707493190399502717308574459619342109544431740791973099298641871347858082458491958703\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"205505005582428018613354752739589866670902346355933720701937\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"53348890623013817139699\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"262373979958859125198440634134122707574734706745701184688685117904709744\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"69113784278456828987289369893745977\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"2210209454022702335652564247406666491086662454147967686455330365147159266087\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"630105816139991597267787581532092408135\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"800461429306907809762708270\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"7685166910821197056344900917707673568669808490600751439157\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"713549841568602590705962611607726022334779480510421458817648621376683672722573289661127894\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"680504312323996476676434432\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"3376595620091080825479292544658464163405755746884100218035\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"303681723783491968617491075591006152690484825330764215796396316561122383310011589365655481\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"4868659422768117401499491767189496733446324586965055954729177892248858259490346614099717639491763430\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"3502376450544974584438103644603879910000471793634498544789130945841846713263971487355748226237288709\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"2334083498248924849764007740114454487565621932425948046430072197452845278935316358800789014185793377\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1988808426143782131983811729737047667239979348184409855460833141044812532916921011366813880911319644\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1018099095694675712973365059619493374113337270925179793757322992466016001294122941535439492265169131\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"8437952166310387766556098005402621146120844433859027080340550200820904706629305453285512716464931911\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"6965837069148096820238450949214036215047269619694967357734070611376013382163559966747678150791825071\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"4596620932866717074931903995027173085744596193421095444317407919730992986418713478580824584919587030\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1905505005582428018613354752739589866670902346355933720701937408006000562951996789032987808118459990\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"8433488906230138171396997888322916936677429522910871017295155818340819168386140293774243244435122950\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"6862373979958859125198440634134122707574734706745701184688685117904709744830303784215298687654884810\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"4491137842784568289872893698937459777201151060689848471272003426250808340375567208957554901863756992\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"9721020945402270233565256424740666649108666245414796768645533036514715926608741510409618545180420952\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"7330105816139991597267787581532092408135003429259616955239761315950805521264994021242873979309182812\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"2000461429306907809762708270752707617318091579531521957022940951538737203583768926365382290530636885\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"9868516691082119705634490091770767356866980849060075143915700796802700437762260163478754592094654326\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"8713549841568602590705962611607726022334779480510421458817648621376683672722573289661127894678771177\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"4580504312323996476676434432646986768872786931159974634901608445720467716981185426771899006352697916\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"2537659562009108082547929254465846416340575574688410021803548570097340949141688442074263189944614467\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"1403681723783491968617491075591006152690484825330764215796396316561122383310011589365655481428540208\\r\\n\", \"output\": [\"BigInteger\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"302376450544\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"188808426143\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"118099095694675\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"73795216631038\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"1658370691480\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"596620932866\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"2055050055\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"533488906\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"26237397\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"6911378\\r\\n\", \"output\": [\"int\"]}, {\"input\": \"221020945402270233\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"63010581613999159\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"80046142930\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"7685166910821197\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"byte\"]}, {\"input\": \"6805043123239964766\\r\\n\", \"output\": [\"long\"]}, {\"input\": \"3376\\r\\n\", \"output\": [\"short\"]}, {\"input\": \"3036817237\\r\\n\", \"output\": [\"long\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '130\\r\\n', 'output': ['short']}, {'input': '69113784278456828987289369893745977\\r\\n', 'output': ['BigInteger']}, {'input': '188808426143\\r\\n', 'output': ['long']}, {'input': '1658370691480968202384509492140362150472696196949\\r\\n', 'output': ['BigInteger']}, {'input': '2147483647\\r\\n', 'output': ['int']}]","human_sample_testcases_2":"[{'input': '1403681723783491968617491075591006152690484825330764215796396316561122383310011589365655481428540208\\r\\n', 'output': ['BigInteger']}, {'input': '4491137842784568289872893698937459777201151060689848471272003426250808340375567208957554901863756992\\r\\n', 'output': ['BigInteger']}, {'input': '16\\r\\n', 'output': ['byte']}, {'input': '1988808426143782131983811729737047667239979348184409855460833141044812532916921011366813880911319644\\r\\n', 'output': ['BigInteger']}, {'input': '128\\r\\n', 'output': ['short']}]","human_sample_testcases_3":"[{'input': '1111111111111111111111111111111111111111111111\\r\\n', 'output': ['BigInteger']}, {'input': '32768\\r\\n', 'output': ['int']}, {'input': '4491137842784568289872893698937459777201151060689848471272003426250808340375567208957554901863756992\\r\\n', 'output': ['BigInteger']}, {'input': '32766\\r\\n', 'output': ['short']}, {'input': '130\\r\\n', 'output': ['short']}]","human_sample_testcases_4":"[{'input': '4596620932866717074931903995027173085744596193421095444317407919730992986418713478580824584919587030\\r\\n', 'output': ['BigInteger']}, {'input': '221020945402270233\\r\\n', 'output': ['long']}, {'input': '8713549841568602590705962611607726022334779480510421458817648621376683672722573289661127894678771177\\r\\n', 'output': ['BigInteger']}, {'input': '2210209454022702335652564247406666491086662454147967686455330365147159266087\\r\\n', 'output': ['BigInteger']}, {'input': '73795216631038\\r\\n', 'output': ['long']}]","human_sample_testcases_5":"[{'input': '2334083498248924849764007740114454487565621932425948046430072197452845278935316358800789014185793377\\r\\n', 'output': ['BigInteger']}, {'input': '2147483648\\r\\n', 'output': ['long']}, {'input': '1988808426143782131983811729737047667239979348184409855460833141044812532916921011366813880911319644\\r\\n', 'output': ['BigInteger']}, {'input': '6862373979958859125198440634134122707574734706745701184688685117904709744830303784215298687654884810\\r\\n', 'output': ['BigInteger']}, {'input': '4491137842784568289872893698937459777201151060689848471272003426250808340375567208957554901863756992\\r\\n', 'output': ['BigInteger']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":90.0,"human_sample_line_coverage_2":80.0,"human_sample_line_coverage_3":80.0,"human_sample_line_coverage_4":70.0,"human_sample_line_coverage_5":70.0,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":75.0,"human_sample_branch_coverage_4":62.5,"human_sample_branch_coverage_5":62.5,"id":301,"human_sample_pass_rate":100.0,"human_sample_line_coverage":78.0,"human_sample_branch_coverage":72.5} {"sample_inputs":"[\"6\\n1 3 4 5 6 9\", \"3\\n998 999 1000\", \"5\\n1 2 3 4 5\"]","input_specification":"The first line of the input contains a single integer $$$n$$$ ($$$1 \\le n \\le 100$$$)\u00a0\u2014 the number of elements in the array. The second line of the input contains $$$n$$$ integers $$$a_i$$$ ($$$1 \\le a_1<a_2<\\dots<a_n \\le 10^3$$$)\u00a0\u2014 the array written by Giraffe.","src_uid":"858b5e75e21c4cba6d08f3f66be0c198","source_code":"n = int(input())\na = list(map(int,input().split()))\n\ncount=ans=0\n\nif(n>=2 and a[0]==1 and a[1]==2):\n\tcount+=1\n\nfor i in range(1,n-1):\n\tif(a[i-1]+1==a[i] and a[i+1]-1==a[i]):\n\t\tcount+=1\n\telse:\n\t\tans=max(ans,count)\n\t\tcount=0\n\nif(n>=2 and a[-1]==1000 and a[-2]==999):\n\tcount+=1\n\nans=max(count,ans)\nprint(ans)","sample_outputs":"[\"2\", \"2\", \"4\"]","lang_cluster":"Python","notes":"NoteIn the first example, JATC can erase the third and fourth elements, leaving the array $$$[1, 3, \\_, \\_, 6, 9]$$$. As you can see, there is only one way to fill in the blanks.In the second example, JATC can erase the second and the third elements. The array will become $$$[998, \\_, \\_]$$$. Because all the elements are less than or equal to $$$1000$$$, the array is still can be restored. Note, that he can't erase the first $$$2$$$ elements.In the third example, JATC can erase the first $$$4$$$ elements. Since all the elements are greater than or equal to $$$1$$$, Giraffe can still restore the array. Note, that he can't erase the last $$$4$$$ elements.","output_specification":"Print a single integer\u00a0\u2014 the maximum number of consecutive elements in the array that JATC can erase. If it is impossible to erase even a single element, print $$$0$$$.","description":"JATC and his friend Giraffe are currently in their room, solving some problems. Giraffe has written on the board an array $$$a_1$$$, $$$a_2$$$, ..., $$$a_n$$$ of integers, such that $$$1 \\le a_1 < a_2 < \\ldots < a_n \\le 10^3$$$, and then went to the bathroom.JATC decided to prank his friend by erasing some consecutive elements in the array. Since he doesn't want for the prank to go too far, he will only erase in a way, such that Giraffe can still restore the array using the information from the remaining elements. Because Giraffe has created the array, he's also aware that it's an increasing array and all the elements are integers in the range $$$[1, 10^3]$$$.JATC wonders what is the greatest number of elements he can erase?","human_testcases":"[{\"input\": \"6\\r\\n1 3 4 5 6 9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n998 999 1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n1 2 3 4 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n999 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n1 4 5 6 7 100 101 102 103\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"8\\r\\n6 8 9 11 14 18 19 20\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n1 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1\\r\\n779\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5\\r\\n3 8 25 37 43\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"73\\r\\n38 45 46 95 98 99 103 157 164 175 184 193 208 251 258 276 279 282 319 329 336 344 349 419 444 452 490 499 507 508 519 542 544 553 562 576 579 590 594 603 634 635 648 659 680 686 687 688 695 698 743 752 757 774 776 779 792 809 860 879 892 911 918 927 928 945 947 951 953 958 959 960 983\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"15\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"63\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"100\\r\\n252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 409 410 425 426 604 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"95\\r\\n34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 911 912 913\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"90\\r\\n126 239 240 241 242 253 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 600 601 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 934 935\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"85\\r\\n52 53 54 55 56 57 58 59 60 61 62 63 64 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 333 334 453 454 455 456 457 458 459 460 461 462 463 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"80\\r\\n237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 408 409 410 411 412 413 414 415 416 417 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985\\r\\n\", \"output\": [\"25\"]}, {\"input\": \"70\\r\\n72 73 74 75 76 77 78 79 80 81 82 354 355 356 357 358 359 360 361 362 363 364 365 366 367 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 764 765 766 767 768 769 770 794 795 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"75\\r\\n327 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"60\\r\\n12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 134 135 136 137 353 354 355 356 357 358 359 360 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"65\\r\\n253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 533 614 615 864\\r\\n\", \"output\": [\"59\"]}, {\"input\": \"55\\r\\n67 68 69 70 160 161 162 163 164 165 166 167 168 169 170 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 960\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"50\\r\\n157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 632 633 634 635 636 637 638\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"45\\r\\n145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 333 334 831 832 978 979 980 981\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"100\\r\\n901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"10\\r\\n1 2 3 4 5 6 7 8 9 10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"10\\r\\n991 992 993 994 995 996 997 998 999 1000\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"39\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"42\\r\\n959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"100\\r\\n144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 198 199 200 201 202 203 204 205 206 207 208 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 376 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 904 905 997\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"95\\r\\n9 10 11 12 13 134 271 272 273 274 275 276 277 278 290 291 292 293 294 295 296 297 298 299 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 620 621 622 623 624 625 626 627 628 629 630 631 632 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 952\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"90\\r\\n20 21 22 23 24 25 56 57 58 59 60 61 62 63 64 84 85 404 405 406 407 408 409 410 420 421 422 423 424 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 491 492 588 589 590 652 653 654 655 656 657 754 755 756 757 758 759 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 982 983 984 985 986 987 988 989 990 991 992 995\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"85\\r\\n40 41 42 43 44 69 70 71 72 73 305 306 307 308 309 333 334 335 336 337 338 339 340 341 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 717 718 719 720 721 862 863 864 865 866 867 868 869 870 871 872 873 874 945 946 947 948 949 950\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"80\\r\\n87 88 89 90 91 92 93 94 95 96 97 98 99 173 174 175 176 177 178 179 180 184 185 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 550 551 552 553 554 555 650 702 703 704 705 706 707 708 709 710 727 728 729 730 731 798 799 800 831 832 833 869 870 980 981 982 983 984 985 986 987 988 989 990 991 992\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1\\r\\n1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n998 999\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n3 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n9 10 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6\\r\\n4 5 6 7 8 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n5 6 7 8 9\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8\\r\\n1 2 5 6 7 8 9 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n1 2 3 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n1 2 3 66\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\n1 2 5 6 7 8 9\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n2 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8\\r\\n1 2 5 6 7 8 9 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n1 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4\\r\\n3 4 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n2 3 4 5 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n1 2 3 4 5 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6\\r\\n1 996 997 998 999 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n1 2 3 4 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n1 2 3 5 6 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n3 4 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n2 3 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n1 3 5 997 998 999 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n3 4 5 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n997 998 999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n1 2 3 4 6 7 8\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7\\r\\n2 3 4 6 997 998 999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n4 5 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n5 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"7\\r\\n1 2 3 997 998 999 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n1 3 999 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n1 3 5 7 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6\\r\\n1 2 3 4 5 10\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4\\r\\n1 2 999 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n10 20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5\\r\\n2 3 4 5 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n2 3 4 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"42\\r\\n35 145 153 169 281 292 299 322 333 334 358 382 391 421 436 447 464 467 478 491 500 538 604 667 703 705 716 718 724 726 771 811 827 869 894 895 902 912 942 961 962 995\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3\\r\\n10 11 12\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n1 2 3 4 6 9 18\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n1 2 3 4 800\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n1 2 3 4 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n1 997 998 999 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n1 2 6 7 8 9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n1 2 3 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9\\r\\n1 2 3 7 8 9 10 11 13\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n1 2 5 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6\\r\\n1 2 5 6 7 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n1 2 3 999 1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n656 658 660 662 664 666 668 670 672 674 676 678 680 682 684 686 688 690 692 694 696 698 700 702 704 706 708 710 712 714 716 718 720 722 724 726 728 730 732 734 736 738 740 742 744 746 748 750 752 754 756 758 760 762 764 766 768 770 772 774 776 778 780 782 784 786 788 790 792 794 796 798 800 802 804 806 808 810 812 814 816 818 820 822 824 826 828 830 832 834 836 838 840 842 844 848 850 852 999 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n1 2 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8\\r\\n2 3 4 5 997 998 999 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9\\r\\n1 2 3 4 6 7 9 10 12\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n1 2 7 8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3\\r\\n1 2 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5\\r\\n1 2 998 999 1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n1 2 3 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7\\r\\n2 4 6 997 998 999 1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5\\r\\n1 2 3 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6\\r\\n3 4 5 998 999 1000\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n2 4\\r\\n', 'output': ['0']}, {'input': '4\\r\\n1 2 3 7\\r\\n', 'output': ['2']}, {'input': '4\\r\\n2 3 4 5\\r\\n', 'output': ['2']}, {'input': '8\\r\\n1 2 5 6 7 8 9 11\\r\\n', 'output': ['3']}, {'input': '4\\r\\n3 4 5 6\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '8\\r\\n2 3 4 5 997 998 999 1000\\r\\n', 'output': ['3']}, {'input': '4\\r\\n3 4 5 6\\r\\n', 'output': ['2']}, {'input': '9\\r\\n1 2 3 4 6 7 9 10 12\\r\\n', 'output': ['3']}, {'input': '63\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63\\r\\n', 'output': ['62']}, {'input': '3\\r\\n2 3 4\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '6\\r\\n1 2 3 5 6 7\\r\\n', 'output': ['2']}, {'input': '2\\r\\n1 1000\\r\\n', 'output': ['0']}, {'input': '2\\r\\n998 999\\r\\n', 'output': ['0']}, {'input': '2\\r\\n3 4\\r\\n', 'output': ['0']}, {'input': '7\\r\\n1 2 3 4 6 7 8\\r\\n', 'output': ['3']}]","human_sample_testcases_4":"[{'input': '39\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39\\r\\n', 'output': ['38']}, {'input': '4\\r\\n2 3 4 5\\r\\n', 'output': ['2']}, {'input': '7\\r\\n2 4 6 997 998 999 1000\\r\\n', 'output': ['3']}, {'input': '7\\r\\n1 2 3 4 6 9 18\\r\\n', 'output': ['3']}, {'input': '42\\r\\n959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000\\r\\n', 'output': ['41']}]","human_sample_testcases_5":"[{'input': '7\\r\\n1 2 3 4 6 7 8\\r\\n', 'output': ['3']}, {'input': '7\\r\\n2 3 4 6 997 998 999\\r\\n', 'output': ['1']}, {'input': '45\\r\\n145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 333 334 831 832 978 979 980 981\\r\\n', 'output': ['35']}, {'input': '8\\r\\n1 2 5 6 7 8 9 11\\r\\n', 'output': ['3']}, {'input': '5\\r\\n1 2 3 4 800\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.86,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":92.86,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":92.86,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":87.5,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":87.5,"id":302,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.716,"human_sample_branch_coverage":92.5} {"sample_inputs":"[\"3 6\", \"3 4\"]","input_specification":"The only line contains two integers p and y (2\u2009\u2264\u2009p\u2009\u2264\u2009y\u2009\u2264\u2009109).","src_uid":"b533203f488fa4caf105f3f46dd5844d","source_code":"p, y = [int(x) for x in input().split()]\nres = -1\nfor i in range(y, p, -1):\n flag = True\n for a in range(2, min(p+1, int(i**0.5)+1)):\n if i % a == 0:\n flag = False\n break\n if flag:\n res = i\n break\nprint(res)\n","sample_outputs":"[\"5\", \"-1\"]","lang_cluster":"Python","notes":"NoteIn the first sample case grasshopper from branch 2 reaches branches 2, 4 and 6 while branch 3 is initially settled by another grasshopper. Therefore the answer is 5.It immediately follows that there are no valid branches in second sample case.","output_specification":"Output the number of the highest suitable branch. If there are none, print -1 instead.","description":"The weather is fine today and hence it's high time to climb the nearby pine and enjoy the landscape.The pine's trunk includes several branches, located one above another and numbered from 2 to y. Some of them (more precise, from 2 to p) are occupied by tiny vile grasshoppers which you're at war with. These grasshoppers are known for their awesome jumping skills: the grasshopper at branch x can jump to branches .Keeping this in mind, you wisely decided to choose such a branch that none of the grasshoppers could interrupt you. At the same time you wanna settle as high as possible since the view from up there is simply breathtaking.In other words, your goal is to find the highest branch that cannot be reached by any of the grasshoppers or report that it's impossible.","human_testcases":"[{\"input\": \"3 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"5 50\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"944192806 944193066\\r\\n\", \"output\": [\"944192807\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2 1000000000\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"28788 944193066\\r\\n\", \"output\": [\"944192833\"]}, {\"input\": \"49 52\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"698964997 734575900\\r\\n\", \"output\": [\"734575871\"]}, {\"input\": \"287894773 723316271\\r\\n\", \"output\": [\"723316207\"]}, {\"input\": \"171837140 733094070\\r\\n\", \"output\": [\"733094069\"]}, {\"input\": \"37839169 350746807\\r\\n\", \"output\": [\"350746727\"]}, {\"input\": \"125764821 234689174\\r\\n\", \"output\": [\"234689137\"]}, {\"input\": \"413598841 430509920\\r\\n\", \"output\": [\"430509917\"]}, {\"input\": \"145320418 592508508\\r\\n\", \"output\": [\"592508479\"]}, {\"input\": \"155098216 476450875\\r\\n\", \"output\": [\"476450861\"]}, {\"input\": \"459843315 950327842\\r\\n\", \"output\": [\"950327831\"]}, {\"input\": \"469621113 834270209\\r\\n\", \"output\": [\"834270209\"]}, {\"input\": \"13179877 557546766\\r\\n\", \"output\": [\"557546753\"]}, {\"input\": \"541748242 723508350\\r\\n\", \"output\": [\"723508301\"]}, {\"input\": \"607450717 924641194\\r\\n\", \"output\": [\"924641189\"]}, {\"input\": \"786360384 934418993\\r\\n\", \"output\": [\"934418981\"]}, {\"input\": \"649229491 965270051\\r\\n\", \"output\": [\"965270051\"]}, {\"input\": \"144179719 953974590\\r\\n\", \"output\": [\"953974583\"]}, {\"input\": \"28122086 963752388\\r\\n\", \"output\": [\"963752347\"]}, {\"input\": \"268497487 501999053\\r\\n\", \"output\": [\"501999053\"]}, {\"input\": \"356423140 385941420\\r\\n\", \"output\": [\"385941419\"]}, {\"input\": \"71233638 269883787\\r\\n\", \"output\": [\"269883787\"]}, {\"input\": \"2601 698964997\\r\\n\", \"output\": [\"698964983\"]}, {\"input\": \"4096 287894773\\r\\n\", \"output\": [\"287894771\"]}, {\"input\": \"5675 171837140\\r\\n\", \"output\": [\"171837131\"]}, {\"input\": \"13067 350746807\\r\\n\", \"output\": [\"350746727\"]}, {\"input\": \"8699 234689174\\r\\n\", \"output\": [\"234689137\"]}, {\"input\": \"12190 413598841\\r\\n\", \"output\": [\"413598817\"]}, {\"input\": \"20555 592508508\\r\\n\", \"output\": [\"592508479\"]}, {\"input\": \"19137 476450875\\r\\n\", \"output\": [\"476450861\"]}, {\"input\": \"8793 950327842\\r\\n\", \"output\": [\"950327831\"]}, {\"input\": \"1541 834270209\\r\\n\", \"output\": [\"834270209\"]}, {\"input\": \"1082 13179877\\r\\n\", \"output\": [\"13179871\"]}, {\"input\": \"3888 723508350\\r\\n\", \"output\": [\"723508301\"]}, {\"input\": \"14078 607450717\\r\\n\", \"output\": [\"607450703\"]}, {\"input\": \"20869 786360384\\r\\n\", \"output\": [\"786360373\"]}, {\"input\": \"13689 965270051\\r\\n\", \"output\": [\"965270051\"]}, {\"input\": \"782 144179719\\r\\n\", \"output\": [\"144179719\"]}, {\"input\": \"404 28122086\\r\\n\", \"output\": [\"28122079\"]}, {\"input\": \"21992 501999053\\r\\n\", \"output\": [\"501999053\"]}, {\"input\": \"13745 385941420\\r\\n\", \"output\": [\"385941419\"]}, {\"input\": \"8711 269883787\\r\\n\", \"output\": [\"269883787\"]}, {\"input\": \"31333 981756889\\r\\n\", \"output\": [\"981756871\"]}, {\"input\": \"944192808 944193061\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"4 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 13\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"7 53\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"10 1000000000\\r\\n\", \"output\": [\"999999997\"]}, {\"input\": \"2 7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"4 9\\r\\n\", \"output\": [\"7\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1541 834270209\\r\\n', 'output': ['834270209']}, {'input': '8793 950327842\\r\\n', 'output': ['950327831']}, {'input': '171837140 733094070\\r\\n', 'output': ['733094069']}, {'input': '649229491 965270051\\r\\n', 'output': ['965270051']}, {'input': '4 5\\r\\n', 'output': ['5']}]","human_sample_testcases_2":"[{'input': '404 28122086\\r\\n', 'output': ['28122079']}, {'input': '31333 981756889\\r\\n', 'output': ['981756871']}, {'input': '19137 476450875\\r\\n', 'output': ['476450861']}, {'input': '287894773 723316271\\r\\n', 'output': ['723316207']}, {'input': '5 50\\r\\n', 'output': ['49']}]","human_sample_testcases_3":"[{'input': '649229491 965270051\\r\\n', 'output': ['965270051']}, {'input': '404 28122086\\r\\n', 'output': ['28122079']}, {'input': '356423140 385941420\\r\\n', 'output': ['385941419']}, {'input': '20869 786360384\\r\\n', 'output': ['786360373']}, {'input': '3888 723508350\\r\\n', 'output': ['723508301']}]","human_sample_testcases_4":"[{'input': '3 4\\r\\n', 'output': ['-1']}, {'input': '14078 607450717\\r\\n', 'output': ['607450703']}, {'input': '37839169 350746807\\r\\n', 'output': ['350746727']}, {'input': '13067 350746807\\r\\n', 'output': ['350746727']}, {'input': '8699 234689174\\r\\n', 'output': ['234689137']}]","human_sample_testcases_5":"[{'input': '944192806 944193066\\r\\n', 'output': ['944192807']}, {'input': '2 7\\r\\n', 'output': ['7']}, {'input': '19137 476450875\\r\\n', 'output': ['476450861']}, {'input': '20869 786360384\\r\\n', 'output': ['786360373']}, {'input': '469621113 834270209\\r\\n', 'output': ['834270209']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":90.0,"human_sample_branch_coverage_3":90.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":90.0,"id":303,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":92.0} {"sample_inputs":"[\"monday\\ntuesday\", \"sunday\\nsunday\", \"saturday\\ntuesday\"]","input_specification":"The input consists of two lines, each of them containing the name of exactly one day of the week. It's guaranteed that each string in the input is from the set \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\".","src_uid":"2a75f68a7374b90b80bb362c6ead9a35","source_code":"s1=input()\ns2=input()\nweek=[\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\"]\nif week[(week.index(s1)+31)%7]==s2:print(\"YES\")\nelif week[(week.index(s1)+28)%7]==s2:print(\"YES\")\nelif week[(week.index(s1)+30)%7]==s2:print(\"YES\")\nelse:print(\"NO\")","sample_outputs":"[\"NO\", \"YES\", \"YES\"]","lang_cluster":"Python","notes":"NoteIn the second sample, one can consider February 1 and March 1 of year 2015. Both these days were Sundays.In the third sample, one can consider July 1 and August 1 of year 2017. First of these two days is Saturday, while the second one is Tuesday.","output_specification":"Print \"YES\" (without quotes) if such situation is possible during some non-leap year. Otherwise, print \"NO\" (without quotes).","description":"You are given names of two days of the week.Please, determine whether it is possible that during some non-leap year the first day of some month was equal to the first day of the week you are given, while the first day of the next month was equal to the second day of the week you are given. Both months should belong to one year.In this problem, we consider the Gregorian calendar to be used. The number of months in this calendar is equal to 12. The number of days in months during any non-leap year is: 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31.Names of the days of the week are given with lowercase English letters: \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\".","human_testcases":"[{\"input\": \"monday\\r\\ntuesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sunday\\r\\nsunday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"saturday\\r\\ntuesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"tuesday\\r\\nthursday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"friday\\r\\nwednesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sunday\\r\\nsaturday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"monday\\r\\nmonday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"monday\\r\\nwednesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"monday\\r\\nthursday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"monday\\r\\nfriday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"monday\\r\\nsaturday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"monday\\r\\nsunday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"tuesday\\r\\nmonday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"tuesday\\r\\ntuesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"tuesday\\r\\nwednesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"tuesday\\r\\nfriday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"tuesday\\r\\nsaturday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"tuesday\\r\\nsunday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"wednesday\\r\\nmonday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"wednesday\\r\\ntuesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"wednesday\\r\\nwednesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"wednesday\\r\\nthursday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"wednesday\\r\\nfriday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"wednesday\\r\\nsaturday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"wednesday\\r\\nsunday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"thursday\\r\\nmonday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"thursday\\r\\ntuesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"thursday\\r\\nwednesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"thursday\\r\\nthursday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"thursday\\r\\nfriday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"thursday\\r\\nsaturday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"thursday\\r\\nsunday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"friday\\r\\nmonday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"friday\\r\\ntuesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"friday\\r\\nthursday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"friday\\r\\nsaturday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"friday\\r\\nsunday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"saturday\\r\\nmonday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"saturday\\r\\nwednesday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"saturday\\r\\nthursday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"saturday\\r\\nfriday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"saturday\\r\\nsaturday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"saturday\\r\\nsunday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sunday\\r\\nmonday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sunday\\r\\ntuesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"sunday\\r\\nwednesday\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"sunday\\r\\nthursday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sunday\\r\\nfriday\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"friday\\r\\nfriday\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'friday\\r\\nthursday\\r\\n', 'output': ['NO']}, {'input': 'tuesday\\r\\nwednesday\\r\\n', 'output': ['NO']}, {'input': 'thursday\\r\\nmonday\\r\\n', 'output': ['NO']}, {'input': 'wednesday\\r\\nmonday\\r\\n', 'output': ['NO']}, {'input': 'tuesday\\r\\nsaturday\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': 'monday\\r\\nsaturday\\r\\n', 'output': ['NO']}, {'input': 'tuesday\\r\\nmonday\\r\\n', 'output': ['NO']}, {'input': 'friday\\r\\nmonday\\r\\n', 'output': ['YES']}, {'input': 'monday\\r\\nsunday\\r\\n', 'output': ['NO']}, {'input': 'wednesday\\r\\nmonday\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': 'friday\\r\\nwednesday\\r\\n', 'output': ['NO']}, {'input': 'saturday\\r\\nsunday\\r\\n', 'output': ['NO']}, {'input': 'thursday\\r\\ntuesday\\r\\n', 'output': ['NO']}, {'input': 'saturday\\r\\nmonday\\r\\n', 'output': ['YES']}, {'input': 'wednesday\\r\\ntuesday\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': 'thursday\\r\\nthursday\\r\\n', 'output': ['YES']}, {'input': 'tuesday\\r\\ntuesday\\r\\n', 'output': ['YES']}, {'input': 'friday\\r\\nsunday\\r\\n', 'output': ['YES']}, {'input': 'wednesday\\r\\nmonday\\r\\n', 'output': ['NO']}, {'input': 'sunday\\r\\nfriday\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': 'friday\\r\\nfriday\\r\\n', 'output': ['YES']}, {'input': 'tuesday\\r\\nwednesday\\r\\n', 'output': ['NO']}, {'input': 'monday\\r\\nsunday\\r\\n', 'output': ['NO']}, {'input': 'thursday\\r\\nwednesday\\r\\n', 'output': ['NO']}, {'input': 'wednesday\\r\\nsunday\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":66.67,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":66.67,"id":304,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":66.668} {"sample_inputs":"[\"X0X\\n.0.\\n.X.\"]","input_specification":"The input consists of three lines, each of the lines contains characters \".\", \"X\" or \"0\" (a period, a capital letter X, or a digit zero).","src_uid":"892680e26369325fb00d15543a96192c","source_code":"def win(l,s):\n if l[0] == [s, s, s] or l[1] == [s, s, s] or l[2] == [s, s, s] or l[0][0] == s and l[1][0] == s and l[2][0] == s or \\\n l[0][1] == s and l[1][1] == s and l[2][1] == s or l[0][2] == s and l[1][2] == s and l[2][2] == s or l[0][\n 0] == s and l[1][1] == s and l[2][2] == s or l[0][2] == s and l[1][1] == s and l[2][0] == s:\n return 1\n else:\n return 0\na=list(input())\nb=list(input())\nc=list(input())\nl=[a,b,c]\nmf=a.count('X')+b.count('X')+c.count('X')\nms=a.count('0')+b.count('0')+c.count('0')\nme=a.count('.')+b.count('.')+c.count('.')\nif mf -ms!= 1 and mf -ms!=0 :\n print('illegal')\nelse:\n n=win(l,'0')\n m=win(l,'X')\n if n==1 and m==1 or n==1 and mf-ms!=0 or m==1 and mf-ms!=1:\n print('illegal')\n elif n==1:\n print('the second player won')\n elif m==1:\n print('the first player won')\n else:\n if me==0:\n print('draw')\n elif mf-ms==1:\n print('second')\n else:print('first')","sample_outputs":"[\"second\"]","lang_cluster":"Python","notes":null,"output_specification":"Print one of the six verdicts: first, second, illegal, the first player won, the second player won or draw.","description":"Certainly, everyone is familiar with tic-tac-toe game. The rules are very simple indeed. Two players take turns marking the cells in a 3\u2009\u00d7\u20093 grid (one player always draws crosses, the other \u2014 noughts). The player who succeeds first in placing three of his marks in a horizontal, vertical or diagonal line wins, and the game is finished. The player who draws crosses goes first. If the grid is filled, but neither Xs, nor 0s form the required line, a draw is announced.You are given a 3\u2009\u00d7\u20093 grid, each grid cell is empty, or occupied by a cross or a nought. You have to find the player (first or second), whose turn is next, or print one of the verdicts below: illegal \u2014 if the given board layout can't appear during a valid game; the first player won \u2014 if in the given board layout the first player has just won; the second player won \u2014 if in the given board layout the second player has just won; draw \u2014 if the given board layout has just let to a draw. ","human_testcases":"[{\"input\": \"X0X\\r\\n.0.\\r\\n.X.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"0.X\\r\\nXX.\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\n.0.\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\n...\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X.X\\r\\nX..\\r\\n00.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"X.X\\r\\nX.0\\r\\n0.0\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"0..\\r\\n...\\r\\n...\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\nX00\\r\\nX00\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"000\\r\\nX.X\\r\\nX.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\n0.0\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\n0X0\\r\\nX0X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX.\\r\\nX0X\\r\\nX..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\n0X0\\r\\nX..\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX0\\r\\n0..\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\n0..\\r\\n.0.\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XXX\\r\\nX..\\r\\n.00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X00\\r\\n0.0\\r\\nXX0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0.0\\r\\n0XX\\r\\n..0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".00\\r\\nX.X\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..0\\r\\n.00\\r\\n.0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..0\\r\\n0..\\r\\n00X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..0\\r\\n.XX\\r\\nX..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0.X\\r\\n0X0\\r\\n.00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..X\\r\\n0X0\\r\\n0X.\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"0X0\\r\\nX..\\r\\nX.0\\r\\n\", \"output\": [\"first\"]}, {\"input\": \".0.\\r\\nX.X\\r\\n0..\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"0X0\\r\\n00X\\r\\n.00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".0.\\r\\n.X0\\r\\nX..\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"00X\\r\\n0.X\\r\\n00X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00X\\r\\n0XX\\r\\n0X.\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X00\\r\\n..0\\r\\nX.X\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X00\\r\\nX00\\r\\n.X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\n.X0\\r\\n0..\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"..0\\r\\nXXX\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\n...\\r\\n.0.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0..\\r\\n000\\r\\nX0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".00\\r\\n0X.\\r\\n0.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X..\\r\\nX00\\r\\n0.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".X0\\r\\nXX0\\r\\nX.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X.X\\r\\n0.0\\r\\nX..\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"00X\\r\\n.00\\r\\n..0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..0\\r\\n0.X\\r\\n00.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0.X\\r\\nX0X\\r\\n.X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0X.\\r\\n.X.\\r\\n0X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00.\\r\\nX0.\\r\\n..X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..X\\r\\n.00\\r\\nXX.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".00\\r\\n.0.\\r\\n.X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\nX.0\\r\\nXX0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00.\\r\\n00.\\r\\nX.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X00\\r\\nX.0\\r\\nX.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0X.\\r\\n0XX\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00.\\r\\n00.\\r\\n.X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\n00.\\r\\n0.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\nXXX\\r\\n0X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\n..X\\r\\nXX0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0X.\\r\\n..X\\r\\nX..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"...\\r\\nX0.\\r\\nXX0\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"..X\\r\\n.0.\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00X\\r\\nXX.\\r\\n00X\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"..0\\r\\nXX0\\r\\n..X\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".0.\\r\\n.00\\r\\nX00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X00\\r\\n.XX\\r\\n00.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".00\\r\\n0.X\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0.\\r\\n..0\\r\\nX.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\n.XX\\r\\n00.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"0X.\\r\\n00.\\r\\n.X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0..\\r\\n000\\r\\n...\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".0.\\r\\n...\\r\\n0.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..X\\r\\nX00\\r\\n0.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0XX\\r\\n...\\r\\nX0.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"X.X\\r\\n0X.\\r\\n.0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\nX.X\\r\\n00.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".0X\\r\\n.00\\r\\n00.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".XX\\r\\nXXX\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\n.X0\\r\\n.0.\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X00\\r\\n0.X\\r\\nX..\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X..\\r\\n.X0\\r\\nX0.\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".0X\\r\\nX..\\r\\nXXX\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X0X\\r\\nXXX\\r\\nX.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".00\\r\\nX0.\\r\\n00X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0XX\\r\\n.X0\\r\\n0.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00X\\r\\nXXX\\r\\n..0\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X0X\\r\\n...\\r\\n.X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".X0\\r\\n...\\r\\n0X.\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X..\\r\\n0X0\\r\\nX.0\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"..0\\r\\n.00\\r\\nX.0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".XX\\r\\n.0.\\r\\nX0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00.\\r\\n0XX\\r\\n..0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".0.\\r\\n00.\\r\\n00.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00.\\r\\n000\\r\\nX.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0X0\\r\\n.X0\\r\\n.X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"00X\\r\\n0..\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".X.\\r\\n.X0\\r\\nX.0\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".0.\\r\\n0X0\\r\\nX0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"...\\r\\nX.0\\r\\n0..\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..0\\r\\nXX.\\r\\n00X\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"0.X\\r\\n.0X\\r\\nX00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"..X\\r\\n0X.\\r\\n.0.\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"..X\\r\\nX.0\\r\\n.0X\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"X0.\\r\\n.0X\\r\\nX0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"...\\r\\n.0.\\r\\n.X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".X0\\r\\nXX0\\r\\n0..\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"0X.\\r\\n...\\r\\nX..\\r\\n\", \"output\": [\"second\"]}, {\"input\": \".0.\\r\\n0.0\\r\\n0.X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX.\\r\\n.X0\\r\\n.0X\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".0.\\r\\nX0X\\r\\nX00\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0X.\\r\\n.X0\\r\\nX..\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"..0\\r\\n0X.\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"0.0\\r\\nX.X\\r\\nXX.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \".X.\\r\\n.XX\\r\\nX0.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X.X\\r\\n.XX\\r\\n0X.\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"...\\r\\n.X.\\r\\n...\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"..0\\r\\n.X.\\r\\n...\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"..0\\r\\n.XX\\r\\n...\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"..0\\r\\n0XX\\r\\n...\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X.0\\r\\n0XX\\r\\n...\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"X.0\\r\\n0XX\\r\\n..0\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X.0\\r\\n0XX\\r\\n.X0\\r\\n\", \"output\": [\"second\"]}, {\"input\": \"X00\\r\\n0XX\\r\\n.X0\\r\\n\", \"output\": [\"first\"]}, {\"input\": \"X00\\r\\n0XX\\r\\nXX0\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"X00\\r\\n0XX\\r\\n0X0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XXX\\r\\nXXX\\r\\nXXX\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"000\\r\\n000\\r\\n000\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"XX0\\r\\n00X\\r\\nXX0\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"X00\\r\\n00X\\r\\nXX0\\r\\n\", \"output\": [\"illegal\"]}, {\"input\": \"X.0\\r\\n00.\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X..\\r\\nX0.\\r\\nX0.\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \".XX\\r\\n000\\r\\nXX0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X0.\\r\\nX.X\\r\\nX00\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"00X\\r\\nX00\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XXX\\r\\n.00\\r\\nX0.\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX0\\r\\n000\\r\\nXX.\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \".X0\\r\\n0.0\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0XX\\r\\nX00\\r\\n0XX\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"0XX\\r\\nX0X\\r\\n00X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX0\\r\\n0XX\\r\\n0X0\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0X0\\r\\nX0X\\r\\nX0X\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"XXX\\r\\n0.0\\r\\n...\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X0X\\r\\n0XX\\r\\n00X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0XX\\r\\nX0.\\r\\nX00\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X.0\\r\\n0X0\\r\\nXX0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X0X\\r\\nX0X\\r\\n0X0\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"X.0\\r\\n00X\\r\\n0XX\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"00X\\r\\nX0X\\r\\n.X0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X0X\\r\\n.00\\r\\nX0X\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"0XX\\r\\nX00\\r\\nX0X\\r\\n\", \"output\": [\"draw\"]}, {\"input\": \"000\\r\\nX0X\\r\\n.XX\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"0.0\\r\\n0.X\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X.0\\r\\nX0.\\r\\n0X.\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X0X\\r\\n0X0\\r\\n..X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0X0\\r\\nXX0\\r\\n.X.\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X0.\\r\\n.X.\\r\\n0.X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0XX\\r\\nX00\\r\\n.X0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"0.0\\r\\nXXX\\r\\n0.X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \".0X\\r\\n.X.\\r\\nX.0\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XXX\\r\\nX.0\\r\\n0.0\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX0\\r\\nX..\\r\\nX00\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XXX\\r\\n00X\\r\\n00X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X00\\r\\n00X\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0X0\\r\\nX0X\\r\\n0X.\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"XX0\\r\\nX00\\r\\n0X.\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"..X\\r\\n0X0\\r\\nX..\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X0.\\r\\n00.\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0.X\\r\\nX00\\r\\nXX0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"X0.\\r\\n0X.\\r\\n..X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"00X\\r\\nX0.\\r\\nXX0\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"XX.\\r\\n000\\r\\n0XX\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"..X\\r\\n0.X\\r\\n.0X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X00\\r\\n.0X\\r\\n0XX\\r\\n\", \"output\": [\"the second player won\"]}, {\"input\": \"00X\\r\\n0X.\\r\\nXX.\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X00\\r\\nXX.\\r\\n0.X\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XXX\\r\\n00X\\r\\n0X0\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"X00\\r\\nXX0\\r\\n0XX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"0X0\\r\\nX00\\r\\nXXX\\r\\n\", \"output\": [\"the first player won\"]}, {\"input\": \"XX0\\r\\nX00\\r\\n.X0\\r\\n\", \"output\": [\"the second player won\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'X.0\\r\\n00.\\r\\nXXX\\r\\n', 'output': ['the first player won']}, {'input': 'X0.\\r\\n00.\\r\\nXXX\\r\\n', 'output': ['the first player won']}, {'input': '.0X\\r\\n.00\\r\\n00.\\r\\n', 'output': ['illegal']}, {'input': '..X\\r\\n0X.\\r\\n.0.\\r\\n', 'output': ['first']}, {'input': '00.\\r\\nX0.\\r\\n..X\\r\\n', 'output': ['illegal']}]","human_sample_testcases_2":"[{'input': '0..\\r\\n000\\r\\n...\\r\\n', 'output': ['illegal']}, {'input': '.0.\\r\\n00.\\r\\n00.\\r\\n', 'output': ['illegal']}, {'input': '0X0\\r\\nX00\\r\\nXXX\\r\\n', 'output': ['the first player won']}, {'input': 'X00\\r\\n0.X\\r\\nX..\\r\\n', 'output': ['first']}, {'input': '0X.\\r\\n.X.\\r\\n0X0\\r\\n', 'output': ['illegal']}]","human_sample_testcases_3":"[{'input': '0X0\\r\\nX..\\r\\nX.0\\r\\n', 'output': ['first']}, {'input': '.0X\\r\\n.X.\\r\\nX.0\\r\\n', 'output': ['the first player won']}, {'input': '.0.\\r\\n.X0\\r\\nX..\\r\\n', 'output': ['first']}, {'input': 'X.X\\r\\nX.0\\r\\n0.0\\r\\n', 'output': ['first']}, {'input': '.0.\\r\\n.00\\r\\nX00\\r\\n', 'output': ['illegal']}]","human_sample_testcases_4":"[{'input': 'X..\\r\\n.X0\\r\\nX0.\\r\\n', 'output': ['second']}, {'input': '.00\\r\\nX0.\\r\\n00X\\r\\n', 'output': ['illegal']}, {'input': '...\\r\\n.X.\\r\\n...\\r\\n', 'output': ['second']}, {'input': 'XXX\\r\\n0.0\\r\\n0..\\r\\n', 'output': ['illegal']}, {'input': '0.0\\r\\n0.X\\r\\nXXX\\r\\n', 'output': ['the first player won']}]","human_sample_testcases_5":"[{'input': '000\\r\\nX.X\\r\\nX.X\\r\\n', 'output': ['illegal']}, {'input': 'X00\\r\\n00X\\r\\nXXX\\r\\n', 'output': ['the first player won']}, {'input': '000\\r\\n000\\r\\n000\\r\\n', 'output': ['illegal']}, {'input': 'XX0\\r\\n0..\\r\\n000\\r\\n', 'output': ['illegal']}, {'input': '..0\\r\\nXX.\\r\\n00X\\r\\n', 'output': ['first']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":84.62,"human_sample_line_coverage_2":88.46,"human_sample_line_coverage_3":84.62,"human_sample_line_coverage_4":88.46,"human_sample_line_coverage_5":88.46,"human_sample_branch_coverage_1":71.43,"human_sample_branch_coverage_2":78.57,"human_sample_branch_coverage_3":71.43,"human_sample_branch_coverage_4":78.57,"human_sample_branch_coverage_5":78.57,"id":305,"human_sample_pass_rate":100.0,"human_sample_line_coverage":86.924,"human_sample_branch_coverage":75.714} {"sample_inputs":"[\"10\\nrocesfedoc\", \"16\\nplmaetwoxesisiht\", \"1\\nz\"]","input_specification":"The first line of input consists of a single integer $$$n$$$ ($$$1 \\le n \\le 100$$$) \u2014 the length of the string $$$t$$$. The second line of input consists of the string $$$t$$$. The length of $$$t$$$ is $$$n$$$, and it consists only of lowercase Latin letters.","src_uid":"1b0b2ee44c63cb0634cb63f2ad65cdd3","source_code":"a = int(input())\ns = list(input())\n\nb = []\nfor i in range(a, 1, -1):\n if a % i == 0:\n b.append(i)\n\nfor i in range(len(b)-1, -1, -1):\n s[0:b[i]] = reversed(s[0:b[i]])\n\ns = \"\".join(s)\nprint(s)","sample_outputs":"[\"codeforces\", \"thisisexampletwo\", \"z\"]","lang_cluster":"Python","notes":"NoteThe first example is described in the problem statement.","output_specification":"Print a string $$$s$$$ such that the above algorithm results in $$$t$$$.","description":"A string $$$s$$$ of length $$$n$$$ can be encrypted by the following algorithm: iterate over all divisors of $$$n$$$ in decreasing order (i.e. from $$$n$$$ to $$$1$$$), for each divisor $$$d$$$, reverse the substring $$$s[1 \\dots d]$$$ (i.e. the substring which starts at position $$$1$$$ and ends at position $$$d$$$). For example, the above algorithm applied to the string $$$s$$$=\"codeforces\" leads to the following changes: \"codeforces\" $$$\\to$$$ \"secrofedoc\" $$$\\to$$$ \"orcesfedoc\" $$$\\to$$$ \"rocesfedoc\" $$$\\to$$$ \"rocesfedoc\" (obviously, the last reverse operation doesn't change the string because $$$d=1$$$).You are given the encrypted string $$$t$$$. Your task is to decrypt this string, i.e., to find a string $$$s$$$ such that the above algorithm results in string $$$t$$$. It can be proven that this string $$$s$$$ always exists and is unique.","human_testcases":"[{\"input\": \"10\\r\\nrocesfedoc\\r\\n\", \"output\": [\"codeforces\"]}, {\"input\": \"16\\r\\nplmaetwoxesisiht\\r\\n\", \"output\": [\"thisisexampletwo\"]}, {\"input\": \"1\\r\\nz\\r\\n\", \"output\": [\"z\"]}, {\"input\": \"2\\r\\nir\\r\\n\", \"output\": [\"ri\"]}, {\"input\": \"3\\r\\nilj\\r\\n\", \"output\": [\"jli\"]}, {\"input\": \"4\\r\\njfyy\\r\\n\", \"output\": [\"yyjf\"]}, {\"input\": \"6\\r\\nkrdych\\r\\n\", \"output\": [\"hcyrkd\"]}, {\"input\": \"60\\r\\nfnebsopcvmlaoecpzmakqigyuutueuozjxutlwwiochekmhjgwxsgfbcrpqj\\r\\n\", \"output\": [\"jqprcbfgsxwgjhmkehcoiwwltuxjzokamzpalobnfespcvmoecqigyuutueu\"]}, {\"input\": \"64\\r\\nhnlzzhrvqnldswxfsrowfhmyzbxtyoxhogudasgywxycyhzgiseerbislcncvnwy\\r\\n\", \"output\": [\"ywnvcnclsibreesigzhycyxwygsadugofxwsdlnqzlhnzhrvsrowfhmyzbxtyoxh\"]}, {\"input\": \"97\\r\\nqnqrmdhmbubaijtwsecbidqouhlecladwgwcuxbigckrfzasnbfbslukoayhcgquuacygakhxoubibxtqkpyyhzjipylujgrc\\r\\n\", \"output\": [\"crgjulypijzhyypkqtxbibuoxhkagycauuqgchyaokulsbfbnsazfrkcgibxucwgwdalcelhuoqdibceswtjiabubmhdmrqnq\"]}, {\"input\": \"100\\r\\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\\r\\n\", \"output\": [\"fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi\"]}, {\"input\": \"96\\r\\nqtbcksuvxonzbkokhqlgkrvimzqmqnrvqlihrmksldyydacbtckfphenxszcnzhfjmpeykrvshgiboivkvabhrpphgavvprz\\r\\n\", \"output\": [\"zrpvvaghpprhbavkviobighsvrkyepmjfhznczsxnehpfkctvrnqmqzmkokbvuctqbksxonzhqlgkrviqlihrmksldyydacb\"]}, {\"input\": \"90\\r\\nmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n\", \"output\": [\"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\"]}, {\"input\": \"89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n\", \"output\": [\"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\"]}, {\"input\": \"99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n\", \"output\": [\"qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\"]}, {\"input\": \"100\\r\\noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\\r\\n\", \"output\": [\"oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\"]}, {\"input\": \"60\\r\\nwwwwwxwwwwwwfhwwhwwwwwwawwwwwwwwwwwwwnwwwwwwwwwwwwwwwwwwwwww\\r\\n\", \"output\": [\"wwwwwwwwwwwwwwwwwwwwwwnwwwwwwwwwwhwwwxwwwwwwwwwfhwwwwawwwwww\"]}, {\"input\": \"90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n\", \"output\": [\"cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc\"]}, {\"input\": \"97\\r\\nfwffffffffffffffffffffffffrffffffffffffffzfffffffffffffffftfcfffffffqffffffffffffffffffffffyfffff\\r\\n\", \"output\": [\"fffffyffffffffffffffffffffffqfffffffcftffffffffffffffffzffffffffffffffrffffffffffffffffffffffffwf\"]}, {\"input\": \"100\\r\\ndjjjjjjjjjjgjjjjjjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjjjjajjjjjjajjjjjjrjjjjjjjjjjjjrjjtjjjjjjjjjjjjjojjj\\r\\n\", \"output\": [\"jjjojjjjjjjjjjjjjtjjrjjjjjjjjjjjjrjjjjjjajjjjjjajjjjjjjjjjjjjjdjjjgjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjj\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '96\\r\\nqtbcksuvxonzbkokhqlgkrvimzqmqnrvqlihrmksldyydacbtckfphenxszcnzhfjmpeykrvshgiboivkvabhrpphgavvprz\\r\\n', 'output': ['zrpvvaghpprhbavkviobighsvrkyepmjfhznczsxnehpfkctvrnqmqzmkokbvuctqbksxonzhqlgkrviqlihrmksldyydacb']}, {'input': '100\\r\\noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo\\r\\n', 'output': ['oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo']}, {'input': '99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n', 'output': ['qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq']}, {'input': '90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n', 'output': ['cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc']}, {'input': '97\\r\\nfwffffffffffffffffffffffffrffffffffffffffzfffffffffffffffftfcfffffffqffffffffffffffffffffffyfffff\\r\\n', 'output': ['fffffyffffffffffffffffffffffqfffffffcftffffffffffffffffzffffffffffffffrffffffffffffffffffffffffwf']}]","human_sample_testcases_2":"[{'input': '97\\r\\nfwffffffffffffffffffffffffrffffffffffffffzfffffffffffffffftfcfffffffqffffffffffffffffffffffyfffff\\r\\n', 'output': ['fffffyffffffffffffffffffffffqfffffffcftffffffffffffffffzffffffffffffffrffffffffffffffffffffffffwf']}, {'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '1\\r\\nz\\r\\n', 'output': ['z']}, {'input': '90\\r\\ncccchccccccccccccccccccccccccccwcccccccccgcccccchccccccccccccccccccccccxccccccncccccccuccc\\r\\n', 'output': ['cccucccccccnccccccxcccccccccccccccccccccchccccccccccccccccccccccchccccccccccwcccccccccgccc']}, {'input': '100\\r\\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\\r\\n', 'output': ['fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi']}]","human_sample_testcases_3":"[{'input': '6\\r\\nkrdych\\r\\n', 'output': ['hcyrkd']}, {'input': '100\\r\\nedykhvzcntljuuoqghptioetqnfllwekzohiuaxelgecabvsbibgqodqxvyfkbyjwtgbyhvssntinkwsinwsmalusiwnjmtcoovf\\r\\n', 'output': ['fvooctmjnwisulamswniswknitnssvhybgtwjybkfyvxqdoqgbqteoitnczvkyedhljuuoqghptnfllwekzohiuaxelgecabvsbi']}, {'input': '10\\r\\nrocesfedoc\\r\\n', 'output': ['codeforces']}, {'input': '4\\r\\njfyy\\r\\n', 'output': ['yyjf']}, {'input': '3\\r\\nilj\\r\\n', 'output': ['jli']}]","human_sample_testcases_4":"[{'input': '100\\r\\ndjjjjjjjjjjgjjjjjjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjjjjajjjjjjajjjjjjrjjjjjjjjjjjjrjjtjjjjjjjjjjjjjojjj\\r\\n', 'output': ['jjjojjjjjjjjjjjjjtjjrjjjjjjjjjjjjrjjjjjjajjjjjjajjjjjjjjjjjjjjdjjjgjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjj']}, {'input': '99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n', 'output': ['qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq']}, {'input': '60\\r\\nfnebsopcvmlaoecpzmakqigyuutueuozjxutlwwiochekmhjgwxsgfbcrpqj\\r\\n', 'output': ['jqprcbfgsxwgjhmkehcoiwwltuxjzokamzpalobnfespcvmoecqigyuutueu']}, {'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '89\\r\\nwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww\\r\\n', 'output': ['wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww']}]","human_sample_testcases_5":"[{'input': '60\\r\\nfnebsopcvmlaoecpzmakqigyuutueuozjxutlwwiochekmhjgwxsgfbcrpqj\\r\\n', 'output': ['jqprcbfgsxwgjhmkehcoiwwltuxjzokamzpalobnfespcvmoecqigyuutueu']}, {'input': '99\\r\\nqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\\r\\n', 'output': ['qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq']}, {'input': '16\\r\\nplmaetwoxesisiht\\r\\n', 'output': ['thisisexampletwo']}, {'input': '97\\r\\nfwffffffffffffffffffffffffrffffffffffffffzfffffffffffffffftfcfffffffqffffffffffffffffffffffyfffff\\r\\n', 'output': ['fffffyffffffffffffffffffffffqfffffffcftffffffffffffffffzffffffffffffffrffffffffffffffffffffffffwf']}, {'input': '100\\r\\ndjjjjjjjjjjgjjjjjjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjjjjajjjjjjajjjjjjrjjjjjjjjjjjjrjjtjjjjjjjjjjjjjojjj\\r\\n', 'output': ['jjjojjjjjjjjjjjjjtjjrjjjjjjjjjjjjrjjjjjjajjjjjjajjjjjjjjjjjjjjdjjjgjjjjjjjjjsvjjjjjjjjjjmjjjjjjjjjjj']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":306,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 3\", \"6 5\", \"1000000000 1\"]","input_specification":"The only line contains two integers $$$n$$$ and $$$m$$$ ($$$1 \\le n \\le 10^9$$$, $$$1 \\le m \\le 1000$$$)\u00a0\u2014 the size of the field and the number of parts to split the sets into.","src_uid":"2ec9e7cddc634d7830575e14363a4657","source_code":"n, m = [int(i) for i in input().split()]\nans = 0\nar = [n \/\/ m] * m\nfor i in range(1, n % m + 1, 1):\n ar[i] += 1\nfor i in range(m):\n for j in range(m):\n if ((i * i + j * j) % m == 0):\n ans += ar[i] * ar[j]\nprint(ans)","sample_outputs":"[\"1\", \"13\", \"1000000000000000000\"]","lang_cluster":"Python","notes":"NoteIn the first example, only the set for cell $$$(3, 3)$$$ can be split equally ($$$3^2 + 3^2 = 18$$$, which is divisible by $$$m=3$$$).In the second example, the sets for the following cells can be divided equally: $$$(1, 2)$$$ and $$$(2, 1)$$$, since $$$1^2 + 2^2 = 5$$$, which is divisible by $$$5$$$; $$$(1, 3)$$$ and $$$(3, 1)$$$; $$$(2, 4)$$$ and $$$(4, 2)$$$; $$$(2, 6)$$$ and $$$(6, 2)$$$; $$$(3, 4)$$$ and $$$(4, 3)$$$; $$$(3, 6)$$$ and $$$(6, 3)$$$; $$$(5, 5)$$$. In the third example, sets in all cells can be divided equally, since $$$m = 1$$$.","output_specification":"Print a single integer\u00a0\u2014 the number of sets that can be split equally.","description":"Arkady and his friends love playing checkers on an $$$n \\times n$$$ field. The rows and the columns of the field are enumerated from $$$1$$$ to $$$n$$$.The friends have recently won a championship, so Arkady wants to please them with some candies. Remembering an old parable (but not its moral), Arkady wants to give to his friends one set of candies per each cell of the field: the set of candies for cell $$$(i, j)$$$ will have exactly $$$(i^2 + j^2)$$$ candies of unique type.There are $$$m$$$ friends who deserve the present. How many of these $$$n \\times n$$$ sets of candies can be split equally into $$$m$$$ parts without cutting a candy into pieces? Note that each set has to be split independently since the types of candies in different sets are different.","human_testcases":"[{\"input\": \"3 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 5\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000 81\\r\\n\", \"output\": [\"12345678987654321\"]}, {\"input\": \"10000 1\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"10000 2\\r\\n\", \"output\": [\"50000000\"]}, {\"input\": \"10000 3\\r\\n\", \"output\": [\"11108889\"]}, {\"input\": \"15 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 200\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000 1000\\r\\n\", \"output\": [\"3400000000000000\"]}, {\"input\": \"999999998 229\\r\\n\", \"output\": [\"8714555372170630\"]}, {\"input\": \"999999999 228\\r\\n\", \"output\": [\"76946738381041\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000 5\\r\\n\", \"output\": [\"36000000\"]}, {\"input\": \"1 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"260\"]}, {\"input\": \"360 900\\r\\n\", \"output\": [\"374\"]}, {\"input\": \"1000 999\\r\\n\", \"output\": [\"657\"]}, {\"input\": \"12345 1\\r\\n\", \"output\": [\"152399025\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '15 1000\\r\\n', 'output': ['0']}, {'input': '1000000000 81\\r\\n', 'output': ['12345678987654321']}, {'input': '10 200\\r\\n', 'output': ['1']}, {'input': '100 100\\r\\n', 'output': ['260']}, {'input': '3 3\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '100 100\\r\\n', 'output': ['260']}, {'input': '10000 2\\r\\n', 'output': ['50000000']}, {'input': '15 1000\\r\\n', 'output': ['0']}, {'input': '12345 1\\r\\n', 'output': ['152399025']}, {'input': '1 10\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '1 2\\r\\n', 'output': ['1']}, {'input': '360 900\\r\\n', 'output': ['374']}, {'input': '15 1000\\r\\n', 'output': ['0']}, {'input': '10000 3\\r\\n', 'output': ['11108889']}, {'input': '3 3\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '1 2\\r\\n', 'output': ['1']}, {'input': '3 3\\r\\n', 'output': ['1']}, {'input': '6 5\\r\\n', 'output': ['13']}, {'input': '10000 5\\r\\n', 'output': ['36000000']}, {'input': '1 1\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '999999999 228\\r\\n', 'output': ['76946738381041']}, {'input': '10000 1\\r\\n', 'output': ['100000000']}, {'input': '10 200\\r\\n', 'output': ['1']}, {'input': '10000 2\\r\\n', 'output': ['50000000']}, {'input': '360 900\\r\\n', 'output': ['374']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":307,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"Is it a melon?\", \"Is it an apple?\", \"Is it a banana ?\", \"Is it an apple and a banana simultaneouSLY?\"]","input_specification":"The single line contains a question represented by a non-empty line consisting of large and small Latin letters, spaces and a question mark. The line length does not exceed 100. It is guaranteed that the question mark occurs exactly once in the line \u2014 as the last symbol and that the line contains at least one letter.","src_uid":"dea7eb04e086a4c1b3924eff255b9648","source_code":"s = input()\nvowels = 'aeiouyAEIOUY'\nif s.split()[-1] == '?':\n if s.split()[-2][-1] in vowels:\n print('YES')\n else:\n print('NO')\nelse:\n if s.split()[-1][:-1][-1] in vowels:\n print('YES')\n else:\n print('NO')","sample_outputs":"[\"NO\", \"YES\", \"YES\", \"YES\"]","lang_cluster":"Python","notes":null,"output_specification":"Print answer for the question in a single line: YES if the answer is \"Yes\", NO if the answer is \"No\". Remember that in the reply to the question the last letter, not the last character counts. I. e. the spaces and the question mark do not count as letters.","description":"Vasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first time, that is Vasya is the sleuth, he should investigate a \"crime\" and find out what is happening. He can ask any questions whatsoever that can be answered with \"Yes\" or \"No\". All the rest agree beforehand to answer the questions like that: if the question\u2019s last letter is a vowel, they answer \"Yes\" and if the last letter is a consonant, they answer \"No\". Of course, the sleuth knows nothing about it and his task is to understand that.Unfortunately, Vasya is not very smart. After 5 hours of endless stupid questions everybody except Vasya got bored. That\u2019s why Vasya\u2019s friends ask you to write a program that would give answers instead of them.The English alphabet vowels are: A, E, I, O, U, YThe English alphabet consonants are: B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Z","human_testcases":"[{\"input\": \"Is it a melon?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"Is it an apple?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \" Is it a banana ?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"Is it an apple and a banana simultaneouSLY?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"oHtSbDwzHb?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"sZecYdUvZHrXx?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"uMtXK?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"U?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"aqFDkCUKeHMyvZFcAyWlMUSQTFomtaWjoKLVyxLCw vcufPBFbaljOuHWiDCROYTcmbgzbaqHXKPOYEbuEtRqqoxBbOETCsQzhw?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"dJcNqQiFXzcbsj fItCpBLyXOnrSBPebwyFHlxUJHqCUzzCmcAvMiKL NunwOXnKeIxUZmBVwiCUfPkjRAkTPbkYCmwRRnDSLaz?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"gxzXbdcAQMuFKuuiPohtMgeypr wpDIoDSyOYTdvylcg SoEBZjnMHHYZGEqKgCgBeTbyTwyGuPZxkxsnSczotBdYyfcQsOVDVC?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"FQXBisXaJFMiHFQlXjixBDMaQuIbyqSBKGsBfTmBKCjszlGVZxEOqYYqRTUkGpSDDAoOXyXcQbHcPaegeOUBNeSD JiKOdECPOF?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"YhCuZnrWUBEed?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"hh?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"whU?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"fgwg?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"GlEmEPKrYcOnBNJUIFjszWUyVdvWw DGDjoCMtRJUburkPToCyDrOtMr?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"n?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"BueDOlxgzeNlxrzRrMbKiQdmGujEKmGxclvaPpTuHmTqBp?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"iehvZNQXDGCuVmJPOEysLyUryTdfaIxIuTzTadDbqRQGoCLXkxnyfWSGoLXebNnQQNTqAQJebbyYvHOfpUnXeWdjx?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" J ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" j ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" o ?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \" T ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" q ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" j ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" c ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \" B ?\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"LuhxDHVwMPTtUIUMIQTuQETgXCOQPsfdFlyHvpfOVedjUTpGLAZGOHloIjJJtOLAlHPivzA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"wmztmzFfwbGyOmNHENUFMTsFEMWYA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"wGsfZCSwN PEUhNUrLfABrxA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"mCDHENXjYbgMdBimAdPnewaHfpGWowjWrVAdvWczjw iDcUbyzMsmsnwbviiKiAyGVA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ARIWnwqFqxsQXsXXzHqvFjxOCttAGPUzDtWzsenPYdNXuFOIUGYZsLLK IaoxiyjBBRThoelwdPTkuCQfcBLUEJpCPIrVZlvUWA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \" PslvVpgpN BXkMFBEVXsyZFIQbBEFxGkYTeXKrOdcmhbiTUatYRUoYAayrchqbksswIlfIjerZPqptvCGnMUhyrQSvwltRhFzA?\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"HpBkttwSjBXDmyleGiRWNUMPaAIE uzTrp KJDzaUiCdsMYOoWKHoUhWUoecCPmACymMUUbGav UMRpCytPETwNFAObZJA?\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': ' q ?\\r\\n', 'output': ['NO']}, {'input': 'wmztmzFfwbGyOmNHENUFMTsFEMWYA?\\r\\n', 'output': ['YES']}, {'input': ' j ?\\r\\n', 'output': ['NO']}, {'input': 'YhCuZnrWUBEed?\\r\\n', 'output': ['NO']}, {'input': 'Is it an apple and a banana simultaneouSLY?\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': 'iehvZNQXDGCuVmJPOEysLyUryTdfaIxIuTzTadDbqRQGoCLXkxnyfWSGoLXebNnQQNTqAQJebbyYvHOfpUnXeWdjx?\\r\\n', 'output': ['NO']}, {'input': 'n?\\r\\n', 'output': ['NO']}, {'input': ' T ?\\r\\n', 'output': ['NO']}, {'input': 'gxzXbdcAQMuFKuuiPohtMgeypr wpDIoDSyOYTdvylcg SoEBZjnMHHYZGEqKgCgBeTbyTwyGuPZxkxsnSczotBdYyfcQsOVDVC?\\r\\n', 'output': ['NO']}, {'input': 'sZecYdUvZHrXx?\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': 'iehvZNQXDGCuVmJPOEysLyUryTdfaIxIuTzTadDbqRQGoCLXkxnyfWSGoLXebNnQQNTqAQJebbyYvHOfpUnXeWdjx?\\r\\n', 'output': ['NO']}, {'input': 'mCDHENXjYbgMdBimAdPnewaHfpGWowjWrVAdvWczjw iDcUbyzMsmsnwbviiKiAyGVA?\\r\\n', 'output': ['YES']}, {'input': 'GlEmEPKrYcOnBNJUIFjszWUyVdvWw DGDjoCMtRJUburkPToCyDrOtMr?\\r\\n', 'output': ['NO']}, {'input': 'Is it an apple?\\r\\n', 'output': ['YES']}, {'input': 'HpBkttwSjBXDmyleGiRWNUMPaAIE uzTrp KJDzaUiCdsMYOoWKHoUhWUoecCPmACymMUUbGav UMRpCytPETwNFAObZJA?\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': 'wGsfZCSwN PEUhNUrLfABrxA?\\r\\n', 'output': ['YES']}, {'input': 'fgwg?\\r\\n', 'output': ['NO']}, {'input': 'n?\\r\\n', 'output': ['NO']}, {'input': ' T ?\\r\\n', 'output': ['NO']}, {'input': 'U?\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': 'BueDOlxgzeNlxrzRrMbKiQdmGujEKmGxclvaPpTuHmTqBp?\\r\\n', 'output': ['NO']}, {'input': ' j ?\\r\\n', 'output': ['NO']}, {'input': 'FQXBisXaJFMiHFQlXjixBDMaQuIbyqSBKGsBfTmBKCjszlGVZxEOqYYqRTUkGpSDDAoOXyXcQbHcPaegeOUBNeSD JiKOdECPOF?\\r\\n', 'output': ['NO']}, {'input': 'wmztmzFfwbGyOmNHENUFMTsFEMWYA?\\r\\n', 'output': ['YES']}, {'input': ' PslvVpgpN BXkMFBEVXsyZFIQbBEFxGkYTeXKrOdcmhbiTUatYRUoYAayrchqbksswIlfIjerZPqptvCGnMUhyrQSvwltRhFzA?\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":88.89,"human_sample_line_coverage_2":77.78,"human_sample_line_coverage_3":66.67,"human_sample_line_coverage_4":88.89,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":66.67,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":83.33,"id":308,"human_sample_pass_rate":100.0,"human_sample_line_coverage":82.224,"human_sample_branch_coverage":73.332} {"sample_inputs":"[\"4\", \"6\"]","input_specification":"The first line of the input contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091000).","src_uid":"62db589bad3b7023418107de05b7a8ee","source_code":"P = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]\ndef power(a, b):\n\tres = 1\n\twhile (b):\n\t\tif (b & 1): res *= a\n\t\ta *= a\n\t\tb >>= 1\n\treturn res\nans = []\nans.append(1e30)\ndef solve(pos, n, res):\n\tif (n == 1):\n\t\tans[0] = min(ans[0], res)\n\tfor i in range(2, 62):\n\t\tif (n % i == 0):\n\t\t\tsolve(pos + 1, n \/ i, res * power(P[pos], i - 1))\nn = int(input())\nsolve(0, n, 1)\nprint(ans[0])","sample_outputs":"[\"6\", \"12\"]","lang_cluster":"Python","notes":null,"output_specification":"Output the smallest positive integer with exactly n divisors.","description":"Given the number n, find the smallest positive integer which has exactly n divisors. It is guaranteed that for the given n the answer will not exceed 1018.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"144\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"240\"]}, {\"input\": \"47\\r\\n\", \"output\": [\"70368744177664\"]}, {\"input\": \"59\\r\\n\", \"output\": [\"288230376151711744\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"45360\"]}, {\"input\": \"159\\r\\n\", \"output\": [\"40532396646334464\"]}, {\"input\": \"265\\r\\n\", \"output\": [\"364791569817010176\"]}, {\"input\": \"312\\r\\n\", \"output\": [\"14192640\"]}, {\"input\": \"473\\r\\n\", \"output\": [\"259700248434180096\"]}, {\"input\": \"637\\r\\n\", \"output\": [\"46656000000\"]}, {\"input\": \"500\\r\\n\", \"output\": [\"62370000\"]}, {\"input\": \"720\\r\\n\", \"output\": [\"61261200\"]}, {\"input\": \"902\\r\\n\", \"output\": [\"324625310542725120\"]}, {\"input\": \"940\\r\\n\", \"output\": [\"199495389743677440\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"810810000\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"757632231014400\"]}, {\"input\": \"118\\r\\n\", \"output\": [\"864691128455135232\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '902\\r\\n', 'output': ['324625310542725120']}, {'input': '20\\r\\n', 'output': ['240']}, {'input': '7\\r\\n', 'output': ['64']}, {'input': '118\\r\\n', 'output': ['864691128455135232']}, {'input': '265\\r\\n', 'output': ['364791569817010176']}]","human_sample_testcases_2":"[{'input': '159\\r\\n', 'output': ['40532396646334464']}, {'input': '10\\r\\n', 'output': ['48']}, {'input': '265\\r\\n', 'output': ['364791569817010176']}, {'input': '720\\r\\n', 'output': ['61261200']}, {'input': '902\\r\\n', 'output': ['324625310542725120']}]","human_sample_testcases_3":"[{'input': '8\\r\\n', 'output': ['24']}, {'input': '7\\r\\n', 'output': ['64']}, {'input': '100\\r\\n', 'output': ['45360']}, {'input': '312\\r\\n', 'output': ['14192640']}, {'input': '720\\r\\n', 'output': ['61261200']}]","human_sample_testcases_4":"[{'input': '1000\\r\\n', 'output': ['810810000']}, {'input': '15\\r\\n', 'output': ['144']}, {'input': '10\\r\\n', 'output': ['48']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '9\\r\\n', 'output': ['36']}]","human_sample_testcases_5":"[{'input': '265\\r\\n', 'output': ['364791569817010176']}, {'input': '637\\r\\n', 'output': ['46656000000']}, {'input': '15\\r\\n', 'output': ['144']}, {'input': '10\\r\\n', 'output': ['48']}, {'input': '47\\r\\n', 'output': ['70368744177664']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":309,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\".......A\\n........\\n........\\n........\\n........\\n........\\n........\\nM.......\", \".......A\\n........\\n........\\n........\\n........\\n........\\nSS......\\nM.......\", \".......A\\n........\\n........\\n........\\n........\\n.S......\\nS.......\\nMS......\"]","input_specification":"You are given the 8 strings whose length equals 8, describing the initial position on the board. The first line represents the top row of the board, the next one \u2014 for the second from the top, and so on, the last line represents the bottom row. Each character string matches a single cell board in the appropriate row, and the characters are in the same manner as that of the corresponding cell. If the cell is empty, the corresponding character is \".\". If a cell has Maria, then it is represented by character \"M\". If a cell has Anna, it is represented by the character \"A\". If a cell has a statue, then the cell is represented by character \"S\". It is guaranteed that the last character of the first row is always \"A\", the first character of the last line is always \"M\". The remaining characters are \".\" or \"S\".","src_uid":"f47e4ab041288ba9567c19930eb9a090","source_code":"r, s = [63], ''.join(input() + 'T' for i in range(8)) + 'T' * 9\nfor i in range(0, 72, 9):\n t = set()\n for x in r:\n for y in (x, x - 1, x + 1, x - 9, x + 9, x - 10, x - 8, x + 10, x + 8):\n if s[y] == 'T': continue\n if (y < i or s[y - i] != 'S') and (y < i + 9 or s[y - i - 9] != 'S'): t.add(y)\n r = t\nprint('WIN' if r else 'LOSE')\n","sample_outputs":"[\"WIN\", \"LOSE\", \"LOSE\"]","lang_cluster":"Python","notes":null,"output_specification":"If Maria wins, print string \"WIN\". If the statues win, print string \"LOSE\".","description":"In this task Anna and Maria play a game with a very unpleasant rival. Anna and Maria are in the opposite squares of a chessboard (8\u2009\u00d7\u20098): Anna is in the upper right corner, and Maria is in the lower left one. Apart from them, the board has several statues. Each statue occupies exactly one square. A square that contains a statue cannot have anything or anyone \u2014 neither any other statues, nor Anna, nor Maria.Anna is present on the board as a figurant (she stands still and never moves), and Maria has been actively involved in the game. Her goal is \u2014 to come to Anna's square. Maria and statues move in turn, Maria moves first. During one move Maria can go to any adjacent on the side or diagonal cell in which there is no statue, or she can stay in the cell where she is. The statues during their move must go one square down simultaneously, and those statues that were in the bottom row fall from the board and are no longer appeared.At that moment, when one of the statues is in the cell in which the Maria is, the statues are declared winners. At the moment when Maria comes into the cell where Anna has been waiting, Maria is declared the winner.Obviously, nothing depends on the statues, so it all depends on Maria. Determine who will win, if Maria does not make a strategic error.","human_testcases":"[{\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nSS......\\r\\nM.......\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.S......\\r\\nS.......\\r\\nMS......\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.SSSSSSS\\r\\nS.......\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\nS.......\\r\\n.SSSSSSS\\r\\nS.......\\r\\nM.......\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".SSSSSSA\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\nMSSSSSSS\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".......A\\r\\n..SSSSSS\\r\\n........\\r\\n........\\r\\nSSS.....\\r\\n........\\r\\n........\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n.S......\\r\\nS.......\\r\\n.S......\\r\\nM.......\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nS.......\\r\\n.S......\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\n......SS\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\nM......S\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\nS.S.S.S.\\r\\n........\\r\\n.S.S.S.S\\r\\n........\\r\\nS.S.S.S.\\r\\n........\\r\\nMS.S.S.S\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\n......S.\\r\\n......S.\\r\\n.....SS.\\r\\n....SS..\\r\\n...SS...\\r\\n..SS....\\r\\nMSS.....\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".S.....A\\r\\n..SS....\\r\\n.S......\\r\\nSS......\\r\\n..S.....\\r\\nS.......\\r\\n.S......\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"S..SSSSA\\r\\n...S.S.S\\r\\n.SS.SS.S\\r\\nSS....SS\\r\\n.S.SSSS.\\r\\n...S.S.S\\r\\n..S..S..\\r\\nMSSSSS.S\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\nSS.SSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nS..SS.SS\\r\\nSSSS.SSS\\r\\nSSSS.SSS\\r\\nM.SSS.SS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n....S...\\r\\n...S....\\r\\n........\\r\\nS..S..SS\\r\\n.S....S.\\r\\nS....S..\\r\\nM....S.S\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"S..SSSSA\\r\\n.S..S...\\r\\nS.S....S\\r\\nSS..S.S.\\r\\nSSSS.S..\\r\\n.SS..SS.\\r\\n....SS..\\r\\nMS..S...\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"...S.SSA\\r\\n.....S..\\r\\nSSS....S\\r\\n...S...S\\r\\n....SSSS\\r\\n.S.S...S\\r\\n..S....S\\r\\nM..SSSSS\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"S..SS.SA\\r\\n.SSS.S.S\\r\\nSS.SSS.S\\r\\nSSS.S.S.\\r\\nSS.SSSSS\\r\\nSSSSSSSS\\r\\nSSSS.SS.\\r\\nM.SSS.S.\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"...SSS.A\\r\\n.....S..\\r\\n..S.S.SS\\r\\n.S.S...S\\r\\nS.S...S.\\r\\n....S...\\r\\n........\\r\\nM..S.SSS\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".S.S..SA\\r\\n.S...S.S\\r\\nS....S..\\r\\n...S....\\r\\n.S.SSSSS\\r\\nS.....SS\\r\\n.S.S.SSS\\r\\nM....S.S\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n....S...\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.S......\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSS.SSA\\r\\nSSS.SSSS\\r\\nSSSSSS.S\\r\\nSS.SSS.S\\r\\nSS.S.SS.\\r\\nSSSS.SS.\\r\\nSSSS.SSS\\r\\nMSS.SSS.\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSSS.SSA\\r\\nSSSSS.SS\\r\\nSSSS.SSS\\r\\nSSSSSSSS\\r\\nSS.SSSSS\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nMSSS..SS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"S.S.S..A\\r\\n...SSS.S\\r\\n.SSSSSS.\\r\\nSS.S..SS\\r\\nSSSS.SSS\\r\\n.S.SSS..\\r\\nSS.SSSSS\\r\\nMSSSS.S.\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSSSSSSA\\r\\nSS.SSS.S\\r\\nSSSSSS.S\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSS.\\r\\nSSSSSSSS\\r\\nM.SSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"...S...A\\r\\n........\\r\\n..S..S.S\\r\\n.S....S.\\r\\nS.......\\r\\n..S.S..S\\r\\n......S.\\r\\nM..SS..S\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\nSSSSSSSS\\r\\n.SSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSS.SS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSSSSSSA\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSS.SS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"S.S..SSA\\r\\n...S.S..\\r\\n.SS.SSS.\\r\\n......S.\\r\\n.S...S..\\r\\n..S.S..S\\r\\n..SS..S.\\r\\nM.SS..SS\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \"SSSSSSSA\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".....S.A\\r\\n...S.S..\\r\\n.....S..\\r\\n........\\r\\n........\\r\\n........\\r\\n......S.\\r\\nM....S..\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".S.S.S.A\\r\\n.SS.S..S\\r\\n..S....S\\r\\n..S.....\\r\\nSSS.S...\\r\\n.S....S.\\r\\nSSSSSS..\\r\\nM..S....\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSSSS..A\\r\\nS.SS.SS.\\r\\n.S.SSS.S\\r\\n..SSSSS.\\r\\n.S..S.S.\\r\\n.SS.S..S\\r\\nSSS.S...\\r\\nM..S..S.\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".......A\\r\\n........\\r\\n........\\r\\n........\\r\\n..S....S\\r\\n........\\r\\n........\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".......A\\r\\n...S...S\\r\\n...S....\\r\\n....S..S\\r\\n........\\r\\nS.S...S.\\r\\nSS......\\r\\nMS......\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"S......A\\r\\n.SS..S..\\r\\nS....S..\\r\\nSSS...S.\\r\\n.SS.SSS.\\r\\n.S.SS...\\r\\n..S..S..\\r\\nM.SS....\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \".SSSS.SA\\r\\n.SS.SSS.\\r\\n..S.SS..\\r\\nSSSS.SS.\\r\\nS.S.....\\r\\nS.S.SSSS\\r\\nS..SS..S\\r\\nMS.SS.SS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSS..SSA\\r\\nSSSSSSSS\\r\\n..SS..SS\\r\\n.S.S.SSS\\r\\n.SSS.SSS\\r\\nSSSS.S.S\\r\\n...SS..S\\r\\nMS..S.SS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"S..SSS.A\\r\\nS.S.SSSS\\r\\nSSSSSSSS\\r\\n...SS...\\r\\nS.SSSSSS\\r\\nSS..SS.S\\r\\nSS..S.S.\\r\\nMSS..SSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"S.SS.SSA\\r\\n.S..SSS.\\r\\nSSS.SSS.\\r\\nSSSS.SSS\\r\\nS.SSSSSS\\r\\nSSSSSSSS\\r\\nSSSSS.SS\\r\\nMS.SSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSS.SSSA\\r\\nSSS....S\\r\\nSS...SSS\\r\\n..SSS..S\\r\\nS..SS...\\r\\nSS.SS...\\r\\n.S..SSSS\\r\\nM.SSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSS.SSSA\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSS.SSS.S\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n\", \"output\": [\"LOSE\"]}, {\"input\": \"SSSSSSSA\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nM.......\\r\\n\", \"output\": [\"WIN\"]}, {\"input\": \".......A\\r\\n........\\r\\nSSS.....\\r\\n........\\r\\n........\\r\\n.S......\\r\\n.S......\\r\\nMS......\\r\\n\", \"output\": [\"WIN\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'SSSSSSSA\\r\\nSS.SSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nS..SS.SS\\r\\nSSSS.SSS\\r\\nSSSS.SSS\\r\\nM.SSS.SS\\r\\n', 'output': ['LOSE']}, {'input': 'SSSSSSSA\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSS.SS\\r\\n', 'output': ['LOSE']}, {'input': '.......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.SSSSSSS\\r\\nS.......\\r\\nM.......\\r\\n', 'output': ['WIN']}, {'input': 'SSS..SSA\\r\\nSSSSSSSS\\r\\n..SS..SS\\r\\n.S.S.SSS\\r\\n.SSS.SSS\\r\\nSSSS.S.S\\r\\n...SS..S\\r\\nMS..S.SS\\r\\n', 'output': ['LOSE']}, {'input': 'S.SS.SSA\\r\\n.S..SSS.\\r\\nSSS.SSS.\\r\\nSSSS.SSS\\r\\nS.SSSSSS\\r\\nSSSSSSSS\\r\\nSSSSS.SS\\r\\nMS.SSSSS\\r\\n', 'output': ['LOSE']}]","human_sample_testcases_2":"[{'input': '.......A\\r\\n........\\r\\n........\\r\\n........\\r\\nS.......\\r\\n.SSSSSSS\\r\\nS.......\\r\\nM.......\\r\\n', 'output': ['LOSE']}, {'input': '.S.S.S.A\\r\\n.SS.S..S\\r\\n..S....S\\r\\n..S.....\\r\\nSSS.S...\\r\\n.S....S.\\r\\nSSSSSS..\\r\\nM..S....\\r\\n', 'output': ['LOSE']}, {'input': 'SSSSSSSA\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n', 'output': ['LOSE']}, {'input': 'SSSSSSSA\\r\\n......SS\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\n.......S\\r\\nM......S\\r\\n', 'output': ['LOSE']}, {'input': '.......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\nM.......\\r\\n', 'output': ['WIN']}]","human_sample_testcases_3":"[{'input': '.......A\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.SSSSSSS\\r\\nS.......\\r\\nM.......\\r\\n', 'output': ['WIN']}, {'input': '...S...A\\r\\n........\\r\\n..S..S.S\\r\\n.S....S.\\r\\nS.......\\r\\n..S.S..S\\r\\n......S.\\r\\nM..SS..S\\r\\n', 'output': ['WIN']}, {'input': '.......A\\r\\nS.S.S.S.\\r\\n........\\r\\n.S.S.S.S\\r\\n........\\r\\nS.S.S.S.\\r\\n........\\r\\nMS.S.S.S\\r\\n', 'output': ['WIN']}, {'input': 'SSSSSSSA\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSS.SSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSS.SS\\r\\n', 'output': ['LOSE']}, {'input': '.SSSSSSA\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\n.SSSSSSS\\r\\nMSSSSSSS\\r\\n', 'output': ['WIN']}]","human_sample_testcases_4":"[{'input': '.....S.A\\r\\n...S.S..\\r\\n.....S..\\r\\n........\\r\\n........\\r\\n........\\r\\n......S.\\r\\nM....S..\\r\\n', 'output': ['WIN']}, {'input': '.S.S..SA\\r\\n.S...S.S\\r\\nS....S..\\r\\n...S....\\r\\n.S.SSSSS\\r\\nS.....SS\\r\\n.S.S.SSS\\r\\nM....S.S\\r\\n', 'output': ['LOSE']}, {'input': '.......A\\r\\n...S...S\\r\\n...S....\\r\\n....S..S\\r\\n........\\r\\nS.S...S.\\r\\nSS......\\r\\nMS......\\r\\n', 'output': ['LOSE']}, {'input': 'S.S.S..A\\r\\n...SSS.S\\r\\n.SSSSSS.\\r\\nSS.S..SS\\r\\nSSSS.SSS\\r\\n.S.SSS..\\r\\nSS.SSSSS\\r\\nMSSSS.S.\\r\\n', 'output': ['LOSE']}, {'input': 'SSSSSSSA\\r\\n......S.\\r\\n......S.\\r\\n.....SS.\\r\\n....SS..\\r\\n...SS...\\r\\n..SS....\\r\\nMSS.....\\r\\n', 'output': ['LOSE']}]","human_sample_testcases_5":"[{'input': '.......A\\r\\n....S...\\r\\n........\\r\\n........\\r\\n........\\r\\n........\\r\\n.S......\\r\\nM.......\\r\\n', 'output': ['WIN']}, {'input': '.......A\\r\\nS.S.S.S.\\r\\n........\\r\\n.S.S.S.S\\r\\n........\\r\\nS.S.S.S.\\r\\n........\\r\\nMS.S.S.S\\r\\n', 'output': ['WIN']}, {'input': '.S.S.S.A\\r\\n.SS.S..S\\r\\n..S....S\\r\\n..S.....\\r\\nSSS.S...\\r\\n.S....S.\\r\\nSSSSSS..\\r\\nM..S....\\r\\n', 'output': ['LOSE']}, {'input': 'SSSSSSSA\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nSSSSSSSS\\r\\nMSSSSSSS\\r\\n', 'output': ['LOSE']}, {'input': '.......A\\r\\n........\\r\\n........\\r\\n........\\r\\n.S......\\r\\nS.......\\r\\n.S......\\r\\nM.......\\r\\n', 'output': ['LOSE']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":310,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 2 1 1\", \"1 2 1 2\"]","input_specification":"The only line contains four integers $$$n$$$, $$$m$$$, $$$L$$$ and $$$R$$$ ($$$1\\le n,m,L,R \\le 10^9$$$, $$$L \\le R$$$, $$$n \\cdot m \\ge 2$$$).","src_uid":"ded299fa1cd010822c60f2389a3ba1a3","source_code":"n, m, L, R = map(int, input().split())\nmod = 998244353\nif n*m % 2:\n print(pow(R-L+1, n*m, mod))\nelse:\n print((pow(R-L+1, n*m, mod) + 1 - (R-L) % 2) * pow(2, mod-2, mod) % mod)","sample_outputs":"[\"1\", \"2\"]","lang_cluster":"Python","notes":"NoteIn the first sample, the only initial grid that satisfies the requirements is $$$a_{1,1}=a_{2,1}=a_{1,2}=a_{2,2}=1$$$. Thus the answer should be $$$1$$$.In the second sample, initial grids that satisfy the requirements are $$$a_{1,1}=a_{1,2}=1$$$ and $$$a_{1,1}=a_{1,2}=2$$$. Thus the answer should be $$$2$$$.","output_specification":"Output one integer, representing the desired answer modulo $$$998,244,353$$$.","description":"Alice has got addicted to a game called Sirtet recently.In Sirtet, player is given an $$$n \\times m$$$ grid. Initially $$$a_{i,j}$$$ cubes are stacked up in the cell $$$(i,j)$$$. Two cells are called adjacent if they share a side. Player can perform the following operations: stack up one cube in two adjacent cells; stack up two cubes in one cell. Cubes mentioned above are identical in height.Here is an illustration of the game. States on the right are obtained by performing one of the above operations on the state on the left, and grey cubes are added due to the operation. Player's goal is to make the height of all cells the same (i.e. so that each cell has the same number of cubes in it) using above operations. Alice, however, has found out that on some starting grids she may never reach the goal no matter what strategy she uses. Thus, she is wondering the number of initial grids such that $$$L \\le a_{i,j} \\le R$$$ for all $$$1 \\le i \\le n$$$, $$$1 \\le j \\le m$$$; player can reach the goal using above operations. Please help Alice with it. Notice that the answer might be large, please output the desired value modulo $$$998,244,353$$$.","human_testcases":"[{\"input\": \"2 2 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"485 117 386829368 748204956\\r\\n\", \"output\": [\"735420370\"]}, {\"input\": \"564 558 305171115 960941497\\r\\n\", \"output\": [\"880111542\"]}, {\"input\": \"692 210 44175861 843331069\\r\\n\", \"output\": [\"714028205\"]}, {\"input\": \"741 806 424647372 965259389\\r\\n\", \"output\": [\"861647194\"]}, {\"input\": \"461 650 18427925 104278996\\r\\n\", \"output\": [\"936348652\"]}, {\"input\": \"589 790 462465375 766499149\\r\\n\", \"output\": [\"374887989\"]}, {\"input\": \"13 635 761278633 941090619\\r\\n\", \"output\": [\"893955177\"]}, {\"input\": \"140 713 711390561 727285861\\r\\n\", \"output\": [\"641355762\"]}, {\"input\": \"494587372 852064625 134519483 167992226\\r\\n\", \"output\": [\"552905694\"]}, {\"input\": \"672670796 425613469 728300037 940234946\\r\\n\", \"output\": [\"779704132\"]}, {\"input\": \"850754220 853938121 172337487 490664825\\r\\n\", \"output\": [\"237240423\"]}, {\"input\": \"28837644 722454262 471150744 905552093\\r\\n\", \"output\": [\"740846915\"]}, {\"input\": \"911953772 296003106 210155490 889555498\\r\\n\", \"output\": [\"225799480\"]}, {\"input\": \"795069900 869551950 803936044 964554424\\r\\n\", \"output\": [\"884379548\"]}, {\"input\": \"268120620 443100795 102749301 604856694\\r\\n\", \"output\": [\"834319192\"]}, {\"input\": \"151236748 16649639 841754047 855153000\\r\\n\", \"output\": [\"108988868\"]}, {\"input\": \"329320172 739941588 435534601 986184053\\r\\n\", \"output\": [\"425887732\"]}, {\"input\": \"1000000000 1 1000000000 1000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000 1 1000000000\\r\\n\", \"output\": [\"285141888\"]}, {\"input\": \"407070359 971940670 264302148 270591105\\r\\n\", \"output\": [\"992759231\"]}, {\"input\": \"290186487 840456810 858082702 987072033\\r\\n\", \"output\": [\"366829057\"]}, {\"input\": \"763237207 414005655 302120151 421405724\\r\\n\", \"output\": [\"193545831\"]}, {\"input\": \"646353335 282521795 600933409 772270276\\r\\n\", \"output\": [\"13680108\"]}, {\"input\": \"824436759 415879151 194713963 293553316\\r\\n\", \"output\": [\"453443939\"]}, {\"input\": \"707552887 989427996 933718708 955125306\\r\\n\", \"output\": [\"355610620\"]}, {\"input\": \"885636311 857944136 232531966 493119835\\r\\n\", \"output\": [\"779245677\"]}, {\"input\": \"63719735 431492981 971536712 994663491\\r\\n\", \"output\": [\"97582142\"]}, {\"input\": \"946835863 300009121 565317265 947272048\\r\\n\", \"output\": [\"337235143\"]}, {\"input\": \"124919287 578590669 9354715 32571540\\r\\n\", \"output\": [\"263200129\"]}, {\"input\": \"202669473 255300152 987865366 994537507\\r\\n\", \"output\": [\"926661352\"]}, {\"input\": \"2 2 1 998244353\\r\\n\", \"output\": [\"499122177\"]}, {\"input\": \"2 3 1 998244353\\r\\n\", \"output\": [\"499122177\"]}, {\"input\": \"3 3 1 998244353\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 1000000000 1 998244353\\r\\n\", \"output\": [\"499122177\"]}, {\"input\": \"999999999 999999999 1 998244353\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999999999 1000000000 1755648 1000000000\\r\\n\", \"output\": [\"499122177\"]}, {\"input\": \"1 2 1 86583718\\r\\n\", \"output\": [\"499122176\"]}, {\"input\": \"1 2 1 911660635\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2 2 4\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"2 2 2 5\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"2 2 3 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 2 3 5\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"2 3 2 4\\r\\n\", \"output\": [\"365\"]}, {\"input\": \"2 3 2 5\\r\\n\", \"output\": [\"2048\"]}, {\"input\": \"2 3 3 4\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"2 3 3 5\\r\\n\", \"output\": [\"365\"]}, {\"input\": \"3 2 2 4\\r\\n\", \"output\": [\"365\"]}, {\"input\": \"3 2 2 5\\r\\n\", \"output\": [\"2048\"]}, {\"input\": \"3 2 3 4\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"3 2 3 5\\r\\n\", \"output\": [\"365\"]}, {\"input\": \"3 3 2 4\\r\\n\", \"output\": [\"19683\"]}, {\"input\": \"3 3 2 5\\r\\n\", \"output\": [\"262144\"]}, {\"input\": \"3 3 3 4\\r\\n\", \"output\": [\"512\"]}, {\"input\": \"3 3 3 5\\r\\n\", \"output\": [\"19683\"]}, {\"input\": \"998244352 2 1 998244353\\r\\n\", \"output\": [\"499122177\"]}, {\"input\": \"3 3 1 1\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 2 2 5\\r\\n', 'output': ['2048']}, {'input': '646353335 282521795 600933409 772270276\\r\\n', 'output': ['13680108']}, {'input': '461 650 18427925 104278996\\r\\n', 'output': ['936348652']}, {'input': '999999999 999999999 1 998244353\\r\\n', 'output': ['0']}, {'input': '2 3 3 4\\r\\n', 'output': ['32']}]","human_sample_testcases_2":"[{'input': '268120620 443100795 102749301 604856694\\r\\n', 'output': ['834319192']}, {'input': '2 3 3 5\\r\\n', 'output': ['365']}, {'input': '795069900 869551950 803936044 964554424\\r\\n', 'output': ['884379548']}, {'input': '202669473 255300152 987865366 994537507\\r\\n', 'output': ['926661352']}, {'input': '124919287 578590669 9354715 32571540\\r\\n', 'output': ['263200129']}]","human_sample_testcases_3":"[{'input': '824436759 415879151 194713963 293553316\\r\\n', 'output': ['453443939']}, {'input': '2 3 2 4\\r\\n', 'output': ['365']}, {'input': '63719735 431492981 971536712 994663491\\r\\n', 'output': ['97582142']}, {'input': '741 806 424647372 965259389\\r\\n', 'output': ['861647194']}, {'input': '1 1000000000 1 1000000000\\r\\n', 'output': ['285141888']}]","human_sample_testcases_4":"[{'input': '564 558 305171115 960941497\\r\\n', 'output': ['880111542']}, {'input': '999999999 999999999 1 998244353\\r\\n', 'output': ['0']}, {'input': '3 3 3 4\\r\\n', 'output': ['512']}, {'input': '1 2 1 2\\r\\n', 'output': ['2']}, {'input': '2 2 1 998244353\\r\\n', 'output': ['499122177']}]","human_sample_testcases_5":"[{'input': '3 2 3 4\\r\\n', 'output': ['32']}, {'input': '3 2 2 4\\r\\n', 'output': ['365']}, {'input': '63719735 431492981 971536712 994663491\\r\\n', 'output': ['97582142']}, {'input': '3 3 3 4\\r\\n', 'output': ['512']}, {'input': '2 3 1 998244353\\r\\n', 'output': ['499122177']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":311,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 1 1 0 0 0 0 0 0 7 0 0 0 0\", \"5 1 1 1 1 0 0 0 0 0 0 0 0 0\"]","input_specification":"The only line contains 14 integers $$$a_1, a_2, \\ldots, a_{14}$$$ ($$$0 \\leq a_i \\leq 10^9$$$)\u00a0\u2014 the number of stones in each hole. It is guaranteed that for any $$$i$$$ ($$$1\\leq i \\leq 14$$$) $$$a_i$$$ is either zero or odd, and there is at least one stone in the board.","src_uid":"1ac11153e35509e755ea15f1d57d156b","source_code":"A=list(map(int,input().split()))\nscore=0\nfor i in range(14):\n score=max(score,sum([j for j in [(A[j] if i!=j else 0)+A[i]\/\/14+(1 if (j+13-i)%14 0 and y > 0:\n print(0, x + y, x + y, 0)\nelif x < 0 and y > 0:\n print(-y + x, 0, 0,-x + y)\nelif x > 0 and y < 0:\n print(0, y - x, x - y, 0)\nelse:\n print(x + y, 0,0, x + y)\n","sample_outputs":"[\"0 15 15 0\", \"-15 0 0 15\"]","lang_cluster":"Python","notes":"NoteFigure to the first sample","output_specification":"Print in the single line four integers x1,\u2009y1,\u2009x2,\u2009y2 \u2014 the coordinates of the required points.","description":"Vasily the bear has a favorite rectangle, it has one vertex at point (0,\u20090), and the opposite vertex at point (x,\u2009y). Of course, the sides of Vasya's favorite rectangle are parallel to the coordinate axes. Vasya also loves triangles, if the triangles have one vertex at point B\u2009=\u2009(0,\u20090). That's why today he asks you to find two points A\u2009=\u2009(x1,\u2009y1) and C\u2009=\u2009(x2,\u2009y2), such that the following conditions hold: the coordinates of points: x1, x2, y1, y2 are integers. Besides, the following inequation holds: x1\u2009<\u2009x2; the triangle formed by point A, B and C is rectangular and isosceles ( is right); all points of the favorite rectangle are located inside or on the border of triangle ABC; the area of triangle ABC is as small as possible. Help the bear, find the required points. It is not so hard to proof that these points are unique.","human_testcases":"[{\"input\": \"10 5\\r\\n\", \"output\": [\"0 15 15 0\"]}, {\"input\": \"-10 5\\r\\n\", \"output\": [\"-15 0 0 15\"]}, {\"input\": \"20 -10\\r\\n\", \"output\": [\"0 -30 30 0\"]}, {\"input\": \"-10 -1000000000\\r\\n\", \"output\": [\"-1000000010 0 0 -1000000010\"]}, {\"input\": \"-1000000000 -1000000000\\r\\n\", \"output\": [\"-2000000000 0 0 -2000000000\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0 2000000000 2000000000 0\"]}, {\"input\": \"-123131 3123141\\r\\n\", \"output\": [\"-3246272 0 0 3246272\"]}, {\"input\": \"-23423 -243242423\\r\\n\", \"output\": [\"-243265846 0 0 -243265846\"]}, {\"input\": \"123112 4560954\\r\\n\", \"output\": [\"0 4684066 4684066 0\"]}, {\"input\": \"1321 -23131\\r\\n\", \"output\": [\"0 -24452 24452 0\"]}, {\"input\": \"1000000000 999999999\\r\\n\", \"output\": [\"0 1999999999 1999999999 0\"]}, {\"input\": \"54543 432423\\r\\n\", \"output\": [\"0 486966 486966 0\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0 2 2 0\"]}, {\"input\": \"-1 -1\\r\\n\", \"output\": [\"-2 0 0 -2\"]}, {\"input\": \"-1 1\\r\\n\", \"output\": [\"-2 0 0 2\"]}, {\"input\": \"1 -1\\r\\n\", \"output\": [\"0 -2 2 0\"]}, {\"input\": \"42 -2\\r\\n\", \"output\": [\"0 -44 44 0\"]}, {\"input\": \"2 -435\\r\\n\", \"output\": [\"0 -437 437 0\"]}, {\"input\": \"76 -76\\r\\n\", \"output\": [\"0 -152 152 0\"]}, {\"input\": \"1000000000 1\\r\\n\", \"output\": [\"0 1000000001 1000000001 0\"]}, {\"input\": \"1000000000 -1\\r\\n\", \"output\": [\"0 -1000000001 1000000001 0\"]}, {\"input\": \"-1000000000 1\\r\\n\", \"output\": [\"-1000000001 0 0 1000000001\"]}, {\"input\": \"-1000000000 -1\\r\\n\", \"output\": [\"-1000000001 0 0 -1000000001\"]}, {\"input\": \"1000000000 -999999999\\r\\n\", \"output\": [\"0 -1999999999 1999999999 0\"]}, {\"input\": \"-1000000000 999999999\\r\\n\", \"output\": [\"-1999999999 0 0 1999999999\"]}, {\"input\": \"-1000000000 -999999999\\r\\n\", \"output\": [\"-1999999999 0 0 -1999999999\"]}, {\"input\": \"999999999 1000000000\\r\\n\", \"output\": [\"0 1999999999 1999999999 0\"]}, {\"input\": \"-999999999 1000000000\\r\\n\", \"output\": [\"-1999999999 0 0 1999999999\"]}, {\"input\": \"999999999 -1000000000\\r\\n\", \"output\": [\"0 -1999999999 1999999999 0\"]}, {\"input\": \"-999999999 -1000000000\\r\\n\", \"output\": [\"-1999999999 0 0 -1999999999\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 1\\r\\n', 'output': ['0 1000000001 1000000001 0']}, {'input': '-10 5\\r\\n', 'output': ['-15 0 0 15']}, {'input': '1000000000 -1\\r\\n', 'output': ['0 -1000000001 1000000001 0']}, {'input': '42 -2\\r\\n', 'output': ['0 -44 44 0']}, {'input': '1 -1\\r\\n', 'output': ['0 -2 2 0']}]","human_sample_testcases_2":"[{'input': '-10 -1000000000\\r\\n', 'output': ['-1000000010 0 0 -1000000010']}, {'input': '-10 5\\r\\n', 'output': ['-15 0 0 15']}, {'input': '-999999999 1000000000\\r\\n', 'output': ['-1999999999 0 0 1999999999']}, {'input': '-1000000000 -999999999\\r\\n', 'output': ['-1999999999 0 0 -1999999999']}, {'input': '10 5\\r\\n', 'output': ['0 15 15 0']}]","human_sample_testcases_3":"[{'input': '-1000000000 -1\\r\\n', 'output': ['-1000000001 0 0 -1000000001']}, {'input': '-1 1\\r\\n', 'output': ['-2 0 0 2']}, {'input': '-10 -1000000000\\r\\n', 'output': ['-1000000010 0 0 -1000000010']}, {'input': '999999999 1000000000\\r\\n', 'output': ['0 1999999999 1999999999 0']}, {'input': '-1000000000 999999999\\r\\n', 'output': ['-1999999999 0 0 1999999999']}]","human_sample_testcases_4":"[{'input': '2 -435\\r\\n', 'output': ['0 -437 437 0']}, {'input': '1000000000 1\\r\\n', 'output': ['0 1000000001 1000000001 0']}, {'input': '54543 432423\\r\\n', 'output': ['0 486966 486966 0']}, {'input': '20 -10\\r\\n', 'output': ['0 -30 30 0']}, {'input': '-1 1\\r\\n', 'output': ['-2 0 0 2']}]","human_sample_testcases_5":"[{'input': '76 -76\\r\\n', 'output': ['0 -152 152 0']}, {'input': '20 -10\\r\\n', 'output': ['0 -30 30 0']}, {'input': '-123131 3123141\\r\\n', 'output': ['-3246272 0 0 3246272']}, {'input': '1000000000 999999999\\r\\n', 'output': ['0 1999999999 1999999999 0']}, {'input': '1321 -23131\\r\\n', 'output': ['0 -24452 24452 0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":87.5,"human_sample_line_coverage_5":87.5,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":83.33,"id":314,"human_sample_pass_rate":100.0,"human_sample_line_coverage":87.5,"human_sample_branch_coverage":83.33} {"sample_inputs":"[\"4 4 0\\n2 1 2\", \"5 6 1\\n2 7 2\", \"3 3 3\\n2 2 2\"]","input_specification":"The first line of the input contains three integers a, b and c (0\u2009\u2264\u2009a,\u2009b,\u2009c\u2009\u2264\u20091\u2009000\u2009000)\u00a0\u2014 the number of blue, violet and orange spheres that are in the magician's disposal. The second line of the input contains three integers, x, y and z (0\u2009\u2264\u2009x,\u2009y,\u2009z\u2009\u2264\u20091\u2009000\u2009000)\u00a0\u2014 the number of blue, violet and orange spheres that he needs to get.","src_uid":"1db4ba9dc1000e26532bb73336cf12c3","source_code":"a, b, c =[int(q) for q in input().split()]\nx, y, z =[int(q) for q in input().split()]\nif a>=x:\n a -=x\n x=0\nelse:\n x -=a\n a=0\nif b>=y:\n b -=y\n y=0\nelse:\n y -=b\n b=0\nif c>=z:\n c -=z\n z=0\nelse:\n z -=c\n c=0\nif x+y+z<=a\/\/2+b\/\/2+c\/\/2:\n print(\"Yes\")\nelse:\n print(\"No\")","sample_outputs":"[\"Yes\", \"No\", \"Yes\"]","lang_cluster":"Python","notes":"NoteIn the first sample the wizard has 4 blue and 4 violet spheres. In his first action he can turn two blue spheres into one violet one. After that he will have 2 blue and 5 violet spheres. Then he turns 4 violet spheres into 2 orange spheres and he ends up with 2 blue, 1 violet and 2 orange spheres, which is exactly what he needs.","output_specification":"If the wizard is able to obtain the required numbers of spheres, print \"Yes\". Otherwise, print \"No\".","description":"Carl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make a spell that has never been seen before, he needs at least x blue, y violet and z orange spheres. Can he get them (possible, in multiple actions)?","human_testcases":"[{\"input\": \"4 4 0\\r\\n2 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 6 1\\r\\n2 7 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 3 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 0 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 0 0\\r\\n0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 1 0\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 0 0\\r\\n1 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"2 2 1\\r\\n1 1 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 3 1\\r\\n2 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 1000000 1000000\\r\\n1000000 1000000 1000000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 500000 500000\\r\\n0 750000 750000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"500000 1000000 500000\\r\\n750001 0 750000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"499999 500000 1000000\\r\\n750000 750000 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 500000 0\\r\\n0 0 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 500001 499999\\r\\n500000 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1000000 500000 1000000\\r\\n500000 1000000 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1000000 1000000 499999\\r\\n500000 500000 1000000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 1000000 1000000\\r\\n1000000 500001 500000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1000000 500000 500000\\r\\n0 1000000 500000\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"500000 500000 1000000\\r\\n500001 1000000 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"500000 999999 500000\\r\\n1000000 0 500000\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4 0 3\\r\\n2 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 2 4\\r\\n2 0 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3 1 0\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 1\\r\\n1 3 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 2 4\\r\\n2 1 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 1 0\\r\\n0 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"4 0 0\\r\\n0 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 3 0\\r\\n1 0 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 0 3\\r\\n1 0 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 12 1\\r\\n4 0 4\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 0 4\\r\\n1 2 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 0\\r\\n1 1 3\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 9 0\\r\\n2 2 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 10 0\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"9 0 9\\r\\n0 8 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"0 9 9\\r\\n9 0 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 10 0\\r\\n0 0 9\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 0 9\\r\\n0 10 0\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"0 10 10\\r\\n10 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 10 0\\r\\n0 0 11\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"307075 152060 414033\\r\\n381653 222949 123101\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"569950 228830 153718\\r\\n162186 357079 229352\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"149416 303568 749016\\r\\n238307 493997 190377\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"438332 298094 225324\\r\\n194220 400244 245231\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"293792 300060 511272\\r\\n400687 382150 133304\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"295449 518151 368838\\r\\n382897 137148 471892\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"191789 291147 691092\\r\\n324321 416045 176232\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"286845 704749 266526\\r\\n392296 104421 461239\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"135522 188282 377041\\r\\n245719 212473 108265\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"404239 359124 133292\\r\\n180069 184791 332544\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"191906 624432 244408\\r\\n340002 367217 205432\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"275980 429361 101824\\r\\n274288 302579 166062\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"136092 364927 395302\\r\\n149173 343146 390922\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"613852 334661 146012\\r\\n363786 326286 275233\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"348369 104625 525203\\r\\n285621 215396 366411\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"225307 153572 114545\\r\\n154753 153282 149967\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"438576 124465 629784\\r\\n375118 276028 390116\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"447521 327510 158732\\r\\n395759 178458 259139\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8 5 5\\r\\n5 5 5\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n0 0 0\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3 2 3\\r\\n2 3 2\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 4 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"14 9 8\\r\\n12 5 10\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 10 10\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6 3 3\\r\\n3 3 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"10 0 4\\r\\n2 4 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"100 100 100\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 6 0\\r\\n2 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 6 3\\r\\n4 2 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 5 5\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"41 17 34\\r\\n0 19 24\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8 8 8\\r\\n3 3 3\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"7 7 1\\r\\n1 1 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"6 6 0\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 5 5\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"400 400 400\\r\\n1 1 1\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"4 4 4\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '438332 298094 225324\\r\\n194220 400244 245231\\r\\n', 'output': ['No', 'NO']}, {'input': '438576 124465 629784\\r\\n375118 276028 390116\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 10 10\\r\\n10 0 0\\r\\n', 'output': ['YES', 'Yes']}, {'input': '1 3 1\\r\\n2 1 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '2 2 1\\r\\n1 1 2\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_2":"[{'input': '4 0 3\\r\\n2 2 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '6 3 3\\r\\n3 3 3\\r\\n', 'output': ['YES', 'Yes']}, {'input': '14 9 8\\r\\n12 5 10\\r\\n', 'output': ['YES', 'Yes']}, {'input': '293792 300060 511272\\r\\n400687 382150 133304\\r\\n', 'output': ['No', 'NO']}, {'input': '286845 704749 266526\\r\\n392296 104421 461239\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_3":"[{'input': '348369 104625 525203\\r\\n285621 215396 366411\\r\\n', 'output': ['No', 'NO']}, {'input': '6 6 0\\r\\n2 2 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '0 2 4\\r\\n2 0 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '404239 359124 133292\\r\\n180069 184791 332544\\r\\n', 'output': ['No', 'NO']}, {'input': '41 17 34\\r\\n0 19 24\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_4":"[{'input': '500000 500000 1000000\\r\\n500001 1000000 0\\r\\n', 'output': ['No', 'NO']}, {'input': '0 9 9\\r\\n9 0 0\\r\\n', 'output': ['No', 'NO']}, {'input': '1000000 500000 1000000\\r\\n500000 1000000 500000\\r\\n', 'output': ['YES', 'Yes']}, {'input': '4 4 0\\r\\n1 1 3\\r\\n', 'output': ['No', 'NO']}, {'input': '0 0 3\\r\\n1 0 1\\r\\n', 'output': ['YES', 'Yes']}]","human_sample_testcases_5":"[{'input': '1 12 1\\r\\n4 0 4\\r\\n', 'output': ['YES', 'Yes']}, {'input': '4 0 0\\r\\n0 1 1\\r\\n', 'output': ['YES', 'Yes']}, {'input': '5 5 5\\r\\n2 2 2\\r\\n', 'output': ['YES', 'Yes']}, {'input': '500000 500000 1000000\\r\\n500001 1000000 0\\r\\n', 'output': ['No', 'NO']}, {'input': '0 0 0\\r\\n0 0 1\\r\\n', 'output': ['No', 'NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":315,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 7 3 3\", \"7 7 7 7\"]","input_specification":"The first line contains four space-separated integers s1,\u2009s2,\u2009s3,\u2009s4 (1\u2009\u2264\u2009s1,\u2009s2,\u2009s3,\u2009s4\u2009\u2264\u2009109) \u2014 the colors of horseshoes Valera has. Consider all possible colors indexed with integers.","src_uid":"38c4864937e57b35d3cce272f655e20f","source_code":"s = [int(i) for i in input().split()]\nm=0\nfor i in s:\n if s.count(i) >= 2:\n s = list(set(s))\n\nm = len(s)\n\nif m == 4:\n print(0)\nelif m == 3:\n print(1)\nelif m == 2:\n print(2)\nelse:\n print(3)","sample_outputs":"[\"1\", \"3\"]","lang_cluster":"Python","notes":null,"output_specification":"Print a single integer \u2014 the minimum number of horseshoes Valera needs to buy.","description":"Valera the Horse is going to the party with friends. He has been following the fashion trends for a while, and he knows that it is very popular to wear all horseshoes of different color. Valera has got four horseshoes left from the last year, but maybe some of them have the same color. In this case he needs to go to the store and buy some few more horseshoes, not to lose face in front of his stylish comrades.Fortunately, the store sells horseshoes of all colors under the sun and Valera has enough money to buy any four of them. However, in order to save the money, he would like to spend as little money as possible, so you need to help Valera and determine what is the minimum number of horseshoes he needs to buy to wear four horseshoes of different colors to a party.","human_testcases":"[{\"input\": \"1 7 3 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 7 7 7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"81170865 673572653 756938629 995577259\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3491663 217797045 522540872 715355328\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"251590420 586975278 916631563 586975278\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"259504825 377489979 588153796 377489979\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"652588203 931100304 931100304 652588203\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"391958720 651507265 391958720 651507265\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"90793237 90793237 90793237 90793237\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"551651653 551651653 551651653 551651653\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"156630260 609654355 668943582 973622757\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17061017 110313588 434481173 796661222\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24975422 256716298 337790533 690960249\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"255635360 732742923 798648949 883146723\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"133315691 265159773 734556507 265159773\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"28442865 741657755 978106882 978106882\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"131245479 174845575 497483467 131245479\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"139159884 616215581 958341883 616215581\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"147784432 947653080 947653080 947653080\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"94055790 756126496 756126496 94055790\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"240458500 511952208 240458500 511952208\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"681828506 972810624 972810624 681828506\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"454961014 454961014 454961014 454961014\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"915819430 915819430 915819430 915819430\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"671645142 671645142 671645142 671645142\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"132503558 132503558 132503558 132503558\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 5 999999 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 2 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1 2 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 3 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 2 2 2\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '133315691 265159773 734556507 265159773\\r\\n', 'output': ['1']}, {'input': '81170865 673572653 756938629 995577259\\r\\n', 'output': ['0']}, {'input': '251590420 586975278 916631563 586975278\\r\\n', 'output': ['1']}, {'input': '147784432 947653080 947653080 947653080\\r\\n', 'output': ['2']}, {'input': '1 1 2 5\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '7 7 7 7\\r\\n', 'output': ['3']}, {'input': '551651653 551651653 551651653 551651653\\r\\n', 'output': ['3']}, {'input': '156630260 609654355 668943582 973622757\\r\\n', 'output': ['0']}, {'input': '3491663 217797045 522540872 715355328\\r\\n', 'output': ['0']}, {'input': '1 2 2 2\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '81170865 673572653 756938629 995577259\\r\\n', 'output': ['0']}, {'input': '1 2 2 2\\r\\n', 'output': ['2']}, {'input': '1 1 3 5\\r\\n', 'output': ['1']}, {'input': '1 1 2 5\\r\\n', 'output': ['1']}, {'input': '3491663 217797045 522540872 715355328\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '156630260 609654355 668943582 973622757\\r\\n', 'output': ['0']}, {'input': '255635360 732742923 798648949 883146723\\r\\n', 'output': ['0']}, {'input': '454961014 454961014 454961014 454961014\\r\\n', 'output': ['3']}, {'input': '915819430 915819430 915819430 915819430\\r\\n', 'output': ['3']}, {'input': '1 1 3 5\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '551651653 551651653 551651653 551651653\\r\\n', 'output': ['3']}, {'input': '1 1 3 3\\r\\n', 'output': ['2']}, {'input': '17061017 110313588 434481173 796661222\\r\\n', 'output': ['0']}, {'input': '391958720 651507265 391958720 651507265\\r\\n', 'output': ['2']}, {'input': '132503558 132503558 132503558 132503558\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.31,"human_sample_line_coverage_2":92.31,"human_sample_line_coverage_3":92.31,"human_sample_line_coverage_4":92.31,"human_sample_line_coverage_5":92.31,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":91.67,"human_sample_branch_coverage_3":91.67,"human_sample_branch_coverage_4":91.67,"human_sample_branch_coverage_5":91.67,"id":316,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.31,"human_sample_branch_coverage":91.67} {"sample_inputs":"[\"code\\nedoc\", \"abb\\naba\", \"code\\ncode\"]","input_specification":"The first line contains word s, the second line contains word t. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.","src_uid":"35a4be326690b58bf9add547fb63a5a5","source_code":"word1 = input()\nword2 = input()\n\nw1len = len(word1)\nw2len = len(word2)\n\n\n\nif w1len != w2len:\n print('NO')\n\nelse:\n\n\n if (w1len % 2) == 0: # ES\n index = w1len - 1\n cant = w1len\n i = 0\n while cant != 0:\n a = word1[i]\n b = word2[index]\n\n\n\n if a == b:\n i += 1\n index -= 1\n cant -= 1\n\n else:\n print('NO')\n break\n if cant == 0:\n print('YES')\n\n else:\n index = w1len - 1\n cant = w1len\n i = 0\n while cant != 0:\n a = word1[i]\n b = word2[index]\n\n\n\n if a == b:\n i += 1\n index -= 1\n cant -= 1\n\n else:\n print('NO')\n break\n if cant == 0:\n print('YES')\n\n","sample_outputs":"[\"YES\", \"NO\", \"NO\"]","lang_cluster":"Python","notes":null,"output_specification":"If the word t is a word s, written reversely, print YES, otherwise print NO.","description":"The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the \u00abtranslation\u00bb. Vasya translated word s from Berlandish into Birlandish as t. Help him: find out if he translated the word correctly.","human_testcases":"[{\"input\": \"code\\r\\nedoc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"abb\\r\\naba\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"code\\r\\ncode\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"abacaba\\r\\nabacaba\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"q\\r\\nq\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"asrgdfngfnmfgnhweratgjkk\\r\\nasrgdfngfnmfgnhweratgjkk\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"z\\r\\na\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"asd\\r\\ndsa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"abcdef\\r\\nfecdba\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ywjjbirapvskozubvxoemscfwl\\r\\ngnduubaogtfaiowjizlvjcu\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"mfrmqxtzvgaeuleubcmcxcfqyruwzenguhgrmkuhdgnhgtgkdszwqyd\\r\\nmfxufheiperjnhyczclkmzyhcxntdfskzkzdwzzujdinf\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"bnbnemvybqizywlnghlykniaxxxlkhftppbdeqpesrtgkcpoeqowjwhrylpsziiwcldodcoonpimudvrxejjo\\r\\ntiynnekmlalogyvrgptbinkoqdwzuiyjlrldxhzjmmp\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"pwlpubwyhzqvcitemnhvvwkmwcaawjvdiwtoxyhbhbxerlypelevasmelpfqwjk\\r\\nstruuzebbcenziscuoecywugxncdwzyfozhljjyizpqcgkyonyetarcpwkqhuugsqjuixsxptmbnlfupdcfigacdhhrzb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"gdvqjoyxnkypfvdxssgrihnwxkeojmnpdeobpecytkbdwujqfjtxsqspxvxpqioyfagzjxupqqzpgnpnpxcuipweunqch\\r\\nkkqkiwwasbhezqcfeceyngcyuogrkhqecwsyerdniqiocjehrpkljiljophqhyaiefjpavoom\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"umeszdawsvgkjhlqwzents\\r\\nhxqhdungbylhnikwviuh\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"juotpscvyfmgntshcealgbsrwwksgrwnrrbyaqqsxdlzhkbugdyx\\r\\nibqvffmfktyipgiopznsqtrtxiijntdbgyy\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"zbwueheveouatecaglziqmudxemhrsozmaujrwlqmppzoumxhamwugedikvkblvmxwuofmpafdprbcftew\\r\\nulczwrqhctbtbxrhhodwbcxwimncnexosksujlisgclllxokrsbnozthajnnlilyffmsyko\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"nkgwuugukzcv\\r\\nqktnpxedwxpxkrxdvgmfgoxkdfpbzvwsduyiybynbkouonhvmzakeiruhfmvrktghadbfkmwxduoqv\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"incenvizhqpcenhjhehvjvgbsnfixbatrrjstxjzhlmdmxijztphxbrldlqwdfimweepkggzcxsrwelodpnryntepioqpvk\\r\\ndhjbjjftlvnxibkklxquwmzhjfvnmwpapdrslioxisbyhhfymyiaqhlgecpxamqnocizwxniubrmpyubvpenoukhcobkdojlybxd\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"w\\r\\nw\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"vz\\r\\nzv\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ry\\r\\nyr\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"xou\\r\\nuox\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"axg\\r\\ngax\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"zdsl\\r\\nlsdz\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"kudl\\r\\nldku\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"zzlzwnqlcl\\r\\nlclqnwzlzz\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"vzzgicnzqooejpjzads\\r\\nsdazjpjeooqzncigzzv\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"raqhmvmzuwaykjpyxsykr\\r\\nxkysrypjkyawuzmvmhqar\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"ngedczubzdcqbxksnxuavdjaqtmdwncjnoaicvmodcqvhfezew\\r\\nwezefhvqcdomvciaonjcnwdmtqajdvauxnskxbqcdzbuzcdegn\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"muooqttvrrljcxbroizkymuidvfmhhsjtumksdkcbwwpfqdyvxtrlymofendqvznzlmim\\r\\nmimlznzvqdnefomylrtxvydqfpwwbckdskmutjshhmfvdiumykziorbxcjlrrvttqooum\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"vxpqullmcbegsdskddortcvxyqlbvxmmkhevovnezubvpvnrcajpxraeaxizgaowtfkzywvhnbgzsxbhkaipcmoumtikkiyyaivg\\r\\ngviayyikkitmuomcpiakhbxszgbnhvwyzkftwoagzixaearxpjacrnvpvbuzenvovehkmmxvblqyxvctroddksdsgebcmlluqpxv\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"mnhaxtaopjzrkqlbroiyipitndczpunwygstmzevgyjdzyanxkdqnvgkikfabwouwkkbzuiuvgvxgpizsvqsbwepktpdrgdkmfdc\\r\\ncdfmkdgrdptkpewbsqvszipgxvgvuiuzbkkwuowbafkikgvnqdkxnayzdjygvezmtsgywnupocdntipiyiorblqkrzjpzatxahnm\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"dgxmzbqofstzcdgthbaewbwocowvhqpinehpjatnnbrijcolvsatbblsrxabzrpszoiecpwhfjmwuhqrapvtcgvikuxtzbftydkw\\r\\nwkdytfbztxukivgctvparqhuwmjfhwpceiozsprzbaxrslbbqasvlocjirbnntajphenipthvwocowbweabhtgdcztsfoqbzmxgd\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"gxoixiecetohtgjgbqzvlaobkhstejxdklghowtvwunnnvauriohuspsdmpzckprwajyxldoyckgjivjpmbfqtszmtocovxwgeh\\r\\nhegwxvocotmzstqfbmpjvijgkcyodlxyjawrpkczpmdspsuhoiruavnnnuwvtwohglkdxjetshkboalvzqbgjgthoteceixioxg\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"sihxuwvmaambplxvjfoskinghzicyfqebjtkysotattkahssumfcgrkheotdxwjckpvapbkaepqrxseyfrwtyaycmrzsrsngkh\\r\\nhkgnsrszrmcyaytwrfyesxrqpeakbpavpkcjwxdtoehkrgcfmusshakttatosyktjbeqfycizhgniksofjvxlpbmaamvwuxhis\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"ycnahksbughnonldzrhkysujmylcgcfuludjvjiahtkyzqvkopzqcnwhltbzfugzojqkjjlggmvnultascmygelkiktmfieok\\r\\nkoeifmtkiklegkmcsatlunvmggkjjlqjozgufzbtlhwncqzpokvqzykthaijvjdulufcgclymjusyyhrzdlnonhgubskhancy\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"wbqasaehtkfojruzyhrlgwmtyiovmzyfifslvlemhqheyaelzwnthrenjsbmntwaoryzwfbxmscmypvxlfmzpnkkjlvwvmtz\\r\\nztmvwvljkknpzmflxvpymcsmxbfwzyroawtnmbsjnerhtnwzleayehqhmelvlsfifyzmvoiytmwglrhyzurjofktheasaqbw\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"imippqurprbhfugngtgifelytadegwrgaefnfhbjjnmzikvjaccotqzemufqieqldgnbmviisgkynzeldlhqxuqphjfmyij\\r\\njiymfjhpquxqhldleznykgsiivmbngdlqeiqfumezqtoccajvkizmnjjbhfnfeagrwgedatylefigtgngufhbrpruqppimi\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"bikydffiuisckpvzqlteqfhegsagimodb\\r\\nbdomigasgehfqetlqzvpkcsiuiffdykib\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'abcdef\\r\\nfecdba\\r\\n', 'output': ['NO']}, {'input': 'umeszdawsvgkjhlqwzents\\r\\nhxqhdungbylhnikwviuh\\r\\n', 'output': ['NO']}, {'input': 'code\\r\\nedoc\\r\\n', 'output': ['YES']}, {'input': 'q\\r\\nq\\r\\n', 'output': ['YES']}, {'input': 'bnbnemvybqizywlnghlykniaxxxlkhftppbdeqpesrtgkcpoeqowjwhrylpsziiwcldodcoonpimudvrxejjo\\r\\ntiynnekmlalogyvrgptbinkoqdwzuiyjlrldxhzjmmp\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': 'z\\r\\na\\r\\n', 'output': ['NO']}, {'input': 'mfrmqxtzvgaeuleubcmcxcfqyruwzenguhgrmkuhdgnhgtgkdszwqyd\\r\\nmfxufheiperjnhyczclkmzyhcxntdfskzkzdwzzujdinf\\r\\n', 'output': ['NO']}, {'input': 'abcdef\\r\\nfecdba\\r\\n', 'output': ['NO']}, {'input': 'gxoixiecetohtgjgbqzvlaobkhstejxdklghowtvwunnnvauriohuspsdmpzckprwajyxldoyckgjivjpmbfqtszmtocovxwgeh\\r\\nhegwxvocotmzstqfbmpjvijgkcyodlxyjawrpkczpmdspsuhoiruavnnnuwvtwohglkdxjetshkboalvzqbgjgthoteceixioxg\\r\\n', 'output': ['YES']}, {'input': 'dgxmzbqofstzcdgthbaewbwocowvhqpinehpjatnnbrijcolvsatbblsrxabzrpszoiecpwhfjmwuhqrapvtcgvikuxtzbftydkw\\r\\nwkdytfbztxukivgctvparqhuwmjfhwpceiozsprzbaxrslbbqasvlocjirbnntajphenipthvwocowbweabhtgdcztsfoqbzmxgd\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': 'asrgdfngfnmfgnhweratgjkk\\r\\nasrgdfngfnmfgnhweratgjkk\\r\\n', 'output': ['NO']}, {'input': 'abacaba\\r\\nabacaba\\r\\n', 'output': ['YES']}, {'input': 'kudl\\r\\nldku\\r\\n', 'output': ['NO']}, {'input': 'sihxuwvmaambplxvjfoskinghzicyfqebjtkysotattkahssumfcgrkheotdxwjckpvapbkaepqrxseyfrwtyaycmrzsrsngkh\\r\\nhkgnsrszrmcyaytwrfyesxrqpeakbpavpkcjwxdtoehkrgcfmusshakttatosyktjbeqfycizhgniksofjvxlpbmaamvwuxhis\\r\\n', 'output': ['YES']}, {'input': 'vxpqullmcbegsdskddortcvxyqlbvxmmkhevovnezubvpvnrcajpxraeaxizgaowtfkzywvhnbgzsxbhkaipcmoumtikkiyyaivg\\r\\ngviayyikkitmuomcpiakhbxszgbnhvwyzkftwoagzixaearxpjacrnvpvbuzenvovehkmmxvblqyxvctroddksdsgebcmlluqpxv\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': 'w\\r\\nw\\r\\n', 'output': ['YES']}, {'input': 'abacaba\\r\\nabacaba\\r\\n', 'output': ['YES']}, {'input': 'muooqttvrrljcxbroizkymuidvfmhhsjtumksdkcbwwpfqdyvxtrlymofendqvznzlmim\\r\\nmimlznzvqdnefomylrtxvydqfpwwbckdskmutjshhmfvdiumykziorbxcjlrrvttqooum\\r\\n', 'output': ['YES']}, {'input': 'z\\r\\na\\r\\n', 'output': ['NO']}, {'input': 'zbwueheveouatecaglziqmudxemhrsozmaujrwlqmppzoumxhamwugedikvkblvmxwuofmpafdprbcftew\\r\\nulczwrqhctbtbxrhhodwbcxwimncnexosksujlisgclllxokrsbnozthajnnlilyffmsyko\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': 'ywjjbirapvskozubvxoemscfwl\\r\\ngnduubaogtfaiowjizlvjcu\\r\\n', 'output': ['NO']}, {'input': 'vzzgicnzqooejpjzads\\r\\nsdazjpjeooqzncigzzv\\r\\n', 'output': ['YES']}, {'input': 'abb\\r\\naba\\r\\n', 'output': ['NO']}, {'input': 'abacaba\\r\\nabacaba\\r\\n', 'output': ['YES']}, {'input': 'mnhaxtaopjzrkqlbroiyipitndczpunwygstmzevgyjdzyanxkdqnvgkikfabwouwkkbzuiuvgvxgpizsvqsbwepktpdrgdkmfdc\\r\\ncdfmkdgrdptkpewbsqvszipgxvgvuiuzbkkwuowbafkikgvnqdkxnayzdjygvezmtsgywnupocdntipiyiorblqkrzjpzatxahnm\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.29,"human_sample_line_coverage_2":97.14,"human_sample_line_coverage_3":91.43,"human_sample_line_coverage_4":60.0,"human_sample_line_coverage_5":97.14,"human_sample_branch_coverage_1":87.5,"human_sample_branch_coverage_2":87.5,"human_sample_branch_coverage_3":81.25,"human_sample_branch_coverage_4":56.25,"human_sample_branch_coverage_5":87.5,"id":317,"human_sample_pass_rate":100.0,"human_sample_line_coverage":88.0,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"3000\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"8551308e5ff435e0fc507b89a912408a","source_code":"print(int(int(input())\/2520))","sample_outputs":"[\"1\"]","lang_cluster":"Python","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are divisible by all numbers from 2 to 10.","description":"IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is divisible by all numbers from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"3000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2520\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"124666\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"285032471610732\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"396825396825396\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"391926317950225\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"1440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '504000000000000000\\r\\n', 'output': ['200000000000000']}, {'input': '2520\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '2521\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '314159265\\r\\n', 'output': ['124666']}, {'input': '2519\\r\\n', 'output': ['0']}, {'input': '3628800\\r\\n', 'output': ['1440']}, {'input': '2521\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '1\\r\\n', 'output': ['0']}, {'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '3000\\r\\n', 'output': ['1']}, {'input': '2520\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '1000000000000000000\\r\\n', 'output': ['396825396825396']}, {'input': '2520\\r\\n', 'output': ['1']}, {'input': '718281828459045235\\r\\n', 'output': ['285032471610732']}, {'input': '2521\\r\\n', 'output': ['1']}, {'input': '2519\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":318,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1\", \"2\", \"3\"]","input_specification":"The first line contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u200940).","src_uid":"c2cbc35012c6ff7ab0d6899e6015e4e7","source_code":"# I've proven, that z takes form of 2 ** (k - 1) - 1,\n# where 2 ** k - 1 is prime, which are called 'Mersenne primes'.\n\np = [2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127,\\\n 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689,\\\n 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503,\\\n 132049, 216091, 756839, 859433, 1257787, 1398269,\\\n 2976221, 3021377, 6972593, 13466917, 20996011]\nn = int(input())\nMOD = 10 ** 9 + 7\nprint((pow(2, p[n - 1] - 1, MOD) - 1) % MOD)\n","sample_outputs":"[\"1\", \"3\", \"15\"]","lang_cluster":"Python","notes":null,"output_specification":"Print a single integer \u2014 the number zn modulo 1000000007 (109\u2009+\u20097). It is guaranteed that the answer exists.","description":"Consider the following equation: where sign [a] represents the integer part of number a.Let's find all integer z (z\u2009>\u20090), for which this equation is unsolvable in positive integers. The phrase \"unsolvable in positive integers\" means that there are no such positive integers x and y (x,\u2009y\u2009>\u20090), for which the given above equation holds.Let's write out all such z in the increasing order: z1,\u2009z2,\u2009z3, and so on (zi\u2009<\u2009zi\u2009+\u20091). Your task is: given the number n, find the number zn.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"4095\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"65535\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"262143\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"73741816\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"536396503\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"140130950\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"487761805\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"319908070\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"106681874\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"373391776\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"317758023\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"191994803\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"416292236\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"110940209\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"599412198\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"383601260\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"910358878\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"532737550\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"348927936\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"923450985\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"470083777\"]}, {\"input\": \"26\\r\\n\", \"output\": [\"642578561\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"428308066\"]}, {\"input\": \"28\\r\\n\", \"output\": [\"485739298\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"419990027\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"287292016\"]}, {\"input\": \"31\\r\\n\", \"output\": [\"202484167\"]}, {\"input\": \"32\\r\\n\", \"output\": [\"389339971\"]}, {\"input\": \"33\\r\\n\", \"output\": [\"848994100\"]}, {\"input\": \"34\\r\\n\", \"output\": [\"273206869\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"853092282\"]}, {\"input\": \"36\\r\\n\", \"output\": [\"411696552\"]}, {\"input\": \"37\\r\\n\", \"output\": [\"876153853\"]}, {\"input\": \"38\\r\\n\", \"output\": [\"90046024\"]}, {\"input\": \"39\\r\\n\", \"output\": [\"828945523\"]}, {\"input\": \"40\\r\\n\", \"output\": [\"697988359\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '37\\r\\n', 'output': ['876153853']}, {'input': '22\\r\\n', 'output': ['532737550']}, {'input': '26\\r\\n', 'output': ['642578561']}, {'input': '15\\r\\n', 'output': ['317758023']}, {'input': '36\\r\\n', 'output': ['411696552']}]","human_sample_testcases_2":"[{'input': '15\\r\\n', 'output': ['317758023']}, {'input': '29\\r\\n', 'output': ['419990027']}, {'input': '7\\r\\n', 'output': ['262143']}, {'input': '39\\r\\n', 'output': ['828945523']}, {'input': '35\\r\\n', 'output': ['853092282']}]","human_sample_testcases_3":"[{'input': '24\\r\\n', 'output': ['923450985']}, {'input': '2\\r\\n', 'output': ['3']}, {'input': '13\\r\\n', 'output': ['106681874']}, {'input': '5\\r\\n', 'output': ['4095']}, {'input': '18\\r\\n', 'output': ['110940209']}]","human_sample_testcases_4":"[{'input': '28\\r\\n', 'output': ['485739298']}, {'input': '21\\r\\n', 'output': ['910358878']}, {'input': '13\\r\\n', 'output': ['106681874']}, {'input': '7\\r\\n', 'output': ['262143']}, {'input': '35\\r\\n', 'output': ['853092282']}]","human_sample_testcases_5":"[{'input': '30\\r\\n', 'output': ['287292016']}, {'input': '12\\r\\n', 'output': ['319908070']}, {'input': '31\\r\\n', 'output': ['202484167']}, {'input': '17\\r\\n', 'output': ['416292236']}, {'input': '1\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":319,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 2 1000\", \"2 2 1000\", \"5 3 1103\"]","input_specification":"Input consists of three integers n,\u2009k,\u2009m (1\u2009\u2264\u2009n\u2009\u2264\u20091000, 1\u2009\u2264\u2009k\u2009\u2264\u2009100, 1\u2009\u2264\u2009m\u2009\u2264\u2009109).","src_uid":"656bf8df1e79499aa2ab2c28712851f0","source_code":"def get_input():\n hahaha=input()\n (n,k,m)=hahaha.split(sep=None, maxsplit=1000)\n return (int(n),int(k),int(m))\n(n,k,m)=get_input()\nf=[0 for i in range(k)] \ns=0\nfor v in range(n):\n tens = 10**v%k\n f=[ (sum( [f[(j+k-(x+1)*tens)%k] for x in range(9)] )+f[j])%m for j in range(k)]\n for x in range(9):\n f[(x+1)*tens%k]+=1\n if n-v-1==0:\n s+=(f[0]%m)\n else:\n s+=f[0]*((10**(n-v-2)*9))%m\n f[0]=0\nprint(s%m)\n","sample_outputs":"[\"4\", \"45\", \"590\"]","lang_cluster":"Python","notes":"NoteA suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.","output_specification":"Print the required number modulo m.","description":"Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x\u2009>\u20090 exist such that: Decimal representation of x (without leading zeroes) consists of exactly n digits; There exists some integer y\u2009>\u20090 such that: ; decimal representation of y is a suffix of decimal representation of x. As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.Can you help Amr escape this embarrassing situation?","human_testcases":"[{\"input\": \"1 2 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 2 1000\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"5 3 1103\\r\\n\", \"output\": [\"590\"]}, {\"input\": \"2 17 10000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 9 10000\\r\\n\", \"output\": [\"252\"]}, {\"input\": \"6 64 941761822\\r\\n\", \"output\": [\"46530\"]}, {\"input\": \"183 3 46847167\\r\\n\", \"output\": [\"29891566\"]}, {\"input\": \"472 44 364550669\\r\\n\", \"output\": [\"122479316\"]}, {\"input\": \"510 76 811693420\\r\\n\", \"output\": [\"546301720\"]}, {\"input\": \"783 30 602209107\\r\\n\", \"output\": [\"279682329\"]}, {\"input\": \"863 47 840397713\\r\\n\", \"output\": [\"433465398\"]}, {\"input\": \"422 22 411212542\\r\\n\", \"output\": [\"63862621\"]}, {\"input\": \"370 9 385481464\\r\\n\", \"output\": [\"163845824\"]}, {\"input\": \"312 41 915197716\\r\\n\", \"output\": [\"912219984\"]}, {\"input\": \"261 32 49719977\\r\\n\", \"output\": [\"19320923\"]}, {\"input\": \"434 6 56571287\\r\\n\", \"output\": [\"56257936\"]}, {\"input\": \"355 3 945669623\\r\\n\", \"output\": [\"219132384\"]}, {\"input\": \"905 71 999142682\\r\\n\", \"output\": [\"825882209\"]}, {\"input\": \"900 84 526417573\\r\\n\", \"output\": [\"281234824\"]}, {\"input\": \"387 3 521021345\\r\\n\", \"output\": [\"435545521\"]}, {\"input\": \"246 33 996704992\\r\\n\", \"output\": [\"385601286\"]}, {\"input\": \"443 29 106807555\\r\\n\", \"output\": [\"7872021\"]}, {\"input\": \"621 43 356382217\\r\\n\", \"output\": [\"251594310\"]}, {\"input\": \"782 84 643445347\\r\\n\", \"output\": [\"208138038\"]}, {\"input\": \"791 23 94030462\\r\\n\", \"output\": [\"41862326\"]}, {\"input\": \"543 98 508536403\\r\\n\", \"output\": [\"117587951\"]}, {\"input\": \"20 96 238661639\\r\\n\", \"output\": [\"198761428\"]}, {\"input\": \"845 60 888437864\\r\\n\", \"output\": [\"193926448\"]}, {\"input\": \"998 85 501663165\\r\\n\", \"output\": [\"145180249\"]}, {\"input\": \"123 72 56222855\\r\\n\", \"output\": [\"32350599\"]}, {\"input\": \"12 39 618421525\\r\\n\", \"output\": [\"115875938\"]}, {\"input\": \"462 35 144751085\\r\\n\", \"output\": [\"79931198\"]}, {\"input\": \"674 22 494819681\\r\\n\", \"output\": [\"19590614\"]}, {\"input\": \"650 66 579060528\\r\\n\", \"output\": [\"224930740\"]}, {\"input\": \"432 80 133016247\\r\\n\", \"output\": [\"25032672\"]}, {\"input\": \"176 70 196445230\\r\\n\", \"output\": [\"64904804\"]}, {\"input\": \"393 71 933802677\\r\\n\", \"output\": [\"366541352\"]}, {\"input\": \"37 92 9838905\\r\\n\", \"output\": [\"7980021\"]}, {\"input\": \"993 26 108974437\\r\\n\", \"output\": [\"87469631\"]}, {\"input\": \"433 93 36915724\\r\\n\", \"output\": [\"20722839\"]}, {\"input\": \"957 88 512982771\\r\\n\", \"output\": [\"161742313\"]}, {\"input\": \"170 94 82742818\\r\\n\", \"output\": [\"1117330\"]}, {\"input\": \"624 33 145653575\\r\\n\", \"output\": [\"99048377\"]}, {\"input\": \"56 48 961996131\\r\\n\", \"output\": [\"199203510\"]}, {\"input\": \"889 6 225765429\\r\\n\", \"output\": [\"193135878\"]}, {\"input\": \"1 93 727895661\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"470 61 617307737\\r\\n\", \"output\": [\"428782123\"]}, {\"input\": \"520 94 712232167\\r\\n\", \"output\": [\"199435818\"]}, {\"input\": \"531 78 460047919\\r\\n\", \"output\": [\"117748792\"]}, {\"input\": \"776 32 523607700\\r\\n\", \"output\": [\"309970800\"]}, {\"input\": \"648 74 329538445\\r\\n\", \"output\": [\"177655063\"]}, {\"input\": \"885 6 743810885\\r\\n\", \"output\": [\"297512873\"]}, {\"input\": \"712 53 592302770\\r\\n\", \"output\": [\"147693148\"]}, {\"input\": \"426 72 589297447\\r\\n\", \"output\": [\"316207784\"]}, {\"input\": \"561 69 310141994\\r\\n\", \"output\": [\"245538618\"]}, {\"input\": \"604 97 26180786\\r\\n\", \"output\": [\"6950800\"]}, {\"input\": \"586 32 846994504\\r\\n\", \"output\": [\"579729448\"]}, {\"input\": \"514 67 260591607\\r\\n\", \"output\": [\"88291586\"]}, {\"input\": \"429 45 103817253\\r\\n\", \"output\": [\"41335161\"]}, {\"input\": \"767 27 364988776\\r\\n\", \"output\": [\"259490746\"]}, {\"input\": \"497 33 479662107\\r\\n\", \"output\": [\"84548778\"]}, {\"input\": \"262 71 404639692\\r\\n\", \"output\": [\"93447345\"]}, {\"input\": \"125 33 152527721\\r\\n\", \"output\": [\"59122415\"]}, {\"input\": \"857 98 70814341\\r\\n\", \"output\": [\"58423075\"]}, {\"input\": \"375 79 416634034\\r\\n\", \"output\": [\"175150318\"]}, {\"input\": \"886 10 902171654\\r\\n\", \"output\": [\"134375492\"]}, {\"input\": \"335 28 979397289\\r\\n\", \"output\": [\"675105408\"]}, {\"input\": \"769 30 474381420\\r\\n\", \"output\": [\"157049322\"]}, {\"input\": \"736 31 26855044\\r\\n\", \"output\": [\"24225276\"]}, {\"input\": \"891 7 814335325\\r\\n\", \"output\": [\"611862019\"]}, {\"input\": \"346 23 947672082\\r\\n\", \"output\": [\"59151110\"]}, {\"input\": \"1000 1 382210711\\r\\n\", \"output\": [\"372462157\"]}, {\"input\": \"1 1 10000\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1000 100 777767777\\r\\n\", \"output\": [\"577920877\"]}, {\"input\": \"1000 13 10619863\\r\\n\", \"output\": [\"8796170\"]}, {\"input\": \"1 100 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 11 11\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '674 22 494819681\\r\\n', 'output': ['19590614']}, {'input': '900 84 526417573\\r\\n', 'output': ['281234824']}, {'input': '767 27 364988776\\r\\n', 'output': ['259490746']}, {'input': '520 94 712232167\\r\\n', 'output': ['199435818']}, {'input': '998 85 501663165\\r\\n', 'output': ['145180249']}]","human_sample_testcases_2":"[{'input': '2 2 1000\\r\\n', 'output': ['45']}, {'input': '1 1 1\\r\\n', 'output': ['0']}, {'input': '20 96 238661639\\r\\n', 'output': ['198761428']}, {'input': '561 69 310141994\\r\\n', 'output': ['245538618']}, {'input': '462 35 144751085\\r\\n', 'output': ['79931198']}]","human_sample_testcases_3":"[{'input': '712 53 592302770\\r\\n', 'output': ['147693148']}, {'input': '561 69 310141994\\r\\n', 'output': ['245538618']}, {'input': '429 45 103817253\\r\\n', 'output': ['41335161']}, {'input': '355 3 945669623\\r\\n', 'output': ['219132384']}, {'input': '20 96 238661639\\r\\n', 'output': ['198761428']}]","human_sample_testcases_4":"[{'input': '510 76 811693420\\r\\n', 'output': ['546301720']}, {'input': '426 72 589297447\\r\\n', 'output': ['316207784']}, {'input': '993 26 108974437\\r\\n', 'output': ['87469631']}, {'input': '1 1 1\\r\\n', 'output': ['0']}, {'input': '712 53 592302770\\r\\n', 'output': ['147693148']}]","human_sample_testcases_5":"[{'input': '170 94 82742818\\r\\n', 'output': ['1117330']}, {'input': '510 76 811693420\\r\\n', 'output': ['546301720']}, {'input': '998 85 501663165\\r\\n', 'output': ['145180249']}, {'input': '905 71 999142682\\r\\n', 'output': ['825882209']}, {'input': '56 48 961996131\\r\\n', 'output': ['199203510']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":320,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"42\", \"5\"]","input_specification":"The only line contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u200910000).","src_uid":"5d4f38ffd1849862623325fdbe06cd00","source_code":"n=int(input())\na=n\/\/3\nb=n%3\nif b==2:\n a=a+1\np=a\/\/12\nq=a%12\nprint(p,q)","sample_outputs":"[\"1 2\", \"0 2\"]","lang_cluster":"Python","notes":null,"output_specification":"Print two non-negative space-separated integers a and b, where a is the numbers of feet and b is the number of inches.","description":"Lengths are measures in Baden in inches and feet. To a length from centimeters it is enough to know that an inch equals three centimeters in Baden and one foot contains 12 inches.You are given a length equal to n centimeters. Your task is to convert it to feet and inches so that the number of feet was maximum. The result should be an integer rounded to the closest value containing an integral number of inches.Note that when you round up, 1 cm rounds up to 0 inches and 2 cm round up to 1 inch.","human_testcases":"[{\"input\": \"42\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"0 2\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"0 8\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"0 0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"0 1\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"0 3\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"0 3\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"0 4\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"0 4\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"2 9\"]}, {\"input\": \"120\\r\\n\", \"output\": [\"3 4\"]}, {\"input\": \"199\\r\\n\", \"output\": [\"5 6\"]}, {\"input\": \"501\\r\\n\", \"output\": [\"13 11\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"27 9\"]}, {\"input\": \"1233\\r\\n\", \"output\": [\"34 3\"]}, {\"input\": \"9876\\r\\n\", \"output\": [\"274 4\"]}, {\"input\": \"9999\\r\\n\", \"output\": [\"277 9\"]}, {\"input\": \"10000\\r\\n\", \"output\": [\"277 9\"]}, {\"input\": \"35\\r\\n\", \"output\": [\"1 0\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"2 0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '199\\r\\n', 'output': ['5 6']}, {'input': '10000\\r\\n', 'output': ['277 9']}, {'input': '1\\r\\n', 'output': ['0 0']}, {'input': '1233\\r\\n', 'output': ['34 3']}, {'input': '120\\r\\n', 'output': ['3 4']}]","human_sample_testcases_2":"[{'input': '1000\\r\\n', 'output': ['27 9']}, {'input': '3\\r\\n', 'output': ['0 1']}, {'input': '1\\r\\n', 'output': ['0 0']}, {'input': '100\\r\\n', 'output': ['2 9']}, {'input': '10\\r\\n', 'output': ['0 3']}]","human_sample_testcases_3":"[{'input': '120\\r\\n', 'output': ['3 4']}, {'input': '501\\r\\n', 'output': ['13 11']}, {'input': '1\\r\\n', 'output': ['0 0']}, {'input': '1233\\r\\n', 'output': ['34 3']}, {'input': '8\\r\\n', 'output': ['0 3']}]","human_sample_testcases_4":"[{'input': '100\\r\\n', 'output': ['2 9']}, {'input': '199\\r\\n', 'output': ['5 6']}, {'input': '3\\r\\n', 'output': ['0 1']}, {'input': '10\\r\\n', 'output': ['0 3']}, {'input': '35\\r\\n', 'output': ['1 0']}]","human_sample_testcases_5":"[{'input': '35\\r\\n', 'output': ['1 0']}, {'input': '10\\r\\n', 'output': ['0 3']}, {'input': '199\\r\\n', 'output': ['5 6']}, {'input': '10000\\r\\n', 'output': ['277 9']}, {'input': '13\\r\\n', 'output': ['0 4']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":50.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":321,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.0,"human_sample_branch_coverage":80.0} {"sample_inputs":"[\"4\", \"5\"]","input_specification":"The single line contains the positive integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091015).","src_uid":"689e7876048ee4eb7479e838c981f068","source_code":"x=int(input())\nif x%2==0:\n\tprint(int(x\/2))\nelse:\n\tprint(-(int(x\/2)+1))","sample_outputs":"[\"2\", \"-3\"]","lang_cluster":"Python","notes":"Notef(4)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u20094\u2009=\u20092f(5)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u20094\u2009-\u20095\u2009=\u2009\u2009-\u20093","output_specification":"Print f(n) in a single line.","description":"For a positive integer n let's define a function f:f(n)\u2009=\u2009\u2009-\u20091\u2009+\u20092\u2009-\u20093\u2009+\u2009..\u2009+\u2009(\u2009-\u20091)nn Your task is to calculate f(n) for a given integer n.","human_testcases":"[{\"input\": \"4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"-3\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"500000000\"]}, {\"input\": \"1000000001\\r\\n\", \"output\": [\"-500000001\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"500000000000000\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"-51\"]}, {\"input\": \"102\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"103\\r\\n\", \"output\": [\"-52\"]}, {\"input\": \"104\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"105\\r\\n\", \"output\": [\"-53\"]}, {\"input\": \"106\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"107\\r\\n\", \"output\": [\"-54\"]}, {\"input\": \"108\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"109\\r\\n\", \"output\": [\"-55\"]}, {\"input\": \"208170109961052\\r\\n\", \"output\": [\"104085054980526\"]}, {\"input\": \"46017661651072\\r\\n\", \"output\": [\"23008830825536\"]}, {\"input\": \"4018154546667\\r\\n\", \"output\": [\"-2009077273334\"]}, {\"input\": \"288565475053\\r\\n\", \"output\": [\"-144282737527\"]}, {\"input\": \"3052460231\\r\\n\", \"output\": [\"-1526230116\"]}, {\"input\": \"29906716\\r\\n\", \"output\": [\"14953358\"]}, {\"input\": \"87897701693326\\r\\n\", \"output\": [\"43948850846663\"]}, {\"input\": \"8240\\r\\n\", \"output\": [\"4120\"]}, {\"input\": \"577935\\r\\n\", \"output\": [\"-288968\"]}, {\"input\": \"62\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9999999999999\\r\\n\", \"output\": [\"-5000000000000\"]}, {\"input\": \"1000000000000\\r\\n\", \"output\": [\"500000000000\"]}, {\"input\": \"99999999999999\\r\\n\", \"output\": [\"-50000000000000\"]}, {\"input\": \"999999999999999\\r\\n\", \"output\": [\"-500000000000000\"]}, {\"input\": \"42191359342\\r\\n\", \"output\": [\"21095679671\"]}, {\"input\": \"100000000000000\\r\\n\", \"output\": [\"50000000000000\"]}, {\"input\": \"145645214654154\\r\\n\", \"output\": [\"72822607327077\"]}, {\"input\": \"4294967296\\r\\n\", \"output\": [\"2147483648\"]}, {\"input\": \"3037000499\\r\\n\", \"output\": [\"-1518500250\"]}, {\"input\": \"10000000000001\\r\\n\", \"output\": [\"-5000000000001\"]}, {\"input\": \"100000017040846\\r\\n\", \"output\": [\"50000008520423\"]}, {\"input\": \"98979894985999\\r\\n\", \"output\": [\"-49489947493000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '101\\r\\n', 'output': ['-51']}, {'input': '100\\r\\n', 'output': ['50']}, {'input': '288565475053\\r\\n', 'output': ['-144282737527']}, {'input': '100000017040846\\r\\n', 'output': ['50000008520423']}, {'input': '145645214654154\\r\\n', 'output': ['72822607327077']}]","human_sample_testcases_2":"[{'input': '1\\r\\n', 'output': ['-1']}, {'input': '999999999999999\\r\\n', 'output': ['-500000000000000']}, {'input': '103\\r\\n', 'output': ['-52']}, {'input': '98979894985999\\r\\n', 'output': ['-49489947493000']}, {'input': '4294967296\\r\\n', 'output': ['2147483648']}]","human_sample_testcases_3":"[{'input': '3052460231\\r\\n', 'output': ['-1526230116']}, {'input': '105\\r\\n', 'output': ['-53']}, {'input': '999999999999999\\r\\n', 'output': ['-500000000000000']}, {'input': '103\\r\\n', 'output': ['-52']}, {'input': '99999999999999\\r\\n', 'output': ['-50000000000000']}]","human_sample_testcases_4":"[{'input': '100000017040846\\r\\n', 'output': ['50000008520423']}, {'input': '101\\r\\n', 'output': ['-51']}, {'input': '1000000000000\\r\\n', 'output': ['500000000000']}, {'input': '103\\r\\n', 'output': ['-52']}, {'input': '107\\r\\n', 'output': ['-54']}]","human_sample_testcases_5":"[{'input': '98979894985999\\r\\n', 'output': ['-49489947493000']}, {'input': '1000000000\\r\\n', 'output': ['500000000']}, {'input': '3037000499\\r\\n', 'output': ['-1518500250']}, {'input': '5\\r\\n', 'output': ['-3']}, {'input': '62\\r\\n', 'output': ['31']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":75.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":322,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"21\", \"20\"]","input_specification":"The first line contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009109).","src_uid":"ae20ae2a16273a0d379932d6e973f878","source_code":"n = int(input())\nm = str(n)\ng = len(m)\nl = [int(m[0])-1]+[9]*(g-1)\nh = 0\nless = 0\nwhile(hv1:\n return v2\n else:\n return v1\n\n\nprint(' '.join(map(str, func(int(input()))))) ","sample_outputs":"[\"9 42\", \"6 6\"]","lang_cluster":"Python","notes":"NoteIn the first sample test, there will be 9 blocks if you choose X\u2009=\u200923 or X\u2009=\u200942. Limak wants to maximize X secondarily so you should choose 42.In more detail, after choosing X\u2009=\u200942 the process of building a tower is: Limak takes a block with side 3 because it's the biggest block with volume not greater than 42. The remaining volume is 42\u2009-\u200927\u2009=\u200915. The second added block has side 2, so the remaining volume is 15\u2009-\u20098\u2009=\u20097. Finally, Limak adds 7 blocks with side 1, one by one. So, there are 9 blocks in the tower. The total volume is is 33\u2009+\u200923\u2009+\u20097\u00b713\u2009=\u200927\u2009+\u20098\u2009+\u20097\u2009=\u200942.","output_specification":"Print two integers\u00a0\u2014 the maximum number of blocks in the tower and the maximum required total volume X, resulting in the maximum number of blocks.","description":"Limak is a little polar bear. He plays by building towers from blocks. Every block is a cube with positive integer length of side. Limak has infinitely many blocks of each side length.A block with side a has volume a3. A tower consisting of blocks with sides a1,\u2009a2,\u2009...,\u2009ak has the total volume a13\u2009+\u2009a23\u2009+\u2009...\u2009+\u2009ak3.Limak is going to build a tower. First, he asks you to tell him a positive integer X\u00a0\u2014 the required total volume of the tower. Then, Limak adds new blocks greedily, one by one. Each time he adds the biggest block such that the total volume doesn't exceed X.Limak asks you to choose X not greater than m. Also, he wants to maximize the number of blocks in the tower at the end (however, he still behaves greedily). Secondarily, he wants to maximize X.Can you help Limak? Find the maximum number of blocks his tower can have and the maximum X\u2009\u2264\u2009m that results this number of blocks.","human_testcases":"[{\"input\": \"48\\r\\n\", \"output\": [\"9 42\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"6 6\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"994\\r\\n\", \"output\": [\"12 941\"]}, {\"input\": \"567000123\\r\\n\", \"output\": [\"16 566998782\"]}, {\"input\": \"123830583943\\r\\n\", \"output\": [\"17 123830561521\"]}, {\"input\": \"3842529393411\\r\\n\", \"output\": [\"17 3842529383076\"]}, {\"input\": \"999999993700000\\r\\n\", \"output\": [\"18 999999993541753\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2 2\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7 7\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"7 7\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"7 7\"]}, {\"input\": \"112\\r\\n\", \"output\": [\"10 106\"]}, {\"input\": \"113\\r\\n\", \"output\": [\"10 113\"]}, {\"input\": \"114\\r\\n\", \"output\": [\"11 114\"]}, {\"input\": \"265\\r\\n\", \"output\": [\"11 212\"]}, {\"input\": \"995\\r\\n\", \"output\": [\"12 995\"]}, {\"input\": \"200385\\r\\n\", \"output\": [\"14 200355\"]}, {\"input\": \"909383000\\r\\n\", \"output\": [\"16 909381874\"]}, {\"input\": \"108000000057\\r\\n\", \"output\": [\"17 107986074062\"]}, {\"input\": \"385925923480002\\r\\n\", \"output\": [\"17 385925923479720\"]}, {\"input\": \"735412349812385\\r\\n\", \"output\": [\"18 735409591249436\"]}, {\"input\": \"980123123123123\\r\\n\", \"output\": [\"18 980123123116482\"]}, {\"input\": \"999088000000000\\r\\n\", \"output\": [\"18 999087986204952\"]}, {\"input\": \"409477218238716\\r\\n\", \"output\": [\"17 409477218238710\"]}, {\"input\": \"409477218238717\\r\\n\", \"output\": [\"17 409477218238717\"]}, {\"input\": \"409477218238718\\r\\n\", \"output\": [\"18 409477218238718\"]}, {\"input\": \"409477218238719\\r\\n\", \"output\": [\"18 409477218238718\"]}, {\"input\": \"419477218238718\\r\\n\", \"output\": [\"18 419466459294818\"]}, {\"input\": \"415000000238718\\r\\n\", \"output\": [\"18 414993991790735\"]}, {\"input\": \"850085504652042\\r\\n\", \"output\": [\"18 850085504652042\"]}, {\"input\": \"850085504652041\\r\\n\", \"output\": [\"18 850085504650655\"]}, {\"input\": \"936302451687000\\r\\n\", \"output\": [\"18 936302448662019\"]}, {\"input\": \"936302451687001\\r\\n\", \"output\": [\"18 936302448662019\"]}, {\"input\": \"936302451686999\\r\\n\", \"output\": [\"18 936302448662019\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"18 999999993541753\"]}, {\"input\": \"780869426483087\\r\\n\", \"output\": [\"18 780869407920631\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"18 999999993541753\"]}, {\"input\": \"990000000000000\\r\\n\", \"output\": [\"18 989983621692990\"]}, {\"input\": \"999998169714888\\r\\n\", \"output\": [\"18 999998150030846\"]}, {\"input\": \"999971000299999\\r\\n\", \"output\": [\"18 999969994441746\"]}, {\"input\": \"999999999999999\\r\\n\", \"output\": [\"18 999999993541753\"]}, {\"input\": \"999986542686123\\r\\n\", \"output\": [\"18 999969994441746\"]}, {\"input\": \"899990298504716\\r\\n\", \"output\": [\"18 899973747835553\"]}, {\"input\": \"409477318238718\\r\\n\", \"output\": [\"18 409477218238718\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '123830583943\\r\\n', 'output': ['17 123830561521']}, {'input': '995\\r\\n', 'output': ['12 995']}, {'input': '114\\r\\n', 'output': ['11 114']}, {'input': '1000000000000000\\r\\n', 'output': ['18 999999993541753']}, {'input': '112\\r\\n', 'output': ['10 106']}]","human_sample_testcases_2":"[{'input': '999998169714888\\r\\n', 'output': ['18 999998150030846']}, {'input': '415000000238718\\r\\n', 'output': ['18 414993991790735']}, {'input': '108000000057\\r\\n', 'output': ['17 107986074062']}, {'input': '990000000000000\\r\\n', 'output': ['18 989983621692990']}, {'input': '114\\r\\n', 'output': ['11 114']}]","human_sample_testcases_3":"[{'input': '108000000057\\r\\n', 'output': ['17 107986074062']}, {'input': '780869426483087\\r\\n', 'output': ['18 780869407920631']}, {'input': '8\\r\\n', 'output': ['7 7']}, {'input': '1000000000000000\\r\\n', 'output': ['18 999999993541753']}, {'input': '114\\r\\n', 'output': ['11 114']}]","human_sample_testcases_4":"[{'input': '909383000\\r\\n', 'output': ['16 909381874']}, {'input': '994\\r\\n', 'output': ['12 941']}, {'input': '567000123\\r\\n', 'output': ['16 566998782']}, {'input': '999998169714888\\r\\n', 'output': ['18 999998150030846']}, {'input': '999999999999999\\r\\n', 'output': ['18 999999993541753']}]","human_sample_testcases_5":"[{'input': '850085504652042\\r\\n', 'output': ['18 850085504652042']}, {'input': '6\\r\\n', 'output': ['6 6']}, {'input': '112\\r\\n', 'output': ['10 106']}, {'input': '999971000299999\\r\\n', 'output': ['18 999969994441746']}, {'input': '567000123\\r\\n', 'output': ['16 566998782']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":324,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 50\\n50\", \"3 100\\n50 50 100\", \"2 50\\n50 50\"]","input_specification":"The first line contains two integers n, k (1\u2009\u2264\u2009n\u2009\u2264\u200950,\u20091\u2009\u2264\u2009k\u2009\u2264\u20095000) \u2014 the number of people, including Greg, and the boat's weight limit. The next line contains n integers \u2014 the people's weights. A person's weight is either 50 kilos or 100 kilos. You can consider Greg and his friends indexed in some way.","src_uid":"ebb0323a854e19794c79ab559792a1f7","source_code":"from collections import deque\n\nn, k = [int(i) for i in input().split()]\na = [int(i) for i in input().split()]\nc50 = sum([1 for i in a if i == 50])\nc100 = sum([1 for i in a if i == 100])\nc = [[0] * 51 for i in range(51)]\nc[0][0] = 1\nc[1][0] = 1\nc[1][1] = 1\nfor x in range(2, 51):\n for y in range(x + 1):\n c[x][y] = c[x - 1][y - 1] + c[x - 1][y]\nd = [[[[0, float('inf')] for l in range(2)] for i in range(c100 + 1)] for j in range(c50 + 1)]\n# d[i][j][c] \u043e\u0442\u0432\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u0435\u0440\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u0438 i \u043f\u043e 50 \u043a\u0433 \u0438 j \u043f\u043e 100 \u043a\u0433 \u0438 \u043b\u043e\u0434\u043a\u0430 \u043d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443 c\nd[0][0][0][0] = 1\nd[0][0][0][1] = 0\nq = deque()\nq.append([0, 0, 0])\nwhile len(q) > 0:\n i, j, shore = q.popleft()\n for fifty in range(c50 - i + 1 if shore == 0 else i + 1):\n for hundreds in range(c100 - j + 1 if shore == 0 else j + 1):\n if fifty * 50 + hundreds * 100 > k or fifty + hundreds == 0:\n continue\n i1 = i + fifty if shore == 0 else i - fifty\n j1 = j + hundreds if shore == 0 else j - hundreds\n if d[i1][j1][1 ^ shore][1] > d[i][j][shore][1] + 1:\n d[i1][j1][1 ^ shore][1] = d[i][j][shore][1] + 1\n d[i1][j1][1 ^ shore][0] = 0\n q.append((i1, j1, 1 ^ shore))\n if d[i1][j1][1 ^ shore][1] < d[i][j][shore][1] + 1:\n continue\n koeff = (c[c50 - i][fifty] if shore == 0 else c[i][fifty]) * (\n c[c100 - j][hundreds] if shore == 0 else c[j][hundreds])\n d[i1][j1][1 ^ shore][0] += d[i][j][shore][0] * koeff\n d[i1][j1][1 ^ shore][0] %= 10 ** 9 + 7\nif d[c50][c100][1][1] == float('inf'):\n print(-1)\n print(0)\nelse:\n print(d[c50][c100][1][1])\n print(d[c50][c100][1][0])\n\n","sample_outputs":"[\"1\\n1\", \"5\\n2\", \"-1\\n0\"]","lang_cluster":"Python","notes":"NoteIn the first test Greg walks alone and consequently, he needs only one ride across the river.In the second test you should follow the plan: transport two 50 kg. people; transport one 50 kg. person back; transport one 100 kg. person; transport one 50 kg. person back; transport two 50 kg. people. That totals to 5 rides. Depending on which person to choose at step 2, we can get two distinct ways.","output_specification":"In the first line print an integer \u2014 the minimum number of rides. If transporting everyone to the other bank is impossible, print an integer -1. In the second line print the remainder after dividing the number of ways to transport the people in the minimum number of rides by number 1000000007 (109\u2009+\u20097). If transporting everyone to the other bank is impossible, print integer 0.","description":"One day Greg and his friends were walking in the forest. Overall there were n people walking, including Greg. Soon he found himself in front of a river. The guys immediately decided to get across the river. Luckily, there was a boat by the river bank, just where the guys were standing. We know that the boat can hold people with the total weight of at most k kilograms.Greg immediately took a piece of paper and listed there the weights of all people in his group (including himself). It turned out that each person weights either 50 or 100 kilograms. Now Greg wants to know what minimum number of times the boat needs to cross the river to transport the whole group to the other bank. The boat needs at least one person to navigate it from one bank to the other. As the boat crosses the river, it can have any non-zero number of passengers as long as their total weight doesn't exceed k.Also Greg is wondering, how many ways there are to transport everybody to the other side in the minimum number of boat rides. Two ways are considered distinct if during some ride they have distinct sets of people on the boat.Help Greg with this problem. ","human_testcases":"[{\"input\": \"1 50\\r\\n50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"3 100\\r\\n50 50 100\\r\\n\", \"output\": [\"5\\r\\n2\"]}, {\"input\": \"2 50\\r\\n50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"5 258\\r\\n100 100 50 50 50\\r\\n\", \"output\": [\"3\\r\\n72\"]}, {\"input\": \"8 191\\r\\n50 100 50 100 50 100 100 50\\r\\n\", \"output\": [\"11\\r\\n19318272\"]}, {\"input\": \"3 121\\r\\n100 100 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"8 271\\r\\n100 50 100 50 50 50 100 50\\r\\n\", \"output\": [\"5\\r\\n78090\"]}, {\"input\": \"2 233\\r\\n50 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"2 153\\r\\n100 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"5 257\\r\\n50 50 50 50 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"49 290\\r\\n100 100 100 100 100 100 100 100 50 100 50 100 100 100 50 50 100 50 50 100 100 100 100 100 100 50 100 100 50 100 50 50 100 100 100 50 50 50 50 50 100 100 100 50 100 50 100 50 50\\r\\n\", \"output\": [\"39\\r\\n99624366\"]}, {\"input\": \"29 129\\r\\n50 50 50 100 100 100 50 100 50 50 50 100 50 100 100 100 50 100 100 100 50 50 50 50 50 50 50 50 50\\r\\n\", \"output\": [\"77\\r\\n37050209\"]}, {\"input\": \"32 121\\r\\n100 100 100 100 100 50 100 100 50 100 50 100 50 100 50 100 50 50 50 100 100 50 100 100 100 100 50 100 50 100 100 50\\r\\n\", \"output\": [\"101\\r\\n245361086\"]}, {\"input\": \"3 118\\r\\n100 100 100\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"10 4894\\r\\n100 50 50 50 100 50 50 100 50 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"36 250\\r\\n50 100 100 50 100 100 100 50 50 100 50 50 50 50 50 50 100 50 100 100 100 100 100 100 100 50 50 100 50 50 100 100 100 100 100 50\\r\\n\", \"output\": [\"27\\r\\n77447096\"]}, {\"input\": \"31 291\\r\\n50 100 100 50 100 100 100 50 100 100 100 100 50 50 50 100 100 100 50 100 100 50 50 50 50 100 100 50 50 100 100\\r\\n\", \"output\": [\"23\\r\\n393964729\"]}, {\"input\": \"31 161\\r\\n100 50 50 50 50 100 50 100 50 100 100 50 50 100 100 50 100 50 50 100 50 100 100 50 50 100 50 50 100 50 100\\r\\n\", \"output\": [\"43\\r\\n670669365\"]}, {\"input\": \"5 123\\r\\n50 100 50 50 50\\r\\n\", \"output\": [\"9\\r\\n4536\"]}, {\"input\": \"43 293\\r\\n50 50 100 100 50 100 100 50 100 100 50 100 50 100 50 50 50 50 50 100 100 100 50 50 100 50 100 100 100 50 100 100 100 50 50 50 100 50 100 100 50 100 50\\r\\n\", \"output\": [\"31\\r\\n658920847\"]}, {\"input\": \"23 100\\r\\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\\r\\n\", \"output\": [\"43\\r\\n689584957\"]}, {\"input\": \"41 218\\r\\n50 50 100 50 100 100 50 100 100 50 50 100 50 50 50 50 100 50 100 50 50 50 100 50 50 50 50 100 100 100 100 100 100 50 100 50 100 100 100 50 50\\r\\n\", \"output\": [\"39\\r\\n298372053\"]}, {\"input\": \"11 4668\\r\\n50 100 100 100 50 100 50 50 100 100 100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"43 178\\r\\n50 50 100 100 100 50 100 100 50 100 100 100 50 100 50 100 50 50 100 100 50 100 100 50 50 50 100 50 50 50 100 50 100 100 100 50 100 50 50 50 50 100 100\\r\\n\", \"output\": [\"63\\r\\n503334985\"]}, {\"input\": \"33 226\\r\\n50 50 50 50 50 100 100 100 100 50 100 50 100 50 100 50 100 100 50 50 50 100 100 50 50 100 50 100 50 100 50 50 50\\r\\n\", \"output\": [\"31\\r\\n370884215\"]}, {\"input\": \"1 2994\\r\\n100\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"1 204\\r\\n50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"33 123\\r\\n50 100 100 100 50 100 50 50 50 50 50 100 100 50 100 50 100 50 50 50 50 50 50 50 100 100 50 50 100 100 100 100 100\\r\\n\", \"output\": [\"93\\r\\n337243149\"]}, {\"input\": \"34 2964\\r\\n50 50 50 50 50 100 50 100 50 100 100 50 50 50 50 50 50 100 100 100 50 50 100 100 50 50 50 100 50 100 100 50 100 50\\r\\n\", \"output\": [\"1\\r\\n1\"]}, {\"input\": \"27 200\\r\\n50 50 50 50 100 100 50 50 100 100 100 50 100 50 100 50 50 100 100 100 50 100 100 50 50 50 100\\r\\n\", \"output\": [\"25\\r\\n271877303\"]}, {\"input\": \"31 197\\r\\n50 100 50 50 100 50 100 100 100 50 50 100 50 100 50 50 50 50 100 100 50 50 100 50 50 50 50 50 100 50 100\\r\\n\", \"output\": [\"41\\r\\n24368657\"]}, {\"input\": \"28 183\\r\\n50 100 100 50 100 50 100 100 50 100 50 100 100 100 50 50 100 50 50 50 100 50 100 50 50 100 100 100\\r\\n\", \"output\": [\"41\\r\\n844409785\"]}, {\"input\": \"48 204\\r\\n100 100 100 50 50 50 50 100 100 50 100 100 50 100 50 50 50 100 100 100 50 100 50 50 50 100 50 100 50 100 100 100 50 50 100 100 100 50 100 50 50 50 50 50 100 50 50 50\\r\\n\", \"output\": [\"45\\r\\n538567333\"]}, {\"input\": \"5 188\\r\\n50 50 50 50 50\\r\\n\", \"output\": [\"3\\r\\n30\"]}, {\"input\": \"29 108\\r\\n100 50 100 100 100 100 100 50 50 100 100 100 50 100 50 50 100 50 100 50 50 100 100 50 50 50 100 100 50\\r\\n\", \"output\": [\"87\\r\\n417423429\"]}, {\"input\": \"50 125\\r\\n50 50 50 100 100 50 100 100 50 50 100 100 100 100 100 100 50 50 100 50 100 100 50 50 50 100 100 50 100 100 100 100 100 100 100 50 50 50 100 50 50 50 50 100 100 100 100 100 50 50\\r\\n\", \"output\": [\"153\\r\\n971933773\"]}, {\"input\": \"50 2263\\r\\n50 100 50 100 50 100 100 100 50 50 50 100 100 100 100 100 100 50 50 100 50 100 50 50 100 50 50 100 100 50 100 100 100 50 50 50 100 50 100 50 50 50 50 50 100 100 50 50 100 50\\r\\n\", \"output\": [\"3\\r\\n211048352\"]}, {\"input\": \"50 110\\r\\n50 100 100 50 50 50 50 50 50 50 100 100 50 100 50 50 50 50 100 50 100 100 100 100 50 100 100 100 100 50 50 50 50 50 100 100 50 100 50 100 100 50 50 100 50 100 50 50 100 100\\r\\n\", \"output\": [\"143\\r\\n105841088\"]}, {\"input\": \"50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n\", \"output\": [\"73\\r\\n930170107\"]}, {\"input\": \"50 207\\r\\n50 100 100 100 100 50 100 100 100 50 100 100 100 50 100 100 50 100 50 100 50 100 100 100 50 100 50 50 100 50 100 100 50 100 100 100 100 50 100 100 100 100 50 50 50 100 100 50 100 100\\r\\n\", \"output\": [\"55\\r\\n833060250\"]}, {\"input\": \"3 49\\r\\n50 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"3 50\\r\\n50 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"3 99\\r\\n100 50 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}, {\"input\": \"4 100\\r\\n100 100 100 50\\r\\n\", \"output\": [\"-1\\r\\n0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '49 290\\r\\n100 100 100 100 100 100 100 100 50 100 50 100 100 100 50 50 100 50 50 100 100 100 100 100 100 50 100 100 50 100 50 50 100 100 100 50 50 50 50 50 100 100 100 50 100 50 100 50 50\\r\\n', 'output': ['39\\r\\n99624366']}, {'input': '11 4668\\r\\n50 100 100 100 50 100 50 50 100 100 100\\r\\n', 'output': ['1\\r\\n1']}, {'input': '36 250\\r\\n50 100 100 50 100 100 100 50 50 100 50 50 50 50 50 50 100 50 100 100 100 100 100 100 100 50 50 100 50 50 100 100 100 100 100 50\\r\\n', 'output': ['27\\r\\n77447096']}, {'input': '31 161\\r\\n100 50 50 50 50 100 50 100 50 100 100 50 50 100 100 50 100 50 50 100 50 100 100 50 50 100 50 50 100 50 100\\r\\n', 'output': ['43\\r\\n670669365']}, {'input': '50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n', 'output': ['73\\r\\n930170107']}]","human_sample_testcases_2":"[{'input': '50 207\\r\\n50 100 100 100 100 50 100 100 100 50 100 100 100 50 100 100 50 100 50 100 50 100 100 100 50 100 50 50 100 50 100 100 50 100 100 100 100 50 100 100 100 100 50 50 50 100 100 50 100 100\\r\\n', 'output': ['55\\r\\n833060250']}, {'input': '3 121\\r\\n100 100 50\\r\\n', 'output': ['-1\\r\\n0']}, {'input': '31 161\\r\\n100 50 50 50 50 100 50 100 50 100 100 50 50 100 100 50 100 50 50 100 50 100 100 50 50 100 50 50 100 50 100\\r\\n', 'output': ['43\\r\\n670669365']}, {'input': '10 4894\\r\\n100 50 50 50 100 50 50 100 50 100\\r\\n', 'output': ['1\\r\\n1']}, {'input': '11 4668\\r\\n50 100 100 100 50 100 50 50 100 100 100\\r\\n', 'output': ['1\\r\\n1']}]","human_sample_testcases_3":"[{'input': '50 2263\\r\\n50 100 50 100 50 100 100 100 50 50 50 100 100 100 100 100 100 50 50 100 50 100 50 50 100 50 50 100 100 50 100 100 100 50 50 50 100 50 100 50 50 50 50 50 100 100 50 50 100 50\\r\\n', 'output': ['3\\r\\n211048352']}, {'input': '5 123\\r\\n50 100 50 50 50\\r\\n', 'output': ['9\\r\\n4536']}, {'input': '8 271\\r\\n100 50 100 50 50 50 100 50\\r\\n', 'output': ['5\\r\\n78090']}, {'input': '27 200\\r\\n50 50 50 50 100 100 50 50 100 100 100 50 100 50 100 50 50 100 100 100 50 100 100 50 50 50 100\\r\\n', 'output': ['25\\r\\n271877303']}, {'input': '41 218\\r\\n50 50 100 50 100 100 50 100 100 50 50 100 50 50 50 50 100 50 100 50 50 50 100 50 50 50 50 100 100 100 100 100 100 50 100 50 100 100 100 50 50\\r\\n', 'output': ['39\\r\\n298372053']}]","human_sample_testcases_4":"[{'input': '29 129\\r\\n50 50 50 100 100 100 50 100 50 50 50 100 50 100 100 100 50 100 100 100 50 50 50 50 50 50 50 50 50\\r\\n', 'output': ['77\\r\\n37050209']}, {'input': '31 161\\r\\n100 50 50 50 50 100 50 100 50 100 100 50 50 100 100 50 100 50 50 100 50 100 100 50 50 100 50 50 100 50 100\\r\\n', 'output': ['43\\r\\n670669365']}, {'input': '33 226\\r\\n50 50 50 50 50 100 100 100 100 50 100 50 100 50 100 50 100 100 50 50 50 100 100 50 50 100 50 100 50 100 50 50 50\\r\\n', 'output': ['31\\r\\n370884215']}, {'input': '50 185\\r\\n100 50 50 50 50 50 100 50 100 50 100 100 50 50 100 100 100 50 50 100 50 100 50 50 100 100 100 100 100 50 50 100 100 100 50 100 50 100 50 50 100 50 100 50 50 100 50 50 100 100\\r\\n', 'output': ['73\\r\\n930170107']}, {'input': '27 200\\r\\n50 50 50 50 100 100 50 50 100 100 100 50 100 50 100 50 50 100 100 100 50 100 100 50 50 50 100\\r\\n', 'output': ['25\\r\\n271877303']}]","human_sample_testcases_5":"[{'input': '43 178\\r\\n50 50 100 100 100 50 100 100 50 100 100 100 50 100 50 100 50 50 100 100 50 100 100 50 50 50 100 50 50 50 100 50 100 100 100 50 100 50 50 50 50 100 100\\r\\n', 'output': ['63\\r\\n503334985']}, {'input': '3 121\\r\\n100 100 50\\r\\n', 'output': ['-1\\r\\n0']}, {'input': '34 2964\\r\\n50 50 50 50 50 100 50 100 50 100 100 50 50 50 50 50 50 100 100 100 50 50 100 100 50 50 50 100 50 100 100 50 100 50\\r\\n', 'output': ['1\\r\\n1']}, {'input': '3 99\\r\\n100 50 50\\r\\n', 'output': ['-1\\r\\n0']}, {'input': '50 125\\r\\n50 50 50 100 100 50 100 100 50 50 100 100 100 100 100 100 50 50 100 50 100 100 50 50 50 100 100 50 100 100 100 100 100 100 100 50 50 50 100 50 50 50 50 100 100 100 100 100 50 50\\r\\n', 'output': ['153\\r\\n971933773']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":94.87,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":94.87,"human_sample_line_coverage_4":94.87,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":96.67,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":96.67,"human_sample_branch_coverage_4":96.67,"human_sample_branch_coverage_5":100.0,"id":325,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.922,"human_sample_branch_coverage":98.002} {"sample_inputs":"[\"1 2 1 2\", \"1 12 1 12\", \"50 100 3 30\"]","input_specification":"The only line contains four integers l,\u2009r,\u2009x,\u2009y (1\u2009\u2264\u2009l\u2009\u2264\u2009r\u2009\u2264\u2009109, 1\u2009\u2264\u2009x\u2009\u2264\u2009y\u2009\u2264\u2009109).","src_uid":"d37dde5841116352c9b37538631d0b15","source_code":"import math\ndef gcd(a, b):\n while b != 0:\n a, b = b, a % b\n return a\n\n\ndef lcm(a, b):\n return a * b \/\/ (gcd(a, b))\n\n\ndef f(d):\n d = str(d)\n if d[len(d) - 2:] == '.0':\n return True\n return False\n\n\nl, r, x, y = [int(i) for i in input().split()]\ncount = 0\nfor c in range(1, int(math.sqrt(y \/ x)) + 1):\n d = (y \/ x) \/ c\n if f(d):\n if l <= c * x and r >= d * x and gcd(c * x, d * x) == x and lcm(c * x, d * x) == y:\n if c != d:\n count += 2\n else:\n count += 1\nprint(count)","sample_outputs":"[\"2\", \"4\", \"0\"]","lang_cluster":"Python","notes":"NoteIn the first example there are two suitable good pairs of integers (a,\u2009b): (1,\u20092) and (2,\u20091).In the second example there are four suitable good pairs of integers (a,\u2009b): (1,\u200912), (12,\u20091), (3,\u20094) and (4,\u20093).In the third example there are good pairs of integers, for example, (3,\u200930), but none of them fits the condition l\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009r.","output_specification":"In the only line print the only integer\u00a0\u2014 the answer for the problem.","description":"Today on Informatics class Nastya learned about GCD and LCM (see links below). Nastya is very intelligent, so she solved all the tasks momentarily and now suggests you to solve one of them as well.We define a pair of integers (a,\u2009b) good, if GCD(a,\u2009b)\u2009=\u2009x and LCM(a,\u2009b)\u2009=\u2009y, where GCD(a,\u2009b) denotes the greatest common divisor of a and b, and LCM(a,\u2009b) denotes the least common multiple of a and b.You are given two integers x and y. You are to find the number of good pairs of integers (a,\u2009b) such that l\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009r. Note that pairs (a,\u2009b) and (b,\u2009a) are considered different if a\u2009\u2260\u2009b.","human_testcases":"[{\"input\": \"1 2 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 12 1 12\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"50 100 3 30\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 1 1000000000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1000000000 158260522 200224287\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 2 755829150\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 1000000000 158260522 158260522\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000 877914575 877914575\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"232 380232688 116 760465376\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"47259 3393570 267 600661890\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"1 1000000000 1 672672000\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"1000000000 1000000000 1000000000 1000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000 1 649209600\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 1000000000 1 682290000\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 1000000000 1 228614400\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 1 800280000\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 1000000000 1 919987200\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 1 456537870\\r\\n\", \"output\": [\"64\"]}, {\"input\": \"1 1000000000 1 7198102\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 1000000000 1 58986263\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 1 316465536\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 1 9558312\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 1 5461344\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"58 308939059 29 617878118\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"837 16262937 27 504151047\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"47275 402550 25 761222050\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"22 944623394 22 944623394\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1032 8756124 12 753026664\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"7238 939389 11 618117962\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"58351 322621 23 818489477\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3450 7068875 25 975504750\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"13266 1606792 22 968895576\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"21930 632925 15 925336350\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"2193 4224517 17 544962693\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"526792 39807152 22904 915564496\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"67728 122875524 16932 491502096\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"319813 63298373 24601 822878849\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"572464 23409136 15472 866138032\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"39443 809059020 19716 777638472\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"2544768 8906688 27072 837228672\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"413592 46975344 21768 892531536\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"11349 816231429 11349 816231429\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"16578 939956022 16578 939956022\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2783175 6882425 21575 887832825\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2862252 7077972 22188 913058388\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1856828 13124976 25436 958123248\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100 1000000000 158260522 158260522\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 1000000000 877914575 877914575\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 1000000000 602436426 602436426\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 1000000000 24979445 24979445\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000 18470 112519240\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 1000000000 22692 2201124\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1000000000 24190 400949250\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 33409 694005157\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1000000000 24967 470827686\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"1 1000000000 35461 152517761\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 1000000000 158260522 200224287\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1000000000 602436426 611751520\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1000000000 861648772 942726551\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1000000000 433933447 485982495\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1000000000 262703497 480832794\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2672374 422235092 1336187 844470184\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1321815 935845020 1321815 935845020\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"29259607 69772909 2250739 907047817\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11678540 172842392 2335708 864211960\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"297 173688298 2876112 851329152\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7249 55497026 659 610467286\\r\\n\", \"output\": [\"28\"]}, {\"input\": \"398520 1481490 810 728893080\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2354 369467362 1177 738934724\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"407264 2497352 1144 889057312\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"321399 1651014 603 879990462\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"475640 486640 440 526057840\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"631714 179724831 1136 717625968\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"280476 1595832 588 761211864\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"10455 39598005 615 673166085\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"24725 19759875 575 849674625\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"22 158 2 1738\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 2623 1 2623\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"7 163677675 3 18\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"159 20749927 1 158\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5252 477594071 1 5251\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2202 449433679 3 6603\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 111 3 222\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"26 46 2 598\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"26 82 2 1066\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 2993 1 2993\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"17 17 1 289\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"177 267 3 15753\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7388 22705183 1 7387\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100 3 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000 6 1024\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100 2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 10000 2 455\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 250000000 1000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 3 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 100000000 1000000000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 10 3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000 5 13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2 3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 499999993 999999986\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1 1 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10 10 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000 4 36\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 1000000000 10000000 20000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 100 5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 3 3 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"36 200 24 144\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 100 3 10\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1000000000 24967 470827686\\r\\n', 'output': ['16']}, {'input': '29259607 69772909 2250739 907047817\\r\\n', 'output': ['2']}, {'input': '100 1000000000 877914575 877914575\\r\\n', 'output': ['1']}, {'input': '6 111 3 222\\r\\n', 'output': ['2']}, {'input': '5 10 3 3\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '1 2993 1 2993\\r\\n', 'output': ['4']}, {'input': '1 1000000000 100000000 1000000000\\r\\n', 'output': ['4']}, {'input': '1 100 2 4\\r\\n', 'output': ['2']}, {'input': '3 3 3 9\\r\\n', 'output': ['0']}, {'input': '2672374 422235092 1336187 844470184\\r\\n', 'output': ['2']}]","human_sample_testcases_3":"[{'input': '29259607 69772909 2250739 907047817\\r\\n', 'output': ['2']}, {'input': '1 1000000000 33409 694005157\\r\\n', 'output': ['2']}, {'input': '1 1000000000 24190 400949250\\r\\n', 'output': ['16']}, {'input': '1032 8756124 12 753026664\\r\\n', 'output': ['18']}, {'input': '5 10 3 3\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '13266 1606792 22 968895576\\r\\n', 'output': ['14']}, {'input': '6 111 3 222\\r\\n', 'output': ['2']}, {'input': '1 2993 1 2993\\r\\n', 'output': ['4']}, {'input': '47259 3393570 267 600661890\\r\\n', 'output': ['30']}, {'input': '26 82 2 1066\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '2672374 422235092 1336187 844470184\\r\\n', 'output': ['2']}, {'input': '1 1000000000 1 7198102\\r\\n', 'output': ['8']}, {'input': '1 10000 2 455\\r\\n', 'output': ['0']}, {'input': '1 1000000000 499999993 999999986\\r\\n', 'output': ['2']}, {'input': '398520 1481490 810 728893080\\r\\n', 'output': ['4']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":95.45,"human_sample_line_coverage_3":95.45,"human_sample_line_coverage_4":95.45,"human_sample_line_coverage_5":95.45,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":92.86,"human_sample_branch_coverage_3":92.86,"human_sample_branch_coverage_4":92.86,"human_sample_branch_coverage_5":92.86,"id":326,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.36,"human_sample_branch_coverage":94.288} {"sample_inputs":"[\"5 2 2\", \"5 4 7\", \"6 2 3\"]","input_specification":"The single line contains three integers T,\u2009S,\u2009q (2\u2009\u2264\u2009q\u2009\u2264\u2009104, 1\u2009\u2264\u2009S\u2009<\u2009T\u2009\u2264\u2009105).","src_uid":"0d01bf286fb2c7950ce5d5fa59a17dd9","source_code":"t,s,q=map(int,input().split())\nres=0\nwhile s m:\n print('NO')\nelse:\n print('YES')","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Python","notes":"NoteIn the first sample Kefa can give 1-st and 3-rd baloon to the first friend, and 2-nd and 4-th to the second.In the second sample Kefa needs to give to all his friends baloons of color a, but one baloon will stay, thats why answer is \u00abNO\u00bb.","output_specification":"Answer to the task \u2014 \u00abYES\u00bb or \u00abNO\u00bb in a single line. You can choose the case (lower or upper) for each letter arbitrary.","description":"One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si \u2014 lowercase letter of the Latin alphabet. Also Kefa has k friends. Friend will be upset, If he get two baloons of the same color. Kefa want to give out all baloons to his friends. Help Kefa to find out, can he give out all his baloons, such that no one of his friens will be upset \u2014 print \u00abYES\u00bb, if he can, and \u00abNO\u00bb, otherwise. Note, that Kefa's friend will not upset, if he doesn't get baloons at all.","human_testcases":"[{\"input\": \"4 2\\r\\naabb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 3\\r\\naacaab\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 2\\r\\nlu\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 3\\r\\novvoo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"36 13\\r\\nbzbzcffczzcbcbzzfzbbfzfzzbfbbcbfccbf\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"81 3\\r\\nooycgmvvrophvcvpoupepqllqttwcocuilvyxbyumdmmfapvpnxhjhxfuagpnntonibicaqjvwfhwxhbv\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 100\\r\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 1\\r\\nnubcvvjvbjgnjsdkajimdcxvewbcytvfkihunycdrlconddlwgzjasjlsrttlrzsumzpyumpveglfqzmaofbshbojmwuwoxxvrod\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 13\\r\\nvyldolgryldqrvoldvzvrdrgorlorszddtgqvrlisxxrxdxlqtvtgsrqlzixoyrozxzogqxlsgzdddzqrgitxxritoolzolgrtvl\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"18 6\\r\\njzwtnkvmscqhmdlsxy\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"21 2\\r\\nfscegcqgzesefghhwcexs\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"32 22\\r\\ncduamsptaklqtxlyoutlzepxgyfkvngc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"49 27\\r\\noxyorfnkzwsfllnyvdhdanppuzrnbxehugvmlkgeymqjlmfxd\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"50 24\\r\\nxxutzjwbggcwvxztttkmzovtmuwttzcbwoztttohzzxghuuthv\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"57 35\\r\\nglxshztrqqfyxthqamagvtmrdparhelnzrqvcwqxjytkbuitovkdxueul\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"75 23\\r\\nittttiiuitutuiiuuututiuttiuiuutuuuiuiuuuuttuuttuutuiiuiuiiuiitttuututuiuuii\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"81 66\\r\\nfeqevfqfebhvubhuuvfuqheuqhbeeuebehuvhffvbqvqvfbqqvvhevqffbqqhvvqhfeehuhqeqhueuqqq\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"93 42\\r\\npqeiafraiavfcteumflpcbpozcomlvpovlzdbldvoopnhdoeqaopzthiuzbzmeieiatthdeqovaqfipqlddllmfcrrnhb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 53\\r\\nizszyqyndzwzyzgsdagdwdazadiawizinagqqgczaqqnawgijziziawzszdjdcqjdjqiwgadydcnqisaayjiqqsscwwzjzaycwwc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 14\\r\\nvkrdcqbvkwuckpmnbydmczdxoagdsgtqxvhaxntdcxhjcrjyvukhugoglbmyoaqexgtcfdgemmizoniwtmisqqwcwfusmygollab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 42\\r\\naaaaaiiiiaiiiaaiaiiaaiiiiiaaaaaiaiiiaiiiiaiiiaaaaaiiiaaaiiaaiiiaiiiaiaaaiaiiiiaaiiiaiiaiaiiaiiiaaaia\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 89\\r\\ntjbkmydejporbqhcbztkcumxjjgsrvxpuulbhzeeckkbchpbxwhedrlhjsabcexcohgdzouvsgphjdthpuqrlkgzxvqbuhqxdsmf\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\njhpyiuuzizhubhhpxbbhpyxzhbpjphzppuhiahihiappbhuypyauhizpbibzixjbzxzpbphuiaypyujappuxiyuyaajaxjupbahb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 3\\r\\nsszoovvzysavsvzsozzvoozvysozsaszayaszasaysszzzysosyayyvzozovavzoyavsooaoyvoozvvozsaosvayyovazzszzssa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 44\\r\\ndluthkxwnorabqsukgnxnvhmsmzilyulpursnxkdsavgemiuizbyzebhyjejgqrvuckhaqtuvdmpziesmpmewpvozdanjyvwcdgo\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 90\\r\\ntljonbnwnqounictqqctgonktiqoqlocgoblngijqokuquoolciqwnctgoggcbojtwjlculoikbggquqncittwnjbkgkgubnioib\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 79\\r\\nykxptzgvbqxlregvkvucewtydvnhqhuggdsyqlvcfiuaiddnrrnstityyehiamrggftsqyduwxpuldztyzgmfkehprrneyvtknmf\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 79\\r\\naagwekyovbviiqeuakbqbqifwavkfkutoriovgfmittulhwojaptacekdirgqoovlleeoqkkdukpadygfwavppohgdrmymmulgci\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 93\\r\\nearrehrehenaddhdnrdddhdahnadndheeennrearrhraharddreaeraddhehhhrdnredanndneheddrraaneerreedhnadnerhdn\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 48\\r\\nbmmaebaebmmmbbmxvmammbvvebvaemvbbaxvbvmaxvvmveaxmbbxaaemxmxvxxxvxbmmxaaaevvaxmvamvvmaxaxavexbmmbmmev\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 55\\r\\nhsavbkehaaesffaeeffakhkhfehbbvbeasahbbbvkesbfvkefeesesevbsvfkbffakvshsbkahfkfakebsvafkbvsskfhfvaasss\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 2\\r\\ncscffcffsccffsfsfffccssfsscfsfsssffcffsscfccssfffcfscfsscsccccfsssffffcfcfsfffcsfsccffscffcfccccfffs\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 3\\r\\nzrgznxgdpgfoiifrrrsjfuhvtqxjlgochhyemismjnanfvvpzzvsgajcbsulxyeoepjfwvhkqogiiwqxjkrpsyaqdlwffoockxnc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 5\\r\\njbltyyfjakrjeodqepxpkjideulofbhqzxjwlarufwzwsoxhaexpydpqjvhybmvjvntuvhvflokhshpicbnfgsqsmrkrfzcrswwi\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 1\\r\\nfnslnqktlbmxqpvcvnemxcutebdwepoxikifkzaaixzzydffpdxodmsxjribmxuqhueifdlwzytxkklwhljswqvlejedyrgguvah\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 21\\r\\nddjenetwgwmdtjbpzssyoqrtirvoygkjlqhhdcjgeurqpunxpupwaepcqkbjjfhnvgpyqnozhhrmhfwararmlcvpgtnopvjqsrka\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\nnjrhiauqlgkkpkuvciwzivjbbplipvhslqgdkfnmqrxuxnycmpheenmnrglotzuyxycosfediqcuadklsnzjqzfxnbjwvfljnlvq\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\nbbbbbbbtbbttbtbbbttbttbtbbttttbbbtbttbbbtbttbtbbttttbbbbbtbbttbtbbtbttbbbtbtbtbtbtbtbbbttbbtbtbtbbtb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14 5\\r\\nfssmmsfffmfmmm\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1\\r\\nff\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1\\r\\nhw\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 2\\r\\nss\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\nl\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 50\\r\\nfffffttttttjjjuuuvvvvvdddxxxxwwwwgggbsssncccczzyyyyyhhhhhkrreeeeeeaaaaaiiillllllllooooqqqqqqmmpppppp\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 50\\r\\nbbbbbbbbgggggggggggaaaaaaaahhhhhhhhhhpppppppppsssssssrrrrrrrrllzzzzzzzeeeeeeekkkkkkkwwwwwwwwjjjjjjjj\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 50\\r\\nwwwwwwwwwwwwwwxxxxxxxxxxxxxxxxxxxxxxxxzzzzzzzzzzzzzzzzzzbbbbbbbbbbbbbbbbbbbbjjjjjjjjjjjjjjjjjjjjjjjj\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 80\\r\\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 10\\r\\nbbttthhhhiiiiiiijjjjjvvvvpppssssseeeeeeewwwwgggkkkkkkkkmmmddddduuuzzzzllllnnnnnxxyyyffffccraaaaooooq\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 20\\r\\nssssssssssbbbbbbbhhhhhhhyyyyyyyzzzzzzzzzzzzcccccxxxxxxxxxxddddmmmmmmmeeeeeeejjjjjjjjjwwwwwwwtttttttt\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\na\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1\\r\\nabb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1\\r\\naa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 1\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 2\\r\\naaaaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"8 4\\r\\naaaaaaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\naaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 3\\r\\naaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\na\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 3\\r\\nzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 1\\r\\naaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 4\\r\\nabc\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 5\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 4\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 10\\r\\na\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 2\\r\\nzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"53 26\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 1\\r\\nabab\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 1\\r\\nabcb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\nabbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 2\\r\\nabccc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3\\r\\nab\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 3\\r\\nbbbs\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 2\\r\\nazzzzzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2\\r\\nb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\nb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 5\\r\\nabcd\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 6\\r\\naabb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 2\\r\\naaaab\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 5\\r\\naaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 3\\r\\nazzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 100\\r\\naabb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 10\\r\\naaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 4\\r\\naaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12 5\\r\\naaaaabbbbbbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 2\\r\\naabbb\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 5\\r\\nzzzzzzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4\\r\\naa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 5\\r\\na\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 5\\r\\naaaaaaaaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 3\\r\\naaaaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7 1\\r\\nabcdeee\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"18 3\\r\\naaaaaabbbbbbcccccc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"8 2\\r\\naabbccdd\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 2\\r\\nzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\nabaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 2\\r\\naaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 1\\r\\nzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 4\\r\\nzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 2\\r\\naabbbc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 6\\r\\naaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 1\\r\\nzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10 3\\r\\naaaeeeeeee\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 5\\r\\naabb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1\\r\\naaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 2\\r\\naazzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 2\\r\\nabbbbc\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 2\\r\\nxxxx\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 3\\r\\nzzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 2\\r\\nabb\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 2\\r\\nzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 5\\r\\nzzzzzz\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 3\\r\\nbcaaaa\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"100 100\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 6\\r\\nabc\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 2\\r\\nzzzzz\\r\\n', 'output': ['NO']}, {'input': '1 3\\r\\na\\r\\n', 'output': ['YES']}, {'input': '75 23\\r\\nittttiiuitutuiiuuututiuttiuiuutuuuiuiuuuuttuuttuutuiiuiuiiuiitttuututuiuuii\\r\\n', 'output': ['NO']}, {'input': '3 6\\r\\naaa\\r\\n', 'output': ['YES']}, {'input': '1 10\\r\\na\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '49 27\\r\\noxyorfnkzwsfllnyvdhdanppuzrnbxehugvmlkgeymqjlmfxd\\r\\n', 'output': ['YES']}, {'input': '100 100\\r\\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\\r\\n', 'output': ['YES']}, {'input': '53 26\\r\\naaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbb\\r\\n', 'output': ['NO']}, {'input': '4 1\\r\\nabcb\\r\\n', 'output': ['NO']}, {'input': '5 2\\r\\nabccc\\r\\n', 'output': ['NO']}]","human_sample_testcases_3":"[{'input': '3 6\\r\\naaa\\r\\n', 'output': ['YES']}, {'input': '7 1\\r\\nabcdeee\\r\\n', 'output': ['NO']}, {'input': '2 1\\r\\nhw\\r\\n', 'output': ['YES']}, {'input': '8 4\\r\\naaaaaaaa\\r\\n', 'output': ['NO']}, {'input': '100 100\\r\\nbbbbbbbtbbttbtbbbttbttbtbbttttbbbtbttbbbtbttbtbbttttbbbbbtbbttbtbbtbttbbbtbtbtbtbtbtbbbttbbtbtbtbbtb\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '100 50\\r\\nfffffttttttjjjuuuvvvvvdddxxxxwwwwgggbsssncccczzyyyyyhhhhhkrreeeeeeaaaaaiiillllllllooooqqqqqqmmpppppp\\r\\n', 'output': ['YES']}, {'input': '100 100\\r\\nbbbbbbbtbbttbtbbbttbttbtbbttttbbbtbttbbbtbttbtbbttttbbbbbtbbttbtbbtbttbbbtbtbtbtbtbtbbbttbbtbtbtbbtb\\r\\n', 'output': ['YES']}, {'input': '4 1\\r\\nabab\\r\\n', 'output': ['NO']}, {'input': '100 48\\r\\nbmmaebaebmmmbbmxvmammbvvebvaemvbbaxvbvmaxvvmveaxmbbxaaemxmxvxxxvxbmmxaaaevvaxmvamvvmaxaxavexbmmbmmev\\r\\n', 'output': ['YES']}, {'input': '4 1\\r\\naaaa\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '6 2\\r\\naabbbc\\r\\n', 'output': ['NO']}, {'input': '3 2\\r\\naaa\\r\\n', 'output': ['NO']}, {'input': '4 6\\r\\naabb\\r\\n', 'output': ['YES']}, {'input': '32 22\\r\\ncduamsptaklqtxlyoutlzepxgyfkvngc\\r\\n', 'output': ['YES']}, {'input': '1 2\\r\\na\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":334,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6\\n4 1 7 8 3 8\\n1\"]","input_specification":"The first line of the input contains integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100), where n \u2014 the number of students shouted \"Fly, freebie, fly!\" The second line contains n positive integers ti (1\u2009\u2264\u2009ti\u2009\u2264\u20091000). The last line contains integer T (1\u2009\u2264\u2009T\u2009\u2264\u20091000) \u2014 the time interval during which the freebie was near the dormitory.","src_uid":"086d07bd6f9031df09bd6a6e8fe8f25c","source_code":"n, t = input(), [0] * 1002\nfor i in map(int, input().split()): t[i] += 1\nT = int(input()) + 1\nfor i in range(1000): t[i + 1] += t[i]\nprint(max(t[i + T] - t[i] for i in range(-1, 1001 - T)))","sample_outputs":"[\"3\"]","lang_cluster":"Python","notes":null,"output_specification":"Print a single integer \u2014 the largest number of people who will pass exam tomorrow because of the freebie visit.","description":"Everyone loves a freebie. Especially students.It is well-known that if in the night before exam a student opens window, opens the student's record-book and shouts loudly three times \"Fly, freebie, fly!\" \u2014 then flown freebie helps him to pass the upcoming exam.In the night before the exam on mathematical analysis n students living in dormitory shouted treasured words. The i-th student made a sacrament at the time ti, where ti is the number of seconds elapsed since the beginning of the night.It is known that the freebie is a capricious and willful lady. That night the freebie was near dormitory only for T seconds. Therefore, if for two students their sacrament times differ for more than T, then the freebie didn't visit at least one of them.Since all students are optimists, they really want to know what is the maximal number of students visited by the freebie can be.","human_testcases":"[{\"input\": \"6\\r\\n4 1 7 8 3 8\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n4 2 1 5\\r\\n2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n4 7 1 3 8 5 2 1 8 4\\r\\n3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8\\r\\n39 49 37 28 40 17 50 2\\r\\n10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n1 1\\r\\n1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n1 1\\r\\n2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n1 1\\r\\n1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n1 2\\r\\n2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n450 826\\r\\n1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n3 1 1\\r\\n1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n3 1 2\\r\\n2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n3 4 3\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n3 4 3\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n63 69 36 40 74 31 86 42 81 95 60 55 98 98 2 16 84 37 61 47 81 91 85 62 85 32 79 74 65 48 39 60 97 90 59 76 98 73 58 5 16 54 59 42 9 27 95 24 9 6 42 49 64 61 22 27 43 60 39 87 99 57 5 62 48 67 81 36 27 87 41 88 5 33 43 81 82 65 46 52 43 68 85 75 81 99 30 56 67 55 92 4 3 3 66 32 30 45 22 88\\r\\n5\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100\\r\\n97 29 39 42 68 100 44 54 6 70 17 100 52 85 67 1 43 49 1 47 98 35 5 38 37 73 84 20 13 15 78 65 29 92 20 40 38 11 12 100 24 94 29 92 83 47 25 63 23 85 85 93 61 60 35 40 96 50 19 15 28 19 98 59 42 14 54 65 2 53 38 9 15 69 43 63 63 8 55 12 81 57 69 21 57 11 99 45 23 31 59 2 16 61 43 36 12 39 42 13\\r\\n50\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"100\\r\\n31 1 56 82 96 98 25 41 74 73 8 66 95 50 89 77 98 12 69 45 6 10 48 59 1 77 15 77 9 52 66 8 6 71 39 3 58 73 66 45 8 22 67 83 58 6 96 79 46 43 44 90 13 67 56 32 83 96 93 22 49 10 100 79 99 41 13 71 42 96 89 10 84 95 89 7 18 49 16 54 61 35 25 71 26 68 22 40 68 19 30 51 18 20 12 61 11 23 86 72\\r\\n1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100\\r\\n30 74 20 6 3 63 48 45 36 26 33 24 60 71 45 5 19 37 74 100 98 82 67 76 37 46 68 48 56 29 33 19 15 84 76 92 50 53 42 19 5 91 23 38 93 50 39 45 89 17 57 14 86 81 31 6 16 5 80 6 86 49 18 75 30 30 85 94 38 33 50 76 72 32 73 96 28 3 18 20 96 84 89 48 71 64 6 59 87 31 94 24 9 64 15 86 66 11 32 40\\r\\n90\\r\\n\", \"output\": [\"94\"]}, {\"input\": \"100\\r\\n398 82 739 637 913 962 680 125 963 931 311 680 20 530 795 126 881 666 226 323 594 416 176 6 820 317 866 723 831 432 139 706 608 218 963 550 592 544 874 927 763 468 121 424 91 956 42 442 883 66 299 654 964 730 160 615 515 255 709 278 224 223 304 292 41 450 445 556 477 327 647 518 90 470 894 837 655 495 612 113 746 610 751 486 116 933 314 348 736 58 219 429 976 773 678 642 696 522 161 422\\r\\n1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100\\r\\n760 621 622 793 66 684 411 813 474 404 304 934 319 411 99 965 722 156 681 400 481 462 571 726 696 244 124 350 403 566 564 641 381 494 703 3 348 213 343 390 27 660 46 591 990 931 477 823 890 21 936 267 282 753 599 269 387 443 622 673 473 745 646 224 911 7 155 880 332 932 51 994 144 666 789 691 323 738 192 372 191 246 903 666 929 252 132 614 11 938 298 286 309 596 210 18 143 760 759 584\\r\\n10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100\\r\\n923 357 749 109 685 126 961 437 859 91 985 488 644 777 950 144 479 667 1 535 475 38 843 606 672 333 798 42 595 854 410 914 934 586 329 595 861 321 603 924 434 636 475 395 619 449 336 790 279 931 605 898 276 47 537 935 508 576 168 465 115 884 960 593 883 581 468 426 848 289 525 309 589 106 924 238 829 975 897 373 650 41 952 621 817 46 366 488 924 561 960 449 311 32 517 737 20 765 799 3\\r\\n100\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"100\\r\\n98 63 672 100 254 218 623 415 426 986 920 915 736 795 407 541 382 213 935 743 961 59 660 512 134 935 248 378 739 356 543 714 28 667 602 596 759 791 103 564 225 520 159 542 966 332 983 655 517 273 95 242 593 940 286 236 41 318 941 727 384 225 319 627 982 359 232 769 854 172 643 598 215 231 305 30 347 469 929 919 90 294 739 641 368 270 932 452 234 741 309 234 357 392 707 873 808 398 417 483\\r\\n1000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n2 1 1 1 2 2 2 2 2 2 1 1 1 1 2 2 1 1 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 2 1 1 1 2 2 2 1 1 2 2 1 2 2 2 1 2 2 1 2 2\\r\\n1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n3 3 1 2 3 3 1 3 3 2 2 2 2 1 2 3 2 1 2 2 2 2 3 2 1 3 3 3 2 1 3 1 2 1 1 2 2 3 2 2 3 1 1 3 1 2 1 3 3 1 1 3 1 3 2 3 3 2 2 2 2 1 1 1 2 1 1 2 1 1 1 1 1 3 2 2 1 3 1 1 3 1 2 2 1 3 1 1 1 1 2 2 2 3 2 2 3 1 1 3\\r\\n1\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"100\\r\\n2 1 3 4 1 1 4 1 3 2 1 4 4 4 4 4 3 2 1 1 2 2 1 3 3 1 1 1 2 3 4 3 1 1 1 4 2 2 2 2 4 1 2 4 2 2 4 3 3 4 1 2 4 1 3 4 1 2 1 2 1 3 3 2 1 1 4 2 1 3 3 2 3 4 1 2 2 4 2 1 4 3 4 3 1 4 3 1 2 3 3 3 2 4 1 1 4 1 2 3\\r\\n1\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"100\\r\\n5 1 3 1 2 3 2 5 5 2 5 1 1 4 1 1 3 5 3 3 3 3 4 4 3 5 4 1 1 3 1 4 2 5 2 5 4 2 3 5 1 3 5 5 5 2 2 5 1 4 1 5 1 5 1 3 3 2 2 4 3 2 1 4 2 5 4 1 2 1 4 3 3 5 4 3 5 5 1 2 4 1 4 2 1 1 2 5 3 3 4 1 3 3 3 5 4 1 1 1\\r\\n1\\r\\n\", \"output\": [\"41\"]}, {\"input\": \"100\\r\\n1 7 8 10 9 4 2 1 6 5 10 6 3 1 10 1 8 4 3 1 7 4 3 7 4 9 1 3 3 5 10 3 7 10 10 10 3 6 2 8 1 3 3 6 2 8 3 7 8 3 4 1 6 4 4 2 10 6 2 10 10 1 7 8 8 1 9 8 7 8 5 2 5 9 2 5 7 10 3 9 8 3 9 4 3 8 6 8 2 8 9 6 7 10 7 9 6 4 4 8\\r\\n1\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n1\\r\\n1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n849\\r\\n1\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1\\r\\n849\\r\\n1\\r\\n', 'output': ['1']}, {'input': '3\\r\\n3 1 1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '100\\r\\n923 357 749 109 685 126 961 437 859 91 985 488 644 777 950 144 479 667 1 535 475 38 843 606 672 333 798 42 595 854 410 914 934 586 329 595 861 321 603 924 434 636 475 395 619 449 336 790 279 931 605 898 276 47 537 935 508 576 168 465 115 884 960 593 883 581 468 426 848 289 525 309 589 106 924 238 829 975 897 373 650 41 952 621 817 46 366 488 924 561 960 449 311 32 517 737 20 765 799 3\\r\\n100\\r\\n', 'output': ['18']}, {'input': '100\\r\\n1 7 8 10 9 4 2 1 6 5 10 6 3 1 10 1 8 4 3 1 7 4 3 7 4 9 1 3 3 5 10 3 7 10 10 10 3 6 2 8 1 3 3 6 2 8 3 7 8 3 4 1 6 4 4 2 10 6 2 10 10 1 7 8 8 1 9 8 7 8 5 2 5 9 2 5 7 10 3 9 8 3 9 4 3 8 6 8 2 8 9 6 7 10 7 9 6 4 4 8\\r\\n1\\r\\n', 'output': ['24']}, {'input': '3\\r\\n3 4 3\\r\\n1\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '2\\r\\n1 1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '100\\r\\n30 74 20 6 3 63 48 45 36 26 33 24 60 71 45 5 19 37 74 100 98 82 67 76 37 46 68 48 56 29 33 19 15 84 76 92 50 53 42 19 5 91 23 38 93 50 39 45 89 17 57 14 86 81 31 6 16 5 80 6 86 49 18 75 30 30 85 94 38 33 50 76 72 32 73 96 28 3 18 20 96 84 89 48 71 64 6 59 87 31 94 24 9 64 15 86 66 11 32 40\\r\\n90\\r\\n', 'output': ['94']}, {'input': '3\\r\\n3 1 1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '100\\r\\n2 1 1 1 2 2 2 2 2 2 1 1 1 1 2 2 1 1 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 2 1 1 1 2 2 2 1 1 2 2 1 2 2 2 1 2 2 1 2 2\\r\\n1\\r\\n', 'output': ['100']}, {'input': '3\\r\\n3 4 3\\r\\n1\\r\\n', 'output': ['3']}]","human_sample_testcases_3":"[{'input': '6\\r\\n4 1 7 8 3 8\\r\\n1\\r\\n', 'output': ['3']}, {'input': '100\\r\\n2 1 1 1 2 2 2 2 2 2 1 1 1 1 2 2 1 1 1 2 2 1 1 1 1 2 1 2 1 2 1 2 1 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 1 2 1 1 1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1 2 1 1 2 2 1 2 2 1 1 1 2 2 2 1 1 2 2 1 2 2 2 1 2 2 1 2 2\\r\\n1\\r\\n', 'output': ['100']}, {'input': '100\\r\\n30 74 20 6 3 63 48 45 36 26 33 24 60 71 45 5 19 37 74 100 98 82 67 76 37 46 68 48 56 29 33 19 15 84 76 92 50 53 42 19 5 91 23 38 93 50 39 45 89 17 57 14 86 81 31 6 16 5 80 6 86 49 18 75 30 30 85 94 38 33 50 76 72 32 73 96 28 3 18 20 96 84 89 48 71 64 6 59 87 31 94 24 9 64 15 86 66 11 32 40\\r\\n90\\r\\n', 'output': ['94']}, {'input': '1\\r\\n1\\r\\n1000\\r\\n', 'output': ['1']}, {'input': '2\\r\\n1 2\\r\\n2\\r\\n', 'output': ['2']}]","human_sample_testcases_4":"[{'input': '2\\r\\n450 826\\r\\n1000\\r\\n', 'output': ['2']}, {'input': '2\\r\\n1 1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '8\\r\\n39 49 37 28 40 17 50 2\\r\\n10\\r\\n', 'output': ['3']}, {'input': '3\\r\\n3 4 3\\r\\n1\\r\\n', 'output': ['3']}, {'input': '2\\r\\n1 1\\r\\n2\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '100\\r\\n923 357 749 109 685 126 961 437 859 91 985 488 644 777 950 144 479 667 1 535 475 38 843 606 672 333 798 42 595 854 410 914 934 586 329 595 861 321 603 924 434 636 475 395 619 449 336 790 279 931 605 898 276 47 537 935 508 576 168 465 115 884 960 593 883 581 468 426 848 289 525 309 589 106 924 238 829 975 897 373 650 41 952 621 817 46 366 488 924 561 960 449 311 32 517 737 20 765 799 3\\r\\n100\\r\\n', 'output': ['18']}, {'input': '100\\r\\n760 621 622 793 66 684 411 813 474 404 304 934 319 411 99 965 722 156 681 400 481 462 571 726 696 244 124 350 403 566 564 641 381 494 703 3 348 213 343 390 27 660 46 591 990 931 477 823 890 21 936 267 282 753 599 269 387 443 622 673 473 745 646 224 911 7 155 880 332 932 51 994 144 666 789 691 323 738 192 372 191 246 903 666 929 252 132 614 11 938 298 286 309 596 210 18 143 760 759 584\\r\\n10\\r\\n', 'output': ['6']}, {'input': '2\\r\\n1 1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '3\\r\\n3 4 3\\r\\n1\\r\\n', 'output': ['3']}, {'input': '3\\r\\n3 1 1\\r\\n1\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":335,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"60 60 45 55\\n80 80 8 32\", \"60 60 45 55\\n80 60 15 25\", \"50 50 35 45\\n90 50 35 45\"]","input_specification":"The input contains two lines. Each line has four space-separated integers xi, yi, ri, Ri, that describe the i-th ring; xi and yi are coordinates of the ring's center, ri and Ri are the internal and external radii of the ring correspondingly (\u2009-\u2009100\u2009\u2264\u2009xi,\u2009yi\u2009\u2264\u2009100;\u00a01\u2009\u2264\u2009ri\u2009<\u2009Ri\u2009\u2264\u2009100). It is guaranteed that the centers of the rings do not coinside.","src_uid":"4c2865e4742a29460ca64860740b84f4","source_code":"def is_intersect(r1, r2, R, x1, y1, x2, y2):\n d = (x1 - x2)**2 + (y1 - y2)**2\n return d >= (r1 + R)**2 or r1 < r2 and d <= (r2 - r1)**2 or R < r1 and d <= (r1 - R)**2\n\nx1, y1, r1, R1 = map(int, input().split())\nx2, y2, r2, R2 = map(int, input().split())\n\nres1 = is_intersect(r1, r2, R2, x1, y1, x2, y2)\nres2 = is_intersect(R1, r2, R2, x1, y1, x2, y2)\nres3 = is_intersect(r2, r1, R1, x2, y2, x1, y1)\nres4 = is_intersect(R2, r1, R1, x2, y2, x1, y1)\n\nprint(res1 + res2 + res3 + res4)\n","sample_outputs":"[\"1\", \"4\", \"0\"]","lang_cluster":"Python","notes":"NoteFigures for test samples are given below. The possible cuts are marked with red dotted line. ","output_specification":"A single integer \u2014 the number of ways to cut out a circle from the canvas.","description":"A renowned abstract artist Sasha, drawing inspiration from nowhere, decided to paint a picture entitled \"Special Olympics\". He justly thought that, if the regular Olympic games have five rings, then the Special ones will do with exactly two rings just fine.Let us remind you that a ring is a region located between two concentric circles with radii r and R (r\u2009<\u2009R). These radii are called internal and external, respectively. Concentric circles are circles with centers located at the same point.Soon a white canvas, which can be considered as an infinite Cartesian plane, had two perfect rings, painted with solid black paint. As Sasha is very impulsive, the rings could have different radii and sizes, they intersect and overlap with each other in any way. We know only one thing for sure: the centers of the pair of rings are not the same.When Sasha got tired and fell into a deep sleep, a girl called Ilona came into the room and wanted to cut a circle for the sake of good memories. To make the circle beautiful, she decided to cut along the contour.We'll consider a contour to be a continuous closed line through which there is transition from one color to another (see notes for clarification). If the contour takes the form of a circle, then the result will be cutting out a circle, which Iona wants.But the girl's inquisitive mathematical mind does not rest: how many ways are there to cut a circle out of the canvas?","human_testcases":"[{\"input\": \"60 60 45 55\\r\\n80 80 8 32\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"60 60 45 55\\r\\n80 60 15 25\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"50 50 35 45\\r\\n90 50 35 45\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 0 50 70\\r\\n1 0 60 80\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"0 0 1 2\\r\\n10 0 2 20\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"31 13 22 95\\r\\n48 63 21 98\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"31 40 37 76\\r\\n48 65 66 98\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-65 -81 37 76\\r\\n48 65 66 98\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"41 -14 37 76\\r\\n48 65 66 98\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"41 -14 16 100\\r\\n48 17 37 66\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-75 -9 20 40\\r\\n25 55 99 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-45 6 20 40\\r\\n35 6 99 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-3 84 20 40\\r\\n76 96 96 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 -91 20 40\\r\\n70 -91 79 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-64 -47 20 40\\r\\n-5 -37 79 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-63 97 20 40\\r\\n-34 97 11 48\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-67 47 20 40\\r\\n-38 47 11 49\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-100 -91 20 40\\r\\n-71 -91 11 68\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"45 -76 20 40\\r\\n69 -69 15 65\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12 -43 20 40\\r\\n41 -43 11 97\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 71 20 40\\r\\n39 78 10 49\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"56 44 20 40\\r\\n83 44 12 13\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-20 78 20 40\\r\\n8 85 10 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"65 -9 20 40\\r\\n94 -9 10 49\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-84 -59 20 40\\r\\n-74 -59 29 30\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"33 -37 20 40\\r\\n42 -37 28 29\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-25 10 20 40\\r\\n4 17 10 69\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13 32 20 40\\r\\n42 32 10 69\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-12 -1 20 40\\r\\n-3 -1 28 31\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"48 30 20 40\\r\\n77 37 10 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"47 -50 20 40\\r\\n56 -46 28 30\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-26 -65 20 40\\r\\n52 -65 98 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-46 36 20 40\\r\\n14 36 80 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"19 96 20 40\\r\\n77 96 78 99\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-42 -44 20 40\\r\\n-32 -44 30 48\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"83 -23 20 40\\r\\n93 -23 30 50\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-100 -97 20 40\\r\\n-90 -97 30 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"65 16 20 40\\r\\n74 16 29 48\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-66 78 20 40\\r\\n-62 81 25 45\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-11 63 20 40\\r\\n-2 63 29 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"91 -59 20 40\\r\\n100 -59 29 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"39 90 20 40\\r\\n47 90 28 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-100 40 20 40\\r\\n-81 40 1 38\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"24 -24 20 40\\r\\n43 -24 1 21\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-8 35 20 40\\r\\n11 35 1 19\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-52 -94 20 40\\r\\n-33 -94 1 39\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"61 2 20 40\\r\\n67 10 10 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"49 -67 20 40\\r\\n57 -67 12 28\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"65 17 20 40\\r\\n84 17 1 58\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-16 -18 20 40\\r\\n3 -18 1 59\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"24 -16 20 40\\r\\n33 -16 11 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-83 96 20 40\\r\\n-64 96 1 98\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-10 89 20 40\\r\\n-2 89 12 29\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-40 -69 20 40\\r\\n60 -69 80 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-70 66 20 40\\r\\n8 66 58 98\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-11 -97 20 40\\r\\n67 -97 58 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-60 60 20 40\\r\\n0 60 40 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 73 20 40\\r\\n59 73 39 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"28 -91 20 40\\r\\n58 -91 10 49\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"75 72 20 40\\r\\n99 90 10 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-84 74 20 40\\r\\n-54 74 10 63\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"35 -6 20 40\\r\\n59 12 10 70\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"67 41 20 40\\r\\n97 41 10 98\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-27 -68 20 40\\r\\n2 -68 9 48\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 13 20 40\\r\\n78 13 8 12\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-73 36 20 40\\r\\n-44 36 9 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"70 92 20 40\\r\\n99 92 9 49\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"37 -80 20 40\\r\\n66 -80 9 66\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 -95 20 40\\r\\n36 -95 8 68\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-9 77 20 40\\r\\n20 77 9 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-37 20 20 40\\r\\n41 31 99 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-36 28 20 40\\r\\n24 28 99 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-77 -16 20 40\\r\\n-18 -6 99 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-65 24 20 40\\r\\n-6 24 99 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"-55 23 20 40\\r\\n-46 23 31 48\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-37 18 20 40\\r\\n-30 18 33 47\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-45 -93 20 40\\r\\n-36 -93 31 99\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-97 -29 20 40\\r\\n-39 -19 99 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"14 18 20 40\\r\\n23 22 30 49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-90 -38 20 40\\r\\n-81 -38 30 49\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"52 -4 20 40\\r\\n61 -4 30 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-54 46 20 40\\r\\n-45 50 30 98\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"74 -34 20 40\\r\\n82 -30 30 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"23 -61 20 40\\r\\n41 -55 1 37\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"57 -86 20 40\\r\\n75 -86 1 22\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-38 43 20 40\\r\\n-20 49 1 20\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-19 10 20 40\\r\\n-2 10 2 37\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"64 58 20 40\\r\\n74 58 7 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"53 49 20 40\\r\\n62 49 10 29\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"53 80 20 40\\r\\n70 80 2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"73 -41 20 40\\r\\n91 -35 1 49\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-8 -34 20 40\\r\\n9 -34 2 57\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"51 -40 20 40\\r\\n60 -40 9 31\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-29 87 20 40\\r\\n-11 93 1 94\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-64 3 20 40\\r\\n-55 7 6 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"24 36 20 40\\r\\n41 39 1 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"-56 -64 20 40\\r\\n44 2 96 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-59 -17 20 40\\r\\n21 -17 59 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-43 -3 20 40\\r\\n57 -3 79 80\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"20 57 20 40\\r\\n99 69 58 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"36 82 20 40\\r\\n96 82 38 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-55 37 20 40\\r\\n4 47 38 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-58 -4 20 40\\r\\n42 91 99 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"28 51 20 40\\r\\n67 51 1 58\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-79 -62 20 40\\r\\n-41 -62 2 58\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-19 -10 20 40\\r\\n20 -10 1 19\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-95 -64 20 40\\r\\n-56 -64 1 78\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-17 -7 20 40\\r\\n22 -7 1 79\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-45 86 20 40\\r\\n-6 86 1 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-71 -23 20 40\\r\\n-32 -23 1 18\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-20 11 20 40\\r\\n80 11 60 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-27 97 20 40\\r\\n51 97 38 98\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-47 -84 20 40\\r\\n52 -64 61 81\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-81 99 20 40\\r\\n-3 99 38 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-54 25 20 40\\r\\n6 25 20 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-22 40 20 40\\r\\n36 40 18 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-71 15 20 40\\r\\n29 90 85 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"31 -13 20 40\\r\\n69 -5 1 56\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-46 55 20 40\\r\\n-17 55 7 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-35 25 20 40\\r\\n-6 32 7 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"27 -98 20 40\\r\\n65 -98 1 58\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-100 -19 20 40\\r\\n-62 -19 1 18\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"48 66 20 40\\r\\n78 66 9 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-37 -22 20 40\\r\\n-8 -22 8 9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-42 41 20 40\\r\\n-4 49 1 78\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"-2 -27 20 40\\r\\n35 -27 1 77\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-28 -36 20 40\\r\\n10 -28 1 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-17 31 20 40\\r\\n21 39 1 14\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 44 20 40\\r\\n39 44 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21 -99 20 40\\r\\n58 -97 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-86 -97 20 40\\r\\n14 -31 79 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-33 42 20 40\\r\\n47 42 39 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-79 45 20 40\\r\\n21 45 57 80\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-99 -66 20 40\\r\\n-20 -54 39 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"39 -44 20 40\\r\\n99 -44 17 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 86 20 40\\r\\n69 96 19 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-72 -4 20 40\\r\\n28 93 99 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-81 -55 20 40\\r\\n19 20 83 85\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"-65 -34 20 40\\r\\n35 66 99 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"-91 -46 10 50\\r\\n-73 -40 30 31\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '-65 24 20 40\\r\\n-6 24 99 100\\r\\n', 'output': ['4']}, {'input': '31 40 37 76\\r\\n48 65 66 98\\r\\n', 'output': ['0']}, {'input': '-71 15 20 40\\r\\n29 90 85 100\\r\\n', 'output': ['2']}, {'input': '-20 78 20 40\\r\\n8 85 10 11\\r\\n', 'output': ['1']}, {'input': '49 -67 20 40\\r\\n57 -67 12 28\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '19 96 20 40\\r\\n77 96 78 99\\r\\n', 'output': ['2']}, {'input': '-67 47 20 40\\r\\n-38 47 11 49\\r\\n', 'output': ['0']}, {'input': '-81 -55 20 40\\r\\n19 20 83 85\\r\\n', 'output': ['4']}, {'input': '-64 -47 20 40\\r\\n-5 -37 79 100\\r\\n', 'output': ['1']}, {'input': '8 -95 20 40\\r\\n36 -95 8 68\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '1 44 20 40\\r\\n39 44 1 2\\r\\n', 'output': ['2']}, {'input': '-73 36 20 40\\r\\n-44 36 9 10\\r\\n', 'output': ['1']}, {'input': '-81 -55 20 40\\r\\n19 20 83 85\\r\\n', 'output': ['4']}, {'input': '-77 -16 20 40\\r\\n-18 -6 99 100\\r\\n', 'output': ['2']}, {'input': '28 -91 20 40\\r\\n58 -91 10 49\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '19 96 20 40\\r\\n77 96 78 99\\r\\n', 'output': ['2']}, {'input': '41 -14 37 76\\r\\n48 65 66 98\\r\\n', 'output': ['0']}, {'input': '-67 47 20 40\\r\\n-38 47 11 49\\r\\n', 'output': ['0']}, {'input': '-100 -19 20 40\\r\\n-62 -19 1 18\\r\\n', 'output': ['1']}, {'input': '-86 -97 20 40\\r\\n14 -31 79 100\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '57 -86 20 40\\r\\n75 -86 1 22\\r\\n', 'output': ['2']}, {'input': '1 44 20 40\\r\\n39 44 1 2\\r\\n', 'output': ['2']}, {'input': '31 40 37 76\\r\\n48 65 66 98\\r\\n', 'output': ['0']}, {'input': '-73 36 20 40\\r\\n-44 36 9 10\\r\\n', 'output': ['1']}, {'input': '-38 43 20 40\\r\\n-20 49 1 20\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":336,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 3 2 3\", \"5 3 100 1\"]","input_specification":"The only line contains four integers $$$k$$$, $$$n$$$, $$$s$$$, $$$p$$$ ($$$1 \\le k, n, s, p \\le 10^4$$$)\u00a0\u2014 the number of people, the number of airplanes each should make, the number of airplanes that can be made using one sheet and the number of sheets in one pack, respectively.","src_uid":"73f0c7cfc06a9b04e4766d6aa61fc780","source_code":"from math import *\nk, n, s, p = map(int, input().split())\nq = k * ceil(n \/ s)\nw = ceil(q \/ p)\nprint(w)\n","sample_outputs":"[\"4\", \"5\"]","lang_cluster":"Python","notes":"NoteIn the first sample they have to buy $$$4$$$ packs of paper: there will be $$$12$$$ sheets in total, and giving $$$2$$$ sheets to each person is enough to suit everyone's needs.In the second sample they have to buy a pack for each person as they can't share sheets.","output_specification":"Print a single integer\u00a0\u2014 the minimum number of packs they should buy.","description":"To make a paper airplane, one has to use a rectangular piece of paper. From a sheet of standard size you can make $$$s$$$ airplanes.A group of $$$k$$$ people decided to make $$$n$$$ airplanes each. They are going to buy several packs of paper, each of them containing $$$p$$$ sheets, and then distribute the sheets between the people. Each person should have enough sheets to make $$$n$$$ airplanes. How many packs should they buy?","human_testcases":"[{\"input\": \"5 3 2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 3 100 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10000 10000 1 1\\r\\n\", \"output\": [\"100000000\"]}, {\"input\": \"1 1 10000 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"300 300 21 23\\r\\n\", \"output\": [\"196\"]}, {\"input\": \"300 2 37 51\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 400 23 57\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000 10000 3 2\\r\\n\", \"output\": [\"16670000\"]}, {\"input\": \"1 2 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 10 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5324 5439 32 13\\r\\n\", \"output\": [\"69622\"]}, {\"input\": \"9000 1 2432 1\\r\\n\", \"output\": [\"9000\"]}, {\"input\": \"230 1234 9124 23\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"11 1 1 1\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"6246 8489 1227 9\\r\\n\", \"output\": [\"4858\"]}, {\"input\": \"9 20 5 7\\r\\n\", \"output\": [\"6\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1 2 2\\r\\n', 'output': ['1']}, {'input': '1 2 1 2\\r\\n', 'output': ['1']}, {'input': '9 20 5 7\\r\\n', 'output': ['6']}, {'input': '6246 8489 1227 9\\r\\n', 'output': ['4858']}, {'input': '10000 10000 3 2\\r\\n', 'output': ['16670000']}]","human_sample_testcases_2":"[{'input': '5 3 2 3\\r\\n', 'output': ['4']}, {'input': '10000 10000 1 1\\r\\n', 'output': ['100000000']}, {'input': '6246 8489 1227 9\\r\\n', 'output': ['4858']}, {'input': '5 3 100 1\\r\\n', 'output': ['5']}, {'input': '230 1234 9124 23\\r\\n', 'output': ['10']}]","human_sample_testcases_3":"[{'input': '300 2 37 51\\r\\n', 'output': ['6']}, {'input': '10000 10000 3 2\\r\\n', 'output': ['16670000']}, {'input': '5324 5439 32 13\\r\\n', 'output': ['69622']}, {'input': '1 1 10000 10000\\r\\n', 'output': ['1']}, {'input': '230 1234 9124 23\\r\\n', 'output': ['10']}]","human_sample_testcases_4":"[{'input': '1 2 1 2\\r\\n', 'output': ['1']}, {'input': '1 1 10000 10000\\r\\n', 'output': ['1']}, {'input': '300 2 37 51\\r\\n', 'output': ['6']}, {'input': '9 20 5 7\\r\\n', 'output': ['6']}, {'input': '10000 10000 3 2\\r\\n', 'output': ['16670000']}]","human_sample_testcases_5":"[{'input': '300 300 21 23\\r\\n', 'output': ['196']}, {'input': '6246 8489 1227 9\\r\\n', 'output': ['4858']}, {'input': '10000 10000 3 2\\r\\n', 'output': ['16670000']}, {'input': '1 1 1 1\\r\\n', 'output': ['1']}, {'input': '1 1 10 10\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":337,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"30 5 20 20 3 5\", \"10 4 100 5 5 1\"]","input_specification":"The single line of the input contains six integers x,\u2009t,\u2009a,\u2009b,\u2009da,\u2009db (0\u2009\u2264\u2009x\u2009\u2264\u2009600;\u00a01\u2009\u2264\u2009t,\u2009a,\u2009b,\u2009da,\u2009db\u2009\u2264\u2009300) \u2014 Valera's result, the contest's duration, the initial cost of the first problem, the initial cost of the second problem, the number of points that the first and the second problem lose per minute, correspondingly. It is guaranteed that at each minute of the contest each problem has a non-negative cost, that is, a\u2009-\u2009i\u00b7da\u2009\u2265\u20090 and b\u2009-\u2009i\u00b7db\u2009\u2265\u20090 for all 0\u2009\u2264\u2009i\u2009\u2264\u2009t\u2009-\u20091.","src_uid":"f98168cdd72369303b82b5a7ac45c3af","source_code":"x,t,a,b,c,d=map(int,input().split())\nR=range(t)\ny=x==0\nfor i in R:\n\tif x==a-c*i or x==b-d*i:y=1\n\tfor j in R:y|=x==a+b-c*i-d*j\nprint(['NO','YES'][y])","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Python","notes":"NoteIn the first sample Valera could have acted like this: he could have submitted the first problem at minute 0 and the second problem \u2014 at minute 2. Then the first problem brings him 20 points and the second problem brings him 10 points, that in total gives the required 30 points.","output_specification":"If Valera could have earned exactly x points at a contest, print \"YES\", otherwise print \"NO\" (without the quotes).","description":"A boy Valera registered on site Codeforces as Valera, and wrote his first Codeforces Round #300. He boasted to a friend Arkady about winning as much as x points for his first contest. But Arkady did not believe his friend's words and decided to check whether Valera could have shown such a result.He knows that the contest number 300 was unusual because there were only two problems. The contest lasted for t minutes, the minutes are numbered starting from zero. The first problem had the initial cost of a points, and every minute its cost reduced by da points. The second problem had the initial cost of b points, and every minute this cost reduced by db points. Thus, as soon as the zero minute of the contest is over, the first problem will cost a\u2009-\u2009da points, and the second problem will cost b\u2009-\u2009db points. It is guaranteed that at any moment of the contest each problem has a non-negative cost.Arkady asks you to find out whether Valera could have got exactly x points for this contest. You should assume that Valera could have solved any number of the offered problems. You should also assume that for each problem Valera made no more than one attempt, besides, he could have submitted both problems at the same minute of the contest, starting with minute 0 and ending with minute number t\u2009-\u20091. Please note that Valera can't submit a solution exactly t minutes after the start of the contest or later.","human_testcases":"[{\"input\": \"30 5 20 20 3 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 4 100 5 5 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"0 7 30 50 3 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"50 10 30 20 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"40 1 40 5 11 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"35 8 20 20 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10 2 27 4 11 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"64 12 258 141 10 7\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 3 11 100 2 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 4 11 80 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"28 3 16 20 3 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"6 2 11 1 11 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15 5 230 213 32 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"223 92 123 118 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"375 6 133 267 19 36\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"80 5 39 40 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"543 4 31 69 6 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"38 100 99 245 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1 20 15 17 5\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"360 5 215 4 52 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"363 2 280 239 5 231\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"46 7 18 6 3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 3 135 12 21 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15 5 230 213 32 25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 5 29 36 5 6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"59 4 113 45 25 12\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"74 72 104 71 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"16 24 26 23 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11 1 10 1 10 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13 3 11 14 5 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2 1 2 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"145 26 25 150 1 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"59 18 50 17 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"230 125 175 124 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"142 1 66 76 18 39\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 3 5 6 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"6 46 95 45 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"16 73 92 72 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 18 272 17 6 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 21 178 20 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 15 86 84 5 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 35 208 98 6 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"0 11 67 82 6 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30 9 18 83 1 7\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"18 12 11 54 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"41 77 96 145 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"27 45 44 169 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"50 5 30 60 3 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"49 2 50 20 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"49 2 50 20 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"17 10 10 20 1 2\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '17 10 10 20 1 2\\r\\n', 'output': ['YES']}, {'input': '80 5 39 40 1 1\\r\\n', 'output': ['NO']}, {'input': '30 5 20 20 3 5\\r\\n', 'output': ['YES']}, {'input': '5 4 11 80 2 4\\r\\n', 'output': ['YES']}, {'input': '0 35 208 98 6 2\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '80 5 39 40 1 1\\r\\n', 'output': ['NO']}, {'input': '10 4 100 5 5 1\\r\\n', 'output': ['NO']}, {'input': '543 4 31 69 6 5\\r\\n', 'output': ['NO']}, {'input': '1 21 178 20 1 1\\r\\n', 'output': ['YES']}, {'input': '142 1 66 76 18 39\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '363 2 280 239 5 231\\r\\n', 'output': ['NO']}, {'input': '50 10 30 20 1 2\\r\\n', 'output': ['YES']}, {'input': '41 77 96 145 1 1\\r\\n', 'output': ['YES']}, {'input': '27 45 44 169 1 2\\r\\n', 'output': ['YES']}, {'input': '5 4 11 80 2 4\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '2 5 29 36 5 6\\r\\n', 'output': ['NO']}, {'input': '360 5 215 4 52 1\\r\\n', 'output': ['NO']}, {'input': '74 72 104 71 1 1\\r\\n', 'output': ['YES']}, {'input': '223 92 123 118 1 1\\r\\n', 'output': ['YES']}, {'input': '16 24 26 23 1 1\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '6 2 11 1 11 1\\r\\n', 'output': ['NO']}, {'input': '38 100 99 245 1 1\\r\\n', 'output': ['YES']}, {'input': '2 5 29 36 5 6\\r\\n', 'output': ['NO']}, {'input': '46 7 18 6 3 1\\r\\n', 'output': ['NO']}, {'input': '3 1 20 15 17 5\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":338,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 4\\n1 2 5 10 15 20\", \"4 10\\n1 3 2 4\", \"6 100\\n1 2 3 4 5 6\"]","input_specification":"First line of the input contains an integer $$$n$$$ ($$$2 \\le n \\le 100$$$) and an integer $$$B$$$ ($$$1 \\le B \\le 100$$$)\u00a0\u2014 the number of elements in the sequence and the number of bitcoins you have. Second line contains $$$n$$$ integers: $$$a_1$$$, $$$a_2$$$, ..., $$$a_n$$$ ($$$1 \\le a_i \\le 100$$$)\u00a0\u2014 elements of the sequence, which contains the equal number of even and odd numbers","src_uid":"b3f8e769ee7719ea5c9f458428b16a4e","source_code":"n, B = [int(x) for x in input().split()]\narr = [int(x) for x in input().split()]\n\nposs_Splits = []\nps = 0\nptlan = 0\nfor i in range(n - 1):\n if arr[i] % 2 == 0:\n ps += 1\n else:\n ptlan += 1\n if ps == ptlan:\n poss_Splits.append((abs(arr[i] - arr[i + 1]), i))\n\nposs_Splits = sorted(poss_Splits)\ni = 0\nwhile i < len(poss_Splits) and B >= poss_Splits[i][0]:\n B -= poss_Splits[i][0]\n i += 1\n\nprint(i)","sample_outputs":"[\"1\", \"0\", \"2\"]","lang_cluster":"Python","notes":"NoteIn the first sample the optimal answer is to split sequence between $$$2$$$ and $$$5$$$. Price of this cut is equal to $$$3$$$ bitcoins.In the second sample it is not possible to make even one cut even with unlimited number of bitcoins.In the third sample the sequence should be cut between $$$2$$$ and $$$3$$$, and between $$$4$$$ and $$$5$$$. The total price of the cuts is $$$1 + 1 = 2$$$ bitcoins.","output_specification":"Print the maximum possible number of cuts which can be made while spending no more than $$$B$$$ bitcoins.","description":"There are a lot of things which could be cut\u00a0\u2014 trees, paper, \"the rope\". In this problem you are going to cut a sequence of integers.There is a sequence of integers, which contains the equal number of even and odd numbers. Given a limited budget, you need to make maximum possible number of cuts such that each resulting segment will have the same number of odd and even integers.Cuts separate a sequence to continuous (contiguous) segments. You may think about each cut as a break between two adjacent elements in a sequence. So after cutting each element belongs to exactly one segment. Say, $$$[4, 1, 2, 3, 4, 5, 4, 4, 5, 5]$$$ $$$\\to$$$ two cuts $$$\\to$$$ $$$[4, 1 | 2, 3, 4, 5 | 4, 4, 5, 5]$$$. On each segment the number of even elements should be equal to the number of odd elements.The cost of the cut between $$$x$$$ and $$$y$$$ numbers is $$$|x - y|$$$ bitcoins. Find the maximum possible number of cuts that can be made while spending no more than $$$B$$$ bitcoins.","human_testcases":"[{\"input\": \"6 4\\r\\n1 2 5 10 15 20\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 10\\r\\n1 3 2 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 100\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 100\\r\\n13 78\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 1\\r\\n56 56 98 2 11 64 97 41 95 53\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 100\\r\\n94 65 24 47 29 98 20 65 6 17\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 1\\r\\n35 6 19 84 49 64 36 91 50 65 21 86 20 89 10 52 50 24 98 74 11 48 58 98 51 85 1 29 44 83 9 97 68 41 83 57 1 57 46 42 87 2 32 50 3 57 17 77 22 100 36 27 3 34 55 8 90 61 34 20 15 39 43 46 60 60 14 23 4 22 75 51 98 23 69 22 99 57 63 30 79 7 16 8 34 84 13 47 93 40 48 25 93 1 80 6 82 93 6 21\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 10\\r\\n3 20 3 29 90 69 2 30 70 28 71 99 22 99 34 70 87 48 3 92 71 61 26 90 14 38 51 81 16 33 49 71 14 52 50 95 65 16 80 57 87 47 29 14 40 31 74 15 87 76 71 61 30 91 44 10 87 48 84 12 77 51 25 68 49 38 79 8 7 9 39 19 48 40 15 53 29 4 60 86 76 84 6 37 45 71 46 38 80 68 94 71 64 72 41 51 71 60 79 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 100\\r\\n60 83 82 16 17 7 89 6 83 100 85 41 72 44 23 28 64 84 3 23 33 52 93 30 81 38 67 25 26 97 94 78 41 74 74 17 53 51 54 17 20 81 95 76 42 16 16 56 74 69 30 9 82 91 32 13 47 45 97 40 56 57 27 28 84 98 91 5 61 20 3 43 42 26 83 40 34 100 5 63 62 61 72 5 32 58 93 79 7 18 50 43 17 24 77 73 87 74 98 2\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100 100\\r\\n70 54 10 72 81 84 56 15 27 19 43 100 49 44 52 33 63 40 95 17 58 2 51 39 22 18 82 1 16 99 32 29 24 94 9 98 5 37 47 14 42 73 41 31 79 64 12 6 53 26 68 67 89 13 90 4 21 93 46 74 75 88 66 57 23 7 25 48 92 62 30 8 50 61 38 87 71 34 97 28 80 11 60 91 3 35 86 96 36 20 59 65 83 45 76 77 78 69 85 55\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"10 10\\r\\n94 32 87 13 4 22 85 81 18 95\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 50\\r\\n40 40 9 3 64 96 67 19 21 30\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 50\\r\\n13 31 29 86 46 10 2 87 94 2 28 31 29 15 64 3 94 71 37 76 9 91 89 38 12 46 53 33 58 11 98 4 37 72 30 52 6 86 40 98 28 6 34 80 61 47 45 69 100 47 91 64 87 41 67 58 88 75 13 81 36 58 66 29 10 27 54 83 44 15 11 33 49 36 61 18 89 26 87 1 99 19 57 21 55 84 20 74 14 43 15 51 2 76 22 92 43 14 72 77\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 1\\r\\n78 52 95 76 96 49 53 59 77 100 64 11 9 48 15 17 44 46 21 54 39 68 43 4 32 28 73 6 16 62 72 84 65 86 98 75 33 45 25 3 91 82 2 92 63 88 7 50 97 93 14 22 20 42 60 55 80 85 29 34 56 71 83 38 26 47 90 70 51 41 40 31 37 12 35 99 67 94 1 87 57 8 61 19 23 79 36 18 66 74 5 27 81 69 24 58 13 10 89 30\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 10\\r\\n19 55 91 50 31 23 60 84 38 1 22 51 27 76 28 98 11 44 61 63 15 93 52 3 66 16 53 36 18 62 35 85 78 37 73 64 87 74 46 26 82 69 49 33 83 89 56 67 71 25 39 94 96 17 21 6 47 68 34 42 57 81 13 10 54 2 48 80 20 77 4 5 59 30 90 95 45 75 8 88 24 41 40 14 97 32 7 9 65 70 100 99 72 58 92 29 79 12 86 43\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 50\\r\\n2 4 82 12 47 63 52 91 87 45 53 1 17 25 64 50 9 13 22 54 21 30 43 24 38 33 68 11 41 78 99 23 28 18 58 67 79 10 71 56 49 61 26 29 59 20 90 74 5 75 89 8 39 95 72 42 66 98 44 32 88 35 92 3 97 55 65 51 77 27 81 76 84 69 73 85 19 46 62 100 60 37 7 36 57 6 14 83 40 48 16 70 96 15 31 93 80 86 94 34\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 1\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100 10\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"100 50\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"49\"]}, {\"input\": \"100 30\\r\\n2 1 2 2 2 2 1 1 1 2 1 1 2 2 1 2 1 2 2 2 2 1 2 1 2 1 1 2 1 1 2 2 2 1 1 2 1 2 2 2 1 1 1 1 1 2 1 1 1 1 1 2 2 2 2 1 2 1 1 1 2 2 2 2 1 2 2 1 1 1 1 2 2 2 1 2 2 1 2 1 1 2 2 2 1 2 2 1 2 1 1 2 1 1 1 1 2 1 1 2\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100 80\\r\\n1 1 1 2 2 1 1 2 1 1 1 1 2 2 2 1 2 2 2 2 1 1 2 2 1 1 1 1 2 2 2 1 1 1 1 1 1 1 2 2 2 2 1 2 2 1 2 1 1 1 1 2 2 1 2 2 1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 1 2 1 1 1 2 1 1 2 1 2 1 2 2 1 1 2 1 1 1 1 2 2 2 1 2 2 1 2\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"100 30\\r\\n100 99 100 99 99 100 100 99 100 99 99 100 100 100 99 99 99 100 99 99 99 99 100 99 99 100 100 99 100 99 99 99 100 99 100 100 99 100 100 100 100 100 99 99 100 99 99 100 99 100 99 99 100 100 99 100 99 99 100 99 100 100 100 100 99 99 99 100 99 100 99 100 100 100 99 100 100 100 99 100 99 99 100 100 100 100 99 99 99 100 99 100 100 99 99 99 100 100 99 99\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"100 80\\r\\n99 100 100 100 99 99 99 99 100 99 99 99 99 99 99 99 99 100 100 99 99 99 99 99 100 99 100 99 100 100 100 100 100 99 100 100 99 99 100 100 100 100 100 99 100 99 100 99 99 99 100 99 99 99 99 99 99 99 99 100 99 100 100 99 99 99 99 100 100 100 99 100 100 100 100 100 99 100 100 100 100 100 100 100 100 99 99 99 99 100 99 100 100 100 100 100 99 100 99 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 30\\r\\n100 100 39 39 39 100 100 39 39 100 39 39 100 39 100 39 100 100 100 100 100 39 100 100 100 39 39 39 100 39 100 100 39 39 100 39 39 39 100 100 39 100 39 100 39 39 100 100 39 100 39 100 39 39 39 100 39 100 39 39 39 100 39 39 100 100 39 39 39 100 100 39 39 39 100 100 100 100 39 100 100 100 39 39 100 39 100 100 39 100 39 100 39 39 100 39 39 100 100 100\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100 80\\r\\n39 100 39 100 100 100 100 39 39 100 100 39 39 100 39 39 39 39 100 39 39 39 39 100 100 100 100 39 100 39 39 100 100 39 39 100 39 100 39 100 100 39 39 100 39 39 39 100 39 100 39 100 100 100 100 100 100 100 39 100 39 100 100 100 39 39 39 39 39 100 100 100 39 100 100 100 100 39 100 100 39 39 100 39 39 39 100 39 100 39 39 100 100 39 100 39 39 39 100 39\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4 1\\r\\n1 2 3 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 1\\r\\n1 2 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4\\r\\n1 2 6 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 8\\r\\n1 2 10 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 2\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 1\\r\\n1 2 1 2 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 4\\r\\n1 2 4 5 7 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 3\\r\\n1 2 5 10 15 20\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '10 10\\r\\n94 32 87 13 4 22 85 81 18 95\\r\\n', 'output': ['1']}, {'input': '100 10\\r\\n3 20 3 29 90 69 2 30 70 28 71 99 22 99 34 70 87 48 3 92 71 61 26 90 14 38 51 81 16 33 49 71 14 52 50 95 65 16 80 57 87 47 29 14 40 31 74 15 87 76 71 61 30 91 44 10 87 48 84 12 77 51 25 68 49 38 79 8 7 9 39 19 48 40 15 53 29 4 60 86 76 84 6 37 45 71 46 38 80 68 94 71 64 72 41 51 71 60 79 7\\r\\n', 'output': ['2']}, {'input': '100 100\\r\\n60 83 82 16 17 7 89 6 83 100 85 41 72 44 23 28 64 84 3 23 33 52 93 30 81 38 67 25 26 97 94 78 41 74 74 17 53 51 54 17 20 81 95 76 42 16 16 56 74 69 30 9 82 91 32 13 47 45 97 40 56 57 27 28 84 98 91 5 61 20 3 43 42 26 83 40 34 100 5 63 62 61 72 5 32 58 93 79 7 18 50 43 17 24 77 73 87 74 98 2\\r\\n', 'output': ['11']}, {'input': '10 1\\r\\n56 56 98 2 11 64 97 41 95 53\\r\\n', 'output': ['0']}, {'input': '100 1\\r\\n35 6 19 84 49 64 36 91 50 65 21 86 20 89 10 52 50 24 98 74 11 48 58 98 51 85 1 29 44 83 9 97 68 41 83 57 1 57 46 42 87 2 32 50 3 57 17 77 22 100 36 27 3 34 55 8 90 61 34 20 15 39 43 46 60 60 14 23 4 22 75 51 98 23 69 22 99 57 63 30 79 7 16 8 34 84 13 47 93 40 48 25 93 1 80 6 82 93 6 21\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '100 50\\r\\n13 31 29 86 46 10 2 87 94 2 28 31 29 15 64 3 94 71 37 76 9 91 89 38 12 46 53 33 58 11 98 4 37 72 30 52 6 86 40 98 28 6 34 80 61 47 45 69 100 47 91 64 87 41 67 58 88 75 13 81 36 58 66 29 10 27 54 83 44 15 11 33 49 36 61 18 89 26 87 1 99 19 57 21 55 84 20 74 14 43 15 51 2 76 22 92 43 14 72 77\\r\\n', 'output': ['3']}, {'input': '6 100\\r\\n1 2 3 4 5 6\\r\\n', 'output': ['2']}, {'input': '100 10\\r\\n19 55 91 50 31 23 60 84 38 1 22 51 27 76 28 98 11 44 61 63 15 93 52 3 66 16 53 36 18 62 35 85 78 37 73 64 87 74 46 26 82 69 49 33 83 89 56 67 71 25 39 94 96 17 21 6 47 68 34 42 57 81 13 10 54 2 48 80 20 77 4 5 59 30 90 95 45 75 8 88 24 41 40 14 97 32 7 9 65 70 100 99 72 58 92 29 79 12 86 43\\r\\n', 'output': ['0']}, {'input': '4 1\\r\\n1 2 3 4\\r\\n', 'output': ['1']}, {'input': '2 100\\r\\n13 78\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '100 30\\r\\n100 100 39 39 39 100 100 39 39 100 39 39 100 39 100 39 100 100 100 100 100 39 100 100 100 39 39 39 100 39 100 100 39 39 100 39 39 39 100 100 39 100 39 100 39 39 100 100 39 100 39 100 39 39 39 100 39 100 39 39 39 100 39 39 100 100 39 39 39 100 100 39 39 39 100 100 100 100 39 100 100 100 39 39 100 39 100 100 39 100 39 100 39 39 100 39 39 100 100 100\\r\\n', 'output': ['5']}, {'input': '6 4\\r\\n1 2 4 5 7 8\\r\\n', 'output': ['2']}, {'input': '100 1\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n', 'output': ['1']}, {'input': '100 50\\r\\n2 4 82 12 47 63 52 91 87 45 53 1 17 25 64 50 9 13 22 54 21 30 43 24 38 33 68 11 41 78 99 23 28 18 58 67 79 10 71 56 49 61 26 29 59 20 90 74 5 75 89 8 39 95 72 42 66 98 44 32 88 35 92 3 97 55 65 51 77 27 81 76 84 69 73 85 19 46 62 100 60 37 7 36 57 6 14 83 40 48 16 70 96 15 31 93 80 86 94 34\\r\\n', 'output': ['1']}, {'input': '4 1\\r\\n1 2 3 4\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '6 1\\r\\n1 2 1 2 1 2\\r\\n', 'output': ['1']}, {'input': '100 10\\r\\n19 55 91 50 31 23 60 84 38 1 22 51 27 76 28 98 11 44 61 63 15 93 52 3 66 16 53 36 18 62 35 85 78 37 73 64 87 74 46 26 82 69 49 33 83 89 56 67 71 25 39 94 96 17 21 6 47 68 34 42 57 81 13 10 54 2 48 80 20 77 4 5 59 30 90 95 45 75 8 88 24 41 40 14 97 32 7 9 65 70 100 99 72 58 92 29 79 12 86 43\\r\\n', 'output': ['0']}, {'input': '100 1\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n', 'output': ['1']}, {'input': '100 50\\r\\n2 4 82 12 47 63 52 91 87 45 53 1 17 25 64 50 9 13 22 54 21 30 43 24 38 33 68 11 41 78 99 23 28 18 58 67 79 10 71 56 49 61 26 29 59 20 90 74 5 75 89 8 39 95 72 42 66 98 44 32 88 35 92 3 97 55 65 51 77 27 81 76 84 69 73 85 19 46 62 100 60 37 7 36 57 6 14 83 40 48 16 70 96 15 31 93 80 86 94 34\\r\\n', 'output': ['1']}, {'input': '100 1\\r\\n78 52 95 76 96 49 53 59 77 100 64 11 9 48 15 17 44 46 21 54 39 68 43 4 32 28 73 6 16 62 72 84 65 86 98 75 33 45 25 3 91 82 2 92 63 88 7 50 97 93 14 22 20 42 60 55 80 85 29 34 56 71 83 38 26 47 90 70 51 41 40 31 37 12 35 99 67 94 1 87 57 8 61 19 23 79 36 18 66 74 5 27 81 69 24 58 13 10 89 30\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '4 10\\r\\n1 3 2 4\\r\\n', 'output': ['0']}, {'input': '6 4\\r\\n1 2 4 5 7 8\\r\\n', 'output': ['2']}, {'input': '100 80\\r\\n39 100 39 100 100 100 100 39 39 100 100 39 39 100 39 39 39 39 100 39 39 39 39 100 100 100 100 39 100 39 39 100 100 39 39 100 39 100 39 100 100 39 39 100 39 39 39 100 39 100 39 100 100 100 100 100 100 100 39 100 39 100 100 100 39 39 39 39 39 100 100 100 39 100 100 100 100 39 100 100 39 39 100 39 39 39 100 39 100 39 39 100 100 39 100 39 39 39 100 39\\r\\n', 'output': ['6']}, {'input': '100 100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n', 'output': ['49']}, {'input': '100 10\\r\\n3 20 3 29 90 69 2 30 70 28 71 99 22 99 34 70 87 48 3 92 71 61 26 90 14 38 51 81 16 33 49 71 14 52 50 95 65 16 80 57 87 47 29 14 40 31 74 15 87 76 71 61 30 91 44 10 87 48 84 12 77 51 25 68 49 38 79 8 7 9 39 19 48 40 15 53 29 4 60 86 76 84 6 37 45 71 46 38 80 68 94 71 64 72 41 51 71 60 79 7\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":339,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"harry potter\", \"tom riddle\"]","input_specification":"The input consists of a single line containing two space-separated strings: the first and the last names. Each character of each string is a lowercase English letter. The length of each string is between 1 and 10, inclusive. ","src_uid":"aed892f2bda10b6aee10dcb834a63709","source_code":"first_name, last_name = input().split()\nfirst_done = first_name.lower()\nlast_done = last_name.lower()\nlogin = first_name[0]\nfor i in range(1, len(first_name)):\n if ord(first_done[i]) < ord(last_done[0]):\n login += first_name[i]\n else:\n break\nlogin += last_name[0]\nprint(login)","sample_outputs":"[\"hap\", \"tomr\"]","lang_cluster":"Python","notes":null,"output_specification":"Output a single string\u00a0\u2014 alphabetically earliest possible login formed from these names. The output should be given in lowercase as well.","description":"The preferred way to generate user login in Polygon is to concatenate a prefix of the user's first name and a prefix of their last name, in that order. Each prefix must be non-empty, and any of the prefixes can be the full name. Typically there are multiple possible logins for each person.You are given the first and the last name of a user. Return the alphabetically earliest login they can get (regardless of other potential Polygon users).As a reminder, a prefix of a string s is its substring which occurs at the beginning of s: \"a\", \"ab\", \"abc\" etc. are prefixes of string \"{abcdef}\" but \"b\" and 'bc\" are not. A string a is alphabetically earlier than a string b, if a is a prefix of b, or a and b coincide up to some position, and then a has a letter that is alphabetically earlier than the corresponding letter in b: \"a\" and \"ab\" are alphabetically earlier than \"ac\" but \"b\" and \"ba\" are alphabetically later than \"ac\".","human_testcases":"[{\"input\": \"harry potter\\r\\n\", \"output\": [\"hap\"]}, {\"input\": \"tom riddle\\r\\n\", \"output\": [\"tomr\"]}, {\"input\": \"a qdpinbmcrf\\r\\n\", \"output\": [\"aq\"]}, {\"input\": \"wixjzniiub ssdfodfgap\\r\\n\", \"output\": [\"wis\"]}, {\"input\": \"z z\\r\\n\", \"output\": [\"zz\"]}, {\"input\": \"ertuyivhfg v\\r\\n\", \"output\": [\"ertuv\"]}, {\"input\": \"asdfghjkli ware\\r\\n\", \"output\": [\"asdfghjkliw\"]}, {\"input\": \"udggmyop ze\\r\\n\", \"output\": [\"udggmyopz\"]}, {\"input\": \"fapkdme rtzxovx\\r\\n\", \"output\": [\"fapkdmer\"]}, {\"input\": \"mybiqxmnqq l\\r\\n\", \"output\": [\"ml\"]}, {\"input\": \"dtbqya fyyymv\\r\\n\", \"output\": [\"df\"]}, {\"input\": \"fyclu zokbxiahao\\r\\n\", \"output\": [\"fycluz\"]}, {\"input\": \"qngatnviv rdych\\r\\n\", \"output\": [\"qngar\"]}, {\"input\": \"ttvnhrnng lqkfulhrn\\r\\n\", \"output\": [\"tl\"]}, {\"input\": \"fya fgx\\r\\n\", \"output\": [\"ff\"]}, {\"input\": \"nuis zvjjqlre\\r\\n\", \"output\": [\"nuisz\"]}, {\"input\": \"ly qtsmze\\r\\n\", \"output\": [\"lq\"]}, {\"input\": \"d kgfpjsurfw\\r\\n\", \"output\": [\"dk\"]}, {\"input\": \"lwli ewrpu\\r\\n\", \"output\": [\"le\"]}, {\"input\": \"rr wldsfubcs\\r\\n\", \"output\": [\"rrw\"]}, {\"input\": \"h qart\\r\\n\", \"output\": [\"hq\"]}, {\"input\": \"vugvblnzx kqdwdulm\\r\\n\", \"output\": [\"vk\"]}, {\"input\": \"xohesmku ef\\r\\n\", \"output\": [\"xe\"]}, {\"input\": \"twvvsl wtcyawv\\r\\n\", \"output\": [\"tw\"]}, {\"input\": \"obljndajv q\\r\\n\", \"output\": [\"obljndajq\"]}, {\"input\": \"jjxwj kxccwx\\r\\n\", \"output\": [\"jjk\"]}, {\"input\": \"sk fftzmv\\r\\n\", \"output\": [\"sf\"]}, {\"input\": \"cgpegngs aufzxkyyrw\\r\\n\", \"output\": [\"ca\"]}, {\"input\": \"reyjzjdvq skuch\\r\\n\", \"output\": [\"res\"]}, {\"input\": \"ardaae mxgdulijf\\r\\n\", \"output\": [\"am\"]}, {\"input\": \"bgopsdfji uaps\\r\\n\", \"output\": [\"bgopsdfjiu\"]}, {\"input\": \"amolfed pun\\r\\n\", \"output\": [\"amolfedp\"]}, {\"input\": \"badkiln yort\\r\\n\", \"output\": [\"badkilny\"]}, {\"input\": \"aaaaaaaaaz york\\r\\n\", \"output\": [\"aaaaaaaaay\"]}, {\"input\": \"bbbbcbbbbd c\\r\\n\", \"output\": [\"bbbbc\"]}, {\"input\": \"aa ab\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"ab b\\r\\n\", \"output\": [\"ab\"]}, {\"input\": \"aaaaa ab\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aa a\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aba b\\r\\n\", \"output\": [\"ab\"]}, {\"input\": \"aaaaaaa aaaaaa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"a a\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"a aa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"a b\\r\\n\", \"output\": [\"ab\"]}, {\"input\": \"b a\\r\\n\", \"output\": [\"ba\"]}, {\"input\": \"z a\\r\\n\", \"output\": [\"za\"]}, {\"input\": \"aaa a\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aa aa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"a aaa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aaaaaaaaaa aaaaaaaaaa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aaaaaaaaaa a\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"a aaaaaaaaaa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"zzaa b\\r\\n\", \"output\": [\"zb\"]}, {\"input\": \"ca cf\\r\\n\", \"output\": [\"cac\"]}, {\"input\": \"abhi ia\\r\\n\", \"output\": [\"abhi\"]}, {\"input\": \"aaaa aaaab\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"aar raa\\r\\n\", \"output\": [\"aar\"]}, {\"input\": \"harry hotter\\r\\n\", \"output\": [\"hah\"]}, {\"input\": \"aaaaaaa a\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"apple pie\\r\\n\", \"output\": [\"ap\"]}, {\"input\": \"aaa aaa\\r\\n\", \"output\": [\"aa\"]}, {\"input\": \"kabc buba\\r\\n\", \"output\": [\"kab\"]}, {\"input\": \"asd ss\\r\\n\", \"output\": [\"as\"]}, {\"input\": \"bbb b\\r\\n\", \"output\": [\"bb\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'h qart\\r\\n', 'output': ['hq']}, {'input': 'cgpegngs aufzxkyyrw\\r\\n', 'output': ['ca']}, {'input': 'bbb b\\r\\n', 'output': ['bb']}, {'input': 'lwli ewrpu\\r\\n', 'output': ['le']}, {'input': 'badkiln yort\\r\\n', 'output': ['badkilny']}]","human_sample_testcases_2":"[{'input': 'tom riddle\\r\\n', 'output': ['tomr']}, {'input': 'udggmyop ze\\r\\n', 'output': ['udggmyopz']}, {'input': 'amolfed pun\\r\\n', 'output': ['amolfedp']}, {'input': 'aaaaaaaaaz york\\r\\n', 'output': ['aaaaaaaaay']}, {'input': 'a b\\r\\n', 'output': ['ab']}]","human_sample_testcases_3":"[{'input': 'vugvblnzx kqdwdulm\\r\\n', 'output': ['vk']}, {'input': 'aaaaaaaaaa a\\r\\n', 'output': ['aa']}, {'input': 'd kgfpjsurfw\\r\\n', 'output': ['dk']}, {'input': 'obljndajv q\\r\\n', 'output': ['obljndajq']}, {'input': 'bgopsdfji uaps\\r\\n', 'output': ['bgopsdfjiu']}]","human_sample_testcases_4":"[{'input': 'z a\\r\\n', 'output': ['za']}, {'input': 'h qart\\r\\n', 'output': ['hq']}, {'input': 'aaaaaaaaaa aaaaaaaaaa\\r\\n', 'output': ['aa']}, {'input': 'aa ab\\r\\n', 'output': ['aa']}, {'input': 'aaaaaaa aaaaaa\\r\\n', 'output': ['aa']}]","human_sample_testcases_5":"[{'input': 'aaaaaaa aaaaaa\\r\\n', 'output': ['aa']}, {'input': 'aar raa\\r\\n', 'output': ['aar']}, {'input': 'a aaa\\r\\n', 'output': ['aa']}, {'input': 'wixjzniiub ssdfodfgap\\r\\n', 'output': ['wis']}, {'input': 'd kgfpjsurfw\\r\\n', 'output': ['dk']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":90.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":75.0,"human_sample_branch_coverage_5":100.0,"id":340,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.0,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"7\\nj......\", \"7\\n...feon\", \"7\\n.l.r.o.\"]","input_specification":"First line contains an integer n (6\u2009\u2264\u2009n\u2009\u2264\u20098) \u2013 the length of the string. Next line contains a string consisting of n characters, each of which is either a lower case english letter (indicating a known letter) or a dot character (indicating an empty cell in the crossword).","src_uid":"ec3d15ff198d1e4ab9fd04dd3b12e6c0","source_code":"import re\ninput()\nprint(next(filter(re.compile(input()[:-3] + '$').match, ['vapor', 'jolt', 'flar', 'esp', 'umbr', 'leaf', 'glac', 'sylv'])) + 'eon')\n","sample_outputs":"[\"jolteon\", \"leafeon\", \"flareon\"]","lang_cluster":"Python","notes":"NoteHere's a set of names in a form you can paste into your solution:[\"vaporeon\", \"jolteon\", \"flareon\", \"espeon\", \"umbreon\", \"leafeon\", \"glaceon\", \"sylveon\"]{\"vaporeon\", \"jolteon\", \"flareon\", \"espeon\", \"umbreon\", \"leafeon\", \"glaceon\", \"sylveon\"}","output_specification":"Print a name of the pokemon that Eevee can evolve into that matches the pattern in the input. Use lower case letters only to print the name (in particular, do not capitalize the first letter).","description":"You are solving the crossword problem K from IPSC 2014. You solved all the clues except for one: who does Eevee evolve into? You are not very into pokemons, but quick googling helped you find out, that Eevee can evolve into eight different pokemons: Vaporeon, Jolteon, Flareon, Espeon, Umbreon, Leafeon, Glaceon, and Sylveon.You know the length of the word in the crossword, and you already know some letters. Designers of the crossword made sure that the answer is unambiguous, so you can assume that exactly one pokemon out of the 8 that Eevee evolves into fits the length and the letters given. Your task is to find it.","human_testcases":"[{\"input\": \"7\\r\\nj......\\r\\n\", \"output\": [\"jolteon\"]}, {\"input\": \"7\\r\\n...feon\\r\\n\", \"output\": [\"leafeon\"]}, {\"input\": \"7\\r\\n.l.r.o.\\r\\n\", \"output\": [\"flareon\"]}, {\"input\": \"6\\r\\n.s..o.\\r\\n\", \"output\": [\"espeon\"]}, {\"input\": \"7\\r\\n.mb....\\r\\n\", \"output\": [\"umbreon\"]}, {\"input\": \"7\\r\\nglaceon\\r\\n\", \"output\": [\"glaceon\"]}, {\"input\": \"7\\r\\n.y.....\\r\\n\", \"output\": [\"sylveon\"]}, {\"input\": \"8\\r\\n.a.o.e.n\\r\\n\", \"output\": [\"vaporeon\"]}, {\"input\": \"6\\r\\n......\\r\\n\", \"output\": [\"espeon\"]}, {\"input\": \"8\\r\\n........\\r\\n\", \"output\": [\"vaporeon\"]}, {\"input\": \"6\\r\\n..p...\\r\\n\", \"output\": [\"espeon\"]}, {\"input\": \"7\\r\\n.laceon\\r\\n\", \"output\": [\"glaceon\"]}, {\"input\": \"8\\r\\n..p.....\\r\\n\", \"output\": [\"vaporeon\"]}, {\"input\": \"7\\r\\n..lveon\\r\\n\", \"output\": [\"sylveon\"]}, {\"input\": \"7\\r\\n.l.ceon\\r\\n\", \"output\": [\"glaceon\"]}, {\"input\": \"7\\r\\n.l.c...\\r\\n\", \"output\": [\"glaceon\"]}, {\"input\": \"7\\r\\n..b....\\r\\n\", \"output\": [\"umbreon\"]}, {\"input\": \"7\\r\\n..areon\\r\\n\", \"output\": [\"flareon\"]}, {\"input\": \"7\\r\\n..ar...\\r\\n\", \"output\": [\"flareon\"]}, {\"input\": \"7\\r\\n..lv...\\r\\n\", \"output\": [\"sylveon\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7\\r\\n.l.c...\\r\\n', 'output': ['glaceon']}, {'input': '7\\r\\n.y.....\\r\\n', 'output': ['sylveon']}, {'input': '7\\r\\n..lveon\\r\\n', 'output': ['sylveon']}, {'input': '7\\r\\n.l.ceon\\r\\n', 'output': ['glaceon']}, {'input': '8\\r\\n........\\r\\n', 'output': ['vaporeon']}]","human_sample_testcases_2":"[{'input': '7\\r\\n..lveon\\r\\n', 'output': ['sylveon']}, {'input': '7\\r\\n.mb....\\r\\n', 'output': ['umbreon']}, {'input': '7\\r\\n.laceon\\r\\n', 'output': ['glaceon']}, {'input': '8\\r\\n..p.....\\r\\n', 'output': ['vaporeon']}, {'input': '7\\r\\n.l.c...\\r\\n', 'output': ['glaceon']}]","human_sample_testcases_3":"[{'input': '7\\r\\n.l.ceon\\r\\n', 'output': ['glaceon']}, {'input': '7\\r\\n.l.c...\\r\\n', 'output': ['glaceon']}, {'input': '7\\r\\n..lv...\\r\\n', 'output': ['sylveon']}, {'input': '8\\r\\n..p.....\\r\\n', 'output': ['vaporeon']}, {'input': '8\\r\\n........\\r\\n', 'output': ['vaporeon']}]","human_sample_testcases_4":"[{'input': '6\\r\\n......\\r\\n', 'output': ['espeon']}, {'input': '7\\r\\n..lv...\\r\\n', 'output': ['sylveon']}, {'input': '7\\r\\n.laceon\\r\\n', 'output': ['glaceon']}, {'input': '7\\r\\n..areon\\r\\n', 'output': ['flareon']}, {'input': '7\\r\\n.l.c...\\r\\n', 'output': ['glaceon']}]","human_sample_testcases_5":"[{'input': '8\\r\\n..p.....\\r\\n', 'output': ['vaporeon']}, {'input': '7\\r\\n..ar...\\r\\n', 'output': ['flareon']}, {'input': '8\\r\\n........\\r\\n', 'output': ['vaporeon']}, {'input': '7\\r\\n..lv...\\r\\n', 'output': ['sylveon']}, {'input': '6\\r\\n......\\r\\n', 'output': ['espeon']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":341,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"-2 1\", \"2 1\", \"4 3\"]","input_specification":"The first and single line contains two integers x and y \u2014 the coordinates of the hole made in the clock by the ball. Each of the numbers x and y has an absolute value that does not exceed 1000.","src_uid":"8c92aac1bef5822848a136a1328346c6","source_code":"x, y = map(int, input().split())\np = x * x + y * y\nd = int(p ** 0.5)\nif d * d == p: print('black')\nelse:\n if x * y < 0: print('black' if d % 2 else 'white')\n else: print('white' if d % 2 else 'black')","sample_outputs":"[\"white\", \"black\", \"black\"]","lang_cluster":"Python","notes":null,"output_specification":"Find the required color. All the points between which and the origin of coordinates the distance is integral-value are painted black.","description":"Not so long ago as a result of combat operations the main Berland place of interest \u2014 the magic clock \u2014 was damaged. The cannon's balls made several holes in the clock, that's why the residents are concerned about the repair. The magic clock can be represented as an infinite Cartesian plane, where the origin corresponds to the clock center. The clock was painted two colors as is shown in the picture: The picture shows only the central part of the clock. This coloring naturally extends to infinity.The balls can be taken to be points on the plane. Your task is to find the color of the area, damaged by the given ball.All the points located on the border of one of the areas have to be considered painted black.","human_testcases":"[{\"input\": \"-2 1\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"4 3\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-4 4\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"4 -4\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-4 -4\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"0 0\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"0 2\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"0 1000\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"1000 0\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-1000 0\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"0 -1000\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"1000 -1000\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"12 5\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"12 -5\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-12 -35\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"20 -21\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-677 492\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-673 -270\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-668 970\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-220 208\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-215 -996\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-211 243\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-206 -518\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-201 278\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-196 -484\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"902 479\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-441 572\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"217 221\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"875 -129\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-469 -36\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"189 -387\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"847 -294\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-496 -644\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-281 -552\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"377 -902\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"165 -738\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"61 -175\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-42 389\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-589 952\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-693 -929\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"-796 -365\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"658 198\\r\\n\", \"output\": [\"white\"]}, {\"input\": \"555 319\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"8 882\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-96 -556\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-129 489\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"207 -224\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"64 0\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"17 144\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"60 -448\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-399 -40\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"128 -504\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"0 72\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"168 -26\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"72 -154\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"117 -44\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-72 -646\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"253 -204\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-40 198\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-216 -90\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"15 -8\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-180 -432\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"280 342\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"132 224\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"-192 -256\\r\\n\", \"output\": [\"black\"]}, {\"input\": \"351 -280\\r\\n\", \"output\": [\"black\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '253 -204\\r\\n', 'output': ['black']}, {'input': '-469 -36\\r\\n', 'output': ['black']}, {'input': '351 -280\\r\\n', 'output': ['black']}, {'input': '132 224\\r\\n', 'output': ['black']}, {'input': '4 4\\r\\n', 'output': ['white']}]","human_sample_testcases_2":"[{'input': '-589 952\\r\\n', 'output': ['black']}, {'input': '72 -154\\r\\n', 'output': ['black']}, {'input': '-40 198\\r\\n', 'output': ['black']}, {'input': '0 2\\r\\n', 'output': ['black']}, {'input': '0 0\\r\\n', 'output': ['black']}]","human_sample_testcases_3":"[{'input': '-1000 0\\r\\n', 'output': ['black']}, {'input': '-211 243\\r\\n', 'output': ['black']}, {'input': '-206 -518\\r\\n', 'output': ['white']}, {'input': '902 479\\r\\n', 'output': ['white']}, {'input': '-4 -4\\r\\n', 'output': ['white']}]","human_sample_testcases_4":"[{'input': '-4 4\\r\\n', 'output': ['black']}, {'input': '-668 970\\r\\n', 'output': ['black']}, {'input': '-215 -996\\r\\n', 'output': ['black']}, {'input': '555 319\\r\\n', 'output': ['black']}, {'input': '72 -154\\r\\n', 'output': ['black']}]","human_sample_testcases_5":"[{'input': '17 144\\r\\n', 'output': ['black']}, {'input': '875 -129\\r\\n', 'output': ['white']}, {'input': '-40 198\\r\\n', 'output': ['black']}, {'input': '-180 -432\\r\\n', 'output': ['black']}, {'input': '8 882\\r\\n', 'output': ['black']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":83.33,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":342,"human_sample_pass_rate":100.0,"human_sample_line_coverage":96.666,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"78 87\", \"1 1\"]","input_specification":"The first letter contains two space-separated numbers a and b (1\u2009\u2264\u2009a,\u2009b\u2009\u2264\u20091000) which represent the given summands.","src_uid":"8ccfb9b1fef6a992177cc49bd56fab7b","source_code":"a, b = input().split()\nx = int(max(a + b)) + 1\ns, v = int(a, x) + int(b, x), 0\nwhile s:\n s, v = s \/\/ x, v + 1\nprint(v)","sample_outputs":"[\"3\", \"2\"]","lang_cluster":"Python","notes":null,"output_specification":"Print a single number \u2014 the length of the longest answer.","description":"Vasya studies positional numeral systems. Unfortunately, he often forgets to write the base of notation in which the expression is written. Once he saw a note in his notebook saying a\u2009+\u2009b\u2009=\u2009?, and that the base of the positional notation wasn\u2019t written anywhere. Now Vasya has to choose a base p and regard the expression as written in the base p positional notation. Vasya understood that he can get different results with different bases, and some bases are even invalid. For example, expression 78\u2009+\u200987 in the base 16 positional notation is equal to FF16, in the base 15 positional notation it is equal to 11015, in the base 10 one \u2014 to 16510, in the base 9 one \u2014 to 1769, and in the base 8 or lesser-based positional notations the expression is invalid as all the numbers should be strictly less than the positional notation base. Vasya got interested in what is the length of the longest possible expression value. Help him to find this length.The length of a number should be understood as the number of numeric characters in it. For example, the length of the longest answer for 78\u2009+\u200987\u2009=\u2009? is 3. It is calculated like that in the base 15 (11015), base 10 (16510), base 9 (1769) positional notations, for example, and in some other ones.","human_testcases":"[{\"input\": \"78 87\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"9 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"11 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"43 21\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"84 89\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"12 34\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"99 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"11 99\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"99 99\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 466\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"149 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"999 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"998 998\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"998 999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"998 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999 998\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999 999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000 998\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000 999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000 1000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000 539\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999 619\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 511\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"877 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"379 999\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"247 1000\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"555 555\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"208 997\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"633 581\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"411 517\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"836 101\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"262 685\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"39 269\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"464 205\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"890 789\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"667 373\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"840 975\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"810 413\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"133 851\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"104 938\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"427 376\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"398 815\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"721 253\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"692 339\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"15 778\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"986 216\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"450 277\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"333 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"499 499\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"79 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"87 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"47 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"87 8\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 11\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000 1000\\r\\n', 'output': ['5']}, {'input': '986 216\\r\\n', 'output': ['4']}, {'input': '262 685\\r\\n', 'output': ['4']}, {'input': '1 999\\r\\n', 'output': ['4']}, {'input': '99 11\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '87 8\\r\\n', 'output': ['3']}, {'input': '78 87\\r\\n', 'output': ['3']}, {'input': '2 1\\r\\n', 'output': ['2']}, {'input': '11 99\\r\\n', 'output': ['3']}, {'input': '1000 1000\\r\\n', 'output': ['5']}]","human_sample_testcases_3":"[{'input': '2 2\\r\\n', 'output': ['2']}, {'input': '890 789\\r\\n', 'output': ['4']}, {'input': '262 685\\r\\n', 'output': ['4']}, {'input': '999 1000\\r\\n', 'output': ['4']}, {'input': '3 3\\r\\n', 'output': ['2']}]","human_sample_testcases_4":"[{'input': '9 7\\r\\n', 'output': ['2']}, {'input': '998 1000\\r\\n', 'output': ['4']}, {'input': '208 997\\r\\n', 'output': ['4']}, {'input': '999 998\\r\\n', 'output': ['4']}, {'input': '104 938\\r\\n', 'output': ['4']}]","human_sample_testcases_5":"[{'input': '43 21\\r\\n', 'output': ['3']}, {'input': '1 466\\r\\n', 'output': ['3']}, {'input': '3 2\\r\\n', 'output': ['2']}, {'input': '79 1\\r\\n', 'output': ['2']}, {'input': '667 373\\r\\n', 'output': ['4']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":343,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n1 1 0 1\", \"6\\n0 1 0 0 1 0\", \"1\\n0\"]","input_specification":"The first line contains one integer number n (1\u2009\u2264\u2009n\u2009\u2264\u2009100). The second line contains n space-separated integer numbers s1,\u2009s2,\u2009...,\u2009sn (0\u2009\u2264\u2009si\u2009\u2264\u20091). 0 corresponds to an unsuccessful game, 1 \u2014 to a successful one.","src_uid":"c7b1f0b40e310f99936d1c33e4816b95","source_code":"n = int(input())\nt = -1\nan = 0\na = list(map(int, input().split()))\nwhile a.count(1):\n an = max(a.index(1) + a.count(1), an)\n del a[a.index(1)]\n \nprint(max(an, len(a)))\n","sample_outputs":"[\"3\", \"4\", \"1\"]","lang_cluster":"Python","notes":null,"output_specification":"Print one integer \u2014 the maximum number of games Hideo can leave in his CV so that no unsuccessful game comes after a successful one.","description":"Hideo Kojima has just quit his job at Konami. Now he is going to find a new place to work. Despite being such a well-known person, he still needs a CV to apply for a job.During all his career Hideo has produced n games. Some of them were successful, some were not. Hideo wants to remove several of them (possibly zero) from his CV to make a better impression on employers. As a result there should be no unsuccessful game which comes right after successful one in his CV.More formally, you are given an array s1,\u2009s2,\u2009...,\u2009sn of zeros and ones. Zero corresponds to an unsuccessful game, one \u2014 to a successful one. Games are given in order they were produced, and Hideo can't swap these values. He should remove some elements from this array in such a way that no zero comes right after one.Besides that, Hideo still wants to mention as much games in his CV as possible. Help this genius of a man determine the maximum number of games he can leave in his CV.","human_testcases":"[{\"input\": \"4\\r\\n1 1 0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"6\\r\\n0 1 0 0 1 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100\\r\\n0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100\\r\\n1 1 0 1 1 0 0 0 0 1 0 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 0 1\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"3\\r\\n1 0 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n1 1 0 0 0 1 1 0 0 0\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"90\\r\\n1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"4\\r\\n1 0 0 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n0 1 0 0 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n1 0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n1 1 0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"16\\r\\n1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1\\r\\n\", \"output\": [\"9\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6\\r\\n0 1 0 0 1 0\\r\\n', 'output': ['4']}, {'input': '78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n', 'output': ['42']}, {'input': '16\\r\\n1 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1\\r\\n', 'output': ['9']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['100']}, {'input': '4\\r\\n1 0 0 1\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '3\\r\\n1 0 0\\r\\n', 'output': ['2']}, {'input': '4\\r\\n1 1 0 1\\r\\n', 'output': ['3']}, {'input': '5\\r\\n0 1 0 0 1\\r\\n', 'output': ['4']}, {'input': '1\\r\\n1\\r\\n', 'output': ['1']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['100']}]","human_sample_testcases_3":"[{'input': '3\\r\\n1 0 1\\r\\n', 'output': ['2']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['100']}, {'input': '100\\r\\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['100']}, {'input': '1\\r\\n0\\r\\n', 'output': ['1']}, {'input': '6\\r\\n0 1 0 0 1 0\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '90\\r\\n1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0\\r\\n', 'output': ['52']}, {'input': '5\\r\\n0 1 0 0 1\\r\\n', 'output': ['4']}, {'input': '4\\r\\n1 0 0 1\\r\\n', 'output': ['3']}, {'input': '1\\r\\n0\\r\\n', 'output': ['1']}, {'input': '78\\r\\n0 0 1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 0 0 1 0 0 0 0 1 0 1 0 0 1 0\\r\\n', 'output': ['42']}]","human_sample_testcases_5":"[{'input': '4\\r\\n1 0 0 1\\r\\n', 'output': ['3']}, {'input': '90\\r\\n1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 1 0 0 0 0 1 0 0 1 1 1 1 1 0 0 0 1 0\\r\\n', 'output': ['52']}, {'input': '100\\r\\n0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0\\r\\n', 'output': ['80']}, {'input': '2\\r\\n0 1\\r\\n', 'output': ['2']}, {'input': '10\\r\\n1 1 0 0 0 1 1 0 0 0\\r\\n', 'output': ['6']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":344,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 1\", \"2 3\", \"7 3\"]","input_specification":"The single line of the input contains two positive integers a and b (1\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009100) \u2014 the number of red and blue socks that Vasya's got.","src_uid":"775766790e91e539c1cfaa5030e5b955","source_code":"a, b = map(int, input().split())\nk = 0\nk2 = 0\nwhile a > 0 and b > 0:\n a -= 1\n b -= 1\n k += 1\nif a > 0:\n k2 = int(a\/\/2)\nelif b > 0:\n k2 = int(b\/\/2)\nprint(k, k2)","sample_outputs":"[\"1 1\", \"2 0\", \"3 2\"]","lang_cluster":"Python","notes":"NoteIn the first sample Vasya can first put on one pair of different socks, after that he has two red socks left to wear on the second day.","output_specification":"Print two space-separated integers \u2014 the maximum number of days when Vasya can wear different socks and the number of days when he can wear the same socks until he either runs out of socks or cannot make a single pair from the socks he's got. Keep in mind that at the end of the day Vasya throws away the socks that he's been wearing on that day.","description":"One day Vasya the Hipster decided to count how many socks he had. It turned out that he had a red socks and b blue socks.According to the latest fashion, hipsters should wear the socks of different colors: a red one on the left foot, a blue one on the right foot.Every day Vasya puts on new socks in the morning and throws them away before going to bed as he doesn't want to wash them.Vasya wonders, what is the maximum number of days when he can dress fashionable and wear different socks, and after that, for how many days he can then wear the same socks until he either runs out of socks or cannot make a single pair from the socks he's got.Can you help him?","human_testcases":"[{\"input\": \"3 1\\r\\n\", \"output\": [\"1 1\", \"1 1\", \"1\\r\\n1\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2 0\", \"2 0\", \"2\\r\\n0\"]}, {\"input\": \"7 3\\r\\n\", \"output\": [\"3\\r\\n2\", \"3 2\", \"3 2\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"100 0\", \"100 0\", \"100\\r\\n0\"]}, {\"input\": \"4 10\\r\\n\", \"output\": [\"4\\r\\n3\", \"4 3\", \"4 3\"]}, {\"input\": \"6 10\\r\\n\", \"output\": [\"6\\r\\n2\", \"6 2\", \"6 2\"]}, {\"input\": \"6 11\\r\\n\", \"output\": [\"6\\r\\n2\", \"6 2\", \"6 2\"]}, {\"input\": \"10 40\\r\\n\", \"output\": [\"10\\r\\n15\", \"10 15\", \"10 15\"]}, {\"input\": \"11 56\\r\\n\", \"output\": [\"11 22\", \"11\\r\\n22\", \"11 22\"]}, {\"input\": \"34 30\\r\\n\", \"output\": [\"30\\r\\n2\", \"30 2\", \"30 2\"]}, {\"input\": \"33 33\\r\\n\", \"output\": [\"33 0\", \"33\\r\\n0\", \"33 0\"]}, {\"input\": \"100 45\\r\\n\", \"output\": [\"45\\r\\n27\", \"45 27\", \"45 27\"]}, {\"input\": \"100 23\\r\\n\", \"output\": [\"23 38\", \"23\\r\\n38\", \"23 38\"]}, {\"input\": \"45 12\\r\\n\", \"output\": [\"12 16\", \"12 16\", \"12\\r\\n16\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1 0\", \"1\\r\\n0\", \"1 0\"]}, {\"input\": \"1 100\\r\\n\", \"output\": [\"1 49\", \"1 49\", \"1\\r\\n49\"]}, {\"input\": \"100 1\\r\\n\", \"output\": [\"1 49\", \"1 49\", \"1\\r\\n49\"]}, {\"input\": \"68 59\\r\\n\", \"output\": [\"59 4\", \"59\\r\\n4\", \"59 4\"]}, {\"input\": \"45 99\\r\\n\", \"output\": [\"45\\r\\n27\", \"45 27\", \"45 27\"]}, {\"input\": \"99 100\\r\\n\", \"output\": [\"99 0\", \"99 0\", \"99\\r\\n0\"]}, {\"input\": \"100 98\\r\\n\", \"output\": [\"98 1\", \"98\\r\\n1\", \"98 1\"]}, {\"input\": \"59 12\\r\\n\", \"output\": [\"12 23\", \"12 23\", \"12\\r\\n23\"]}, {\"input\": \"86 4\\r\\n\", \"output\": [\"4 41\", \"4\\r\\n41\", \"4 41\"]}, {\"input\": \"68 21\\r\\n\", \"output\": [\"21 23\", \"21 23\", \"21\\r\\n23\"]}, {\"input\": \"100 11\\r\\n\", \"output\": [\"11 44\", \"11\\r\\n44\", \"11 44\"]}, {\"input\": \"100 10\\r\\n\", \"output\": [\"10 45\", \"10\\r\\n45\", \"10 45\"]}, {\"input\": \"15 45\\r\\n\", \"output\": [\"15\\r\\n15\", \"15 15\", \"15 15\"]}, {\"input\": \"11 32\\r\\n\", \"output\": [\"11\\r\\n10\", \"11 10\", \"11 10\"]}, {\"input\": \"34 96\\r\\n\", \"output\": [\"34\\r\\n31\", \"34 31\", \"34 31\"]}, {\"input\": \"89 89\\r\\n\", \"output\": [\"89 0\", \"89 0\", \"89\\r\\n0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '45 99\\r\\n', 'output': ['45\\r\\n27', '45 27', '45 27']}, {'input': '100 1\\r\\n', 'output': ['1 49', '1 49', '1\\r\\n49']}, {'input': '68 21\\r\\n', 'output': ['21 23', '21 23', '21\\r\\n23']}, {'input': '100 10\\r\\n', 'output': ['10 45', '10\\r\\n45', '10 45']}, {'input': '11 32\\r\\n', 'output': ['11\\r\\n10', '11 10', '11 10']}]","human_sample_testcases_2":"[{'input': '2 3\\r\\n', 'output': ['2 0', '2 0', '2\\r\\n0']}, {'input': '15 45\\r\\n', 'output': ['15\\r\\n15', '15 15', '15 15']}, {'input': '68 59\\r\\n', 'output': ['59 4', '59\\r\\n4', '59 4']}, {'input': '11 56\\r\\n', 'output': ['11 22', '11\\r\\n22', '11 22']}, {'input': '100 10\\r\\n', 'output': ['10 45', '10\\r\\n45', '10 45']}]","human_sample_testcases_3":"[{'input': '10 40\\r\\n', 'output': ['10\\r\\n15', '10 15', '10 15']}, {'input': '1 100\\r\\n', 'output': ['1 49', '1 49', '1\\r\\n49']}, {'input': '100 98\\r\\n', 'output': ['98 1', '98\\r\\n1', '98 1']}, {'input': '33 33\\r\\n', 'output': ['33 0', '33\\r\\n0', '33 0']}, {'input': '11 32\\r\\n', 'output': ['11\\r\\n10', '11 10', '11 10']}]","human_sample_testcases_4":"[{'input': '10 40\\r\\n', 'output': ['10\\r\\n15', '10 15', '10 15']}, {'input': '100 98\\r\\n', 'output': ['98 1', '98\\r\\n1', '98 1']}, {'input': '4 10\\r\\n', 'output': ['4\\r\\n3', '4 3', '4 3']}, {'input': '100 10\\r\\n', 'output': ['10 45', '10\\r\\n45', '10 45']}, {'input': '100 1\\r\\n', 'output': ['1 49', '1 49', '1\\r\\n49']}]","human_sample_testcases_5":"[{'input': '100 45\\r\\n', 'output': ['45\\r\\n27', '45 27', '45 27']}, {'input': '7 3\\r\\n', 'output': ['3\\r\\n2', '3 2', '3 2']}, {'input': '10 40\\r\\n', 'output': ['10\\r\\n15', '10 15', '10 15']}, {'input': '34 30\\r\\n', 'output': ['30\\r\\n2', '30 2', '30 2']}, {'input': '100 1\\r\\n', 'output': ['1 49', '1 49', '1\\r\\n49']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":83.33,"id":345,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":86.664} {"sample_inputs":"[\"4 3 9\", \"4 3 24\", \"2 4 4\"]","input_specification":"The only line contains three integers n, m and k (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u200910\u2009000, 1\u2009\u2264\u2009k\u2009\u2264\u20092nm)\u00a0\u2014 the number of lanes, the number of desks in each lane and the number of Santa Claus' place.","src_uid":"d6929926b44c2d5b1a8e6b7f965ca1bb","source_code":"n, m, k = map(int, input().split())\nl = (k - 1) \/\/ (2 * m) + 1\n\nprint(l, ((k - 1) % (2 * m)) \/\/ 2 + 1, 'L' if k & 1 else 'R')","sample_outputs":"[\"2 2 L\", \"4 3 R\", \"1 2 R\"]","lang_cluster":"Python","notes":"NoteThe first and the second samples are shown on the picture. The green place corresponds to Santa Claus' place in the first example, the blue place corresponds to Santa Claus' place in the second example.In the third sample there are two lanes with four desks in each, and Santa Claus has the fourth place. Thus, his place is in the first lane at the second desk on the right.","output_specification":"Print two integers: the number of lane r, the number of desk d, and a character s, which stands for the side of the desk Santa Claus. The character s should be \"L\", if Santa Clause should sit on the left, and \"R\" if his place is on the right.","description":"Santa Claus is the first who came to the Christmas Olympiad, and he is going to be the first to take his place at a desk! In the classroom there are n lanes of m desks each, and there are two working places at each of the desks. The lanes are numbered from 1 to n from the left to the right, the desks in a lane are numbered from 1 to m starting from the blackboard. Note that the lanes go perpendicularly to the blackboard, not along it (see picture).The organizers numbered all the working places from 1 to 2nm. The places are numbered by lanes (i.\u00a0e. all the places of the first lane go first, then all the places of the second lane, and so on), in a lane the places are numbered starting from the nearest to the blackboard (i.\u00a0e. from the first desk in the lane), at each desk, the place on the left is numbered before the place on the right. The picture illustrates the first and the second samples. Santa Clause knows that his place has number k. Help him to determine at which lane at which desk he should sit, and whether his place is on the left or on the right!","human_testcases":"[{\"input\": \"4 3 9\\r\\n\", \"output\": [\"2 2 L\"]}, {\"input\": \"4 3 24\\r\\n\", \"output\": [\"4 3 R\"]}, {\"input\": \"2 4 4\\r\\n\", \"output\": [\"1 2 R\"]}, {\"input\": \"3 10 24\\r\\n\", \"output\": [\"2 2 R\"]}, {\"input\": \"10 3 59\\r\\n\", \"output\": [\"10 3 L\"]}, {\"input\": \"10000 10000 160845880\\r\\n\", \"output\": [\"8043 2940 R\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"1 1 2\\r\\n\", \"output\": [\"1 1 R\"]}, {\"input\": \"1 10000 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"1 10000 20000\\r\\n\", \"output\": [\"1 10000 R\"]}, {\"input\": \"10000 1 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"10000 1 10000\\r\\n\", \"output\": [\"5000 1 R\"]}, {\"input\": \"10000 1 20000\\r\\n\", \"output\": [\"10000 1 R\"]}, {\"input\": \"3 2 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"3 2 2\\r\\n\", \"output\": [\"1 1 R\"]}, {\"input\": \"3 2 3\\r\\n\", \"output\": [\"1 2 L\"]}, {\"input\": \"3 2 4\\r\\n\", \"output\": [\"1 2 R\"]}, {\"input\": \"3 2 5\\r\\n\", \"output\": [\"2 1 L\"]}, {\"input\": \"3 2 6\\r\\n\", \"output\": [\"2 1 R\"]}, {\"input\": \"3 2 7\\r\\n\", \"output\": [\"2 2 L\"]}, {\"input\": \"3 2 8\\r\\n\", \"output\": [\"2 2 R\"]}, {\"input\": \"3 2 9\\r\\n\", \"output\": [\"3 1 L\"]}, {\"input\": \"3 2 10\\r\\n\", \"output\": [\"3 1 R\"]}, {\"input\": \"3 2 11\\r\\n\", \"output\": [\"3 2 L\"]}, {\"input\": \"3 2 12\\r\\n\", \"output\": [\"3 2 R\"]}, {\"input\": \"300 2000 1068628\\r\\n\", \"output\": [\"268 314 R\"]}, {\"input\": \"300 2000 584756\\r\\n\", \"output\": [\"147 378 R\"]}, {\"input\": \"300 2000 268181\\r\\n\", \"output\": [\"68 91 L\"]}, {\"input\": \"10000 9999 186450844\\r\\n\", \"output\": [\"9324 4745 R\"]}, {\"input\": \"10000 9999 197114268\\r\\n\", \"output\": [\"9857 6990 R\"]}, {\"input\": \"10000 9999 112390396\\r\\n\", \"output\": [\"5621 818 R\"]}, {\"input\": \"10000 10000 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"10000 10000 2\\r\\n\", \"output\": [\"1 1 R\"]}, {\"input\": \"10000 10000 100000001\\r\\n\", \"output\": [\"5001 1 L\"]}, {\"input\": \"10000 10000 199999999\\r\\n\", \"output\": [\"10000 10000 L\"]}, {\"input\": \"10000 10000 200000000\\r\\n\", \"output\": [\"10000 10000 R\"]}, {\"input\": \"1 2 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"1 1 R\"]}, {\"input\": \"1 2 3\\r\\n\", \"output\": [\"1 2 L\"]}, {\"input\": \"1 2 4\\r\\n\", \"output\": [\"1 2 R\"]}, {\"input\": \"2 1 1\\r\\n\", \"output\": [\"1 1 L\"]}, {\"input\": \"2 1 2\\r\\n\", \"output\": [\"1 1 R\"]}, {\"input\": \"2 1 3\\r\\n\", \"output\": [\"2 1 L\"]}, {\"input\": \"2 1 4\\r\\n\", \"output\": [\"2 1 R\"]}, {\"input\": \"4 3 7\\r\\n\", \"output\": [\"2 1 L\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1 1 L\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 2 8\\r\\n', 'output': ['2 2 R']}, {'input': '1 2 4\\r\\n', 'output': ['1 2 R']}, {'input': '3 2 12\\r\\n', 'output': ['3 2 R']}, {'input': '10000 1 20000\\r\\n', 'output': ['10000 1 R']}, {'input': '10000 9999 197114268\\r\\n', 'output': ['9857 6990 R']}]","human_sample_testcases_2":"[{'input': '1 2 2\\r\\n', 'output': ['1 1 R']}, {'input': '10000 10000 1\\r\\n', 'output': ['1 1 L']}, {'input': '3 2 9\\r\\n', 'output': ['3 1 L']}, {'input': '3 2 7\\r\\n', 'output': ['2 2 L']}, {'input': '2 4 4\\r\\n', 'output': ['1 2 R']}]","human_sample_testcases_3":"[{'input': '1 10000 1\\r\\n', 'output': ['1 1 L']}, {'input': '3 2 5\\r\\n', 'output': ['2 1 L']}, {'input': '300 2000 1068628\\r\\n', 'output': ['268 314 R']}, {'input': '1 1 1\\r\\n', 'output': ['1 1 L']}, {'input': '2 1 2\\r\\n', 'output': ['1 1 R']}]","human_sample_testcases_4":"[{'input': '10000 10000 2\\r\\n', 'output': ['1 1 R']}, {'input': '1 10000 20000\\r\\n', 'output': ['1 10000 R']}, {'input': '1 2 1\\r\\n', 'output': ['1 1 L']}, {'input': '10 3 59\\r\\n', 'output': ['10 3 L']}, {'input': '10000 10000 1\\r\\n', 'output': ['1 1 L']}]","human_sample_testcases_5":"[{'input': '4 3 7\\r\\n', 'output': ['2 1 L']}, {'input': '10000 1 1\\r\\n', 'output': ['1 1 L']}, {'input': '10000 9999 112390396\\r\\n', 'output': ['5621 818 R']}, {'input': '3 2 11\\r\\n', 'output': ['3 2 L']}, {'input': '1 2 1\\r\\n', 'output': ['1 1 L']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":346,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\"]","input_specification":"The only line of the input contains one integer n (5\u2009\u2264\u2009n\u2009\u2264\u2009100) \u2014 the number of east to west paths and north to south paths.","src_uid":"92db14325cd8aee06b502c12d2e3dd81","source_code":"n = int(input())\nprint(((n*(n-1)*(n-2)*(n-3)*(n-4))**2)\/\/120)","sample_outputs":"[\"120\"]","lang_cluster":"Python","notes":null,"output_specification":"Output one integer \u2014 the number of ways to place the benches.","description":"The city park of IT City contains n east to west paths and n north to south paths. Each east to west path crosses each north to south path, so there are n2 intersections.The city funded purchase of five benches. To make it seems that there are many benches it was decided to place them on as many paths as possible. Obviously this requirement is satisfied by the following scheme: each bench is placed on a cross of paths and each path contains not more than one bench.Help the park administration count the number of ways to place the benches.","human_testcases":"[{\"input\": \"5\\r\\n\", \"output\": [\"120\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"4320\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"52920\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"1082161080\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"4594961280\"]}, {\"input\": \"72\\r\\n\", \"output\": [\"23491596420472320\"]}, {\"input\": \"83\\r\\n\", \"output\": [\"101159538130177920\"]}, {\"input\": \"95\\r\\n\", \"output\": [\"402852449038723320\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"613867215317368320\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"680185280130048000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6\\r\\n', 'output': ['4320']}, {'input': '95\\r\\n', 'output': ['402852449038723320']}, {'input': '72\\r\\n', 'output': ['23491596420472320']}, {'input': '17\\r\\n', 'output': ['4594961280']}, {'input': '83\\r\\n', 'output': ['101159538130177920']}]","human_sample_testcases_2":"[{'input': '83\\r\\n', 'output': ['101159538130177920']}, {'input': '5\\r\\n', 'output': ['120']}, {'input': '72\\r\\n', 'output': ['23491596420472320']}, {'input': '100\\r\\n', 'output': ['680185280130048000']}, {'input': '6\\r\\n', 'output': ['4320']}]","human_sample_testcases_3":"[{'input': '15\\r\\n', 'output': ['1082161080']}, {'input': '95\\r\\n', 'output': ['402852449038723320']}, {'input': '5\\r\\n', 'output': ['120']}, {'input': '100\\r\\n', 'output': ['680185280130048000']}, {'input': '17\\r\\n', 'output': ['4594961280']}]","human_sample_testcases_4":"[{'input': '17\\r\\n', 'output': ['4594961280']}, {'input': '83\\r\\n', 'output': ['101159538130177920']}, {'input': '6\\r\\n', 'output': ['4320']}, {'input': '5\\r\\n', 'output': ['120']}, {'input': '100\\r\\n', 'output': ['680185280130048000']}]","human_sample_testcases_5":"[{'input': '95\\r\\n', 'output': ['402852449038723320']}, {'input': '100\\r\\n', 'output': ['680185280130048000']}, {'input': '72\\r\\n', 'output': ['23491596420472320']}, {'input': '15\\r\\n', 'output': ['1082161080']}, {'input': '5\\r\\n', 'output': ['120']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":347,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 3\\n0 0\\n2 0\\n3 1\\n-2 1\\n0 3\\n2 2\", \"2 1\\n1 0\\n2 2\\n3 1\"]","input_specification":"The first line contains two space-separated integers R,\u2009B(1\u2009\u2264\u2009R,\u2009B\u2009\u2264\u200910). For 1\u2009\u2264\u2009i\u2009\u2264\u2009R, the i\u2009+\u20091-th line contains two space-separated integers xi and yi (|xi|,\u2009|yi|\u2009\u2264\u200910000) denoting the coordinates of the i-th Rebel spaceship. The following B lines have the same format, denoting the position of bases. It is guaranteed that no two points coincide and that no three points are on the same line.","src_uid":"65f81f621c228c09915adcb05256c634","source_code":"n,m=[int(x) for x in input().split()]\nfor i in range(n+m):\n s=input()\nif n==m:\n print('Yes')\nelse:\n print('No')","sample_outputs":"[\"Yes\", \"No\"]","lang_cluster":"Python","notes":"NoteFor the first example, one possible way is to connect the Rebels and bases in order.For the second example, there is no perfect matching between Rebels and bases.","output_specification":"If it is possible to connect Rebel spaceships and bases so as satisfy the constraint, output Yes, otherwise output No (without quote).","description":"The Rebel fleet is afraid that the Empire might want to strike back again. Princess Heidi needs to know if it is possible to assign R Rebel spaceships to guard B bases so that every base has exactly one guardian and each spaceship has exactly one assigned base (in other words, the assignment is a perfect matching). Since she knows how reckless her pilots are, she wants to be sure that any two (straight) paths \u2013 from a base to its assigned spaceship \u2013 do not intersect in the galaxy plane (that is, in 2D), and so there is no risk of collision.","human_testcases":"[{\"input\": \"3 3\\r\\n0 0\\r\\n2 0\\r\\n3 1\\r\\n-2 1\\r\\n0 3\\r\\n2 2\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"2 1\\r\\n1 0\\r\\n2 2\\r\\n3 1\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 1\\r\\n3686 4362\\r\\n-7485 5112\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"1 2\\r\\n1152 -7324\\r\\n-5137 -35\\r\\n-6045 -5271\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 3\\r\\n-8824 -9306\\r\\n-5646 -9767\\r\\n8123 9355\\r\\n-6203 -1643\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 5\\r\\n-8775 6730\\r\\n-3806 -6906\\r\\n-9256 -8240\\r\\n-1320 6849\\r\\n8155 746\\r\\n8284 -7317\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 8\\r\\n8741 3638\\r\\n381 -9191\\r\\n7534 8792\\r\\n-8848 -414\\r\\n2926 -7444\\r\\n9475 559\\r\\n6938 2359\\r\\n2570 4721\\r\\n3329 -9365\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 9\\r\\n6207 1655\\r\\n2728 8520\\r\\n9142 3418\\r\\n-1258 -8727\\r\\n5370 3161\\r\\n-5167 -7691\\r\\n517 2242\\r\\n3702 -9904\\r\\n-6862 -2997\\r\\n2524 -5492\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"1 10\\r\\n9424 3979\\r\\n-8582 9252\\r\\n-2432 -3287\\r\\n-4247 1932\\r\\n-9491 5544\\r\\n-635 5689\\r\\n8260 -6790\\r\\n8841 3067\\r\\n-5624 -1990\\r\\n1569 1045\\r\\n-8844 -8462\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 1\\r\\n2893 -5488\\r\\n-5087 -5042\\r\\n-8928 -9453\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 2\\r\\n359 -29\\r\\n6964 -7332\\r\\n2384 -4529\\r\\n4434 2253\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"2 3\\r\\n-9617 845\\r\\n4195 -2181\\r\\n-6305 -9903\\r\\n-535 -6060\\r\\n9417 -8419\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 5\\r\\n-9568 -3121\\r\\n-1408 2942\\r\\n-827 -7497\\r\\n4348 2432\\r\\n-7958 231\\r\\n6440 1896\\r\\n2647 -1305\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 8\\r\\n7948 3490\\r\\n2779 3512\\r\\n3403 -3024\\r\\n-3180 -4831\\r\\n6815 4601\\r\\n7631 9772\\r\\n-6320 -1060\\r\\n5592 362\\r\\n-785 4040\\r\\n8030 3272\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 9\\r\\n5414 -8195\\r\\n-5171 -1634\\r\\n5012 4161\\r\\n-5888 -585\\r\\n9258 2646\\r\\n5548 1523\\r\\n7259 -8619\\r\\n9580 5738\\r\\n-8715 706\\r\\n-2232 -3280\\r\\n1866 1775\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"2 10\\r\\n-5118 -3971\\r\\n-1169 -9140\\r\\n-7807 -3139\\r\\n9702 -5328\\r\\n8555 3460\\r\\n-1442 -733\\r\\n701 -2802\\r\\n-5784 2578\\r\\n8186 -4810\\r\\n-2722 -1013\\r\\n-9437 4021\\r\\n-5403 -1331\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 1\\r\\n-8199 -7896\\r\\n7015 -4898\\r\\n-499 -8710\\r\\n9953 -6411\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 2\\r\\n9268 -9879\\r\\n4245 2515\\r\\n-9188 -3786\\r\\n-2458 -2165\\r\\n3420 463\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 3\\r\\n-8149 697\\r\\n6593 7667\\r\\n2123 -9160\\r\\n-5165 9523\\r\\n747 -8933\\r\\n-1536 -2691\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"3 5\\r\\n-658 7030\\r\\n990 3086\\r\\n-4958 -6755\\r\\n7159 -1986\\r\\n5634 -7726\\r\\n1740 -1450\\r\\n1947 7835\\r\\n-2755 -4709\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 8\\r\\n-3143 -6360\\r\\n-5121 -6641\\r\\n-727 -9723\\r\\n-369 454\\r\\n-9298 4086\\r\\n5787 -1016\\r\\n2683 -9660\\r\\n-1089 1121\\r\\n-4898 7743\\r\\n418 5485\\r\\n7425 -6644\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 9\\r\\n6882 -8342\\r\\n4669 -8932\\r\\n882 4904\\r\\n-220 4700\\r\\n587 -5311\\r\\n3704 -1823\\r\\n6559 -6921\\r\\n-7399 6497\\r\\n-5387 -5890\\r\\n-9844 -1067\\r\\n5367 -7237\\r\\n-8314 -939\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"3 10\\r\\n-7100 -1623\\r\\n-3459 2172\\r\\n9676 1595\\r\\n-6053 4558\\r\\n-842 8819\\r\\n-9691 3144\\r\\n3440 -9112\\r\\n7034 4946\\r\\n4851 -2513\\r\\n430 4372\\r\\n-7175 -3497\\r\\n5719 381\\r\\n-8859 -1347\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 1\\r\\n9621 -154\\r\\n6694 -2348\\r\\n944 -7225\\r\\n-1568 -5543\\r\\n-3805 -872\\r\\n1204 -2651\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 2\\r\\n-355 -9579\\r\\n-1256 -4638\\r\\n-4890 7402\\r\\n-1420 -1297\\r\\n-1362 2290\\r\\n-879 9101\\r\\n9514 -6689\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 3\\r\\n9670 8440\\r\\n1091 -9784\\r\\n6422 4884\\r\\n3314 -9610\\r\\n8523 -7107\\r\\n-2963 8293\\r\\n3092 -3950\\r\\n-4093 -6502\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 5\\r\\n-2840 4475\\r\\n2931 -6923\\r\\n-659 -8125\\r\\n8197 -1118\\r\\n851 -5899\\r\\n313 6679\\r\\n-9751 6115\\r\\n-6415 4250\\r\\n-227 -9732\\r\\n-6282 5041\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"5 8\\r\\n-5325 1383\\r\\n-5441 3351\\r\\n-3870 1465\\r\\n669 -8381\\r\\n-4377 5913\\r\\n4360 -329\\r\\n8725 8620\\r\\n7810 -2479\\r\\n4019 4850\\r\\n8052 9911\\r\\n4130 -4668\\r\\n3744 2537\\r\\n-7171 -3933\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 9\\r\\n-2742 -600\\r\\n6609 8502\\r\\n-5118 6389\\r\\n-4300 5568\\r\\n-1934 -3484\\r\\n9719 -1137\\r\\n2303 -8641\\r\\n1500 2897\\r\\n-6172 -8783\\r\\n-2210 -6939\\r\\n9514 -5262\\r\\n-3773 -4081\\r\\n1983 -4032\\r\\n4503 -3496\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"5 10\\r\\n1493 7658\\r\\n-598 7650\\r\\n9226 -964\\r\\n2439 -3114\\r\\n366 2391\\r\\n-1008 -2258\\r\\n6063 8568\\r\\n7488 6824\\r\\n-4674 9523\\r\\n9590 9960\\r\\n-8361 -8234\\r\\n520 -1312\\r\\n-3878 -1142\\r\\n-8261 -239\\r\\n-2346 -2362\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 1\\r\\n-796 -1\\r\\n3591 -2510\\r\\n-6330 4706\\r\\n-7422 -9093\\r\\n7860 -7002\\r\\n5375 -5310\\r\\n3538 3108\\r\\n-9851 -9798\\r\\n-8884 -170\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 2\\r\\n-3330 -1983\\r\\n-6621 -4800\\r\\n-4721 9630\\r\\n9871 -4847\\r\\n-2256 -8957\\r\\n3292 -6118\\r\\n4558 -6712\\r\\n-5863 5282\\r\\n-9373 3938\\r\\n-5179 -8073\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 3\\r\\n6695 8593\\r\\n-7129 352\\r\\n6590 -5447\\r\\n-2540 -3457\\r\\n7630 1647\\r\\n8651 5634\\r\\n-1864 -6829\\r\\n7828 -1901\\r\\n-7005 -9695\\r\\n4561 -4921\\r\\n-4782 -6478\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 5\\r\\n6744 2367\\r\\n-5290 -7085\\r\\n-491 6662\\r\\n2343 -2407\\r\\n-43 2855\\r\\n-8075 6875\\r\\n-7265 -4206\\r\\n-4197 8851\\r\\n7433 780\\r\\n4038 -8321\\r\\n-1455 -7665\\r\\n3139 -1225\\r\\n9884 -167\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 8\\r\\n4260 1536\\r\\n-8545 6045\\r\\n-3702 3693\\r\\n-5185 -2228\\r\\n-5271 -5335\\r\\n-4027 4453\\r\\n-8790 8598\\r\\n7172 -5320\\r\\n-880 -4638\\r\\n-1630 -3452\\r\\n2076 8296\\r\\n-9116 -5599\\r\\n2461 9832\\r\\n4268 5116\\r\\n-7582 -805\\r\\n3548 3776\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"8 9\\r\\n-5716 6995\\r\\n1245 3754\\r\\n7610 8617\\r\\n-451 -5424\\r\\n-2828 5270\\r\\n-6111 6502\\r\\n-2653 1039\\r\\n3718 7498\\r\\n-8810 -7973\\r\\n667 -300\\r\\n-2838 -2001\\r\\n3367 5523\\r\\n-8386 -2827\\r\\n6929 -6260\\r\\n3247 1167\\r\\n1873 6265\\r\\n4376 -8781\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"8 10\\r\\n5844 -8156\\r\\n9676 -8121\\r\\n-6302 -1050\\r\\n-4823 -8343\\r\\n4736 -3859\\r\\n9129 5920\\r\\n-3990 2792\\r\\n3615 -8930\\r\\n-7831 -8703\\r\\n-5542 931\\r\\n7599 -7930\\r\\n8705 -8735\\r\\n-6438 1724\\r\\n-7568 -8351\\r\\n5893 2316\\r\\n2574 -9723\\r\\n2416 3827\\r\\n856 -4877\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 1\\r\\n8114 -9851\\r\\n872 -9807\\r\\n9541 5449\\r\\n7948 -3808\\r\\n8892 -7517\\r\\n-6767 3903\\r\\n-18 -311\\r\\n-3973 5845\\r\\n-3295 3533\\r\\n-4790 -4426\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 2\\r\\n5580 8167\\r\\n-7078 -4655\\r\\n3707 -9628\\r\\n2980 438\\r\\n1632 -9472\\r\\n-8850 -4346\\r\\n-6440 2428\\r\\n-2841 923\\r\\n6515 -2658\\r\\n-2492 -8716\\r\\n8219 5104\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 3\\r\\n8163 6185\\r\\n-4731 2757\\r\\n-4982 -4704\\r\\n3128 4684\\r\\n-8483 1132\\r\\n6807 2288\\r\\n4878 2311\\r\\n-6295 6299\\r\\n8882 -5992\\r\\n-195 4733\\r\\n6162 4510\\r\\n-7264 -1020\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 5\\r\\n-4347 -5222\\r\\n-2891 5618\\r\\n-4621 7404\\r\\n-4548 -6825\\r\\n3846 2340\\r\\n2640 3530\\r\\n-7965 4934\\r\\n-8617 -2950\\r\\n-9240 4483\\r\\n-718 6451\\r\\n-8251 -6379\\r\\n558 3484\\r\\n9861 -6432\\r\\n483 -7331\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 8\\r\\n-6832 -872\\r\\n1295 -4109\\r\\n-7832 -8123\\r\\n-2373 -6646\\r\\n-1383 -5849\\r\\n3832 -6334\\r\\n-7229 -2263\\r\\n-6951 -9678\\r\\n4709 1326\\r\\n-6386 -1239\\r\\n2721 -8159\\r\\n-4255 -890\\r\\n9880 3567\\r\\n3349 5921\\r\\n2487 -828\\r\\n-783 2422\\r\\n-5497 -8399\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"9 9\\r\\n3193 -2855\\r\\n787 -6399\\r\\n3479 9360\\r\\n5217 -9842\\r\\n1061 4755\\r\\n1748 -7142\\r\\n-6209 -2380\\r\\n6740 -4302\\r\\n-5482 5433\\r\\n3353 -5529\\r\\n664 1546\\r\\n8228 -9769\\r\\n-8409 -1650\\r\\n893 9365\\r\\n-9542 8585\\r\\n7245 -9972\\r\\n-475 -6359\\r\\n-3775 2139\\r\\n\", \"output\": [\"YES\", \"Yes\"]}, {\"input\": \"9 10\\r\\n-3581 3894\\r\\n7385 3191\\r\\n-8820 6540\\r\\n-577 -5900\\r\\n2781 -5943\\r\\n8322 -7944\\r\\n-1251 -5779\\r\\n-3567 3140\\r\\n8835 -6406\\r\\n-2390 -1126\\r\\n7006 4553\\r\\n-174 -7023\\r\\n-6538 1530\\r\\n3318 2477\\r\\n7864 -9657\\r\\n-2379 -6961\\r\\n4456 9852\\r\\n1462 -5871\\r\\n-9931 6466\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 1\\r\\n3362 3137\\r\\n-6006 -2168\\r\\n-9207 8006\\r\\n-6284 -114\\r\\n4617 -4997\\r\\n-4360 3540\\r\\n-6423 2328\\r\\n-8768 8468\\r\\n2899 1032\\r\\n-7561 -3623\\r\\n6979 653\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 2\\r\\n5945 8596\\r\\n-3658 -4459\\r\\n-7598 -7071\\r\\n3567 4132\\r\\n7060 -1835\\r\\n-6443 -4709\\r\\n4895 2211\\r\\n-4780 3546\\r\\n5266 7400\\r\\n2178 -472\\r\\n4922 -9643\\r\\n4163 6030\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 3\\r\\n3411 6614\\r\\n8392 693\\r\\n-8846 7555\\r\\n-1402 -4181\\r\\n-3055 -3789\\r\\n4033 -5516\\r\\n-1527 4950\\r\\n-792 8922\\r\\n-4925 4065\\r\\n4475 5536\\r\\n-9695 9764\\r\\n6943 -2849\\r\\n7022 1986\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 5\\r\\n3460 5504\\r\\n529 -6744\\r\\n4075 9961\\r\\n-3961 4311\\r\\n-7871 9977\\r\\n7308 -4275\\r\\n-6928 7573\\r\\n-3114 -327\\r\\n-3046 -5461\\r\\n3953 4398\\r\\n-4106 -3981\\r\\n-8092 -8048\\r\\n7590 9228\\r\\n9433 -4\\r\\n-8808 -6742\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 8\\r\\n8417 -444\\r\\n-5582 6386\\r\\n863 6992\\r\\n-4047 6751\\r\\n-5658 1788\\r\\n-1204 5862\\r\\n-6192 -2480\\r\\n813 -7056\\r\\n-9098 -1176\\r\\n-1715 -3292\\r\\n6866 -2905\\r\\n-7788 137\\r\\n7609 -774\\r\\n-7702 -6753\\r\\n-6622 -3090\\r\\n3089 -7006\\r\\n-9374 1882\\r\\n-481 -5698\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 9\\r\\n-9001 -9868\\r\\n4207 1240\\r\\n-7826 1618\\r\\n-6755 3555\\r\\n-3214 -167\\r\\n4155 -4648\\r\\n-2316 259\\r\\n4801 -1679\\r\\n-6730 8048\\r\\n-4535 -9843\\r\\n4809 -5759\\r\\n4695 -8742\\r\\n9321 -5991\\r\\n2401 4133\\r\\n6468 6324\\r\\n1414 -9103\\r\\n-6613 3922\\r\\n5544 -5092\\r\\n-6777 -788\\r\\n\", \"output\": [\"No\", \"NO\"]}, {\"input\": \"10 10\\r\\n8530 -3814\\r\\n-9330 -6035\\r\\n3951 -217\\r\\n-9276 8291\\r\\n636 -3118\\r\\n5024 -2403\\r\\n4601 7977\\r\\n-3620 -1428\\r\\n4954 -9632\\r\\n-9852 6553\\r\\n-3457 5430\\r\\n-8866 -7343\\r\\n1020 -5748\\r\\n5043 -3820\\r\\n-2832 1528\\r\\n-5058 -825\\r\\n2406 -3530\\r\\n9152 -7463\\r\\n-8547 7108\\r\\n2492 8953\\r\\n\", \"output\": [\"YES\", \"Yes\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '8 1\\r\\n-796 -1\\r\\n3591 -2510\\r\\n-6330 4706\\r\\n-7422 -9093\\r\\n7860 -7002\\r\\n5375 -5310\\r\\n3538 3108\\r\\n-9851 -9798\\r\\n-8884 -170\\r\\n', 'output': ['No', 'NO']}, {'input': '10 5\\r\\n3460 5504\\r\\n529 -6744\\r\\n4075 9961\\r\\n-3961 4311\\r\\n-7871 9977\\r\\n7308 -4275\\r\\n-6928 7573\\r\\n-3114 -327\\r\\n-3046 -5461\\r\\n3953 4398\\r\\n-4106 -3981\\r\\n-8092 -8048\\r\\n7590 9228\\r\\n9433 -4\\r\\n-8808 -6742\\r\\n', 'output': ['No', 'NO']}, {'input': '1 9\\r\\n6207 1655\\r\\n2728 8520\\r\\n9142 3418\\r\\n-1258 -8727\\r\\n5370 3161\\r\\n-5167 -7691\\r\\n517 2242\\r\\n3702 -9904\\r\\n-6862 -2997\\r\\n2524 -5492\\r\\n', 'output': ['No', 'NO']}, {'input': '10 8\\r\\n8417 -444\\r\\n-5582 6386\\r\\n863 6992\\r\\n-4047 6751\\r\\n-5658 1788\\r\\n-1204 5862\\r\\n-6192 -2480\\r\\n813 -7056\\r\\n-9098 -1176\\r\\n-1715 -3292\\r\\n6866 -2905\\r\\n-7788 137\\r\\n7609 -774\\r\\n-7702 -6753\\r\\n-6622 -3090\\r\\n3089 -7006\\r\\n-9374 1882\\r\\n-481 -5698\\r\\n', 'output': ['No', 'NO']}, {'input': '9 2\\r\\n5580 8167\\r\\n-7078 -4655\\r\\n3707 -9628\\r\\n2980 438\\r\\n1632 -9472\\r\\n-8850 -4346\\r\\n-6440 2428\\r\\n-2841 923\\r\\n6515 -2658\\r\\n-2492 -8716\\r\\n8219 5104\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_2":"[{'input': '8 1\\r\\n-796 -1\\r\\n3591 -2510\\r\\n-6330 4706\\r\\n-7422 -9093\\r\\n7860 -7002\\r\\n5375 -5310\\r\\n3538 3108\\r\\n-9851 -9798\\r\\n-8884 -170\\r\\n', 'output': ['No', 'NO']}, {'input': '9 3\\r\\n8163 6185\\r\\n-4731 2757\\r\\n-4982 -4704\\r\\n3128 4684\\r\\n-8483 1132\\r\\n6807 2288\\r\\n4878 2311\\r\\n-6295 6299\\r\\n8882 -5992\\r\\n-195 4733\\r\\n6162 4510\\r\\n-7264 -1020\\r\\n', 'output': ['No', 'NO']}, {'input': '8 9\\r\\n-5716 6995\\r\\n1245 3754\\r\\n7610 8617\\r\\n-451 -5424\\r\\n-2828 5270\\r\\n-6111 6502\\r\\n-2653 1039\\r\\n3718 7498\\r\\n-8810 -7973\\r\\n667 -300\\r\\n-2838 -2001\\r\\n3367 5523\\r\\n-8386 -2827\\r\\n6929 -6260\\r\\n3247 1167\\r\\n1873 6265\\r\\n4376 -8781\\r\\n', 'output': ['No', 'NO']}, {'input': '2 5\\r\\n-9568 -3121\\r\\n-1408 2942\\r\\n-827 -7497\\r\\n4348 2432\\r\\n-7958 231\\r\\n6440 1896\\r\\n2647 -1305\\r\\n', 'output': ['No', 'NO']}, {'input': '1 8\\r\\n8741 3638\\r\\n381 -9191\\r\\n7534 8792\\r\\n-8848 -414\\r\\n2926 -7444\\r\\n9475 559\\r\\n6938 2359\\r\\n2570 4721\\r\\n3329 -9365\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_3":"[{'input': '8 10\\r\\n5844 -8156\\r\\n9676 -8121\\r\\n-6302 -1050\\r\\n-4823 -8343\\r\\n4736 -3859\\r\\n9129 5920\\r\\n-3990 2792\\r\\n3615 -8930\\r\\n-7831 -8703\\r\\n-5542 931\\r\\n7599 -7930\\r\\n8705 -8735\\r\\n-6438 1724\\r\\n-7568 -8351\\r\\n5893 2316\\r\\n2574 -9723\\r\\n2416 3827\\r\\n856 -4877\\r\\n', 'output': ['No', 'NO']}, {'input': '5 5\\r\\n-2840 4475\\r\\n2931 -6923\\r\\n-659 -8125\\r\\n8197 -1118\\r\\n851 -5899\\r\\n313 6679\\r\\n-9751 6115\\r\\n-6415 4250\\r\\n-227 -9732\\r\\n-6282 5041\\r\\n', 'output': ['YES', 'Yes']}, {'input': '3 10\\r\\n-7100 -1623\\r\\n-3459 2172\\r\\n9676 1595\\r\\n-6053 4558\\r\\n-842 8819\\r\\n-9691 3144\\r\\n3440 -9112\\r\\n7034 4946\\r\\n4851 -2513\\r\\n430 4372\\r\\n-7175 -3497\\r\\n5719 381\\r\\n-8859 -1347\\r\\n', 'output': ['No', 'NO']}, {'input': '5 3\\r\\n9670 8440\\r\\n1091 -9784\\r\\n6422 4884\\r\\n3314 -9610\\r\\n8523 -7107\\r\\n-2963 8293\\r\\n3092 -3950\\r\\n-4093 -6502\\r\\n', 'output': ['No', 'NO']}, {'input': '9 2\\r\\n5580 8167\\r\\n-7078 -4655\\r\\n3707 -9628\\r\\n2980 438\\r\\n1632 -9472\\r\\n-8850 -4346\\r\\n-6440 2428\\r\\n-2841 923\\r\\n6515 -2658\\r\\n-2492 -8716\\r\\n8219 5104\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_4":"[{'input': '10 1\\r\\n3362 3137\\r\\n-6006 -2168\\r\\n-9207 8006\\r\\n-6284 -114\\r\\n4617 -4997\\r\\n-4360 3540\\r\\n-6423 2328\\r\\n-8768 8468\\r\\n2899 1032\\r\\n-7561 -3623\\r\\n6979 653\\r\\n', 'output': ['No', 'NO']}, {'input': '3 2\\r\\n9268 -9879\\r\\n4245 2515\\r\\n-9188 -3786\\r\\n-2458 -2165\\r\\n3420 463\\r\\n', 'output': ['No', 'NO']}, {'input': '2 2\\r\\n359 -29\\r\\n6964 -7332\\r\\n2384 -4529\\r\\n4434 2253\\r\\n', 'output': ['YES', 'Yes']}, {'input': '2 1\\r\\n2893 -5488\\r\\n-5087 -5042\\r\\n-8928 -9453\\r\\n', 'output': ['No', 'NO']}, {'input': '2 9\\r\\n5414 -8195\\r\\n-5171 -1634\\r\\n5012 4161\\r\\n-5888 -585\\r\\n9258 2646\\r\\n5548 1523\\r\\n7259 -8619\\r\\n9580 5738\\r\\n-8715 706\\r\\n-2232 -3280\\r\\n1866 1775\\r\\n', 'output': ['No', 'NO']}]","human_sample_testcases_5":"[{'input': '1 2\\r\\n1152 -7324\\r\\n-5137 -35\\r\\n-6045 -5271\\r\\n', 'output': ['No', 'NO']}, {'input': '10 2\\r\\n5945 8596\\r\\n-3658 -4459\\r\\n-7598 -7071\\r\\n3567 4132\\r\\n7060 -1835\\r\\n-6443 -4709\\r\\n4895 2211\\r\\n-4780 3546\\r\\n5266 7400\\r\\n2178 -472\\r\\n4922 -9643\\r\\n4163 6030\\r\\n', 'output': ['No', 'NO']}, {'input': '3 9\\r\\n6882 -8342\\r\\n4669 -8932\\r\\n882 4904\\r\\n-220 4700\\r\\n587 -5311\\r\\n3704 -1823\\r\\n6559 -6921\\r\\n-7399 6497\\r\\n-5387 -5890\\r\\n-9844 -1067\\r\\n5367 -7237\\r\\n-8314 -939\\r\\n', 'output': ['No', 'NO']}, {'input': '9 1\\r\\n8114 -9851\\r\\n872 -9807\\r\\n9541 5449\\r\\n7948 -3808\\r\\n8892 -7517\\r\\n-6767 3903\\r\\n-18 -311\\r\\n-3973 5845\\r\\n-3295 3533\\r\\n-4790 -4426\\r\\n', 'output': ['No', 'NO']}, {'input': '2 5\\r\\n-9568 -3121\\r\\n-1408 2942\\r\\n-827 -7497\\r\\n4348 2432\\r\\n-7958 231\\r\\n6440 1896\\r\\n2647 -1305\\r\\n', 'output': ['No', 'NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":83.33,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":83.33,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":83.33,"id":348,"human_sample_pass_rate":100.0,"human_sample_line_coverage":89.998,"human_sample_branch_coverage":89.998} {"sample_inputs":"[\"4 2 2\", \"5 1 5\"]","input_specification":"The only input line contains three integers $$$n$$$, $$$l$$$ and $$$r$$$ ($$$1 \\leq n \\leq 1\\,000$$$, $$$1 \\leq l \\leq r \\leq \\min(n, 20)$$$)\u00a0\u2014 an array's size, the minimal number and the maximal number of distinct elements in an array.","src_uid":"ce220726392fb0cacf0ec44a7490084a","source_code":"n,l,r=map(int,input().split())\nm=n\na=1\nx=0\nA=[]\nB=[]\nwhile n>0:\n if l==1:\n A.append(1)\n n-=1\n else:\n A.append(2**(l-1))\n l-=1\n n-=1\nwhile x 0:\n\tmid -=r4\n\tr22 -= r4\n\tif mid < 0:\n\t\tr22 -= (mid \/\/ -2)\n\t\tmid = 0\n\nif r22 + mid > r2:\n\tprint('NO')\nelse:\n\tprint('YES')\n\n\n\n\n\n","sample_outputs":"[\"YES\", \"NO\", \"YES\", \"YES\"]","lang_cluster":"Python","notes":"NoteIn the first sample, Daenerys can place the soldiers like in the figure below: In the second sample, there is no way to place the soldiers in the plane since the second group soldier will always have a seat neighboring to someone from the first group.In the third example Daenerys can place the first group on seats (1,\u20092,\u20097,\u20098), and the second group an all the remaining seats.In the fourth example she can place the first two groups on seats (1,\u20092) and (7,\u20098), the third group on seats (3), and the fourth group on seats (5,\u20096).","output_specification":"If we can place the soldiers in the airplane print \"YES\" (without quotes). Otherwise print \"NO\" (without quotes). You can choose the case (lower or upper) for each letter arbitrary.","description":"Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. She has recently bought an airplane to carry her army through the sea. The airplane has n rows, each of them has 8 seats. We call two seats neighbor, if they are in the same row and in seats {1,\u20092}, {3,\u20094}, {4,\u20095}, {5,\u20096} or {7,\u20098}. A row in the airplane Daenerys Targaryen wants to place her army in the plane so that there are no two soldiers from different groups sitting on neighboring seats.Your task is to determine if there is a possible arranging of her army in the airplane such that the condition above is satisfied.","human_testcases":"[{\"input\": \"2 2\\r\\n5 8\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n7 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2\\r\\n4 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9938\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 15\\r\\n165 26 83 64 235 48 36 51 3 18 5 10 9 6 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5691 91\\r\\n6573 1666 2158 2591 4636 886 263 4217 389 29 1513 1172 617 2012 1855 798 1588 979 152 37 890 375 1091 839 385 382 1 255 117 289 119 224 182 69 19 71 115 13 4 22 35 2 60 12 6 12 19 9 3 2 2 6 5 1 7 7 3 1 5 1 7 1 4 1 1 3 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5631\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2000 50\\r\\n203 89 1359 3105 898 1381 248 365 108 766 961 630 265 819 838 125 1751 289 177 81 131 564 102 95 49 74 92 101 19 17 156 5 5 4 20 9 25 16 16 2 8 5 4 2 1 3 4 1 3 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 100\\r\\n800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 2050 1074 605 979 1724 1608 672 88 1243 129 718 544 3590 37 187 600 738 34 64 316 58 6 84 252 75 68 40 68 4 29 29 8 13 11 5 1 5 1 3 2 1 1 1 2 3 4 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"8459 91\\r\\n778 338 725 1297 115 540 1452 2708 193 1806 1496 1326 2648 176 199 93 342 3901 2393 2718 800 3434 657 4037 291 690 1957 3280 73 6011 2791 1987 440 455 444 155 261 234 829 1309 1164 616 34 627 107 213 52 110 323 81 98 8 7 73 20 12 56 3 40 12 8 7 69 1 14 3 6 2 6 8 3 5 4 4 3 1 1 4 2 1 1 1 8 2 2 2 1 1 1 2 8421\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 91\\r\\n2351 1402 1137 2629 4718 1138 1839 1339 2184 2387 165 370 918 1476 2717 879 1152 5367 3940 608 941 766 1256 656 2768 916 4176 489 1989 1633 2725 2329 2795 1970 667 340 1275 120 870 488 225 59 64 255 207 3 37 127 19 224 34 283 144 50 132 60 57 29 18 6 7 4 4 15 3 5 1 10 5 2 3 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 9948\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 83\\r\\n64 612 2940 2274 1481 1713 860 1264 104 5616 2574 5292 4039 292 1416 854 3854 1140 4344 3904 1720 1968 442 884 2032 875 291 677 2780 3074 3043 2997 407 727 344 511 156 321 134 51 382 336 591 52 134 39 104 10 20 15 24 2 70 39 14 16 16 25 1 6 2 2 1 1 1 2 4 2 1 2 1 2 1 1 1 1 1 1 1 1 1 1 9968\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4000 71\\r\\n940 1807 57 715 532 212 3842 2180 2283 744 1453 800 1945 380 2903 293 633 391 2866 256 102 46 228 1099 434 210 244 14 27 4 63 53 3 9 36 25 1 12 2 14 12 28 2 28 8 5 11 8 2 3 6 4 1 1 1 3 2 1 1 1 2 2 1 1 1 1 1 2 1 1 3966\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3403 59\\r\\n1269 1612 453 795 1216 941 19 44 1796 324 2019 1397 651 382 841 2003 3013 638 1007 1001 351 95 394 149 125 13 116 183 20 78 208 19 152 10 151 177 16 23 17 22 8 1 3 2 6 1 5 3 13 1 8 4 3 4 4 4 2 2 3378\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2393 33\\r\\n1381 2210 492 3394 912 2927 1189 269 66 102 104 969 395 385 369 354 251 28 203 334 20 10 156 29 61 13 30 4 1 32 2 2 2436\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9939\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 89\\r\\n1001 1531 2489 457 1415 617 2057 2658 3030 789 2500 3420 1550 376 720 78 506 293 1978 383 3195 2036 891 1741 1817 486 2650 360 2250 2531 3250 1612 2759 603 5321 1319 791 1507 265 174 877 1861 572 172 580 536 777 165 169 11 125 31 186 113 78 27 25 37 8 21 48 24 4 33 35 13 15 1 3 2 2 8 3 5 1 1 6 1 1 2 1 1 2 2 1 1 2 1 9953\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 16\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 71\\r\\n110 14 2362 260 423 881 1296 3904 1664 849 57 631 1922 917 4832 1339 3398 4578 59 2663 2223 698 4002 3013 747 699 1230 2750 239 1409 6291 2133 1172 5824 181 797 26 281 574 557 19 82 624 387 278 53 64 163 22 617 15 35 42 48 14 140 171 36 28 22 5 49 17 5 10 14 13 1 3 3 9979\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3495 83\\r\\n2775 2523 1178 512 3171 1159 1382 2146 2192 1823 799 231 502 16 99 309 656 665 222 285 11 106 244 137 241 45 41 29 485 6 62 38 94 5 7 93 48 5 10 13 2 1 2 1 4 8 5 9 4 6 1 1 1 3 4 3 7 1 2 3 1 1 7 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 3443\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1000 40\\r\\n1701 1203 67 464 1884 761 11 559 29 115 405 133 174 63 147 93 41 19 1 15 41 8 33 4 4 1 4 1 1 2 1 2 1 1 2 1 1 2 1 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"347 20\\r\\n55 390 555 426 140 360 29 115 23 113 58 30 33 1 23 3 35 5 7 363\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9940\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10000 93\\r\\n1388 119 711 23 4960 4002 2707 188 813 1831 334 543 338 3402 1808 3368 1428 971 985 220 1521 457 457 140 332 1503 1539 2095 1891 269 5223 226 1528 190 428 5061 410 1587 1149 1934 2275 1337 1828 275 181 85 499 29 585 808 751 401 635 461 181 164 274 36 401 255 38 60 76 16 6 35 79 46 1 39 11 2 8 2 4 14 3 1 1 1 1 1 2 1 3 1 1 1 1 2 1 1 9948\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4981 51\\r\\n5364 2166 223 742 350 1309 15 229 4100 3988 227 1719 9 125 787 427 141 842 171 2519 32 2554 2253 721 775 88 720 9 397 513 100 291 111 32 238 42 152 108 5 58 96 53 7 19 11 2 5 5 6 2 4966\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"541 31\\r\\n607 204 308 298 398 213 1182 58 162 46 64 12 38 91 29 2 4 12 19 3 7 9 3 6 1 1 2 1 3 1 529\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"100 100\\r\\n6 129 61 6 87 104 45 28 3 35 2 14 1 37 2 4 24 4 3 1 6 4 2 1 1 3 1 2 2 9 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 4\\r\\n2 2 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 5\\r\\n8 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n2 2 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n4 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 3\\r\\n3 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 2 2 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 7\\r\\n12 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n4 1 3 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 15\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n6 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 13\\r\\n2 2 2 2 2 2 2 2 2 2 2 2 4\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n1 1 1 4 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 8\\r\\n8 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n1 1 1 1 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 9\\r\\n2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 2 2 5\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\n6\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 1\\r\\n16\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1\\r\\n2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 2 2 2 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 16\\r\\n1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 7\\r\\n4 1 1 1 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 2 2 5 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 1\\r\\n22\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 2 2 1 1 1 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3 12\\r\\n2 1 2 2 2 1 2 2 2 1 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 4\\r\\n2 2 3 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 6\\r\\n5 2 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20 100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3\\r\\n2 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2\\r\\n3 3\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n2 3 2 2 3 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 8\\r\\n2 2 1 1 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"2 6\\r\\n3 3 2 2 2 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 12\\r\\n2 2 2 2 2 2 2 2 2 1 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 10\\r\\n2 2 2 2 2 2 2 2 2 3\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 4\\r\\n2 1 2 2\\r\\n', 'output': ['YES']}, {'input': '1 3\\r\\n2 2 1\\r\\n', 'output': ['YES']}, {'input': '10000 100\\r\\n800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800 800\\r\\n', 'output': ['YES']}, {'input': '1 2\\r\\n4 4\\r\\n', 'output': ['YES']}, {'input': '10000 93\\r\\n1388 119 711 23 4960 4002 2707 188 813 1831 334 543 338 3402 1808 3368 1428 971 985 220 1521 457 457 140 332 1503 1539 2095 1891 269 5223 226 1528 190 428 5061 410 1587 1149 1934 2275 1337 1828 275 181 85 499 29 585 808 751 401 635 461 181 164 274 36 401 255 38 60 76 16 6 35 79 46 1 39 11 2 8 2 4 14 3 1 1 1 1 1 2 1 3 1 1 1 1 2 1 1 9948\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9939\\r\\n', 'output': ['NO']}, {'input': '4981 51\\r\\n5364 2166 223 742 350 1309 15 229 4100 3988 227 1719 9 125 787 427 141 842 171 2519 32 2554 2253 721 775 88 720 9 397 513 100 291 111 32 238 42 152 108 5 58 96 53 7 19 11 2 5 5 6 2 4966\\r\\n', 'output': ['NO']}, {'input': '1 4\\r\\n2 2 2 1\\r\\n', 'output': ['YES']}, {'input': '10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 2050 1074 605 979 1724 1608 672 88 1243 129 718 544 3590 37 187 600 738 34 64 316 58 6 84 252 75 68 40 68 4 29 29 8 13 11 5 1 5 1 3 2 1 1 1 2 3 4 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 3\\r\\n', 'output': ['NO']}, {'input': '1 4\\r\\n2 2 1 2\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '541 31\\r\\n607 204 308 298 398 213 1182 58 162 46 64 12 38 91 29 2 4 12 19 3 7 9 3 6 1 1 2 1 3 1 529\\r\\n', 'output': ['YES']}, {'input': '5691 91\\r\\n6573 1666 2158 2591 4636 886 263 4217 389 29 1513 1172 617 2012 1855 798 1588 979 152 37 890 375 1091 839 385 382 1 255 117 289 119 224 182 69 19 71 115 13 4 22 35 2 60 12 6 12 19 9 3 2 2 6 5 1 7 7 3 1 5 1 7 1 4 1 1 3 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5631\\r\\n', 'output': ['NO']}, {'input': '1 4\\r\\n1 1 2 2\\r\\n', 'output': ['YES']}, {'input': '100 15\\r\\n165 26 83 64 235 48 36 51 3 18 5 10 9 6 5\\r\\n', 'output': ['YES']}, {'input': '1 2\\r\\n3 3\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '4 16\\r\\n1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '2 6\\r\\n3 3 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '10000 100\\r\\n749 2244 949 2439 2703 44 2394 124 285 3694 3609 717 1413 155 974 1778 1448 1327 1487 3458 319 1395 3783 2184 2062 43 826 38 3276 807 1837 4635 171 1386 1768 1128 2020 2536 800 782 3058 174 455 83 647 595 658 109 33 23 70 39 38 1 6 35 94 9 22 12 6 1 2 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 9939\\r\\n', 'output': ['NO']}, {'input': '1000 40\\r\\n1701 1203 67 464 1884 761 11 559 29 115 405 133 174 63 147 93 41 19 1 15 41 8 33 4 4 1 4 1 1 2 1 2 1 1 2 1 1 2 1 4\\r\\n', 'output': ['NO']}, {'input': '1 4\\r\\n2 2 2 2\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '2 7\\r\\n2 2 2 2 2 2 2\\r\\n', 'output': ['YES']}, {'input': '1 4\\r\\n2 2 2 1\\r\\n', 'output': ['YES']}, {'input': '2 6\\r\\n2 2 2 2 2 5\\r\\n', 'output': ['YES']}, {'input': '1 3\\r\\n2 2 4\\r\\n', 'output': ['YES']}, {'input': '5691 91\\r\\n6573 1666 2158 2591 4636 886 263 4217 389 29 1513 1172 617 2012 1855 798 1588 979 152 37 890 375 1091 839 385 382 1 255 117 289 119 224 182 69 19 71 115 13 4 22 35 2 60 12 6 12 19 9 3 2 2 6 5 1 7 7 3 1 5 1 7 1 4 1 1 3 2 1 2 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5631\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.86,"human_sample_line_coverage_2":92.86,"human_sample_line_coverage_3":92.86,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":93.75,"human_sample_branch_coverage_2":93.75,"human_sample_branch_coverage_3":93.75,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":350,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.716,"human_sample_branch_coverage":96.25} {"sample_inputs":"[\"5 1 2 1 2\", \"3 3 1 1 1\", \"4 5 3 1 5\"]","input_specification":"The first line contains five integers s, v1, v2, t1, t2 (1\u2009\u2264\u2009s,\u2009v1,\u2009v2,\u2009t1,\u2009t2\u2009\u2264\u20091000)\u00a0\u2014 the number of characters in the text, the time of typing one character for the first participant, the time of typing one character for the the second participant, the ping of the first participant and the ping of the second participant.","src_uid":"10226b8efe9e3c473239d747b911a1ef","source_code":"\ndef t(a,b,c,d,e):\n #for i in range(5):\n # v.append (int(input(\"podaj liczbe\")))\n\n \n gr1=0\n gr2=0\n\n gr1=(b*a)+(d*2)\n gr2=(c*a)+(e*2)\n #print(gr1)\n #print(gr2)\n if gr1>gr2:\n print(\"Second\")\n if gr1 12: return False\n if day > month_year_to_day(month, year): return False\n return True\n\ndd, mm, yy = map(int, input().split('.'))\nbd, bm, by = map(int, input().split('.'))\n\nfound_sol = False\n\nfor p_bd, p_bm, p_by in it.permutations([bd, bm, by]):\n if good_date(p_bd, p_bm, p_by):\n year_diff = yy - p_by\n if year_diff > 18:\n found_sol = True\n break\n elif year_diff < 18:\n continue\n if p_bm < mm:\n found_sol = True\n break\n elif p_bm > mm:\n continue\n if p_bd < dd:\n found_sol = True\n break\n elif p_bd > dd:\n continue\n found_sol = True\n break\n\nif found_sol:\n print(\"YES\")\nelse:\n print(\"NO\")\n","sample_outputs":"[\"YES\", \"NO\", \"NO\"]","lang_cluster":"Python","notes":null,"output_specification":"If it is possible to rearrange the numbers in the date of birth so that Bob will be at least 18 years old on the DD.MM.YY, output YES. In the other case, output NO. Each number contains exactly two digits and stands for day, month or year in a date. Note that it is permitted to rearrange only numbers, not digits.","description":"The king Copa often has been reported about the Codeforces site, which is rapidly getting more and more popular among the brightest minds of the humanity, who are using it for training and competing. Recently Copa understood that to conquer the world he needs to organize the world Codeforces tournament. He hopes that after it the brightest minds will become his subordinates, and the toughest part of conquering the world will be completed.The final round of the Codeforces World Finals 20YY is scheduled for DD.MM.YY, where DD is the day of the round, MM is the month and YY are the last two digits of the year. Bob is lucky to be the first finalist form Berland. But there is one problem: according to the rules of the competition, all participants must be at least 18 years old at the moment of the finals. Bob was born on BD.BM.BY. This date is recorded in his passport, the copy of which he has already mailed to the organizers. But Bob learned that in different countries the way, in which the dates are written, differs. For example, in the US the month is written first, then the day and finally the year. Bob wonders if it is possible to rearrange the numbers in his date of birth so that he will be at least 18 years old on the day DD.MM.YY. He can always tell that in his motherland dates are written differently. Help him.According to another strange rule, eligible participant must be born in the same century as the date of the finals. If the day of the finals is participant's 18-th birthday, he is allowed to participate. As we are considering only the years from 2001 to 2099 for the year of the finals, use the following rule: the year is leap if it's number is divisible by four.","human_testcases":"[{\"input\": \"01.01.98\\r\\n01.01.80\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"20.10.20\\r\\n10.02.30\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"28.02.74\\r\\n28.02.64\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"05.05.25\\r\\n06.02.71\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"19.11.54\\r\\n29.11.53\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"01.06.84\\r\\n24.04.87\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30.06.43\\r\\n14.09.27\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"09.05.55\\r\\n25.09.42\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"14.05.21\\r\\n02.01.88\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"27.12.51\\r\\n26.06.22\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12.10.81\\r\\n18.11.04\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"26.04.11\\r\\n11.07.38\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"17.01.94\\r\\n17.03.58\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15.01.93\\r\\n23.04.97\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"14.04.92\\r\\n27.05.35\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13.08.91\\r\\n01.05.26\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14.08.89\\r\\n05.06.65\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13.11.88\\r\\n09.07.03\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"12.11.87\\r\\n14.08.42\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"11.03.86\\r\\n20.08.81\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"10.02.37\\r\\n25.09.71\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11.06.36\\r\\n24.01.25\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"02.05.90\\r\\n08.03.50\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"15.01.15\\r\\n01.08.58\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"31.10.41\\r\\n27.12.13\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14.06.18\\r\\n21.04.20\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15.12.62\\r\\n17.12.21\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13.03.69\\r\\n09.01.83\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"26.11.46\\r\\n03.05.90\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11.12.72\\r\\n29.06.97\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"25.08.49\\r\\n22.10.05\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"08.04.74\\r\\n18.03.60\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"03.11.79\\r\\n10.09.61\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29.03.20\\r\\n12.01.09\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"13.09.67\\r\\n07.09.48\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23.05.53\\r\\n31.10.34\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"08.07.20\\r\\n27.01.01\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10.05.64\\r\\n10.05.45\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19.09.93\\r\\n17.05.74\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"14.06.61\\r\\n01.11.42\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29.02.80\\r\\n29.02.60\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"21.02.59\\r\\n24.04.40\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"05.04.99\\r\\n19.08.80\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"02.06.59\\r\\n30.01.40\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"23.09.93\\r\\n12.11.74\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"09.08.65\\r\\n21.06.46\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"29.09.35\\r\\n21.07.17\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30.06.58\\r\\n21.05.39\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"06.08.91\\r\\n05.12.73\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"08.07.88\\r\\n15.01.69\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"07.10.55\\r\\n13.05.36\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"22.03.79\\r\\n04.03.61\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30.06.76\\r\\n03.10.57\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"03.03.70\\r\\n18.01.51\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"08.07.79\\r\\n25.08.60\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.09.92\\r\\n10.05.74\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"05.04.73\\r\\n28.09.54\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30.08.83\\r\\n13.04.65\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"08.04.64\\r\\n27.01.45\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"10.11.95\\r\\n09.04.77\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"19.11.36\\r\\n17.02.21\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"28.02.20\\r\\n11.01.29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.01.35\\r\\n16.02.29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.01.47\\r\\n28.02.29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"06.08.34\\r\\n16.02.29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30.09.46\\r\\n24.02.29\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.03.19\\r\\n01.02.29\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30.08.32\\r\\n02.02.29\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30.10.46\\r\\n25.02.29\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"06.03.20\\r\\n06.02.03\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.05.19\\r\\n08.01.04\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"31.05.19\\r\\n12.01.04\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"31.03.50\\r\\n02.11.32\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"03.12.98\\r\\n11.12.80\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"04.02.19\\r\\n01.03.02\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.05.21\\r\\n03.11.04\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"31.05.20\\r\\n02.12.04\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"31.03.36\\r\\n10.11.31\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"01.05.19\\r\\n03.01.28\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"30.12.68\\r\\n31.12.50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30.08.55\\r\\n31.08.37\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"30.08.41\\r\\n23.08.31\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '31.10.41\\r\\n27.12.13\\r\\n', 'output': ['YES']}, {'input': '20.10.20\\r\\n10.02.30\\r\\n', 'output': ['NO']}, {'input': '03.12.98\\r\\n11.12.80\\r\\n', 'output': ['YES']}, {'input': '05.04.99\\r\\n19.08.80\\r\\n', 'output': ['YES']}, {'input': '13.08.91\\r\\n01.05.26\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '08.04.64\\r\\n27.01.45\\r\\n', 'output': ['YES']}, {'input': '19.09.93\\r\\n17.05.74\\r\\n', 'output': ['YES']}, {'input': '30.08.83\\r\\n13.04.65\\r\\n', 'output': ['YES']}, {'input': '29.09.35\\r\\n21.07.17\\r\\n', 'output': ['YES']}, {'input': '29.02.80\\r\\n29.02.60\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '11.03.86\\r\\n20.08.81\\r\\n', 'output': ['NO']}, {'input': '30.08.83\\r\\n13.04.65\\r\\n', 'output': ['YES']}, {'input': '08.04.64\\r\\n27.01.45\\r\\n', 'output': ['YES']}, {'input': '05.04.99\\r\\n19.08.80\\r\\n', 'output': ['YES']}, {'input': '20.10.20\\r\\n10.02.30\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '19.11.36\\r\\n17.02.21\\r\\n', 'output': ['YES']}, {'input': '06.08.34\\r\\n16.02.29\\r\\n', 'output': ['YES']}, {'input': '13.11.88\\r\\n09.07.03\\r\\n', 'output': ['YES']}, {'input': '13.08.91\\r\\n01.05.26\\r\\n', 'output': ['YES']}, {'input': '10.02.37\\r\\n25.09.71\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '14.05.21\\r\\n02.01.88\\r\\n', 'output': ['NO']}, {'input': '05.04.73\\r\\n28.09.54\\r\\n', 'output': ['YES']}, {'input': '08.04.74\\r\\n18.03.60\\r\\n', 'output': ['NO']}, {'input': '02.06.59\\r\\n30.01.40\\r\\n', 'output': ['YES']}, {'input': '10.02.37\\r\\n25.09.71\\r\\n', 'output': ['NO']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":83.33,"human_sample_line_coverage_2":69.44,"human_sample_line_coverage_3":83.33,"human_sample_line_coverage_4":75.0,"human_sample_line_coverage_5":66.67,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":45.83,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":70.83,"human_sample_branch_coverage_5":62.5,"id":355,"human_sample_pass_rate":100.0,"human_sample_line_coverage":75.554,"human_sample_branch_coverage":69.164} {"sample_inputs":"[\"2\\nRB\", \"3\\nGRG\", \"5\\nBBBBB\"]","input_specification":"The first line of the input contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009200)\u00a0\u2014 the total number of cards. The next line contains a string s of length n \u2014 the colors of the cards. s contains only the characters 'B', 'G', and 'R', representing blue, green, and red, respectively.","src_uid":"4cedd3b70d793bc8ed4a93fc5a827f8f","source_code":"from collections import Counter\n\ndef go(s):\n ct = Counter(s)\n pos = ''.join(c for c in 'BGR' if ct[c] > 0)\n if len(pos) == 3 or len(pos) == 1:\n return pos\n \n one = ''.join(c for c in 'BGR' if ct[c] <= 1)\n \n if len(one) == 1:\n return 'BGR'\n if len(one) == 2:\n return one\n \n return ''.join(c for c in 'BGR' if ct[c] == 0)\n\ninput()\nprint(go(input()))\n","sample_outputs":"[\"G\", \"BR\", \"B\"]","lang_cluster":"Python","notes":"NoteIn the first sample, Catherine has one red card and one blue card, which she must exchange for a green card.In the second sample, Catherine has two green cards and one red card. She has two options: she can exchange the two green cards for a green card, then exchange the new green card and the red card for a blue card. Alternatively, she can exchange a green and a red card for a blue card, then exchange the blue card and remaining green card for a red card.In the third sample, Catherine only has blue cards, so she can only exchange them for more blue cards.","output_specification":"Print a single string of up to three characters\u00a0\u2014 the possible colors of the final card (using the same symbols as the input) in alphabetical order.","description":"Catherine has a deck of n cards, each of which is either red, green, or blue. As long as there are at least two cards left, she can do one of two actions: take any two (not necessarily adjacent) cards with different colors and exchange them for a new card of the third color; take any two (not necessarily adjacent) cards with the same color and exchange them for a new card with that color. She repeats this process until there is only one card left. What are the possible colors for the final card?","human_testcases":"[{\"input\": \"2\\r\\nRB\\r\\n\", \"output\": [\"G\"]}, {\"input\": \"3\\r\\nGRG\\r\\n\", \"output\": [\"BR\"]}, {\"input\": \"5\\r\\nBBBBB\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"1\\r\\nR\\r\\n\", \"output\": [\"R\"]}, {\"input\": \"200\\r\\nBBRGRRBBRGGGBGBGBGRRGRGRGRBGRGRRBBGRGBGRRGRRRGGBBRGBGBGBRBBBBBBBGGBRGGRRRGGRGBGBGGBRRRRBRRRBRBBGGBGBRGRGBBBBGGBGBBBGBGRRBRRRGBGGBBBRBGRBRRGGGRRGBBBGBGRRRRRRGGRGRGBBBRGGGBGGGBRBBRRGBGRGRBRRRBRBGRGGBRBB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"101\\r\\nRRRRRRRRRRRRRRRRRRRBRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\\r\\n\", \"output\": [\"BG\"]}, {\"input\": \"7\\r\\nBBBGBRG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"5\\r\\nGRRGR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"3\\r\\nGBR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"1\\r\\nB\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"2\\r\\nBB\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"1\\r\\nG\\r\\n\", \"output\": [\"G\"]}, {\"input\": \"2\\r\\nBG\\r\\n\", \"output\": [\"R\"]}, {\"input\": \"3\\r\\nBGB\\r\\n\", \"output\": [\"GR\"]}, {\"input\": \"2\\r\\nGG\\r\\n\", \"output\": [\"G\"]}, {\"input\": \"3\\r\\nGBG\\r\\n\", \"output\": [\"BR\"]}, {\"input\": \"4\\r\\nBGBG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"2\\r\\nBR\\r\\n\", \"output\": [\"G\"]}, {\"input\": \"3\\r\\nBRB\\r\\n\", \"output\": [\"GR\"]}, {\"input\": \"2\\r\\nRG\\r\\n\", \"output\": [\"B\"]}, {\"input\": \"3\\r\\nBGR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"4\\r\\nRBGB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"3\\r\\nGGR\\r\\n\", \"output\": [\"BR\"]}, {\"input\": \"4\\r\\nGGRB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"5\\r\\nBGBGR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"2\\r\\nRR\\r\\n\", \"output\": [\"R\"]}, {\"input\": \"3\\r\\nRBR\\r\\n\", \"output\": [\"BG\"]}, {\"input\": \"4\\r\\nRRBB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"3\\r\\nRRG\\r\\n\", \"output\": [\"BG\"]}, {\"input\": \"4\\r\\nBRRG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"5\\r\\nRBRBG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"4\\r\\nRGGR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"5\\r\\nBRGRG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"6\\r\\nGRRGBB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"150\\r\\nGRGBBBBRBGGBGBBGBBBBGRBBRRBBGRRGGGBRBBRGRRRRGBGRRBGBGBGRBBBGBBBGBGBRGBRRRRRGGGRGRBBGBRGGGRBBRGBBGRGGGBBRBRRGRGRRGRRGRRRGBGBRRGGRGGBRBGGGBBBRGRGBRGRRRR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"16\\r\\nRRGRRRRRRGGRGRRR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"190\\r\\nBBBBBBBBBBBBBBBBBGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\r\\n\", \"output\": [\"GR\"]}, {\"input\": \"200\\r\\nRGRGRRRRRGRRGRRRGRGRRRGGRGRRGGGRRGGRRRRRRRRRRRGRRGRRRGRRRGRRRRRRRGRRRRRRRRRRRGGRRGGRRRRGGRRRRRRRRRGGGRGRGRGRRGRGGRGRGRRRGRRRRRRGGRGRRRRGRRGRGGRRRRRRRGRGGRRGRRRRRRRGGRRRRGRRRRRRRGRRRGGRRRRRRGRRGGGRRRGR\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"200\\r\\nGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\\r\\n\", \"output\": [\"G\"]}, {\"input\": \"52\\r\\nBBBBBBBBBBBBBBBBBBBBGBGBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"200\\r\\nGRGRRGRBRRRGGGRGGRRRRRBBGRRGRBBGRRGBGRRBBRBBRRBBBGRBRGGGGBGGBRRBBRGRBGGRRGGBBRBGGRGBBRRBBRGBRRBGBRBGBBRGGRRRGGGBRGGGGRRRBBRRGRGRBRRGRBBGGRBBRGRGRBGRBBRGGBBBGRGBBGGBGBGBBRRBGRGRGGBRRGRGGGGGBRGGGGBBBBRB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"102\\r\\nGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGRGGGGGGGGBGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"193\\r\\nRRRGGGRBGGBGGGBGGBBGRBGGRBGGBBRBGGRBBBRBRRGGBBRBRGRRRBGBBRGGRGGGBGGRRGGRGRRBRBRBRRGRGBGBRGBBRGRRRBGRGGBGBRBBBGBRBBGBGBGGGBGGGGBRBBRRBGRGGBBBRBBBBBGRRRGBRGBRRRBBBGBGGGGRGGRRBRBGRRGBGBRBGGGRBRRGG\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"90\\r\\nBGBGGRRBGGRRRRRGGRGBBBBBRRBGBGBGBGGBBGRGGGGRBRBBRRRGBRRGBBGBBGGGRGRGRBGBBBRRGRRBRBRRGGRBRB\\r\\n\", \"output\": [\"BGR\"]}, {\"input\": \"3\\r\\nGGB\\r\\n\", \"output\": [\"BR\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '200\\r\\nRGRGRRRRRGRRGRRRGRGRRRGGRGRRGGGRRGGRRRRRRRRRRRGRRGRRRGRRRGRRRRRRRGRRRRRRRRRRRGGRRGGRRRRGGRRRRRRRRRGGGRGRGRGRRGRGGRGRGRRRGRRRRRRGGRGRRRRGRRGRGGRRRRRRRGRGGRRGRRRRRRRGGRRRRGRRRRRRRGRRRGGRRRRRRGRRGGGRRRGR\\r\\n', 'output': ['BGR']}, {'input': '4\\r\\nRGGR\\r\\n', 'output': ['BGR']}, {'input': '2\\r\\nRB\\r\\n', 'output': ['G']}, {'input': '3\\r\\nGGR\\r\\n', 'output': ['BR']}, {'input': '5\\r\\nGRRGR\\r\\n', 'output': ['BGR']}]","human_sample_testcases_2":"[{'input': '5\\r\\nBBBBB\\r\\n', 'output': ['B']}, {'input': '4\\r\\nRBGB\\r\\n', 'output': ['BGR']}, {'input': '16\\r\\nRRGRRRRRRGGRGRRR\\r\\n', 'output': ['BGR']}, {'input': '3\\r\\nGGR\\r\\n', 'output': ['BR']}, {'input': '1\\r\\nG\\r\\n', 'output': ['G']}]","human_sample_testcases_3":"[{'input': '5\\r\\nGRRGR\\r\\n', 'output': ['BGR']}, {'input': '1\\r\\nG\\r\\n', 'output': ['G']}, {'input': '3\\r\\nGBG\\r\\n', 'output': ['BR']}, {'input': '5\\r\\nBGBGR\\r\\n', 'output': ['BGR']}, {'input': '2\\r\\nRB\\r\\n', 'output': ['G']}]","human_sample_testcases_4":"[{'input': '3\\r\\nGBG\\r\\n', 'output': ['BR']}, {'input': '16\\r\\nRRGRRRRRRGGRGRRR\\r\\n', 'output': ['BGR']}, {'input': '190\\r\\nBBBBBBBBBBBBBBBBBGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\r\\n', 'output': ['GR']}, {'input': '2\\r\\nRB\\r\\n', 'output': ['G']}, {'input': '7\\r\\nBBBGBRG\\r\\n', 'output': ['BGR']}]","human_sample_testcases_5":"[{'input': '4\\r\\nRGGR\\r\\n', 'output': ['BGR']}, {'input': '200\\r\\nGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG\\r\\n', 'output': ['G']}, {'input': '6\\r\\nGRRGBB\\r\\n', 'output': ['BGR']}, {'input': '4\\r\\nGGRB\\r\\n', 'output': ['BGR']}, {'input': '200\\r\\nBBRGRRBBRGGGBGBGBGRRGRGRGRBGRGRRBBGRGBGRRGRRRGGBBRGBGBGBRBBBBBBBGGBRGGRRRGGRGBGBGGBRRRRBRRRBRBBGGBGBRGRGBBBBGGBGBBBGBGRRBRRRGBGGBBBRBGRBRRGGGRRGBBBGBGRRRRRRGGRGRGBBBRGGGBGGGBRBBRRGBGRGRBRRRBRBGRGGBRBB\\r\\n', 'output': ['BGR']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":92.86,"human_sample_line_coverage_2":92.86,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":78.57,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":75.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":58.33,"id":356,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.858,"human_sample_branch_coverage":85.0} {"sample_inputs":"[\"3 3 3\\n1 1 1\\n2 2 3\\n3 3 2\", \"4 10 2\\n2 3 8\\n3 4 7\"]","input_specification":"The first line contains three integers $$$n$$$, $$$h$$$, and $$$m$$$ ($$$1 \\leq n,h,m \\leq 50$$$)\u00a0\u2014 the number of spots, the maximum height, and the number of restrictions. Each of the next $$$m$$$ lines contains three integers $$$l_i$$$, $$$r_i$$$, and $$$x_i$$$ ($$$1 \\leq l_i \\leq r_i \\leq n$$$, $$$0 \\leq x_i \\leq h$$$)\u00a0\u2014 left and right limits (inclusive) of the $$$i$$$-th restriction and the maximum possible height in that range.","src_uid":"f22b6dab443f63fb8d2d288b702f20ad","source_code":"(n,h,m) = [int(x) for x in input().split()]\nhouses= [h]*n\nfor i in range(m):\n (l,r,x) = [int(x) for x in input().split()]\n for j in range(l-1,r):\n houses[j] = min(houses[j],x)\n\nmx = 0\nfor j in range(n):\n mx += houses[j]*houses[j]\n\nprint(mx)\n ","sample_outputs":"[\"14\", \"262\"]","lang_cluster":"Python","notes":"NoteIn the first example, there are $$$3$$$ houses, the maximum height of a house is $$$3$$$, and there are $$$3$$$ restrictions. The first restriction says the tallest house between $$$1$$$ and $$$1$$$ must be at most $$$1$$$. The second restriction says the tallest house between $$$2$$$ and $$$2$$$ must be at most $$$3$$$. The third restriction says the tallest house between $$$3$$$ and $$$3$$$ must be at most $$$2$$$.In this case, it is optimal to build houses with heights $$$[1, 3, 2]$$$. This fits within all the restrictions. The total profit in this case is $$$1^2 + 3^2 + 2^2 = 14$$$.In the second example, there are $$$4$$$ houses, the maximum height of a house is $$$10$$$, and there are $$$2$$$ restrictions. The first restriction says the tallest house from $$$2$$$ to $$$3$$$ must be at most $$$8$$$. The second restriction says the tallest house from $$$3$$$ to $$$4$$$ must be at most $$$7$$$.In this case, it's optimal to build houses with heights $$$[10, 8, 7, 7]$$$. We get a profit of $$$10^2+8^2+7^2+7^2 = 262$$$. Note that there are two restrictions on house $$$3$$$ and both of them must be satisfied. Also, note that even though there isn't any explicit restrictions on house $$$1$$$, we must still limit its height to be at most $$$10$$$ ($$$h=10$$$).","output_specification":"Print a single integer, the maximum profit you can make.","description":"You are planning to build housing on a street. There are $$$n$$$ spots available on the street on which you can build a house. The spots are labeled from $$$1$$$ to $$$n$$$ from left to right. In each spot, you can build a house with an integer height between $$$0$$$ and $$$h$$$.In each spot, if a house has height $$$a$$$, you will gain $$$a^2$$$ dollars from it.The city has $$$m$$$ zoning restrictions. The $$$i$$$-th restriction says that the tallest house from spots $$$l_i$$$ to $$$r_i$$$ (inclusive) must be at most $$$x_i$$$.You would like to build houses to maximize your profit. Determine the maximum profit possible.","human_testcases":"[{\"input\": \"3 3 3\\r\\n1 1 1\\r\\n2 2 3\\r\\n3 3 2\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"4 10 2\\r\\n2 3 8\\r\\n3 4 7\\r\\n\", \"output\": [\"262\"]}, {\"input\": \"50 50 1\\r\\n1 50 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 50 50\\r\\n17 40 12\\r\\n33 36 47\\r\\n8 43 35\\r\\n25 29 42\\r\\n18 36 6\\r\\n25 35 18\\r\\n36 48 47\\r\\n17 40 13\\r\\n20 27 37\\r\\n32 32 28\\r\\n17 20 13\\r\\n4 14 6\\r\\n13 18 47\\r\\n18 45 28\\r\\n3 50 45\\r\\n6 6 6\\r\\n3 25 36\\r\\n28 48 42\\r\\n14 34 32\\r\\n28 41 35\\r\\n29 35 25\\r\\n25 48 24\\r\\n32 40 40\\r\\n18 38 44\\r\\n6 16 2\\r\\n1 36 7\\r\\n14 48 2\\r\\n18 29 40\\r\\n11 16 37\\r\\n8 40 19\\r\\n12 16 44\\r\\n44 46 21\\r\\n19 24 26\\r\\n24 45 44\\r\\n22 22 15\\r\\n6 15 32\\r\\n19 42 7\\r\\n21 33 20\\r\\n1 13 26\\r\\n16 27 40\\r\\n46 48 30\\r\\n21 39 1\\r\\n1 9 32\\r\\n14 34 20\\r\\n35 38 11\\r\\n19 47 23\\r\\n13 38 15\\r\\n28 29 28\\r\\n7 20 40\\r\\n2 21 46\\r\\n\", \"output\": [\"4384\"]}, {\"input\": \"50 50 50\\r\\n20 34 50\\r\\n10 36 27\\r\\n46 49 19\\r\\n15 22 21\\r\\n5 10 21\\r\\n40 47 0\\r\\n26 43 48\\r\\n15 34 5\\r\\n29 48 49\\r\\n2 45 25\\r\\n5 40 42\\r\\n1 27 0\\r\\n43 50 47\\r\\n5 19 23\\r\\n1 42 20\\r\\n18 50 16\\r\\n13 38 14\\r\\n14 30 22\\r\\n5 26 2\\r\\n32 46 15\\r\\n10 49 37\\r\\n33 37 24\\r\\n10 31 45\\r\\n16 45 37\\r\\n22 41 7\\r\\n23 49 29\\r\\n22 44 49\\r\\n3 44 22\\r\\n26 32 4\\r\\n30 40 19\\r\\n19 28 5\\r\\n6 34 14\\r\\n16 21 40\\r\\n12 43 46\\r\\n9 36 42\\r\\n2 19 39\\r\\n13 45 12\\r\\n2 30 6\\r\\n5 28 35\\r\\n18 45 7\\r\\n39 46 29\\r\\n29 43 33\\r\\n3 16 24\\r\\n20 40 24\\r\\n35 36 8\\r\\n2 14 8\\r\\n3 29 47\\r\\n31 32 0\\r\\n27 49 16\\r\\n1 37 45\\r\\n\", \"output\": [\"1111\"]}, {\"input\": \"50 50 50\\r\\n28 29 9\\r\\n33 43 30\\r\\n12 34 3\\r\\n9 12 26\\r\\n24 39 10\\r\\n12 47 35\\r\\n29 41 47\\r\\n43 44 49\\r\\n19 37 36\\r\\n11 18 46\\r\\n19 42 20\\r\\n9 40 47\\r\\n18 34 22\\r\\n11 20 44\\r\\n5 31 44\\r\\n29 40 0\\r\\n1 26 19\\r\\n7 50 4\\r\\n14 34 48\\r\\n43 48 21\\r\\n12 49 23\\r\\n6 40 47\\r\\n22 37 50\\r\\n39 48 29\\r\\n12 34 13\\r\\n5 10 25\\r\\n30 45 46\\r\\n26 32 29\\r\\n2 4 23\\r\\n7 39 19\\r\\n22 49 42\\r\\n11 29 31\\r\\n23 50 29\\r\\n12 32 47\\r\\n4 13 18\\r\\n24 46 20\\r\\n33 34 44\\r\\n24 35 41\\r\\n39 50 47\\r\\n14 24 49\\r\\n25 44 28\\r\\n23 23 42\\r\\n32 44 40\\r\\n25 42 3\\r\\n25 31 6\\r\\n35 47 18\\r\\n22 49 2\\r\\n38 43 23\\r\\n1 27 16\\r\\n19 23 43\\r\\n\", \"output\": [\"1786\"]}, {\"input\": \"50 50 50\\r\\n24 31 47\\r\\n2 5 10\\r\\n18 22 39\\r\\n6 48 29\\r\\n30 43 25\\r\\n9 26 19\\r\\n20 40 23\\r\\n27 49 42\\r\\n41 49 50\\r\\n28 39 42\\r\\n35 37 49\\r\\n17 40 40\\r\\n26 38 21\\r\\n8 38 40\\r\\n10 28 19\\r\\n30 41 9\\r\\n2 13 24\\r\\n29 42 36\\r\\n20 49 17\\r\\n3 48 1\\r\\n33 38 10\\r\\n5 37 20\\r\\n7 21 30\\r\\n35 38 22\\r\\n37 38 19\\r\\n16 43 47\\r\\n46 50 16\\r\\n4 13 36\\r\\n18 20 41\\r\\n26 31 19\\r\\n11 34 30\\r\\n20 23 23\\r\\n20 46 19\\r\\n10 43 49\\r\\n27 33 45\\r\\n37 45 27\\r\\n6 12 0\\r\\n38 47 27\\r\\n3 50 6\\r\\n25 41 41\\r\\n2 37 27\\r\\n25 49 24\\r\\n38 44 31\\r\\n31 36 7\\r\\n18 31 3\\r\\n6 33 2\\r\\n19 36 33\\r\\n45 50 48\\r\\n10 21 17\\r\\n8 41 42\\r\\n\", \"output\": [\"2711\"]}, {\"input\": \"50 50 50\\r\\n26 27 33\\r\\n8 29 15\\r\\n10 31 23\\r\\n7 38 33\\r\\n9 12 39\\r\\n3 18 2\\r\\n11 35 25\\r\\n8 10 33\\r\\n12 19 11\\r\\n9 44 39\\r\\n17 32 27\\r\\n17 49 9\\r\\n13 13 20\\r\\n3 9 36\\r\\n18 20 43\\r\\n24 48 19\\r\\n12 26 1\\r\\n39 49 18\\r\\n11 33 38\\r\\n7 49 7\\r\\n23 38 48\\r\\n20 22 46\\r\\n12 31 34\\r\\n21 41 15\\r\\n3 13 26\\r\\n26 30 18\\r\\n50 50 12\\r\\n20 39 18\\r\\n34 40 10\\r\\n35 45 21\\r\\n28 41 17\\r\\n17 29 40\\r\\n21 30 34\\r\\n16 34 0\\r\\n28 45 21\\r\\n4 36 8\\r\\n31 50 6\\r\\n10 48 12\\r\\n18 42 43\\r\\n43 47 32\\r\\n35 38 27\\r\\n19 26 5\\r\\n5 36 22\\r\\n33 38 38\\r\\n7 24 50\\r\\n20 23 12\\r\\n5 35 40\\r\\n2 7 19\\r\\n38 49 45\\r\\n17 39 40\\r\\n\", \"output\": [\"3477\"]}, {\"input\": \"50 50 50\\r\\n7 47 45\\r\\n22 24 8\\r\\n31 48 31\\r\\n36 47 13\\r\\n7 25 19\\r\\n2 2 17\\r\\n34 40 14\\r\\n27 33 50\\r\\n31 45 35\\r\\n4 7 4\\r\\n27 30 27\\r\\n4 41 27\\r\\n34 41 15\\r\\n2 12 17\\r\\n2 3 19\\r\\n25 47 47\\r\\n6 43 50\\r\\n4 47 23\\r\\n5 38 30\\r\\n12 43 18\\r\\n8 38 28\\r\\n6 11 13\\r\\n23 35 41\\r\\n2 39 41\\r\\n27 30 1\\r\\n28 49 46\\r\\n15 39 29\\r\\n18 29 22\\r\\n37 39 33\\r\\n7 45 40\\r\\n23 49 19\\r\\n8 12 46\\r\\n21 48 26\\r\\n22 45 27\\r\\n9 35 50\\r\\n10 43 5\\r\\n13 29 22\\r\\n7 36 12\\r\\n18 37 34\\r\\n17 18 3\\r\\n17 27 4\\r\\n44 47 39\\r\\n6 10 34\\r\\n31 48 1\\r\\n32 45 33\\r\\n39 41 43\\r\\n5 40 4\\r\\n8 50 11\\r\\n1 45 42\\r\\n30 35 31\\r\\n\", \"output\": [\"2960\"]}, {\"input\": \"50 50 50\\r\\n14 41 31\\r\\n28 49 13\\r\\n4 19 15\\r\\n34 41 16\\r\\n37 40 34\\r\\n10 25 1\\r\\n28 35 15\\r\\n2 42 43\\r\\n2 12 47\\r\\n16 25 26\\r\\n21 48 4\\r\\n13 37 22\\r\\n16 26 15\\r\\n30 49 12\\r\\n8 40 45\\r\\n32 33 6\\r\\n6 27 2\\r\\n25 35 5\\r\\n22 42 24\\r\\n6 13 49\\r\\n23 26 14\\r\\n27 42 38\\r\\n9 34 45\\r\\n1 33 35\\r\\n42 44 7\\r\\n5 7 42\\r\\n12 43 25\\r\\n5 42 4\\r\\n7 47 2\\r\\n7 10 40\\r\\n20 34 6\\r\\n2 21 12\\r\\n9 45 15\\r\\n19 45 29\\r\\n4 50 0\\r\\n1 2 12\\r\\n1 47 26\\r\\n8 16 23\\r\\n9 48 45\\r\\n23 28 20\\r\\n12 19 4\\r\\n27 37 46\\r\\n21 47 25\\r\\n33 49 5\\r\\n21 49 6\\r\\n14 32 1\\r\\n5 13 36\\r\\n7 23 34\\r\\n15 34 43\\r\\n2 24 29\\r\\n\", \"output\": [\"432\"]}, {\"input\": \"50 50 50\\r\\n14 39 43\\r\\n22 27 43\\r\\n9 11 0\\r\\n23 38 21\\r\\n13 32 23\\r\\n19 43 35\\r\\n27 29 15\\r\\n6 31 8\\r\\n19 20 35\\r\\n36 45 22\\r\\n20 26 34\\r\\n13 49 42\\r\\n13 37 40\\r\\n37 45 7\\r\\n16 41 19\\r\\n27 48 15\\r\\n15 41 8\\r\\n33 45 37\\r\\n6 33 45\\r\\n10 18 4\\r\\n12 35 27\\r\\n15 42 37\\r\\n25 28 50\\r\\n19 46 28\\r\\n7 19 12\\r\\n12 44 13\\r\\n1 12 21\\r\\n7 36 11\\r\\n19 29 21\\r\\n6 33 14\\r\\n32 41 44\\r\\n30 46 30\\r\\n1 47 30\\r\\n14 43 31\\r\\n18 37 27\\r\\n11 50 44\\r\\n26 26 7\\r\\n24 31 9\\r\\n9 13 5\\r\\n29 47 12\\r\\n6 17 3\\r\\n3 35 29\\r\\n29 41 42\\r\\n5 27 35\\r\\n14 45 3\\r\\n27 31 37\\r\\n20 33 43\\r\\n18 22 7\\r\\n12 35 44\\r\\n10 24 28\\r\\n\", \"output\": [\"6751\"]}, {\"input\": \"50 50 50\\r\\n18 30 29\\r\\n39 40 46\\r\\n19 45 35\\r\\n13 32 26\\r\\n11 28 38\\r\\n15 19 18\\r\\n25 32 15\\r\\n15 15 1\\r\\n36 40 48\\r\\n15 48 18\\r\\n7 47 12\\r\\n26 49 37\\r\\n1 8 40\\r\\n5 38 4\\r\\n13 30 18\\r\\n5 21 0\\r\\n9 32 37\\r\\n14 16 44\\r\\n24 45 15\\r\\n18 19 36\\r\\n1 48 14\\r\\n46 49 11\\r\\n2 28 4\\r\\n2 6 21\\r\\n11 49 20\\r\\n22 27 34\\r\\n17 17 43\\r\\n12 35 19\\r\\n33 46 38\\r\\n1 6 15\\r\\n44 45 31\\r\\n37 47 22\\r\\n35 44 20\\r\\n22 45 33\\r\\n28 41 3\\r\\n28 45 0\\r\\n2 47 13\\r\\n25 41 45\\r\\n1 28 14\\r\\n3 47 3\\r\\n15 41 2\\r\\n33 37 37\\r\\n39 45 33\\r\\n11 33 38\\r\\n3 42 50\\r\\n10 48 47\\r\\n3 38 49\\r\\n21 33 31\\r\\n9 41 19\\r\\n33 50 27\\r\\n\", \"output\": [\"1243\"]}, {\"input\": \"50 50 50\\r\\n13 24 16\\r\\n13 46 26\\r\\n28 37 19\\r\\n2 22 29\\r\\n1 2 2\\r\\n30 31 3\\r\\n16 23 42\\r\\n32 44 45\\r\\n11 44 9\\r\\n19 35 39\\r\\n25 44 41\\r\\n4 35 31\\r\\n33 38 39\\r\\n28 35 25\\r\\n17 26 43\\r\\n17 49 9\\r\\n22 40 42\\r\\n11 44 26\\r\\n29 48 36\\r\\n20 30 41\\r\\n11 32 0\\r\\n15 31 35\\r\\n27 30 34\\r\\n38 47 39\\r\\n23 24 25\\r\\n14 20 30\\r\\n10 25 40\\r\\n5 39 0\\r\\n5 10 7\\r\\n5 20 15\\r\\n3 10 18\\r\\n10 35 39\\r\\n27 45 9\\r\\n18 34 35\\r\\n5 15 30\\r\\n35 41 32\\r\\n23 35 20\\r\\n9 37 30\\r\\n4 39 1\\r\\n2 26 46\\r\\n9 27 1\\r\\n13 31 18\\r\\n10 26 24\\r\\n17 28 17\\r\\n4 42 48\\r\\n24 50 32\\r\\n3 19 29\\r\\n28 35 2\\r\\n20 29 20\\r\\n22 23 24\\r\\n\", \"output\": [\"2167\"]}, {\"input\": \"50 50 50\\r\\n15 21 1\\r\\n8 40 30\\r\\n25 34 4\\r\\n19 46 8\\r\\n24 32 16\\r\\n2 31 37\\r\\n18 18 43\\r\\n27 42 37\\r\\n7 28 48\\r\\n2 31 36\\r\\n43 45 19\\r\\n8 48 25\\r\\n4 26 13\\r\\n36 42 20\\r\\n15 26 18\\r\\n28 43 18\\r\\n7 32 47\\r\\n18 46 7\\r\\n9 39 5\\r\\n17 35 21\\r\\n21 24 38\\r\\n12 30 34\\r\\n18 49 38\\r\\n28 46 32\\r\\n39 41 31\\r\\n1 26 1\\r\\n14 29 35\\r\\n23 33 7\\r\\n23 32 25\\r\\n1 13 15\\r\\n17 20 5\\r\\n20 21 31\\r\\n11 43 24\\r\\n8 33 37\\r\\n6 19 6\\r\\n34 46 39\\r\\n15 44 25\\r\\n31 50 15\\r\\n11 46 11\\r\\n16 40 12\\r\\n6 8 1\\r\\n25 44 0\\r\\n22 28 15\\r\\n22 30 21\\r\\n30 44 45\\r\\n41 45 41\\r\\n22 35 36\\r\\n39 46 25\\r\\n2 12 21\\r\\n7 41 23\\r\\n\", \"output\": [\"1022\"]}, {\"input\": \"50 50 50\\r\\n17 17 39\\r\\n11 13 9\\r\\n9 43 39\\r\\n9 35 13\\r\\n23 39 31\\r\\n21 43 21\\r\\n16 17 43\\r\\n2 47 30\\r\\n23 49 9\\r\\n22 47 7\\r\\n20 34 48\\r\\n12 49 20\\r\\n13 29 12\\r\\n3 29 17\\r\\n4 30 42\\r\\n37 40 28\\r\\n16 50 24\\r\\n31 43 40\\r\\n6 26 26\\r\\n22 43 28\\r\\n7 41 24\\r\\n33 35 8\\r\\n17 23 43\\r\\n11 49 25\\r\\n21 42 37\\r\\n34 36 23\\r\\n15 44 31\\r\\n7 7 14\\r\\n4 41 44\\r\\n13 16 16\\r\\n28 36 17\\r\\n19 29 48\\r\\n7 40 14\\r\\n7 32 39\\r\\n1 42 33\\r\\n9 25 21\\r\\n15 48 30\\r\\n1 45 1\\r\\n22 45 21\\r\\n1 22 4\\r\\n47 50 0\\r\\n16 19 8\\r\\n22 38 32\\r\\n24 32 1\\r\\n31 37 43\\r\\n16 36 25\\r\\n5 41 17\\r\\n42 45 49\\r\\n23 32 48\\r\\n21 43 21\\r\\n\", \"output\": [\"94\"]}, {\"input\": \"50 50 50\\r\\n15 20 50\\r\\n11 36 39\\r\\n1 7 23\\r\\n11 25 16\\r\\n2 8 46\\r\\n44 47 5\\r\\n7 15 20\\r\\n6 35 23\\r\\n21 31 47\\r\\n14 42 3\\r\\n22 44 25\\r\\n7 12 15\\r\\n5 50 13\\r\\n29 29 38\\r\\n4 35 17\\r\\n1 23 37\\r\\n22 32 30\\r\\n17 25 21\\r\\n17 40 47\\r\\n5 31 8\\r\\n46 50 10\\r\\n21 45 32\\r\\n7 47 48\\r\\n9 48 17\\r\\n4 46 43\\r\\n20 42 19\\r\\n2 15 28\\r\\n31 34 48\\r\\n9 22 11\\r\\n4 38 16\\r\\n31 49 4\\r\\n14 34 14\\r\\n41 49 28\\r\\n6 38 41\\r\\n10 38 8\\r\\n16 26 26\\r\\n24 36 37\\r\\n9 17 37\\r\\n37 41 32\\r\\n19 39 47\\r\\n10 33 0\\r\\n20 46 41\\r\\n12 45 22\\r\\n26 34 5\\r\\n27 34 40\\r\\n23 33 10\\r\\n6 17 23\\r\\n3 9 20\\r\\n1 2 49\\r\\n20 39 19\\r\\n\", \"output\": [\"2327\"]}, {\"input\": \"50 50 50\\r\\n6 28 36\\r\\n12 22 44\\r\\n12 39 7\\r\\n19 50 20\\r\\n27 43 35\\r\\n6 12 38\\r\\n2 6 20\\r\\n15 24 15\\r\\n38 43 8\\r\\n21 22 49\\r\\n15 21 4\\r\\n20 20 8\\r\\n25 42 37\\r\\n22 40 34\\r\\n43 43 17\\r\\n17 21 22\\r\\n35 41 34\\r\\n10 41 2\\r\\n8 29 17\\r\\n9 24 38\\r\\n14 31 24\\r\\n2 10 32\\r\\n6 20 2\\r\\n41 42 11\\r\\n20 22 49\\r\\n2 7 40\\r\\n16 18 48\\r\\n8 10 4\\r\\n31 40 30\\r\\n4 7 16\\r\\n19 39 42\\r\\n1 8 6\\r\\n37 42 17\\r\\n11 34 43\\r\\n25 29 36\\r\\n6 35 8\\r\\n12 15 42\\r\\n14 35 48\\r\\n33 48 43\\r\\n34 41 38\\r\\n4 18 50\\r\\n10 22 23\\r\\n7 15 13\\r\\n24 40 35\\r\\n23 27 36\\r\\n9 50 19\\r\\n24 30 29\\r\\n8 10 44\\r\\n26 30 50\\r\\n5 23 19\\r\\n\", \"output\": [\"2979\"]}, {\"input\": \"50 50 50\\r\\n24 50 22\\r\\n26 27 22\\r\\n22 27 43\\r\\n16 48 24\\r\\n27 46 50\\r\\n2 34 22\\r\\n1 4 21\\r\\n33 48 7\\r\\n5 14 21\\r\\n37 43 19\\r\\n8 39 32\\r\\n20 21 4\\r\\n4 34 36\\r\\n12 23 29\\r\\n32 47 42\\r\\n11 32 31\\r\\n4 49 13\\r\\n3 16 35\\r\\n13 44 37\\r\\n17 29 45\\r\\n16 23 10\\r\\n25 33 5\\r\\n1 44 6\\r\\n28 49 30\\r\\n31 47 4\\r\\n13 44 11\\r\\n17 22 45\\r\\n24 40 37\\r\\n11 45 48\\r\\n4 26 17\\r\\n32 50 30\\r\\n2 10 23\\r\\n29 48 31\\r\\n30 50 19\\r\\n16 47 11\\r\\n5 48 14\\r\\n33 41 48\\r\\n8 27 34\\r\\n9 32 27\\r\\n45 47 5\\r\\n2 50 49\\r\\n8 48 31\\r\\n27 47 29\\r\\n27 46 39\\r\\n12 28 34\\r\\n4 25 5\\r\\n43 50 10\\r\\n13 19 16\\r\\n9 46 0\\r\\n41 45 16\\r\\n\", \"output\": [\"498\"]}, {\"input\": \"50 50 50\\r\\n28 33 44\\r\\n15 17 1\\r\\n25 40 10\\r\\n7 43 38\\r\\n13 23 9\\r\\n4 4 43\\r\\n25 26 43\\r\\n5 41 14\\r\\n1 49 40\\r\\n4 31 18\\r\\n41 45 22\\r\\n38 43 48\\r\\n23 30 45\\r\\n5 13 3\\r\\n1 47 13\\r\\n14 25 33\\r\\n27 32 40\\r\\n23 50 26\\r\\n2 25 20\\r\\n7 41 41\\r\\n31 41 47\\r\\n34 37 7\\r\\n6 37 14\\r\\n23 43 20\\r\\n14 49 31\\r\\n22 25 22\\r\\n12 30 36\\r\\n44 46 32\\r\\n5 48 34\\r\\n17 22 31\\r\\n39 48 14\\r\\n27 34 25\\r\\n20 41 24\\r\\n31 48 9\\r\\n19 30 11\\r\\n45 49 48\\r\\n1 28 35\\r\\n10 16 10\\r\\n36 37 46\\r\\n5 42 48\\r\\n15 50 24\\r\\n12 44 27\\r\\n14 27 9\\r\\n5 37 46\\r\\n33 48 3\\r\\n12 45 8\\r\\n5 15 37\\r\\n1 5 43\\r\\n46 47 4\\r\\n8 49 33\\r\\n\", \"output\": [\"3080\"]}, {\"input\": \"20 50 20\\r\\n4 5 18\\r\\n14 15 32\\r\\n6 13 46\\r\\n13 19 39\\r\\n2 8 18\\r\\n15 16 29\\r\\n2 8 9\\r\\n1 2 23\\r\\n1 8 8\\r\\n18 18 11\\r\\n10 16 3\\r\\n9 18 44\\r\\n9 19 31\\r\\n2 3 19\\r\\n4 19 12\\r\\n10 17 24\\r\\n9 13 20\\r\\n4 7 10\\r\\n12 20 24\\r\\n3 19 19\\r\\n\", \"output\": [\"1704\"]}, {\"input\": \"50 20 20\\r\\n4 15 1\\r\\n26 31 15\\r\\n28 40 5\\r\\n16 42 1\\r\\n10 26 10\\r\\n42 42 1\\r\\n21 49 4\\r\\n24 50 10\\r\\n7 32 12\\r\\n5 38 18\\r\\n36 41 14\\r\\n16 44 2\\r\\n23 33 4\\r\\n18 19 15\\r\\n14 21 14\\r\\n18 28 16\\r\\n29 38 13\\r\\n6 17 10\\r\\n6 44 2\\r\\n17 45 1\\r\\n\", \"output\": [\"1406\"]}, {\"input\": \"20 20 50\\r\\n10 17 9\\r\\n5 10 5\\r\\n9 18 5\\r\\n4 19 8\\r\\n10 18 4\\r\\n5 19 2\\r\\n9 11 0\\r\\n3 9 9\\r\\n11 12 6\\r\\n7 9 7\\r\\n6 19 15\\r\\n7 12 10\\r\\n5 17 18\\r\\n4 9 14\\r\\n11 11 9\\r\\n2 20 8\\r\\n2 16 9\\r\\n5 16 1\\r\\n1 2 5\\r\\n6 9 1\\r\\n8 13 15\\r\\n6 15 18\\r\\n7 13 7\\r\\n13 18 11\\r\\n1 16 17\\r\\n16 20 17\\r\\n2 19 10\\r\\n15 18 0\\r\\n2 14 11\\r\\n1 3 11\\r\\n2 3 3\\r\\n2 16 10\\r\\n6 20 7\\r\\n3 17 2\\r\\n8 13 11\\r\\n7 11 13\\r\\n1 13 14\\r\\n5 16 4\\r\\n2 3 14\\r\\n2 5 4\\r\\n4 10 6\\r\\n10 17 20\\r\\n9 13 4\\r\\n1 5 20\\r\\n7 13 6\\r\\n16 20 9\\r\\n9 16 16\\r\\n5 12 7\\r\\n2 18 14\\r\\n9 13 19\\r\\n\", \"output\": [\"102\"]}, {\"input\": \"20 50 20\\r\\n3 9 4\\r\\n4 7 11\\r\\n9 14 31\\r\\n1 6 17\\r\\n5 13 33\\r\\n17 19 11\\r\\n13 14 10\\r\\n4 12 16\\r\\n8 19 46\\r\\n8 19 7\\r\\n11 20 32\\r\\n3 18 39\\r\\n1 12 31\\r\\n4 16 15\\r\\n2 15 38\\r\\n1 2 33\\r\\n2 11 25\\r\\n7 14 17\\r\\n3 14 45\\r\\n15 18 50\\r\\n\", \"output\": [\"2204\"]}, {\"input\": \"50 20 20\\r\\n19 49 15\\r\\n8 29 12\\r\\n28 33 20\\r\\n5 40 14\\r\\n1 45 14\\r\\n15 50 17\\r\\n20 44 17\\r\\n11 18 15\\r\\n20 40 6\\r\\n16 21 6\\r\\n12 31 10\\r\\n29 49 5\\r\\n20 44 17\\r\\n16 41 10\\r\\n3 30 9\\r\\n8 36 10\\r\\n45 48 5\\r\\n6 27 12\\r\\n35 44 8\\r\\n21 42 16\\r\\n\", \"output\": [\"2727\"]}, {\"input\": \"20 20 50\\r\\n1 3 9\\r\\n2 20 19\\r\\n2 5 3\\r\\n2 8 17\\r\\n1 19 16\\r\\n1 19 1\\r\\n17 19 13\\r\\n2 6 6\\r\\n9 12 14\\r\\n15 15 3\\r\\n6 13 7\\r\\n11 17 6\\r\\n12 15 15\\r\\n4 16 5\\r\\n8 13 4\\r\\n6 12 6\\r\\n10 13 1\\r\\n2 20 15\\r\\n9 16 11\\r\\n1 13 16\\r\\n2 12 17\\r\\n13 17 13\\r\\n17 18 9\\r\\n5 6 11\\r\\n5 16 6\\r\\n3 16 0\\r\\n2 10 3\\r\\n2 17 6\\r\\n6 9 4\\r\\n4 11 2\\r\\n5 20 17\\r\\n5 20 9\\r\\n7 20 15\\r\\n5 11 20\\r\\n11 15 12\\r\\n6 18 8\\r\\n9 16 4\\r\\n2 17 14\\r\\n4 8 11\\r\\n8 15 8\\r\\n15 18 20\\r\\n7 14 15\\r\\n5 8 14\\r\\n11 13 20\\r\\n16 17 15\\r\\n1 14 13\\r\\n6 10 11\\r\\n8 19 19\\r\\n8 20 17\\r\\n3 19 2\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"20 50 20\\r\\n5 9 16\\r\\n17 17 15\\r\\n2 4 15\\r\\n6 20 22\\r\\n3 16 48\\r\\n11 13 46\\r\\n2 3 37\\r\\n7 9 8\\r\\n16 20 7\\r\\n11 19 3\\r\\n6 19 11\\r\\n3 18 34\\r\\n7 19 5\\r\\n7 17 37\\r\\n4 16 12\\r\\n13 16 42\\r\\n18 20 4\\r\\n3 8 50\\r\\n9 14 15\\r\\n17 19 5\\r\\n\", \"output\": [\"3556\"]}, {\"input\": \"50 20 20\\r\\n22 39 19\\r\\n23 37 18\\r\\n16 38 9\\r\\n30 49 15\\r\\n14 31 5\\r\\n1 29 16\\r\\n10 46 9\\r\\n27 40 16\\r\\n3 42 1\\r\\n33 38 6\\r\\n18 40 6\\r\\n3 34 5\\r\\n8 23 14\\r\\n5 9 14\\r\\n4 34 8\\r\\n1 48 16\\r\\n4 15 18\\r\\n9 46 18\\r\\n18 29 14\\r\\n25 47 20\\r\\n\", \"output\": [\"1951\"]}, {\"input\": \"20 20 50\\r\\n1 13 18\\r\\n1 18 9\\r\\n4 6 13\\r\\n2 7 17\\r\\n8 8 7\\r\\n5 11 17\\r\\n8 18 5\\r\\n8 18 11\\r\\n1 9 9\\r\\n6 15 12\\r\\n15 17 3\\r\\n2 15 10\\r\\n11 16 19\\r\\n2 17 13\\r\\n8 16 15\\r\\n6 7 0\\r\\n4 8 14\\r\\n5 8 0\\r\\n10 20 13\\r\\n6 12 3\\r\\n11 16 19\\r\\n4 14 20\\r\\n1 17 11\\r\\n7 15 7\\r\\n11 17 8\\r\\n6 17 7\\r\\n6 16 17\\r\\n5 16 3\\r\\n17 18 2\\r\\n6 14 14\\r\\n12 16 2\\r\\n2 11 16\\r\\n2 7 11\\r\\n1 14 4\\r\\n6 13 1\\r\\n1 17 10\\r\\n8 16 19\\r\\n9 13 16\\r\\n13 14 3\\r\\n8 19 12\\r\\n9 16 16\\r\\n5 10 17\\r\\n5 18 12\\r\\n1 17 15\\r\\n3 7 0\\r\\n17 18 4\\r\\n4 19 16\\r\\n6 18 9\\r\\n2 19 11\\r\\n1 4 11\\r\\n\", \"output\": [\"347\"]}, {\"input\": \"3 3 4\\r\\n1 3 1\\r\\n1 1 3\\r\\n2 2 3\\r\\n3 3 3\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '50 50 50\\r\\n14 39 43\\r\\n22 27 43\\r\\n9 11 0\\r\\n23 38 21\\r\\n13 32 23\\r\\n19 43 35\\r\\n27 29 15\\r\\n6 31 8\\r\\n19 20 35\\r\\n36 45 22\\r\\n20 26 34\\r\\n13 49 42\\r\\n13 37 40\\r\\n37 45 7\\r\\n16 41 19\\r\\n27 48 15\\r\\n15 41 8\\r\\n33 45 37\\r\\n6 33 45\\r\\n10 18 4\\r\\n12 35 27\\r\\n15 42 37\\r\\n25 28 50\\r\\n19 46 28\\r\\n7 19 12\\r\\n12 44 13\\r\\n1 12 21\\r\\n7 36 11\\r\\n19 29 21\\r\\n6 33 14\\r\\n32 41 44\\r\\n30 46 30\\r\\n1 47 30\\r\\n14 43 31\\r\\n18 37 27\\r\\n11 50 44\\r\\n26 26 7\\r\\n24 31 9\\r\\n9 13 5\\r\\n29 47 12\\r\\n6 17 3\\r\\n3 35 29\\r\\n29 41 42\\r\\n5 27 35\\r\\n14 45 3\\r\\n27 31 37\\r\\n20 33 43\\r\\n18 22 7\\r\\n12 35 44\\r\\n10 24 28\\r\\n', 'output': ['6751']}, {'input': '50 50 50\\r\\n17 17 39\\r\\n11 13 9\\r\\n9 43 39\\r\\n9 35 13\\r\\n23 39 31\\r\\n21 43 21\\r\\n16 17 43\\r\\n2 47 30\\r\\n23 49 9\\r\\n22 47 7\\r\\n20 34 48\\r\\n12 49 20\\r\\n13 29 12\\r\\n3 29 17\\r\\n4 30 42\\r\\n37 40 28\\r\\n16 50 24\\r\\n31 43 40\\r\\n6 26 26\\r\\n22 43 28\\r\\n7 41 24\\r\\n33 35 8\\r\\n17 23 43\\r\\n11 49 25\\r\\n21 42 37\\r\\n34 36 23\\r\\n15 44 31\\r\\n7 7 14\\r\\n4 41 44\\r\\n13 16 16\\r\\n28 36 17\\r\\n19 29 48\\r\\n7 40 14\\r\\n7 32 39\\r\\n1 42 33\\r\\n9 25 21\\r\\n15 48 30\\r\\n1 45 1\\r\\n22 45 21\\r\\n1 22 4\\r\\n47 50 0\\r\\n16 19 8\\r\\n22 38 32\\r\\n24 32 1\\r\\n31 37 43\\r\\n16 36 25\\r\\n5 41 17\\r\\n42 45 49\\r\\n23 32 48\\r\\n21 43 21\\r\\n', 'output': ['94']}, {'input': '3 3 3\\r\\n1 1 1\\r\\n2 2 3\\r\\n3 3 2\\r\\n', 'output': ['14']}, {'input': '50 50 50\\r\\n26 27 33\\r\\n8 29 15\\r\\n10 31 23\\r\\n7 38 33\\r\\n9 12 39\\r\\n3 18 2\\r\\n11 35 25\\r\\n8 10 33\\r\\n12 19 11\\r\\n9 44 39\\r\\n17 32 27\\r\\n17 49 9\\r\\n13 13 20\\r\\n3 9 36\\r\\n18 20 43\\r\\n24 48 19\\r\\n12 26 1\\r\\n39 49 18\\r\\n11 33 38\\r\\n7 49 7\\r\\n23 38 48\\r\\n20 22 46\\r\\n12 31 34\\r\\n21 41 15\\r\\n3 13 26\\r\\n26 30 18\\r\\n50 50 12\\r\\n20 39 18\\r\\n34 40 10\\r\\n35 45 21\\r\\n28 41 17\\r\\n17 29 40\\r\\n21 30 34\\r\\n16 34 0\\r\\n28 45 21\\r\\n4 36 8\\r\\n31 50 6\\r\\n10 48 12\\r\\n18 42 43\\r\\n43 47 32\\r\\n35 38 27\\r\\n19 26 5\\r\\n5 36 22\\r\\n33 38 38\\r\\n7 24 50\\r\\n20 23 12\\r\\n5 35 40\\r\\n2 7 19\\r\\n38 49 45\\r\\n17 39 40\\r\\n', 'output': ['3477']}, {'input': '50 50 50\\r\\n17 40 12\\r\\n33 36 47\\r\\n8 43 35\\r\\n25 29 42\\r\\n18 36 6\\r\\n25 35 18\\r\\n36 48 47\\r\\n17 40 13\\r\\n20 27 37\\r\\n32 32 28\\r\\n17 20 13\\r\\n4 14 6\\r\\n13 18 47\\r\\n18 45 28\\r\\n3 50 45\\r\\n6 6 6\\r\\n3 25 36\\r\\n28 48 42\\r\\n14 34 32\\r\\n28 41 35\\r\\n29 35 25\\r\\n25 48 24\\r\\n32 40 40\\r\\n18 38 44\\r\\n6 16 2\\r\\n1 36 7\\r\\n14 48 2\\r\\n18 29 40\\r\\n11 16 37\\r\\n8 40 19\\r\\n12 16 44\\r\\n44 46 21\\r\\n19 24 26\\r\\n24 45 44\\r\\n22 22 15\\r\\n6 15 32\\r\\n19 42 7\\r\\n21 33 20\\r\\n1 13 26\\r\\n16 27 40\\r\\n46 48 30\\r\\n21 39 1\\r\\n1 9 32\\r\\n14 34 20\\r\\n35 38 11\\r\\n19 47 23\\r\\n13 38 15\\r\\n28 29 28\\r\\n7 20 40\\r\\n2 21 46\\r\\n', 'output': ['4384']}]","human_sample_testcases_2":"[{'input': '50 50 50\\r\\n18 30 29\\r\\n39 40 46\\r\\n19 45 35\\r\\n13 32 26\\r\\n11 28 38\\r\\n15 19 18\\r\\n25 32 15\\r\\n15 15 1\\r\\n36 40 48\\r\\n15 48 18\\r\\n7 47 12\\r\\n26 49 37\\r\\n1 8 40\\r\\n5 38 4\\r\\n13 30 18\\r\\n5 21 0\\r\\n9 32 37\\r\\n14 16 44\\r\\n24 45 15\\r\\n18 19 36\\r\\n1 48 14\\r\\n46 49 11\\r\\n2 28 4\\r\\n2 6 21\\r\\n11 49 20\\r\\n22 27 34\\r\\n17 17 43\\r\\n12 35 19\\r\\n33 46 38\\r\\n1 6 15\\r\\n44 45 31\\r\\n37 47 22\\r\\n35 44 20\\r\\n22 45 33\\r\\n28 41 3\\r\\n28 45 0\\r\\n2 47 13\\r\\n25 41 45\\r\\n1 28 14\\r\\n3 47 3\\r\\n15 41 2\\r\\n33 37 37\\r\\n39 45 33\\r\\n11 33 38\\r\\n3 42 50\\r\\n10 48 47\\r\\n3 38 49\\r\\n21 33 31\\r\\n9 41 19\\r\\n33 50 27\\r\\n', 'output': ['1243']}, {'input': '20 20 50\\r\\n10 17 9\\r\\n5 10 5\\r\\n9 18 5\\r\\n4 19 8\\r\\n10 18 4\\r\\n5 19 2\\r\\n9 11 0\\r\\n3 9 9\\r\\n11 12 6\\r\\n7 9 7\\r\\n6 19 15\\r\\n7 12 10\\r\\n5 17 18\\r\\n4 9 14\\r\\n11 11 9\\r\\n2 20 8\\r\\n2 16 9\\r\\n5 16 1\\r\\n1 2 5\\r\\n6 9 1\\r\\n8 13 15\\r\\n6 15 18\\r\\n7 13 7\\r\\n13 18 11\\r\\n1 16 17\\r\\n16 20 17\\r\\n2 19 10\\r\\n15 18 0\\r\\n2 14 11\\r\\n1 3 11\\r\\n2 3 3\\r\\n2 16 10\\r\\n6 20 7\\r\\n3 17 2\\r\\n8 13 11\\r\\n7 11 13\\r\\n1 13 14\\r\\n5 16 4\\r\\n2 3 14\\r\\n2 5 4\\r\\n4 10 6\\r\\n10 17 20\\r\\n9 13 4\\r\\n1 5 20\\r\\n7 13 6\\r\\n16 20 9\\r\\n9 16 16\\r\\n5 12 7\\r\\n2 18 14\\r\\n9 13 19\\r\\n', 'output': ['102']}, {'input': '50 50 50\\r\\n28 29 9\\r\\n33 43 30\\r\\n12 34 3\\r\\n9 12 26\\r\\n24 39 10\\r\\n12 47 35\\r\\n29 41 47\\r\\n43 44 49\\r\\n19 37 36\\r\\n11 18 46\\r\\n19 42 20\\r\\n9 40 47\\r\\n18 34 22\\r\\n11 20 44\\r\\n5 31 44\\r\\n29 40 0\\r\\n1 26 19\\r\\n7 50 4\\r\\n14 34 48\\r\\n43 48 21\\r\\n12 49 23\\r\\n6 40 47\\r\\n22 37 50\\r\\n39 48 29\\r\\n12 34 13\\r\\n5 10 25\\r\\n30 45 46\\r\\n26 32 29\\r\\n2 4 23\\r\\n7 39 19\\r\\n22 49 42\\r\\n11 29 31\\r\\n23 50 29\\r\\n12 32 47\\r\\n4 13 18\\r\\n24 46 20\\r\\n33 34 44\\r\\n24 35 41\\r\\n39 50 47\\r\\n14 24 49\\r\\n25 44 28\\r\\n23 23 42\\r\\n32 44 40\\r\\n25 42 3\\r\\n25 31 6\\r\\n35 47 18\\r\\n22 49 2\\r\\n38 43 23\\r\\n1 27 16\\r\\n19 23 43\\r\\n', 'output': ['1786']}, {'input': '20 50 20\\r\\n5 9 16\\r\\n17 17 15\\r\\n2 4 15\\r\\n6 20 22\\r\\n3 16 48\\r\\n11 13 46\\r\\n2 3 37\\r\\n7 9 8\\r\\n16 20 7\\r\\n11 19 3\\r\\n6 19 11\\r\\n3 18 34\\r\\n7 19 5\\r\\n7 17 37\\r\\n4 16 12\\r\\n13 16 42\\r\\n18 20 4\\r\\n3 8 50\\r\\n9 14 15\\r\\n17 19 5\\r\\n', 'output': ['3556']}, {'input': '50 20 20\\r\\n22 39 19\\r\\n23 37 18\\r\\n16 38 9\\r\\n30 49 15\\r\\n14 31 5\\r\\n1 29 16\\r\\n10 46 9\\r\\n27 40 16\\r\\n3 42 1\\r\\n33 38 6\\r\\n18 40 6\\r\\n3 34 5\\r\\n8 23 14\\r\\n5 9 14\\r\\n4 34 8\\r\\n1 48 16\\r\\n4 15 18\\r\\n9 46 18\\r\\n18 29 14\\r\\n25 47 20\\r\\n', 'output': ['1951']}]","human_sample_testcases_3":"[{'input': '50 50 50\\r\\n17 17 39\\r\\n11 13 9\\r\\n9 43 39\\r\\n9 35 13\\r\\n23 39 31\\r\\n21 43 21\\r\\n16 17 43\\r\\n2 47 30\\r\\n23 49 9\\r\\n22 47 7\\r\\n20 34 48\\r\\n12 49 20\\r\\n13 29 12\\r\\n3 29 17\\r\\n4 30 42\\r\\n37 40 28\\r\\n16 50 24\\r\\n31 43 40\\r\\n6 26 26\\r\\n22 43 28\\r\\n7 41 24\\r\\n33 35 8\\r\\n17 23 43\\r\\n11 49 25\\r\\n21 42 37\\r\\n34 36 23\\r\\n15 44 31\\r\\n7 7 14\\r\\n4 41 44\\r\\n13 16 16\\r\\n28 36 17\\r\\n19 29 48\\r\\n7 40 14\\r\\n7 32 39\\r\\n1 42 33\\r\\n9 25 21\\r\\n15 48 30\\r\\n1 45 1\\r\\n22 45 21\\r\\n1 22 4\\r\\n47 50 0\\r\\n16 19 8\\r\\n22 38 32\\r\\n24 32 1\\r\\n31 37 43\\r\\n16 36 25\\r\\n5 41 17\\r\\n42 45 49\\r\\n23 32 48\\r\\n21 43 21\\r\\n', 'output': ['94']}, {'input': '3 3 4\\r\\n1 3 1\\r\\n1 1 3\\r\\n2 2 3\\r\\n3 3 3\\r\\n', 'output': ['3']}, {'input': '20 20 50\\r\\n10 17 9\\r\\n5 10 5\\r\\n9 18 5\\r\\n4 19 8\\r\\n10 18 4\\r\\n5 19 2\\r\\n9 11 0\\r\\n3 9 9\\r\\n11 12 6\\r\\n7 9 7\\r\\n6 19 15\\r\\n7 12 10\\r\\n5 17 18\\r\\n4 9 14\\r\\n11 11 9\\r\\n2 20 8\\r\\n2 16 9\\r\\n5 16 1\\r\\n1 2 5\\r\\n6 9 1\\r\\n8 13 15\\r\\n6 15 18\\r\\n7 13 7\\r\\n13 18 11\\r\\n1 16 17\\r\\n16 20 17\\r\\n2 19 10\\r\\n15 18 0\\r\\n2 14 11\\r\\n1 3 11\\r\\n2 3 3\\r\\n2 16 10\\r\\n6 20 7\\r\\n3 17 2\\r\\n8 13 11\\r\\n7 11 13\\r\\n1 13 14\\r\\n5 16 4\\r\\n2 3 14\\r\\n2 5 4\\r\\n4 10 6\\r\\n10 17 20\\r\\n9 13 4\\r\\n1 5 20\\r\\n7 13 6\\r\\n16 20 9\\r\\n9 16 16\\r\\n5 12 7\\r\\n2 18 14\\r\\n9 13 19\\r\\n', 'output': ['102']}, {'input': '50 50 50\\r\\n7 47 45\\r\\n22 24 8\\r\\n31 48 31\\r\\n36 47 13\\r\\n7 25 19\\r\\n2 2 17\\r\\n34 40 14\\r\\n27 33 50\\r\\n31 45 35\\r\\n4 7 4\\r\\n27 30 27\\r\\n4 41 27\\r\\n34 41 15\\r\\n2 12 17\\r\\n2 3 19\\r\\n25 47 47\\r\\n6 43 50\\r\\n4 47 23\\r\\n5 38 30\\r\\n12 43 18\\r\\n8 38 28\\r\\n6 11 13\\r\\n23 35 41\\r\\n2 39 41\\r\\n27 30 1\\r\\n28 49 46\\r\\n15 39 29\\r\\n18 29 22\\r\\n37 39 33\\r\\n7 45 40\\r\\n23 49 19\\r\\n8 12 46\\r\\n21 48 26\\r\\n22 45 27\\r\\n9 35 50\\r\\n10 43 5\\r\\n13 29 22\\r\\n7 36 12\\r\\n18 37 34\\r\\n17 18 3\\r\\n17 27 4\\r\\n44 47 39\\r\\n6 10 34\\r\\n31 48 1\\r\\n32 45 33\\r\\n39 41 43\\r\\n5 40 4\\r\\n8 50 11\\r\\n1 45 42\\r\\n30 35 31\\r\\n', 'output': ['2960']}, {'input': '50 50 50\\r\\n15 21 1\\r\\n8 40 30\\r\\n25 34 4\\r\\n19 46 8\\r\\n24 32 16\\r\\n2 31 37\\r\\n18 18 43\\r\\n27 42 37\\r\\n7 28 48\\r\\n2 31 36\\r\\n43 45 19\\r\\n8 48 25\\r\\n4 26 13\\r\\n36 42 20\\r\\n15 26 18\\r\\n28 43 18\\r\\n7 32 47\\r\\n18 46 7\\r\\n9 39 5\\r\\n17 35 21\\r\\n21 24 38\\r\\n12 30 34\\r\\n18 49 38\\r\\n28 46 32\\r\\n39 41 31\\r\\n1 26 1\\r\\n14 29 35\\r\\n23 33 7\\r\\n23 32 25\\r\\n1 13 15\\r\\n17 20 5\\r\\n20 21 31\\r\\n11 43 24\\r\\n8 33 37\\r\\n6 19 6\\r\\n34 46 39\\r\\n15 44 25\\r\\n31 50 15\\r\\n11 46 11\\r\\n16 40 12\\r\\n6 8 1\\r\\n25 44 0\\r\\n22 28 15\\r\\n22 30 21\\r\\n30 44 45\\r\\n41 45 41\\r\\n22 35 36\\r\\n39 46 25\\r\\n2 12 21\\r\\n7 41 23\\r\\n', 'output': ['1022']}]","human_sample_testcases_4":"[{'input': '20 50 20\\r\\n4 5 18\\r\\n14 15 32\\r\\n6 13 46\\r\\n13 19 39\\r\\n2 8 18\\r\\n15 16 29\\r\\n2 8 9\\r\\n1 2 23\\r\\n1 8 8\\r\\n18 18 11\\r\\n10 16 3\\r\\n9 18 44\\r\\n9 19 31\\r\\n2 3 19\\r\\n4 19 12\\r\\n10 17 24\\r\\n9 13 20\\r\\n4 7 10\\r\\n12 20 24\\r\\n3 19 19\\r\\n', 'output': ['1704']}, {'input': '50 50 50\\r\\n15 20 50\\r\\n11 36 39\\r\\n1 7 23\\r\\n11 25 16\\r\\n2 8 46\\r\\n44 47 5\\r\\n7 15 20\\r\\n6 35 23\\r\\n21 31 47\\r\\n14 42 3\\r\\n22 44 25\\r\\n7 12 15\\r\\n5 50 13\\r\\n29 29 38\\r\\n4 35 17\\r\\n1 23 37\\r\\n22 32 30\\r\\n17 25 21\\r\\n17 40 47\\r\\n5 31 8\\r\\n46 50 10\\r\\n21 45 32\\r\\n7 47 48\\r\\n9 48 17\\r\\n4 46 43\\r\\n20 42 19\\r\\n2 15 28\\r\\n31 34 48\\r\\n9 22 11\\r\\n4 38 16\\r\\n31 49 4\\r\\n14 34 14\\r\\n41 49 28\\r\\n6 38 41\\r\\n10 38 8\\r\\n16 26 26\\r\\n24 36 37\\r\\n9 17 37\\r\\n37 41 32\\r\\n19 39 47\\r\\n10 33 0\\r\\n20 46 41\\r\\n12 45 22\\r\\n26 34 5\\r\\n27 34 40\\r\\n23 33 10\\r\\n6 17 23\\r\\n3 9 20\\r\\n1 2 49\\r\\n20 39 19\\r\\n', 'output': ['2327']}, {'input': '50 20 20\\r\\n4 15 1\\r\\n26 31 15\\r\\n28 40 5\\r\\n16 42 1\\r\\n10 26 10\\r\\n42 42 1\\r\\n21 49 4\\r\\n24 50 10\\r\\n7 32 12\\r\\n5 38 18\\r\\n36 41 14\\r\\n16 44 2\\r\\n23 33 4\\r\\n18 19 15\\r\\n14 21 14\\r\\n18 28 16\\r\\n29 38 13\\r\\n6 17 10\\r\\n6 44 2\\r\\n17 45 1\\r\\n', 'output': ['1406']}, {'input': '3 3 3\\r\\n1 1 1\\r\\n2 2 3\\r\\n3 3 2\\r\\n', 'output': ['14']}, {'input': '50 50 50\\r\\n15 21 1\\r\\n8 40 30\\r\\n25 34 4\\r\\n19 46 8\\r\\n24 32 16\\r\\n2 31 37\\r\\n18 18 43\\r\\n27 42 37\\r\\n7 28 48\\r\\n2 31 36\\r\\n43 45 19\\r\\n8 48 25\\r\\n4 26 13\\r\\n36 42 20\\r\\n15 26 18\\r\\n28 43 18\\r\\n7 32 47\\r\\n18 46 7\\r\\n9 39 5\\r\\n17 35 21\\r\\n21 24 38\\r\\n12 30 34\\r\\n18 49 38\\r\\n28 46 32\\r\\n39 41 31\\r\\n1 26 1\\r\\n14 29 35\\r\\n23 33 7\\r\\n23 32 25\\r\\n1 13 15\\r\\n17 20 5\\r\\n20 21 31\\r\\n11 43 24\\r\\n8 33 37\\r\\n6 19 6\\r\\n34 46 39\\r\\n15 44 25\\r\\n31 50 15\\r\\n11 46 11\\r\\n16 40 12\\r\\n6 8 1\\r\\n25 44 0\\r\\n22 28 15\\r\\n22 30 21\\r\\n30 44 45\\r\\n41 45 41\\r\\n22 35 36\\r\\n39 46 25\\r\\n2 12 21\\r\\n7 41 23\\r\\n', 'output': ['1022']}]","human_sample_testcases_5":"[{'input': '50 50 50\\r\\n7 47 45\\r\\n22 24 8\\r\\n31 48 31\\r\\n36 47 13\\r\\n7 25 19\\r\\n2 2 17\\r\\n34 40 14\\r\\n27 33 50\\r\\n31 45 35\\r\\n4 7 4\\r\\n27 30 27\\r\\n4 41 27\\r\\n34 41 15\\r\\n2 12 17\\r\\n2 3 19\\r\\n25 47 47\\r\\n6 43 50\\r\\n4 47 23\\r\\n5 38 30\\r\\n12 43 18\\r\\n8 38 28\\r\\n6 11 13\\r\\n23 35 41\\r\\n2 39 41\\r\\n27 30 1\\r\\n28 49 46\\r\\n15 39 29\\r\\n18 29 22\\r\\n37 39 33\\r\\n7 45 40\\r\\n23 49 19\\r\\n8 12 46\\r\\n21 48 26\\r\\n22 45 27\\r\\n9 35 50\\r\\n10 43 5\\r\\n13 29 22\\r\\n7 36 12\\r\\n18 37 34\\r\\n17 18 3\\r\\n17 27 4\\r\\n44 47 39\\r\\n6 10 34\\r\\n31 48 1\\r\\n32 45 33\\r\\n39 41 43\\r\\n5 40 4\\r\\n8 50 11\\r\\n1 45 42\\r\\n30 35 31\\r\\n', 'output': ['2960']}, {'input': '4 10 2\\r\\n2 3 8\\r\\n3 4 7\\r\\n', 'output': ['262']}, {'input': '20 50 20\\r\\n3 9 4\\r\\n4 7 11\\r\\n9 14 31\\r\\n1 6 17\\r\\n5 13 33\\r\\n17 19 11\\r\\n13 14 10\\r\\n4 12 16\\r\\n8 19 46\\r\\n8 19 7\\r\\n11 20 32\\r\\n3 18 39\\r\\n1 12 31\\r\\n4 16 15\\r\\n2 15 38\\r\\n1 2 33\\r\\n2 11 25\\r\\n7 14 17\\r\\n3 14 45\\r\\n15 18 50\\r\\n', 'output': ['2204']}, {'input': '50 50 50\\r\\n14 41 31\\r\\n28 49 13\\r\\n4 19 15\\r\\n34 41 16\\r\\n37 40 34\\r\\n10 25 1\\r\\n28 35 15\\r\\n2 42 43\\r\\n2 12 47\\r\\n16 25 26\\r\\n21 48 4\\r\\n13 37 22\\r\\n16 26 15\\r\\n30 49 12\\r\\n8 40 45\\r\\n32 33 6\\r\\n6 27 2\\r\\n25 35 5\\r\\n22 42 24\\r\\n6 13 49\\r\\n23 26 14\\r\\n27 42 38\\r\\n9 34 45\\r\\n1 33 35\\r\\n42 44 7\\r\\n5 7 42\\r\\n12 43 25\\r\\n5 42 4\\r\\n7 47 2\\r\\n7 10 40\\r\\n20 34 6\\r\\n2 21 12\\r\\n9 45 15\\r\\n19 45 29\\r\\n4 50 0\\r\\n1 2 12\\r\\n1 47 26\\r\\n8 16 23\\r\\n9 48 45\\r\\n23 28 20\\r\\n12 19 4\\r\\n27 37 46\\r\\n21 47 25\\r\\n33 49 5\\r\\n21 49 6\\r\\n14 32 1\\r\\n5 13 36\\r\\n7 23 34\\r\\n15 34 43\\r\\n2 24 29\\r\\n', 'output': ['432']}, {'input': '50 50 50\\r\\n18 30 29\\r\\n39 40 46\\r\\n19 45 35\\r\\n13 32 26\\r\\n11 28 38\\r\\n15 19 18\\r\\n25 32 15\\r\\n15 15 1\\r\\n36 40 48\\r\\n15 48 18\\r\\n7 47 12\\r\\n26 49 37\\r\\n1 8 40\\r\\n5 38 4\\r\\n13 30 18\\r\\n5 21 0\\r\\n9 32 37\\r\\n14 16 44\\r\\n24 45 15\\r\\n18 19 36\\r\\n1 48 14\\r\\n46 49 11\\r\\n2 28 4\\r\\n2 6 21\\r\\n11 49 20\\r\\n22 27 34\\r\\n17 17 43\\r\\n12 35 19\\r\\n33 46 38\\r\\n1 6 15\\r\\n44 45 31\\r\\n37 47 22\\r\\n35 44 20\\r\\n22 45 33\\r\\n28 41 3\\r\\n28 45 0\\r\\n2 47 13\\r\\n25 41 45\\r\\n1 28 14\\r\\n3 47 3\\r\\n15 41 2\\r\\n33 37 37\\r\\n39 45 33\\r\\n11 33 38\\r\\n3 42 50\\r\\n10 48 47\\r\\n3 38 49\\r\\n21 33 31\\r\\n9 41 19\\r\\n33 50 27\\r\\n', 'output': ['1243']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":357,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 2\\n2 1 2 2 2 1\", \"8 4\\n1 1 2 1 1 1 2 1\", \"9 3\\n2 1 1 1 2 1 1 1 2\"]","input_specification":"The first line of the input contains a pair of integers n, k (1\u2009\u2264\u2009k\u2009\u2264\u2009n\u2009\u2264\u2009100), where n is the length of the array and the value n is divisible by k. The second line contains the sequence of elements of the given array a1,\u2009a2,\u2009...,\u2009an (1\u2009\u2264\u2009ai\u2009\u2264\u20092), ai is the i-th element of the array.","src_uid":"5f94c2ecf1cf8fdbb6117cab801ed281","source_code":"a=int(input().split()[1])\n*b,=map(int,input().split())\nc=0\nfor i in range(a):\n d=b[i::a]\n c+=min(d.count(1),d.count(2))\nprint(c)\n","sample_outputs":"[\"1\", \"0\", \"3\"]","lang_cluster":"Python","notes":"NoteIn the first sample it is enough to change the fourth element from 2 to 1, then the array changes to [2,\u20091,\u20092,\u20091,\u20092,\u20091].In the second sample, the given array already is 4-periodic.In the third sample it is enough to replace each occurrence of number two by number one. In this case the array will look as [1,\u20091,\u20091,\u20091,\u20091,\u20091,\u20091,\u20091,\u20091] \u2014 this array is simultaneously 1-, 3- and 9-periodic.","output_specification":"Print the minimum number of array elements we need to change to make the array k-periodic. If the array already is k-periodic, then print 0.","description":"This task will exclusively concentrate only on the arrays where all elements equal 1 and\/or 2.Array a is k-period if its length is divisible by k and there is such array b of length k, that a is represented by array b written exactly times consecutively. In other words, array a is k-periodic, if it has period of length k.For example, any array is n-periodic, where n is the array length. Array [2,\u20091,\u20092,\u20091,\u20092,\u20091] is at the same time 2-periodic and 6-periodic and array [1,\u20092,\u20091,\u20091,\u20092,\u20091,\u20091,\u20092,\u20091] is at the same time 3-periodic and 9-periodic.For the given array a, consisting only of numbers one and two, find the minimum number of elements to change to make the array k-periodic. If the array already is k-periodic, then the required value equals 0.","human_testcases":"[{\"input\": \"6 2\\r\\n2 1 2 2 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 4\\r\\n1 1 2 1 1 1 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 3\\r\\n2 1 1 1 2 1 1 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1\\r\\n2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1\\r\\n1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 1\\r\\n1 2 1 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 1\\r\\n1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 1\\r\\n2 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3\\r\\n1 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 2\\r\\n2 1 2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 2\\r\\n2 2 2 1 1 2 2 2 2 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 5\\r\\n2 2 1 2 1 1 2 1 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"20 4\\r\\n2 2 1 2 2 2 1 2 2 2 1 2 2 2 1 2 2 2 1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 5\\r\\n2 2 1 1 1 2 1 1 1 1 2 2 1 1 2 2 2 1 1 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"20 10\\r\\n1 2 2 2 2 1 1 1 2 1 1 2 2 2 2 1 2 2 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 2\\r\\n2 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 1 2 1 2 1 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100 4\\r\\n1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 2 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 2 1 1 1 2 1 1 1 2 1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"100 5\\r\\n2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 2 1 2 2 2 2 2 2 2 1 2 2 2\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"100 10\\r\\n2 1 1 1 1 2 2 2 1 1 2 1 1 2 1 2 1 2 1 1 2 1 1 1 1 2 1 2 1 1 2 1 1 1 1 2 2 2 1 1 2 1 1 1 1 2 1 2 1 1 2 1 1 1 1 2 1 2 2 1 2 1 1 1 1 2 1 2 1 1 2 1 2 1 1 2 1 2 1 1 2 1 1 1 1 2 1 2 1 1 2 1 1 1 2 2 1 2 1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100 20\\r\\n2 2 2 1 1 2 1 2 1 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 1 2 1 1 1 1 2 2 2 2 1 2 1 1 2 2 2 2 1 2 1 2 1 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2 2 2 1 2 1 1 1 1 2 2 2 2 2 1 1 2 2 1 2 2 1 2 1 2 1 2 1 1 2 2 1 2 2 1 1 1\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"100 25\\r\\n2 2 1 2 2 2 2 2 1 2 2 1 2 1 1 2 1 2 1 2 2 2 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 2 1 1 2 2 2 1 2 2 1 2 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 1 2 1 1 2 2 2 2 2 1 2 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"100 10\\r\\n2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '20 5\\r\\n2 2 1 1 1 2 1 1 1 1 2 2 1 1 2 2 2 1 1 2\\r\\n', 'output': ['3']}, {'input': '100 2\\r\\n2 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 2 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 1 1 2 1 2 1 1 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2\\r\\n', 'output': ['5']}, {'input': '1 1\\r\\n2\\r\\n', 'output': ['0']}, {'input': '2 1\\r\\n1 2\\r\\n', 'output': ['1']}, {'input': '100 25\\r\\n2 2 1 2 2 2 2 2 1 2 2 1 2 1 1 2 1 2 1 2 2 2 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 2 1 1 2 2 2 1 2 2 1 2 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 1 2 1 1 2 2 2 2 2 1 2 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2\\r\\n', 'output': ['15']}]","human_sample_testcases_2":"[{'input': '20 10\\r\\n1 2 2 2 2 1 1 1 2 1 1 2 2 2 2 1 2 2 2 1\\r\\n', 'output': ['2']}, {'input': '100 5\\r\\n2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 2 1 2 2 2 2 1 2 2 2 1 1 2 1 2 2 2 2 2 2 2 1 2 2 2\\r\\n', 'output': ['16']}, {'input': '2 2\\r\\n2 2\\r\\n', 'output': ['0']}, {'input': '8 4\\r\\n1 1 2 1 1 1 2 1\\r\\n', 'output': ['0']}, {'input': '100 4\\r\\n1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 2 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 2 1 1 1 2 1 1 1 2 1 1\\r\\n', 'output': ['8']}]","human_sample_testcases_3":"[{'input': '100 4\\r\\n1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 2 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 1 1 1 2 2 1 1 2 1 1 1 2 1 2 1 2 1 1 1 2 1 1 1 2 1 1\\r\\n', 'output': ['8']}, {'input': '2 1\\r\\n1 1\\r\\n', 'output': ['0']}, {'input': '1 1\\r\\n2\\r\\n', 'output': ['0']}, {'input': '10 2\\r\\n2 2 2 1 1 2 2 2 2 1\\r\\n', 'output': ['3']}, {'input': '4 2\\r\\n2 1 2 2\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '100 10\\r\\n2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 1 2 1\\r\\n', 'output': ['0']}, {'input': '9 3\\r\\n2 1 1 1 2 1 1 1 2\\r\\n', 'output': ['3']}, {'input': '1 1\\r\\n2\\r\\n', 'output': ['0']}, {'input': '100 25\\r\\n2 2 1 2 2 2 2 2 1 2 2 1 2 1 1 2 1 2 1 2 2 2 1 2 2 2 1 1 2 1 2 1 2 1 2 2 1 2 1 1 2 2 2 1 2 2 1 2 2 2 2 1 1 2 1 2 2 1 1 2 2 2 2 2 1 2 1 2 2 2 2 2 2 2 1 2 1 1 2 2 2 2 2 1 2 2 1 1 2 1 2 2 2 1 2 2 2 2 2 2\\r\\n', 'output': ['15']}, {'input': '20 4\\r\\n2 2 1 2 2 2 1 2 2 2 1 2 2 2 1 2 2 2 1 2\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '6 2\\r\\n2 1 2 2 2 1\\r\\n', 'output': ['1']}, {'input': '10 2\\r\\n2 2 2 1 1 2 2 2 2 1\\r\\n', 'output': ['3']}, {'input': '4 2\\r\\n2 1 2 2\\r\\n', 'output': ['1']}, {'input': '20 5\\r\\n2 2 1 1 1 2 1 1 1 1 2 2 1 1 2 2 2 1 1 2\\r\\n', 'output': ['3']}, {'input': '2 2\\r\\n2 1\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":358,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5\\n6\\n3\", \"5\\n3\\n5\"]","input_specification":"The first line contains an integer $$$b$$$ ($$$1 \\le b \\le 300$$$), the number of boys. The second line contains an integer $$$g$$$ ($$$1 \\le g \\le 300$$$), the number of girls. The third line contains an integer $$$n$$$ ($$$1 \\le n \\le b + g$$$), the number of the board games tournament participants.","src_uid":"9266a69e767df299569986151852e7b1","source_code":"b = int(input())\ng = int(input())\nn = int(input())\n\nminig = min(n,g)\nminib = min(n,b)\nprint(minig - (n-minib) +1)\n\n","sample_outputs":"[\"4\", \"4\"]","lang_cluster":"Python","notes":"NoteIn the first example, each of 4 decks should be taken: (0 blue, 3 red), (1 blue, 2 red), (2 blue, 1 red), (3 blue, 0 red).In the second example, 4 decks should be taken: (2 blue, 3 red), (3 blue, 2 red), (4 blue, 1 red), (5 blue, 0 red). Piles (0 blue, 5 red) and (1 blue, 4 red) can not be used.","output_specification":"Output the only integer, the minimum number of badge decks that Vasya could take.","description":"There are $$$b$$$ boys and $$$g$$$ girls participating in Olympiad of Metropolises. There will be a board games tournament in the evening and $$$n$$$ participants have accepted the invitation. The organizers do not know how many boys and girls are among them.Organizers are preparing red badges for girls and blue ones for boys.Vasya prepared $$$n+1$$$ decks of badges. The $$$i$$$-th (where $$$i$$$ is from $$$0$$$ to $$$n$$$, inclusive) deck contains $$$i$$$ blue badges and $$$n-i$$$ red ones. The total number of badges in any deck is exactly $$$n$$$.Determine the minimum number of decks among these $$$n+1$$$ that Vasya should take, so that there will be a suitable deck no matter how many girls and boys there will be among the participants of the tournament.","human_testcases":"[{\"input\": \"5\\r\\n6\\r\\n3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5\\r\\n3\\r\\n5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1\\r\\n200\\r\\n33\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n200\\r\\n150\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"123\\r\\n55\\r\\n100\\r\\n\", \"output\": [\"56\"]}, {\"input\": \"300\\r\\n300\\r\\n600\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1\\r\\n1\\r\\n1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100\\r\\n200\\r\\n250\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"100\\r\\n200\\r\\n300\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"123\\r\\n222\\r\\n250\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"300\\r\\n300\\r\\n1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"300\\r\\n299\\r\\n300\\r\\n\", \"output\": [\"300\"]}, {\"input\": \"1\\r\\n1\\r\\n2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"300\\r\\n1\\r\\n45\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"199\\r\\n199\\r\\n199\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"297\\r\\n297\\r\\n298\\r\\n\", \"output\": [\"297\"]}, {\"input\": \"299\\r\\n259\\r\\n300\\r\\n\", \"output\": [\"259\"]}, {\"input\": \"288\\r\\n188\\r\\n300\\r\\n\", \"output\": [\"177\"]}, {\"input\": \"5\\r\\n299\\r\\n4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"199\\r\\n131\\r\\n45\\r\\n\", \"output\": [\"46\"]}, {\"input\": \"50\\r\\n100\\r\\n120\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"3\\r\\n3\\r\\n4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n4\\r\\n5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4\\r\\n4\\r\\n7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n3\\r\\n5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10\\r\\n10\\r\\n12\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5\\r\\n5\\r\\n9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n2\\r\\n3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\n6\\r\\n10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n56\\r\\n57\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n7\\r\\n10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\n3\\r\\n5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7\\r\\n8\\r\\n10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"4\\r\\n2\\r\\n5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n4\\r\\n5\\r\\n\", \"output\": [\"3\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100\\r\\n200\\r\\n300\\r\\n', 'output': ['1']}, {'input': '1\\r\\n1\\r\\n2\\r\\n', 'output': ['1']}, {'input': '4\\r\\n2\\r\\n5\\r\\n', 'output': ['2']}, {'input': '299\\r\\n259\\r\\n300\\r\\n', 'output': ['259']}, {'input': '297\\r\\n297\\r\\n298\\r\\n', 'output': ['297']}]","human_sample_testcases_2":"[{'input': '300\\r\\n300\\r\\n1\\r\\n', 'output': ['2']}, {'input': '199\\r\\n199\\r\\n199\\r\\n', 'output': ['200']}, {'input': '123\\r\\n222\\r\\n250\\r\\n', 'output': ['96']}, {'input': '299\\r\\n259\\r\\n300\\r\\n', 'output': ['259']}, {'input': '100\\r\\n200\\r\\n250\\r\\n', 'output': ['51']}]","human_sample_testcases_3":"[{'input': '1\\r\\n1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '5\\r\\n3\\r\\n5\\r\\n', 'output': ['4']}, {'input': '2\\r\\n2\\r\\n3\\r\\n', 'output': ['2']}, {'input': '299\\r\\n259\\r\\n300\\r\\n', 'output': ['259']}, {'input': '4\\r\\n7\\r\\n10\\r\\n', 'output': ['2']}]","human_sample_testcases_4":"[{'input': '1\\r\\n1\\r\\n1\\r\\n', 'output': ['2']}, {'input': '3\\r\\n3\\r\\n4\\r\\n', 'output': ['3']}, {'input': '4\\r\\n2\\r\\n5\\r\\n', 'output': ['2']}, {'input': '5\\r\\n6\\r\\n10\\r\\n', 'output': ['2']}, {'input': '4\\r\\n7\\r\\n10\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '299\\r\\n259\\r\\n300\\r\\n', 'output': ['259']}, {'input': '4\\r\\n7\\r\\n10\\r\\n', 'output': ['2']}, {'input': '5\\r\\n3\\r\\n5\\r\\n', 'output': ['4']}, {'input': '300\\r\\n300\\r\\n600\\r\\n', 'output': ['1']}, {'input': '1\\r\\n1\\r\\n2\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":359,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 2\\n1 0 1 1 1 1\\n2 10\\n4 7\", \"3 3\\n1 0 2\\n2 5\\n2 4\", \"7 16\\n15 15 4 0 0 7 10\\n7 9\\n4 8 0 3 1 5 0\"]","input_specification":"The first line of the input contains two space-separated integers n and bx (1\u2009\u2264\u2009n\u2009\u2264\u200910, 2\u2009\u2264\u2009bx\u2009\u2264\u200940), where n is the number of digits in the bx-based representation of X. The second line contains n space-separated integers x1,\u2009x2,\u2009...,\u2009xn (0\u2009\u2264\u2009xi\u2009<\u2009bx) \u2014 the digits of X. They are given in the order from the most significant digit to the least significant one. The following two lines describe Y in the same way: the third line contains two space-separated integers m and by (1\u2009\u2264\u2009m\u2009\u2264\u200910, 2\u2009\u2264\u2009by\u2009\u2264\u200940, bx\u2009\u2260\u2009by), where m is the number of digits in the by-based representation of Y, and the fourth line contains m space-separated integers y1,\u2009y2,\u2009...,\u2009ym (0\u2009\u2264\u2009yi\u2009<\u2009by) \u2014 the digits of Y. There will be no leading zeroes. Both X and Y will be positive. All digits of both numbers are given in the standard decimal numeral system.","src_uid":"d6ab5f75a7bee28f0af2bf168a0b2e67","source_code":"n, b = map(int, input().split())\ncurr = 1\nc1 = 0\na = [int(i) for i in input().split()]\na = a[::-1]\nfor i in range(n):\n c1 += a[i] * curr\n curr *= b\nn, b = map(int, input().split())\ncurr = 1\nc2 = 0\na = [int(i) for i in input().split()]\na = a[::-1]\nfor i in range(n):\n c2 += a[i] * curr\n curr *= b\nif (c1 < c2):\n print('<')\nelif (c1 == c2):\n print('=')\nelse:\n print('>')","sample_outputs":"[\"=\", \"<\", \">\"]","lang_cluster":"Python","notes":"NoteIn the first sample, X\u2009=\u20091011112\u2009=\u20094710\u2009=\u2009Y.In the second sample, X\u2009=\u20091023\u2009=\u2009215 and Y\u2009=\u2009245\u2009=\u20091123, thus X\u2009<\u2009Y.In the third sample, and Y\u2009=\u200948031509. We may notice that X starts with much larger digits and bx is much larger than by, so X is clearly larger than Y.","output_specification":"Output a single character (quotes for clarity): '<' if X\u2009<\u2009Y '>' if X\u2009>\u2009Y '=' if X\u2009=\u2009Y ","description":"After seeing the \"ALL YOUR BASE ARE BELONG TO US\" meme for the first time, numbers X and Y realised that they have different bases, which complicated their relations.You're given a number X represented in base bx and a number Y represented in base by. Compare those two numbers.","human_testcases":"[{\"input\": \"6 2\\r\\n1 0 1 1 1 1\\r\\n2 10\\r\\n4 7\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"3 3\\r\\n1 0 2\\r\\n2 5\\r\\n2 4\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"7 16\\r\\n15 15 4 0 0 7 10\\r\\n7 9\\r\\n4 8 0 3 1 5 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 2\\r\\n1 0\\r\\n2 3\\r\\n1 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 2\\r\\n1 0\\r\\n1 3\\r\\n1\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 2\\r\\n1 0 1 0 1 0 1 0 1 0\\r\\n10 3\\r\\n2 2 2 2 2 2 2 2 2 2\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 16\\r\\n15 15 4 0 0 0 0 7 10 9\\r\\n7 9\\r\\n4 8 0 3 1 5 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"5 5\\r\\n4 4 4 4 4\\r\\n4 6\\r\\n5 5 5 5\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 8\\r\\n1 0\\r\\n4 2\\r\\n1 0 0 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"5 2\\r\\n1 0 0 0 1\\r\\n6 8\\r\\n1 4 7 2 0 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"6 7\\r\\n1 1 2 1 2 1\\r\\n6 6\\r\\n2 3 2 2 2 2\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"9 35\\r\\n34 3 20 29 27 30 2 8 5\\r\\n7 33\\r\\n17 3 22 31 1 11 6\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 8\\r\\n5\\r\\n9 27\\r\\n23 23 23 23 23 23 23 23 23\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"4 7\\r\\n3 0 6 6\\r\\n3 11\\r\\n7 10 10\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 40\\r\\n1\\r\\n2 5\\r\\n1 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"1 36\\r\\n35\\r\\n4 5\\r\\n2 4 4 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"1 30\\r\\n1\\r\\n1 31\\r\\n1\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"1 3\\r\\n1\\r\\n1 2\\r\\n1\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"1 2\\r\\n1\\r\\n1 40\\r\\n1\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"6 29\\r\\n1 1 1 1 1 1\\r\\n10 21\\r\\n1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"3 5\\r\\n1 0 0\\r\\n3 3\\r\\n2 2 2\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 8\\r\\n1 0\\r\\n2 3\\r\\n2 2\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 4\\r\\n3 3\\r\\n2 15\\r\\n1 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 35\\r\\n1 0\\r\\n2 6\\r\\n5 5\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 6\\r\\n5 5\\r\\n2 34\\r\\n1 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 7\\r\\n1 0\\r\\n2 3\\r\\n2 2\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 2\\r\\n1 0\\r\\n1 3\\r\\n2\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 9\\r\\n5 5\\r\\n4 3\\r\\n1 0 0 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 24\\r\\n6\\r\\n3 9\\r\\n1 1 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"5 37\\r\\n9 9 9 9 9\\r\\n6 27\\r\\n13 0 0 0 0 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 2\\r\\n1 1 1 1 1 1 1 1 1 1\\r\\n10 34\\r\\n14 14 14 14 14 14 14 14 14 14\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"7 26\\r\\n8 0 0 0 0 0 0\\r\\n9 9\\r\\n3 3 3 3 3 3 3 3 3\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 40\\r\\n2 0\\r\\n5 13\\r\\n4 0 0 0 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"1 22\\r\\n15\\r\\n10 14\\r\\n3 3 3 3 3 3 3 3 3 3\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 22\\r\\n3 3 3 3 3 3 3 3 3 3\\r\\n3 40\\r\\n19 19 19\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 29\\r\\n11 11\\r\\n6 26\\r\\n11 11 11 11 11 11\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"5 3\\r\\n1 0 0 0 0\\r\\n4 27\\r\\n1 0 0 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 3\\r\\n1 0 0 0 0 0 0 0 0 0\\r\\n8 13\\r\\n1 0 0 0 0 0 0 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"4 20\\r\\n1 1 1 1\\r\\n5 22\\r\\n1 1 1 1 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 39\\r\\n34 2 24 34 11 6 33 12 22 21\\r\\n10 36\\r\\n25 35 17 24 30 0 1 32 14 35\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 39\\r\\n35 12 31 35 28 27 25 8 22 25\\r\\n10 40\\r\\n23 21 18 12 15 29 38 32 4 8\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 38\\r\\n16 19 37 32 16 7 14 33 16 11\\r\\n10 39\\r\\n10 27 35 15 31 15 17 16 38 35\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 39\\r\\n20 12 10 32 24 14 37 35 10 38\\r\\n9 40\\r\\n1 13 0 10 22 20 1 5 35\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 40\\r\\n18 1 2 25 28 2 10 2 17 37\\r\\n10 39\\r\\n37 8 12 8 21 11 23 11 25 21\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 39\\r\\n10 20 16 36 30 29 28 9 8\\r\\n9 38\\r\\n12 36 10 22 6 3 19 12 34\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"7 39\\r\\n28 16 13 25 19 23 4\\r\\n7 38\\r\\n33 8 2 19 3 21 14\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"10 16\\r\\n15 15 4 0 0 0 0 7 10 9\\r\\n10 9\\r\\n4 8 0 3 1 5 4 8 1 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"7 22\\r\\n1 13 9 16 7 13 3\\r\\n4 4\\r\\n3 0 2 1\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 29\\r\\n10 19 8 27 1 24 13 15 13 26\\r\\n2 28\\r\\n20 14\\r\\n\", \"output\": [\">\"]}, {\"input\": \"6 16\\r\\n2 13 7 13 15 6\\r\\n10 22\\r\\n17 17 21 9 16 11 4 4 13 17\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"8 26\\r\\n6 6 17 25 24 8 8 25\\r\\n4 27\\r\\n24 7 5 24\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 23\\r\\n5 21 4 15 12 7 10 7 16 21\\r\\n4 17\\r\\n3 11 1 14\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 21\\r\\n4 7 7 2 13 7 19 19 18 19\\r\\n3 31\\r\\n6 11 28\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 30\\r\\n9\\r\\n7 37\\r\\n20 11 18 14 0 36 27\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"5 35\\r\\n22 18 28 29 11\\r\\n2 3\\r\\n2 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"7 29\\r\\n14 26 14 22 11 11 8\\r\\n6 28\\r\\n2 12 10 17 0 14\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 37\\r\\n25 2\\r\\n3 26\\r\\n13 13 12\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"8 8\\r\\n4 0 4 3 4 1 5 6\\r\\n8 24\\r\\n19 8 15 6 10 7 2 18\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"4 22\\r\\n18 16 1 2\\r\\n10 26\\r\\n23 0 12 24 16 2 24 25 1 11\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"7 31\\r\\n14 6 16 6 26 18 17\\r\\n7 24\\r\\n22 10 4 5 14 6 9\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 29\\r\\n15 22 0 5 11 12 17 22 4 27\\r\\n4 22\\r\\n9 2 8 14\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 10\\r\\n6 0\\r\\n10 26\\r\\n16 14 8 18 24 4 9 5 22 25\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"7 2\\r\\n1 0 0 0 1 0 1\\r\\n9 6\\r\\n1 1 5 1 2 5 3 5 3\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"3 9\\r\\n2 5 4\\r\\n1 19\\r\\n15\\r\\n\", \"output\": [\">\"]}, {\"input\": \"6 16\\r\\n4 9 13 4 2 8\\r\\n4 10\\r\\n3 5 2 4\\r\\n\", \"output\": [\">\"]}, {\"input\": \"2 12\\r\\n1 4\\r\\n8 16\\r\\n4 4 10 6 15 10 8 15\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"3 19\\r\\n9 18 16\\r\\n4 10\\r\\n4 3 5 4\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"7 3\\r\\n1 1 2 1 2 0 2\\r\\n2 2\\r\\n1 0\\r\\n\", \"output\": [\">\"]}, {\"input\": \"3 2\\r\\n1 1 1\\r\\n1 3\\r\\n1\\r\\n\", \"output\": [\">\"]}, {\"input\": \"4 4\\r\\n1 3 1 3\\r\\n9 3\\r\\n1 1 0 1 2 2 2 2 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 3\\r\\n1 0 0 1 1 0 0 1 2\\r\\n6 4\\r\\n1 2 0 1 3 2\\r\\n\", \"output\": [\">\"]}, {\"input\": \"3 5\\r\\n1 1 3\\r\\n10 4\\r\\n3 3 2 3 0 0 0 3 1 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"6 4\\r\\n3 3 2 2 0 2\\r\\n6 5\\r\\n1 1 1 1 0 3\\r\\n\", \"output\": [\">\"]}, {\"input\": \"6 5\\r\\n4 4 4 3 1 3\\r\\n7 6\\r\\n4 2 2 2 5 0 4\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 5\\r\\n3 3\\r\\n6 6\\r\\n4 2 0 1 1 0\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"10 6\\r\\n3 5 4 2 4 2 3 5 4 2\\r\\n10 7\\r\\n3 2 1 1 3 1 0 3 4 5\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 7\\r\\n2 0 3 2 6 6 1 4 3\\r\\n9 6\\r\\n4 4 1 1 4 5 5 0 2\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 7\\r\\n2\\r\\n4 8\\r\\n3 2 3 2\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 8\\r\\n4 1\\r\\n1 7\\r\\n1\\r\\n\", \"output\": [\">\"]}, {\"input\": \"1 10\\r\\n7\\r\\n3 9\\r\\n2 1 7\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 9\\r\\n2 2 3 6 3 6 3 8 4\\r\\n6 10\\r\\n4 7 7 0 3 8\\r\\n\", \"output\": [\">\"]}, {\"input\": \"3 11\\r\\n6 5 2\\r\\n8 10\\r\\n5 0 1 8 3 5 1 4\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"6 11\\r\\n10 6 1 0 2 2\\r\\n9 10\\r\\n4 3 4 1 1 6 3 4 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 19\\r\\n4 8\\r\\n8 18\\r\\n7 8 6 8 4 11 9 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 24\\r\\n20 9\\r\\n10 23\\r\\n21 10 15 11 6 8 20 16 14 11\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"8 36\\r\\n23 5 27 1 10 7 26 27\\r\\n10 35\\r\\n28 33 9 22 10 28 26 4 27 29\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"6 37\\r\\n22 15 14 10 1 8\\r\\n6 36\\r\\n18 5 28 10 1 17\\r\\n\", \"output\": [\">\"]}, {\"input\": \"5 38\\r\\n1 31 2 21 21\\r\\n9 37\\r\\n8 36 32 30 13 9 24 2 35\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"3 39\\r\\n27 4 3\\r\\n8 38\\r\\n32 15 11 34 35 27 30 15\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 40\\r\\n22 38\\r\\n5 39\\r\\n8 9 32 4 1\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 37\\r\\n1 35 7 33 20 21 26 24 5\\r\\n10 40\\r\\n39 4 11 9 33 12 26 32 11 8\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"4 39\\r\\n13 25 23 35\\r\\n6 38\\r\\n19 36 20 4 12 33\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"5 37\\r\\n29 29 5 7 27\\r\\n3 39\\r\\n13 1 10\\r\\n\", \"output\": [\">\"]}, {\"input\": \"7 28\\r\\n1 10 7 0 13 14 11\\r\\n6 38\\r\\n8 11 27 5 14 35\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 34\\r\\n1 32\\r\\n2 33\\r\\n2 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"7 5\\r\\n4 0 4 1 3 0 4\\r\\n4 35\\r\\n1 18 7 34\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"9 34\\r\\n5 8 4 4 26 1 30 5 24\\r\\n10 27\\r\\n1 6 3 10 8 13 22 3 12 8\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"10 36\\r\\n1 13 13 23 31 35 5 32 18 21\\r\\n9 38\\r\\n32 1 20 14 12 37 13 15 23\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"10 40\\r\\n1 1 14 5 6 3 3 11 3 25\\r\\n10 39\\r\\n1 11 24 33 25 34 38 29 27 33\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"9 37\\r\\n2 6 1 9 19 6 11 28 35\\r\\n9 40\\r\\n1 6 14 37 1 8 31 4 9\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"4 5\\r\\n1 4 2 0\\r\\n4 4\\r\\n3 2 2 3\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"6 4\\r\\n1 1 1 2 2 2\\r\\n7 3\\r\\n1 2 2 0 1 0 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"2 5\\r\\n3 3\\r\\n5 2\\r\\n1 0 0 1 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"1 9\\r\\n2\\r\\n1 10\\r\\n2\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"6 19\\r\\n4 9 14 1 3 1\\r\\n8 10\\r\\n1 1 1 7 3 7 3 0\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"7 15\\r\\n8 5 8 10 13 6 13\\r\\n8 13\\r\\n1 6 9 10 12 3 12 8\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"8 18\\r\\n1 1 4 15 7 4 9 3\\r\\n8 17\\r\\n1 10 2 10 3 11 14 10\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"8 21\\r\\n5 19 0 14 13 13 10 5\\r\\n10 13\\r\\n1 0 0 6 11 10 8 2 8 1\\r\\n\", \"output\": [\"=\"]}, {\"input\": \"8 28\\r\\n3 1 10 19 10 14 21 15\\r\\n8 21\\r\\n14 0 18 13 2 1 18 6\\r\\n\", \"output\": [\">\"]}, {\"input\": \"7 34\\r\\n21 22 28 16 30 4 27\\r\\n7 26\\r\\n5 13 21 10 8 12 10\\r\\n\", \"output\": [\">\"]}, {\"input\": \"6 26\\r\\n7 6 4 18 6 1\\r\\n6 25\\r\\n5 3 11 1 8 15\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 31\\r\\n6 27 17 22 14 16 25 9 13 26\\r\\n10 39\\r\\n6 1 3 26 12 32 28 19 9 19\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"3 5\\r\\n2 2 3\\r\\n3 6\\r\\n4 3 5\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"2 24\\r\\n4 18\\r\\n2 40\\r\\n29 24\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"5 38\\r\\n2 24 34 14 17\\r\\n8 34\\r\\n4 24 31 2 14 15 8 15\\r\\n\", \"output\": [\"<\"]}, {\"input\": \"9 40\\r\\n39 39 39 39 39 39 39 39 39\\r\\n6 35\\r\\n34 34 34 34 34 34\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 40\\r\\n39 39 39 39 39 39 39 39 39 39\\r\\n10 8\\r\\n7 7 7 7 7 7 7 7 7 7\\r\\n\", \"output\": [\">\"]}, {\"input\": \"10 40\\r\\n39 39 39 39 39 39 39 39 39 39\\r\\n10 39\\r\\n38 38 38 38 38 38 38 38 38 38\\r\\n\", \"output\": [\">\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '6 29\\r\\n1 1 1 1 1 1\\r\\n10 21\\r\\n1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['<']}, {'input': '4 5\\r\\n1 4 2 0\\r\\n4 4\\r\\n3 2 2 3\\r\\n', 'output': ['=']}, {'input': '2 2\\r\\n1 0\\r\\n2 3\\r\\n1 0\\r\\n', 'output': ['<']}, {'input': '6 5\\r\\n4 4 4 3 1 3\\r\\n7 6\\r\\n4 2 2 2 5 0 4\\r\\n', 'output': ['<']}, {'input': '1 36\\r\\n35\\r\\n4 5\\r\\n2 4 4 1\\r\\n', 'output': ['<']}]","human_sample_testcases_2":"[{'input': '2 8\\r\\n1 0\\r\\n4 2\\r\\n1 0 0 0\\r\\n', 'output': ['=']}, {'input': '10 16\\r\\n15 15 4 0 0 0 0 7 10 9\\r\\n7 9\\r\\n4 8 0 3 1 5 0\\r\\n', 'output': ['>']}, {'input': '2 5\\r\\n3 3\\r\\n5 2\\r\\n1 0 0 1 0\\r\\n', 'output': ['=']}, {'input': '5 3\\r\\n1 0 0 0 0\\r\\n4 27\\r\\n1 0 0 0\\r\\n', 'output': ['<']}, {'input': '2 24\\r\\n4 18\\r\\n2 40\\r\\n29 24\\r\\n', 'output': ['<']}]","human_sample_testcases_3":"[{'input': '10 40\\r\\n39 39 39 39 39 39 39 39 39 39\\r\\n10 39\\r\\n38 38 38 38 38 38 38 38 38 38\\r\\n', 'output': ['>']}, {'input': '2 40\\r\\n2 0\\r\\n5 13\\r\\n4 0 0 0 0\\r\\n', 'output': ['<']}, {'input': '2 37\\r\\n25 2\\r\\n3 26\\r\\n13 13 12\\r\\n', 'output': ['<']}, {'input': '10 29\\r\\n15 22 0 5 11 12 17 22 4 27\\r\\n4 22\\r\\n9 2 8 14\\r\\n', 'output': ['>']}, {'input': '1 7\\r\\n2\\r\\n4 8\\r\\n3 2 3 2\\r\\n', 'output': ['<']}]","human_sample_testcases_4":"[{'input': '1 8\\r\\n5\\r\\n9 27\\r\\n23 23 23 23 23 23 23 23 23\\r\\n', 'output': ['<']}, {'input': '8 18\\r\\n1 1 4 15 7 4 9 3\\r\\n8 17\\r\\n1 10 2 10 3 11 14 10\\r\\n', 'output': ['=']}, {'input': '2 8\\r\\n4 1\\r\\n1 7\\r\\n1\\r\\n', 'output': ['>']}, {'input': '2 5\\r\\n3 3\\r\\n5 2\\r\\n1 0 0 1 0\\r\\n', 'output': ['=']}, {'input': '9 35\\r\\n34 3 20 29 27 30 2 8 5\\r\\n7 33\\r\\n17 3 22 31 1 11 6\\r\\n', 'output': ['>']}]","human_sample_testcases_5":"[{'input': '7 31\\r\\n14 6 16 6 26 18 17\\r\\n7 24\\r\\n22 10 4 5 14 6 9\\r\\n', 'output': ['>']}, {'input': '2 24\\r\\n20 9\\r\\n10 23\\r\\n21 10 15 11 6 8 20 16 14 11\\r\\n', 'output': ['<']}, {'input': '9 34\\r\\n5 8 4 4 26 1 30 5 24\\r\\n10 27\\r\\n1 6 3 10 8 13 22 3 12 8\\r\\n', 'output': ['=']}, {'input': '2 12\\r\\n1 4\\r\\n8 16\\r\\n4 4 10 6 15 10 8 15\\r\\n', 'output': ['<']}, {'input': '2 19\\r\\n4 8\\r\\n8 18\\r\\n7 8 6 8 4 11 9 1\\r\\n', 'output': ['<']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":95.24,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":95.24,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":91.67,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":91.67,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":360,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.096,"human_sample_branch_coverage":96.668} {"sample_inputs":"[\"1\", \"8\", \"10\"]","input_specification":"The single line of input contains the integer m (1\u2009\u2264\u2009m\u2009\u2264\u20091015)\u00a0\u2014 the number of ways the thieves might steal the chocolates, as rumours say.","src_uid":"602deaad5c66e264997249457d555129","source_code":"cubes = [i**3.0 for i in range(2, int(1.8e5+5))]\n\ndef valid(mid):\n return sum([mid\/\/i for i in cubes if i <= mid])\n\ndef binary_search(k):\n l = int(4.8 * k)\n r = min(8.0 * k, 5.0 * (10**15))\n while (l+1 < r):\n mid = (l+r) \/ 2.0\n res = valid(mid)\n if (res < k):\n l = mid\n else:\n r = mid\n return int(r) if int(valid(r)) == k else -1\n\ndef main():\n k = int(input())\n print(binary_search(k))\n\nmain()\n","sample_outputs":"[\"8\", \"54\", \"-1\"]","lang_cluster":"Python","notes":"NoteIn the first sample case the smallest n that leads to exactly one way of stealing chocolates is n\u2009=\u20098, whereas the amounts of stealed chocolates are (1,\u20092,\u20094,\u20098) (the number of chocolates stolen by each of the thieves).In the second sample case the smallest n that leads to exactly 8 ways is n\u2009=\u200954 with the possibilities: (1,\u20092,\u20094,\u20098),\u2009\u2002(1,\u20093,\u20099,\u200927),\u2009\u2002(2,\u20094,\u20098,\u200916),\u2009\u2002(2,\u20096,\u200918,\u200954),\u2009\u2002(3,\u20096,\u200912,\u200924),\u2009\u2002(4,\u20098,\u200916,\u200932),\u2009\u2002(5,\u200910,\u200920,\u200940),\u2009\u2002(6,\u200912,\u200924,\u200948).There is no n leading to exactly 10 ways of stealing chocolates in the third sample case.","output_specification":"Print the only integer n\u00a0\u2014 the maximum amount of chocolates that thieves' bags can carry. If there are more than one n satisfying the rumors, print the smallest one. If there is no such n for a false-rumoured m, print \u2009-\u20091.","description":"Bad news came to Mike's village, some thieves stole a bunch of chocolates from the local factory! Horrible! Aside from loving sweet things, thieves from this area are known to be very greedy. So after a thief takes his number of chocolates for himself, the next thief will take exactly k times more than the previous one. The value of k (k\u2009>\u20091) is a secret integer known only to them. It is also known that each thief's bag can carry at most n chocolates (if they intend to take more, the deal is cancelled) and that there were exactly four thieves involved. Sadly, only the thieves know the value of n, but rumours say that the numbers of ways they could have taken the chocolates (for a fixed n, but not fixed k) is m. Two ways are considered different if one of the thieves (they should be numbered in the order they take chocolates) took different number of chocolates in them.Mike want to track the thieves down, so he wants to know what their bags are and value of n will help him in that. Please find the smallest possible value of n or tell him that the rumors are false and there is no such n.","human_testcases":"[{\"input\": \"1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"54\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"27\\r\\n\", \"output\": [\"152\"]}, {\"input\": \"28206\\r\\n\", \"output\": [\"139840\"]}, {\"input\": \"32\\r\\n\", \"output\": [\"184\"]}, {\"input\": \"115\\r\\n\", \"output\": [\"608\"]}, {\"input\": \"81258\\r\\n\", \"output\": [\"402496\"]}, {\"input\": \"116003\\r\\n\", \"output\": [\"574506\"]}, {\"input\": \"149344197\\r\\n\", \"output\": [\"739123875\"]}, {\"input\": \"57857854\\r\\n\", \"output\": [\"286347520\"]}, {\"input\": \"999999999999999\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"181023403153\\r\\n\", \"output\": [\"895903132760\"]}, {\"input\": \"196071196742\\r\\n\", \"output\": [\"970376182648\"]}, {\"input\": \"49729446417673\\r\\n\", \"output\": [\"246116048009288\"]}, {\"input\": \"14821870173923\\r\\n\", \"output\": [\"73354931125416\"]}, {\"input\": \"29031595887308\\r\\n\", \"output\": [\"143680297402952\"]}, {\"input\": \"195980601490039\\r\\n\", \"output\": [\"969927770453672\"]}, {\"input\": \"181076658641313\\r\\n\", \"output\": [\"896166653569800\"]}, {\"input\": \"166173583620704\\r\\n\", \"output\": [\"822409831653228\"]}, {\"input\": \"151269640772354\\r\\n\", \"output\": [\"748648714769352\"]}, {\"input\": \"136366565751970\\r\\n\", \"output\": [\"674891892852776\"]}, {\"input\": \"121463490731834\\r\\n\", \"output\": [\"601135070936200\"]}, {\"input\": \"106559547884220\\r\\n\", \"output\": [\"527373954052328\"]}, {\"input\": \"91656472864718\\r\\n\", \"output\": [\"453617132135750\"]}, {\"input\": \"184061307002930\\r\\n\", \"output\": [\"910937979445720\"]}, {\"input\": \"57857853\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1000000000000000\\r\\n\", \"output\": [\"4949100894494448\"]}, {\"input\": \"375402146575334\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"550368702711851\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"645093839227897\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"431\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"99999\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"999999999999998\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"999999999999997\\r\\n\", \"output\": [\"4949100894494440\"]}, {\"input\": \"999999999999996\\r\\n\", \"output\": [\"4949100894494432\"]}, {\"input\": \"999999999999995\\r\\n\", \"output\": [\"4949100894494424\"]}, {\"input\": \"999999999999993\\r\\n\", \"output\": [\"4949100894494416\"]}, {\"input\": \"999999999999991\\r\\n\", \"output\": [\"4949100894494400\"]}, {\"input\": \"999999999999992\\r\\n\", \"output\": [\"4949100894494408\"]}, {\"input\": \"999999999999994\\r\\n\", \"output\": [\"4949100894494421\"]}, {\"input\": \"4235246\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"34\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"998749999999991\\r\\n\", \"output\": [\"4942914518376840\"]}, {\"input\": \"999999874999991\\r\\n\", \"output\": [\"4949100275856792\"]}, {\"input\": \"987654129875642\\r\\n\", \"output\": [\"4887999937625136\"]}, {\"input\": \"237648237648000\\r\\n\", \"output\": [\"1176145105832192\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '550368702711851\\r\\n', 'output': ['-1']}, {'input': '121463490731834\\r\\n', 'output': ['601135070936200']}, {'input': '49729446417673\\r\\n', 'output': ['246116048009288']}, {'input': '196071196742\\r\\n', 'output': ['970376182648']}, {'input': '999999999999997\\r\\n', 'output': ['4949100894494440']}]","human_sample_testcases_2":"[{'input': '999999999999995\\r\\n', 'output': ['4949100894494424']}, {'input': '999999999999997\\r\\n', 'output': ['4949100894494440']}, {'input': '8\\r\\n', 'output': ['54']}, {'input': '181023403153\\r\\n', 'output': ['895903132760']}, {'input': '151269640772354\\r\\n', 'output': ['748648714769352']}]","human_sample_testcases_3":"[{'input': '106559547884220\\r\\n', 'output': ['527373954052328']}, {'input': '2\\r\\n', 'output': ['16']}, {'input': '99999\\r\\n', 'output': ['-1']}, {'input': '999999999999992\\r\\n', 'output': ['4949100894494408']}, {'input': '999999999999995\\r\\n', 'output': ['4949100894494424']}]","human_sample_testcases_4":"[{'input': '999999999999994\\r\\n', 'output': ['4949100894494421']}, {'input': '184061307002930\\r\\n', 'output': ['910937979445720']}, {'input': '550368702711851\\r\\n', 'output': ['-1']}, {'input': '7\\r\\n', 'output': ['48']}, {'input': '49729446417673\\r\\n', 'output': ['246116048009288']}]","human_sample_testcases_5":"[{'input': '2\\r\\n', 'output': ['16']}, {'input': '106559547884220\\r\\n', 'output': ['527373954052328']}, {'input': '121463490731834\\r\\n', 'output': ['601135070936200']}, {'input': '999999999999996\\r\\n', 'output': ['4949100894494432']}, {'input': '4235246\\r\\n', 'output': ['-1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":361,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 2\\n1 3 1 4 2\", \"6 4\\n1 1 2 2 3 3\"]","input_specification":"The first line contains two integers n,\u2009m (1\u2009\u2264\u2009n\u2009\u2264\u2009100;\u00a01\u2009\u2264\u2009m\u2009\u2264\u2009100). The second line contains n integers a1,\u2009a2,\u2009...,\u2009an (1\u2009\u2264\u2009ai\u2009\u2264\u2009100).","src_uid":"c0ef1e4d7df360c5c1e52bc6f16ca87c","source_code":"# http:\/\/codeforces.com\/problemset\/problem\/450\/A\n\nfrom collections import deque\nfrom math import ceil\n# n, m = [int(x) for x in input().split()]\nn, m = map(int, input().split())\ncandies = [int(x) for x in input().split()]\n\nchildren = deque([int(x) for x in range(1, n + 1)])\nhome = []\n\nmax_num = 0\ncounter = 0\ncandies_dict = {}\n\nfor k in candies:\n counter += 1\n candies_dict[counter] = k\n\n\nfor i in candies:\n result = ceil(i \/ m)\n if result >= max_num:\n max_num = ceil(i \/ m)\n max_candies = i\n\n# print(candies_dict)\n# print(max_candies)\n\nmax_keys = []\n\nfor k, v in candies_dict.items():\n if v == max_candies:\n max_keys.append(k)\n\nprint(max_keys[-1])\n","sample_outputs":"[\"4\", \"6\"]","lang_cluster":"Python","notes":"NoteLet's consider the first sample. Firstly child 1 gets 2 candies and go home. Then child 2 gets 2 candies and go to the end of the line. Currently the line looks like [3, 4, 5, 2] (indices of the children in order of the line). Then child 3 gets 2 candies and go home, and then child 4 gets 2 candies and goes to the end of the line. Currently the line looks like [5, 2, 4]. Then child 5 gets 2 candies and goes home. Then child 2 gets two candies and goes home, and finally child 4 gets 2 candies and goes home.Child 4 is the last one who goes home.","output_specification":"Output a single integer, representing the number of the last child.","description":"There are n children in Jzzhu's school. Jzzhu is going to give some candies to them. Let's number all the children from 1 to n. The i-th child wants to get at least ai candies.Jzzhu asks children to line up. Initially, the i-th child stands at the i-th place of the line. Then Jzzhu start distribution of the candies. He follows the algorithm: Give m candies to the first child of the line. If this child still haven't got enough candies, then the child goes to the end of the line, else the child go home. Repeat the first two steps while the line is not empty. Consider all the children in the order they go home. Jzzhu wants to know, which child will be the last in this order?","human_testcases":"[{\"input\": \"5 2\\r\\n1 3 1 4 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 4\\r\\n1 1 2 2 3 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"7 3\\r\\n6 1 5 4 2 3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 5\\r\\n2 7 3 6 2 5 1 3 4 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 1\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"9 3\\r\\n9 5 2 3 7 1 8 4 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"20 10\\r\\n58 4 32 10 73 7 30 39 47 6 59 21 24 66 79 79 46 13 29 58\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"50 5\\r\\n89 56 3 2 40 37 56 52 83 59 43 83 43 59 29 74 22 58 53 41 53 67 78 30 57 32 58 29 95 46 45 85 60 49 41 82 8 71 52 40 45 26 6 71 84 91 4 93 40 54\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"50 1\\r\\n4 3 9 7 6 8 3 7 10 9 8 8 10 2 9 3 2 4 4 10 4 6 8 10 9 9 4 2 8 9 4 4 9 5 1 5 2 4 4 9 10 2 5 10 7 2 8 6 8 1\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"50 5\\r\\n3 9 10 8 3 3 4 6 8 2 9 9 3 1 2 10 6 8 7 2 7 4 2 7 5 10 2 2 2 5 10 5 6 6 8 7 10 4 3 2 10 8 6 6 8 6 4 4 1 3\\r\\n\", \"output\": [\"46\"]}, {\"input\": \"50 2\\r\\n56 69 72 15 95 92 51 1 74 87 100 29 46 54 18 81 84 72 84 83 20 63 71 27 45 74 50 89 48 8 21 15 47 3 39 73 80 84 6 99 17 25 56 3 74 64 71 39 89 78\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"50 3\\r\\n31 39 64 16 86 3 1 9 25 54 98 42 20 3 49 41 73 37 55 62 33 77 64 22 33 82 26 13 10 13 7 40 48 18 46 79 94 72 19 12 11 61 16 37 10 49 14 94 48 69\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"50 100\\r\\n67 67 61 68 42 29 70 77 12 61 71 27 4 73 87 52 59 38 93 90 31 27 87 47 26 57 76 6 28 72 81 68 50 84 69 79 39 93 52 6 88 12 46 13 90 68 71 38 90 95\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"100 3\\r\\n4 14 20 11 19 11 14 20 5 7 6 12 11 17 5 11 7 6 2 10 13 5 12 8 5 17 20 18 7 19 11 7 7 20 20 8 10 17 17 19 20 5 15 16 19 7 11 16 4 17 2 10 1 20 20 16 19 9 9 11 5 7 12 9 9 6 20 18 13 19 8 4 8 1 2 4 10 11 15 14 1 7 17 12 13 19 12 2 3 14 15 15 5 17 14 12 17 14 16 9\\r\\n\", \"output\": [\"86\"]}, {\"input\": \"100 5\\r\\n16 8 14 16 12 11 17 19 19 2 8 9 5 6 19 9 11 18 6 9 14 16 14 18 17 17 17 5 15 20 19 7 7 10 10 5 14 20 5 19 11 16 16 19 17 9 7 12 14 10 2 11 14 5 20 8 10 11 19 2 14 14 19 17 5 10 8 8 4 2 1 10 20 12 14 11 7 6 6 15 1 5 9 15 3 17 16 17 5 14 11 9 16 15 1 11 10 6 15 7\\r\\n\", \"output\": [\"93\"]}, {\"input\": \"100 1\\r\\n58 94 18 50 17 14 96 62 83 80 75 5 9 22 25 41 3 96 74 45 66 37 2 37 13 85 68 54 77 11 85 19 25 21 52 59 90 61 72 89 82 22 10 16 3 68 61 29 55 76 28 85 65 76 27 3 14 10 56 37 86 18 35 38 56 68 23 88 33 38 52 87 55 83 94 34 100 41 83 56 91 77 32 74 97 13 67 31 57 81 53 39 5 88 46 1 79 4 49 42\\r\\n\", \"output\": [\"77\"]}, {\"input\": \"100 2\\r\\n1 51 76 62 34 93 90 43 57 59 52 78 3 48 11 60 57 48 5 54 28 81 87 23 44 77 67 61 14 73 29 53 21 89 67 41 47 9 63 37 1 71 40 85 4 14 77 40 78 75 89 74 4 70 32 65 81 95 49 90 72 41 76 55 69 83 73 84 85 93 46 6 74 90 62 37 97 7 7 37 83 30 37 88 34 16 11 59 85 19 57 63 85 20 63 97 97 65 61 48\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"100 3\\r\\n30 83 14 55 61 66 34 98 90 62 89 74 45 93 33 31 75 35 82 100 63 69 48 18 99 2 36 71 14 30 70 76 96 85 97 90 49 36 6 76 37 94 70 3 63 73 75 48 39 29 13 2 46 26 9 56 1 18 54 53 85 34 2 12 1 93 75 67 77 77 14 26 33 25 55 9 57 70 75 6 87 66 18 3 41 69 73 24 49 2 20 72 39 58 91 54 74 56 66 78\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"100 4\\r\\n69 92 76 3 32 50 15 38 21 22 14 3 67 41 95 12 10 62 83 52 78 1 18 58 94 35 62 71 58 75 13 73 60 34 50 97 50 70 19 96 53 10 100 26 20 39 62 59 88 26 24 83 70 68 66 8 6 38 16 93 2 91 81 89 78 74 21 8 31 56 28 53 77 5 81 5 94 42 77 75 92 15 59 36 61 18 55 45 69 68 81 51 12 42 85 74 98 31 17 41\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"100 5\\r\\n2 72 10 60 6 50 72 34 97 77 35 43 80 64 40 53 46 6 90 22 29 70 26 68 52 19 72 88 83 18 55 32 99 81 11 21 39 42 41 63 60 97 30 23 55 78 89 35 24 50 99 52 27 76 24 8 20 27 51 37 17 82 69 18 46 19 26 77 52 83 76 65 43 66 84 84 13 30 66 88 84 23 37 1 17 26 11 50 73 56 54 37 40 29 35 8 1 39 50 82\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"100 7\\r\\n6 73 7 54 92 33 66 65 80 47 2 53 28 59 61 16 54 89 37 48 77 40 49 59 27 52 17 22 78 80 81 80 8 93 50 7 87 57 29 16 89 55 20 7 51 54 30 98 44 96 27 70 1 1 32 61 22 92 84 98 31 89 91 90 28 56 49 25 86 49 55 16 19 1 18 8 88 47 16 18 73 86 2 96 16 91 74 49 38 98 94 25 34 85 29 27 99 31 31 58\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"100 9\\r\\n36 4 45 16 19 6 10 87 44 82 71 49 70 35 83 19 40 76 45 94 44 96 10 54 82 77 86 63 11 37 21 3 15 89 80 88 89 16 72 23 25 9 51 25 10 45 96 5 6 18 51 31 42 57 41 51 42 15 89 61 45 82 16 48 61 67 19 40 9 33 90 36 78 36 79 79 16 10 83 87 9 22 84 12 23 76 36 14 2 81 56 33 56 23 57 84 76 55 35 88\\r\\n\", \"output\": [\"47\"]}, {\"input\": \"100 10\\r\\n75 81 39 64 90 58 92 28 75 9 96 78 92 83 77 68 76 71 14 46 58 60 80 25 78 11 13 63 22 82 65 68 47 6 33 63 90 50 85 43 73 94 80 48 67 11 83 17 22 15 94 80 66 99 66 4 46 35 52 1 62 39 96 57 37 47 97 49 64 12 36 63 90 16 4 75 85 82 85 56 13 4 92 45 44 93 17 35 22 46 18 44 29 7 52 4 100 98 87 51\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"100 20\\r\\n21 19 61 70 54 97 98 14 61 72 25 94 24 56 55 25 12 80 76 11 35 17 80 26 11 94 52 47 84 61 10 2 74 25 10 21 2 79 55 50 30 75 10 64 44 5 60 96 52 16 74 41 20 77 20 44 8 86 74 36 49 61 99 13 54 64 19 99 50 43 12 73 48 48 83 55 72 73 63 81 30 27 95 9 97 82 24 3 89 90 33 14 47 88 22 78 12 75 58 67\\r\\n\", \"output\": [\"94\"]}, {\"input\": \"100 30\\r\\n56 79 59 23 11 23 67 82 81 80 99 79 8 58 93 36 98 81 46 39 34 67 3 50 4 68 70 71 2 21 52 30 75 23 33 21 16 100 56 43 8 27 40 8 56 24 17 40 94 10 67 49 61 36 95 87 17 41 7 94 33 19 17 50 26 11 94 54 38 46 77 9 53 35 98 42 50 20 43 6 78 6 38 24 100 45 43 16 1 50 16 46 14 91 95 88 10 1 50 19\\r\\n\", \"output\": [\"95\"]}, {\"input\": \"100 40\\r\\n86 11 97 17 38 95 11 5 13 83 67 75 50 2 46 39 84 68 22 85 70 23 64 46 59 93 39 80 35 78 93 21 83 19 64 1 49 59 99 83 44 81 70 58 15 82 83 47 55 65 91 10 2 92 4 77 37 32 12 57 78 11 42 8 59 21 96 69 61 30 44 29 12 70 91 14 10 83 11 75 14 10 19 39 8 98 5 81 66 66 79 55 36 29 22 45 19 24 55 49\\r\\n\", \"output\": [\"88\"]}, {\"input\": \"100 50\\r\\n22 39 95 69 94 53 80 73 33 90 40 60 2 4 84 50 70 38 92 12 36 74 87 70 51 36 57 5 54 6 35 81 52 17 55 100 95 81 32 76 21 1 100 1 95 1 40 91 98 59 84 19 11 51 79 19 47 86 45 15 62 2 59 77 31 68 71 92 17 33 10 33 85 57 5 2 88 97 91 99 63 20 63 54 79 93 24 62 46 27 30 87 3 64 95 88 16 50 79 1\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"100 70\\r\\n61 48 89 17 97 6 93 13 64 50 66 88 24 52 46 99 6 65 93 64 82 37 57 41 47 1 84 5 97 83 79 46 16 35 40 7 64 15 44 96 37 17 30 92 51 67 26 3 14 56 27 68 66 93 36 39 51 6 40 55 79 26 71 54 8 48 18 2 71 12 55 60 29 37 31 97 26 37 25 68 67 70 3 87 100 41 5 82 65 92 24 66 76 48 89 8 40 93 31 95\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"100 90\\r\\n87 32 30 15 10 52 93 63 84 1 82 41 27 51 75 32 42 94 39 53 70 13 4 22 99 35 44 38 5 23 18 100 61 80 9 12 42 93 9 77 3 7 60 95 66 78 95 42 69 8 1 88 93 66 96 20 76 63 15 36 92 52 2 72 36 57 48 63 29 20 74 88 49 47 81 61 94 74 70 93 47 3 19 52 59 41 5 40 22 3 76 97 91 37 95 88 91 99 76 15\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"100 100\\r\\n79 75 7 28 6 96 38 35 57 95 41 74 24 96 32 78 81 13 63 84 24 95 3 23 66 1 60 6 96 49 41 5 14 18 31 97 66 19 49 89 49 70 51 28 20 99 18 1 28 77 24 46 69 21 40 32 31 66 28 6 66 97 9 16 70 90 91 30 34 82 93 41 65 11 39 52 1 88 63 43 80 50 60 49 28 56 18 76 24 57 74 1 28 99 36 35 79 54 18 16\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 3\\r\\n5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\n4 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 5\\r\\n99 97\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 4\\r\\n7 5 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 50\\r\\n47 86 51\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 100\\r\\n82 100 85 1 37\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 20\\r\\n40 39 21 5 20\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 27\\r\\n81\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"20 13\\r\\n7 8 29 83 74 28 93 85 7 8 3 9 8 70 49 50 39 41 57 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 1\\r\\n100 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n6 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 2\\r\\n6 4 4 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 4\\r\\n3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 2\\r\\n1 5 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1\\r\\n3 2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 1\\r\\n2 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 1\\r\\n5 1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\n7 4\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 2\\r\\n1 51 76 62 34 93 90 43 57 59 52 78 3 48 11 60 57 48 5 54 28 81 87 23 44 77 67 61 14 73 29 53 21 89 67 41 47 9 63 37 1 71 40 85 4 14 77 40 78 75 89 74 4 70 32 65 81 95 49 90 72 41 76 55 69 83 73 84 85 93 46 6 74 90 62 37 97 7 7 37 83 30 37 88 34 16 11 59 85 19 57 63 85 20 63 97 97 65 61 48\\r\\n', 'output': ['97']}, {'input': '100 4\\r\\n69 92 76 3 32 50 15 38 21 22 14 3 67 41 95 12 10 62 83 52 78 1 18 58 94 35 62 71 58 75 13 73 60 34 50 97 50 70 19 96 53 10 100 26 20 39 62 59 88 26 24 83 70 68 66 8 6 38 16 93 2 91 81 89 78 74 21 8 31 56 28 53 77 5 81 5 94 42 77 75 92 15 59 36 61 18 55 45 69 68 81 51 12 42 85 74 98 31 17 41\\r\\n', 'output': ['97']}, {'input': '100 30\\r\\n56 79 59 23 11 23 67 82 81 80 99 79 8 58 93 36 98 81 46 39 34 67 3 50 4 68 70 71 2 21 52 30 75 23 33 21 16 100 56 43 8 27 40 8 56 24 17 40 94 10 67 49 61 36 95 87 17 41 7 94 33 19 17 50 26 11 94 54 38 46 77 9 53 35 98 42 50 20 43 6 78 6 38 24 100 45 43 16 1 50 16 46 14 91 95 88 10 1 50 19\\r\\n', 'output': ['95']}, {'input': '100 70\\r\\n61 48 89 17 97 6 93 13 64 50 66 88 24 52 46 99 6 65 93 64 82 37 57 41 47 1 84 5 97 83 79 46 16 35 40 7 64 15 44 96 37 17 30 92 51 67 26 3 14 56 27 68 66 93 36 39 51 6 40 55 79 26 71 54 8 48 18 2 71 12 55 60 29 37 31 97 26 37 25 68 67 70 3 87 100 41 5 82 65 92 24 66 76 48 89 8 40 93 31 95\\r\\n', 'output': ['100']}, {'input': '3 1\\r\\n2 3 2\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '100 3\\r\\n30 83 14 55 61 66 34 98 90 62 89 74 45 93 33 31 75 35 82 100 63 69 48 18 99 2 36 71 14 30 70 76 96 85 97 90 49 36 6 76 37 94 70 3 63 73 75 48 39 29 13 2 46 26 9 56 1 18 54 53 85 34 2 12 1 93 75 67 77 77 14 26 33 25 55 9 57 70 75 6 87 66 18 3 41 69 73 24 49 2 20 72 39 58 91 54 74 56 66 78\\r\\n', 'output': ['20']}, {'input': '5 2\\r\\n6 4 4 1 1\\r\\n', 'output': ['1']}, {'input': '3 50\\r\\n47 86 51\\r\\n', 'output': ['3']}, {'input': '2 3\\r\\n4 2\\r\\n', 'output': ['1']}, {'input': '20 10\\r\\n58 4 32 10 73 7 30 39 47 6 59 21 24 66 79 79 46 13 29 58\\r\\n', 'output': ['16']}]","human_sample_testcases_3":"[{'input': '100 2\\r\\n1 51 76 62 34 93 90 43 57 59 52 78 3 48 11 60 57 48 5 54 28 81 87 23 44 77 67 61 14 73 29 53 21 89 67 41 47 9 63 37 1 71 40 85 4 14 77 40 78 75 89 74 4 70 32 65 81 95 49 90 72 41 76 55 69 83 73 84 85 93 46 6 74 90 62 37 97 7 7 37 83 30 37 88 34 16 11 59 85 19 57 63 85 20 63 97 97 65 61 48\\r\\n', 'output': ['97']}, {'input': '100 7\\r\\n6 73 7 54 92 33 66 65 80 47 2 53 28 59 61 16 54 89 37 48 77 40 49 59 27 52 17 22 78 80 81 80 8 93 50 7 87 57 29 16 89 55 20 7 51 54 30 98 44 96 27 70 1 1 32 61 22 92 84 98 31 89 91 90 28 56 49 25 86 49 55 16 19 1 18 8 88 47 16 18 73 86 2 96 16 91 74 49 38 98 94 25 34 85 29 27 99 31 31 58\\r\\n', 'output': ['97']}, {'input': '5 1\\r\\n5 1 1 1 1\\r\\n', 'output': ['1']}, {'input': '2 3\\r\\n7 4\\r\\n', 'output': ['1']}, {'input': '50 100\\r\\n67 67 61 68 42 29 70 77 12 61 71 27 4 73 87 52 59 38 93 90 31 27 87 47 26 57 76 6 28 72 81 68 50 84 69 79 39 93 52 6 88 12 46 13 90 68 71 38 90 95\\r\\n', 'output': ['50']}]","human_sample_testcases_4":"[{'input': '2 2\\r\\n6 4\\r\\n', 'output': ['1']}, {'input': '100 2\\r\\n1 51 76 62 34 93 90 43 57 59 52 78 3 48 11 60 57 48 5 54 28 81 87 23 44 77 67 61 14 73 29 53 21 89 67 41 47 9 63 37 1 71 40 85 4 14 77 40 78 75 89 74 4 70 32 65 81 95 49 90 72 41 76 55 69 83 73 84 85 93 46 6 74 90 62 37 97 7 7 37 83 30 37 88 34 16 11 59 85 19 57 63 85 20 63 97 97 65 61 48\\r\\n', 'output': ['97']}, {'input': '100 100\\r\\n79 75 7 28 6 96 38 35 57 95 41 74 24 96 32 78 81 13 63 84 24 95 3 23 66 1 60 6 96 49 41 5 14 18 31 97 66 19 49 89 49 70 51 28 20 99 18 1 28 77 24 46 69 21 40 32 31 66 28 6 66 97 9 16 70 90 91 30 34 82 93 41 65 11 39 52 1 88 63 43 80 50 60 49 28 56 18 76 24 57 74 1 28 99 36 35 79 54 18 16\\r\\n', 'output': ['100']}, {'input': '1 3\\r\\n5\\r\\n', 'output': ['1']}, {'input': '50 5\\r\\n89 56 3 2 40 37 56 52 83 59 43 83 43 59 29 74 22 58 53 41 53 67 78 30 57 32 58 29 95 46 45 85 60 49 41 82 8 71 52 40 45 26 6 71 84 91 4 93 40 54\\r\\n', 'output': ['48']}]","human_sample_testcases_5":"[{'input': '9 3\\r\\n9 5 2 3 7 1 8 4 6\\r\\n', 'output': ['7']}, {'input': '2 5\\r\\n99 97\\r\\n', 'output': ['2']}, {'input': '100 1\\r\\n58 94 18 50 17 14 96 62 83 80 75 5 9 22 25 41 3 96 74 45 66 37 2 37 13 85 68 54 77 11 85 19 25 21 52 59 90 61 72 89 82 22 10 16 3 68 61 29 55 76 28 85 65 76 27 3 14 10 56 37 86 18 35 38 56 68 23 88 33 38 52 87 55 83 94 34 100 41 83 56 91 77 32 74 97 13 67 31 57 81 53 39 5 88 46 1 79 4 49 42\\r\\n', 'output': ['77']}, {'input': '100 2\\r\\n1 51 76 62 34 93 90 43 57 59 52 78 3 48 11 60 57 48 5 54 28 81 87 23 44 77 67 61 14 73 29 53 21 89 67 41 47 9 63 37 1 71 40 85 4 14 77 40 78 75 89 74 4 70 32 65 81 95 49 90 72 41 76 55 69 83 73 84 85 93 46 6 74 90 62 37 97 7 7 37 83 30 37 88 34 16 11 59 85 19 57 63 85 20 63 97 97 65 61 48\\r\\n', 'output': ['97']}, {'input': '100 50\\r\\n22 39 95 69 94 53 80 73 33 90 40 60 2 4 84 50 70 38 92 12 36 74 87 70 51 36 57 5 54 6 35 81 52 17 55 100 95 81 32 76 21 1 100 1 95 1 40 91 98 59 84 19 11 51 79 19 47 86 45 15 62 2 59 77 31 68 71 92 17 33 10 33 85 57 5 2 88 97 91 99 63 20 63 54 79 93 24 62 46 27 30 87 3 64 95 88 16 50 79 1\\r\\n', 'output': ['99']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":362,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 0\", \"1 0\", \"0 1\", \"-1 -1\"]","input_specification":"The first line contains two space-separated integers x and y (|x|,\u2009|y|\u2009\u2264\u2009100).","src_uid":"2fb2a129e01efc03cfc3ad91dac88382","source_code":"x = 0\ny = 0\nnx,ny = map(int,input().split())\nif ((nx == 0 or nx == 1) and ny == 0):\n print(0)\nelse:\n x = 1\n turn = 0\n flag = 0\n while True:\n turn = turn + 1\n while y != x:\n y = y + 1\n if(x == nx and y == ny):\n flag = 1 \n break\n if flag == 1:\n break\n k = x * -1\n turn = turn + 1\n while x != k:\n x = x - 1\n if(x == nx and y == ny):\n flag = 1\n break\n if flag == 1:\n break\n turn = turn + 1\n while y != x:\n y = y - 1 \n if(x == nx and y == ny):\n flag = 1\n break\n if flag == 1:\n break\n k = (x * -1) + 1\n turn = turn + 1\n while x != k:\n x = x + 1\n if(x == nx and y == ny):\n flag = 1\n break\n if flag == 1:\n break\n print(turn)","sample_outputs":"[\"0\", \"0\", \"2\", \"3\"]","lang_cluster":"Python","notes":null,"output_specification":"Print a single integer, showing how many times Valera has to turn.","description":"Valera the horse lives on a plane. The Cartesian coordinate system is defined on this plane. Also an infinite spiral is painted on the plane. The spiral consists of segments: [(0,\u20090),\u2009(1,\u20090)], [(1,\u20090),\u2009(1,\u20091)], [(1,\u20091),\u2009(\u2009-\u20091,\u20091)], [(\u2009-\u20091,\u20091),\u2009(\u2009-\u20091,\u2009\u2009-\u20091)], [(\u2009-\u20091,\u2009\u2009-\u20091),\u2009(2,\u2009\u2009-\u20091)], [(2,\u2009\u2009-\u20091),\u2009(2,\u20092)] and so on. Thus, this infinite spiral passes through each integer point of the plane.Valera the horse lives on the plane at coordinates (0,\u20090). He wants to walk along the spiral to point (x,\u2009y). Valera the horse has four legs, so he finds turning very difficult. Count how many times he will have to turn if he goes along a spiral from point (0,\u20090) to point (x,\u2009y).","human_testcases":"[{\"input\": \"0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-1 -1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 10\\r\\n\", \"output\": [\"37\"]}, {\"input\": \"0 6\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"-7 -13\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"37 -100\\r\\n\", \"output\": [\"400\"]}, {\"input\": \"99 100\\r\\n\", \"output\": [\"398\"]}, {\"input\": \"16 -32\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"-1 0\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 -5\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"0 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 -1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"397\"]}, {\"input\": \"0 99\\r\\n\", \"output\": [\"394\"]}, {\"input\": \"-98 98\\r\\n\", \"output\": [\"390\"]}, {\"input\": \"-97 0\\r\\n\", \"output\": [\"387\"]}, {\"input\": \"-96 -96\\r\\n\", \"output\": [\"383\"]}, {\"input\": \"0 -95\\r\\n\", \"output\": [\"380\"]}, {\"input\": \"94 -94\\r\\n\", \"output\": [\"376\"]}, {\"input\": \"93 0\\r\\n\", \"output\": [\"369\"]}, {\"input\": \"17 25\\r\\n\", \"output\": [\"98\"]}, {\"input\": \"1 -84\\r\\n\", \"output\": [\"336\"]}, {\"input\": \"-5 44\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"11 -15\\r\\n\", \"output\": [\"60\"]}, {\"input\": \"42 9\\r\\n\", \"output\": [\"165\"]}, {\"input\": \"-81 3\\r\\n\", \"output\": [\"323\"]}, {\"input\": \"100 99\\r\\n\", \"output\": [\"397\"]}, {\"input\": \"2 -1\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 100\\r\\n', 'output': ['397']}, {'input': '-97 0\\r\\n', 'output': ['387']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '93 0\\r\\n', 'output': ['369']}, {'input': '0 0\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '-7 -13\\r\\n', 'output': ['52']}, {'input': '-97 0\\r\\n', 'output': ['387']}, {'input': '0 6\\r\\n', 'output': ['22']}, {'input': '1 -84\\r\\n', 'output': ['336']}, {'input': '3 -5\\r\\n', 'output': ['20']}]","human_sample_testcases_3":"[{'input': '11 -15\\r\\n', 'output': ['60']}, {'input': '2 -1\\r\\n', 'output': ['4']}, {'input': '42 9\\r\\n', 'output': ['165']}, {'input': '1 -1\\r\\n', 'output': ['4']}, {'input': '16 -32\\r\\n', 'output': ['128']}]","human_sample_testcases_4":"[{'input': '94 -94\\r\\n', 'output': ['376']}, {'input': '99 100\\r\\n', 'output': ['398']}, {'input': '3 -5\\r\\n', 'output': ['20']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '1 0\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '2 -1\\r\\n', 'output': ['4']}, {'input': '0 0\\r\\n', 'output': ['0']}, {'input': '0 1\\r\\n', 'output': ['2']}, {'input': '1 0\\r\\n', 'output': ['0']}, {'input': '93 0\\r\\n', 'output': ['369']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":86.05,"human_sample_line_coverage_2":90.7,"human_sample_line_coverage_3":83.72,"human_sample_line_coverage_4":93.02,"human_sample_line_coverage_5":93.02,"human_sample_branch_coverage_1":84.62,"human_sample_branch_coverage_2":88.46,"human_sample_branch_coverage_3":80.77,"human_sample_branch_coverage_4":92.31,"human_sample_branch_coverage_5":92.31,"id":363,"human_sample_pass_rate":100.0,"human_sample_line_coverage":89.302,"human_sample_branch_coverage":87.694} {"sample_inputs":"[\"1 0\", \"2 1\", \"3 2\", \"4 1\", \"7 4\"]","input_specification":"The single line contains two space-separated integers n and k (1\u2009\u2264\u2009n\u2009\u2264\u20091000,\u20090\u2009\u2264\u2009k\u2009\u2264\u2009n).","src_uid":"1243e98fe2ebd6e6d1de851984b96079","source_code":"mod=10**9+7\nn,k=map(int,input().split())\n\nA=[0]*(n+1)\nB=[0]*(n+1)\nC=[0]*(n+1)\nF=[0]*(n+1)\nG=[0]*(n+1)\n\nF[0]=G[0]=1\nfor i in range(1,n+1):\n\tG[i]=F[i]=F[i-1]*i%mod\n\tG[i]=pow(F[i],(mod-2),mod)\n\nfor i in range(0,n):\n\tif i*2>n:\n\t\tbreak\n\tB[i]=(F[n-i]*G[i]*G[n-i*2])%mod\nfor i in range(0,n\/\/2+1):\n\tfor j in range(0,n\/\/2+1):\n\t\tA[i+j]=(A[i+j]+B[i]*B[j])%mod\nfor i in range(0,n+1):\n\tA[i]=A[i]*F[n-i]%mod\nfor i in range(0,n+1):\n\tfor j in range(0,i+1):\n\t\tC[j]=(C[j]+A[i]*F[i]*G[j]*G[i-j]*(1-(i-j)%2*2))%mod\nprint(C[k]%mod)\n\n","sample_outputs":"[\"1\", \"0\", \"4\", \"6\", \"328\"]","lang_cluster":"Python","notes":"NoteThe only permutation of size 1 has 0 good positions.Permutation (1,\u20092) has 0 good positions, and permutation (2,\u20091) has 2 positions.Permutations of size 3: (1,\u20092,\u20093) \u2014 0 positions \u2014 2 positions \u2014 2 positions \u2014 2 positions \u2014 2 positions (3,\u20092,\u20091) \u2014 0 positions","output_specification":"Print the number of permutations of length n with exactly k good positions modulo 1000000007 (109\u2009+\u20097).","description":"Permutation p is an ordered set of integers p1,\u2009\u2009p2,\u2009\u2009...,\u2009\u2009pn, consisting of n distinct positive integers, each of them doesn't exceed n. We'll denote the i-th element of permutation p as pi. We'll call number n the size or the length of permutation p1,\u2009\u2009p2,\u2009\u2009...,\u2009\u2009pn.We'll call position i (1\u2009\u2264\u2009i\u2009\u2264\u2009n) in permutation p1,\u2009p2,\u2009...,\u2009pn good, if |p[i]\u2009-\u2009i|\u2009=\u20091. Count the number of permutations of size n with exactly k good positions. Print the answer modulo 1000000007 (109\u2009+\u20097).","human_testcases":"[{\"input\": \"1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"7 4\\r\\n\", \"output\": [\"328\"]}, {\"input\": \"7 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 4\\r\\n\", \"output\": [\"2658\"]}, {\"input\": \"8 5\\r\\n\", \"output\": [\"688\"]}, {\"input\": \"10 3\\r\\n\", \"output\": [\"614420\"]}, {\"input\": \"20 0\\r\\n\", \"output\": [\"111008677\"]}, {\"input\": \"100 99\\r\\n\", \"output\": [\"2450\"]}, {\"input\": \"13 13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000 0\\r\\n\", \"output\": [\"845393494\"]}, {\"input\": \"1000 1\\r\\n\", \"output\": [\"418947603\"]}, {\"input\": \"1000 2\\r\\n\", \"output\": [\"819706485\"]}, {\"input\": \"1000 10\\r\\n\", \"output\": [\"305545369\"]}, {\"input\": \"1000 99\\r\\n\", \"output\": [\"115316732\"]}, {\"input\": \"1000 500\\r\\n\", \"output\": [\"979041279\"]}, {\"input\": \"1000 700\\r\\n\", \"output\": [\"642759746\"]}, {\"input\": \"1000 900\\r\\n\", \"output\": [\"301804159\"]}, {\"input\": \"1000 999\\r\\n\", \"output\": [\"249500\"]}, {\"input\": \"1000 998\\r\\n\", \"output\": [\"583666213\"]}, {\"input\": \"1000 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999 0\\r\\n\", \"output\": [\"184907578\"]}, {\"input\": \"999 1\\r\\n\", \"output\": [\"167859862\"]}, {\"input\": \"999 5\\r\\n\", \"output\": [\"642835575\"]}, {\"input\": \"999 13\\r\\n\", \"output\": [\"740892203\"]}, {\"input\": \"999 300\\r\\n\", \"output\": [\"562270116\"]}, {\"input\": \"999 600\\r\\n\", \"output\": [\"553332041\"]}, {\"input\": \"999 999\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"999 989\\r\\n\", \"output\": [\"254295912\"]}, {\"input\": \"999 998\\r\\n\", \"output\": [\"250000\"]}, {\"input\": \"10 0\\r\\n\", \"output\": [\"543597\"]}, {\"input\": \"5 0\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"5 1\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"5 3\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 2\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 0\\r\\n\", \"output\": [\"2\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999 998\\r\\n', 'output': ['250000']}, {'input': '1000 0\\r\\n', 'output': ['845393494']}, {'input': '5 3\\r\\n', 'output': ['12']}, {'input': '5 0\\r\\n', 'output': ['21']}, {'input': '999 999\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '3 3\\r\\n', 'output': ['0']}, {'input': '999 0\\r\\n', 'output': ['184907578']}, {'input': '2 0\\r\\n', 'output': ['1']}, {'input': '999 998\\r\\n', 'output': ['250000']}, {'input': '20 0\\r\\n', 'output': ['111008677']}]","human_sample_testcases_3":"[{'input': '20 0\\r\\n', 'output': ['111008677']}, {'input': '999 998\\r\\n', 'output': ['250000']}, {'input': '13 13\\r\\n', 'output': ['0']}, {'input': '8 5\\r\\n', 'output': ['688']}, {'input': '10 3\\r\\n', 'output': ['614420']}]","human_sample_testcases_4":"[{'input': '999 13\\r\\n', 'output': ['740892203']}, {'input': '3 0\\r\\n', 'output': ['2']}, {'input': '999 999\\r\\n', 'output': ['0']}, {'input': '1000 10\\r\\n', 'output': ['305545369']}, {'input': '8 4\\r\\n', 'output': ['2658']}]","human_sample_testcases_5":"[{'input': '1000 1\\r\\n', 'output': ['418947603']}, {'input': '1 1\\r\\n', 'output': ['0']}, {'input': '1000 99\\r\\n', 'output': ['115316732']}, {'input': '999 998\\r\\n', 'output': ['250000']}, {'input': '10 3\\r\\n', 'output': ['614420']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":93.75,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":93.75,"human_sample_branch_coverage_4":93.75,"human_sample_branch_coverage_5":100.0,"id":364,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":96.25} {"sample_inputs":"[\"WUBWUBABCWUB\", \"WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB\"]","input_specification":"The input consists of a single non-empty string, consisting only of uppercase English letters, the string's length doesn't exceed 200 characters. It is guaranteed that before Vasya remixed the song, no word contained substring \"WUB\" in it; Vasya didn't change the word order. It is also guaranteed that initially the song had at least one word.","src_uid":"edede580da1395fe459a480f6a0a548d","source_code":"n = input()\nn = list(n)\nspace = 1\n\ns = []\ni = 0\nfor _ in range(0,len(n), 1):\n if i == len(n):\n break\n elif i + 2 < len(n) and n[i] == 'W' and n[i+1] == 'U' and n[i+2] == 'B':\n i += 3\n if space == 0:\n s.append(\" \")\n space = 1\n else:\n s.append(n[i])\n i += 1\n space = 0\nans = \"\"\nfor i in range(0, len(s)):\n ans = ans + s[i]\n\nprint(ans)\n","sample_outputs":"[\"ABC\", \"WE ARE THE CHAMPIONS MY FRIEND\"]","lang_cluster":"Python","notes":"NoteIn the first sample: \"WUBWUBABCWUB\" = \"WUB\" + \"WUB\" + \"ABC\" + \"WUB\". That means that the song originally consisted of a single word \"ABC\", and all words \"WUB\" were added by Vasya.In the second sample Vasya added a single word \"WUB\" between all neighbouring words, in the beginning and in the end, except for words \"ARE\" and \"THE\" \u2014 between them Vasya added two \"WUB\".","output_specification":"Print the words of the initial song that Vasya used to make a dubsteb remix. Separate the words with a space.","description":"Vasya works as a DJ in the best Berland nightclub, and he often uses dubstep music in his performance. Recently, he has decided to take a couple of old songs and make dubstep remixes from them.Let's assume that a song consists of some number of words. To make the dubstep remix of this song, Vasya inserts a certain number of words \"WUB\" before the first word of the song (the number may be zero), after the last word (the number may be zero), and between words (at least one between any pair of neighbouring words), and then the boy glues together all the words, including \"WUB\", in one string and plays the song at the club.For example, a song with words \"I AM X\" can transform into a dubstep remix as \"WUBWUBIWUBAMWUBWUBX\" and cannot transform into \"WUBWUBIAMWUBX\".Recently, Petya has heard Vasya's new dubstep track, but since he isn't into modern music, he decided to find out what was the initial song that Vasya remixed. Help Petya restore the original song.","human_testcases":"[{\"input\": \"WUBWUBABCWUB\\r\\n\", \"output\": [\"ABC\"]}, {\"input\": \"WUBWEWUBAREWUBWUBTHEWUBCHAMPIONSWUBMYWUBFRIENDWUB\\r\\n\", \"output\": [\"WE ARE THE CHAMPIONS MY FRIEND\", \"WE ARE THE CHAMPIONS MY FRIEND\"]}, {\"input\": \"WUBWUBWUBSR\\r\\n\", \"output\": [\"SR\"]}, {\"input\": \"RWUBWUBWUBLWUB\\r\\n\", \"output\": [\"R L\", \"R L\"]}, {\"input\": \"ZJWUBWUBWUBJWUBWUBWUBL\\r\\n\", \"output\": [\"ZJ J L\", \"ZJ J L\"]}, {\"input\": \"CWUBBWUBWUBWUBEWUBWUBWUBQWUBWUBWUB\\r\\n\", \"output\": [\"C B E Q\", \"C B E Q\"]}, {\"input\": \"WUBJKDWUBWUBWBIRAQKFWUBWUBYEWUBWUBWUBWVWUBWUB\\r\\n\", \"output\": [\"JKD WBIRAQKF YE WV\", \"JKD WBIRAQKF YE WV\"]}, {\"input\": \"WUBKSDHEMIXUJWUBWUBRWUBWUBWUBSWUBWUBWUBHWUBWUBWUB\\r\\n\", \"output\": [\"KSDHEMIXUJ R S H\", \"KSDHEMIXUJ R S H\"]}, {\"input\": \"OGWUBWUBWUBXWUBWUBWUBIWUBWUBWUBKOWUBWUB\\r\\n\", \"output\": [\"OG X I KO\", \"OG X I KO\"]}, {\"input\": \"QWUBQQWUBWUBWUBIWUBWUBWWWUBWUBWUBJOPJPBRH\\r\\n\", \"output\": [\"Q QQ I WW JOPJPBRH\", \"Q QQ I WW JOPJPBRH\"]}, {\"input\": \"VSRNVEATZTLGQRFEGBFPWUBWUBWUBAJWUBWUBWUBPQCHNWUBCWUB\\r\\n\", \"output\": [\"VSRNVEATZTLGQRFEGBFP AJ PQCHN C\", \"VSRNVEATZTLGQRFEGBFP AJ PQCHN C\"]}, {\"input\": \"WUBWUBEWUBWUBWUBIQMJNIQWUBWUBWUBGZZBQZAUHYPWUBWUBWUBPMRWUBWUBWUBDCV\\r\\n\", \"output\": [\"E IQMJNIQ GZZBQZAUHYP PMR DCV\", \"E IQMJNIQ GZZBQZAUHYP PMR DCV\"]}, {\"input\": \"WUBWUBWUBFVWUBWUBWUBBPSWUBWUBWUBRXNETCJWUBWUBWUBJDMBHWUBWUBWUBBWUBWUBVWUBWUBB\\r\\n\", \"output\": [\"FV BPS RXNETCJ JDMBH B V B\", \"FV BPS RXNETCJ JDMBH B V B\"]}, {\"input\": \"WUBWUBWUBFBQWUBWUBWUBIDFSYWUBWUBWUBCTWDMWUBWUBWUBSXOWUBWUBWUBQIWUBWUBWUBL\\r\\n\", \"output\": [\"FBQ IDFSY CTWDM SXO QI L\", \"FBQ IDFSY CTWDM SXO QI L\"]}, {\"input\": \"IWUBWUBQLHDWUBYIIKZDFQWUBWUBWUBCXWUBWUBUWUBWUBWUBKWUBWUBWUBNL\\r\\n\", \"output\": [\"I QLHD YIIKZDFQ CX U K NL\", \"I QLHD YIIKZDFQ CX U K NL\"]}, {\"input\": \"KWUBUPDYXGOKUWUBWUBWUBAGOAHWUBIZDWUBWUBWUBIYWUBWUBWUBVWUBWUBWUBPWUBWUBWUBE\\r\\n\", \"output\": [\"K UPDYXGOKU AGOAH IZD IY V P E\", \"K UPDYXGOKU AGOAH IZD IY V P E\"]}, {\"input\": \"WUBWUBOWUBWUBWUBIPVCQAFWYWUBWUBWUBQWUBWUBWUBXHDKCPYKCTWWYWUBWUBWUBVWUBWUBWUBFZWUBWUB\\r\\n\", \"output\": [\"O IPVCQAFWY Q XHDKCPYKCTWWY V FZ\", \"O IPVCQAFWY Q XHDKCPYKCTWWY V FZ\"]}, {\"input\": \"PAMJGYWUBWUBWUBXGPQMWUBWUBWUBTKGSXUYWUBWUBWUBEWUBWUBWUBNWUBWUBWUBHWUBWUBWUBEWUBWUB\\r\\n\", \"output\": [\"PAMJGY XGPQM TKGSXUY E N H E\", \"PAMJGY XGPQM TKGSXUY E N H E\"]}, {\"input\": \"WUBYYRTSMNWUWUBWUBWUBCWUBWUBWUBCWUBWUBWUBFSYUINDWOBVWUBWUBWUBFWUBWUBWUBAUWUBWUBWUBVWUBWUBWUBJB\\r\\n\", \"output\": [\"YYRTSMNWU C C FSYUINDWOBV F AU V JB\", \"YYRTSMNWU C C FSYUINDWOBV F AU V JB\"]}, {\"input\": \"WUBWUBYGPYEYBNRTFKOQCWUBWUBWUBUYGRTQEGWLFYWUBWUBWUBFVWUBHPWUBWUBWUBXZQWUBWUBWUBZDWUBWUBWUBM\\r\\n\", \"output\": [\"YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M\", \"YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M\"]}, {\"input\": \"WUBZVMJWUBWUBWUBFOIMJQWKNZUBOFOFYCCWUBWUBWUBAUWWUBRDRADWUBWUBWUBCHQVWUBWUBWUBKFTWUBWUBWUBW\\r\\n\", \"output\": [\"ZVMJ FOIMJQWKNZUBOFOFYCC AUW RDRAD CHQV KFT W\", \"ZVMJ FOIMJQWKNZUBOFOFYCC AUW RDRAD CHQV KFT W\"]}, {\"input\": \"WUBWUBZBKOKHQLGKRVIMZQMQNRWUBWUBWUBDACWUBWUBNZHFJMPEYKRVSWUBWUBWUBPPHGAVVPRZWUBWUBWUBQWUBWUBAWUBG\\r\\n\", \"output\": [\"ZBKOKHQLGKRVIMZQMQNR DAC NZHFJMPEYKRVS PPHGAVVPRZ Q A G\", \"ZBKOKHQLGKRVIMZQMQNR DAC NZHFJMPEYKRVS PPHGAVVPRZ Q A G\"]}, {\"input\": \"WUBWUBJWUBWUBWUBNFLWUBWUBWUBGECAWUBYFKBYJWTGBYHVSSNTINKWSINWSMAWUBWUBWUBFWUBWUBWUBOVWUBWUBLPWUBWUBWUBN\\r\\n\", \"output\": [\"J NFL GECA YFKBYJWTGBYHVSSNTINKWSINWSMA F OV LP N\", \"J NFL GECA YFKBYJWTGBYHVSSNTINKWSINWSMA F OV LP N\"]}, {\"input\": \"WUBWUBLCWUBWUBWUBZGEQUEATJVIXETVTWUBWUBWUBEXMGWUBWUBWUBRSWUBWUBWUBVWUBWUBWUBTAWUBWUBWUBCWUBWUBWUBQG\\r\\n\", \"output\": [\"LC ZGEQUEATJVIXETVT EXMG RS V TA C QG\", \"LC ZGEQUEATJVIXETVT EXMG RS V TA C QG\"]}, {\"input\": \"WUBMPWUBWUBWUBORWUBWUBDLGKWUBWUBWUBVVZQCAAKVJTIKWUBWUBWUBTJLUBZJCILQDIFVZWUBWUBYXWUBWUBWUBQWUBWUBWUBLWUB\\r\\n\", \"output\": [\"MP OR DLGK VVZQCAAKVJTIK TJLUBZJCILQDIFVZ YX Q L\", \"MP OR DLGK VVZQCAAKVJTIK TJLUBZJCILQDIFVZ YX Q L\"]}, {\"input\": \"WUBNXOLIBKEGXNWUBWUBWUBUWUBGITCNMDQFUAOVLWUBWUBWUBAIJDJZJHFMPVTPOXHPWUBWUBWUBISCIOWUBWUBWUBGWUBWUBWUBUWUB\\r\\n\", \"output\": [\"NXOLIBKEGXN U GITCNMDQFUAOVL AIJDJZJHFMPVTPOXHP ISCIO G U\", \"NXOLIBKEGXN U GITCNMDQFUAOVL AIJDJZJHFMPVTPOXHP ISCIO G U\"]}, {\"input\": \"WUBWUBNMMWCZOLYPNBELIYVDNHJUNINWUBWUBWUBDXLHYOWUBWUBWUBOJXUWUBWUBWUBRFHTGJCEFHCGWARGWUBWUBWUBJKWUBWUBSJWUBWUB\\r\\n\", \"output\": [\"NMMWCZOLYPNBELIYVDNHJUNIN DXLHYO OJXU RFHTGJCEFHCGWARG JK SJ\", \"NMMWCZOLYPNBELIYVDNHJUNIN DXLHYO OJXU RFHTGJCEFHCGWARG JK SJ\"]}, {\"input\": \"SGWLYSAUJOJBNOXNWUBWUBWUBBOSSFWKXPDPDCQEWUBWUBWUBDIRZINODWUBWUBWUBWWUBWUBWUBPPHWUBWUBWUBRWUBWUBWUBQWUBWUBWUBJWUB\\r\\n\", \"output\": [\"SGWLYSAUJOJBNOXN BOSSFWKXPDPDCQE DIRZINOD W PPH R Q J\", \"SGWLYSAUJOJBNOXN BOSSFWKXPDPDCQE DIRZINOD W PPH R Q J\"]}, {\"input\": \"TOWUBWUBWUBGBTBNWUBWUBWUBJVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSAWUBWUBWUBSWUBWUBWUBTOLVXWUBWUBWUBNHWUBWUBWUBO\\r\\n\", \"output\": [\"TO GBTBN JVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSA S TOLVX NH O\", \"TO GBTBN JVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSA S TOLVX NH O\"]}, {\"input\": \"WUBWUBWSPLAYSZSAUDSWUBWUBWUBUWUBWUBWUBKRWUBWUBWUBRSOKQMZFIYZQUWUBWUBWUBELSHUWUBWUBWUBUKHWUBWUBWUBQXEUHQWUBWUBWUBBWUBWUBWUBR\\r\\n\", \"output\": [\"WSPLAYSZSAUDS U KR RSOKQMZFIYZQU ELSHU UKH QXEUHQ B R\", \"WSPLAYSZSAUDS U KR RSOKQMZFIYZQU ELSHU UKH QXEUHQ B R\"]}, {\"input\": \"WUBXEMWWVUHLSUUGRWUBWUBWUBAWUBXEGILZUNKWUBWUBWUBJDHHKSWUBWUBWUBDTSUYSJHWUBWUBWUBPXFWUBMOHNJWUBWUBWUBZFXVMDWUBWUBWUBZMWUBWUB\\r\\n\", \"output\": [\"XEMWWVUHLSUUGR A XEGILZUNK JDHHKS DTSUYSJH PXF MOHNJ ZFXVMD ZM\", \"XEMWWVUHLSUUGR A XEGILZUNK JDHHKS DTSUYSJH PXF MOHNJ ZFXVMD ZM\"]}, {\"input\": \"BMBWUBWUBWUBOQKWUBWUBWUBPITCIHXHCKLRQRUGXJWUBWUBWUBVWUBWUBWUBJCWUBWUBWUBQJPWUBWUBWUBBWUBWUBWUBBMYGIZOOXWUBWUBWUBTAGWUBWUBHWUB\\r\\n\", \"output\": [\"BMB OQK PITCIHXHCKLRQRUGXJ V JC QJP B BMYGIZOOX TAG H\", \"BMB OQK PITCIHXHCKLRQRUGXJ V JC QJP B BMYGIZOOX TAG H\"]}, {\"input\": \"CBZNWUBWUBWUBNHWUBWUBWUBYQSYWUBWUBWUBMWUBWUBWUBXRHBTMWUBWUBWUBPCRCWUBWUBWUBTZUYLYOWUBWUBWUBCYGCWUBWUBWUBCLJWUBWUBWUBSWUBWUBWUB\\r\\n\", \"output\": [\"CBZN NH YQSY M XRHBTM PCRC TZUYLYO CYGC CLJ S\", \"CBZN NH YQSY M XRHBTM PCRC TZUYLYO CYGC CLJ S\"]}, {\"input\": \"DPDWUBWUBWUBEUQKWPUHLTLNXHAEKGWUBRRFYCAYZFJDCJLXBAWUBWUBWUBHJWUBOJWUBWUBWUBNHBJEYFWUBWUBWUBRWUBWUBWUBSWUBWWUBWUBWUBXDWUBWUBWUBJWUB\\r\\n\", \"output\": [\"DPD EUQKWPUHLTLNXHAEKG RRFYCAYZFJDCJLXBA HJ OJ NHBJEYF R S W XD J\", \"DPD EUQKWPUHLTLNXHAEKG RRFYCAYZFJDCJLXBA HJ OJ NHBJEYF R S W XD J\"]}, {\"input\": \"WUBWUBWUBISERPQITVIYERSCNWUBWUBWUBQWUBWUBWUBDGSDIPWUBWUBWUBCAHKDZWEXBIBJVVSKKVQJWUBWUBWUBKIWUBWUBWUBCWUBWUBWUBAWUBWUBWUBPWUBWUBWUBHWUBWUBWUBF\\r\\n\", \"output\": [\"ISERPQITVIYERSCN Q DGSDIP CAHKDZWEXBIBJVVSKKVQJ KI C A P H F\", \"ISERPQITVIYERSCN Q DGSDIP CAHKDZWEXBIBJVVSKKVQJ KI C A P H F\"]}, {\"input\": \"WUBWUBWUBIWUBWUBLIKNQVWUBWUBWUBPWUBWUBWUBHWUBWUBWUBMWUBWUBWUBDPRSWUBWUBWUBBSAGYLQEENWXXVWUBWUBWUBXMHOWUBWUBWUBUWUBWUBWUBYRYWUBWUBWUBCWUBWUBWUBY\\r\\n\", \"output\": [\"I LIKNQV P H M DPRS BSAGYLQEENWXXV XMHO U YRY C Y\", \"I LIKNQV P H M DPRS BSAGYLQEENWXXV XMHO U YRY C Y\"]}, {\"input\": \"WUBWUBWUBMWUBWUBWUBQWUBWUBWUBITCFEYEWUBWUBWUBHEUWGNDFNZGWKLJWUBWUBWUBMZPWUBWUBWUBUWUBWUBWUBBWUBWUBWUBDTJWUBHZVIWUBWUBWUBPWUBFNHHWUBWUBWUBVTOWUB\\r\\n\", \"output\": [\"M Q ITCFEYE HEUWGNDFNZGWKLJ MZP U B DTJ HZVI P FNHH VTO\", \"M Q ITCFEYE HEUWGNDFNZGWKLJ MZP U B DTJ HZVI P FNHH VTO\"]}, {\"input\": \"WUBWUBNDNRFHYJAAUULLHRRDEDHYFSRXJWUBWUBWUBMUJVDTIRSGYZAVWKRGIFWUBWUBWUBHMZWUBWUBWUBVAIWUBWUBWUBDDKJXPZRGWUBWUBWUBSGXWUBWUBWUBIFKWUBWUBWUBUWUBWUBWUBW\\r\\n\", \"output\": [\"NDNRFHYJAAUULLHRRDEDHYFSRXJ MUJVDTIRSGYZAVWKRGIF HMZ VAI DDKJXPZRG SGX IFK U W\", \"NDNRFHYJAAUULLHRRDEDHYFSRXJ MUJVDTIRSGYZAVWKRGIF HMZ VAI DDKJXPZRG SGX IFK U W\"]}, {\"input\": \"WUBOJMWRSLAXXHQRTPMJNCMPGWUBWUBWUBNYGMZIXNLAKSQYWDWUBWUBWUBXNIWUBWUBWUBFWUBWUBWUBXMBWUBWUBWUBIWUBWUBWUBINWUBWUBWUBWDWUBWUBWUBDDWUBWUBWUBD\\r\\n\", \"output\": [\"OJMWRSLAXXHQRTPMJNCMPG NYGMZIXNLAKSQYWD XNI F XMB I IN WD DD D\", \"OJMWRSLAXXHQRTPMJNCMPG NYGMZIXNLAKSQYWD XNI F XMB I IN WD DD D\"]}, {\"input\": \"WUBWUBWUBREHMWUBWUBWUBXWUBWUBWUBQASNWUBWUBWUBNLSMHLCMTICWUBWUBWUBVAWUBWUBWUBHNWUBWUBWUBNWUBWUBWUBUEXLSFOEULBWUBWUBWUBXWUBWUBWUBJWUBWUBWUBQWUBWUBWUBAWUBWUB\\r\\n\", \"output\": [\"REHM X QASN NLSMHLCMTIC VA HN N UEXLSFOEULB X J Q A\", \"REHM X QASN NLSMHLCMTIC VA HN N UEXLSFOEULB X J Q A\"]}, {\"input\": \"WUBWUBWUBSTEZTZEFFIWUBWUBWUBSWUBWUBWUBCWUBFWUBHRJPVWUBWUBWUBDYJUWUBWUBWUBPWYDKCWUBWUBWUBCWUBWUBWUBUUEOGCVHHBWUBWUBWUBEXLWUBWUBWUBVCYWUBWUBWUBMWUBWUBWUBYWUB\\r\\n\", \"output\": [\"STEZTZEFFI S C F HRJPV DYJU PWYDKC C UUEOGCVHHB EXL VCY M Y\", \"STEZTZEFFI S C F HRJPV DYJU PWYDKC C UUEOGCVHHB EXL VCY M Y\"]}, {\"input\": \"WPPNMSQOQIWUBWUBWUBPNQXWUBWUBWUBHWUBWUBWUBNFLWUBWUBWUBGWSGAHVJFNUWUBWUBWUBFWUBWUBWUBWCMLRICFSCQQQTNBWUBWUBWUBSWUBWUBWUBKGWUBWUBWUBCWUBWUBWUBBMWUBWUBWUBRWUBWUB\\r\\n\", \"output\": [\"WPPNMSQOQI PNQX H NFL GWSGAHVJFNU F WCMLRICFSCQQQTNB S KG C BM R\", \"WPPNMSQOQI PNQX H NFL GWSGAHVJFNU F WCMLRICFSCQQQTNB S KG C BM R\"]}, {\"input\": \"YZJOOYITZRARKVFYWUBWUBRZQGWUBWUBWUBUOQWUBWUBWUBIWUBWUBWUBNKVDTBOLETKZISTWUBWUBWUBWLWUBQQFMMGSONZMAWUBZWUBWUBWUBQZUXGCWUBWUBWUBIRZWUBWUBWUBLTTVTLCWUBWUBWUBY\\r\\n\", \"output\": [\"YZJOOYITZRARKVFY RZQG UOQ I NKVDTBOLETKZIST WL QQFMMGSONZMA Z QZUXGC IRZ LTTVTLC Y\", \"YZJOOYITZRARKVFY RZQG UOQ I NKVDTBOLETKZIST WL QQFMMGSONZMA Z QZUXGC IRZ LTTVTLC Y\"]}, {\"input\": \"WUBCAXNCKFBVZLGCBWCOAWVWOFKZVQYLVTWUBWUBWUBNLGWUBWUBWUBAMGDZBDHZMRMQMDLIRMIWUBWUBWUBGAJSHTBSWUBWUBWUBCXWUBWUBWUBYWUBZLXAWWUBWUBWUBOHWUBWUBWUBZWUBWUBWUBGBWUBWUBWUBE\\r\\n\", \"output\": [\"CAXNCKFBVZLGCBWCOAWVWOFKZVQYLVT NLG AMGDZBDHZMRMQMDLIRMI GAJSHTBS CX Y ZLXAW OH Z GB E\", \"CAXNCKFBVZLGCBWCOAWVWOFKZVQYLVT NLG AMGDZBDHZMRMQMDLIRMI GAJSHTBS CX Y ZLXAW OH Z GB E\"]}, {\"input\": \"WUBWUBCHXSOWTSQWUBWUBWUBCYUZBPBWUBWUBWUBSGWUBWUBWKWORLRRLQYUUFDNWUBWUBWUBYYGOJNEVEMWUBWUBWUBRWUBWUBWUBQWUBWUBWUBIHCKWUBWUBWUBKTWUBWUBWUBRGSNTGGWUBWUBWUBXCXWUBWUBWUBS\\r\\n\", \"output\": [\"CHXSOWTSQ CYUZBPB SG WKWORLRRLQYUUFDN YYGOJNEVEM R Q IHCK KT RGSNTGG XCX S\", \"CHXSOWTSQ CYUZBPB SG WKWORLRRLQYUUFDN YYGOJNEVEM R Q IHCK KT RGSNTGG XCX S\"]}, {\"input\": \"WUBWUBWUBHJHMSBURXTHXWSCHNAIJOWBHLZGJZDHEDSPWBWACCGQWUBWUBWUBXTZKGIITWUBWUBWUBAWUBWUBWUBVNCXPUBCQWUBWUBWUBIDPNAWUBWUBWUBOWUBWUBWUBYGFWUBWUBWUBMQOWUBWUBWUBKWUBWUBWUBAZVWUBWUBWUBEP\\r\\n\", \"output\": [\"HJHMSBURXTHXWSCHNAIJOWBHLZGJZDHEDSPWBWACCGQ XTZKGIIT A VNCXPUBCQ IDPNA O YGF MQO K AZV EP\", \"HJHMSBURXTHXWSCHNAIJOWBHLZGJZDHEDSPWBWACCGQ XTZKGIIT A VNCXPUBCQ IDPNA O YGF MQO K AZV EP\"]}, {\"input\": \"WUBKYDZOYWZSNGMKJSWAXFDFLTHDHEOGTDBNZMSMKZTVWUBWUBWUBLRMIIWUBWUBWUBGWUBWUBWUBADPSWUBWUBWUBANBWUBWUBPCWUBWUBWUBPWUBWUBWUBGPVNLSWIRFORYGAABUXMWUBWUBWUBOWUBWUBWUBNWUBWUBWUBYWUBWUB\\r\\n\", \"output\": [\"KYDZOYWZSNGMKJSWAXFDFLTHDHEOGTDBNZMSMKZTV LRMII G ADPS ANB PC P GPVNLSWIRFORYGAABUXM O N Y\", \"KYDZOYWZSNGMKJSWAXFDFLTHDHEOGTDBNZMSMKZTV LRMII G ADPS ANB PC P GPVNLSWIRFORYGAABUXM O N Y\"]}, {\"input\": \"REWUBWUBWUBJDWUBWUBWUBNWUBWUBWUBTWWUBWUBWUBWZDOCKKWUBWUBWUBLDPOVBFRCFWUBWUBAKZIBQKEUAZEEWUBWUBWUBLQYPNPFWUBYEWUBWUBWUBFWUBWUBWUBBPWUBWUBWUBAWWUBWUBWUBQWUBWUBWUBBRWUBWUBWUBXJL\\r\\n\", \"output\": [\"RE JD N TW WZDOCKK LDPOVBFRCF AKZIBQKEUAZEE LQYPNPF YE F BP AW Q BR XJL\", \"RE JD N TW WZDOCKK LDPOVBFRCF AKZIBQKEUAZEE LQYPNPF YE F BP AW Q BR XJL\"]}, {\"input\": \"CUFGJDXGMWUBWUBWUBOMWUBWUBWUBSIEWUBWUBWUBJJWKNOWUBWUBWUBYBHVNRNORGYWUBWUBWUBOAGCAWUBWUBWUBSBLBKTPFKPBIWUBWUBWUBJBWUBWUBWUBRMFCJPGWUBWUBWUBDWUBWUBWUBOJOWUBWUBWUBZPWUBWUBWUBMWUBRWUBWUBWUBFXWWUBWUBWUBO\\r\\n\", \"output\": [\"CUFGJDXGM OM SIE JJWKNO YBHVNRNORGY OAGCA SBLBKTPFKPBI JB RMFCJPG D OJO ZP M R FXW O\", \"CUFGJDXGM OM SIE JJWKNO YBHVNRNORGY OAGCA SBLBKTPFKPBI JB RMFCJPG D OJO ZP M R FXW O\"]}, {\"input\": \"WUBJZGAEXFMFEWMAKGQLUWUBWUBWUBICYTPQWGENELVYWANKUOJYWUBWUBWUBGWUBWUBWUBHYCJVLPHTUPNEGKCDGQWUBWUBWUBOFWUBWUBWUBCPGSOGZBRPRPVJJEWUBWUBWUBDQBCWUBWUBWUBHWUBWUBWUBMHOHYBMATWUBWUBWUBVWUBWUBWUBSWUBWUBWUBKOWU\\r\\n\", \"output\": [\"JZGAEXFMFEWMAKGQLU ICYTPQWGENELVYWANKUOJY G HYCJVLPHTUPNEGKCDGQ OF CPGSOGZBRPRPVJJE DQBC H MHOHYBMAT V S KOWU\", \"JZGAEXFMFEWMAKGQLU ICYTPQWGENELVYWANKUOJY G HYCJVLPHTUPNEGKCDGQ OF CPGSOGZBRPRPVJJE DQBC H MHOHYBMAT V S KOWU\"]}, {\"input\": \"A\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"WUBA\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"WUBWUBA\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"AWUBWUBWUB\\r\\n\", \"output\": [\"A\"]}, {\"input\": \"AWUBBWUBCWUBD\\r\\n\", \"output\": [\"A B C D\"]}, {\"input\": \"WUBWWUBWUBWUBUWUBWUBBWUB\\r\\n\", \"output\": [\"W U B\", \"W U B\"]}, {\"input\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n\", \"output\": [\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"]}, {\"input\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWUBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n\", \"output\": [\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"]}, {\"input\": \"WUWUBBWWUBUB\\r\\n\", \"output\": [\"WU BW UB\"]}, {\"input\": \"WUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUABWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUBWUB\\r\\n\", \"output\": [\"WUAB\"]}, {\"input\": \"ZWUB\\r\\n\", \"output\": [\"Z\"]}, {\"input\": \"WU\\r\\n\", \"output\": [\"WU\"]}, {\"input\": \"UB\\r\\n\", \"output\": [\"UB\"]}, {\"input\": \"U\\r\\n\", \"output\": [\"U\"]}, {\"input\": \"WUBW\\r\\n\", \"output\": [\"W\"]}, {\"input\": \"WUBWU\\r\\n\", \"output\": [\"WU\"]}, {\"input\": \"WUWUB\\r\\n\", \"output\": [\"WU\"]}, {\"input\": \"UBWUB\\r\\n\", \"output\": [\"UB\"]}, {\"input\": \"WUWUBUBWUBUWUB\\r\\n\", \"output\": [\"WU UB U\"]}, {\"input\": \"WUBWWUBAWUB\\r\\n\", \"output\": [\"W A\"]}, {\"input\": \"WUUUUU\\r\\n\", \"output\": [\"WUUUUU\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'WUBWUBZBKOKHQLGKRVIMZQMQNRWUBWUBWUBDACWUBWUBNZHFJMPEYKRVSWUBWUBWUBPPHGAVVPRZWUBWUBWUBQWUBWUBAWUBG\\r\\n', 'output': ['ZBKOKHQLGKRVIMZQMQNR DAC NZHFJMPEYKRVS PPHGAVVPRZ Q A G', 'ZBKOKHQLGKRVIMZQMQNR DAC NZHFJMPEYKRVS PPHGAVVPRZ Q A G']}, {'input': 'WPPNMSQOQIWUBWUBWUBPNQXWUBWUBWUBHWUBWUBWUBNFLWUBWUBWUBGWSGAHVJFNUWUBWUBWUBFWUBWUBWUBWCMLRICFSCQQQTNBWUBWUBWUBSWUBWUBWUBKGWUBWUBWUBCWUBWUBWUBBMWUBWUBWUBRWUBWUB\\r\\n', 'output': ['WPPNMSQOQI PNQX H NFL GWSGAHVJFNU F WCMLRICFSCQQQTNB S KG C BM R', 'WPPNMSQOQI PNQX H NFL GWSGAHVJFNU F WCMLRICFSCQQQTNB S KG C BM R']}, {'input': 'WUBWU\\r\\n', 'output': ['WU']}, {'input': 'BMBWUBWUBWUBOQKWUBWUBWUBPITCIHXHCKLRQRUGXJWUBWUBWUBVWUBWUBWUBJCWUBWUBWUBQJPWUBWUBWUBBWUBWUBWUBBMYGIZOOXWUBWUBWUBTAGWUBWUBHWUB\\r\\n', 'output': ['BMB OQK PITCIHXHCKLRQRUGXJ V JC QJP B BMYGIZOOX TAG H', 'BMB OQK PITCIHXHCKLRQRUGXJ V JC QJP B BMYGIZOOX TAG H']}, {'input': 'REWUBWUBWUBJDWUBWUBWUBNWUBWUBWUBTWWUBWUBWUBWZDOCKKWUBWUBWUBLDPOVBFRCFWUBWUBAKZIBQKEUAZEEWUBWUBWUBLQYPNPFWUBYEWUBWUBWUBFWUBWUBWUBBPWUBWUBWUBAWWUBWUBWUBQWUBWUBWUBBRWUBWUBWUBXJL\\r\\n', 'output': ['RE JD N TW WZDOCKK LDPOVBFRCF AKZIBQKEUAZEE LQYPNPF YE F BP AW Q BR XJL', 'RE JD N TW WZDOCKK LDPOVBFRCF AKZIBQKEUAZEE LQYPNPF YE F BP AW Q BR XJL']}]","human_sample_testcases_2":"[{'input': 'WUBWUBWSPLAYSZSAUDSWUBWUBWUBUWUBWUBWUBKRWUBWUBWUBRSOKQMZFIYZQUWUBWUBWUBELSHUWUBWUBWUBUKHWUBWUBWUBQXEUHQWUBWUBWUBBWUBWUBWUBR\\r\\n', 'output': ['WSPLAYSZSAUDS U KR RSOKQMZFIYZQU ELSHU UKH QXEUHQ B R', 'WSPLAYSZSAUDS U KR RSOKQMZFIYZQU ELSHU UKH QXEUHQ B R']}, {'input': 'TOWUBWUBWUBGBTBNWUBWUBWUBJVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSAWUBWUBWUBSWUBWUBWUBTOLVXWUBWUBWUBNHWUBWUBWUBO\\r\\n', 'output': ['TO GBTBN JVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSA S TOLVX NH O', 'TO GBTBN JVIOJBIZFUUYHUAIEBQLQXPQKZJMPTCWBKPOSA S TOLVX NH O']}, {'input': 'WUBW\\r\\n', 'output': ['W']}, {'input': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWUBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n', 'output': ['AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA']}, {'input': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n', 'output': ['AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA']}]","human_sample_testcases_3":"[{'input': 'WUBWUBWUBSR\\r\\n', 'output': ['SR']}, {'input': 'WUWUBUBWUBUWUB\\r\\n', 'output': ['WU UB U']}, {'input': 'WUBXEMWWVUHLSUUGRWUBWUBWUBAWUBXEGILZUNKWUBWUBWUBJDHHKSWUBWUBWUBDTSUYSJHWUBWUBWUBPXFWUBMOHNJWUBWUBWUBZFXVMDWUBWUBWUBZMWUBWUB\\r\\n', 'output': ['XEMWWVUHLSUUGR A XEGILZUNK JDHHKS DTSUYSJH PXF MOHNJ ZFXVMD ZM', 'XEMWWVUHLSUUGR A XEGILZUNK JDHHKS DTSUYSJH PXF MOHNJ ZFXVMD ZM']}, {'input': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n', 'output': ['AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA']}, {'input': 'ZWUB\\r\\n', 'output': ['Z']}]","human_sample_testcases_4":"[{'input': 'QWUBQQWUBWUBWUBIWUBWUBWWWUBWUBWUBJOPJPBRH\\r\\n', 'output': ['Q QQ I WW JOPJPBRH', 'Q QQ I WW JOPJPBRH']}, {'input': 'ZJWUBWUBWUBJWUBWUBWUBL\\r\\n', 'output': ['ZJ J L', 'ZJ J L']}, {'input': 'WUBWUBEWUBWUBWUBIQMJNIQWUBWUBWUBGZZBQZAUHYPWUBWUBWUBPMRWUBWUBWUBDCV\\r\\n', 'output': ['E IQMJNIQ GZZBQZAUHYP PMR DCV', 'E IQMJNIQ GZZBQZAUHYP PMR DCV']}, {'input': 'WUBWUBYGPYEYBNRTFKOQCWUBWUBWUBUYGRTQEGWLFYWUBWUBWUBFVWUBHPWUBWUBWUBXZQWUBWUBWUBZDWUBWUBWUBM\\r\\n', 'output': ['YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M', 'YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M']}, {'input': 'WUBWUBJWUBWUBWUBNFLWUBWUBWUBGECAWUBYFKBYJWTGBYHVSSNTINKWSINWSMAWUBWUBWUBFWUBWUBWUBOVWUBWUBLPWUBWUBWUBN\\r\\n', 'output': ['J NFL GECA YFKBYJWTGBYHVSSNTINKWSINWSMA F OV LP N', 'J NFL GECA YFKBYJWTGBYHVSSNTINKWSINWSMA F OV LP N']}]","human_sample_testcases_5":"[{'input': 'WU\\r\\n', 'output': ['WU']}, {'input': 'WUBWUBWUBIWUBWUBLIKNQVWUBWUBWUBPWUBWUBWUBHWUBWUBWUBMWUBWUBWUBDPRSWUBWUBWUBBSAGYLQEENWXXVWUBWUBWUBXMHOWUBWUBWUBUWUBWUBWUBYRYWUBWUBWUBCWUBWUBWUBY\\r\\n', 'output': ['I LIKNQV P H M DPRS BSAGYLQEENWXXV XMHO U YRY C Y', 'I LIKNQV P H M DPRS BSAGYLQEENWXXV XMHO U YRY C Y']}, {'input': 'WUBWUBWUBFBQWUBWUBWUBIDFSYWUBWUBWUBCTWDMWUBWUBWUBSXOWUBWUBWUBQIWUBWUBWUBL\\r\\n', 'output': ['FBQ IDFSY CTWDM SXO QI L', 'FBQ IDFSY CTWDM SXO QI L']}, {'input': 'QWUBQQWUBWUBWUBIWUBWUBWWWUBWUBWUBJOPJPBRH\\r\\n', 'output': ['Q QQ I WW JOPJPBRH', 'Q QQ I WW JOPJPBRH']}, {'input': 'WUBWUBYGPYEYBNRTFKOQCWUBWUBWUBUYGRTQEGWLFYWUBWUBWUBFVWUBHPWUBWUBWUBXZQWUBWUBWUBZDWUBWUBWUBM\\r\\n', 'output': ['YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M', 'YGPYEYBNRTFKOQC UYGRTQEGWLFY FV HP XZQ ZD M']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":90.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":90.0,"human_sample_branch_coverage_5":100.0,"id":365,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":96.0} {"sample_inputs":"[\"3 7 0\", \"2 0 1\", \"1 1 0\", \"0 0 1\"]","input_specification":"The only line contains three integers $$$x$$$, $$$y$$$, $$$z$$$ ($$$0\\le x,y,z\\le100$$$), corresponding to the number of persons who would upvote, downvote or unknown.","src_uid":"66398694a4a142b4a4e709d059aca0fa","source_code":"a,b,c=map(int,input().split())\nx=a-b\nif(c>=abs(x) and c!=0):\n\tprint(\"?\")\nelif(x==0):\n\tprint(\"0\")\nelif(x<0):\n\tprint(\"-\")\nelse:\n\tprint(\"+\")","sample_outputs":"[\"-\", \"+\", \"0\", \"?\"]","lang_cluster":"Python","notes":"NoteIn the first example, Nauuo would definitely get three upvotes and seven downvotes, so the only possible result is \"-\".In the second example, no matter the person unknown downvotes or upvotes, Nauuo would get more upvotes than downvotes. So the only possible result is \"+\".In the third example, Nauuo would definitely get one upvote and one downvote, so the only possible result is \"0\".In the fourth example, if the only one person upvoted, the result would be \"+\", otherwise, the result would be \"-\". There are two possible results, so the result is uncertain.","output_specification":"If there is only one possible result, print the result : \"+\", \"-\" or \"0\". Otherwise, print \"?\" to report that the result is uncertain.","description":"Nauuo is a girl who loves writing comments.One day, she posted a comment on Codeforces, wondering whether she would get upvotes or downvotes.It's known that there were $$$x$$$ persons who would upvote, $$$y$$$ persons who would downvote, and there were also another $$$z$$$ persons who would vote, but you don't know whether they would upvote or downvote. Note that each of the $$$x+y+z$$$ people would vote exactly one time.There are three different results: if there are more people upvote than downvote, the result will be \"+\"; if there are more people downvote than upvote, the result will be \"-\"; otherwise the result will be \"0\".Because of the $$$z$$$ unknown persons, the result may be uncertain (i.e. there are more than one possible results). More formally, the result is uncertain if and only if there exist two different situations of how the $$$z$$$ persons vote, that the results are different in the two situations.Tell Nauuo the result or report that the result is uncertain.","human_testcases":"[{\"input\": \"3 7 0\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"2 0 1\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"1 1 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 0 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"12 1 11\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"22 99 77\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"28 99 70\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"73 29 43\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"100 100 100\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"1 0 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 7 1\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"13 6 8\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"94 37 25\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"45 0 44\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"62 56 5\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"88 88 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"0 0 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"0 100 0\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"0 0 100\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"100 0 100\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"100 100 0\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 100 50\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"100 50 50\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"48 100 48\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"100 48 48\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"0 100 48\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"100 0 48\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"0 100 99\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"100 0 99\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"96 55 0\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"21 50 0\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"86 1 0\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"58 58 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"12 89 2\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"34 51 3\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"93 21 2\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"97 78 2\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"19 90 4\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"21 52 5\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"42 40 4\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"58 97 4\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"26 92 6\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"8 87 7\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"49 8 6\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"97 64 6\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"43 93 9\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"21 55 9\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"66 27 9\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"58 83 8\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"52 14 10\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"2 87 10\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"80 29 11\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"92 93 10\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"62 63 12\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"33 24 13\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"79 42 12\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"98 82 13\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"60 33 15\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"37 5 15\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"21 31 14\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"78 95 14\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"2 82 17\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"42 43 16\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"98 44 17\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"82 84 16\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"80 63 18\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"21 24 18\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"97 33 19\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"87 98 19\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"99 20 7\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"47 78 6\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"47 40 10\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"96 71 19\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"25 35 23\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"36 3 35\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"74 2 16\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"58 83 39\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"40 51 11\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"0 87 13\\r\\n\", \"output\": [\"-\"]}, {\"input\": \"89 41 36\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"97 71 36\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"34 44 21\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"13 1 13\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"83 3 8\\r\\n\", \"output\": [\"+\"]}, {\"input\": \"60 60 32\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"25 39 32\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"46 1 89\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"43 9 61\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"82 98 93\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"10 5 6\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"9 8 2\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 3 3\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"8 5 5\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 3 2\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"1 50 50\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"3 2 3\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"1 3 4\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"1 2 2\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"7 4 3\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"7 3 5\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 1 6\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"3 4 5\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"25 12 100\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"3 3 2\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 2 10\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"7 4 4\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"4 3 1\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"5 5 3\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"2 1 3\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"1 2 7\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"6 5 4\\r\\n\", \"output\": [\"?\"]}, {\"input\": \"15 4 15\\r\\n\", \"output\": [\"?\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '7 4 3\\r\\n', 'output': ['?']}, {'input': '0 0 100\\r\\n', 'output': ['?']}, {'input': '2 0 1\\r\\n', 'output': ['+']}, {'input': '89 41 36\\r\\n', 'output': ['+']}, {'input': '52 14 10\\r\\n', 'output': ['+']}]","human_sample_testcases_2":"[{'input': '96 71 19\\r\\n', 'output': ['+']}, {'input': '100 100 100\\r\\n', 'output': ['?']}, {'input': '62 63 12\\r\\n', 'output': ['?']}, {'input': '42 43 16\\r\\n', 'output': ['?']}, {'input': '28 99 70\\r\\n', 'output': ['-']}]","human_sample_testcases_3":"[{'input': '0 0 0\\r\\n', 'output': ['0']}, {'input': '19 90 4\\r\\n', 'output': ['-']}, {'input': '78 95 14\\r\\n', 'output': ['-']}, {'input': '58 97 4\\r\\n', 'output': ['-']}, {'input': '60 33 15\\r\\n', 'output': ['+']}]","human_sample_testcases_4":"[{'input': '8 87 7\\r\\n', 'output': ['-']}, {'input': '5 3 2\\r\\n', 'output': ['?']}, {'input': '3 4 5\\r\\n', 'output': ['?']}, {'input': '12 1 11\\r\\n', 'output': ['?']}, {'input': '58 83 39\\r\\n', 'output': ['?']}]","human_sample_testcases_5":"[{'input': '74 2 16\\r\\n', 'output': ['+']}, {'input': '0 0 1\\r\\n', 'output': ['?']}, {'input': '100 48 48\\r\\n', 'output': ['+']}, {'input': '28 99 70\\r\\n', 'output': ['-']}, {'input': '82 84 16\\r\\n', 'output': ['?']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":77.78,"human_sample_line_coverage_2":88.89,"human_sample_line_coverage_3":88.89,"human_sample_line_coverage_4":77.78,"human_sample_line_coverage_5":88.89,"human_sample_branch_coverage_1":66.67,"human_sample_branch_coverage_2":83.33,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":66.67,"human_sample_branch_coverage_5":83.33,"id":366,"human_sample_pass_rate":100.0,"human_sample_line_coverage":84.446,"human_sample_branch_coverage":76.666} {"sample_inputs":"[\"6\\n1 5\\n2 6\\n3 7\", \"10\\n1 2\\n1 3\\n1 5\", \"6\\n1 3\\n2 2\\n2 2\"]","input_specification":"The first line of the input contains a single integer n (3\u2009\u2264\u2009n\u2009\u2264\u20093\u00b7106)\u00a0\u2014\u00a0the number of schoolchildren who will participate in the Olympiad. The next line of the input contains two integers min1 and max1 (1\u2009\u2264\u2009min1\u2009\u2264\u2009max1\u2009\u2264\u2009106)\u00a0\u2014\u00a0the minimum and maximum limits on the number of diplomas of the first degree that can be distributed. The third line of the input contains two integers min2 and max2 (1\u2009\u2264\u2009min2\u2009\u2264\u2009max2\u2009\u2264\u2009106)\u00a0\u2014\u00a0the minimum and maximum limits on the number of diplomas of the second degree that can be distributed. The next line of the input contains two integers min3 and max3 (1\u2009\u2264\u2009min3\u2009\u2264\u2009max3\u2009\u2264\u2009106)\u00a0\u2014\u00a0the minimum and maximum limits on the number of diplomas of the third degree that can be distributed. It is guaranteed that min1\u2009+\u2009min2\u2009+\u2009min3\u2009\u2264\u2009n\u2009\u2264\u2009max1\u2009+\u2009max2\u2009+\u2009max3.","src_uid":"3cd092b6507079518cf206deab21cf97","source_code":"n=int(input())\na=[None]*3\na[0]=list(map(int,input().split()))\na[1]=list(map(int,input().split()))\na[2]=list(map(int,input().split()))\ntotal=0\nb=[None]*3\nfor i in range(3):\n total+=a[i][0]\n b[i]=a[i][0]\n\nwhile totaln:\n b[0]+=(n-total)\n total=n\n else:\n b[0]+=k\n total+=k\n if b[1]n:\n b[1]+=(n-total)\n total=n\n else:\n b[1]+=k\n total+=k\n if b[2]n:\n b[2]+=(n-total)\n total=n\n else:\n b[2]+=k\n total+=k\n \nprint(b[0],b[1],b[2])\n","sample_outputs":"[\"1 2 3\", \"2 3 5\", \"2 2 2\"]","lang_cluster":"Python","notes":null,"output_specification":"In the first line of the output print three numbers, showing how many diplomas of the first, second and third degree will be given to students in the optimal variant of distributing diplomas. The optimal variant of distributing diplomas is the one that maximizes the number of students who receive diplomas of the first degree. Of all the suitable options, the best one is the one which maximizes the number of participants who receive diplomas of the second degree. If there are several of these options, the best one is the one that maximizes the number of diplomas of the third degree.","description":"Soon a school Olympiad in Informatics will be held in Berland, n schoolchildren will participate there.At a meeting of the jury of the Olympiad it was decided that each of the n participants, depending on the results, will get a diploma of the first, second or third degree. Thus, each student will receive exactly one diploma.They also decided that there must be given at least min1 and at most max1 diplomas of the first degree, at least min2 and at most max2 diplomas of the second degree, and at least min3 and at most max3 diplomas of the third degree.After some discussion it was decided to choose from all the options of distributing diplomas satisfying these limitations the one that maximizes the number of participants who receive diplomas of the first degree. Of all these options they select the one which maximizes the number of the participants who receive diplomas of the second degree. If there are multiple of these options, they select the option that maximizes the number of diplomas of the third degree.Choosing the best option of distributing certificates was entrusted to Ilya, one of the best programmers of Berland. However, he found more important things to do, so it is your task now to choose the best option of distributing of diplomas, based on the described limitations.It is guaranteed that the described limitations are such that there is a way to choose such an option of distributing diplomas that all n participants of the Olympiad will receive a diploma of some degree.","human_testcases":"[{\"input\": \"6\\r\\n1 5\\r\\n2 6\\r\\n3 7\\r\\n\", \"output\": [\"1 2 3\"]}, {\"input\": \"10\\r\\n1 2\\r\\n1 3\\r\\n1 5\\r\\n\", \"output\": [\"2 3 5\"]}, {\"input\": \"6\\r\\n1 3\\r\\n2 2\\r\\n2 2\\r\\n\", \"output\": [\"2 2 2\"]}, {\"input\": \"55\\r\\n1 1000000\\r\\n40 50\\r\\n10 200\\r\\n\", \"output\": [\"5 40 10\"]}, {\"input\": \"3\\r\\n1 1\\r\\n1 1\\r\\n1 1\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"3\\r\\n1 1000000\\r\\n1 1000000\\r\\n1 1000000\\r\\n\", \"output\": [\"1 1 1\"]}, {\"input\": \"1000\\r\\n100 400\\r\\n300 500\\r\\n400 1200\\r\\n\", \"output\": [\"300 300 400\"]}, {\"input\": \"3000000\\r\\n1 1000000\\r\\n1 1000000\\r\\n1 1000000\\r\\n\", \"output\": [\"1000000 1000000 1000000\"]}, {\"input\": \"11\\r\\n3 5\\r\\n3 5\\r\\n3 5\\r\\n\", \"output\": [\"5 3 3\"]}, {\"input\": \"12\\r\\n3 5\\r\\n3 5\\r\\n3 5\\r\\n\", \"output\": [\"5 4 3\"]}, {\"input\": \"13\\r\\n3 5\\r\\n3 5\\r\\n3 5\\r\\n\", \"output\": [\"5 5 3\"]}, {\"input\": \"3000000\\r\\n1000000 1000000\\r\\n1000000 1000000\\r\\n1000000 1000000\\r\\n\", \"output\": [\"1000000 1000000 1000000\"]}, {\"input\": \"50\\r\\n1 100\\r\\n1 100\\r\\n1 100\\r\\n\", \"output\": [\"48 1 1\"]}, {\"input\": \"1279\\r\\n123 670\\r\\n237 614\\r\\n846 923\\r\\n\", \"output\": [\"196 237 846\"]}, {\"input\": \"1589\\r\\n213 861\\r\\n5 96\\r\\n506 634\\r\\n\", \"output\": [\"861 96 632\"]}, {\"input\": \"2115\\r\\n987 987\\r\\n112 483\\r\\n437 959\\r\\n\", \"output\": [\"987 483 645\"]}, {\"input\": \"641\\r\\n251 960\\r\\n34 370\\r\\n149 149\\r\\n\", \"output\": [\"458 34 149\"]}, {\"input\": \"1655\\r\\n539 539\\r\\n10 425\\r\\n605 895\\r\\n\", \"output\": [\"539 425 691\"]}, {\"input\": \"1477\\r\\n210 336\\r\\n410 837\\r\\n448 878\\r\\n\", \"output\": [\"336 693 448\"]}, {\"input\": \"1707\\r\\n149 914\\r\\n190 422\\r\\n898 899\\r\\n\", \"output\": [\"619 190 898\"]}, {\"input\": \"1529\\r\\n515 515\\r\\n563 869\\r\\n169 451\\r\\n\", \"output\": [\"515 845 169\"]}, {\"input\": \"1543\\r\\n361 994\\r\\n305 407\\r\\n102 197\\r\\n\", \"output\": [\"994 407 142\"]}, {\"input\": \"1107\\r\\n471 849\\r\\n360 741\\r\\n71 473\\r\\n\", \"output\": [\"676 360 71\"]}, {\"input\": \"1629279\\r\\n267360 999930\\r\\n183077 674527\\r\\n202618 786988\\r\\n\", \"output\": [\"999930 426731 202618\"]}, {\"input\": \"1233589\\r\\n2850 555444\\r\\n500608 921442\\r\\n208610 607343\\r\\n\", \"output\": [\"524371 500608 208610\"]}, {\"input\": \"679115\\r\\n112687 183628\\r\\n101770 982823\\r\\n81226 781340\\r\\n\", \"output\": [\"183628 414261 81226\"]}, {\"input\": \"1124641\\r\\n117999 854291\\r\\n770798 868290\\r\\n76651 831405\\r\\n\", \"output\": [\"277192 770798 76651\"]}, {\"input\": \"761655\\r\\n88152 620061\\r\\n60403 688549\\r\\n79370 125321\\r\\n\", \"output\": [\"620061 62224 79370\"]}, {\"input\": \"2174477\\r\\n276494 476134\\r\\n555283 954809\\r\\n319941 935631\\r\\n\", \"output\": [\"476134 954809 743534\"]}, {\"input\": \"1652707\\r\\n201202 990776\\r\\n34796 883866\\r\\n162979 983308\\r\\n\", \"output\": [\"990776 498952 162979\"]}, {\"input\": \"2065529\\r\\n43217 891429\\r\\n434379 952871\\r\\n650231 855105\\r\\n\", \"output\": [\"891429 523869 650231\"]}, {\"input\": \"1702543\\r\\n405042 832833\\r\\n50931 747750\\r\\n381818 796831\\r\\n\", \"output\": [\"832833 487892 381818\"]}, {\"input\": \"501107\\r\\n19061 859924\\r\\n126478 724552\\r\\n224611 489718\\r\\n\", \"output\": [\"150018 126478 224611\"]}, {\"input\": \"1629279\\r\\n850831 967352\\r\\n78593 463906\\r\\n452094 885430\\r\\n\", \"output\": [\"967352 209833 452094\"]}, {\"input\": \"1233589\\r\\n2850 157021\\r\\n535109 748096\\r\\n392212 475634\\r\\n\", \"output\": [\"157021 684356 392212\"]}, {\"input\": \"679115\\r\\n125987 786267\\r\\n70261 688983\\r\\n178133 976789\\r\\n\", \"output\": [\"430721 70261 178133\"]}, {\"input\": \"1124641\\r\\n119407 734250\\r\\n213706 860770\\r\\n102149 102149\\r\\n\", \"output\": [\"734250 288242 102149\"]}, {\"input\": \"761655\\r\\n325539 325539\\r\\n280794 792505\\r\\n18540 106895\\r\\n\", \"output\": [\"325539 417576 18540\"]}, {\"input\": \"2174477\\r\\n352351 791072\\r\\n365110 969163\\r\\n887448 955610\\r\\n\", \"output\": [\"791072 495957 887448\"]}, {\"input\": \"1652707\\r\\n266774 638522\\r\\n65688 235422\\r\\n924898 992826\\r\\n\", \"output\": [\"638522 89287 924898\"]}, {\"input\": \"2065529\\r\\n608515 608515\\r\\n751563 864337\\r\\n614898 705451\\r\\n\", \"output\": [\"608515 842116 614898\"]}, {\"input\": \"1702543\\r\\n5784 996578\\r\\n47395 300407\\r\\n151614 710197\\r\\n\", \"output\": [\"996578 300407 405558\"]}, {\"input\": \"501107\\r\\n8073 390048\\r\\n190494 647328\\r\\n274071 376923\\r\\n\", \"output\": [\"36542 190494 274071\"]}, {\"input\": \"200\\r\\n50 50\\r\\n100 100\\r\\n50 50\\r\\n\", \"output\": [\"50 100 50\"]}, {\"input\": \"14\\r\\n1 100\\r\\n1 100\\r\\n8 9\\r\\n\", \"output\": [\"5 1 8\"]}, {\"input\": \"300\\r\\n200 400\\r\\n50 100\\r\\n40 80\\r\\n\", \"output\": [\"210 50 40\"]}, {\"input\": \"10\\r\\n3 6\\r\\n3 6\\r\\n3 6\\r\\n\", \"output\": [\"4 3 3\"]}, {\"input\": \"14\\r\\n3 6\\r\\n3 6\\r\\n3 6\\r\\n\", \"output\": [\"6 5 3\"]}, {\"input\": \"17\\r\\n3 6\\r\\n3 6\\r\\n3 6\\r\\n\", \"output\": [\"6 6 5\"]}, {\"input\": \"1000000\\r\\n300000 600000\\r\\n300000 600000\\r\\n300000 600000\\r\\n\", \"output\": [\"400000 300000 300000\"]}, {\"input\": \"1400000\\r\\n300000 600000\\r\\n300000 600000\\r\\n300000 600000\\r\\n\", \"output\": [\"600000 500000 300000\"]}, {\"input\": \"1700000\\r\\n300000 600000\\r\\n300000 600000\\r\\n300000 600000\\r\\n\", \"output\": [\"600000 600000 500000\"]}, {\"input\": \"561\\r\\n400 400\\r\\n80 80\\r\\n81 81\\r\\n\", \"output\": [\"400 80 81\"]}, {\"input\": \"2000\\r\\n100 1000\\r\\n1 1\\r\\n1 2000\\r\\n\", \"output\": [\"1000 1 999\"]}, {\"input\": \"1000002\\r\\n1 1000000\\r\\n1 1000000\\r\\n999999 1000000\\r\\n\", \"output\": [\"2 1 999999\"]}, {\"input\": \"1000002\\r\\n1 1000000\\r\\n1 1000000\\r\\n1000000 1000000\\r\\n\", \"output\": [\"1 1 1000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '300\\r\\n200 400\\r\\n50 100\\r\\n40 80\\r\\n', 'output': ['210 50 40']}, {'input': '1107\\r\\n471 849\\r\\n360 741\\r\\n71 473\\r\\n', 'output': ['676 360 71']}, {'input': '1233589\\r\\n2850 555444\\r\\n500608 921442\\r\\n208610 607343\\r\\n', 'output': ['524371 500608 208610']}, {'input': '1702543\\r\\n405042 832833\\r\\n50931 747750\\r\\n381818 796831\\r\\n', 'output': ['832833 487892 381818']}, {'input': '1652707\\r\\n266774 638522\\r\\n65688 235422\\r\\n924898 992826\\r\\n', 'output': ['638522 89287 924898']}]","human_sample_testcases_2":"[{'input': '2065529\\r\\n43217 891429\\r\\n434379 952871\\r\\n650231 855105\\r\\n', 'output': ['891429 523869 650231']}, {'input': '1000\\r\\n100 400\\r\\n300 500\\r\\n400 1200\\r\\n', 'output': ['300 300 400']}, {'input': '17\\r\\n3 6\\r\\n3 6\\r\\n3 6\\r\\n', 'output': ['6 6 5']}, {'input': '1529\\r\\n515 515\\r\\n563 869\\r\\n169 451\\r\\n', 'output': ['515 845 169']}, {'input': '501107\\r\\n19061 859924\\r\\n126478 724552\\r\\n224611 489718\\r\\n', 'output': ['150018 126478 224611']}]","human_sample_testcases_3":"[{'input': '1529\\r\\n515 515\\r\\n563 869\\r\\n169 451\\r\\n', 'output': ['515 845 169']}, {'input': '1702543\\r\\n405042 832833\\r\\n50931 747750\\r\\n381818 796831\\r\\n', 'output': ['832833 487892 381818']}, {'input': '1652707\\r\\n266774 638522\\r\\n65688 235422\\r\\n924898 992826\\r\\n', 'output': ['638522 89287 924898']}, {'input': '1700000\\r\\n300000 600000\\r\\n300000 600000\\r\\n300000 600000\\r\\n', 'output': ['600000 600000 500000']}, {'input': '300\\r\\n200 400\\r\\n50 100\\r\\n40 80\\r\\n', 'output': ['210 50 40']}]","human_sample_testcases_4":"[{'input': '1655\\r\\n539 539\\r\\n10 425\\r\\n605 895\\r\\n', 'output': ['539 425 691']}, {'input': '3\\r\\n1 1000000\\r\\n1 1000000\\r\\n1 1000000\\r\\n', 'output': ['1 1 1']}, {'input': '6\\r\\n1 5\\r\\n2 6\\r\\n3 7\\r\\n', 'output': ['1 2 3']}, {'input': '761655\\r\\n88152 620061\\r\\n60403 688549\\r\\n79370 125321\\r\\n', 'output': ['620061 62224 79370']}, {'input': '10\\r\\n1 2\\r\\n1 3\\r\\n1 5\\r\\n', 'output': ['2 3 5']}]","human_sample_testcases_5":"[{'input': '679115\\r\\n112687 183628\\r\\n101770 982823\\r\\n81226 781340\\r\\n', 'output': ['183628 414261 81226']}, {'input': '1000000\\r\\n300000 600000\\r\\n300000 600000\\r\\n300000 600000\\r\\n', 'output': ['400000 300000 300000']}, {'input': '2065529\\r\\n608515 608515\\r\\n751563 864337\\r\\n614898 705451\\r\\n', 'output': ['608515 842116 614898']}, {'input': '1543\\r\\n361 994\\r\\n305 407\\r\\n102 197\\r\\n', 'output': ['994 407 142']}, {'input': '2174477\\r\\n276494 476134\\r\\n555283 954809\\r\\n319941 935631\\r\\n', 'output': ['476134 954809 743534']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.88,"human_sample_line_coverage_2":93.94,"human_sample_line_coverage_3":93.94,"human_sample_line_coverage_4":93.94,"human_sample_line_coverage_5":93.94,"human_sample_branch_coverage_1":68.75,"human_sample_branch_coverage_2":81.25,"human_sample_branch_coverage_3":81.25,"human_sample_branch_coverage_4":81.25,"human_sample_branch_coverage_5":81.25,"id":367,"human_sample_pass_rate":100.0,"human_sample_line_coverage":92.728,"human_sample_branch_coverage":78.75} {"sample_inputs":"[\"1 1 10\", \"1 2 5\", \"2 3 9\"]","input_specification":"The only string contains three integers\u00a0\u2014 n, m and z (1\u2009\u2264\u2009n,\u2009m,\u2009z\u2009\u2264\u2009104).","src_uid":"e7ad55ce26fc8610639323af1de36c2d","source_code":"n = list(map(int, input().split()))\na = set()\nb = set()\nfor i in range(n[2]\/\/n[0]):\n a.add((i+1)*n[0])\nfor i in range(n[2]\/\/n[1]):\n b.add((i+1)*n[1])\nprint(len(a & b))","sample_outputs":"[\"10\", \"2\", \"1\"]","lang_cluster":"Python","notes":"NoteTaymyr is a place in the north of Russia.In the first test the artists come each minute, as well as the calls, so we need to kill all of them.In the second test we need to kill artists which come on the second and the fourth minutes.In the third test\u00a0\u2014 only the artist which comes on the sixth minute. ","output_specification":"Print single integer\u00a0\u2014 the minimum number of artists that should be killed so that there are no artists in the room when Ilia calls.","description":"Comrade Dujikov is busy choosing artists for Timofey's birthday and is recieving calls from Taymyr from Ilia-alpinist.Ilia-alpinist calls every n minutes, i.e. in minutes n, 2n, 3n and so on. Artists come to the comrade every m minutes, i.e. in minutes m, 2m, 3m and so on. The day is z minutes long, i.e. the day consists of minutes 1,\u20092,\u2009...,\u2009z. How many artists should be killed so that there are no artists in the room when Ilia calls? Consider that a call and a talk with an artist take exactly one minute.","human_testcases":"[{\"input\": \"1 1 10\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 2 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 3 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 8 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 9 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10000 10000 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"24 22 9235\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"74 8 417\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"972 1 203\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"550 1 754\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"860 1 884\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"358 2 809\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"33 27 216\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2940 1 9311\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4624 1 1953\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2696 2 7345\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3443 2 6701\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 613 2275\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 10000 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000 1 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 10000\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"34 27 10000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2 2 9999\\r\\n\", \"output\": [\"4999\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 4 36\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"33 6 3005\\r\\n\", \"output\": [\"45\"]}, {\"input\": \"5 1 20\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 2 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 1 100\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"10 20 10000\\r\\n\", \"output\": [\"500\"]}, {\"input\": \"8 12 12\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '1 2 5\\r\\n', 'output': ['2']}, {'input': '2 3 9\\r\\n', 'output': ['1']}, {'input': '550 1 754\\r\\n', 'output': ['1']}, {'input': '5 1 20\\r\\n', 'output': ['4']}]","human_sample_testcases_2":"[{'input': '2940 1 9311\\r\\n', 'output': ['3']}, {'input': '2 2 9999\\r\\n', 'output': ['4999']}, {'input': '1 1 1\\r\\n', 'output': ['1']}, {'input': '1 2 5\\r\\n', 'output': ['2']}, {'input': '24 22 9235\\r\\n', 'output': ['34']}]","human_sample_testcases_3":"[{'input': '1 2 5\\r\\n', 'output': ['2']}, {'input': '6 4 36\\r\\n', 'output': ['3']}, {'input': '1 1 10\\r\\n', 'output': ['10']}, {'input': '1 1 10000\\r\\n', 'output': ['10000']}, {'input': '8 12 12\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '6 4 36\\r\\n', 'output': ['3']}, {'input': '4624 1 1953\\r\\n', 'output': ['0']}, {'input': '358 2 809\\r\\n', 'output': ['2']}, {'input': '2940 1 9311\\r\\n', 'output': ['3']}, {'input': '2 3 9\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '4 8 9\\r\\n', 'output': ['1']}, {'input': '550 1 754\\r\\n', 'output': ['1']}, {'input': '10 20 10000\\r\\n', 'output': ['500']}, {'input': '10000 10000 10000\\r\\n', 'output': ['1']}, {'input': '1 2 10\\r\\n', 'output': ['5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":368,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"17 15 5 3\", \"14 16 7 22\", \"4 2 6 4\", \"1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\"]","input_specification":"The first line contains four integers $$$a$$$, $$$b$$$, $$$x$$$, $$$y$$$ ($$$1 \\le a, b, x, y \\le 10^{18}$$$)\u00a0\u2014 the constraints on the screen width and height, and on the aspect ratio.","src_uid":"907ac56260e84dbb6d98a271bcb2d62d","source_code":"from math import gcd\n\nx, y, a, b = [int(x) for x in input().split()]\n\ngc = gcd(a, b)\na = a \/\/ gc\nb = b \/\/ gc\n\nprint(min(x\/\/a, y\/\/b))","sample_outputs":"[\"3\", \"0\", \"1\", \"1000000063\"]","lang_cluster":"Python","notes":"NoteIn the first example, there are $$$3$$$ possible variants: $$$(5, 3)$$$, $$$(10, 6)$$$, $$$(15, 9)$$$.In the second example, there is no TV set meeting the constraints.In the third example, there is only one variant: $$$(3, 2)$$$.","output_specification":"Print one integer\u00a0\u2014 the number of different variants to choose TV screen width and screen height so that they meet the aforementioned constraints.","description":"Monocarp has decided to buy a new TV set and hang it on the wall in his flat. The wall has enough free space so Monocarp can buy a TV set with screen width not greater than $$$a$$$ and screen height not greater than $$$b$$$. Monocarp is also used to TV sets with a certain aspect ratio: formally, if the width of the screen is $$$w$$$, and the height of the screen is $$$h$$$, then the following condition should be met: $$$\\frac{w}{h} = \\frac{x}{y}$$$.There are many different TV sets in the shop. Monocarp is sure that for any pair of positive integers $$$w$$$ and $$$h$$$ there is a TV set with screen width $$$w$$$ and height $$$h$$$ in the shop.Monocarp isn't ready to choose the exact TV set he is going to buy. Firstly he wants to determine the optimal screen resolution. He has decided to try all possible variants of screen size. But he must count the number of pairs of positive integers $$$w$$$ and $$$h$$$, beforehand, such that $$$(w \\le a)$$$, $$$(h \\le b)$$$ and $$$(\\frac{w}{h} = \\frac{x}{y})$$$.In other words, Monocarp wants to determine the number of TV sets having aspect ratio $$$\\frac{x}{y}$$$, screen width not exceeding $$$a$$$, and screen height not exceeding $$$b$$$. Two TV sets are considered different if they have different screen width or different screen height.","human_testcases":"[{\"input\": \"17 15 5 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"14 16 7 22\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 2 6 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\\r\\n\", \"output\": [\"1000000063\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"3 3 2 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3 2 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000 1000000000000000000 1000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"58 29 27 60\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"27 68 94 30\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"144528195586472793 10446456359175098 764897453635731472 213446506570409801\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"145354434469588921 446675416227691239 504832165374736218 221558716891006574\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"146180677647672345 468138913968516772 6298881766892948 923367383029480585\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"147006920825755769 542505368524532032 208073625707521517 14411087792522426\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"147833164003839193 978734324098080876 171380370006334775 22523289523184607\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"148659402886955322 414963275376662424 30635495548814085 902968491117271450\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"149485641770071450 851192235245178565 874621826044152778 488378180096620703\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"150311889243122170 287421190818727409 837928574637933332 823487866450329936\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"151138128126238298 947022187542019357 577863282081970781 831600068180992118\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"925426546533829903 18916656036525111 656064699607651706 504175130621743249\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"667266829466 1518201697184 23643010980 898976260568\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"66 116 86 64\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1162212930906 1437938729466 2281245858132 1953656377395\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"114 6 288 30\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1639979163162 1340495892562 2036036266388 3428977687772\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"162 86 200 332\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"126335330010 1260232924842 1082265520235 316350257105\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 182 480 305\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"301287041544 1311267722334 1925090137416 582114484904\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"165 108 114 184\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1043706193704 1177988368866 2133416547786 1380684288366\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"225 276 42 210\\r\\n\", \"output\": [\"55\"]}, {\"input\": \"1760355542088 1044709015401 1674331546848 2647835033212\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 99 272 208\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2489889792360 924314563821 835883336325 4339921938905\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"84 231 70 145\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"219424042632 791035210353 5273494032066 418290299778\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"280 104 158 114\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"606209757964 135185624000 1875022910016 905391624870\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"360 264 99 117\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"1561742222476 104898922608 1477225799720 2031291351072\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"72 72 312 64\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2534454556172 3927193117988 589501152415 3547767499745\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"168 252 180 450\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"3375849775910 3759581410230 1727984390290 1874681381962\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"405 55 194 58\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4591740193030 3537449154450 1714308697782 442983863265\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"25 260 129 285\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"786155773670 3336791735150 1280120052592 1250148696512\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"165 500 388 308\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2023521027270 3298933358415 137370252990 2592814018030\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"285 245 270 270\\r\\n\", \"output\": [\"245\"]}, {\"input\": \"100000 1 3 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10000000000000 1 1 10000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1 2\\r\\n\", \"output\": [\"500000000000000000\"]}, {\"input\": \"4 2 4 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 81 10 9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"1 1 1 1000000000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1 1\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1 1000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1 100000000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000000000 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1 999999822000007597\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000000000000 1 1000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 60 3 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1000000000000000 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 3 1000000000000000000 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 5 10 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 5 1 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1000000000000000000 11235955056173033\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"281474976710656 1 1 281474976710656\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"500 500 1000000000000000000 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2 1000000000000000000 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000000000000 1000000000000000000 1000000000000000000 1\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 3 2 6\\r\\n', 'output': ['1']}, {'input': '162 86 200 332\\r\\n', 'output': ['1']}, {'input': '1 1 1 100000000000000000\\r\\n', 'output': ['0']}, {'input': '405 55 194 58\\r\\n', 'output': ['1']}, {'input': '165 108 114 184\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '1561742222476 104898922608 1477225799720 2031291351072\\r\\n', 'output': ['0']}, {'input': '4 2 4 3\\r\\n', 'output': ['0']}, {'input': '147006920825755769 542505368524532032 208073625707521517 14411087792522426\\r\\n', 'output': ['0']}, {'input': '1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\\r\\n', 'output': ['1000000063']}, {'input': '27 68 94 30\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '72 72 312 64\\r\\n', 'output': ['1']}, {'input': '20 5 10 7\\r\\n', 'output': ['0']}, {'input': '2023521027270 3298933358415 137370252990 2592814018030\\r\\n', 'output': ['12']}, {'input': '84 231 70 145\\r\\n', 'output': ['6']}, {'input': '500 500 1000000000000000000 1\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '1760355542088 1044709015401 1674331546848 2647835033212\\r\\n', 'output': ['1']}, {'input': '162 86 200 332\\r\\n', 'output': ['1']}, {'input': '405 55 194 58\\r\\n', 'output': ['1']}, {'input': '225 276 42 210\\r\\n', 'output': ['55']}, {'input': '100000 1 3 2\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '27 68 94 30\\r\\n', 'output': ['0']}, {'input': '1000000000000000000 1000000000000000000 999999866000004473 999999822000007597\\r\\n', 'output': ['1000000063']}, {'input': '149485641770071450 851192235245178565 874621826044152778 488378180096620703\\r\\n', 'output': ['0']}, {'input': '25 260 129 285\\r\\n', 'output': ['0']}, {'input': '1760355542088 1044709015401 1674331546848 2647835033212\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":369,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"0 0\\n4 5\", \"3 4\\n6 1\"]","input_specification":"The first line contains two integers x1,\u2009y1 (\u2009-\u2009109\u2009\u2264\u2009x1,\u2009y1\u2009\u2264\u2009109) \u2014 the start position of the robot. The second line contains two integers x2,\u2009y2 (\u2009-\u2009109\u2009\u2264\u2009x2,\u2009y2\u2009\u2264\u2009109) \u2014 the finish position of the robot.","src_uid":"a6e9405bc3d4847fe962446bc1c457b4","source_code":"a, b=map(int, input().split())\nc, d=map(int, input().split())\n\ng=abs(c-a)\nh=abs(d-b)\nx=max(g, h)\ny=min(g, h)\nz=abs(x-y)\nif g==h:\n print(g)\nelse:\n print(y+z)","sample_outputs":"[\"5\", \"3\"]","lang_cluster":"Python","notes":"NoteIn the first example robot should increase both of its coordinates by one four times, so it will be in position (4,\u20094). After that robot should simply increase its y coordinate and get the finish position.In the second example robot should simultaneously increase x coordinate and decrease y coordinate by one three times.","output_specification":"Print the only integer d \u2014 the minimal number of steps to get the finish position.","description":"Professor GukiZ makes a new robot. The robot are in the point with coordinates (x1,\u2009y1) and should go to the point (x2,\u2009y2). In a single step the robot can change any of its coordinates (maybe both of them) by one (decrease or increase). So the robot can move in one of the 8 directions. Find the minimal number of steps the robot should make to get the finish position.","human_testcases":"[{\"input\": \"0 0\\r\\n4 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 4\\r\\n6 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"0 0\\r\\n4 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 1\\r\\n-3 -5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"-1 -1\\r\\n-10 100\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"1 -1\\r\\n100 -100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"-1000000000 -1000000000\\r\\n1000000000 1000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"-1000000000 -1000000000\\r\\n0 999999999\\r\\n\", \"output\": [\"1999999999\"]}, {\"input\": \"0 0\\r\\n2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 0\\r\\n100 0\\r\\n\", \"output\": [\"90\"]}, {\"input\": \"1 5\\r\\n6 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"0 0\\r\\n5 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 1\\r\\n20 1\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 1\\r\\n-3 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"-863407280 504312726\\r\\n786535210 -661703810\\r\\n\", \"output\": [\"1649942490\"]}, {\"input\": \"-588306085 -741137832\\r\\n341385643 152943311\\r\\n\", \"output\": [\"929691728\"]}, {\"input\": \"0 0\\r\\n4 0\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"93097194 -48405232\\r\\n-716984003 -428596062\\r\\n\", \"output\": [\"810081197\"]}, {\"input\": \"9 1\\r\\n1 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"4 6\\r\\n0 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2 4\\r\\n5 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"-100000000 -100000000\\r\\n100000000 100000123\\r\\n\", \"output\": [\"200000123\"]}, {\"input\": \"5 6\\r\\n5 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"12 16\\r\\n12 1\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"0 0\\r\\n5 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"0 1\\r\\n1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-44602634 913365223\\r\\n-572368780 933284951\\r\\n\", \"output\": [\"527766146\"]}, {\"input\": \"-2 0\\r\\n2 -2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"0 0\\r\\n3 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"-458 2\\r\\n1255 4548\\r\\n\", \"output\": [\"4546\"]}, {\"input\": \"-5 -4\\r\\n-3 -3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 5\\r\\n7 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"-1000000000 -999999999\\r\\n1000000000 999999998\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"-1000000000 -1000000000\\r\\n1000000000 -1000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"-464122675 -898521847\\r\\n656107323 -625340409\\r\\n\", \"output\": [\"1120229998\"]}, {\"input\": \"-463154699 -654742385\\r\\n-699179052 -789004997\\r\\n\", \"output\": [\"236024353\"]}, {\"input\": \"982747270 -593488945\\r\\n342286841 -593604186\\r\\n\", \"output\": [\"640460429\"]}, {\"input\": \"-80625246 708958515\\r\\n468950878 574646184\\r\\n\", \"output\": [\"549576124\"]}, {\"input\": \"0 0\\r\\n1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"109810 1\\r\\n2 3\\r\\n\", \"output\": [\"109808\"]}, {\"input\": \"-9 0\\r\\n9 9\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"9 9\\r\\n9 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n4 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 2\\r\\n45 1\\r\\n\", \"output\": [\"44\"]}, {\"input\": \"207558188 -313753260\\r\\n-211535387 -721675423\\r\\n\", \"output\": [\"419093575\"]}, {\"input\": \"-11 0\\r\\n0 0\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"-1000000000 1000000000\\r\\n1000000000 -1000000000\\r\\n\", \"output\": [\"2000000000\"]}, {\"input\": \"0 0\\r\\n1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n0 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n-1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n-1 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n-1 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n0 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"0 0\\r\\n1 -1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 90\\r\\n90 10\\r\\n\", \"output\": [\"80\"]}, {\"input\": \"851016864 573579544\\r\\n-761410925 -380746263\\r\\n\", \"output\": [\"1612427789\"]}, {\"input\": \"1 9\\r\\n9 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1000 1000\\r\\n1000 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 9\\r\\n9 1\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 90\\r\\n90 90\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"100 100\\r\\n1000 1000\\r\\n\", \"output\": [\"900\"]}, {\"input\": \"-1 0\\r\\n0 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"-750595959 -2984043\\r\\n649569876 -749608783\\r\\n\", \"output\": [\"1400165835\"]}, {\"input\": \"958048496 712083589\\r\\n423286949 810566863\\r\\n\", \"output\": [\"534761547\"]}, {\"input\": \"146316710 53945094\\r\\n-523054748 147499505\\r\\n\", \"output\": [\"669371458\"]}, {\"input\": \"50383856 -596516251\\r\\n-802950224 -557916272\\r\\n\", \"output\": [\"853334080\"]}, {\"input\": \"-637204864 -280290367\\r\\n-119020929 153679771\\r\\n\", \"output\": [\"518183935\"]}, {\"input\": \"-100 -100\\r\\n-60 -91\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"337537326 74909428\\r\\n-765558776 167951547\\r\\n\", \"output\": [\"1103096102\"]}, {\"input\": \"0 81\\r\\n18 90\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"283722202 -902633305\\r\\n-831696497 -160868946\\r\\n\", \"output\": [\"1115418699\"]}, {\"input\": \"1000 1000\\r\\n-1000 1000\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"5 6\\r\\n4 8\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"40572000 597493595\\r\\n-935051731 368493185\\r\\n\", \"output\": [\"975623731\"]}, {\"input\": \"-5 5\\r\\n5 5\\r\\n\", \"output\": [\"10\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '0 0\\r\\n4 6\\r\\n', 'output': ['6']}, {'input': '9 1\\r\\n1 1\\r\\n', 'output': ['8']}, {'input': '-11 0\\r\\n0 0\\r\\n', 'output': ['11']}, {'input': '0 0\\r\\n4 0\\r\\n', 'output': ['4']}, {'input': '93097194 -48405232\\r\\n-716984003 -428596062\\r\\n', 'output': ['810081197']}]","human_sample_testcases_2":"[{'input': '5 6\\r\\n5 7\\r\\n', 'output': ['1']}, {'input': '10 90\\r\\n90 10\\r\\n', 'output': ['80']}, {'input': '9 9\\r\\n9 9\\r\\n', 'output': ['0']}, {'input': '-5 -4\\r\\n-3 -3\\r\\n', 'output': ['2']}, {'input': '-1000000000 -1000000000\\r\\n1000000000 -1000000000\\r\\n', 'output': ['2000000000']}]","human_sample_testcases_3":"[{'input': '1000 1000\\r\\n-1000 1000\\r\\n', 'output': ['2000']}, {'input': '-44602634 913365223\\r\\n-572368780 933284951\\r\\n', 'output': ['527766146']}, {'input': '-1 0\\r\\n0 0\\r\\n', 'output': ['1']}, {'input': '2 4\\r\\n5 2\\r\\n', 'output': ['3']}, {'input': '1 2\\r\\n45 1\\r\\n', 'output': ['44']}]","human_sample_testcases_4":"[{'input': '0 0\\r\\n4 5\\r\\n', 'output': ['5']}, {'input': '-463154699 -654742385\\r\\n-699179052 -789004997\\r\\n', 'output': ['236024353']}, {'input': '1 1\\r\\n4 3\\r\\n', 'output': ['3']}, {'input': '-1 -1\\r\\n-10 100\\r\\n', 'output': ['101']}, {'input': '207558188 -313753260\\r\\n-211535387 -721675423\\r\\n', 'output': ['419093575']}]","human_sample_testcases_5":"[{'input': '1 2\\r\\n45 1\\r\\n', 'output': ['44']}, {'input': '0 0\\r\\n-1 1\\r\\n', 'output': ['1']}, {'input': '0 0\\r\\n1 -1\\r\\n', 'output': ['1']}, {'input': '-637204864 -280290367\\r\\n-119020929 153679771\\r\\n', 'output': ['518183935']}, {'input': '0 81\\r\\n18 90\\r\\n', 'output': ['18']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":90.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":90.0,"human_sample_line_coverage_4":90.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":50.0,"human_sample_branch_coverage_5":100.0,"id":370,"human_sample_pass_rate":100.0,"human_sample_line_coverage":94.0,"human_sample_branch_coverage":70.0} {"sample_inputs":"[\"6 10\", \"21 31\", \"5 10\"]","input_specification":"The only line contains two integers $$$a$$$ and $$$b$$$ ($$$1 \\le a, b \\le 10^9$$$).","src_uid":"414149fadebe25ab6097fc67663177c3","source_code":"a, b = input().split()\na, b = int(a), int(b)\na, b = min(a, b), max(a, b)\n\ndef eu(a, b):\n if a == 0:\n return b\n if b == 0:\n return a\n if a > b:\n return eu(a%b, b)\n return eu(a, b%a)\n\nopt = b - a\nfactor = []\ni = 1\nwhile i**2 < opt+1:\n if opt % i == 0:\n factor.append(i)\n factor.append(int(opt\/i))\n i+=1\n\ntarget = a * b \/ eu(a, b)\ndrop = 0\n\nfor i in factor:\n firstupd = a - (a % i) + i\n secondupd = b - (b % i) + i\n dres = firstupd * int(secondupd\/eu(firstupd,secondupd))\n if dres <= target:\n if dres == target:\n drop = min(i-(a%i),drop)\n else:\n target = dres\n drop = i-(a%i)\nprint(drop)","sample_outputs":"[\"2\", \"9\", \"0\"]","lang_cluster":"Python","notes":"NoteIn the first test, one should choose $$$k = 2$$$, as the least common multiple of $$$6 + 2$$$ and $$$10 + 2$$$ is $$$24$$$, which is the smallest least common multiple possible.","output_specification":"Print the smallest non-negative integer $$$k$$$ ($$$k \\ge 0$$$) such that the lowest common multiple of $$$a+k$$$ and $$$b+k$$$ is the smallest possible. If there are many possible integers $$$k$$$ giving the same value of the least common multiple, print the smallest one.","description":"Neko loves divisors. During the latest number theory lesson, he got an interesting exercise from his math teacher.Neko has two integers $$$a$$$ and $$$b$$$. His goal is to find a non-negative integer $$$k$$$ such that the least common multiple of $$$a+k$$$ and $$$b+k$$$ is the smallest possible. If there are multiple optimal integers $$$k$$$, he needs to choose the smallest one.Given his mathematical talent, Neko had no trouble getting Wrong Answer on this problem. Can you help him solve it?","human_testcases":"[{\"input\": \"6 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"21 31\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1924 5834\\r\\n\", \"output\": [\"31\"]}, {\"input\": \"9911 666013\\r\\n\", \"output\": [\"318140\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"69 4295\\r\\n\", \"output\": [\"2044\"]}, {\"input\": \"948248258 533435433\\r\\n\", \"output\": [\"296190217\"]}, {\"input\": \"953 1349\\r\\n\", \"output\": [\"235\"]}, {\"input\": \"999999973 800000007\\r\\n\", \"output\": [\"199999823\"]}, {\"input\": \"112342324 524224233\\r\\n\", \"output\": [\"299539585\"]}, {\"input\": \"1021211 59555555\\r\\n\", \"output\": [\"309115\"]}, {\"input\": \"1000000000 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"199999943 999999973\\r\\n\", \"output\": [\"200000072\"]}, {\"input\": \"2 999999973\\r\\n\", \"output\": [\"191\"]}, {\"input\": \"199999973 99999937\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"851187514 983401693\\r\\n\", \"output\": [\"74311739\"]}, {\"input\": \"414459569 161124945\\r\\n\", \"output\": [\"92209679\"]}, {\"input\": \"59774131 414357411\\r\\n\", \"output\": [\"11142525\"]}, {\"input\": \"588854730 468415815\\r\\n\", \"output\": [\"13339845\"]}, {\"input\": \"166027408 867208246\\r\\n\", \"output\": [\"67699538\"]}, {\"input\": \"416882693 26430642\\r\\n\", \"output\": [\"9064999\"]}, {\"input\": \"63906772 377040487\\r\\n\", \"output\": [\"40471133\"]}, {\"input\": \"573707893 93108818\\r\\n\", \"output\": [\"3010997\"]}, {\"input\": \"498599067 627630818\\r\\n\", \"output\": [\"17527937\"]}, {\"input\": \"41698727 40343\\r\\n\", \"output\": [\"19511\"]}, {\"input\": \"21184942 66889\\r\\n\", \"output\": [\"573052\"]}, {\"input\": \"584924132 27895\\r\\n\", \"output\": [\"34377766\"]}, {\"input\": \"34504222 65532\\r\\n\", \"output\": [\"54883\"]}, {\"input\": \"397410367 96163\\r\\n\", \"output\": [\"44330\"]}, {\"input\": \"772116208 99741\\r\\n\", \"output\": [\"703606\"]}, {\"input\": \"721896242 62189\\r\\n\", \"output\": [\"150930\"]}, {\"input\": \"480432805 79482\\r\\n\", \"output\": [\"480273841\"]}, {\"input\": \"526157284 30640\\r\\n\", \"output\": [\"8006\"]}, {\"input\": \"509022792 57335\\r\\n\", \"output\": [\"5508\"]}, {\"input\": \"13911 866384789\\r\\n\", \"output\": [\"488042\"]}, {\"input\": \"43736 145490995\\r\\n\", \"output\": [\"242015\"]}, {\"input\": \"27522 656219918\\r\\n\", \"output\": [\"38975\"]}, {\"input\": \"3904 787488950\\r\\n\", \"output\": [\"577695\"]}, {\"input\": \"64320 203032344\\r\\n\", \"output\": [\"17588\"]}, {\"input\": \"19430 993947341\\r\\n\", \"output\": [\"43194827\"]}, {\"input\": \"89229 680338802\\r\\n\", \"output\": [\"16502224\"]}, {\"input\": \"22648 30366541\\r\\n\", \"output\": [\"509701\"]}, {\"input\": \"89598 155519475\\r\\n\", \"output\": [\"1581691\"]}, {\"input\": \"80536 791328168\\r\\n\", \"output\": [\"4581\"]}, {\"input\": \"55138 453739731\\r\\n\", \"output\": [\"26632191\"]}, {\"input\": \"20827 81894\\r\\n\", \"output\": [\"40240\"]}, {\"input\": \"15162 60885\\r\\n\", \"output\": [\"79\"]}, {\"input\": \"33261 83156\\r\\n\", \"output\": [\"16634\"]}, {\"input\": \"12567 44055\\r\\n\", \"output\": [\"3177\"]}, {\"input\": \"36890 51759\\r\\n\", \"output\": [\"7717\"]}, {\"input\": \"69731 73202\\r\\n\", \"output\": [\"3160\"]}, {\"input\": \"92037 8625\\r\\n\", \"output\": [\"643\"]}, {\"input\": \"51783 5491\\r\\n\", \"output\": [\"6082\"]}, {\"input\": \"39204 15357\\r\\n\", \"output\": [\"8490\"]}, {\"input\": \"11 16\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 18\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 113\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"18 102\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"13 33\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22 51\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 114\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"24 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"21 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 14\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"273301753 369183717\\r\\n\", \"output\": [\"14344139\"]}, {\"input\": \"83893226 440673790\\r\\n\", \"output\": [\"5301915\"]}, {\"input\": \"391320363 805801085\\r\\n\", \"output\": [\"23160359\"]}, {\"input\": \"350089529 67401533\\r\\n\", \"output\": [\"3270466\"]}, {\"input\": \"356318639 545297094\\r\\n\", \"output\": [\"21638271\"]}, {\"input\": \"456039936 216657167\\r\\n\", \"output\": [\"22725602\"]}, {\"input\": \"200869227 429021875\\r\\n\", \"output\": [\"27283421\"]}, {\"input\": \"724338885 158040565\\r\\n\", \"output\": [\"125108595\"]}, {\"input\": \"354798648 439745337\\r\\n\", \"output\": [\"69934797\"]}, {\"input\": \"152408121 368230838\\r\\n\", \"output\": [\"63414596\"]}, {\"input\": \"532851498 235555724\\r\\n\", \"output\": [\"61740050\"]}, {\"input\": \"571244721 233692396\\r\\n\", \"output\": [\"103859929\"]}, {\"input\": \"434431270 432744926\\r\\n\", \"output\": [\"645482\"]}, {\"input\": \"845961672 92356861\\r\\n\", \"output\": [\"661247950\"]}, {\"input\": \"861681496 158472265\\r\\n\", \"output\": [\"75930812\"]}, {\"input\": \"358415973 475293324\\r\\n\", \"output\": [\"109093431\"]}, {\"input\": \"179237079 691088384\\r\\n\", \"output\": [\"332614226\"]}, {\"input\": \"159488527 938932258\\r\\n\", \"output\": [\"100326050\"]}, {\"input\": \"173726711 47100867\\r\\n\", \"output\": [\"16212055\"]}, {\"input\": \"113701457 374868637\\r\\n\", \"output\": [\"16882133\"]}, {\"input\": \"49160468 106133716\\r\\n\", \"output\": [\"7812780\"]}, {\"input\": \"258834406 21427940\\r\\n\", \"output\": [\"154466\"]}, {\"input\": \"209853278 238360826\\r\\n\", \"output\": [\"18207106\"]}, {\"input\": \"833630757 5203048\\r\\n\", \"output\": [\"823224661\"]}, {\"input\": \"898985699 25761857\\r\\n\", \"output\": [\"12204397\"]}, {\"input\": \"882561035 53440816\\r\\n\", \"output\": [\"775679403\"]}, {\"input\": \"844002269 45400923\\r\\n\", \"output\": [\"353899750\"]}, {\"input\": \"890747621 58942406\\r\\n\", \"output\": [\"107418637\"]}, {\"input\": \"823409948 63146277\\r\\n\", \"output\": [\"697117394\"]}, {\"input\": \"806104369 75421522\\r\\n\", \"output\": [\"5765461\"]}, {\"input\": \"950485973 21039711\\r\\n\", \"output\": [\"443683420\"]}, {\"input\": \"904189980 653467036\\r\\n\", \"output\": [\"98701796\"]}, {\"input\": \"986866706 981520552\\r\\n\", \"output\": [\"2171784\"]}, {\"input\": \"987324114 296975438\\r\\n\", \"output\": [\"48198900\"]}, {\"input\": \"932939238 454247778\\r\\n\", \"output\": [\"24443682\"]}, {\"input\": \"997908364 240589278\\r\\n\", \"output\": [\"138070265\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1000000000 264865600\\r\\n\", \"output\": [\"102701600\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 113\\r\\n', 'output': ['0']}, {'input': '851187514 983401693\\r\\n', 'output': ['74311739']}, {'input': '456039936 216657167\\r\\n', 'output': ['22725602']}, {'input': '152408121 368230838\\r\\n', 'output': ['63414596']}, {'input': '10 12\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '898985699 25761857\\r\\n', 'output': ['12204397']}, {'input': '18 102\\r\\n', 'output': ['3']}, {'input': '89598 155519475\\r\\n', 'output': ['1581691']}, {'input': '584924132 27895\\r\\n', 'output': ['34377766']}, {'input': '5 10\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '526157284 30640\\r\\n', 'output': ['8006']}, {'input': '391320363 805801085\\r\\n', 'output': ['23160359']}, {'input': '890747621 58942406\\r\\n', 'output': ['107418637']}, {'input': '179237079 691088384\\r\\n', 'output': ['332614226']}, {'input': '22 51\\r\\n', 'output': ['7']}]","human_sample_testcases_4":"[{'input': '861681496 158472265\\r\\n', 'output': ['75930812']}, {'input': '51783 5491\\r\\n', 'output': ['6082']}, {'input': '89229 680338802\\r\\n', 'output': ['16502224']}, {'input': '997908364 240589278\\r\\n', 'output': ['138070265']}, {'input': '199999973 99999937\\r\\n', 'output': ['99']}]","human_sample_testcases_5":"[{'input': '13911 866384789\\r\\n', 'output': ['488042']}, {'input': '39204 15357\\r\\n', 'output': ['8490']}, {'input': '1 113\\r\\n', 'output': ['0']}, {'input': '43736 145490995\\r\\n', 'output': ['242015']}, {'input': '55138 453739731\\r\\n', 'output': ['26632191']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":96.77,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":96.77,"human_sample_branch_coverage_1":93.75,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":93.75,"id":371,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.708,"human_sample_branch_coverage":97.5} {"sample_inputs":"[\"QAQAQYSYIOIWIN\", \"QAQQQZZYNOIWIN\"]","input_specification":"The only line contains a string of length n (1\u2009\u2264\u2009n\u2009\u2264\u2009100). It's guaranteed that the string only contains uppercase English letters.","src_uid":"8aef4947322438664bd8610632fe0947","source_code":"import itertools\n \nprint(sum(map(lambda x:(x==('Q','A','Q')), itertools.combinations(input(),3))))","sample_outputs":"[\"4\", \"3\"]","lang_cluster":"Python","notes":"NoteIn the first example there are 4 subsequences \"QAQ\": \"QAQAQYSYIOIWIN\", \"QAQAQYSYIOIWIN\", \"QAQAQYSYIOIWIN\", \"QAQAQYSYIOIWIN\".","output_specification":"Print a single integer\u00a0\u2014 the number of subsequences \"QAQ\" in the string.","description":"\"QAQ\" is a word to denote an expression of crying. Imagine \"Q\" as eyes with tears and \"A\" as a mouth.Now Diamond has given Bort a string consisting of only uppercase English letters of length n. There is a great number of \"QAQ\" in the string (Diamond is so cute!). illustration by \u732b\u5c4b https:\/\/twitter.com\/nekoyaliu Bort wants to know how many subsequences \"QAQ\" are in the string Diamond has given. Note that the letters \"QAQ\" don't have to be consecutive, but the order of letters should be exact.","human_testcases":"[{\"input\": \"QAQAQYSYIOIWIN\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"QAQQQZZYNOIWIN\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"QA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"IAQVAQZLQBQVQFTQQQADAQJA\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"QQAAQASGAYAAAAKAKAQIQEAQAIAAIAQQQQQ\\r\\n\", \"output\": [\"378\"]}, {\"input\": \"AMVFNFJIAVNQJWIVONQOAOOQSNQSONOASONAONQINAONAOIQONANOIQOANOQINAONOQINAONOXJCOIAQOAOQAQAQAQAQWWWAQQAQ\\r\\n\", \"output\": [\"1077\"]}, {\"input\": \"AAQQAXBQQBQQXBNQRJAQKQNAQNQVDQASAGGANQQQQTJFFQQQTQQA\\r\\n\", \"output\": [\"568\"]}, {\"input\": \"KAZXAVLPJQBQVQQQQQAPAQQGQTQVZQAAAOYA\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"W\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"DBA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"RQAWNACASAAKAGAAAAQ\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"QJAWZAAOAAGIAAAAAOQATASQAEAAAAQFQQHPA\\r\\n\", \"output\": [\"111\"]}, {\"input\": \"QQKWQAQAAAAAAAAGAAVAQUEQQUMQMAQQQNQLAMAAAUAEAAEMAAA\\r\\n\", \"output\": [\"411\"]}, {\"input\": \"QQUMQAYAUAAGWAAAQSDAVAAQAAAASKQJJQQQQMAWAYYAAAAAAEAJAXWQQ\\r\\n\", \"output\": [\"625\"]}, {\"input\": \"QORZOYAQ\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"QCQAQAGAWAQQQAQAVQAQQQQAQAQQQAQAAATQAAVAAAQQQQAAAUUQAQQNQQWQQWAQAAQQKQYAQAAQQQAAQRAQQQWBQQQQAPBAQGQA\\r\\n\", \"output\": [\"13174\"]}, {\"input\": \"QQAQQAKQFAQLQAAWAMQAZQAJQAAQQOACQQAAAYANAQAQQAQAAQQAOBQQJQAQAQAQQQAAAAABQQQAVNZAQQQQAMQQAFAAEAQAQHQT\\r\\n\", \"output\": [\"10420\"]}, {\"input\": \"AQEGQHQQKQAQQPQKAQQQAAAAQQQAQEQAAQAAQAQFSLAAQQAQOQQAVQAAAPQQAWAQAQAFQAXAQQQQTRLOQAQQJQNQXQQQQSQVDQQQ\\r\\n\", \"output\": [\"12488\"]}, {\"input\": \"QNQKQQQLASQBAVQQQQAAQQOQRJQQAQQQEQZUOANAADAAQQJAQAQARAAAQQQEQBHTQAAQAAAAQQMKQQQIAOJJQQAQAAADADQUQQQA\\r\\n\", \"output\": [\"9114\"]}, {\"input\": \"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n\", \"output\": [\"35937\"]}, {\"input\": \"AMQQAAQAAQAAAAAAQQQBOAAANAAKQJCYQAE\\r\\n\", \"output\": [\"254\"]}, {\"input\": \"AYQBAEQGAQEOAKGIXLQJAIAKQAAAQPUAJAKAATFWQQAOQQQUFQYAQQMQHOKAAJXGFCARAQSATHAUQQAATQJJQDQRAANQQAE\\r\\n\", \"output\": [\"2174\"]}, {\"input\": \"AAQXAAQAYQAAAAGAQHVQYAGIVACADFAAQAAAAQZAAQMAKZAADQAQDAAQDAAAMQQOXYAQQQAKQBAAQQKAXQBJZDDLAAHQQ\\r\\n\", \"output\": [\"2962\"]}, {\"input\": \"AYQQYAVAMNIAUAAKBBQVACWKTQSAQZAAQAAASZJAWBCAALAARHACQAKQQAQAARPAQAAQAQAAZQUSHQAMFVFZQQQQSAQQXAA\\r\\n\", \"output\": [\"2482\"]}, {\"input\": \"LQMAQQARQAQBJQQQAGAAZQQXALQQAARQAQQQQAAQQAQQQAQQCAQQAQQAYQQQRAAZATQALYQQAAHHAAQHAAAAAAAAQQMAAQNAKQ\\r\\n\", \"output\": [\"7768\"]}, {\"input\": \"MAQQWAQOYQMAAAQAQPQZAOAAQAUAQNAAQAAAITQSAQAKAQKAQQWSQAAQQAGUCDQMQWKQUXKWQQAAQQAAQQZQDQQQAABXQUUXQOA\\r\\n\", \"output\": [\"5422\"]}, {\"input\": \"QTAAQDAQXAQQJQQQGAAAQQQQSBQZKAQQAQQQQEAQNUQBZCQLYQZQEQQAAQHQVAORKQVAQYQNASZQAARZAAGAAAAOQDCQ\\r\\n\", \"output\": [\"3024\"]}, {\"input\": \"QQWAQQGQQUZQQQLZAAQYQXQVAQFQUAQZUQZZQUKBHSHTQYLQAOQXAQQGAQQTQOAQARQADAJRAAQPQAQQUQAUAMAUVQAAAQQAWQ\\r\\n\", \"output\": [\"4527\"]}, {\"input\": \"QQAAQQAQVAQZQQQQAOEAQZPQIBQZACQQAFQQLAAQDATZQANHKYQQAQTAAFQRQAIQAJPWQAQTEIRXAEQQAYWAAAUKQQAQAQQQSQQH\\r\\n\", \"output\": [\"6416\"]}, {\"input\": \"AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQAQAAAA\\r\\n\", \"output\": [\"14270\"]}, {\"input\": \"AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQ\\r\\n\", \"output\": [\"13136\"]}, {\"input\": \"AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQAQAA\\r\\n\", \"output\": [\"14270\"]}, {\"input\": \"AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQQAA\\r\\n\", \"output\": [\"14231\"]}, {\"input\": \"QQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQAQAA\\r\\n\", \"output\": [\"15296\"]}, {\"input\": \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"QAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQA\\r\\n\", \"output\": [\"20825\"]}, {\"input\": \"AQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQ\\r\\n\", \"output\": [\"20825\"]}, {\"input\": \"Q\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"A\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"FFF\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"AAAAAA\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': 'QQAAQASGAYAAAAKAKAQIQEAQAIAAIAQQQQQ\\r\\n', 'output': ['378']}, {'input': 'AQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQAQ\\r\\n', 'output': ['20825']}, {'input': 'W\\r\\n', 'output': ['0']}, {'input': 'LQMAQQARQAQBJQQQAGAAZQQXALQQAARQAQQQQAAQQAQQQAQQCAQQAQQAYQQQRAAZATQALYQQAAHHAAQHAAAAAAAAQQMAAQNAKQ\\r\\n', 'output': ['7768']}, {'input': 'AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQQAA\\r\\n', 'output': ['14231']}]","human_sample_testcases_2":"[{'input': 'FFF\\r\\n', 'output': ['0']}, {'input': 'QQWAQQGQQUZQQQLZAAQYQXQVAQFQUAQZUQZZQUKBHSHTQYLQAOQXAQQGAQQTQOAQARQADAJRAAQPQAQQUQAUAMAUVQAAAQQAWQ\\r\\n', 'output': ['4527']}, {'input': 'QQAAQASGAYAAAAKAKAQIQEAQAIAAIAQQQQQ\\r\\n', 'output': ['378']}, {'input': 'QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n', 'output': ['35937']}, {'input': 'QQUMQAYAUAAGWAAAQSDAVAAQAAAASKQJJQQQQMAWAYYAAAAAAEAJAXWQQ\\r\\n', 'output': ['625']}]","human_sample_testcases_3":"[{'input': 'W\\r\\n', 'output': ['0']}, {'input': 'QQUMQAYAUAAGWAAAQSDAVAAQAAAASKQJJQQQQMAWAYYAAAAAAEAJAXWQQ\\r\\n', 'output': ['625']}, {'input': 'QNQKQQQLASQBAVQQQQAAQQOQRJQQAQQQEQZUOANAADAAQQJAQAQARAAAQQQEQBHTQAAQAAAAQQMKQQQIAOJJQQAQAAADADQUQQQA\\r\\n', 'output': ['9114']}, {'input': 'KAZXAVLPJQBQVQQQQQAPAQQGQTQVZQAAAOYA\\r\\n', 'output': ['70']}, {'input': 'QQWAQQGQQUZQQQLZAAQYQXQVAQFQUAQZUQZZQUKBHSHTQYLQAOQXAQQGAQQTQOAQARQADAJRAAQPQAQQUQAUAMAUVQAAAQQAWQ\\r\\n', 'output': ['4527']}]","human_sample_testcases_4":"[{'input': 'FFF\\r\\n', 'output': ['0']}, {'input': 'AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQ\\r\\n', 'output': ['13136']}, {'input': 'QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n', 'output': ['35937']}, {'input': 'QQUMQAYAUAAGWAAAQSDAVAAQAAAASKQJJQQQQMAWAYYAAAAAAEAJAXWQQ\\r\\n', 'output': ['625']}, {'input': 'AYQBAEQGAQEOAKGIXLQJAIAKQAAAQPUAJAKAATFWQQAOQQQUFQYAQQMQHOKAAJXGFCARAQSATHAUQQAATQJJQDQRAANQQAE\\r\\n', 'output': ['2174']}]","human_sample_testcases_5":"[{'input': 'QJAWZAAOAAGIAAAAAOQATASQAEAAAAQFQQHPA\\r\\n', 'output': ['111']}, {'input': 'AQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQ\\r\\n', 'output': ['13136']}, {'input': 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ\\r\\n', 'output': ['0']}, {'input': 'QQQQQAQAAQQAQAQAAAAAAAAAQAQAAAAAQAQAQQQAQQQAAAQQQAAAAAAAQAAAAQQQQQQQAQQQQAQAAAQAAAAAQAQAAAAAQAQAA\\r\\n', 'output': ['15296']}, {'input': 'QAQQQZZYNOIWIN\\r\\n', 'output': ['3']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":372,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"2 2\", \"9 3\"]","input_specification":"The single line contains two integers n and m (1\u2009\u2264\u2009n\u2009\u2264\u2009100;\u00a02\u2009\u2264\u2009m\u2009\u2264\u2009100), separated by a space.","src_uid":"42b25b7335ec01794fbb1d4086aa9dd0","source_code":"def gogo(n, m): \n return n + ((n-1)\/\/(m-1))\n\n\ndef main():\n pairs, bought = map(int, input().split())\n print(gogo(pairs, bought))\n\n\nmain()\n\n","sample_outputs":"[\"3\", \"13\"]","lang_cluster":"Python","notes":"NoteIn the first sample Vasya spends the first two days wearing the socks that he had initially. Then on day three he puts on the socks that were bought on day two.In the second sample Vasya spends the first nine days wearing the socks that he had initially. Then he spends three days wearing the socks that were bought on the third, sixth and ninth days. Than he spends another day wearing the socks that were bought on the twelfth day.","output_specification":"Print a single integer \u2014 the answer to the problem.","description":"Vasya has n pairs of socks. In the morning of each day Vasya has to put on a pair of socks before he goes to school. When he comes home in the evening, Vasya takes off the used socks and throws them away. Every m-th day (at days with numbers m,\u20092m,\u20093m,\u2009...) mom buys a pair of socks to Vasya. She does it late in the evening, so that Vasya cannot put on a new pair of socks before the next day. How many consecutive days pass until Vasya runs out of socks?","human_testcases":"[{\"input\": \"2 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"9 3\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 2\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"10 9\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"100 100\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"2 27\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"99 100\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"99 2\\r\\n\", \"output\": [\"197\"]}, {\"input\": \"100 3\\r\\n\", \"output\": [\"149\"]}, {\"input\": \"98 3\\r\\n\", \"output\": [\"146\"]}, {\"input\": \"100 2\\r\\n\", \"output\": [\"199\"]}, {\"input\": \"62 4\\r\\n\", \"output\": [\"82\"]}, {\"input\": \"99 10\\r\\n\", \"output\": [\"109\"]}, {\"input\": \"100 5\\r\\n\", \"output\": [\"124\"]}, {\"input\": \"80 80\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"95 16\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"75 16\\r\\n\", \"output\": [\"79\"]}, {\"input\": \"99 74\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"20 21\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"52 96\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"24 5\\r\\n\", \"output\": [\"29\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2 3\\r\\n', 'output': ['2']}, {'input': '99 10\\r\\n', 'output': ['109']}, {'input': '98 3\\r\\n', 'output': ['146']}, {'input': '99 2\\r\\n', 'output': ['197']}, {'input': '24 5\\r\\n', 'output': ['29']}]","human_sample_testcases_2":"[{'input': '10 2\\r\\n', 'output': ['19']}, {'input': '99 74\\r\\n', 'output': ['100']}, {'input': '100 3\\r\\n', 'output': ['149']}, {'input': '20 21\\r\\n', 'output': ['20']}, {'input': '100 2\\r\\n', 'output': ['199']}]","human_sample_testcases_3":"[{'input': '99 2\\r\\n', 'output': ['197']}, {'input': '10 9\\r\\n', 'output': ['11']}, {'input': '9 3\\r\\n', 'output': ['13']}, {'input': '100 3\\r\\n', 'output': ['149']}, {'input': '10 2\\r\\n', 'output': ['19']}]","human_sample_testcases_4":"[{'input': '99 2\\r\\n', 'output': ['197']}, {'input': '99 74\\r\\n', 'output': ['100']}, {'input': '100 100\\r\\n', 'output': ['101']}, {'input': '100 5\\r\\n', 'output': ['124']}, {'input': '1 2\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '52 96\\r\\n', 'output': ['52']}, {'input': '9 3\\r\\n', 'output': ['13']}, {'input': '2 2\\r\\n', 'output': ['3']}, {'input': '95 16\\r\\n', 'output': ['101']}, {'input': '100 5\\r\\n', 'output': ['124']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":373,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1098\", \"10\"]","input_specification":"The first line contains one integer $$$n$$$ ($$$1 \\le n \\le 10^9$$$).","src_uid":"055fbbde4b9ffd4473e6e716da6da899","source_code":"def f(x): \n x+=1\n while not x % 10:\n x \/\/=10\n return x\n \nprevious = set()\n\nn = int(input())\nwhile n not in previous:\n previous.add(n)\n n = f(n)\n \nprint(len(previous))","sample_outputs":"[\"20\", \"19\"]","lang_cluster":"Python","notes":"NoteThe numbers that are reachable from $$$1098$$$ are:$$$1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1098, 1099$$$.","output_specification":"Print one integer: the number of different numbers that are reachable from $$$n$$$.","description":"Let's denote a function $$$f(x)$$$ in such a way: we add $$$1$$$ to $$$x$$$, then, while there is at least one trailing zero in the resulting number, we remove that zero. For example, $$$f(599) = 6$$$: $$$599 + 1 = 600 \\rightarrow 60 \\rightarrow 6$$$; $$$f(7) = 8$$$: $$$7 + 1 = 8$$$; $$$f(9) = 1$$$: $$$9 + 1 = 10 \\rightarrow 1$$$; $$$f(10099) = 101$$$: $$$10099 + 1 = 10100 \\rightarrow 1010 \\rightarrow 101$$$. We say that some number $$$y$$$ is reachable from $$$x$$$ if we can apply function $$$f$$$ to $$$x$$$ some (possibly zero) times so that we get $$$y$$$ as a result. For example, $$$102$$$ is reachable from $$$10098$$$ because $$$f(f(f(10098))) = f(f(10099)) = f(101) = 102$$$; and any number is reachable from itself.You are given a number $$$n$$$; your task is to count how many different numbers are reachable from $$$n$$$.","human_testcases":"[{\"input\": \"1098\\r\\n\", \"output\": [\"20\\n\", \"20\", \"20\\r\\n\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"91\\n\", \"91\\r\\n\", \"91\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"9\", \"9\\r\\n\", \"9\\n\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9\", \"9\\r\\n\", \"9\\n\"]}, {\"input\": \"10119\\r\\n\", \"output\": [\"35\\r\\n\", \"35\\n\", \"35\"]}, {\"input\": \"1337\\r\\n\", \"output\": [\"24\", \"24\\n\", \"24\\r\\n\"]}, {\"input\": \"51\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"79\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"633\\r\\n\", \"output\": [\"22\\r\\n\", \"22\\n\", \"22\"]}, {\"input\": \"9000\\r\\n\", \"output\": [\"37\", \"37\\r\\n\", \"37\\n\"]}, {\"input\": \"99999999\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"932415950\\r\\n\", \"output\": [\"53\", \"53\\r\\n\", \"53\\n\"]}, {\"input\": \"90\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"45\\r\\n\", \"output\": [\"14\", \"14\\r\\n\", \"14\\n\"]}, {\"input\": \"22\\r\\n\", \"output\": [\"17\", \"17\\n\", \"17\\r\\n\"]}, {\"input\": \"987654321\\r\\n\", \"output\": [\"46\\r\\n\", \"46\\n\", \"46\"]}, {\"input\": \"599\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"54\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"73180\\r\\n\", \"output\": [\"34\\r\\n\", \"34\", \"34\\n\"]}, {\"input\": \"9392\\r\\n\", \"output\": [\"23\", \"23\\r\\n\", \"23\\n\"]}, {\"input\": \"25659427\\r\\n\", \"output\": [\"35\\r\\n\", \"35\\n\", \"35\"]}, {\"input\": \"1999\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"712\\r\\n\", \"output\": [\"25\\n\", \"25\\r\\n\", \"25\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"916073472\\r\\n\", \"output\": [\"52\", \"52\\r\\n\", \"52\\n\"]}, {\"input\": \"920\\r\\n\", \"output\": [\"26\\r\\n\", \"26\\n\", \"26\"]}, {\"input\": \"61261142\\r\\n\", \"output\": [\"56\\r\\n\", \"56\", \"56\\n\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"299\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"960879599\\r\\n\", \"output\": [\"29\\n\", \"29\", \"29\\r\\n\"]}, {\"input\": \"41\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"9590\\r\\n\", \"output\": [\"23\", \"23\\r\\n\", \"23\\n\"]}, {\"input\": \"9169813\\r\\n\", \"output\": [\"36\", \"36\\n\", \"36\\r\\n\"]}, {\"input\": \"2001\\r\\n\", \"output\": [\"36\", \"36\\n\", \"36\\r\\n\"]}, {\"input\": \"6171\\r\\n\", \"output\": [\"28\", \"28\\n\", \"28\\r\\n\"]}, {\"input\": \"23\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"99932791\\r\\n\", \"output\": [\"33\", \"33\\r\\n\", \"33\\n\"]}, {\"input\": \"959590\\r\\n\", \"output\": [\"27\", \"27\\n\", \"27\\r\\n\"]}, {\"input\": \"90000001\\r\\n\", \"output\": [\"72\\r\\n\", \"72\", \"72\\n\"]}, {\"input\": \"98\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"442188277\\r\\n\", \"output\": [\"43\", \"43\\r\\n\", \"43\\n\"]}, {\"input\": \"751780\\r\\n\", \"output\": [\"34\\r\\n\", \"34\", \"34\\n\"]}, {\"input\": \"909590\\r\\n\", \"output\": [\"32\\n\", \"32\", \"32\\r\\n\"]}, {\"input\": \"91\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"89\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"76\\r\\n\", \"output\": [\"13\\n\", \"13\\r\\n\", \"13\"]}, {\"input\": \"34\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"70\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"38\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"58\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"852240\\r\\n\", \"output\": [\"42\\n\", \"42\\r\\n\", \"42\"]}, {\"input\": \"94\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"44\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"83\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"81\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"49\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"71\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"204907\\r\\n\", \"output\": [\"35\\r\\n\", \"35\\n\", \"35\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"9\", \"9\\r\\n\", \"9\\n\"]}, {\"input\": \"40\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"123123124\\r\\n\", \"output\": [\"64\\n\", \"64\\r\\n\", \"64\"]}, {\"input\": \"88\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"97\\r\\n\", \"output\": [\"12\", \"12\\n\", \"12\\r\\n\"]}, {\"input\": \"642853\\r\\n\", \"output\": [\"33\", \"33\\r\\n\", \"33\\n\"]}, {\"input\": \"986792\\r\\n\", \"output\": [\"23\", \"23\\r\\n\", \"23\\n\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"9\", \"9\\r\\n\", \"9\\n\"]}, {\"input\": \"73\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"50\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"556740\\r\\n\", \"output\": [\"33\", \"33\\r\\n\", \"33\\n\"]}, {\"input\": \"259835150\\r\\n\", \"output\": [\"46\\r\\n\", \"46\\n\", \"46\"]}, {\"input\": \"5932\\r\\n\", \"output\": [\"23\", \"23\\r\\n\", \"23\\n\"]}, {\"input\": \"36\\r\\n\", \"output\": [\"13\\n\", \"13\\r\\n\", \"13\"]}, {\"input\": \"96\\r\\n\", \"output\": [\"13\\n\", \"13\\r\\n\", \"13\"]}, {\"input\": \"999999\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"921280\\r\\n\", \"output\": [\"42\\n\", \"42\\r\\n\", \"42\"]}, {\"input\": \"84\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"19909590\\r\\n\", \"output\": [\"32\\n\", \"32\", \"32\\r\\n\"]}, {\"input\": \"599785072\\r\\n\", \"output\": [\"35\\r\\n\", \"35\\n\", \"35\"]}, {\"input\": \"303719549\\r\\n\", \"output\": [\"44\", \"44\\n\", \"44\\r\\n\"]}, {\"input\": \"90909590\\r\\n\", \"output\": [\"41\", \"41\\r\\n\", \"41\\n\"]}, {\"input\": \"940160238\\r\\n\", \"output\": [\"58\\n\", \"58\\r\\n\", \"58\"]}, {\"input\": \"255\\r\\n\", \"output\": [\"18\\n\", \"18\", \"18\\r\\n\"]}, {\"input\": \"439674440\\r\\n\", \"output\": [\"45\\n\", \"45\\r\\n\", \"45\"]}, {\"input\": \"870826420\\r\\n\", \"output\": [\"53\", \"53\\r\\n\", \"53\\n\"]}, {\"input\": \"93\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"55\\r\\n\", \"output\": [\"14\", \"14\\r\\n\", \"14\\n\"]}, {\"input\": \"631\\r\\n\", \"output\": [\"24\", \"24\\n\", \"24\\r\\n\"]}, {\"input\": \"24\\r\\n\", \"output\": [\"15\", \"15\\n\", \"15\\r\\n\"]}, {\"input\": \"59\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"78\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"997184\\r\\n\", \"output\": [\"26\\r\\n\", \"26\\n\", \"26\"]}, {\"input\": \"189070\\r\\n\", \"output\": [\"31\\n\", \"31\", \"31\\r\\n\"]}, {\"input\": \"46\\r\\n\", \"output\": [\"13\\n\", \"13\\r\\n\", \"13\"]}, {\"input\": \"63\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"869667992\\r\\n\", \"output\": [\"28\", \"28\\n\", \"28\\r\\n\"]}, {\"input\": \"963\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"86\\r\\n\", \"output\": [\"13\\n\", \"13\\r\\n\", \"13\"]}, {\"input\": \"880708\\r\\n\", \"output\": [\"32\\n\", \"32\", \"32\\r\\n\"]}, {\"input\": \"80\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"902826\\r\\n\", \"output\": [\"37\", \"37\\r\\n\", \"37\\n\"]}, {\"input\": \"57\\r\\n\", \"output\": [\"12\", \"12\\n\", \"12\\r\\n\"]}, {\"input\": \"956126\\r\\n\", \"output\": [\"35\\r\\n\", \"35\\n\", \"35\"]}, {\"input\": \"790643\\r\\n\", \"output\": [\"33\", \"33\\r\\n\", \"33\\n\"]}, {\"input\": \"68\\r\\n\", \"output\": [\"11\", \"11\\n\", \"11\\r\\n\"]}, {\"input\": \"990\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"860082635\\r\\n\", \"output\": [\"52\", \"52\\r\\n\", \"52\\n\"]}, {\"input\": \"940740\\r\\n\", \"output\": [\"40\", \"40\\r\\n\", \"40\\n\"]}, {\"input\": \"87\\r\\n\", \"output\": [\"12\", \"12\\n\", \"12\\r\\n\"]}, {\"input\": \"799170\\r\\n\", \"output\": [\"29\\n\", \"29\", \"29\\r\\n\"]}, {\"input\": \"75\\r\\n\", \"output\": [\"14\", \"14\\r\\n\", \"14\\n\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"312770\\r\\n\", \"output\": [\"38\\n\", \"38\\r\\n\", \"38\"]}, {\"input\": \"69\\r\\n\", \"output\": [\"10\\r\\n\", \"10\\n\", \"10\"]}, {\"input\": \"855520\\r\\n\", \"output\": [\"38\\n\", \"38\\r\\n\", \"38\"]}, {\"input\": \"53\\r\\n\", \"output\": [\"16\\n\", \"16\", \"16\\r\\n\"]}, {\"input\": \"841480\\r\\n\", \"output\": [\"38\\n\", \"38\\r\\n\", \"38\"]}, {\"input\": \"60\\r\\n\", \"output\": [\"19\", \"19\\r\\n\", \"19\\n\"]}, {\"input\": \"196530\\r\\n\", \"output\": [\"32\\n\", \"32\", \"32\\r\\n\"]}, {\"input\": \"883260\\r\\n\", \"output\": [\"36\", \"36\\n\", \"36\\r\\n\"]}, {\"input\": \"962131\\r\\n\", \"output\": [\"42\\n\", \"42\\r\\n\", \"42\"]}, {\"input\": \"77\\r\\n\", \"output\": [\"12\", \"12\\n\", \"12\\r\\n\"]}, {\"input\": \"47\\r\\n\", \"output\": [\"12\", \"12\\n\", \"12\\r\\n\"]}, {\"input\": \"62\\r\\n\", \"output\": [\"17\", \"17\\n\", \"17\\r\\n\"]}, {\"input\": \"2333\\r\\n\", \"output\": [\"28\", \"28\\n\", \"28\\r\\n\"]}, {\"input\": \"999999970\\r\\n\", \"output\": [\"21\\n\", \"21\", \"21\\r\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '24\\r\\n', 'output': ['15', '15\\n', '15\\r\\n']}, {'input': '69\\r\\n', 'output': ['10\\r\\n', '10\\n', '10']}, {'input': '920\\r\\n', 'output': ['26\\r\\n', '26\\n', '26']}, {'input': '9169813\\r\\n', 'output': ['36', '36\\n', '36\\r\\n']}, {'input': '123123124\\r\\n', 'output': ['64\\n', '64\\r\\n', '64']}]","human_sample_testcases_2":"[{'input': '1000000000\\r\\n', 'output': ['91\\n', '91\\r\\n', '91']}, {'input': '189070\\r\\n', 'output': ['31\\n', '31', '31\\r\\n']}, {'input': '90\\r\\n', 'output': ['19', '19\\r\\n', '19\\n']}, {'input': '19909590\\r\\n', 'output': ['32\\n', '32', '32\\r\\n']}, {'input': '869667992\\r\\n', 'output': ['28', '28\\n', '28\\r\\n']}]","human_sample_testcases_3":"[{'input': '439674440\\r\\n', 'output': ['45\\n', '45\\r\\n', '45']}, {'input': '23\\r\\n', 'output': ['16\\n', '16', '16\\r\\n']}, {'input': '9392\\r\\n', 'output': ['23', '23\\r\\n', '23\\n']}, {'input': '81\\r\\n', 'output': ['18\\n', '18', '18\\r\\n']}, {'input': '90\\r\\n', 'output': ['19', '19\\r\\n', '19\\n']}]","human_sample_testcases_4":"[{'input': '55\\r\\n', 'output': ['14', '14\\r\\n', '14\\n']}, {'input': '96\\r\\n', 'output': ['13\\n', '13\\r\\n', '13']}, {'input': '50\\r\\n', 'output': ['19', '19\\r\\n', '19\\n']}, {'input': '990\\r\\n', 'output': ['19', '19\\r\\n', '19\\n']}, {'input': '45\\r\\n', 'output': ['14', '14\\r\\n', '14\\n']}]","human_sample_testcases_5":"[{'input': '5932\\r\\n', 'output': ['23', '23\\r\\n', '23\\n']}, {'input': '98\\r\\n', 'output': ['11', '11\\n', '11\\r\\n']}, {'input': '990\\r\\n', 'output': ['19', '19\\r\\n', '19\\n']}, {'input': '38\\r\\n', 'output': ['11', '11\\n', '11\\r\\n']}, {'input': '841480\\r\\n', 'output': ['38\\n', '38\\r\\n', '38']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":374,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"12\"]","input_specification":"The only line of the input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) \u2014 the prediction on the number of people who will buy the game.","src_uid":"e392be5411ffccc1df50e65ec1f5c589","source_code":"def main():\n\tn = int(input())\n\tprint(solver(n))\n\ndef solver(n):\n\tfactors = [2, 3, 5, 7]\n\tsingles = n \/\/ 2 + n \/\/ 3 + n \/\/ 5 + n \/\/ 7\n\tpairs = n \/\/ (2 * 3) + n \/\/ (2 * 5) + n \/\/ (2 * 7) + \\\n\tn \/\/ (3 * 5) + n \/\/ (3 * 7) + n \/\/ (5 * 7)\n\ttriples = n \/\/ (2 * 3 * 5) + n \/\/ (2 * 3 * 7) + \\\n\tn \/\/ (2 * 5 * 7) + n \/\/ (3 * 5 * 7)\n\tquads = n \/\/ (2 * 3 * 5 * 7)\n\treturn n - singles + pairs - triples + quads\n\nmain()","sample_outputs":"[\"2\"]","lang_cluster":"Python","notes":null,"output_specification":"Output one integer showing how many numbers from 1 to n are not divisible by any number from 2 to 10.","description":"IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when the next number of sales is not divisible by any number from 2 to 10 every developer of this game gets a small bonus.A game designer Petya knows that the company is just about to release a new game that was partly developed by him. On the basis of his experience he predicts that n people will buy the game during the first month. Now Petya wants to determine how many times he will get the bonus. Help him to know it.","human_testcases":"[{\"input\": \"12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2519\\r\\n\", \"output\": [\"576\"]}, {\"input\": \"2521\\r\\n\", \"output\": [\"577\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"314159265\\r\\n\", \"output\": [\"71807832\"]}, {\"input\": \"718281828459045235\\r\\n\", \"output\": [\"164178703647781768\"]}, {\"input\": \"1000000000000000000\\r\\n\", \"output\": [\"228571428571428571\"]}, {\"input\": \"987654321234567890\\r\\n\", \"output\": [\"225749559139329804\"]}, {\"input\": \"3628800\\r\\n\", \"output\": [\"829440\"]}, {\"input\": \"504000000000000000\\r\\n\", \"output\": [\"115200000000000000\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '314159265\\r\\n', 'output': ['71807832']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}, {'input': '2521\\r\\n', 'output': ['577']}, {'input': '3628800\\r\\n', 'output': ['829440']}]","human_sample_testcases_2":"[{'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '2519\\r\\n', 'output': ['576']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}]","human_sample_testcases_3":"[{'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '3628800\\r\\n', 'output': ['829440']}, {'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '2521\\r\\n', 'output': ['577']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}]","human_sample_testcases_4":"[{'input': '718281828459045235\\r\\n', 'output': ['164178703647781768']}, {'input': '504000000000000000\\r\\n', 'output': ['115200000000000000']}, {'input': '987654321234567890\\r\\n', 'output': ['225749559139329804']}, {'input': '2521\\r\\n', 'output': ['577']}, {'input': '12\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '2521\\r\\n', 'output': ['577']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '1000000000000000000\\r\\n', 'output': ['228571428571428571']}, {'input': '12\\r\\n', 'output': ['2']}, {'input': '2519\\r\\n', 'output': ['576']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":375,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 1 4 4 2 1\", \"1 6 6 2 1 1\", \"4 1 7 4 1 2\"]","input_specification":"The only line contains six integers $$$x$$$, $$$y$$$, $$$z$$$, $$$t_1$$$, $$$t_2$$$, $$$t_3$$$ ($$$1 \\leq x, y, z, t_1, t_2, t_3 \\leq 1000$$$)\u00a0\u2014 the floor Masha is at, the floor Masha wants to get to, the floor the elevator is located on, the time it takes Masha to pass between two floors by stairs, the time it takes the elevator to pass between two floors and the time it takes for the elevator to close or open the doors. It is guaranteed that $$$x \\ne y$$$.","src_uid":"05cffd59b28b9e026ca3203718b2e6ca","source_code":"x,y,z,t1,t2,t3 = map(int,input().split())\ny=abs(y-x)\nif abs(z-x)*t2+y*t2+3*t3 <= y*t1 :\n print('YES')\nelse:\n print('NO') \n\n\n \n","sample_outputs":"[\"YES\", \"NO\", \"YES\"]","lang_cluster":"Python","notes":"NoteIn the first example:If Masha goes by the stairs, the time she spends is $$$4 \\cdot 4 = 16$$$, because she has to go $$$4$$$ times between adjacent floors and each time she spends $$$4$$$ seconds. If she chooses the elevator, she will have to wait $$$2$$$ seconds while the elevator leaves the $$$4$$$-th floor and goes to the $$$5$$$-th. After that the doors will be opening for another $$$1$$$ second. Then Masha will enter the elevator, and she will have to wait for $$$1$$$ second for the doors closing. Next, the elevator will spend $$$4 \\cdot 2 = 8$$$ seconds going from the $$$5$$$-th floor to the $$$1$$$-st, because the elevator has to pass $$$4$$$ times between adjacent floors and spends $$$2$$$ seconds each time. And finally, it will take another $$$1$$$ second before the doors are open and Masha can come out. Thus, all the way by elevator will take $$$2 + 1 + 1 + 8 + 1 = 13$$$ seconds, which is less than $$$16$$$ seconds, so Masha has to choose the elevator.In the second example, it is more profitable for Masha to use the stairs, because it will take $$$13$$$ seconds to use the elevator, that is more than the $$$10$$$ seconds it will takes to go by foot.In the third example, the time it takes to use the elevator is equal to the time it takes to walk up by the stairs, and is equal to $$$12$$$ seconds. That means Masha will take the elevator.","output_specification":"If the time it will take to use the elevator is not greater than the time it will take to use the stairs, print \u00abYES\u00bb (without quotes), otherwise print \u00abNO> (without quotes). You can print each letter in any case (upper or lower).","description":"Masha lives in a multi-storey building, where floors are numbered with positive integers. Two floors are called adjacent if their numbers differ by one. Masha decided to visit Egor. Masha lives on the floor $$$x$$$, Egor on the floor $$$y$$$ (not on the same floor with Masha).The house has a staircase and an elevator. If Masha uses the stairs, it takes $$$t_1$$$ seconds for her to walk between adjacent floors (in each direction). The elevator passes between adjacent floors (in each way) in $$$t_2$$$ seconds. The elevator moves with doors closed. The elevator spends $$$t_3$$$ seconds to open or close the doors. We can assume that time is not spent on any action except moving between adjacent floors and waiting for the doors to open or close. If Masha uses the elevator, it immediately goes directly to the desired floor.Coming out of the apartment on her floor, Masha noticed that the elevator is now on the floor $$$z$$$ and has closed doors. Now she has to choose whether to use the stairs or use the elevator. If the time that Masha needs to get to the Egor's floor by the stairs is strictly less than the time it will take her using the elevator, then she will use the stairs, otherwise she will choose the elevator.Help Mary to understand whether to use the elevator or the stairs.","human_testcases":"[{\"input\": \"5 1 4 4 2 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 6 6 2 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4 1 7 4 1 2\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"749 864 931 266 94 891\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"719 137 307 244 724 777\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"608 11 980 338 208 78\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"571 695 153 288 64 421\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"837 544 703 808 549 694\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"271 634 606 95 39 523\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1000 999 1000 1000 1000 1000\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"236 250 259 597 178 591\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"385 943 507 478 389 735\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"559 540 735 635 58 252\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"500 922 443 965 850 27\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"995 584 903 362 290 971\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"494 475 456 962 297 450\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"866 870 898 979 30 945\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"602 375 551 580 466 704\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"76 499 93 623 595 576\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"256 45 584 731 281 927\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"213 264 205 94 70 221\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"649 104 595 70 62 337\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"976 970 800 607 13 425\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"140 713 561 101 223 264\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"437 169 136 492 353 94\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"85 931 66 464 683 497\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"723 971 992 711 336 872\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"5 10 6 873 640 175\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"99 6 108 25 3 673\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"519 706 467 8 4 180\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"4 2 3 540 121 239\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"327 52 3 175 79 268\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"304 501 408 502 324 457\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3 1 669 68 401\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"56 33 8 263 58 644\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"492 476 254 200 2 897\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"22 594 816 276 847 290\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"33 997 1000 901 87 189\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1000 1 1000 1000 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 1000 1 1000 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 1000 1000 1 1000 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"352 165 275 781 542 987\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"188 288 112 595 331 414\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"239 240 239 996 767 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"997 998 998 267 97 26\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"321 123 321 352 349 199\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"239 932 239 377 373 925\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"301 300 300 338 152 13\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"333 334 333 572 331 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"1 2 1 1 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 25 1 10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 5 1 5 4 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 101 1 2 1 50\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 13 2 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 3 1 10 5 4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 10 2 3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5 100 10 100 1 1\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"3 2 3 16 12 2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 3 2 3 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2 4 2 2 1 1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1 2 1 10 5 2\\r\\n\", \"output\": [\"NO\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 100 10 100 1 1\\r\\n', 'output': ['YES']}, {'input': '1 2 1 10 5 2\\r\\n', 'output': ['NO']}, {'input': '1 2 1 10 2 3\\r\\n', 'output': ['NO']}, {'input': '301 300 300 338 152 13\\r\\n', 'output': ['NO']}, {'input': '1 1000 1000 1 1000 1\\r\\n', 'output': ['NO']}]","human_sample_testcases_2":"[{'input': '1 2 1 1 1 1\\r\\n', 'output': ['NO']}, {'input': '1 5 1 5 4 2\\r\\n', 'output': ['NO']}, {'input': '385 943 507 478 389 735\\r\\n', 'output': ['NO']}, {'input': '571 695 153 288 64 421\\r\\n', 'output': ['NO']}, {'input': '256 45 584 731 281 927\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '188 288 112 595 331 414\\r\\n', 'output': ['YES']}, {'input': '1 3 1 669 68 401\\r\\n', 'output': ['NO']}, {'input': '85 931 66 464 683 497\\r\\n', 'output': ['NO']}, {'input': '1 2 1 10 2 3\\r\\n', 'output': ['NO']}, {'input': '56 33 8 263 58 644\\r\\n', 'output': ['NO']}]","human_sample_testcases_4":"[{'input': '5 10 6 873 640 175\\r\\n', 'output': ['YES']}, {'input': '1 2 1 13 2 4\\r\\n', 'output': ['NO']}, {'input': '1 6 6 2 1 1\\r\\n', 'output': ['NO']}, {'input': '1 3 1 10 5 4\\r\\n', 'output': ['NO']}, {'input': '608 11 980 338 208 78\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '2 3 2 3 1 1\\r\\n', 'output': ['NO']}, {'input': '1 6 6 2 1 1\\r\\n', 'output': ['NO']}, {'input': '1 2 1 25 1 10\\r\\n', 'output': ['NO']}, {'input': '56 33 8 263 58 644\\r\\n', 'output': ['NO']}, {'input': '213 264 205 94 70 221\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":376,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"5 5 3 2\", \"7 5 5 2\"]","input_specification":"The first line contains four space-separated integers n, a, b and c (1\u2009\u2264\u2009n,\u2009a,\u2009b,\u2009c\u2009\u2264\u20094000) \u2014 the length of the original ribbon and the acceptable lengths of the ribbon pieces after the cutting, correspondingly. The numbers a, b and c can coincide.","src_uid":"062a171cc3ea717ea95ede9d7a1c3a43","source_code":"def f(n):\n # Build maximum number of pieces for\n #length 1 upto n in bottom up manner\n dp = [float(\"-inf\")] * (n + 1)\n \n # Base Case\n dp[0] = 0\n \n # dp[i] gives maximum number of pieces that can\n # be obtained by cutting ribbon of length i into pieces\n # of length a, b or c\n # dp[i] = -inf if it is not possible to cut the ribbon into pieces\n for i in range(1, n + 1):\n for length in l:\n # Cut into pieces if only we dont have negative length of ribbon\n if i - length >= 0:\n dp[i] = max(dp[i], 1 + dp[i - length])\n # return maximum number of pieces possible for ribbon with length n\n return dp[n]\n \n \nl = list(map(int, input().split()))\nn, l = l[0], l[1:]\nprint(f(n))","sample_outputs":"[\"2\", \"2\"]","lang_cluster":"Python","notes":"NoteIn the first example Polycarpus can cut the ribbon in such way: the first piece has length 2, the second piece has length 3.In the second example Polycarpus can cut the ribbon in such way: the first piece has length 5, the second piece has length 2.","output_specification":"Print a single number \u2014 the maximum possible number of ribbon pieces. It is guaranteed that at least one correct ribbon cutting exists.","description":"Polycarpus has a ribbon, its length is n. He wants to cut the ribbon in a way that fulfils the following two conditions: After the cutting each ribbon piece should have length a, b or c. After the cutting the number of ribbon pieces should be maximum. Help Polycarpus and find the number of ribbon pieces after the required cutting.","human_testcases":"[{\"input\": \"5 5 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"7 5 5 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 4 4 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4000 1 2 3\\r\\n\", \"output\": [\"4000\"]}, {\"input\": \"4000 3 4 5\\r\\n\", \"output\": [\"1333\"]}, {\"input\": \"10 3 4 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100 23 15 50\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3119 3515 1021 7\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"918 102 1327 1733\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3164 42 430 1309\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"3043 317 1141 2438\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"26 1 772 2683\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"370 2 1 15\\r\\n\", \"output\": [\"370\"]}, {\"input\": \"734 12 6 2\\r\\n\", \"output\": [\"367\"]}, {\"input\": \"418 18 14 17\\r\\n\", \"output\": [\"29\"]}, {\"input\": \"18 16 28 9\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"14 6 2 17\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"29 27 18 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"29 12 7 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"27 23 4 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 14 5 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 17 26 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 1 10 3\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2 19 15 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 6 4 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 6 2 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 2 9 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 2 4 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"27 24 5 27\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2683 83 26 2709\\r\\n\", \"output\": [\"101\"]}, {\"input\": \"728 412 789 158\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3964 4 2916 176\\r\\n\", \"output\": [\"991\"]}, {\"input\": \"3399 2035 2 3334\\r\\n\", \"output\": [\"683\"]}, {\"input\": \"3455 244 3301 3\\r\\n\", \"output\": [\"991\"]}, {\"input\": \"595 2263 3625 1\\r\\n\", \"output\": [\"595\"]}, {\"input\": \"4000 1 1 1\\r\\n\", \"output\": [\"4000\"]}, {\"input\": \"3999 2 2 3999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"25 6 8 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4000 500 1000 2000\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"53 10 11 23\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100 100 1 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"17 3 4 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"413 101 102 105\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"490 4 49 50\\r\\n\", \"output\": [\"111\"]}, {\"input\": \"3999 2 3 3\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"8 3 8 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 1 3 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"100 3 17 22\\r\\n\", \"output\": [\"27\"]}, {\"input\": \"4000 2 3 4\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"4000 3 3 5\\r\\n\", \"output\": [\"1332\"]}, {\"input\": \"13 4 6 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4000 5 2 2\\r\\n\", \"output\": [\"2000\"]}, {\"input\": \"3999 2 2 3\\r\\n\", \"output\": [\"1999\"]}, {\"input\": \"4000 33 7 3333\\r\\n\", \"output\": [\"564\"]}, {\"input\": \"60 33 20 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100 9 11 99\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"2009 6 8 9\\r\\n\", \"output\": [\"334\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '27 23 4 3\\r\\n', 'output': ['9']}, {'input': '595 2263 3625 1\\r\\n', 'output': ['595']}, {'input': '370 2 1 15\\r\\n', 'output': ['370']}, {'input': '4000 5 2 2\\r\\n', 'output': ['2000']}, {'input': '7 5 5 2\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '5 17 26 5\\r\\n', 'output': ['1']}, {'input': '2 2 9 6\\r\\n', 'output': ['1']}, {'input': '3999 2 2 3\\r\\n', 'output': ['1999']}, {'input': '5 14 5 2\\r\\n', 'output': ['1']}, {'input': '3399 2035 2 3334\\r\\n', 'output': ['683']}]","human_sample_testcases_3":"[{'input': '13 4 6 7\\r\\n', 'output': ['2']}, {'input': '5 5 3 2\\r\\n', 'output': ['2']}, {'input': '595 2263 3625 1\\r\\n', 'output': ['595']}, {'input': '4 6 4 9\\r\\n', 'output': ['1']}, {'input': '100 100 1 1\\r\\n', 'output': ['100']}]","human_sample_testcases_4":"[{'input': '13 4 6 7\\r\\n', 'output': ['2']}, {'input': '4000 3 4 5\\r\\n', 'output': ['1333']}, {'input': '17 3 4 10\\r\\n', 'output': ['5']}, {'input': '3999 2 2 3\\r\\n', 'output': ['1999']}, {'input': '60 33 20 9\\r\\n', 'output': ['4']}]","human_sample_testcases_5":"[{'input': '14 6 2 17\\r\\n', 'output': ['7']}, {'input': '2 2 9 6\\r\\n', 'output': ['1']}, {'input': '2683 83 26 2709\\r\\n', 'output': ['101']}, {'input': '8 3 8 4\\r\\n', 'output': ['2']}, {'input': '4000 3 4 5\\r\\n', 'output': ['1333']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":377,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 4\", \"2 1\"]","input_specification":"The only line contains two integers $$$N$$$ and $$$M$$$ ($$$1 \\leq N, M \\leq 10^9$$$) \u2014 the number of rows and columns in the grid.","src_uid":"a91aab4c0618d036c81022232814ef44","source_code":"G = list(map(int, input().split()))\nN = G[0]\nM = G[1]\n\nif M > 1:\n print(N * (M - 1))\nelse:\n print(M * (N - 1))\n\t\t \t\t\t\t\t \t \t\t\t\t\t \t \t\t\t\t","sample_outputs":"[\"9\", \"1\"]","lang_cluster":"Python","notes":"NoteThe picture below is the grid that Pak Chanek has in the first example. The picture below is an example of a tight domino in the grid. ","output_specification":"An integer representing the number of distinct tight dominoes in the grid.","description":"Pak Chanek has a grid that has $$$N$$$ rows and $$$M$$$ columns. Each row is numbered from $$$1$$$ to $$$N$$$ from top to bottom. Each column is numbered from $$$1$$$ to $$$M$$$ from left to right.Each tile in the grid contains a number. The numbers are arranged as follows: Row $$$1$$$ contains integers from $$$1$$$ to $$$M$$$ from left to right. Row $$$2$$$ contains integers from $$$M+1$$$ to $$$2 \\times M$$$ from left to right. Row $$$3$$$ contains integers from $$$2 \\times M+1$$$ to $$$3 \\times M$$$ from left to right. And so on until row $$$N$$$. A domino is defined as two different tiles in the grid that touch by their sides. A domino is said to be tight if and only if the two numbers in the domino have a difference of exactly $$$1$$$. Count the number of distinct tight dominoes in the grid.Two dominoes are said to be distinct if and only if there exists at least one tile that is in one domino, but not in the other.","human_testcases":"[{\"input\": \"3 4\\n\", \"output\": [\"\\n9\", \"9\", \"9\\n\\n\", \"9\\n\\n\", \"\\n\\n\\n9\\n\", \"9\\n\", \"\\n9\\n\", \"\\n\\n\\n\\n\\n\\n\\n\\n9\\n\", \"9\\n\"]}, {\"input\": \"2 1\\n\", \"output\": [\"\\n1\", \"1\\n\", \"1\", \"1\\n\\n\", \"\\n1\\n\", \"1\\n\\n\", \"\\n\\n1\\n\", \"1\\n\", \"\\n\\n\\n\\n\\n1\\n\"]}, {\"input\": \"1 1\\n\", \"output\": [\"\\n0\\n\", \"\\n0\", \"0\\n\\n\", \"0\\n\\n\", \"0\\n\", \"0\\n\", \"\\n\\n0\\n\", \"0\"]}, {\"input\": \"1 2\\n\", \"output\": [\"\\n1\", \"1\\n\", \"1\", \"1\\n\\n\", \"\\n1\\n\", \"1\\n\\n\", \"\\n\\n1\\n\", \"1\\n\"]}, {\"input\": \"2 2\\n\", \"output\": [\"2\\n\", \"2\", \"\\n\\n\\n\\n\\n2\\n\", \"2\\n\\n\", \"\\n\\n2\\n\", \"\\n2\", \"2\\n\\n\", \"\\n2\\n\", \"2\\n\"]}, {\"input\": \"1 1000000000\\n\", \"output\": [\"999999999\\n\", \"\\n999999999\\n\", \"\\n999999999\", \"999999999\\n\", \"999999999\\n\\n\", \"999999999\", \"999999999\\n\\n\"]}, {\"input\": \"1 999999997\\n\", \"output\": [\"999999996\\n\\n\", \"\\n999999996\", \"999999996\\n\\n\", \"999999996\\n\", \"999999996\\n\", \"\\n999999996\\n\", \"999999996\"]}, {\"input\": \"1 589284012\\n\", \"output\": [\"589284011\\n\", \"\\n589284011\", \"589284011\", \"589284011\\n\\n\", \"589284011\\n\\n\", \"\\n589284011\\n\", \"589284011\\n\"]}, {\"input\": \"1000000000 1\\n\", \"output\": [\"999999999\\n\", \"\\n999999999\\n\", \"\\n999999999\", \"999999999\\n\", \"999999999\\n\\n\", \"999999999\", \"999999999\\n\\n\"]}, {\"input\": \"999999999 1\\n\", \"output\": [\"\\n999999998\", \"\\n999999998\\n\", \"999999998\", \"999999998\\n\\n\", \"999999998\\n\", \"999999998\\n\\n\", \"999999998\\n\"]}, {\"input\": \"636562060 1\\n\", \"output\": [\"\\n636562059\", \"636562059\\n\\n\", \"636562059\\n\", \"636562059\", \"\\n636562059\\n\", \"636562059\\n\", \"636562059\\n\\n\"]}, {\"input\": \"2 1000000000\\n\", \"output\": [\"1999999998\\n\\n\", \"\\n1999999998\\n\", \"1999999998\\n\", \"1999999998\", \"1999999998\\n\", \"\\n1999999998\", \"1999999998\\n\\n\"]}, {\"input\": \"1000000000 2\\n\", \"output\": [\"1000000000\", \"1000000000\\n\\n\", \"1000000000\\n\", \"1000000000\\n\", \"\\n1000000000\", \"\\n1000000000\\n\", \"1000000000\\n\\n\"]}, {\"input\": \"30001 30001\\n\", \"output\": [\"900030000\\n\", \"\\n900030000\\n\", \"900030000\", \"\\n900030000\", \"900030000\\n\\n\", \"900030000\\n\\n\", \"900030000\\n\"]}, {\"input\": \"1000000000 1000000000\\n\", \"output\": [\"999999999000000000\\n\", \"999999999000000000\\n\\n\", \"999999999000000000\\n\\n\", \"999999999000000000\\n\", \"999999999000000000\"]}, {\"input\": \"767928735 1000000000\\n\", \"output\": [\"767928734232071265\\n\\n\", \"767928734232071265\\n\", \"767928734232071265\\n\\n\", \"767928734232071265\\n\", \"767928734232071265\"]}, {\"input\": \"1000000000 906523442\\n\", \"output\": [\"906523441000000000\\n\\n\", \"906523441000000000\", \"906523441000000000\\n\", \"906523441000000000\\n\\n\", \"906523441000000000\\n\"]}, {\"input\": \"647242241 921242095\\n\", \"output\": [\"596266797424092654\\n\", \"596266797424092654\\n\\n\", \"596266797424092654\\n\", \"596266797424092654\", \"596266797424092654\\n\\n\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1000000000 1000000000\\n', 'output': ['999999999000000000\\n', '999999999000000000\\n\\n', '999999999000000000\\n\\n', '999999999000000000\\n', '999999999000000000']}, {'input': '2 1\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n', '\\n\\n\\n\\n\\n1\\n']}, {'input': '647242241 921242095\\n', 'output': ['596266797424092654\\n', '596266797424092654\\n\\n', '596266797424092654\\n', '596266797424092654', '596266797424092654\\n\\n']}, {'input': '1000000000 2\\n', 'output': ['1000000000', '1000000000\\n\\n', '1000000000\\n', '1000000000\\n', '\\n1000000000', '\\n1000000000\\n', '1000000000\\n\\n']}, {'input': '767928735 1000000000\\n', 'output': ['767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265']}]","human_sample_testcases_2":"[{'input': '1 1\\n', 'output': ['\\n0\\n', '\\n0', '0\\n\\n', '0\\n\\n', '0\\n', '0\\n', '\\n\\n0\\n', '0']}, {'input': '1 2\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n']}, {'input': '647242241 921242095\\n', 'output': ['596266797424092654\\n', '596266797424092654\\n\\n', '596266797424092654\\n', '596266797424092654', '596266797424092654\\n\\n']}, {'input': '1000000000 1\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '1 589284012\\n', 'output': ['589284011\\n', '\\n589284011', '589284011', '589284011\\n\\n', '589284011\\n\\n', '\\n589284011\\n', '589284011\\n']}]","human_sample_testcases_3":"[{'input': '1000000000 906523442\\n', 'output': ['906523441000000000\\n\\n', '906523441000000000', '906523441000000000\\n', '906523441000000000\\n\\n', '906523441000000000\\n']}, {'input': '2 2\\n', 'output': ['2\\n', '2', '\\n\\n\\n\\n\\n2\\n', '2\\n\\n', '\\n\\n2\\n', '\\n2', '2\\n\\n', '\\n2\\n', '2\\n']}, {'input': '767928735 1000000000\\n', 'output': ['767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265']}, {'input': '1 2\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n']}, {'input': '1000000000 1\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}]","human_sample_testcases_4":"[{'input': '1 1000000000\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '30001 30001\\n', 'output': ['900030000\\n', '\\n900030000\\n', '900030000', '\\n900030000', '900030000\\n\\n', '900030000\\n\\n', '900030000\\n']}, {'input': '999999999 1\\n', 'output': ['\\n999999998', '\\n999999998\\n', '999999998', '999999998\\n\\n', '999999998\\n', '999999998\\n\\n', '999999998\\n']}, {'input': '1000000000 1\\n', 'output': ['999999999\\n', '\\n999999999\\n', '\\n999999999', '999999999\\n', '999999999\\n\\n', '999999999', '999999999\\n\\n']}, {'input': '1 589284012\\n', 'output': ['589284011\\n', '\\n589284011', '589284011', '589284011\\n\\n', '589284011\\n\\n', '\\n589284011\\n', '589284011\\n']}]","human_sample_testcases_5":"[{'input': '2 1000000000\\n', 'output': ['1999999998\\n\\n', '\\n1999999998\\n', '1999999998\\n', '1999999998', '1999999998\\n', '\\n1999999998', '1999999998\\n\\n']}, {'input': '767928735 1000000000\\n', 'output': ['767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265\\n\\n', '767928734232071265\\n', '767928734232071265']}, {'input': '1 589284012\\n', 'output': ['589284011\\n', '\\n589284011', '589284011', '589284011\\n\\n', '589284011\\n\\n', '\\n589284011\\n', '589284011\\n']}, {'input': '2 1\\n', 'output': ['\\n1', '1\\n', '1', '1\\n\\n', '\\n1\\n', '1\\n\\n', '\\n\\n1\\n', '1\\n', '\\n\\n\\n\\n\\n1\\n']}, {'input': '1000000000 1000000000\\n', 'output': ['999999999000000000\\n', '999999999000000000\\n\\n', '999999999000000000\\n\\n', '999999999000000000\\n', '999999999000000000']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":378,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\", \"11\"]","input_specification":"The only line of the input contains a single integer n (1\u2009\u2264\u2009n\u2009\u2264\u20091000)\u00a0\u2014 the position of the digit you need to print.","src_uid":"2d46e34839261eda822f0c23c6e19121","source_code":"n=int(input())\nst=\"\"\nfor i in range(1,1000):\n st=st+str(i)\nprint(st[n-1] )\n\n ","sample_outputs":"[\"3\", \"0\"]","lang_cluster":"Python","notes":"NoteIn the first sample the digit at position 3 is '3', as both integers 1 and 2 consist on one digit.In the second sample, the digit at position 11 is '0', it belongs to the integer 10.","output_specification":"Print the n-th digit of the line.","description":"Every year, hundreds of people come to summer camps, they learn new algorithms and solve hard problems.This is your first year at summer camp, and you are asked to solve the following problem. All integers starting with 1 are written in one line. The prefix of these line is \"123456789101112131415...\". Your task is to print the n-th digit of this string (digits are numbered starting with 1.","human_testcases":"[{\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"29\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"123\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"157\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"289\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"179\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"942\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"879\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"394\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"423\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"952\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"121\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"613\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"945\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"270\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"781\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"453\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"171\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"643\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"570\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"750\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"500\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"108\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"189\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"491\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"191\\r\\n\", \"output\": [\"0\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3\\r\\n', 'output': ['3']}, {'input': '270\\r\\n', 'output': ['6']}, {'input': '945\\r\\n', 'output': ['1']}, {'input': '952\\r\\n', 'output': ['3']}, {'input': '423\\r\\n', 'output': ['7']}]","human_sample_testcases_2":"[{'input': '100\\r\\n', 'output': ['5']}, {'input': '500\\r\\n', 'output': ['0']}, {'input': '29\\r\\n', 'output': ['9']}, {'input': '394\\r\\n', 'output': ['1']}, {'input': '157\\r\\n', 'output': ['3']}]","human_sample_testcases_3":"[{'input': '8\\r\\n', 'output': ['8']}, {'input': '394\\r\\n', 'output': ['1']}, {'input': '121\\r\\n', 'output': ['5']}, {'input': '750\\r\\n', 'output': ['6']}, {'input': '11\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '270\\r\\n', 'output': ['6']}, {'input': '13\\r\\n', 'output': ['1']}, {'input': '29\\r\\n', 'output': ['9']}, {'input': '289\\r\\n', 'output': ['1']}, {'input': '121\\r\\n', 'output': ['5']}]","human_sample_testcases_5":"[{'input': '100\\r\\n', 'output': ['5']}, {'input': '500\\r\\n', 'output': ['0']}, {'input': '191\\r\\n', 'output': ['0']}, {'input': '491\\r\\n', 'output': ['0']}, {'input': '8\\r\\n', 'output': ['8']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":379,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3\\n0 0 1\\n2 0 1\\n4 0 1\", \"3\\n0 0 2\\n3 0 2\\n6 0 2\", \"3\\n0 0 2\\n2 0 2\\n1 1 2\"]","input_specification":"The first line of input contains one integer n (1\u2009\u2264\u2009n\u2009\u2264\u20093), denoting the number of circles. The following n lines each contains three space-separated integers x, y and r (\u2009-\u200910\u2009\u2264\u2009x,\u2009y\u2009\u2264\u200910, 1\u2009\u2264\u2009r\u2009\u2264\u200910), describing a circle whose center is (x,\u2009y) and the radius is r. No two circles have the same x, y and r at the same time.","src_uid":"bda5879e94a82c6fd499796f258c4691","source_code":"from math import sqrt\npt = lambda *a, **k: print(*a, **k, flush=True)\nrd = lambda: map(int, input().split())\nn = int(input())\ndef f(x1, y1, r1, x2, y2, r2):\n a = (r1 + r2) ** 2\n b = (r1 - r2) ** 2\n d = (x1 - x2) ** 2 + (y1 - y2) ** 2\n if d > a:\n return 1\n elif d == a:\n return 4\n elif d < b:\n return 3\n elif d == b:\n return 5\n else:\n return 2\ndef g(x1, y1, r1, x2, y2, r2):\n ds = (x1 - x2) ** 2 + (y1 - y2) ** 2\n d = sqrt(ds)\n A = (r1 ** 2 - r2 ** 2 + ds) \/ (2 * d)\n h = sqrt(r1 ** 2 - A ** 2)\n x = x1 + A * (x2 - x1) \/ d \n y = y1 + A * (y2 - y1) \/ d\n x3 = x - h * (y2 - y1) \/ d \n y3 = y + h * (x2 - x1) \/ d\n x4 = x + h * (y2 - y1) \/ d \n y4 = y - h * (x2 - x1) \/ d\n return x3, y3, x4, y4 \nif n is 1:\n pt(2)\nif n is 2:\n x1, y1, r1 = rd()\n x2, y2, r2 = rd()\n a = f(x1, y1, r1, x2, y2, r2)\n pt(4 if a is 2 else 3)\nif n is 3:\n x1, y1, r1 = rd()\n x2, y2, r2 = rd()\n x3, y3, r3 = rd()\n a = f(x1, y1, r1, x2, y2, r2)\n b = f(x1, y1, r1, x3, y3, r3)\n c = f(x3, y3, r3, x2, y2, r2)\n t = [a, b, c]\n t.sort()\n a, b, c = t\n if a is 1 and b is 1 and c in [1, 3, 4, 5]:\n pt(4)\n if a is 1 and b is 1 and c is 2:\n pt(5)\n if a is 1 and b is 2 and c is 2:\n pt(6)\n if a is 1 and b is 2 and c in [3, 4, 5]:\n pt(5)\n if a is 1 and b in [3, 4, 5]:\n pt(4)\n if a is 2 and b is 2 and c is 2:\n x4, y4, x5, y5 = g(x1, y1, r1, x2, y2, r2)\n r = 8\n if abs((x4 - x3) ** 2 + (y4 - y3) ** 2 - r3 ** 2) < 1e-6:\n r -= 1\n if abs((x5 - x3) ** 2 + (y5 - y3) ** 2 - r3 ** 2) < 1e-6:\n r -= 1\n pt(r)\n if a is 2 and b is 2 and c is 3:\n pt(6)\n if a is 2 and b is 2 and c in [4, 5]:\n x4, y4, x5, y5 = g(x1, y1, r1, x2, y2, r2)\n if abs((x4 - x3) ** 2 + (y4 - y3) ** 2 - r3 ** 2) < 1e-6 or abs((x5 - x3) ** 2 + (y5 - y3) ** 2 - r3 ** 2) < 1e-6:\n pt(6)\n else:\n pt(7)\n if a is 2 and b is 3:\n pt(5)\n if a is 2 and b in [4, 5]:\n pt(6)\n if a is 3 and b in [3, 4, 5]:\n pt(4)\n if a is 4 and b is 4 and c is 4:\n pt(5)\n if a is 4 and b is 4 and c is 5:\n pt(4)\n if a is 4 and b is 5 and c is 5:\n pt(5)\n if a is 5 and b is 5 and c is 5:\n pt(4)\n","sample_outputs":"[\"4\", \"6\", \"8\"]","lang_cluster":"Python","notes":"NoteFor the first example, For the second example, For the third example, ","output_specification":"Print a single integer\u00a0\u2014 the number of regions on the plane.","description":"Firecrackers scare Nian the monster, but they're wayyyyy too noisy! Maybe fireworks make a nice complement.Little Tommy is watching a firework show. As circular shapes spread across the sky, a splendid view unfolds on the night of Lunar New Year's eve.A wonder strikes Tommy. How many regions are formed by the circles on the sky? We consider the sky as a flat plane. A region is a connected part of the plane with positive area, whose bound consists of parts of bounds of the circles and is a curve or several curves without self-intersections, and that does not contain any curve other than its boundaries. Note that exactly one of the regions extends infinitely.","human_testcases":"[{\"input\": \"3\\r\\n0 0 1\\r\\n2 0 1\\r\\n4 0 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n0 0 2\\r\\n3 0 2\\r\\n6 0 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n0 0 2\\r\\n2 0 2\\r\\n1 1 2\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1\\r\\n0 0 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2\\r\\n-10 10 1\\r\\n10 -10 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n-6 6 9\\r\\n3 -6 6\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2\\r\\n-10 -10 10\\r\\n10 10 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3\\r\\n-4 1 5\\r\\n-7 7 10\\r\\n-3 -4 8\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n-2 8 10\\r\\n3 -2 5\\r\\n3 1 3\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n0 0 2\\r\\n0 0 4\\r\\n3 0 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n8 5 7\\r\\n7 3 7\\r\\n5 2 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n-6 5 7\\r\\n1 -2 7\\r\\n7 9 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n1 -7 10\\r\\n-7 9 10\\r\\n-2 -1 4\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n-2 -3 5\\r\\n-6 1 7\\r\\n5 4 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n3 -2 7\\r\\n-1 2 5\\r\\n-4 1 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n4 5 10\\r\\n1 -1 5\\r\\n-1 -5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-1 0 5\\r\\n-2 1 5\\r\\n-5 4 7\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-3 3 5\\r\\n1 -1 7\\r\\n2 5 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-4 4 3\\r\\n5 6 4\\r\\n1 -5 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-4 4 4\\r\\n2 4 2\\r\\n-1 0 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-10 4 10\\r\\n10 4 10\\r\\n0 -7 10\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-4 -5 3\\r\\n-3 -4 1\\r\\n-6 0 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n4 0 1\\r\\n-1 1 9\\r\\n0 3 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-3 -2 3\\r\\n-4 -6 3\\r\\n-6 -4 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-3 6 4\\r\\n-1 4 7\\r\\n0 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n1 -1 2\\r\\n-6 -3 10\\r\\n-1 3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-2 -5 4\\r\\n-5 -1 5\\r\\n-6 -2 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n5 -2 3\\r\\n1 1 2\\r\\n4 -3 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 -6 3\\r\\n-2 0 1\\r\\n1 -4 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-1 -2 3\\r\\n-5 -4 4\\r\\n-6 -5 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-1 3 4\\r\\n-2 0 8\\r\\n3 6 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-4 -1 2\\r\\n-6 -5 10\\r\\n1 3 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 2 1\\r\\n0 -6 9\\r\\n-5 -3 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-4 -5 4\\r\\n6 5 2\\r\\n-6 -6 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-5 -2 3\\r\\n-1 1 8\\r\\n-4 -3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-3 -1 8\\r\\n0 3 3\\r\\n2 2 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n3 4 9\\r\\n2 -3 1\\r\\n-1 1 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-5 -6 5\\r\\n-2 -2 10\\r\\n-3 4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 6 5\\r\\n1 -1 5\\r\\n-2 3 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n3 -5 5\\r\\n-1 -2 10\\r\\n-5 1 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n0 0 6\\r\\n-4 -3 1\\r\\n-3 4 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-5 -2 10\\r\\n3 -1 3\\r\\n-1 1 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-1 -1 10\\r\\n-5 2 5\\r\\n1 -6 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-4 1 1\\r\\n-2 -6 7\\r\\n-6 -3 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n3 -4 2\\r\\n-1 -1 3\\r\\n-5 2 8\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n6 -1 1\\r\\n1 1 4\\r\\n-2 5 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 -6 1\\r\\n-6 5 8\\r\\n-2 2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-6 -6 8\\r\\n-4 -5 1\\r\\n-1 -4 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-4 -5 7\\r\\n2 -3 6\\r\\n-2 0 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n1 -5 1\\r\\n4 -3 3\\r\\n-6 -6 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n2 -1 4\\r\\n-1 -5 1\\r\\n-5 0 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -6 9\\r\\n4 -3 4\\r\\n-3 -1 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-4 -2 7\\r\\n-6 -1 7\\r\\n-3 -5 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n2 -2 8\\r\\n6 -5 3\\r\\n3 -1 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-3 1 4\\r\\n-1 6 9\\r\\n-6 5 9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-4 -1 5\\r\\n-1 3 10\\r\\n4 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-2 2 3\\r\\n0 -6 3\\r\\n-6 -1 8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-1 -3 9\\r\\n0 -2 7\\r\\n-6 -6 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-5 -6 8\\r\\n-2 -1 7\\r\\n1 -5 2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-5 3 4\\r\\n1 4 4\\r\\n-6 -6 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n6 2 6\\r\\n-6 5 7\\r\\n-2 -4 4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n5 2 4\\r\\n-3 6 4\\r\\n-6 -6 10\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n5 -5 1\\r\\n-3 1 9\\r\\n2 -6 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n1 6 4\\r\\n4 2 9\\r\\n-4 -6 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-6 -4 9\\r\\n0 4 1\\r\\n-1 3 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n-3 -6 4\\r\\n1 -3 1\\r\\n-2 1 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-4 0 6\\r\\n-3 -6 6\\r\\n4 6 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n6 -5 1\\r\\n3 1 9\\r\\n-6 -6 9\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-5 -6 7\\r\\n-6 0 6\\r\\n-2 3 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -6 9\\r\\n6 -5 3\\r\\n-5 -1 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n2 -5 2\\r\\n-5 -6 3\\r\\n-2 -2 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -6 9\\r\\n6 -4 1\\r\\n-3 -2 8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -2 1\\r\\n-3 -1 1\\r\\n-2 1 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n5 -2 6\\r\\n-1 6 4\\r\\n2 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 1 2\\r\\n-6 -1 6\\r\\n6 4 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n0 4 4\\r\\n-6 -4 6\\r\\n-4 -2 4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n5 -6 6\\r\\n-3 0 4\\r\\n-4 6 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n2 4 4\\r\\n3 -6 4\\r\\n-4 -4 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n6 -3 6\\r\\n2 0 1\\r\\n-6 6 9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-6 6 9\\r\\n6 1 4\\r\\n2 0 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n0 -5 2\\r\\n-6 3 2\\r\\n-3 -1 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n5 -4 1\\r\\n3 -5 5\\r\\n-3 3 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n1 3 1\\r\\n2 -6 7\\r\\n-3 6 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-3 -4 2\\r\\n-6 -2 2\\r\\n0 0 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -2 7\\r\\n5 0 2\\r\\n2 4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-6 6 4\\r\\n-2 3 1\\r\\n-1 -3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-1 -5 2\\r\\n-6 -6 9\\r\\n4 4 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-5 3 6\\r\\n4 -3 2\\r\\n-2 -1 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-1 5 6\\r\\n-3 -4 5\\r\\n-6 -6 6\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-2 -5 3\\r\\n1 -1 2\\r\\n-3 4 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-6 -6 7\\r\\n1 4 2\\r\\n0 -5 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-5 3 5\\r\\n5 -2 6\\r\\n-3 4 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-2 0 2\\r\\n1 4 3\\r\\n-6 3 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-4 3 4\\r\\n0 0 1\\r\\n-5 -4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 5 4\\r\\n-6 -6 7\\r\\n1 6 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-6 -6 8\\r\\n5 6 8\\r\\n2 2 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n6 1 2\\r\\n-6 -6 7\\r\\n5 -1 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n1 6 4\\r\\n-3 -6 5\\r\\n4 2 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-5 5 4\\r\\n2 3 3\\r\\n-6 -6 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n-6 5 2\\r\\n-6 -1 4\\r\\n2 5 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n2 -2 5\\r\\n2 0 3\\r\\n2 -1 4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n4 -3 8\\r\\n3 -3 7\\r\\n-3 -3 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n2 0 2\\r\\n4 0 4\\r\\n0 -4 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-1 0 5\\r\\n5 0 5\\r\\n5 8 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n1 0 1\\r\\n-1 0 1\\r\\n0 1 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n2 0 2\\r\\n4 0 4\\r\\n0 -4 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n2 0 2\\r\\n4 0 4\\r\\n0 -4 3\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n2 0 2\\r\\n4 0 4\\r\\n0 -4 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n2 0 2\\r\\n4 0 4\\r\\n0 -4 8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-9 0 9\\r\\n-9 10 10\\r\\n9 4 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n-9 10 10\\r\\n9 4 10\\r\\n0 -2 6\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n9 5 10\\r\\n8 -2 9\\r\\n-9 -1 9\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n-4 -2 9\\r\\n8 4 9\\r\\n-10 10 10\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n1 8 2\\r\\n3 8 1\\r\\n3 -2 9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n0 0 1\\r\\n0 3 2\\r\\n4 0 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-3 0 5\\r\\n3 0 5\\r\\n0 0 4\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n4 1 5\\r\\n-4 1 5\\r\\n0 0 4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n0 0 1\\r\\n0 1 1\\r\\n0 2 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n0 0 5\\r\\n1 7 5\\r\\n7 7 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2\\r\\n0 0 2\\r\\n3 0 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3\\r\\n0 0 2\\r\\n1 0 1\\r\\n-1 0 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n-2 0 2\\r\\n2 0 2\\r\\n0 0 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n3 4 5\\r\\n-3 4 5\\r\\n0 -5 5\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n0 0 1\\r\\n1 0 1\\r\\n2 0 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3\\r\\n2 2 4\\r\\n8 2 4\\r\\n5 10 5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3\\r\\n0 0 5\\r\\n4 0 3\\r\\n8 0 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n0 0 1\\r\\n2 0 3\\r\\n-2 0 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n0 0 1\\r\\n2 0 1\\r\\n1 0 2\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3\\r\\n0 0 5\\r\\n8 0 5\\r\\n4 0 3\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3\\r\\n-10 0 2\\r\\n-8 2 2\\r\\n-4 -3 5\\r\\n\", \"output\": [\"7\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3\\r\\n-4 -5 7\\r\\n2 -3 6\\r\\n-2 0 1\\r\\n', 'output': ['5']}, {'input': '3\\r\\n-4 1 1\\r\\n-2 -6 7\\r\\n-6 -3 2\\r\\n', 'output': ['5']}, {'input': '3\\r\\n-6 -2 1\\r\\n-3 -1 1\\r\\n-2 1 4\\r\\n', 'output': ['4']}, {'input': '3\\r\\n-4 -5 4\\r\\n6 5 2\\r\\n-6 -6 7\\r\\n', 'output': ['4']}, {'input': '3\\r\\n2 2 4\\r\\n8 2 4\\r\\n5 10 5\\r\\n', 'output': ['8']}]","human_sample_testcases_2":"[{'input': '3\\r\\n0 0 1\\r\\n2 0 1\\r\\n4 0 1\\r\\n', 'output': ['4']}, {'input': '3\\r\\n0 0 2\\r\\n2 0 2\\r\\n1 1 2\\r\\n', 'output': ['8']}, {'input': '3\\r\\n1 3 1\\r\\n2 -6 7\\r\\n-3 6 6\\r\\n', 'output': ['4']}, {'input': '3\\r\\n1 -1 2\\r\\n-6 -3 10\\r\\n-1 3 1\\r\\n', 'output': ['4']}, {'input': '3\\r\\n-4 -2 9\\r\\n8 4 9\\r\\n-10 10 10\\r\\n', 'output': ['8']}]","human_sample_testcases_3":"[{'input': '3\\r\\n0 0 2\\r\\n1 0 1\\r\\n-1 0 1\\r\\n', 'output': ['5']}, {'input': '3\\r\\n0 0 6\\r\\n-4 -3 1\\r\\n-3 4 1\\r\\n', 'output': ['4']}, {'input': '3\\r\\n3 -2 7\\r\\n-1 2 5\\r\\n-4 1 3\\r\\n', 'output': ['7']}, {'input': '3\\r\\n-6 -6 9\\r\\n4 -3 4\\r\\n-3 -1 1\\r\\n', 'output': ['5']}, {'input': '3\\r\\n-4 3 4\\r\\n0 0 1\\r\\n-5 -4 3\\r\\n', 'output': ['4']}]","human_sample_testcases_4":"[{'input': '3\\r\\n1 8 2\\r\\n3 8 1\\r\\n3 -2 9\\r\\n', 'output': ['7']}, {'input': '3\\r\\n0 0 2\\r\\n2 0 2\\r\\n1 1 2\\r\\n', 'output': ['8']}, {'input': '3\\r\\n-5 3 6\\r\\n4 -3 2\\r\\n-2 -1 1\\r\\n', 'output': ['4']}, {'input': '3\\r\\n5 -4 1\\r\\n3 -5 5\\r\\n-3 3 5\\r\\n', 'output': ['4']}, {'input': '3\\r\\n-1 0 5\\r\\n-2 1 5\\r\\n-5 4 7\\r\\n', 'output': ['6']}]","human_sample_testcases_5":"[{'input': '3\\r\\n-4 3 4\\r\\n0 0 1\\r\\n-5 -4 3\\r\\n', 'output': ['4']}, {'input': '3\\r\\n0 4 4\\r\\n-6 -4 6\\r\\n-4 -2 4\\r\\n', 'output': ['7']}, {'input': '3\\r\\n-1 5 6\\r\\n-3 -4 5\\r\\n-6 -6 6\\r\\n', 'output': ['6']}, {'input': '3\\r\\n-2 -5 4\\r\\n-5 -1 5\\r\\n-6 -2 9\\r\\n', 'output': ['5']}, {'input': '3\\r\\n-2 0 2\\r\\n2 0 2\\r\\n0 0 4\\r\\n', 'output': ['5']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":76.47,"human_sample_line_coverage_2":72.94,"human_sample_line_coverage_3":77.65,"human_sample_line_coverage_4":80.0,"human_sample_line_coverage_5":74.12,"human_sample_branch_coverage_1":68.52,"human_sample_branch_coverage_2":62.96,"human_sample_branch_coverage_3":68.52,"human_sample_branch_coverage_4":72.22,"human_sample_branch_coverage_5":66.67,"id":380,"human_sample_pass_rate":100.0,"human_sample_line_coverage":76.236,"human_sample_branch_coverage":67.778} {"sample_inputs":"[\"10 5\", \"6 12\", \"5 13\"]","input_specification":"The single line contains numbers n and x (1\u2009\u2264\u2009n\u2009\u2264\u2009105, 1\u2009\u2264\u2009x\u2009\u2264\u2009109) \u2014 the size of the table and the number that we are looking for in the table.","src_uid":"c4b139eadca94201596f1305b2f76496","source_code":"n, x = map(int, input().split())\ncount = 0\ni = 1\nwhile i * i <= x:\n if x % i == 0 and i <= n and x \/\/ i <= n:\n if i != x \/\/ i:\n count += 2\n else:\n count += 1\n i += 1\nprint(count)","sample_outputs":"[\"2\", \"4\", \"0\"]","lang_cluster":"Python","notes":"NoteA table for the second sample test is given below. The occurrences of number 12 are marked bold. ","output_specification":"Print a single number: the number of times x occurs in the table.","description":"Let's consider a table consisting of n rows and n columns. The cell located at the intersection of i-th row and j-th column contains number i\u2009\u00d7\u2009j. The rows and columns are numbered starting from 1.You are given a positive integer x. Your task is to count the number of cells in a table that contain number x.","human_testcases":"[{\"input\": \"10 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 12\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100000 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000 1000000000\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"100000 362880\\r\\n\", \"output\": [\"154\"]}, {\"input\": \"1 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9 12\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10 123\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"9551 975275379\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"17286 948615687\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"58942 936593001\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50000 989460910\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"22741 989460910\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"22740 989460910\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000 989460910\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"100000 98280\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"100000 997920\\r\\n\", \"output\": [\"222\"]}, {\"input\": \"100000 720720\\r\\n\", \"output\": [\"226\"]}, {\"input\": \"100000 2162160\\r\\n\", \"output\": [\"282\"]}, {\"input\": \"100000 4324320\\r\\n\", \"output\": [\"320\"]}, {\"input\": \"100000 8648640\\r\\n\", \"output\": [\"348\"]}, {\"input\": \"100000 183783600\\r\\n\", \"output\": [\"438\"]}, {\"input\": \"100000 551350800\\r\\n\", \"output\": [\"392\"]}, {\"input\": \"40000 551350800\\r\\n\", \"output\": [\"150\"]}, {\"input\": \"20000 400000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"19999 400000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"19999 399960001\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31621 999887641\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31622 999887641\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"31620 999887641\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100000 999887641\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100000 25\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"100000 3628800\\r\\n\", \"output\": [\"220\"]}, {\"input\": \"100000 39916800\\r\\n\", \"output\": [\"328\"]}, {\"input\": \"100000 479001600\\r\\n\", \"output\": [\"254\"]}, {\"input\": \"4 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 100\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 4\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"89874 1\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '58942 936593001\\r\\n', 'output': ['0']}, {'input': '6 12\\r\\n', 'output': ['4']}, {'input': '22740 989460910\\r\\n', 'output': ['0']}, {'input': '100000 479001600\\r\\n', 'output': ['254']}, {'input': '100000 362880\\r\\n', 'output': ['154']}]","human_sample_testcases_2":"[{'input': '31621 999887641\\r\\n', 'output': ['1']}, {'input': '22741 989460910\\r\\n', 'output': ['0']}, {'input': '10 3\\r\\n', 'output': ['2']}, {'input': '100000 25\\r\\n', 'output': ['3']}, {'input': '5 13\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '58942 936593001\\r\\n', 'output': ['0']}, {'input': '20 100\\r\\n', 'output': ['3']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '100000 989460910\\r\\n', 'output': ['4']}, {'input': '19999 399960001\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '20000 400000000\\r\\n', 'output': ['1']}, {'input': '2 4\\r\\n', 'output': ['1']}, {'input': '10 3\\r\\n', 'output': ['2']}, {'input': '100000 183783600\\r\\n', 'output': ['438']}, {'input': '22740 989460910\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '19999 399960001\\r\\n', 'output': ['1']}, {'input': '100000 999887641\\r\\n', 'output': ['3']}, {'input': '1 1\\r\\n', 'output': ['1']}, {'input': '100000 551350800\\r\\n', 'output': ['392']}, {'input': '50000 989460910\\r\\n', 'output': ['4']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":90.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":381,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.0,"human_sample_branch_coverage":96.666} {"sample_inputs":"[\"5 2\", \"8 1\"]","input_specification":"The only line of the input contains two integers n and m (1\u2009\u2264\u2009n,\u2009m\u2009\u2264\u20091018)\u00a0\u2014 the capacity of the barn and the number of grains that are brought every day.","src_uid":"3b585ea852ffc41034ef6804b6aebbd8","source_code":"(n, m) = map(int, input().split())\nif n <= m:\n\tprint(n)\nelse:\n\taM = m\n\tn -= m\n\t(l, r) = (0, int(2e9))\n\twhile l < r:\n\t\tm = (l + r) \/\/ 2;\n\t\tval = m * (m+1) \/\/ 2;\n\t\tif val >= n:\n\t\t\tr = m\n\t\telse:\n\t\t\tl = m+1\n\tprint(l + aM)","sample_outputs":"[\"4\", \"5\"]","lang_cluster":"Python","notes":"NoteIn the first sample the capacity of the barn is five grains and two grains are brought every day. The following happens: At the beginning of the first day grain is brought to the barn. It's full, so nothing happens. At the end of the first day one sparrow comes and eats one grain, so 5\u2009-\u20091\u2009=\u20094 grains remain. At the beginning of the second day two grains are brought. The barn becomes full and one grain doesn't fit to it. At the end of the second day two sparrows come. 5\u2009-\u20092\u2009=\u20093 grains remain. At the beginning of the third day two grains are brought. The barn becomes full again. At the end of the third day three sparrows come and eat grain. 5\u2009-\u20093\u2009=\u20092 grains remain. At the beginning of the fourth day grain is brought again. 2\u2009+\u20092\u2009=\u20094 grains remain. At the end of the fourth day four sparrows come and eat grain. 4\u2009-\u20094\u2009=\u20090 grains remain. The barn is empty. So the answer is 4, because by the end of the fourth day the barn becomes empty.","output_specification":"Output one integer\u00a0\u2014 the number of the day when the barn will become empty for the first time. Days are numbered starting with one.","description":"Anton likes to listen to fairy tales, especially when Danik, Anton's best friend, tells them. Right now Danik tells Anton a fairy tale:\"Once upon a time, there lived an emperor. He was very rich and had much grain. One day he ordered to build a huge barn to put there all his grain. Best builders were building that barn for three days and three nights. But they overlooked and there remained a little hole in the barn, from which every day sparrows came through. Here flew a sparrow, took a grain and flew away...\"More formally, the following takes place in the fairy tale. At the beginning of the first day the barn with the capacity of n grains was full. Then, every day (starting with the first day) the following happens: m grains are brought to the barn. If m grains doesn't fit to the barn, the barn becomes full and the grains that doesn't fit are brought back (in this problem we can assume that the grains that doesn't fit to the barn are not taken into account). Sparrows come and eat grain. In the i-th day i sparrows come, that is on the first day one sparrow come, on the second day two sparrows come and so on. Every sparrow eats one grain. If the barn is empty, a sparrow eats nothing. Anton is tired of listening how Danik describes every sparrow that eats grain from the barn. Anton doesn't know when the fairy tale ends, so he asked you to determine, by the end of which day the barn will become empty for the first time. Help Anton and write a program that will determine the number of that day!","human_testcases":"[{\"input\": \"5 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"8 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"32 5\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"1024 1024\\r\\n\", \"output\": [\"1024\"]}, {\"input\": \"58044 52909\\r\\n\", \"output\": [\"53010\"]}, {\"input\": \"996478063 658866858\\r\\n\", \"output\": [\"658892843\"]}, {\"input\": \"570441179141911871 511467058318039545\\r\\n\", \"output\": [\"511467058661475480\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000000000000\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"1000000000000000000 999999999999997145\\r\\n\", \"output\": [\"999999999999997221\"]}, {\"input\": \"1 1000000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1\\r\\n\", \"output\": [\"1414213563\"]}, {\"input\": \"999999998765257149 10\\r\\n\", \"output\": [\"1414213571\"]}, {\"input\": \"999999998765257150 10\\r\\n\", \"output\": [\"1414213571\"]}, {\"input\": \"999999998765257151 10\\r\\n\", \"output\": [\"1414213571\"]}, {\"input\": \"999999998765257152 10\\r\\n\", \"output\": [\"1414213572\"]}, {\"input\": \"999999998765257153 10\\r\\n\", \"output\": [\"1414213572\"]}, {\"input\": \"762078938126917521 107528\\r\\n\", \"output\": [\"1234675418\"]}, {\"input\": \"762078938126917522 107528\\r\\n\", \"output\": [\"1234675418\"]}, {\"input\": \"762078938126917523 107528\\r\\n\", \"output\": [\"1234675418\"]}, {\"input\": \"762078938126917524 107528\\r\\n\", \"output\": [\"1234675419\"]}, {\"input\": \"762078938126917525 107528\\r\\n\", \"output\": [\"1234675419\"]}, {\"input\": \"443233170968441395 1048576\\r\\n\", \"output\": [\"942571991\"]}, {\"input\": \"443233170968441396 1048576\\r\\n\", \"output\": [\"942571991\"]}, {\"input\": \"443233170968441397 1048576\\r\\n\", \"output\": [\"942571992\"]}, {\"input\": \"1833551251625340 1359260576251\\r\\n\", \"output\": [\"1359321110406\"]}, {\"input\": \"1835002539467264 2810548418174\\r\\n\", \"output\": [\"2810608952329\"]}, {\"input\": \"1840276176082280 8084185033189\\r\\n\", \"output\": [\"8084245567345\"]}, {\"input\": \"262133107905 256256256256\\r\\n\", \"output\": [\"256256364670\"]}, {\"input\": \"262133108160 256256256256\\r\\n\", \"output\": [\"256256364670\"]}, {\"input\": \"262133108161 256256256256\\r\\n\", \"output\": [\"256256364670\"]}, {\"input\": \"262133108162 256256256256\\r\\n\", \"output\": [\"256256364671\"]}, {\"input\": \"399823373917798976 326385530977846185\\r\\n\", \"output\": [\"326385531361089823\"]}, {\"input\": \"836052329491347820 327211774155929609\\r\\n\", \"output\": [\"327211775164731428\"]}, {\"input\": \"870979176282270170 16\\r\\n\", \"output\": [\"1319832715\"]}, {\"input\": \"930580173005562081 4\\r\\n\", \"output\": [\"1364243511\"]}, {\"input\": \"831613653237860272 154\\r\\n\", \"output\": [\"1289661856\"]}, {\"input\": \"867842613106376421 178\\r\\n\", \"output\": [\"1317454248\"]}, {\"input\": \"939156247712499033 1902\\r\\n\", \"output\": [\"1370517314\"]}, {\"input\": \"975385203286047886 1326\\r\\n\", \"output\": [\"1396701153\"]}, {\"input\": \"953065701826839766 4023\\r\\n\", \"output\": [\"1380631201\"]}, {\"input\": \"989294657400388618 7447\\r\\n\", \"output\": [\"1406630820\"]}, {\"input\": \"885695753008586140 42775\\r\\n\", \"output\": [\"1330979102\"]}, {\"input\": \"921924708582134992 158903\\r\\n\", \"output\": [\"1358043072\"]}, {\"input\": \"802352815201515314 183504\\r\\n\", \"output\": [\"1266953266\"]}, {\"input\": \"861953807629839929 1299632\\r\\n\", \"output\": [\"1314276256\"]}, {\"input\": \"925155772916259712 1929889\\r\\n\", \"output\": [\"1362191462\"]}, {\"input\": \"961384732784775860 5046017\\r\\n\", \"output\": [\"1391685648\"]}, {\"input\": \"910494856396204496 39891744\\r\\n\", \"output\": [\"1389332262\"]}, {\"input\": \"946723811969753348 17975168\\r\\n\", \"output\": [\"1394001194\"]}, {\"input\": \"992316381103677158 1849603453\\r\\n\", \"output\": [\"3258373398\"]}, {\"input\": \"828545340972193305 1027686877\\r\\n\", \"output\": [\"2314967219\"]}, {\"input\": \"946697532222325132 16179805162\\r\\n\", \"output\": [\"17555812078\"]}, {\"input\": \"982926487795873985 19357888587\\r\\n\", \"output\": [\"20759977363\"]}, {\"input\": \"892753091050063317 2037020896\\r\\n\", \"output\": [\"3373249237\"]}, {\"input\": \"928982046623612170 45215104320\\r\\n\", \"output\": [\"46578175853\"]}, {\"input\": \"845950022554437217 1553155668877\\r\\n\", \"output\": [\"1554456398264\"]}, {\"input\": \"882178982422953366 1792038785005\\r\\n\", \"output\": [\"1793367075026\"]}, {\"input\": \"847407611288100389 9111983407070\\r\\n\", \"output\": [\"9113285250762\"]}, {\"input\": \"883636566861649242 15350866523198\\r\\n\", \"output\": [\"15352195899906\"]}, {\"input\": \"988545172809612094 126043487780965\\r\\n\", \"output\": [\"126044893781768\"]}, {\"input\": \"824774128383160945 152286665864389\\r\\n\", \"output\": [\"152287950093217\"]}, {\"input\": \"889067279135046636 783632221444127\\r\\n\", \"output\": [\"783633554323452\"]}, {\"input\": \"925296230413628192 1609871104560255\\r\\n\", \"output\": [\"1609872463741155\"]}, {\"input\": \"892888041747308306 15921193742955831\\r\\n\", \"output\": [\"15921195067317449\"]}, {\"input\": \"929116997320857159 16747432626071959\\r\\n\", \"output\": [\"16747433976901012\"]}, {\"input\": \"810365749050428005 176443295773423092\\r\\n\", \"output\": [\"176443296899409285\"]}, {\"input\": \"846594708918944153 177269538951506516\\r\\n\", \"output\": [\"177269540108507095\"]}, {\"input\": \"2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 2\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"256 20\\r\\n\", \"output\": [\"42\"]}, {\"input\": \"78520 8\\r\\n\", \"output\": [\"404\"]}, {\"input\": \"1367064836 777314907868410435\\r\\n\", \"output\": [\"1367064836\"]}, {\"input\": \"658866858 996478063\\r\\n\", \"output\": [\"658866858\"]}, {\"input\": \"10 648271718824741275\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"326385530977846185 399823373917798976\\r\\n\", \"output\": [\"326385530977846185\"]}, {\"input\": \"327211774155929609 836052329491347820\\r\\n\", \"output\": [\"327211774155929609\"]}, {\"input\": \"2570 566042149577952145\\r\\n\", \"output\": [\"2570\"]}, {\"input\": \"512486308421983105 512486308421983105\\r\\n\", \"output\": [\"512486308421983105\"]}, {\"input\": \"262144 262144\\r\\n\", \"output\": [\"262144\"]}, {\"input\": \"314159265358979323 314159265358979323\\r\\n\", \"output\": [\"314159265358979323\"]}, {\"input\": \"16 5\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"29 16\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"24 14\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"28 18\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"8 11\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"500000000500004239 4242\\r\\n\", \"output\": [\"1000004242\"]}, {\"input\": \"500000000500004240 4242\\r\\n\", \"output\": [\"1000004242\"]}, {\"input\": \"500000000500004241 4242\\r\\n\", \"output\": [\"1000004242\"]}, {\"input\": \"500000000500004242 4242\\r\\n\", \"output\": [\"1000004242\"]}, {\"input\": \"500000000500004243 4242\\r\\n\", \"output\": [\"1000004243\"]}, {\"input\": \"500000000500004244 4242\\r\\n\", \"output\": [\"1000004243\"]}, {\"input\": \"500000000500004245 4242\\r\\n\", \"output\": [\"1000004243\"]}, {\"input\": \"163162808800191208 163162808800191206\\r\\n\", \"output\": [\"163162808800191208\"]}, {\"input\": \"328584130811799021 328584130811799020\\r\\n\", \"output\": [\"328584130811799021\"]}, {\"input\": \"89633000579612779 89633000579612778\\r\\n\", \"output\": [\"89633000579612779\"]}, {\"input\": \"924211674273037668 924211674273037666\\r\\n\", \"output\": [\"924211674273037668\"]}, {\"input\": \"758790352261429854 758790352261429851\\r\\n\", \"output\": [\"758790352261429853\"]}, {\"input\": \"39154349371830603 39154349371830597\\r\\n\", \"output\": [\"39154349371830600\"]}, {\"input\": \"313727604417502165 313727604417502155\\r\\n\", \"output\": [\"313727604417502159\"]}, {\"input\": \"1000000000000000000 999999999999999999\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"1000000000000000000 999999999999999998\\r\\n\", \"output\": [\"1000000000000000000\"]}, {\"input\": \"1000000000000000000 999999999999999997\\r\\n\", \"output\": [\"999999999999999999\"]}, {\"input\": \"1000000000000000000 999999999999999996\\r\\n\", \"output\": [\"999999999999999999\"]}, {\"input\": \"1000000000000000000 999999999999999995\\r\\n\", \"output\": [\"999999999999999998\"]}, {\"input\": \"1 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 9\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1000000000000000000 2\\r\\n\", \"output\": [\"1414213564\"]}, {\"input\": \"1 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 15\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"12 1\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1000000000000000000 100000000000000000\\r\\n\", \"output\": [\"100000001341640786\"]}, {\"input\": \"100 200\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"1 1000000000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"100000000000000000 1\\r\\n\", \"output\": [\"447213596\"]}, {\"input\": \"1000000000000000000 1000000000000000\\r\\n\", \"output\": [\"1000001413506279\"]}, {\"input\": \"1 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 4\\r\\n\", \"output\": [\"1414213566\"]}, {\"input\": \"1000000000000 10000000000000\\r\\n\", \"output\": [\"1000000000000\"]}, {\"input\": \"1 100000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 7\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10 11\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 100\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"5 16\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 10\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10836 16097\\r\\n\", \"output\": [\"10836\"]}, {\"input\": \"16808 75250\\r\\n\", \"output\": [\"16808\"]}, {\"input\": \"900000000000169293 1\\r\\n\", \"output\": [\"1341640788\"]}, {\"input\": \"1 10000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 100\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 20\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"10 10000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4 5\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 5\\r\\n\", \"output\": [\"1414213567\"]}, {\"input\": \"2 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 6\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"999999998765257147 1\\r\\n\", \"output\": [\"1414213563\"]}, {\"input\": \"3 10\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"997270248313594436 707405570208615798\\r\\n\", \"output\": [\"707405570970015402\"]}, {\"input\": \"1 100000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 1000000\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"16808 282475250\\r\\n\", \"output\": [\"16808\"]}, {\"input\": \"1000000007 100000000000007\\r\\n\", \"output\": [\"1000000007\"]}, {\"input\": \"1 1000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000 10000000000000000\\r\\n\", \"output\": [\"1000000000000000\"]}, {\"input\": \"1000000000000000000 100\\r\\n\", \"output\": [\"1414213662\"]}, {\"input\": \"1000000000000000000 9\\r\\n\", \"output\": [\"1414213571\"]}, {\"input\": \"900000000000169293 171\\r\\n\", \"output\": [\"1341640957\"]}, {\"input\": \"1 999999999999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10000 10000000000000\\r\\n\", \"output\": [\"10000\"]}, {\"input\": \"1 9999999999999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"695968090125646936 429718492544794353\\r\\n\", \"output\": [\"429718493274519777\"]}, {\"input\": \"2 5000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 100\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"2 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999999999999 1\\r\\n\", \"output\": [\"1414213563\"]}, {\"input\": \"5 8\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000000000 99999999999999999\\r\\n\", \"output\": [\"100000001341640785\"]}, {\"input\": \"100000000000000000 100000000000000000\\r\\n\", \"output\": [\"100000000000000000\"]}, {\"input\": \"5 6\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000000000 1000000000\\r\\n\", \"output\": [\"2414213562\"]}, {\"input\": \"1 10000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"22 11\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"10 10000000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3 8\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"10 123123\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"3 5\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000000000000000 10\\r\\n\", \"output\": [\"1414213572\"]}, {\"input\": \"10000000000000 45687987897897\\r\\n\", \"output\": [\"10000000000000\"]}, {\"input\": \"5 4\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5000 123456789\\r\\n\", \"output\": [\"5000\"]}, {\"input\": \"7 100\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000000000000000000 500000000000\\r\\n\", \"output\": [\"501414213209\"]}, {\"input\": \"8 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 10000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 15\\r\\n\", \"output\": [\"1414213577\"]}, {\"input\": \"1 123456789\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 1000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 11\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 1000000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 499999999999999999\\r\\n\", \"output\": [\"500000000999999999\"]}, {\"input\": \"1 100000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"619768314833382029 108339531052386197\\r\\n\", \"output\": [\"108339532063750408\"]}, {\"input\": \"5 100\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"2 10000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000000000000 500000000000000000\\r\\n\", \"output\": [\"500000001000000000\"]}, {\"input\": \"143 3\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"2 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100 1000000000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2 100000000000000000\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"100000000000000000 1000000000000000000\\r\\n\", \"output\": [\"100000000000000000\"]}, {\"input\": \"999999999999999999 123456789\\r\\n\", \"output\": [\"1537670351\"]}, {\"input\": \"1 99999\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 9999999999\\r\\n\", \"output\": [\"11414213554\"]}, {\"input\": \"5 100000000000000000\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6 999999\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"100 10000000\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"4 100\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"1000000000 1000000000000000\\r\\n\", \"output\": [\"1000000000\"]}, {\"input\": \"10 100000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"5 15555555\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 155555\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"200 9999999999\\r\\n\", \"output\": [\"200\"]}, {\"input\": \"3 200\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1000000000000000000 490000000000000000\\r\\n\", \"output\": [\"490000001009950494\"]}, {\"input\": \"2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 15555\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"5 7\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"10040 200000\\r\\n\", \"output\": [\"10040\"]}, {\"input\": \"1000000000000000000 60000000000000000\\r\\n\", \"output\": [\"60000001371130920\"]}, {\"input\": \"10 1000000000000\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"1 45\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '762078938126917523 107528\\r\\n', 'output': ['1234675418']}, {'input': '200 9999999999\\r\\n', 'output': ['200']}, {'input': '882178982422953366 1792038785005\\r\\n', 'output': ['1793367075026']}, {'input': '10836 16097\\r\\n', 'output': ['10836']}, {'input': '262133108160 256256256256\\r\\n', 'output': ['256256364670']}]","human_sample_testcases_2":"[{'input': '831613653237860272 154\\r\\n', 'output': ['1289661856']}, {'input': '5000 123456789\\r\\n', 'output': ['5000']}, {'input': '1 100000000\\r\\n', 'output': ['1']}, {'input': '762078938126917525 107528\\r\\n', 'output': ['1234675419']}, {'input': '861953807629839929 1299632\\r\\n', 'output': ['1314276256']}]","human_sample_testcases_3":"[{'input': '2 1000\\r\\n', 'output': ['2']}, {'input': '1000000000000000000 2\\r\\n', 'output': ['1414213564']}, {'input': '762078938126917525 107528\\r\\n', 'output': ['1234675419']}, {'input': '1 99999\\r\\n', 'output': ['1']}, {'input': '982926487795873985 19357888587\\r\\n', 'output': ['20759977363']}]","human_sample_testcases_4":"[{'input': '262133108160 256256256256\\r\\n', 'output': ['256256364670']}, {'input': '999999999999999999 123456789\\r\\n', 'output': ['1537670351']}, {'input': '163162808800191208 163162808800191206\\r\\n', 'output': ['163162808800191208']}, {'input': '4 6\\r\\n', 'output': ['4']}, {'input': '5 16\\r\\n', 'output': ['5']}]","human_sample_testcases_5":"[{'input': '1 100000000000\\r\\n', 'output': ['1']}, {'input': '500000000500004240 4242\\r\\n', 'output': ['1000004242']}, {'input': '100000000000000000 1000000000000000000\\r\\n', 'output': ['100000000000000000']}, {'input': '10 10000000\\r\\n', 'output': ['10']}, {'input': '992316381103677158 1849603453\\r\\n', 'output': ['3258373398']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":382,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 9\", \"38 11\", \"5 2\", \"5 10\"]","input_specification":"The only line of the input contains two integers $$$n$$$ and $$$b$$$ ($$$1 \\le n \\le 10^{18}$$$, $$$2 \\le b \\le 10^{12}$$$).","src_uid":"491748694c1a53771be69c212a5e0e25","source_code":"# Python3 code to find largest prime \n# factor of number \nfrom collections import Counter\nimport math \n \n# A function to print all prime factors of \n# a given number n \ndef primeFactors(n): \n \n # Print the number of two's that divide n\n list=[]\n while n % 2 == 0: \n \n list.append(2)\n n = n \/ 2\n \n # n must be odd at this point \n # so a skip of 2 ( i = i + 2) can be used \n for i in range(3,int(math.sqrt(n))+1,2): \n \n # while i divides n , print i ad divide n \n while n % i== 0: \n \n list.append(i)\n n = n \/ i \n \n # Condition if n is a prime \n # number greater than 2 \n if n > 2: \n \n list.append(n)\n return list\n\n \n \n#write your main here\n#find the count of maximum factor in the b\nn,b=map(int,input().split())\n\nm_fact=primeFactors(b)\n#counter = Counter(m_fact)\n#print(counter)\nll=[]\n#print(m_fact)\nfor fact in m_fact:\n #print(fact)\n div=0\n bb=b\n while (bb%fact)==0:\n div+=1\n bb=int(bb\/\/fact)\n #print(div)\n #print(div)\n\n t_count=int(0)\n num=n\n #print(num)\n while num>=fact:\n t_count+=int(num\/\/fact)\n num=(num\/\/fact)\n #print(num)\n #print(t_count)\n\n ll.append(t_count\/\/div)\n #print(ll)\nprint(min(ll))","sample_outputs":"[\"1\", \"3\", \"3\", \"1\"]","lang_cluster":"Python","notes":"NoteIn the first example, $$$6!_{(10)} = 720_{(10)} = 880_{(9)}$$$.In the third and fourth example, $$$5!_{(10)} = 120_{(10)} = 1111000_{(2)}$$$.The representation of the number $$$x$$$ in the $$$b$$$-ary base is $$$d_1, d_2, \\ldots, d_k$$$ if $$$x = d_1 b^{k - 1} + d_2 b^{k - 2} + \\ldots + d_k b^0$$$, where $$$d_i$$$ are integers and $$$0 \\le d_i \\le b - 1$$$. For example, the number $$$720$$$ from the first example is represented as $$$880_{(9)}$$$ since $$$720 = 8 \\cdot 9^2 + 8 \\cdot 9 + 0 \\cdot 1$$$.You can read more about bases here.","output_specification":"Print an only integer\u00a0\u2014 the number of trailing zero digits in the $$$b$$$-ary representation of $$$n!$$$","description":" The number \"zero\" is called \"love\" (or \"l'oeuf\" to be precise, literally means \"egg\" in French), for example when denoting the zero score in a game of tennis. Aki is fond of numbers, especially those with trailing zeros. For example, the number $$$9200$$$ has two trailing zeros. Aki thinks the more trailing zero digits a number has, the prettier it is.However, Aki believes, that the number of trailing zeros of a number is not static, but depends on the base (radix) it is represented in. Thus, he considers a few scenarios with some numbers and bases. And now, since the numbers he used become quite bizarre, he asks you to help him to calculate the beauty of these numbers.Given two integers $$$n$$$ and $$$b$$$ (in decimal notation), your task is to calculate the number of trailing zero digits in the $$$b$$$-ary (in the base\/radix of $$$b$$$) representation of $$$n\\,!$$$ (factorial of $$$n$$$). ","human_testcases":"[{\"input\": \"6 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"38 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000000000 1000000000000\\r\\n\", \"output\": [\"20833333333333332\"]}, {\"input\": \"1000000000000000000 999999999989\\r\\n\", \"output\": [\"1000000\"]}, {\"input\": \"1000000000000000000 97\\r\\n\", \"output\": [\"10416666666666661\"]}, {\"input\": \"62 45\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"25 48\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"594703138034372316 960179812013\\r\\n\", \"output\": [\"19200359\"]}, {\"input\": \"1 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 10080\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 10080\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"57 10080\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"9 10080\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"14 10080\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1000000000000000000 2\\r\\n\", \"output\": [\"999999999999999976\"]}, {\"input\": \"1000000000000000000 7\\r\\n\", \"output\": [\"166666666666666656\"]}, {\"input\": \"1000000000000000000 285311670611\\r\\n\", \"output\": [\"9090909090909090\"]}, {\"input\": \"1000000000000000000 322687697779\\r\\n\", \"output\": [\"6172839506172838\"]}, {\"input\": \"1000000000000000000 470184984576\\r\\n\", \"output\": [\"33333333333333332\"]}, {\"input\": \"1000000000000000000 743008370688\\r\\n\", \"output\": [\"45454545454545452\"]}, {\"input\": \"1000000000000000000 64339296875\\r\\n\", \"output\": [\"23809523809523808\"]}, {\"input\": \"1000000000000000000 200560490130\\r\\n\", \"output\": [\"33333333333333329\"]}, {\"input\": \"36 118587876497\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"36 322687697779\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"36 110075314176\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"36 656100000000\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4294967296 999999999989\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4294967296 999999999958\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"13 373621248000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"12 720\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"12 576\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 13\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 193773\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 398273\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"72 30\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"72 2\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"72 193773\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"72 398273\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"72 250880942892\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"72 999999998141\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"912222 193773\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"912222 398273\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"912222 250880942892\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"912222 999999998141\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"83143260522 193773\\r\\n\", \"output\": [\"1287245\"]}, {\"input\": \"83143260522 398273\\r\\n\", \"output\": [\"208759\"]}, {\"input\": \"83143260522 250880942892\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"83143260522 999999998141\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"822981260158260522 250880942892\\r\\n\", \"output\": [\"39364389\"]}, {\"input\": \"222981260158260518 850874549779\\r\\n\", \"output\": [\"15271097091\"]}, {\"input\": \"222981260158260518 999999998141\\r\\n\", \"output\": [\"222981\"]}, {\"input\": \"445422409459676274 999922001521\\r\\n\", \"output\": [\"222720113534\"]}, {\"input\": \"918586219753393663 999800009711\\r\\n\", \"output\": [\"918663387476\"]}, {\"input\": \"446248652637759698 972358665643\\r\\n\", \"output\": [\"15016106488920\"]}, {\"input\": \"237201990843960076 973532640023\\r\\n\", \"output\": [\"11953335559561\"]}, {\"input\": \"484242296072308881 978253641619\\r\\n\", \"output\": [\"48677351836781\"]}, {\"input\": \"447074895815843122 911125611841\\r\\n\", \"output\": [\"114517135198729\"]}, {\"input\": \"455817757639559194 970322544187\\r\\n\", \"output\": [\"153473992471231\"]}, {\"input\": \"238028234022043500 877592366401\\r\\n\", \"output\": [\"121195638504094\"]}, {\"input\": \"720471251645857727 800266614341\\r\\n\", \"output\": [\"380798758798020\"]}, {\"input\": \"883457908461157525 863363187787\\r\\n\", \"output\": [\"887005932189914\"]}, {\"input\": \"945422409459676266 962504231329\\r\\n\", \"output\": [\"481831307722\"]}, {\"input\": \"818586219753393638 868390924421\\r\\n\", \"output\": [\"878145564521\"]}, {\"input\": \"946248652637759690 834034807997\\r\\n\", \"output\": [\"33512135310870\"]}, {\"input\": \"937201990843960062 788432964607\\r\\n\", \"output\": [\"49755892484813\"]}, {\"input\": \"984242296072308866 826202217433\\r\\n\", \"output\": [\"99923075743380\"]}, {\"input\": \"947074895815843114 12897917761\\r\\n\", \"output\": [\"704668821291548\"]}, {\"input\": \"855817757639559189 261563075383\\r\\n\", \"output\": [\"310754450849512\"]}, {\"input\": \"938028234022043486 6255386281\\r\\n\", \"output\": [\"825729079244755\"]}, {\"input\": \"820471251645857717 184820096819\\r\\n\", \"output\": [\"539783718188063\"]}, {\"input\": \"883457908461157497 102269364647\\r\\n\", \"output\": [\"962372449304090\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '83143260522 250880942892\\r\\n', 'output': ['3']}, {'input': '7 10080\\r\\n', 'output': ['0']}, {'input': '72 30\\r\\n', 'output': ['16']}, {'input': '83143260522 999999998141\\r\\n', 'output': ['0']}, {'input': '946248652637759690 834034807997\\r\\n', 'output': ['33512135310870']}]","human_sample_testcases_2":"[{'input': '83143260522 193773\\r\\n', 'output': ['1287245']}, {'input': '72 193773\\r\\n', 'output': ['0']}, {'input': '4294967296 999999999958\\r\\n', 'output': ['0']}, {'input': '1 2\\r\\n', 'output': ['0']}, {'input': '4294967296 999999999989\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '1000000000000000000 1000000000000\\r\\n', 'output': ['20833333333333332']}, {'input': '13 373621248000\\r\\n', 'output': ['0']}, {'input': '912222 398273\\r\\n', 'output': ['2']}, {'input': '445422409459676274 999922001521\\r\\n', 'output': ['222720113534']}, {'input': '883457908461157525 863363187787\\r\\n', 'output': ['887005932189914']}]","human_sample_testcases_4":"[{'input': '446248652637759698 972358665643\\r\\n', 'output': ['15016106488920']}, {'input': '237201990843960076 973532640023\\r\\n', 'output': ['11953335559561']}, {'input': '62 45\\r\\n', 'output': ['14']}, {'input': '984242296072308866 826202217433\\r\\n', 'output': ['99923075743380']}, {'input': '38 11\\r\\n', 'output': ['3']}]","human_sample_testcases_5":"[{'input': '720471251645857727 800266614341\\r\\n', 'output': ['380798758798020']}, {'input': '36 110075314176\\r\\n', 'output': ['1']}, {'input': '83143260522 193773\\r\\n', 'output': ['1287245']}, {'input': '947074895815843114 12897917761\\r\\n', 'output': ['704668821291548']}, {'input': '6 13\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":93.33,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":92.86,"human_sample_branch_coverage_5":100.0,"id":383,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.666,"human_sample_branch_coverage":98.572} {"sample_inputs":"[\"4 6\\n10 12 10 7 5 22\"]","input_specification":"The first line contains space-separated integers n and m (2\u2009\u2264\u2009n\u2009\u2264\u2009m\u2009\u2264\u200950). The second line contains m space-separated integers f1,\u2009f2,\u2009...,\u2009fm (4\u2009\u2264\u2009fi\u2009\u2264\u20091000) \u2014 the quantities of pieces in the puzzles sold in the shop.","src_uid":"7830aabb0663e645d54004063746e47f","source_code":"n,m = input().split()\nm=int(m)\nn=int(n)\narr = sorted(map(int,input().split()))\nmini=999999999\nfor j in range(m-n+1):\n if (arr[j+n-1]-arr[j] x2 or y1 > y2) and x1 + y1 > max(x2, y2):\n\tprint(\"Vasiliy\")\nelse:\n\tprint(\"Polycarp\")\n","sample_outputs":"[\"Polycarp\", \"Vasiliy\"]","lang_cluster":"Python","notes":"NoteIn the first sample test Polycarp starts in (2,\u20091) and will move to (1,\u20091) in the first turn. No matter what his opponent is doing, in the second turn Polycarp can move to (1,\u20090) and finally to (0,\u20090) in the third turn.","output_specification":"Output the name of the winner: \"Polycarp\" or \"Vasiliy\".","description":"Polycarp and Vasiliy love simple logical games. Today they play a game with infinite chessboard and one pawn for each player. Polycarp and Vasiliy move in turns, Polycarp starts. In each turn Polycarp can move his pawn from cell (x,\u2009y) to (x\u2009-\u20091,\u2009y) or (x,\u2009y\u2009-\u20091). Vasiliy can move his pawn from (x,\u2009y) to one of cells: (x\u2009-\u20091,\u2009y),\u2009(x\u2009-\u20091,\u2009y\u2009-\u20091) and (x,\u2009y\u2009-\u20091). Both players are also allowed to skip move. There are some additional restrictions \u2014 a player is forbidden to move his pawn to a cell with negative x-coordinate or y-coordinate or to the cell containing opponent's pawn The winner is the first person to reach cell (0,\u20090). You are given the starting coordinates of both pawns. Determine who will win if both of them play optimally well.","human_testcases":"[{\"input\": \"2 1 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"4 7 7 4\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"20 0 7 22\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"80 100 83 97\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"80 100 77 103\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"55000 60000 55003 60100\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"100000 100000 100000 99999\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"100000 99999 100000 100000\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 100000 100000 99999\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 100000 99999 100000\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 90000 89999 89999\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 1 0 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 1 0\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 1 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 1 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 2 0\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 2 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 1 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 2 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 2 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 2 1 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 2 1 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 2 2 0\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 2 2 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 2 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 0 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 0 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 1 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 1 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 2 0\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 2 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 0 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 1 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 1 0 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 1 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 1 1 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 1 2 0\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 1 2 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 1 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"1 2 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 0 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 1 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 2 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 2 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"1 2 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 0 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 0 0 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 0 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 0 1 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 0 1 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 0 2 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 0 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 1 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 0 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 1 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 1 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 2 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 2 2\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2 2 0 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 0 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 1 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 1 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 1 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 2 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 2 2 1\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"13118 79593 32785 22736\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"23039 21508 54113 76824\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"32959 49970 75441 55257\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"91573 91885 61527 58038\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"70620 15283 74892 15283\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"43308 1372 53325 1370\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"74005 7316 74004 7412\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"53208 42123 95332 85846\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"14969 66451 81419 29039\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"50042 34493 84536 17892\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"67949 70623 71979 70623\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"67603 35151 67603 39519\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"27149 26539 53690 17953\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"36711 38307 75018 72040\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"4650 67347 71998 50474\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"4075 33738 4561 33738\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"35868 55066 47754 55066\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"41150 1761 41152 1841\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"63557 16718 38133 80275\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"8956 24932 30356 33887\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"27338 8401 27337 12321\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"56613 48665 66408 48665\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"34750 34886 34751 44842\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"7591 24141 31732 23276\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"2333 91141 93473 66469\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"9 0 8 0\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 1000 100 99\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"4 4 2 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 4 4 3\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"100 1 1 100\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"9 17 14 16\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"0 3 3 1\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"10 0 0 10\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"5 0 0 4\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"2 1 1 3\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"4 5 5 5\\r\\n\", \"output\": [\"Polycarp\"]}, {\"input\": \"0 3 2 2\\r\\n\", \"output\": [\"Vasiliy\"]}, {\"input\": \"3 0 0 10\\r\\n\", \"output\": [\"Polycarp\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '0 2 1 1\\r\\n', 'output': ['Vasiliy']}, {'input': '0 2 0 1\\r\\n', 'output': ['Vasiliy']}, {'input': '2 0 1 2\\r\\n', 'output': ['Polycarp']}, {'input': '4 7 7 4\\r\\n', 'output': ['Vasiliy']}, {'input': '4 4 2 2\\r\\n', 'output': ['Vasiliy']}]","human_sample_testcases_2":"[{'input': '2 0 2 1\\r\\n', 'output': ['Polycarp']}, {'input': '9 0 8 0\\r\\n', 'output': ['Vasiliy']}, {'input': '43308 1372 53325 1370\\r\\n', 'output': ['Polycarp']}, {'input': '2 1 1 2\\r\\n', 'output': ['Vasiliy']}, {'input': '67603 35151 67603 39519\\r\\n', 'output': ['Polycarp']}]","human_sample_testcases_3":"[{'input': '80 100 77 103\\r\\n', 'output': ['Vasiliy']}, {'input': '2 2 2 0\\r\\n', 'output': ['Vasiliy']}, {'input': '3 0 0 10\\r\\n', 'output': ['Polycarp']}, {'input': '41150 1761 41152 1841\\r\\n', 'output': ['Polycarp']}, {'input': '43308 1372 53325 1370\\r\\n', 'output': ['Polycarp']}]","human_sample_testcases_4":"[{'input': '80 100 83 97\\r\\n', 'output': ['Vasiliy']}, {'input': '50042 34493 84536 17892\\r\\n', 'output': ['Polycarp']}, {'input': '1 2 2 1\\r\\n', 'output': ['Vasiliy']}, {'input': '0 1 1 2\\r\\n', 'output': ['Polycarp']}, {'input': '0 3 2 2\\r\\n', 'output': ['Vasiliy']}]","human_sample_testcases_5":"[{'input': '0 1 2 2\\r\\n', 'output': ['Polycarp']}, {'input': '1 0 1 1\\r\\n', 'output': ['Polycarp']}, {'input': '0 1 2 1\\r\\n', 'output': ['Polycarp']}, {'input': '55000 60000 55003 60100\\r\\n', 'output': ['Polycarp']}, {'input': '4075 33738 4561 33738\\r\\n', 'output': ['Polycarp']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":75.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":50.0,"id":385,"human_sample_pass_rate":100.0,"human_sample_line_coverage":95.0,"human_sample_branch_coverage":90.0} {"sample_inputs":"[\"4\\nZCTH\", \"5\\nZDATG\", \"6\\nAFBAKC\"]","input_specification":"The first line contains a single integer $$$n$$$ ($$$4 \\leq n \\leq 50$$$)\u00a0\u2014 the length of the string $$$s$$$. The second line contains the string $$$s$$$, consisting of exactly $$$n$$$ uppercase letters of the Latin alphabet.","src_uid":"ee4f88abe4c9fa776abd15c5f3a94543","source_code":"def solve(a, b):\n return min((26 + a - b) % 26, (26 + b - a) % 26)\n\n\ndef main():\n n = int(input())\n s = input().lower()\n print(min((sum((solve(ord(a), ord(b)) for a, b in zip(s[i:i + 4], 'actg'))) for i in range(n - 3))))\n\n\nmain()\n","sample_outputs":"[\"2\", \"5\", \"16\"]","lang_cluster":"Python","notes":"NoteIn the first example, you should replace the letter \"Z\" with \"A\" for one operation, the letter \"H\"\u00a0\u2014 with the letter \"G\" for one operation. You will get the string \"ACTG\", in which the genome is present as a substring.In the second example, we replace the letter \"A\" with \"C\" for two operations, the letter \"D\"\u00a0\u2014 with the letter \"A\" for three operations. You will get the string \"ZACTG\", in which there is a genome.","output_specification":"Output the minimum number of operations that need to be applied to the string $$$s$$$ so that the genome appears as a substring in it.","description":"Today in the scientific lyceum of the Kingdom of Kremland, there was a biology lesson. The topic of the lesson was the genomes. Let's call the genome the string \"ACTG\".Maxim was very boring to sit in class, so the teacher came up with a task for him: on a given string $$$s$$$ consisting of uppercase letters and length of at least $$$4$$$, you need to find the minimum number of operations that you need to apply, so that the genome appears in it as a substring. For one operation, you can replace any letter in the string $$$s$$$ with the next or previous in the alphabet. For example, for the letter \"D\" the previous one will be \"C\", and the next\u00a0\u2014 \"E\". In this problem, we assume that for the letter \"A\", the previous one will be the letter \"Z\", and the next one will be \"B\", and for the letter \"Z\", the previous one is the letter \"Y\", and the next one is the letter \"A\".Help Maxim solve the problem that the teacher gave him.A string $$$a$$$ is a substring of a string $$$b$$$ if $$$a$$$ can be obtained from $$$b$$$ by deletion of several (possibly, zero or all) characters from the beginning and several (possibly, zero or all) characters from the end.","human_testcases":"[{\"input\": \"4\\r\\nZCTH\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5\\r\\nZDATG\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"6\\r\\nAFBAKC\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"9\\r\\nAAABBBCCC\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"8\\r\\nABCDABCD\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"4\\r\\nNPGT\\r\\n\", \"output\": [\"52\"]}, {\"input\": \"10\\r\\nABABABABAB\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"8\\r\\nBBAACCZZ\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"50\\r\\nALWLSFLXYPQYMIWXMYMXFYMIVFYJDTJAIGVOAUDAIIAHKNNVTX\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"30\\r\\nTHCVHIPLYOOFCNWQJMBMEDTXLTCKMF\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"39\\r\\nIHESTJHHSZRSHNUSPGMHDTKOJFEFLAUDXUEQWLO\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"32\\r\\nIWMQCTKRNXICANQUPLBOMDNRBOWWIXZB\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"6\\r\\nNQNEVX\\r\\n\", \"output\": [\"26\"]}, {\"input\": \"17\\r\\nGNPBRASKVPECJKECD\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"18\\r\\nKNGWZFHGQIADTBYWDC\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"14\\r\\nZXPFXCBVESQGAE\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"37\\r\\nINUZOUSGLBHKDEFTQANRPIYMIBFLRTYFNWIFQ\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"50\\r\\nVKRGXLUWYURTRNGAODFLYCKAPHGPHGDLWIGXEYVOAVYYXVDRAB\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"50\\r\\nGOHDHOWWPMZBSEKHDBDKLIYRFEPOUHIHOHPUMVDAQRZDJMUBWV\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nROWGGKNUITVHOBMKZXOZNBZMQGSFERNCZDFKLRBCFVVDXJEFLP\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"50\\r\\nYUPJIRNPTCFJIPODTHJXTWJUTLKCUYFNZKMJRBZZYBPEDYLKCY\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nZOMSHKIFVAMFATEIIEUJVITTYZGDWCGSOJMFQNYACRPOLGUZCM\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"50\\r\\nLQFSFNEFCPBEARPMOGSSQVHAGNKOQXXCZKHSAEPTEHWOWSZMKH\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"50\\r\\nHKKUWHLYYKBLLEHKVNIRYAPVFTAPRIFUZELKGRDXZNCNWHSAFG\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"50\\r\\nMGDXLMPDPKUQOIMTLDUDTGTOMJCSYNRTSQSJANYDDPWQYTDTAW\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8\\r\\nACTGACTG\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10\\r\\nZZZZZZZZZZ\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"8\\r\\nNPGTNPGT\\r\\n\", \"output\": [\"22\"]}, {\"input\": \"5\\r\\nACTGA\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4\\r\\nAZTG\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\nYCTG\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4\\r\\nANTG\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"4\\r\\nOCTG\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"4\\r\\nACHG\\r\\n\", \"output\": [\"12\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\nAZTG\\r\\n', 'output': ['3']}, {'input': '37\\r\\nINUZOUSGLBHKDEFTQANRPIYMIBFLRTYFNWIFQ\\r\\n', 'output': ['17']}, {'input': '33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n', 'output': ['12']}, {'input': '4\\r\\nOCTG\\r\\n', 'output': ['12']}, {'input': '4\\r\\nANTG\\r\\n', 'output': ['11']}]","human_sample_testcases_2":"[{'input': '17\\r\\nGNPBRASKVPECJKECD\\r\\n', 'output': ['16']}, {'input': '32\\r\\nIWMQCTKRNXICANQUPLBOMDNRBOWWIXZB\\r\\n', 'output': ['14']}, {'input': '50\\r\\nMGDXLMPDPKUQOIMTLDUDTGTOMJCSYNRTSQSJANYDDPWQYTDTAW\\r\\n', 'output': ['7']}, {'input': '50\\r\\nYUPJIRNPTCFJIPODTHJXTWJUTLKCUYFNZKMJRBZZYBPEDYLKCY\\r\\n', 'output': ['9']}, {'input': '50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n', 'output': ['9']}]","human_sample_testcases_3":"[{'input': '33\\r\\nIQHJDOVAGCIAEBAIXQYQCDVZGVOYIIYPR\\r\\n', 'output': ['12']}, {'input': '9\\r\\nAAABBBCCC\\r\\n', 'output': ['14']}, {'input': '32\\r\\nIWMQCTKRNXICANQUPLBOMDNRBOWWIXZB\\r\\n', 'output': ['14']}, {'input': '50\\r\\nZOMSHKIFVAMFATEIIEUJVITTYZGDWCGSOJMFQNYACRPOLGUZCM\\r\\n', 'output': ['9']}, {'input': '4\\r\\nOCTG\\r\\n', 'output': ['12']}]","human_sample_testcases_4":"[{'input': '50\\r\\nGOHDHOWWPMZBSEKHDBDKLIYRFEPOUHIHOHPUMVDAQRZDJMUBWV\\r\\n', 'output': ['5']}, {'input': '8\\r\\nABCDABCD\\r\\n', 'output': ['13']}, {'input': '4\\r\\nACHG\\r\\n', 'output': ['12']}, {'input': '18\\r\\nKNGWZFHGQIADTBYWDC\\r\\n', 'output': ['6']}, {'input': '50\\r\\nMGDXLMPDPKUQOIMTLDUDTGTOMJCSYNRTSQSJANYDDPWQYTDTAW\\r\\n', 'output': ['7']}]","human_sample_testcases_5":"[{'input': '4\\r\\nYCTG\\r\\n', 'output': ['2']}, {'input': '4\\r\\nANTG\\r\\n', 'output': ['11']}, {'input': '50\\r\\nYUPJIRNPTCFJIPODTHJXTWJUTLKCUYFNZKMJRBZZYBPEDYLKCY\\r\\n', 'output': ['9']}, {'input': '50\\r\\nQFWWIROYKRLAYBPSEXATCWILUBAZPWSGSKLTBLZOLZPHJKQQGF\\r\\n', 'output': ['9']}, {'input': '39\\r\\nIHESTJHHSZRSHNUSPGMHDTKOJFEFLAUDXUEQWLO\\r\\n', 'output': ['11']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":386,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1 10 9 20 1\", \"1 100 50 200 75\"]","input_specification":"The only line of the input contains integers l1, r1, l2, r2 and k (1\u2009\u2264\u2009l1,\u2009r1,\u2009l2,\u2009r2,\u2009k\u2009\u2264\u20091018, l1\u2009\u2264\u2009r1, l2\u2009\u2264\u2009r2), providing the segments of time for Sonya and Filya and the moment of time when Sonya prinks.","src_uid":"9a74b3b0e9f3a351f2136842e9565a82","source_code":"data = [int(info) for info in input().split(' ')]\n\nif data[0] == data[2] and data[1] == data[3]:\n\ttime = data[1] - data[0] + 1\n\tif data[4] >= data[0] and data[4] <= data[1]:\n\t\ttime -= 1\n\nelif (((data[2] < data[0]) and (data[2] < data[1])) and ((data[3] < data[0]) and (data[3] < data[1]))) or (((data[1] < data[2]) and (data[0] < data[2])) and ((data[0] < data[3]) and (data[0] < data[3]))):\n\t#import code\n\t#code.interact(local=locals())\n\t#print('bine pa')\n\ttime = 0\nelse:\n\tif data[0] < data[2]:\n\t\tif data[1] < data[3]:\n\t\t\ttime = data[1] - data[2] + 1\n\t\t\tif data[4] <= data[1] and data[4] >= data[2]:\n\t\t\t\ttime -= 1\n\t\telse:\n\t\t\ttime = data[3] - data[2] + 1\n\t\t\tif data[4] <= data[3] and data[4] >= data[2]:\n\t\t\t\ttime -= 1\n\n\telse:\n\t\tif data[1] > data[3]:\n\t\t\ttime = data[3] - data[0] + 1\n\t\t\t#import code\n\t\t\t#code.interact(local=locals())\n\t\t\tif data[4] <= data[3] and data[4] >= data[0]:\n\t\t\t\ttime -= 1\n\t\telse:\n\t\t\ttime = data[1] - data[0] + 1\n\t\t\tif data[4] >= data[0] and data[4] <= data[1]:\n\t\t\t\ttime -= 1\nprint(time)\t\n","sample_outputs":"[\"2\", \"50\"]","lang_cluster":"Python","notes":"NoteIn the first sample, they will be together during minutes 9 and 10.In the second sample, they will be together from minute 50 to minute 74 and from minute 76 to minute 100.","output_specification":"Print one integer\u00a0\u2014 the number of minutes Sonya and Filya will be able to spend together.","description":"Today an outstanding event is going to happen in the forest\u00a0\u2014 hedgehog Filya will come to his old fried Sonya!Sonya is an owl and she sleeps during the day and stay awake from minute l1 to minute r1 inclusive. Also, during the minute k she prinks and is unavailable for Filya.Filya works a lot and he plans to visit Sonya from minute l2 to minute r2 inclusive.Calculate the number of minutes they will be able to spend together.","human_testcases":"[{\"input\": \"1 10 9 20 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 100 50 200 75\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"6 6 5 8 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000000000 1 1000000000 1\\r\\n\", \"output\": [\"999999999\"]}, {\"input\": \"5 100 8 8 8\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000000000000 2 99999999999999999 1000000000\\r\\n\", \"output\": [\"99999999999999997\"]}, {\"input\": \"1 1 1 1 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 3 4 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1000000000 2 999999999 3141592\\r\\n\", \"output\": [\"999999997\"]}, {\"input\": \"24648817341102 41165114064236 88046848035 13602161452932 10000831349205\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1080184299348 34666828555290 6878390132365 39891656267344 15395310291636\\r\\n\", \"output\": [\"27788438422925\"]}, {\"input\": \"11814 27385 22309 28354 23595\\r\\n\", \"output\": [\"5076\"]}, {\"input\": \"4722316546398 36672578279675 796716437180 33840047334985 13411035401708\\r\\n\", \"output\": [\"29117730788587\"]}, {\"input\": \"14300093617438 14381698008501 6957847034861 32510754974307 66056597033082\\r\\n\", \"output\": [\"81604391064\"]}, {\"input\": \"700062402405871919 762322967106512617 297732773882447821 747309903322652819 805776739998108178\\r\\n\", \"output\": [\"47247500916780901\"]}, {\"input\": \"59861796371397621 194872039092923459 668110259718450585 841148673332698972 928360292123223779\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"298248781360904821 346420922793050061 237084570581741798 726877079564549183 389611850470532358\\r\\n\", \"output\": [\"48172141432145241\"]}, {\"input\": \"420745791717606818 864206437350900994 764928840030524015 966634105370748487 793326512080703489\\r\\n\", \"output\": [\"99277597320376979\"]}, {\"input\": \"519325240668210886 776112702001665034 360568516809443669 875594219634943179 994594983925273138\\r\\n\", \"output\": [\"256787461333454149\"]}, {\"input\": \"170331212821058551 891149660635282032 125964175621755330 208256491683509799 526532153531983174\\r\\n\", \"output\": [\"37925278862451249\"]}, {\"input\": \"1 3 3 5 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 5 8 10 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 4 5 10\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 2 3 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 4 3 7 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 9 10 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 15 1 10 5\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1 4 9 20 25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 4 1 2 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 1000 1 100 2\\r\\n\", \"output\": [\"91\"]}, {\"input\": \"1 3 3 8 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 6 6 8 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 3 1 4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 2 3 100\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 2 100 120 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3 5 7 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3 5 7 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4 8 10 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 6 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 10 20\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 6 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 5 7 12 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 20 50 100 80\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 10 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 6 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 9 1 2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"50 100 1 20 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 20 3 7 30\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 5 10 10 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 101 1 2 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 5 10 20 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10 15 25 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 10 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 3 5 6 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 4 5 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 10 1 2 40\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 30 1 5 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"20 40 50 100 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 4 9 2\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 6 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100 400 500 450\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 6 1 2 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10 21 30 50\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 200 300 400 101\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 8 12 16 9\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 5 7 9 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"300 400 100 200 101\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 2 3 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 10 100 200 5\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3 3 4 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"10 20 30 40 25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 5 10 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 4 8 10 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 5 10 15 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"100 200 5 10 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 2 100 200 300\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"30 100 10 20 25\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"10 20 1 5 6\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 5 1 2 4\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"11 100 1 9 1000\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 10 10 228\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"5 7 10 20 15\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3 8 9 7\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 10 2 8 8\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1 5 9 15 1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3 5 6 12\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 100 500 1000 3\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 1 1 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1000 100 1000 200\\r\\n\", \"output\": [\"900\"]}, {\"input\": \"4 5 1 4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 5 5 7 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 4 4 10 11\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1 3 4 100\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 4 3 5 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"10 100 20 30 40\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"5 9 1 11 7\\r\\n\", \"output\": [\"4\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1 4 4 10 11\\r\\n', 'output': ['1']}, {'input': '1 2 100 200 300\\r\\n', 'output': ['0']}, {'input': '1 1 1 1 1\\r\\n', 'output': ['0']}, {'input': '30 100 10 20 25\\r\\n', 'output': ['0']}, {'input': '2 4 8 10 1\\r\\n', 'output': ['0']}]","human_sample_testcases_2":"[{'input': '1 4 3 5 6\\r\\n', 'output': ['2']}, {'input': '1 5 7 9 6\\r\\n', 'output': ['0']}, {'input': '2 3 5 6 100\\r\\n', 'output': ['0']}, {'input': '2 4 1 2 5\\r\\n', 'output': ['1']}, {'input': '1 1000000000000000000 2 99999999999999999 1000000000\\r\\n', 'output': ['99999999999999997']}]","human_sample_testcases_3":"[{'input': '1 10 9 20 1\\r\\n', 'output': ['2']}, {'input': '1 5 10 10 100\\r\\n', 'output': ['0']}, {'input': '519325240668210886 776112702001665034 360568516809443669 875594219634943179 994594983925273138\\r\\n', 'output': ['256787461333454149']}, {'input': '50 100 1 20 3\\r\\n', 'output': ['0']}, {'input': '1 2 5 6 1\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '2 8 12 16 9\\r\\n', 'output': ['0']}, {'input': '1 2 5 6 7\\r\\n', 'output': ['0']}, {'input': '1 2 3 4 5\\r\\n', 'output': ['0']}, {'input': '4722316546398 36672578279675 796716437180 33840047334985 13411035401708\\r\\n', 'output': ['29117730788587']}, {'input': '1 10 15 25 5\\r\\n', 'output': ['0']}]","human_sample_testcases_5":"[{'input': '59861796371397621 194872039092923459 668110259718450585 841148673332698972 928360292123223779\\r\\n', 'output': ['0']}, {'input': '1 2 5 6 1\\r\\n', 'output': ['0']}, {'input': '2 4 8 10 1\\r\\n', 'output': ['0']}, {'input': '5 6 1 2 5\\r\\n', 'output': ['0']}, {'input': '1 5 7 9 6\\r\\n', 'output': ['0']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":52.17,"human_sample_line_coverage_2":65.22,"human_sample_line_coverage_3":52.17,"human_sample_line_coverage_4":43.48,"human_sample_line_coverage_5":21.74,"human_sample_branch_coverage_1":45.45,"human_sample_branch_coverage_2":59.09,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":36.36,"human_sample_branch_coverage_5":18.18,"id":387,"human_sample_pass_rate":100.0,"human_sample_line_coverage":46.956,"human_sample_branch_coverage":41.816} {"sample_inputs":"[\"1 1 1 1\\n+ + *\", \"2 2 2 2\\n* * +\", \"1 2 3 4\\n* + +\"]","input_specification":"First line contains four integers separated by space: 0\u2009\u2264\u2009a,\u2009b,\u2009c,\u2009d\u2009\u2264\u20091000 \u2014 the original numbers. Second line contains three signs ('+' or '*' each) separated by space \u2014 the sequence of the operations in the order of performing. ('+' stands for addition, '*' \u2014 multiplication)","src_uid":"7a66fae63d9b27e444d84447012e484c","source_code":"I=input\na=I().split()\ndef f(s,z):\n\tif not z:return int(s[0])\n\tm=10**99\n\tfor i in s:\n\t\tt=s[::];t.remove(i)\n\t\tfor j in t:k=t[::];k.remove(j);m=min(m,f(k+[str(eval(i+z[0]+j))],z[1:]))\n\treturn m\nprint(f(a,I().split()))","sample_outputs":"[\"3\", \"8\", \"9\"]","lang_cluster":"Python","notes":null,"output_specification":"Output one integer number \u2014 the minimal result which can be obtained. Please, do not use %lld specificator to read or write 64-bit integers in C++. It is preffered to use cin (also you may use %I64d).","description":"Recently, Vladimir got bad mark in algebra again. To avoid such unpleasant events in future he decided to train his arithmetic skills. He wrote four integer numbers a, b, c, d on the blackboard. During each of the next three minutes he took two numbers from the blackboard (not necessarily adjacent) and replaced them with their sum or their product. In the end he got one number. Unfortunately, due to the awful memory he forgot that number, but he remembers four original numbers, sequence of the operations and his surprise because of the very small result. Help Vladimir remember the forgotten number: find the smallest number that can be obtained from the original numbers by the given sequence of operations.","human_testcases":"[{\"input\": \"1 1 1 1\\r\\n+ + *\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"2 2 2 2\\r\\n* * +\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"1 2 3 4\\r\\n* + +\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"15 1 3 1\\r\\n* * +\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"8 1 7 14\\r\\n+ + +\\r\\n\", \"output\": [\"30\"]}, {\"input\": \"7 17 3 25\\r\\n+ * +\\r\\n\", \"output\": [\"63\"]}, {\"input\": \"13 87 4 17\\r\\n* * *\\r\\n\", \"output\": [\"76908\"]}, {\"input\": \"7 0 8 15\\r\\n+ + *\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"52 0 43 239\\r\\n+ + +\\r\\n\", \"output\": [\"334\"]}, {\"input\": \"1000 1000 999 1000\\r\\n* * *\\r\\n\", \"output\": [\"999000000000\"]}, {\"input\": \"720 903 589 804\\r\\n* * *\\r\\n\", \"output\": [\"307887168960\"]}, {\"input\": \"631 149 496 892\\r\\n* * +\\r\\n\", \"output\": [\"445884\"]}, {\"input\": \"220 127 597 394\\r\\n* + +\\r\\n\", \"output\": [\"28931\"]}, {\"input\": \"214 862 466 795\\r\\n+ + +\\r\\n\", \"output\": [\"2337\"]}, {\"input\": \"346 290 587 525\\r\\n* * *\\r\\n\", \"output\": [\"30922279500\"]}, {\"input\": \"323 771 559 347\\r\\n+ * *\\r\\n\", \"output\": [\"149067730\"]}, {\"input\": \"633 941 836 254\\r\\n* + +\\r\\n\", \"output\": [\"162559\"]}, {\"input\": \"735 111 769 553\\r\\n+ * *\\r\\n\", \"output\": [\"92320032\"]}, {\"input\": \"622 919 896 120\\r\\n* * +\\r\\n\", \"output\": [\"667592\"]}, {\"input\": \"652 651 142 661\\r\\n+ + +\\r\\n\", \"output\": [\"2106\"]}, {\"input\": \"450 457 975 35\\r\\n* * *\\r\\n\", \"output\": [\"7017806250\"]}, {\"input\": \"883 954 804 352\\r\\n* * +\\r\\n\", \"output\": [\"1045740\"]}, {\"input\": \"847 206 949 358\\r\\n* + *\\r\\n\", \"output\": [\"62660050\"]}, {\"input\": \"663 163 339 76\\r\\n+ + +\\r\\n\", \"output\": [\"1241\"]}, {\"input\": \"990 330 253 553\\r\\n+ * +\\r\\n\", \"output\": [\"85033\"]}, {\"input\": \"179 346 525 784\\r\\n* * *\\r\\n\", \"output\": [\"25492034400\"]}, {\"input\": \"780 418 829 778\\r\\n+ + *\\r\\n\", \"output\": [\"997766\"]}, {\"input\": \"573 598 791 124\\r\\n* * *\\r\\n\", \"output\": [\"33608874936\"]}, {\"input\": \"112 823 202 223\\r\\n* * +\\r\\n\", \"output\": [\"137222\"]}, {\"input\": \"901 166 994 315\\r\\n* + *\\r\\n\", \"output\": [\"47278294\"]}, {\"input\": \"393 342 840 486\\r\\n+ * *\\r\\n\", \"output\": [\"178222356\"]}, {\"input\": \"609 275 153 598\\r\\n+ + *\\r\\n\", \"output\": [\"226746\"]}, {\"input\": \"56 828 386 57\\r\\n+ * *\\r\\n\", \"output\": [\"3875088\"]}, {\"input\": \"944 398 288 986\\r\\n+ + *\\r\\n\", \"output\": [\"670464\"]}, {\"input\": \"544 177 162 21\\r\\n+ + *\\r\\n\", \"output\": [\"18543\"]}, {\"input\": \"105 238 316 265\\r\\n+ + +\\r\\n\", \"output\": [\"924\"]}, {\"input\": \"31 353 300 911\\r\\n* * *\\r\\n\", \"output\": [\"2990721900\"]}, {\"input\": \"46 378 310 194\\r\\n* * +\\r\\n\", \"output\": [\"77528\"]}, {\"input\": \"702 534 357 657\\r\\n+ * *\\r\\n\", \"output\": [\"259077042\"]}, {\"input\": \"492 596 219 470\\r\\n+ + *\\r\\n\", \"output\": [\"341202\"]}, {\"input\": \"482 842 982 902\\r\\n+ * +\\r\\n\", \"output\": [\"407728\"]}, {\"input\": \"827 578 394 351\\r\\n* * *\\r\\n\", \"output\": [\"66105361764\"]}, {\"input\": \"901 884 426 451\\r\\n* + *\\r\\n\", \"output\": [\"170223210\"]}, {\"input\": \"210 295 12 795\\r\\n* * +\\r\\n\", \"output\": [\"71490\"]}, {\"input\": \"40 734 948 202\\r\\n+ * *\\r\\n\", \"output\": [\"13590560\"]}, {\"input\": \"136 611 963 195\\r\\n+ + *\\r\\n\", \"output\": [\"240584\"]}, {\"input\": \"695 74 871 760\\r\\n+ * +\\r\\n\", \"output\": [\"53061\"]}, {\"input\": \"666 884 772 54\\r\\n* + +\\r\\n\", \"output\": [\"37620\"]}, {\"input\": \"975 785 753 224\\r\\n+ * +\\r\\n\", \"output\": [\"170432\"]}, {\"input\": \"35 187 126 596\\r\\n+ + +\\r\\n\", \"output\": [\"944\"]}, {\"input\": \"243 386 431 35\\r\\n* + *\\r\\n\", \"output\": [\"3298015\"]}, {\"input\": \"229 602 133 635\\r\\n* * +\\r\\n\", \"output\": [\"222313\"]}, {\"input\": \"916 207 238 891\\r\\n+ + *\\r\\n\", \"output\": [\"423315\"]}, {\"input\": \"922 145 883 357\\r\\n+ + *\\r\\n\", \"output\": [\"313490\"]}, {\"input\": \"69 355 762 111\\r\\n* + +\\r\\n\", \"output\": [\"8776\"]}, {\"input\": \"209 206 34 67\\r\\n* + *\\r\\n\", \"output\": [\"476374\"]}, {\"input\": \"693 824 375 361\\r\\n* * +\\r\\n\", \"output\": [\"557339\"]}, {\"input\": \"45 712 635 467\\r\\n* + +\\r\\n\", \"output\": [\"22362\"]}, {\"input\": \"426 283 179 211\\r\\n+ + +\\r\\n\", \"output\": [\"1099\"]}, {\"input\": \"802 387 686 12\\r\\n+ + +\\r\\n\", \"output\": [\"1887\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '735 111 769 553\\r\\n+ * *\\r\\n', 'output': ['92320032']}, {'input': '209 206 34 67\\r\\n* + *\\r\\n', 'output': ['476374']}, {'input': '15 1 3 1\\r\\n* * +\\r\\n', 'output': ['18']}, {'input': '652 651 142 661\\r\\n+ + +\\r\\n', 'output': ['2106']}, {'input': '220 127 597 394\\r\\n* + +\\r\\n', 'output': ['28931']}]","human_sample_testcases_2":"[{'input': '944 398 288 986\\r\\n+ + *\\r\\n', 'output': ['670464']}, {'input': '663 163 339 76\\r\\n+ + +\\r\\n', 'output': ['1241']}, {'input': '883 954 804 352\\r\\n* * +\\r\\n', 'output': ['1045740']}, {'input': '975 785 753 224\\r\\n+ * +\\r\\n', 'output': ['170432']}, {'input': '105 238 316 265\\r\\n+ + +\\r\\n', 'output': ['924']}]","human_sample_testcases_3":"[{'input': '8 1 7 14\\r\\n+ + +\\r\\n', 'output': ['30']}, {'input': '944 398 288 986\\r\\n+ + *\\r\\n', 'output': ['670464']}, {'input': '105 238 316 265\\r\\n+ + +\\r\\n', 'output': ['924']}, {'input': '35 187 126 596\\r\\n+ + +\\r\\n', 'output': ['944']}, {'input': '901 884 426 451\\r\\n* + *\\r\\n', 'output': ['170223210']}]","human_sample_testcases_4":"[{'input': '622 919 896 120\\r\\n* * +\\r\\n', 'output': ['667592']}, {'input': '214 862 466 795\\r\\n+ + +\\r\\n', 'output': ['2337']}, {'input': '735 111 769 553\\r\\n+ * *\\r\\n', 'output': ['92320032']}, {'input': '40 734 948 202\\r\\n+ * *\\r\\n', 'output': ['13590560']}, {'input': '393 342 840 486\\r\\n+ * *\\r\\n', 'output': ['178222356']}]","human_sample_testcases_5":"[{'input': '901 884 426 451\\r\\n* + *\\r\\n', 'output': ['170223210']}, {'input': '35 187 126 596\\r\\n+ + +\\r\\n', 'output': ['944']}, {'input': '652 651 142 661\\r\\n+ + +\\r\\n', 'output': ['2106']}, {'input': '944 398 288 986\\r\\n+ + *\\r\\n', 'output': ['670464']}, {'input': '720 903 589 804\\r\\n* * *\\r\\n', 'output': ['307887168960']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":388,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4\\n3 2 1 2\", \"3\\n2 3 8\"]","input_specification":"The first line of input contains an integer n (1\u2009\u2264\u2009n\u2009\u2264\u2009100), the number of the columns in the box. The next line contains n space-separated integer numbers. The i-th number ai (1\u2009\u2264\u2009ai\u2009\u2264\u2009100) denotes the number of cubes in the i-th column.","src_uid":"ae20712265d4adf293e75d016b4b82d8","source_code":"number_of_columns = int(input())\nbox_p_column = [int(i) for i in input().split(' ')]\n\nbox_p_column = [str(i) for i in sorted(box_p_column)]\nprint(' '.join(box_p_column).strip())\n\n","sample_outputs":"[\"1 2 2 3\", \"2 3 8\"]","lang_cluster":"Python","notes":"NoteThe first example case is shown on the figure. The top cube of the first column falls to the top of the last column; the top cube of the second column falls to the top of the third column; the middle cube of the first column falls to the top of the second column.In the second example case the gravity switch does not change the heights of the columns.","output_specification":"Output n integer numbers separated by spaces, where the i-th number is the amount of cubes in the i-th column after the gravity switch.","description":"Little Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.There are n columns of toy cubes in the box arranged in a line. The i-th column contains ai cubes. At first, the gravity in the box is pulling the cubes downwards. When Chris switches the gravity, it begins to pull all the cubes to the right side of the box. The figure shows the initial and final configurations of the cubes in the box: the cubes that have changed their position are highlighted with orange. Given the initial configuration of the toy cubes in the box, find the amounts of cubes in each of the n columns after the gravity switch!","human_testcases":"[{\"input\": \"4\\r\\n3 2 1 2\\r\\n\", \"output\": [\"1 2 2 3\"]}, {\"input\": \"3\\r\\n2 3 8\\r\\n\", \"output\": [\"2 3 8\"]}, {\"input\": \"5\\r\\n2 1 2 1 2\\r\\n\", \"output\": [\"1 1 2 2 2\"]}, {\"input\": \"1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2\\r\\n4 3\\r\\n\", \"output\": [\"3 4\"]}, {\"input\": \"6\\r\\n100 40 60 20 1 80\\r\\n\", \"output\": [\"1 20 40 60 80 100\"]}, {\"input\": \"10\\r\\n10 8 6 7 5 3 4 2 9 1\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 10\"]}, {\"input\": \"10\\r\\n1 2 3 4 5 6 7 8 9 10\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 10\"]}, {\"input\": \"100\\r\\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77 63 17 62 91\\r\\n\", \"output\": [\"3 3 3 4 7 8 8 8 9 9 10 12 12 13 14 14 15 15 16 17 17 20 21 21 22 22 23 25 29 31 36 37 37 38 39 40 41 41 41 42 43 44 45 46 46 47 47 49 49 49 51 52 52 53 54 55 59 59 59 60 62 63 63 64 66 69 70 71 71 72 74 76 76 77 77 78 78 79 80 81 81 82 82 84 85 86 87 87 87 89 91 92 92 92 92 97 98 99 100 100\"]}, {\"input\": \"100\\r\\n100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\\r\\n\", \"output\": [\"100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100\"]}, {\"input\": \"10\\r\\n1 9 7 6 2 4 7 8 1 3\\r\\n\", \"output\": [\"1 1 2 3 4 6 7 7 8 9\"]}, {\"input\": \"20\\r\\n53 32 64 20 41 97 50 20 66 68 22 60 74 61 97 54 80 30 72 59\\r\\n\", \"output\": [\"20 20 22 30 32 41 50 53 54 59 60 61 64 66 68 72 74 80 97 97\"]}, {\"input\": \"30\\r\\n7 17 4 18 16 12 14 10 1 13 2 16 13 17 8 16 13 14 9 17 17 5 13 5 1 7 6 20 18 12\\r\\n\", \"output\": [\"1 1 2 4 5 5 6 7 7 8 9 10 12 12 13 13 13 13 14 14 16 16 16 17 17 17 17 18 18 20\"]}, {\"input\": \"40\\r\\n22 58 68 58 48 53 52 1 16 78 75 17 63 15 36 32 78 75 49 14 42 46 66 54 49 82 40 43 46 55 12 73 5 45 61 60 1 11 31 84\\r\\n\", \"output\": [\"1 1 5 11 12 14 15 16 17 22 31 32 36 40 42 43 45 46 46 48 49 49 52 53 54 55 58 58 60 61 63 66 68 73 75 75 78 78 82 84\"]}, {\"input\": \"70\\r\\n1 3 3 1 3 3 1 1 1 3 3 2 3 3 1 1 1 2 3 1 3 2 3 3 3 2 2 3 1 3 3 2 1 1 2 1 2 1 2 2 1 1 1 3 3 2 3 2 3 2 3 3 2 2 2 3 2 3 3 3 1 1 3 3 1 1 1 1 3 1\\r\\n\", \"output\": [\"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\"]}, {\"input\": \"90\\r\\n17 75 51 30 100 5 50 95 51 73 66 5 7 76 43 49 23 55 3 24 95 79 10 11 44 93 17 99 53 66 82 66 63 76 19 4 51 71 75 43 27 5 24 19 48 7 91 15 55 21 7 6 27 10 2 91 64 58 18 21 16 71 90 88 21 20 6 6 95 85 11 7 40 65 52 49 92 98 46 88 17 48 85 96 77 46 100 34 67 52\\r\\n\", \"output\": [\"2 3 4 5 5 5 6 6 6 7 7 7 7 10 10 11 11 15 16 17 17 17 18 19 19 20 21 21 21 23 24 24 27 27 30 34 40 43 43 44 46 46 48 48 49 49 50 51 51 51 52 52 53 55 55 58 63 64 65 66 66 66 67 71 71 73 75 75 76 76 77 79 82 85 85 88 88 90 91 91 92 93 95 95 95 96 98 99 100 100\"]}, {\"input\": \"100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\"]}, {\"input\": \"100\\r\\n1 1 1 1 2 1 1 1 1 1 2 2 1 1 2 1 2 1 1 1 2 1 1 2 1 2 1 1 2 2 2 1 1 2 1 1 1 2 2 2 1 1 1 2 1 2 2 1 2 1 1 2 2 1 2 1 2 1 2 2 1 1 1 2 1 1 2 1 2 1 2 2 2 1 2 1 2 2 2 1 2 2 1 1 1 1 2 2 2 2 2 2 2 1 1 1 2 1 2 1\\r\\n\", \"output\": [\"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2\"]}, {\"input\": \"100\\r\\n2 1 1 1 3 2 3 3 2 3 3 1 3 3 1 3 3 1 1 1 2 3 1 2 3 1 2 3 3 1 3 1 1 2 3 2 3 3 2 3 3 1 2 2 1 2 3 2 3 2 2 1 1 3 1 3 2 1 3 1 3 1 3 1 1 3 3 3 2 3 2 2 2 2 1 3 3 3 1 2 1 2 3 2 1 3 1 3 2 1 3 1 2 1 2 3 1 3 2 3\\r\\n\", \"output\": [\"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3\"]}, {\"input\": \"100\\r\\n7 4 5 5 10 10 5 8 5 7 4 5 4 6 8 8 2 6 3 3 10 7 10 8 6 2 7 3 9 7 7 2 4 5 2 4 9 5 10 1 10 5 10 4 1 3 4 2 6 9 9 9 10 6 2 5 6 1 8 10 4 10 3 4 10 5 5 4 10 4 5 3 7 10 2 7 3 6 9 6 1 6 5 5 4 6 6 4 4 1 5 1 6 6 6 8 8 6 2 6\\r\\n\", \"output\": [\"1 1 1 1 1 1 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10\"]}, {\"input\": \"100\\r\\n12 10 5 11 13 12 14 13 7 15 15 12 13 19 12 18 14 10 10 3 1 10 16 11 19 8 10 15 5 10 12 16 11 13 11 15 14 12 16 8 11 8 15 2 18 2 14 13 15 20 8 8 4 12 14 7 10 3 9 1 7 19 6 7 2 14 8 20 7 17 18 20 3 18 18 9 6 10 4 1 4 19 9 13 3 3 12 11 11 20 8 2 13 6 7 12 1 4 17 3\\r\\n\", \"output\": [\"1 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 5 5 6 6 6 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 17 17 18 18 18 18 18 19 19 19 19 20 20 20 20\"]}, {\"input\": \"100\\r\\n5 13 1 40 30 10 23 32 33 12 6 4 15 29 31 17 23 5 36 31 32 38 24 11 34 39 19 21 6 19 31 35 1 15 6 29 22 15 17 15 1 17 2 34 20 8 27 2 29 26 13 9 22 27 27 3 20 40 4 40 33 29 36 30 35 16 19 28 26 11 36 24 29 5 40 10 38 34 33 23 34 39 31 7 10 31 22 6 36 24 14 31 34 23 2 4 26 16 2 32\\r\\n\", \"output\": [\"1 1 1 2 2 2 2 3 4 4 4 5 5 5 6 6 6 6 7 8 9 10 10 10 11 11 12 13 13 14 15 15 15 15 16 16 17 17 17 19 19 19 20 20 21 22 22 22 23 23 23 23 24 24 24 26 26 26 27 27 27 28 29 29 29 29 29 30 30 31 31 31 31 31 31 32 32 32 33 33 33 34 34 34 34 34 35 35 36 36 36 36 38 38 39 39 40 40 40 40\"]}, {\"input\": \"100\\r\\n72 44 34 74 9 60 26 37 55 77 74 69 28 66 54 55 8 36 57 31 31 48 32 66 40 70 77 43 64 28 37 10 21 58 51 32 60 28 51 52 28 35 7 33 1 68 38 70 57 71 8 20 42 57 59 4 58 10 17 47 22 48 16 3 76 67 32 37 64 47 33 41 75 69 2 76 39 9 27 75 20 21 52 25 71 21 11 29 38 10 3 1 45 55 63 36 27 7 59 41\\r\\n\", \"output\": [\"1 1 2 3 3 4 7 7 8 8 9 9 10 10 10 11 16 17 20 20 21 21 21 22 25 26 27 27 28 28 28 28 29 31 31 32 32 32 33 33 34 35 36 36 37 37 37 38 38 39 40 41 41 42 43 44 45 47 47 48 48 51 51 52 52 54 55 55 55 57 57 57 58 58 59 59 60 60 63 64 64 66 66 67 68 69 69 70 70 71 71 72 74 74 75 75 76 76 77 77\"]}, {\"input\": \"100\\r\\n75 18 61 10 56 53 42 57 79 80 31 2 50 45 54 99 84 52 71 21 86 3 19 98 14 37 40 62 63 68 5 10 87 8 81 85 52 52 57 94 2 7 56 96 19 76 1 13 81 6 80 47 22 59 99 32 9 5 36 88 98 91 70 70 12 93 12 22 85 1 97 48 94 16 84 84 51 34 62 7 68 51 30 2 37 82 4 7 27 1 80 9 61 16 59 55 12 96 94 82\\r\\n\", \"output\": [\"1 1 1 2 2 2 3 4 5 5 6 7 7 7 8 9 9 10 10 12 12 12 13 14 16 16 18 19 19 21 22 22 27 30 31 32 34 36 37 37 40 42 45 47 48 50 51 51 52 52 52 53 54 55 56 56 57 57 59 59 61 61 62 62 63 68 68 70 70 71 75 76 79 80 80 80 81 81 82 82 84 84 84 85 85 86 87 88 91 93 94 94 94 96 96 97 98 98 99 99\"]}, {\"input\": \"100\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\"]}, {\"input\": \"100\\r\\n100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1\\r\\n\", \"output\": [\"1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100\"]}, {\"input\": \"100\\r\\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\\r\\n\", \"output\": [\"50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\"]}, {\"input\": \"49\\r\\n1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97\\r\\n\", \"output\": [\"1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97\"]}, {\"input\": \"30\\r\\n1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88\\r\\n\", \"output\": [\"1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88\"]}, {\"input\": \"100\\r\\n100 51 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 51 100\"]}, {\"input\": \"10\\r\\n100 90 80 70 60 50 40 30 20 10\\r\\n\", \"output\": [\"10 20 30 40 50 60 70 80 90 100\"]}, {\"input\": \"1\\r\\n10\\r\\n\", \"output\": [\"10\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4\\r\\n3 2 1 2\\r\\n', 'output': ['1 2 2 3']}, {'input': '49\\r\\n1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97\\r\\n', 'output': ['1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97']}, {'input': '30\\r\\n7 17 4 18 16 12 14 10 1 13 2 16 13 17 8 16 13 14 9 17 17 5 13 5 1 7 6 20 18 12\\r\\n', 'output': ['1 1 2 4 5 5 6 7 7 8 9 10 12 12 13 13 13 13 14 14 16 16 16 17 17 17 17 18 18 20']}, {'input': '70\\r\\n1 3 3 1 3 3 1 1 1 3 3 2 3 3 1 1 1 2 3 1 3 2 3 3 3 2 2 3 1 3 3 2 1 1 2 1 2 1 2 2 1 1 1 3 3 2 3 2 3 2 3 3 2 2 2 3 2 3 3 3 1 1 3 3 1 1 1 1 3 1\\r\\n', 'output': ['1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3']}, {'input': '30\\r\\n1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88\\r\\n', 'output': ['1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88']}]","human_sample_testcases_2":"[{'input': '40\\r\\n22 58 68 58 48 53 52 1 16 78 75 17 63 15 36 32 78 75 49 14 42 46 66 54 49 82 40 43 46 55 12 73 5 45 61 60 1 11 31 84\\r\\n', 'output': ['1 1 5 11 12 14 15 16 17 22 31 32 36 40 42 43 45 46 46 48 49 49 52 53 54 55 58 58 60 61 63 66 68 73 75 75 78 78 82 84']}, {'input': '5\\r\\n2 1 2 1 2\\r\\n', 'output': ['1 1 2 2 2']}, {'input': '100\\r\\n100 51 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 51 100']}, {'input': '30\\r\\n1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88\\r\\n', 'output': ['1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88']}, {'input': '100\\r\\n12 10 5 11 13 12 14 13 7 15 15 12 13 19 12 18 14 10 10 3 1 10 16 11 19 8 10 15 5 10 12 16 11 13 11 15 14 12 16 8 11 8 15 2 18 2 14 13 15 20 8 8 4 12 14 7 10 3 9 1 7 19 6 7 2 14 8 20 7 17 18 20 3 18 18 9 6 10 4 1 4 19 9 13 3 3 12 11 11 20 8 2 13 6 7 12 1 4 17 3\\r\\n', 'output': ['1 1 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 5 5 6 6 6 7 7 7 7 7 7 8 8 8 8 8 8 8 9 9 9 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 17 17 18 18 18 18 18 19 19 19 19 20 20 20 20']}]","human_sample_testcases_3":"[{'input': '100\\r\\n1 1 1 1 2 1 1 1 1 1 2 2 1 1 2 1 2 1 1 1 2 1 1 2 1 2 1 1 2 2 2 1 1 2 1 1 1 2 2 2 1 1 1 2 1 2 2 1 2 1 1 2 2 1 2 1 2 1 2 2 1 1 1 2 1 1 2 1 2 1 2 2 2 1 2 1 2 2 2 1 2 2 1 1 1 1 2 2 2 2 2 2 2 1 1 1 2 1 2 1\\r\\n', 'output': ['1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2']}, {'input': '100\\r\\n100 51 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 51 100']}, {'input': '100\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1']}, {'input': '3\\r\\n2 3 8\\r\\n', 'output': ['2 3 8']}, {'input': '4\\r\\n3 2 1 2\\r\\n', 'output': ['1 2 2 3']}]","human_sample_testcases_4":"[{'input': '4\\r\\n3 2 1 2\\r\\n', 'output': ['1 2 2 3']}, {'input': '100\\r\\n82 51 81 14 37 17 78 92 64 15 8 86 89 8 87 77 66 10 15 12 100 25 92 47 21 78 20 63 13 49 41 36 41 79 16 87 87 69 3 76 80 60 100 49 70 59 72 8 38 71 45 97 71 14 76 54 81 4 59 46 39 29 92 3 49 22 53 99 59 52 74 31 92 43 42 23 44 9 82 47 7 40 12 9 3 55 37 85 46 22 84 52 98 41 21 77 63 17 62 91\\r\\n', 'output': ['3 3 3 4 7 8 8 8 9 9 10 12 12 13 14 14 15 15 16 17 17 20 21 21 22 22 23 25 29 31 36 37 37 38 39 40 41 41 41 42 43 44 45 46 46 47 47 49 49 49 51 52 52 53 54 55 59 59 59 60 62 63 63 64 66 69 70 71 71 72 74 76 76 77 77 78 78 79 80 81 81 82 82 84 85 86 87 87 87 89 91 92 92 92 92 97 98 99 100 100']}, {'input': '100\\r\\n50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50\\r\\n', 'output': ['50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50']}, {'input': '6\\r\\n100 40 60 20 1 80\\r\\n', 'output': ['1 20 40 60 80 100']}, {'input': '100\\r\\n5 13 1 40 30 10 23 32 33 12 6 4 15 29 31 17 23 5 36 31 32 38 24 11 34 39 19 21 6 19 31 35 1 15 6 29 22 15 17 15 1 17 2 34 20 8 27 2 29 26 13 9 22 27 27 3 20 40 4 40 33 29 36 30 35 16 19 28 26 11 36 24 29 5 40 10 38 34 33 23 34 39 31 7 10 31 22 6 36 24 14 31 34 23 2 4 26 16 2 32\\r\\n', 'output': ['1 1 1 2 2 2 2 3 4 4 4 5 5 5 6 6 6 6 7 8 9 10 10 10 11 11 12 13 13 14 15 15 15 15 16 16 17 17 17 19 19 19 20 20 21 22 22 22 23 23 23 23 24 24 24 26 26 26 27 27 27 28 29 29 29 29 29 30 30 31 31 31 31 31 31 32 32 32 33 33 33 34 34 34 34 34 35 35 36 36 36 36 38 38 39 39 40 40 40 40']}]","human_sample_testcases_5":"[{'input': '100\\r\\n100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1\\r\\n', 'output': ['1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100']}, {'input': '5\\r\\n2 1 2 1 2\\r\\n', 'output': ['1 1 2 2 2']}, {'input': '2\\r\\n4 3\\r\\n', 'output': ['3 4']}, {'input': '90\\r\\n17 75 51 30 100 5 50 95 51 73 66 5 7 76 43 49 23 55 3 24 95 79 10 11 44 93 17 99 53 66 82 66 63 76 19 4 51 71 75 43 27 5 24 19 48 7 91 15 55 21 7 6 27 10 2 91 64 58 18 21 16 71 90 88 21 20 6 6 95 85 11 7 40 65 52 49 92 98 46 88 17 48 85 96 77 46 100 34 67 52\\r\\n', 'output': ['2 3 4 5 5 5 6 6 6 7 7 7 7 10 10 11 11 15 16 17 17 17 18 19 19 20 21 21 21 23 24 24 27 27 30 34 40 43 43 44 46 46 48 48 49 49 50 51 51 51 52 52 53 55 55 58 63 64 65 66 66 66 67 71 71 73 75 75 76 76 77 79 82 85 85 88 88 90 91 91 92 93 95 95 95 96 98 99 100 100']}, {'input': '100\\r\\n75 18 61 10 56 53 42 57 79 80 31 2 50 45 54 99 84 52 71 21 86 3 19 98 14 37 40 62 63 68 5 10 87 8 81 85 52 52 57 94 2 7 56 96 19 76 1 13 81 6 80 47 22 59 99 32 9 5 36 88 98 91 70 70 12 93 12 22 85 1 97 48 94 16 84 84 51 34 62 7 68 51 30 2 37 82 4 7 27 1 80 9 61 16 59 55 12 96 94 82\\r\\n', 'output': ['1 1 1 2 2 2 3 4 5 5 6 7 7 7 8 9 9 10 10 12 12 12 13 14 16 16 18 19 19 21 22 22 27 30 31 32 34 36 37 37 40 42 45 47 48 50 51 51 52 52 52 53 54 55 56 56 57 57 59 59 61 61 62 62 63 68 68 70 70 71 75 76 79 80 80 80 81 81 82 82 84 84 84 85 85 86 87 88 91 93 94 94 94 96 96 97 98 98 99 99']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":389,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"4 1 2\", \"8 2 6\", \"8 7 5\"]","input_specification":"The only line contains three integers n, a and b (2\u2009\u2264\u2009n\u2009\u2264\u2009256, 1\u2009\u2264\u2009a,\u2009b\u2009\u2264\u2009n)\u00a0\u2014 the total number of teams, and the ids of the teams that Arkady is interested in. It is guaranteed that n is such that in each round an even number of team advance, and that a and b are not equal.","src_uid":"a753bfa7bde157e108f34a28240f441f","source_code":"total_teams,team1,team2 = map(int,input().split())\n\ncount = 1\nwhile True:\n\tif round((team1\/2)+0.1)==round((team2\/2)+0.1):\n\t\tbreak\n\t\n\tteam1=round((team1\/2)+0.1)\n\tteam2=round((team2\/2)+0.1)\n\ttotal_teams\/\/=2\n\tcount+=1\n\t\nif total_teams==2:\n print('Final!')\nelse:\n\n print(count)\n","sample_outputs":"[\"1\", \"Final!\", \"2\"]","lang_cluster":"Python","notes":"NoteIn the first example teams 1 and 2 meet in the first round.In the second example teams 2 and 6 can only meet in the third round, which is the Final, if they win all their opponents in earlier rounds.In the third example the teams with ids 7 and 5 can meet in the second round, if they win their opponents in the first round.","output_specification":"In the only line print \"Final!\" (without quotes), if teams a and b can meet in the Final. Otherwise, print a single integer\u00a0\u2014 the number of the round in which teams a and b can meet. The round are enumerated from 1.","description":"The last stage of Football World Cup is played using the play-off system.There are n teams left in this stage, they are enumerated from 1 to n. Several rounds are held, in each round the remaining teams are sorted in the order of their ids, then the first in this order plays with the second, the third\u00a0\u2014 with the fourth, the fifth\u00a0\u2014 with the sixth, and so on. It is guaranteed that in each round there is even number of teams. The winner of each game advances to the next round, the loser is eliminated from the tournament, there are no draws. In the last round there is the only game with two remaining teams: the round is called the Final, the winner is called the champion, and the tournament is over.Arkady wants his two favorite teams to play in the Final. Unfortunately, the team ids are already determined, and it may happen that it is impossible for teams to meet in the Final, because they are to meet in some earlier stage, if they are strong enough. Determine, in which round the teams with ids a and b can meet.","human_testcases":"[{\"input\": \"4 1 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 2 6\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"8 7 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"128 30 98\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 128 256\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 2 127\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"2 1 2\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"2 2 1\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 1 3\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 1 4\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 2 3\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 2 4\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 3 1\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 3 2\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 3 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4 1\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 4 2\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"4 4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 8 7\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 8 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 8 1\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"16 4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"16 2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"16 14 11\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"16 3 11\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"32 10 9\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"32 25 28\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"32 22 18\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"32 17 25\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"32 18 3\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"64 40 39\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"64 60 58\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"64 34 37\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"64 26 24\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"64 50 43\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"64 17 42\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"128 116 115\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"128 35 33\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"128 61 59\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"128 116 123\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"128 17 15\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"128 124 77\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"128 4 80\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 224 223\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"256 24 22\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"256 199 196\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"256 148 159\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"256 178 166\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"256 75 97\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"256 185 200\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"256 3 238\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 128 129\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 255 129\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"256 255 128\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"256 129 256\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"128 98 69\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"128 47 83\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"16 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"64 32 30\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 4 5\\r\\n\", \"output\": [\"Final!\"]}, {\"input\": \"8 7 8\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"8 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 2 5\\r\\n\", \"output\": [\"Final!\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '16 4 3\\r\\n', 'output': ['1']}, {'input': '256 128 256\\r\\n', 'output': ['Final!']}, {'input': '8 8 5\\r\\n', 'output': ['2']}, {'input': '128 47 83\\r\\n', 'output': ['Final!']}, {'input': '64 60 58\\r\\n', 'output': ['2']}]","human_sample_testcases_2":"[{'input': '16 2 4\\r\\n', 'output': ['2']}, {'input': '16 14 11\\r\\n', 'output': ['3']}, {'input': '128 124 77\\r\\n', 'output': ['6']}, {'input': '128 116 115\\r\\n', 'output': ['1']}, {'input': '4 1 4\\r\\n', 'output': ['Final!']}]","human_sample_testcases_3":"[{'input': '256 255 129\\r\\n', 'output': ['7']}, {'input': '256 2 127\\r\\n', 'output': ['7']}, {'input': '32 17 25\\r\\n', 'output': ['4']}, {'input': '4 2 4\\r\\n', 'output': ['Final!']}, {'input': '16 4 3\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '8 7 8\\r\\n', 'output': ['1']}, {'input': '4 1 4\\r\\n', 'output': ['Final!']}, {'input': '16 2 4\\r\\n', 'output': ['2']}, {'input': '128 116 115\\r\\n', 'output': ['1']}, {'input': '256 178 166\\r\\n', 'output': ['5']}]","human_sample_testcases_5":"[{'input': '256 128 129\\r\\n', 'output': ['Final!']}, {'input': '256 185 200\\r\\n', 'output': ['7']}, {'input': '256 178 166\\r\\n', 'output': ['5']}, {'input': '32 18 3\\r\\n', 'output': ['Final!']}, {'input': '4 2 4\\r\\n', 'output': ['Final!']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":390,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"####\\n.#..\\n####\\n....\", \"####\\n....\\n####\\n....\"]","input_specification":"Four lines contain four characters each: the j-th character of the i-th line equals \".\" if the cell in the i-th row and the j-th column of the square is painted white, and \"#\", if the cell is black.","src_uid":"01b145e798bbdf0ca2ecc383676d79f3","source_code":"#!\/usr\/bin\/env python\n# coding: utf-8\n\n# In[14]:\n\n\n# # n = int(input())\n# # line = list(map(int, input().split()))\n# # line = list(str(input()))\n# from tqdm import trange\n\n\n# In[24]:\n\n\nfrom collections import Counter\n\n\n# In[13]:\n\n\nmatrix = []\n\nfor _ in range(4):\n matrix.append(list(str(input())))\n\n\n# In[29]:\n\n\nans = \"NO\"\n\nfor i in range(3):\n for j in range(3):\n tmp_list = [matrix[i][j], matrix[i][j+1], matrix[i+1][j], matrix[i+1][j+1]]\n tmp_dict = Counter(tmp_list)\n if max(tmp_dict.values()) >= 3:\n ans = \"YES\"\n break\n\nprint(ans)\n\n\n# In[ ]:\n\n\n\n\n\n# In[ ]:\n\n\n\n\n","sample_outputs":"[\"YES\", \"NO\"]","lang_cluster":"Python","notes":"NoteIn the first test sample it is enough to repaint the first cell in the second row. After such repainting the required 2\u2009\u00d7\u20092 square is on the intersection of the 1-st and 2-nd row with the 1-st and 2-nd column.","output_specification":"Print \"YES\" (without the quotes), if the test can be passed and \"NO\" (without the quotes) otherwise.","description":"In the city of Ultima Thule job applicants are often offered an IQ test. The test is as follows: the person gets a piece of squared paper with a 4\u2009\u00d7\u20094 square painted on it. Some of the square's cells are painted black and others are painted white. Your task is to repaint at most one cell the other color so that the picture has a 2\u2009\u00d7\u20092 square, completely consisting of cells of the same color. If the initial picture already has such a square, the person should just say so and the test will be completed. Your task is to write a program that determines whether it is possible to pass the test. You cannot pass the test if either repainting any cell or no action doesn't result in a 2\u2009\u00d7\u20092 square, consisting of cells of the same color.","human_testcases":"[{\"input\": \"####\\r\\n.#..\\r\\n####\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"####\\r\\n....\\r\\n####\\r\\n....\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"....\\r\\n....\\r\\n....\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"###.\\r\\n...#\\r\\n###.\\r\\n...#\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".##.\\r\\n#..#\\r\\n.##.\\r\\n#..#\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".#.#\\r\\n#.#.\\r\\n.#.#\\r\\n#.#.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"##..\\r\\n..##\\r\\n##..\\r\\n..##\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"#.#.\\r\\n#.#.\\r\\n.#.#\\r\\n.#.#\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".#.#\\r\\n#.#.\\r\\n#.#.\\r\\n#.#.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".#.#\\r\\n#.#.\\r\\n#.#.\\r\\n.#.#\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"#.#.\\r\\n#.#.\\r\\n#.#.\\r\\n#.#.\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \".#.#\\r\\n.#.#\\r\\n.#.#\\r\\n.#.#\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"#..#\\r\\n.##.\\r\\n####\\r\\n####\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"#.#.\\r\\n.###\\r\\n#.#.\\r\\n.###\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"#..#\\r\\n.##.\\r\\n.##.\\r\\n#..#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".##.\\r\\n.#..\\r\\n##.#\\r\\n#..#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".##.\\r\\n##..\\r\\n#..#\\r\\n..##\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"##..\\r\\n##..\\r\\n..##\\r\\n..##\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".#..\\r\\n###.\\r\\n.#.#\\r\\n..#.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"####\\r\\n#...\\r\\n#.#.\\r\\n#...\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"###.\\r\\n###.\\r\\n...#\\r\\n...#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"####\\r\\n#..#\\r\\n.##.\\r\\n....\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"#.##\\r\\n##.#\\r\\n#.##\\r\\n##.#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".#.#\\r\\n#.#.\\r\\n.#.#\\r\\n#.##\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"##..\\r\\n..##\\r\\n##..\\r\\n...#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".#..\\r\\n..##\\r\\n##..\\r\\n..##\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"##..\\r\\n...#\\r\\n##..\\r\\n...#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \".#..\\r\\n..#.\\r\\n.#..\\r\\n..#.\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n....\\r\\n....\\r\\n.#.#\\r\\n\", \"output\": [\"YES\"]}, {\"input\": \"....\\r\\n....\\r\\n....\\r\\n...#\\r\\n\", \"output\": [\"YES\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '###.\\r\\n...#\\r\\n###.\\r\\n...#\\r\\n', 'output': ['NO']}, {'input': '####\\r\\n.#..\\r\\n####\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '#..#\\r\\n.##.\\r\\n.##.\\r\\n#..#\\r\\n', 'output': ['YES']}, {'input': '.#..\\r\\n..##\\r\\n##..\\r\\n..##\\r\\n', 'output': ['YES']}, {'input': '.#..\\r\\n###.\\r\\n.#.#\\r\\n..#.\\r\\n', 'output': ['YES']}]","human_sample_testcases_2":"[{'input': '....\\r\\n....\\r\\n....\\r\\n...#\\r\\n', 'output': ['YES']}, {'input': '.#.#\\r\\n#.#.\\r\\n#.#.\\r\\n#.#.\\r\\n', 'output': ['NO']}, {'input': '##..\\r\\n..##\\r\\n##..\\r\\n..##\\r\\n', 'output': ['NO']}, {'input': '.##.\\r\\n#..#\\r\\n.##.\\r\\n#..#\\r\\n', 'output': ['NO']}, {'input': '.##.\\r\\n##..\\r\\n#..#\\r\\n..##\\r\\n', 'output': ['YES']}]","human_sample_testcases_3":"[{'input': '##..\\r\\n...#\\r\\n##..\\r\\n...#\\r\\n', 'output': ['YES']}, {'input': '####\\r\\n#..#\\r\\n.##.\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '#.#.\\r\\n.###\\r\\n#.#.\\r\\n.###\\r\\n', 'output': ['YES']}, {'input': '.##.\\r\\n##..\\r\\n#..#\\r\\n..##\\r\\n', 'output': ['YES']}, {'input': '#..#\\r\\n.##.\\r\\n####\\r\\n####\\r\\n', 'output': ['YES']}]","human_sample_testcases_4":"[{'input': '#..#\\r\\n.##.\\r\\n####\\r\\n####\\r\\n', 'output': ['YES']}, {'input': '#..#\\r\\n.##.\\r\\n.##.\\r\\n#..#\\r\\n', 'output': ['YES']}, {'input': '###.\\r\\n...#\\r\\n###.\\r\\n...#\\r\\n', 'output': ['NO']}, {'input': '###.\\r\\n###.\\r\\n...#\\r\\n...#\\r\\n', 'output': ['YES']}, {'input': '.#.#\\r\\n#.#.\\r\\n.#.#\\r\\n#.##\\r\\n', 'output': ['YES']}]","human_sample_testcases_5":"[{'input': '.#.#\\r\\n#.#.\\r\\n#.#.\\r\\n.#.#\\r\\n', 'output': ['NO']}, {'input': '####\\r\\n....\\r\\n####\\r\\n....\\r\\n', 'output': ['NO']}, {'input': '####\\r\\n.#..\\r\\n####\\r\\n....\\r\\n', 'output': ['YES']}, {'input': '##..\\r\\n##..\\r\\n..##\\r\\n..##\\r\\n', 'output': ['YES']}, {'input': '.#..\\r\\n..#.\\r\\n.#..\\r\\n..#.\\r\\n', 'output': ['YES']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":391,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"390\", \"7\", \"1000000000\"]","input_specification":"The only input line contains the integer $$$n$$$ ($$$1 \\le n \\le 2\\cdot10^9$$$).","src_uid":"38690bd32e7d0b314f701f138ce19dfb","source_code":"import math\ni=int(input())\nmax=0\nk=len(str(i))-1\nif i<10:\n print(i)\nelse:\n list=[]\n p=str(i)\n for m in p:\n list.append(int(m))\n p=list\n m=1\n for j in p:\n m*=j\n if m>max:\n max=m\n m=1\n for l in range(k,0,-1):\n q=i\n minus=i%10**l+1\n q-=minus\n list=[]\n p=str(q)\n for m in p:\n list.append(int(m))\n p=list\n m=1\n for j in p:\n m*=j\n if m>max:\n max=m\n print(max)\n ","sample_outputs":"[\"216\", \"7\", \"387420489\"]","lang_cluster":"Python","notes":"NoteIn the first example the maximum product is achieved for $$$389$$$ (the product of digits is $$$3\\cdot8\\cdot9=216$$$).In the second example the maximum product is achieved for $$$7$$$ (the product of digits is $$$7$$$).In the third example the maximum product is achieved for $$$999999999$$$ (the product of digits is $$$9^9=387420489$$$).","output_specification":"Print the maximum product of digits among all integers from $$$1$$$ to $$$n$$$.","description":"Kurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deeper.Help Kurt find the maximum possible product of digits among all integers from $$$1$$$ to $$$n$$$.","human_testcases":"[{\"input\": \"390\\r\\n\", \"output\": [\"216\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000000000\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2000000000\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"4876\\r\\n\", \"output\": [\"2268\"]}, {\"input\": \"889878787\\r\\n\", \"output\": [\"301327047\"]}, {\"input\": \"1382011913\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"999999999\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"396579088\\r\\n\", \"output\": [\"114791256\"]}, {\"input\": \"890133136\\r\\n\", \"output\": [\"306110016\"]}, {\"input\": \"485908655\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"261560170\\r\\n\", \"output\": [\"47829690\"]}, {\"input\": \"391789744\\r\\n\", \"output\": [\"114791256\"]}, {\"input\": \"480330141\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"691993260\\r\\n\", \"output\": [\"229582512\"]}, {\"input\": \"483212601\\r\\n\", \"output\": [\"133923132\"]}, {\"input\": \"892295273\\r\\n\", \"output\": [\"306110016\"]}, {\"input\": \"389041744\\r\\n\", \"output\": [\"102036672\"]}, {\"input\": \"282587478\\r\\n\", \"output\": [\"66961566\"]}, {\"input\": \"791812587\\r\\n\", \"output\": [\"267846264\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"19\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"98\\r\\n\", \"output\": [\"72\"]}, {\"input\": \"99\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"100\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"101\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"997\\r\\n\", \"output\": [\"648\"]}, {\"input\": \"998\\r\\n\", \"output\": [\"648\"]}, {\"input\": \"999\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"1000\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"1001\\r\\n\", \"output\": [\"729\"]}, {\"input\": \"25\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"278\\r\\n\", \"output\": [\"112\"]}, {\"input\": \"1999999999\\r\\n\", \"output\": [\"387420489\"]}, {\"input\": \"2690\\r\\n\", \"output\": [\"864\"]}, {\"input\": \"268\\r\\n\", \"output\": [\"96\"]}, {\"input\": \"289664200\\r\\n\", \"output\": [\"68024448\"]}, {\"input\": \"288\\r\\n\", \"output\": [\"128\"]}, {\"input\": \"1999999998\\r\\n\", \"output\": [\"387420489\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '1382011913\\r\\n', 'output': ['387420489']}, {'input': '480330141\\r\\n', 'output': ['133923132']}, {'input': '99\\r\\n', 'output': ['81']}, {'input': '1\\r\\n', 'output': ['1']}, {'input': '101\\r\\n', 'output': ['81']}]","human_sample_testcases_2":"[{'input': '1999999998\\r\\n', 'output': ['387420489']}, {'input': '19\\r\\n', 'output': ['9']}, {'input': '2\\r\\n', 'output': ['2']}, {'input': '288\\r\\n', 'output': ['128']}, {'input': '396579088\\r\\n', 'output': ['114791256']}]","human_sample_testcases_3":"[{'input': '691993260\\r\\n', 'output': ['229582512']}, {'input': '1382011913\\r\\n', 'output': ['387420489']}, {'input': '288\\r\\n', 'output': ['128']}, {'input': '1999999998\\r\\n', 'output': ['387420489']}, {'input': '282587478\\r\\n', 'output': ['66961566']}]","human_sample_testcases_4":"[{'input': '98\\r\\n', 'output': ['72']}, {'input': '1001\\r\\n', 'output': ['729']}, {'input': '1000\\r\\n', 'output': ['729']}, {'input': '4876\\r\\n', 'output': ['2268']}, {'input': '999999999\\r\\n', 'output': ['387420489']}]","human_sample_testcases_5":"[{'input': '3\\r\\n', 'output': ['3']}, {'input': '11\\r\\n', 'output': ['9']}, {'input': '2690\\r\\n', 'output': ['864']}, {'input': '98\\r\\n', 'output': ['72']}, {'input': '999999999\\r\\n', 'output': ['387420489']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":96.88,"human_sample_line_coverage_4":96.88,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":93.75,"human_sample_branch_coverage_4":93.75,"human_sample_branch_coverage_5":100.0,"id":392,"human_sample_pass_rate":100.0,"human_sample_line_coverage":98.752,"human_sample_branch_coverage":97.5} {"sample_inputs":"[\"500 1000 20 30\", \"1000 1000 1 1\", \"1500 1000 176 177\"]","input_specification":"The first line contains four integers a, b, c, d (250\u2009\u2264\u2009a,\u2009b\u2009\u2264\u20093500, 0\u2009\u2264\u2009c,\u2009d\u2009\u2264\u2009180). It is guaranteed that numbers a and b are divisible by 250 (just like on any real Codeforces round).","src_uid":"95b19d7569d6b70bd97d46a8541060d0","source_code":"\na,b,c,d = map(int, input().split())\ns1 = max(0.3 * a, int(a * (1 - c \/ 250)))\ns2 = max(0.3 * b, int(b * (1 - d \/ 250)))\nif s1 > s2:\n\tprint('Misha')\nelif s1 == s2:\n\tprint('Tie')\nelse:\n\tprint('Vasya')","sample_outputs":"[\"Vasya\", \"Tie\", \"Misha\"]","lang_cluster":"Python","notes":null,"output_specification":"Output on a single line: \"Misha\" (without the quotes), if Misha got more points than Vasya. \"Vasya\" (without the quotes), if Vasya got more points than Misha. \"Tie\" (without the quotes), if both of them got the same number of points.","description":"Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully submitted it at the first attempt. Misha solved the problem that costs a points and Vasya solved the problem that costs b points. Besides, Misha submitted the problem c minutes after the contest started and Vasya submitted the problem d minutes after the contest started. As you know, on Codeforces the cost of a problem reduces as a round continues. That is, if you submit a problem that costs p points t minutes after the contest started, you get points. Misha and Vasya are having an argument trying to find out who got more points. Help them to find out the truth.","human_testcases":"[{\"input\": \"500 1000 20 30\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"1000 1000 1 1\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1500 1000 176 177\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"1500 1000 74 177\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"750 2500 175 178\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"750 1000 54 103\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"2000 1250 176 130\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1250 1750 145 179\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"2000 2000 176 179\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1500 1500 148 148\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"2750 1750 134 147\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"3250 250 175 173\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"500 500 170 176\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"250 1000 179 178\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"3250 1000 160 138\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"3000 2000 162 118\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1500 1250 180 160\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1250 2500 100 176\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"3500 3500 177 178\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"3000 3250 16 34\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"1750 3000 137 49\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"500 1500 179 71\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"1250 2000 101 180\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"250 750 180 176\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"2250 2250 163 145\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"3000 3000 176 78\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"250 3500 8 178\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"1750 1250 179 180\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"2750 1750 13 164\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"1750 2250 178 53\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"2500 2750 73 179\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"1000 3500 178 175\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"1000 500 7 162\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"1000 250 175 48\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"1750 500 166 177\\r\\n\", \"output\": [\"Misha\"]}, {\"input\": \"250 250 0 0\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"250 3500 0 0\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"250 3500 0 180\\r\\n\", \"output\": [\"Vasya\"]}, {\"input\": \"3500 3500 180 180\\r\\n\", \"output\": [\"Tie\"]}, {\"input\": \"3500 250 0 180\\r\\n\", \"output\": [\"Misha\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2500 2750 73 179\\r\\n', 'output': ['Misha']}, {'input': '1500 1000 74 177\\r\\n', 'output': ['Misha']}, {'input': '3000 2000 162 118\\r\\n', 'output': ['Tie']}, {'input': '1500 1250 180 160\\r\\n', 'output': ['Tie']}, {'input': '250 250 0 0\\r\\n', 'output': ['Tie']}]","human_sample_testcases_2":"[{'input': '1500 1250 180 160\\r\\n', 'output': ['Tie']}, {'input': '3000 3000 176 78\\r\\n', 'output': ['Vasya']}, {'input': '3250 1000 160 138\\r\\n', 'output': ['Misha']}, {'input': '1000 3500 178 175\\r\\n', 'output': ['Vasya']}, {'input': '3500 250 0 180\\r\\n', 'output': ['Misha']}]","human_sample_testcases_3":"[{'input': '250 250 0 0\\r\\n', 'output': ['Tie']}, {'input': '500 1500 179 71\\r\\n', 'output': ['Vasya']}, {'input': '1500 1000 74 177\\r\\n', 'output': ['Misha']}, {'input': '3250 1000 160 138\\r\\n', 'output': ['Misha']}, {'input': '1750 3000 137 49\\r\\n', 'output': ['Vasya']}]","human_sample_testcases_4":"[{'input': '3000 3250 16 34\\r\\n', 'output': ['Tie']}, {'input': '3500 3500 177 178\\r\\n', 'output': ['Tie']}, {'input': '2000 2000 176 179\\r\\n', 'output': ['Tie']}, {'input': '3000 3000 176 78\\r\\n', 'output': ['Vasya']}, {'input': '2500 2750 73 179\\r\\n', 'output': ['Misha']}]","human_sample_testcases_5":"[{'input': '1000 1000 1 1\\r\\n', 'output': ['Tie']}, {'input': '1750 3000 137 49\\r\\n', 'output': ['Vasya']}, {'input': '1750 2250 178 53\\r\\n', 'output': ['Vasya']}, {'input': '250 3500 0 180\\r\\n', 'output': ['Vasya']}, {'input': '500 500 170 176\\r\\n', 'output': ['Misha']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":75.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":393,"human_sample_pass_rate":100.0,"human_sample_line_coverage":97.5,"human_sample_branch_coverage":95.0} {"sample_inputs":"[\"19\", \"16\"]","input_specification":"The first and only line contains an integer $$$r$$$ ($$$1 \\le r \\le 10^{12}$$$).","src_uid":"3ff1c25a1026c90aeb14d148d7fb96ba","source_code":"r = int(input())\ny = int((r-3)\/2)\nif(r&1 and y > 0):\n\tprint(\"{} {}\".format(1,y))\n\t\nelse :\n\tprint(\"NO\")","sample_outputs":"[\"1 8\", \"NO\"]","lang_cluster":"Python","notes":null,"output_specification":"Output integers $$$x, y$$$ such that $$$H(x,y) = r$$$ and $$$x$$$ is smallest possible, or \"NO\" if no such pair exists.","description":"Melody Pond was stolen from her parents as a newborn baby by Madame Kovarian, to become a weapon of the Silence in their crusade against the Doctor. Madame Kovarian changed Melody's name to River Song, giving her a new identity that allowed her to kill the Eleventh Doctor.Heidi figured out that Madame Kovarian uses a very complicated hashing function in order to change the names of the babies she steals. In order to prevent this from happening to future Doctors, Heidi decided to prepare herself by learning some basic hashing techniques.The first hashing function she designed is as follows.Given two positive integers $$$(x, y)$$$ she defines $$$H(x,y):=x^2+2xy+x+1$$$.Now, Heidi wonders if the function is reversible. That is, given a positive integer $$$r$$$, can you find a pair $$$(x, y)$$$ (of positive integers) such that $$$H(x, y) = r$$$?If multiple such pairs exist, output the one with smallest possible $$$x$$$. If there is no such pair, output \"NO\".","human_testcases":"[{\"input\": \"19\\r\\n\", \"output\": [\"1 8\"]}, {\"input\": \"16\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"1\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"2\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"3\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"4\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"5\\r\\n\", \"output\": [\"1 1\"]}, {\"input\": \"6\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"7\\r\\n\", \"output\": [\"1 2\"]}, {\"input\": \"8\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"9\\r\\n\", \"output\": [\"1 3\"]}, {\"input\": \"10\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"11\\r\\n\", \"output\": [\"1 4\"]}, {\"input\": \"12\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"13\\r\\n\", \"output\": [\"1 5\"]}, {\"input\": \"14\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"15\\r\\n\", \"output\": [\"1 6\"]}, {\"input\": \"17\\r\\n\", \"output\": [\"1 7\"]}, {\"input\": \"18\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"20\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"21\\r\\n\", \"output\": [\"1 9\"]}, {\"input\": \"260158260522\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"250877914575\\r\\n\", \"output\": [\"1 125438957286\"]}, {\"input\": \"116602436426\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"540024979445\\r\\n\", \"output\": [\"1 270012489721\"]}, {\"input\": \"917861648772\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"962623690081\\r\\n\", \"output\": [\"1 481311845039\"]}, {\"input\": \"54433933447\\r\\n\", \"output\": [\"1 27216966722\"]}, {\"input\": \"16476190629\\r\\n\", \"output\": [\"1 8238095313\"]}, {\"input\": \"426262703497\\r\\n\", \"output\": [\"1 213131351747\"]}, {\"input\": \"723211047202\\r\\n\", \"output\": [\"NO\"]}, {\"input\": \"652509336151\\r\\n\", \"output\": [\"1 326254668074\"]}, {\"input\": \"215283472163\\r\\n\", \"output\": [\"1 107641736080\"]}, {\"input\": \"29617919\\r\\n\", \"output\": [\"1 14808958\"]}, {\"input\": \"7505295085\\r\\n\", \"output\": [\"1 3752647541\"]}, {\"input\": \"149890929717\\r\\n\", \"output\": [\"1 74945464857\"]}, {\"input\": \"185589070745\\r\\n\", \"output\": [\"1 92794535371\"]}, {\"input\": \"419450839\\r\\n\", \"output\": [\"1 209725418\"]}, {\"input\": \"519397679401\\r\\n\", \"output\": [\"1 259698839699\"]}, {\"input\": \"943447972637\\r\\n\", \"output\": [\"1 471723986317\"]}, {\"input\": \"54336309171\\r\\n\", \"output\": [\"1 27168154584\"]}, {\"input\": \"688373050717\\r\\n\", \"output\": [\"1 344186525357\"]}, {\"input\": \"156231653273\\r\\n\", \"output\": [\"1 78115826635\"]}, {\"input\": \"23744498401\\r\\n\", \"output\": [\"1 11872249199\"]}, {\"input\": \"768407398177\\r\\n\", \"output\": [\"1 384203699087\"]}, {\"input\": \"963761198401\\r\\n\", \"output\": [\"1 481880599199\"]}, {\"input\": \"240940299601\\r\\n\", \"output\": [\"1 120470149799\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '2\\r\\n', 'output': ['NO']}, {'input': '3\\r\\n', 'output': ['NO']}, {'input': '240940299601\\r\\n', 'output': ['1 120470149799']}, {'input': '260158260522\\r\\n', 'output': ['NO']}, {'input': '185589070745\\r\\n', 'output': ['1 92794535371']}]","human_sample_testcases_2":"[{'input': '9\\r\\n', 'output': ['1 3']}, {'input': '14\\r\\n', 'output': ['NO']}, {'input': '963761198401\\r\\n', 'output': ['1 481880599199']}, {'input': '8\\r\\n', 'output': ['NO']}, {'input': '419450839\\r\\n', 'output': ['1 209725418']}]","human_sample_testcases_3":"[{'input': '962623690081\\r\\n', 'output': ['1 481311845039']}, {'input': '13\\r\\n', 'output': ['1 5']}, {'input': '215283472163\\r\\n', 'output': ['1 107641736080']}, {'input': '4\\r\\n', 'output': ['NO']}, {'input': '419450839\\r\\n', 'output': ['1 209725418']}]","human_sample_testcases_4":"[{'input': '3\\r\\n', 'output': ['NO']}, {'input': '768407398177\\r\\n', 'output': ['1 384203699087']}, {'input': '426262703497\\r\\n', 'output': ['1 213131351747']}, {'input': '688373050717\\r\\n', 'output': ['1 344186525357']}, {'input': '8\\r\\n', 'output': ['NO']}]","human_sample_testcases_5":"[{'input': '116602436426\\r\\n', 'output': ['NO']}, {'input': '10\\r\\n', 'output': ['NO']}, {'input': '1\\r\\n', 'output': ['NO']}, {'input': '963761198401\\r\\n', 'output': ['1 481880599199']}, {'input': '250877914575\\r\\n', 'output': ['1 125438957286']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":394,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 1 1\", \"5 2 3\"]","input_specification":"The only line contains three integers n, a and b (0\u2009\u2264\u2009a,\u2009b\u2009<\u2009n\u2009\u2264\u2009100).","src_uid":"51a072916bff600922a77da0c4582180","source_code":"n,a,b = map(int, input().split(' '))\nprint(n-max(a+1,n-b)+1)","sample_outputs":"[\"2\", \"3\"]","lang_cluster":"Python","notes":"NoteThe possible positions in the first sample are: 2 and 3 (if we number the positions starting with 1).In the second sample they are 3, 4 and 5.","output_specification":"Print the single number \u2014 the number of the sought positions.","description":"Petr stands in line of n people, but he doesn't know exactly which position he occupies. He can say that there are no less than a people standing in front of him and no more than b people standing behind him. Find the number of different positions Petr can occupy.","human_testcases":"[{\"input\": \"3 1 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 2 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 4 0\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 5 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"9 4 3\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"11 4 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"13 8 7\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"14 5 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"16 6 9\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"20 13 17\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"22 4 8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"23 8 14\\r\\n\", \"output\": [\"15\"]}, {\"input\": \"26 18 22\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"28 6 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"29 5 23\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"32 27 15\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"33 11 5\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"37 21 15\\r\\n\", \"output\": [\"16\"]}, {\"input\": \"39 34 33\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"41 27 11\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"42 25 16\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"45 7 43\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"47 16 17\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"49 11 37\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"51 38 39\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"52 29 7\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"56 43 12\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"58 57 28\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"59 12 39\\r\\n\", \"output\": [\"40\"]}, {\"input\": \"62 9 52\\r\\n\", \"output\": [\"53\"]}, {\"input\": \"63 29 44\\r\\n\", \"output\": [\"34\"]}, {\"input\": \"65 30 22\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"66 27 38\\r\\n\", \"output\": [\"39\"]}, {\"input\": \"71 33 53\\r\\n\", \"output\": [\"38\"]}, {\"input\": \"73 14 12\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"73 37 35\\r\\n\", \"output\": [\"36\"]}, {\"input\": \"76 69 44\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"79 25 20\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"81 60 20\\r\\n\", \"output\": [\"21\"]}, {\"input\": \"81 79 14\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"84 0 42\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"88 79 8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"90 76 59\\r\\n\", \"output\": [\"14\"]}, {\"input\": \"92 2 22\\r\\n\", \"output\": [\"23\"]}, {\"input\": \"94 5 88\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"94 62 48\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"96 22 72\\r\\n\", \"output\": [\"73\"]}, {\"input\": \"100 11 88\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"100 81 91\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"1 0 0\\r\\n\", \"output\": [\"1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '5 2 3\\r\\n', 'output': ['3']}, {'input': '23 8 14\\r\\n', 'output': ['15']}, {'input': '71 33 53\\r\\n', 'output': ['38']}, {'input': '39 34 33\\r\\n', 'output': ['5']}, {'input': '62 9 52\\r\\n', 'output': ['53']}]","human_sample_testcases_2":"[{'input': '3 1 1\\r\\n', 'output': ['2']}, {'input': '23 8 14\\r\\n', 'output': ['15']}, {'input': '73 14 12\\r\\n', 'output': ['13']}, {'input': '62 9 52\\r\\n', 'output': ['53']}, {'input': '11 4 6\\r\\n', 'output': ['7']}]","human_sample_testcases_3":"[{'input': '59 12 39\\r\\n', 'output': ['40']}, {'input': '62 9 52\\r\\n', 'output': ['53']}, {'input': '58 57 28\\r\\n', 'output': ['1']}, {'input': '41 27 11\\r\\n', 'output': ['12']}, {'input': '66 27 38\\r\\n', 'output': ['39']}]","human_sample_testcases_4":"[{'input': '71 33 53\\r\\n', 'output': ['38']}, {'input': '56 43 12\\r\\n', 'output': ['13']}, {'input': '51 38 39\\r\\n', 'output': ['13']}, {'input': '62 9 52\\r\\n', 'output': ['53']}, {'input': '22 4 8\\r\\n', 'output': ['9']}]","human_sample_testcases_5":"[{'input': '5 4 0\\r\\n', 'output': ['1']}, {'input': '62 9 52\\r\\n', 'output': ['53']}, {'input': '100 81 91\\r\\n', 'output': ['19']}, {'input': '100 11 88\\r\\n', 'output': ['89']}, {'input': '14 5 5\\r\\n', 'output': ['6']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":395,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"6 4\\n5237\\n2753\\n7523\\n5723\\n5327\\n2537\", \"3 3\\n010\\n909\\n012\", \"7 5\\n50808\\n36603\\n37198\\n44911\\n29994\\n42543\\n50156\"]","input_specification":"The first line contains integers n and k \u2014 the number and digit capacity of numbers correspondingly (1\u2009\u2264\u2009n,\u2009k\u2009\u2264\u20098). Next n lines contain k-digit positive integers. Leading zeroes are allowed both in the initial integers and the integers resulting from the rearranging of digits.","src_uid":"08f85cd4ffbd135f0b630235209273a4","source_code":"\nimport itertools, sys\n\nn, k = [int(x) for x in input().split()]\n\nperms = zip(*[[int(''.join(p)) for p in itertools.permutations(input())] for y in range(n)])\n\nperms = list(perms)\n\n# print(perms)\n\nminimum = float(\"inf\")\n\nfor p in perms:\n\n\ttemp = max(p) - min(p)\n\n\tif temp < minimum:\n\t\tminimum = temp\n\nprint(minimum)\n\n\n\n# Made By Mostafa_Khaled","sample_outputs":"[\"2700\", \"3\", \"20522\"]","lang_cluster":"Python","notes":"NoteIn the first sample, if we rearrange the digits in numbers as (3,1,4,2), then the 2-nd and the 4-th numbers will equal 5237 and 2537 correspondingly (they will be maximum and minimum for such order of digits).In the second sample, if we swap the second digits and the first ones, we get integers 100, 99 and 102.","output_specification":"Print a single number: the minimally possible difference between the largest and the smallest number after the digits are rearranged in all integers by the same rule.","description":"You are given n k-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the smallest number was minimum. Digits should be rearranged by the same rule in all integers.","human_testcases":"[{\"input\": \"6 4\\r\\n5237\\r\\n2753\\r\\n7523\\r\\n5723\\r\\n5327\\r\\n2537\\r\\n\", \"output\": [\"2700\"]}, {\"input\": \"3 3\\r\\n010\\r\\n909\\r\\n012\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 5\\r\\n50808\\r\\n36603\\r\\n37198\\r\\n44911\\r\\n29994\\r\\n42543\\r\\n50156\\r\\n\", \"output\": [\"20522\"]}, {\"input\": \"5 5\\r\\n61374\\r\\n74304\\r\\n41924\\r\\n46010\\r\\n09118\\r\\n\", \"output\": [\"64592\"]}, {\"input\": \"8 8\\r\\n68785928\\r\\n11981277\\r\\n32480720\\r\\n72495162\\r\\n69969623\\r\\n42118868\\r\\n64235849\\r\\n81412116\\r\\n\", \"output\": [\"52901157\"]}, {\"input\": \"7 1\\r\\n1\\r\\n0\\r\\n8\\r\\n5\\r\\n4\\r\\n9\\r\\n8\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"3 8\\r\\n34848224\\r\\n16307102\\r\\n25181102\\r\\n\", \"output\": [\"8612277\"]}, {\"input\": \"2 8\\r\\n13633861\\r\\n68468345\\r\\n\", \"output\": [\"14445725\"]}, {\"input\": \"4 4\\r\\n0950\\r\\n0634\\r\\n9264\\r\\n8684\\r\\n\", \"output\": [\"3738\"]}, {\"input\": \"6 5\\r\\n65777\\r\\n80932\\r\\n32260\\r\\n49089\\r\\n00936\\r\\n85557\\r\\n\", \"output\": [\"41439\"]}, {\"input\": \"5 6\\r\\n687443\\r\\n279213\\r\\n765651\\r\\n611680\\r\\n500192\\r\\n\", \"output\": [\"258067\"]}, {\"input\": \"8 6\\r\\n034753\\r\\n917195\\r\\n222679\\r\\n778596\\r\\n980006\\r\\n467267\\r\\n482763\\r\\n807481\\r\\n\", \"output\": [\"647026\"]}, {\"input\": \"8 6\\r\\n075967\\r\\n240855\\r\\n352399\\r\\n791547\\r\\n103244\\r\\n982259\\r\\n409866\\r\\n926586\\r\\n\", \"output\": [\"491255\"]}, {\"input\": \"3 1\\r\\n7\\r\\n2\\r\\n9\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6 4\\r\\n5407\\r\\n4617\\r\\n3050\\r\\n7647\\r\\n8647\\r\\n1993\\r\\n\", \"output\": [\"6474\"]}, {\"input\": \"8 5\\r\\n47553\\r\\n55138\\r\\n81768\\r\\n78902\\r\\n50691\\r\\n73010\\r\\n93969\\r\\n01675\\r\\n\", \"output\": [\"71123\"]}, {\"input\": \"8 7\\r\\n5945843\\r\\n9094433\\r\\n0750024\\r\\n6255984\\r\\n1784849\\r\\n7275947\\r\\n6513944\\r\\n0145523\\r\\n\", \"output\": [\"5152379\"]}, {\"input\": \"8 7\\r\\n8112819\\r\\n8982110\\r\\n5457941\\r\\n4575033\\r\\n5203331\\r\\n7410823\\r\\n0532182\\r\\n8151054\\r\\n\", \"output\": [\"6194602\"]}, {\"input\": \"8 8\\r\\n63315032\\r\\n20587190\\r\\n05461152\\r\\n76872565\\r\\n71177578\\r\\n53541174\\r\\n00451913\\r\\n85740357\\r\\n\", \"output\": [\"60622457\"]}, {\"input\": \"2 3\\r\\n135\\r\\n725\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"7 1\\r\\n9\\r\\n5\\r\\n8\\r\\n9\\r\\n7\\r\\n6\\r\\n9\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"5 3\\r\\n560\\r\\n978\\r\\n543\\r\\n846\\r\\n714\\r\\n\", \"output\": [\"435\"]}, {\"input\": \"7 2\\r\\n53\\r\\n74\\r\\n84\\r\\n62\\r\\n14\\r\\n77\\r\\n59\\r\\n\", \"output\": [\"69\"]}, {\"input\": \"3 4\\r\\n0537\\r\\n2174\\r\\n5299\\r\\n\", \"output\": [\"3583\"]}, {\"input\": \"7 5\\r\\n13532\\r\\n16394\\r\\n97663\\r\\n73133\\r\\n22712\\r\\n58185\\r\\n65035\\r\\n\", \"output\": [\"26455\"]}, {\"input\": \"8 5\\r\\n07936\\r\\n07927\\r\\n46068\\r\\n99158\\r\\n90958\\r\\n41283\\r\\n59266\\r\\n87841\\r\\n\", \"output\": [\"52364\"]}, {\"input\": \"8 6\\r\\n867468\\r\\n695388\\r\\n700723\\r\\n444270\\r\\n545657\\r\\n178053\\r\\n315040\\r\\n554471\\r\\n\", \"output\": [\"559559\"]}, {\"input\": \"7 7\\r\\n6575460\\r\\n6965366\\r\\n1912357\\r\\n7080608\\r\\n2561692\\r\\n5209630\\r\\n0439095\\r\\n\", \"output\": [\"5917123\"]}, {\"input\": \"1 2\\r\\n96\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3\\r\\n289\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 8\\r\\n78795220\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 7\\r\\n2407792\\r\\n7023368\\r\\n2609925\\r\\n0587109\\r\\n3543873\\r\\n6602371\\r\\n4579875\\r\\n9893509\\r\\n\", \"output\": [\"6790457\"]}, {\"input\": \"4 6\\r\\n065169\\r\\n150326\\r\\n924608\\r\\n490012\\r\\n\", \"output\": [\"488134\"]}, {\"input\": \"4 4\\r\\n8851\\r\\n6190\\r\\n0521\\r\\n1659\\r\\n\", \"output\": [\"6596\"]}, {\"input\": \"4 4\\r\\n4381\\r\\n3147\\r\\n7017\\r\\n5593\\r\\n\", \"output\": [\"3690\"]}, {\"input\": \"8 4\\r\\n0344\\r\\n9196\\r\\n1379\\r\\n5470\\r\\n0989\\r\\n8316\\r\\n7096\\r\\n7918\\r\\n\", \"output\": [\"7801\"]}, {\"input\": \"1 6\\r\\n430254\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"8 1\\r\\n4\\r\\n0\\r\\n8\\r\\n5\\r\\n9\\r\\n0\\r\\n4\\r\\n7\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"5 2\\r\\n60\\r\\n08\\r\\n77\\r\\n66\\r\\n03\\r\\n\", \"output\": [\"74\"]}, {\"input\": \"3 1\\r\\n9\\r\\n8\\r\\n2\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"7 2\\r\\n89\\r\\n00\\r\\n59\\r\\n90\\r\\n99\\r\\n22\\r\\n55\\r\\n\", \"output\": [\"99\"]}, {\"input\": \"2 4\\r\\n7694\\r\\n6577\\r\\n\", \"output\": [\"712\"]}, {\"input\": \"8 8\\r\\n68785928\\r\\n11981277\\r\\n32480720\\r\\n72495162\\r\\n69969623\\r\\n42118868\\r\\n64235849\\r\\n81412116\\r\\n\", \"output\": [\"52901157\"]}, {\"input\": \"2 7\\r\\n9183508\\r\\n9276377\\r\\n\", \"output\": [\"26912\"]}, {\"input\": \"5 4\\r\\n7411\\r\\n3080\\r\\n9578\\r\\n5902\\r\\n3225\\r\\n\", \"output\": [\"6498\"]}, {\"input\": \"3 4\\r\\n0136\\r\\n4556\\r\\n4268\\r\\n\", \"output\": [\"2134\"]}, {\"input\": \"6 8\\r\\n99358096\\r\\n38390629\\r\\n71597322\\r\\n35940809\\r\\n48949759\\r\\n66204248\\r\\n\", \"output\": [\"53570178\"]}, {\"input\": \"7 2\\r\\n23\\r\\n11\\r\\n88\\r\\n25\\r\\n22\\r\\n45\\r\\n10\\r\\n\", \"output\": [\"78\"]}, {\"input\": \"2 3\\r\\n834\\r\\n630\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"4 2\\r\\n87\\r\\n03\\r\\n95\\r\\n23\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"2 8\\r\\n10715643\\r\\n97664296\\r\\n\", \"output\": [\"1244714\"]}, {\"input\": \"6 1\\r\\n9\\r\\n3\\r\\n1\\r\\n3\\r\\n4\\r\\n5\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"8 5\\r\\n47553\\r\\n55138\\r\\n81768\\r\\n78902\\r\\n50691\\r\\n73010\\r\\n93969\\r\\n01675\\r\\n\", \"output\": [\"71123\"]}, {\"input\": \"4 4\\r\\n7603\\r\\n0859\\r\\n5241\\r\\n7680\\r\\n\", \"output\": [\"5518\"]}, {\"input\": \"1 7\\r\\n4605461\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"3 4\\r\\n3061\\r\\n3404\\r\\n6670\\r\\n\", \"output\": [\"2916\"]}, {\"input\": \"8 4\\r\\n1847\\r\\n0962\\r\\n3216\\r\\n0772\\r\\n6399\\r\\n3082\\r\\n7997\\r\\n0625\\r\\n\", \"output\": [\"7246\"]}, {\"input\": \"2 6\\r\\n834527\\r\\n764560\\r\\n\", \"output\": [\"577\"]}, {\"input\": \"5 6\\r\\n959808\\r\\n303464\\r\\n414335\\r\\n758650\\r\\n828038\\r\\n\", \"output\": [\"486245\"]}, {\"input\": \"4 1\\r\\n0\\r\\n7\\r\\n5\\r\\n1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6 7\\r\\n4565736\\r\\n9842969\\r\\n1412800\\r\\n6411011\\r\\n5744909\\r\\n3791659\\r\\n\", \"output\": [\"4066781\"]}, {\"input\": \"4 1\\r\\n0\\r\\n7\\r\\n5\\r\\n1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1 3\\r\\n250\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"2 1\\r\\n2\\r\\n0\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 8\\r\\n96805230\\r\\n73119021\\r\\n06552907\\r\\n86283347\\r\\n88650846\\r\\n19155689\\r\\n37032451\\r\\n19310120\\r\\n\", \"output\": [\"53604668\"]}, {\"input\": \"3 2\\r\\n64\\r\\n94\\r\\n65\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"8 4\\r\\n8008\\r\\n4983\\r\\n0295\\r\\n0353\\r\\n5838\\r\\n1960\\r\\n0270\\r\\n7144\\r\\n\", \"output\": [\"7475\"]}, {\"input\": \"4 8\\r\\n22025344\\r\\n54085308\\r\\n77633421\\r\\n59238322\\r\\n\", \"output\": [\"7681556\"]}, {\"input\": \"5 3\\r\\n504\\r\\n878\\r\\n599\\r\\n683\\r\\n083\\r\\n\", \"output\": [\"615\"]}, {\"input\": \"5 4\\r\\n7663\\r\\n4755\\r\\n2941\\r\\n4588\\r\\n0232\\r\\n\", \"output\": [\"5346\"]}, {\"input\": \"6 2\\r\\n97\\r\\n57\\r\\n40\\r\\n99\\r\\n22\\r\\n94\\r\\n\", \"output\": [\"77\"]}, {\"input\": \"6 7\\r\\n4104025\\r\\n1370353\\r\\n3472874\\r\\n5258456\\r\\n5595923\\r\\n0279404\\r\\n\", \"output\": [\"2790148\"]}, {\"input\": \"8 2\\r\\n42\\r\\n86\\r\\n25\\r\\n30\\r\\n27\\r\\n64\\r\\n67\\r\\n38\\r\\n\", \"output\": [\"61\"]}, {\"input\": \"5 2\\r\\n52\\r\\n22\\r\\n05\\r\\n37\\r\\n74\\r\\n\", \"output\": [\"51\"]}, {\"input\": \"2 2\\r\\n63\\r\\n50\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"6 7\\r\\n4104025\\r\\n1370353\\r\\n3472874\\r\\n5258456\\r\\n5595923\\r\\n0279404\\r\\n\", \"output\": [\"2790148\"]}, {\"input\": \"6 2\\r\\n95\\r\\n56\\r\\n06\\r\\n46\\r\\n77\\r\\n51\\r\\n\", \"output\": [\"62\"]}, {\"input\": \"3 5\\r\\n97424\\r\\n96460\\r\\n47766\\r\\n\", \"output\": [\"9536\"]}, {\"input\": \"2 3\\r\\n596\\r\\n246\\r\\n\", \"output\": [\"35\"]}, {\"input\": \"3 1\\r\\n1\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 2\\r\\n87\\r\\n03\\r\\n95\\r\\n23\\r\\n\", \"output\": [\"48\"]}, {\"input\": \"7 5\\r\\n41078\\r\\n41257\\r\\n35324\\r\\n70082\\r\\n66783\\r\\n99954\\r\\n85784\\r\\n\", \"output\": [\"56901\"]}, {\"input\": \"8 7\\r\\n8943041\\r\\n2427704\\r\\n3775080\\r\\n2956111\\r\\n1345704\\r\\n0937172\\r\\n1979973\\r\\n7081540\\r\\n\", \"output\": [\"3544246\"]}, {\"input\": \"6 6\\r\\n505845\\r\\n903151\\r\\n055779\\r\\n733849\\r\\n508266\\r\\n029177\\r\\n\", \"output\": [\"249045\"]}, {\"input\": \"4 4\\r\\n1871\\r\\n9417\\r\\n7444\\r\\n4294\\r\\n\", \"output\": [\"5368\"]}, {\"input\": \"2 5\\r\\n60106\\r\\n07866\\r\\n\", \"output\": [\"5224\"]}, {\"input\": \"3 3\\r\\n195\\r\\n860\\r\\n567\\r\\n\", \"output\": [\"258\"]}, {\"input\": \"8 5\\r\\n68186\\r\\n57779\\r\\n78079\\r\\n47451\\r\\n69788\\r\\n82172\\r\\n75373\\r\\n50157\\r\\n\", \"output\": [\"32237\"]}, {\"input\": \"4 7\\r\\n5342341\\r\\n5194611\\r\\n4032103\\r\\n8739798\\r\\n\", \"output\": [\"4056779\"]}, {\"input\": \"4 8\\r\\n91401735\\r\\n53979237\\r\\n20857777\\r\\n94594293\\r\\n\", \"output\": [\"34567247\"]}, {\"input\": \"1 2\\r\\n95\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 4\\r\\n0443\\r\\n7108\\r\\n7211\\r\\n4287\\r\\n6439\\r\\n7711\\r\\n\", \"output\": [\"5301\"]}, {\"input\": \"6 7\\r\\n5794383\\r\\n4078451\\r\\n0263676\\r\\n7682294\\r\\n7436158\\r\\n3363189\\r\\n\", \"output\": [\"3560125\"]}, {\"input\": \"2 5\\r\\n07259\\r\\n51985\\r\\n\", \"output\": [\"23657\"]}, {\"input\": \"3 3\\r\\n624\\r\\n125\\r\\n097\\r\\n\", \"output\": [\"247\"]}, {\"input\": \"8 1\\r\\n9\\r\\n7\\r\\n6\\r\\n2\\r\\n9\\r\\n6\\r\\n4\\r\\n8\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"6 3\\r\\n530\\r\\n862\\r\\n874\\r\\n932\\r\\n972\\r\\n157\\r\\n\", \"output\": [\"442\"]}, {\"input\": \"3 2\\r\\n51\\r\\n39\\r\\n97\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"8 4\\r\\n4650\\r\\n1735\\r\\n4269\\r\\n8023\\r\\n0948\\r\\n9685\\r\\n3675\\r\\n6017\\r\\n\", \"output\": [\"6836\"]}, {\"input\": \"5 3\\r\\n168\\r\\n513\\r\\n110\\r\\n386\\r\\n501\\r\\n\", \"output\": [\"403\"]}, {\"input\": \"6 2\\r\\n01\\r\\n81\\r\\n60\\r\\n27\\r\\n23\\r\\n67\\r\\n\", \"output\": [\"70\"]}, {\"input\": \"4 4\\r\\n2759\\r\\n7250\\r\\n3572\\r\\n8067\\r\\n\", \"output\": [\"2028\"]}, {\"input\": \"8 5\\r\\n12658\\r\\n00588\\r\\n23491\\r\\n09985\\r\\n63973\\r\\n78517\\r\\n98187\\r\\n29863\\r\\n\", \"output\": [\"68592\"]}, {\"input\": \"3 1\\r\\n5\\r\\n4\\r\\n2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"7 8\\r\\n24925537\\r\\n07626274\\r\\n77060131\\r\\n82415056\\r\\n70422753\\r\\n60455207\\r\\n32176884\\r\\n\", \"output\": [\"54680138\"]}, {\"input\": \"5 8\\r\\n94157433\\r\\n85577189\\r\\n62547277\\r\\n11815893\\r\\n35445851\\r\\n\", \"output\": [\"15679126\"]}, {\"input\": \"5 5\\r\\n31164\\r\\n27213\\r\\n17981\\r\\n48806\\r\\n01273\\r\\n\", \"output\": [\"33367\"]}, {\"input\": \"3 6\\r\\n743197\\r\\n172242\\r\\n635654\\r\\n\", \"output\": [\"261245\"]}, {\"input\": \"4 6\\r\\n760130\\r\\n653002\\r\\n902824\\r\\n380915\\r\\n\", \"output\": [\"268111\"]}, {\"input\": \"8 8\\r\\n83239439\\r\\n62184887\\r\\n58968944\\r\\n39808261\\r\\n68740623\\r\\n38480328\\r\\n81965504\\r\\n52600488\\r\\n\", \"output\": [\"44481119\"]}, {\"input\": \"8 2\\r\\n99\\r\\n20\\r\\n22\\r\\n39\\r\\n33\\r\\n60\\r\\n54\\r\\n08\\r\\n\", \"output\": [\"91\"]}, {\"input\": \"1 7\\r\\n3545113\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"6 7\\r\\n3761949\\r\\n8095136\\r\\n4875085\\r\\n5017784\\r\\n4459097\\r\\n4354762\\r\\n\", \"output\": [\"4126934\"]}, {\"input\": \"6 8\\r\\n50157346\\r\\n63836375\\r\\n03176371\\r\\n83637145\\r\\n28631038\\r\\n18617159\\r\\n\", \"output\": [\"24702445\"]}, {\"input\": \"1 5\\r\\n84932\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 3\\r\\n204\\r\\n515\\r\\n280\\r\\n840\\r\\n\", \"output\": [\"467\"]}, {\"input\": \"8 2\\r\\n40\\r\\n41\\r\\n02\\r\\n55\\r\\n26\\r\\n52\\r\\n60\\r\\n25\\r\\n\", \"output\": [\"58\"]}, {\"input\": \"2 5\\r\\n90526\\r\\n32565\\r\\n\", \"output\": [\"586\"]}, {\"input\": \"4 4\\r\\n3058\\r\\n2370\\r\\n0288\\r\\n5983\\r\\n\", \"output\": [\"2972\"]}, {\"input\": \"6 7\\r\\n9085507\\r\\n7716507\\r\\n1952887\\r\\n6569746\\r\\n1900754\\r\\n9212439\\r\\n\", \"output\": [\"3180457\"]}, {\"input\": \"5 2\\r\\n01\\r\\n07\\r\\n63\\r\\n71\\r\\n99\\r\\n\", \"output\": [\"89\"]}, {\"input\": \"6 4\\r\\n4505\\r\\n3672\\r\\n4248\\r\\n2783\\r\\n9780\\r\\n6579\\r\\n\", \"output\": [\"4484\"]}, {\"input\": \"2 3\\r\\n281\\r\\n498\\r\\n\", \"output\": [\"127\"]}, {\"input\": \"8 5\\r\\n16966\\r\\n36762\\r\\n49579\\r\\n71703\\r\\n66646\\r\\n41125\\r\\n94022\\r\\n26623\\r\\n\", \"output\": [\"66868\"]}, {\"input\": \"1 6\\r\\n170086\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"4 1\\r\\n4\\r\\n2\\r\\n2\\r\\n2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 8\\r\\n12418144\\r\\n74773130\\r\\n10504811\\r\\n\", \"output\": [\"22901234\"]}, {\"input\": \"6 7\\r\\n3761949\\r\\n8095136\\r\\n4875085\\r\\n5017784\\r\\n4459097\\r\\n4354762\\r\\n\", \"output\": [\"4126934\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '4 1\\r\\n0\\r\\n7\\r\\n5\\r\\n1\\r\\n', 'output': ['7']}, {'input': '3 4\\r\\n0136\\r\\n4556\\r\\n4268\\r\\n', 'output': ['2134']}, {'input': '6 7\\r\\n9085507\\r\\n7716507\\r\\n1952887\\r\\n6569746\\r\\n1900754\\r\\n9212439\\r\\n', 'output': ['3180457']}, {'input': '4 4\\r\\n8851\\r\\n6190\\r\\n0521\\r\\n1659\\r\\n', 'output': ['6596']}, {'input': '2 5\\r\\n60106\\r\\n07866\\r\\n', 'output': ['5224']}]","human_sample_testcases_2":"[{'input': '1 6\\r\\n430254\\r\\n', 'output': ['0']}, {'input': '8 7\\r\\n8112819\\r\\n8982110\\r\\n5457941\\r\\n4575033\\r\\n5203331\\r\\n7410823\\r\\n0532182\\r\\n8151054\\r\\n', 'output': ['6194602']}, {'input': '6 7\\r\\n4104025\\r\\n1370353\\r\\n3472874\\r\\n5258456\\r\\n5595923\\r\\n0279404\\r\\n', 'output': ['2790148']}, {'input': '3 3\\r\\n195\\r\\n860\\r\\n567\\r\\n', 'output': ['258']}, {'input': '1 7\\r\\n3545113\\r\\n', 'output': ['0']}]","human_sample_testcases_3":"[{'input': '1 7\\r\\n4605461\\r\\n', 'output': ['0']}, {'input': '3 4\\r\\n3061\\r\\n3404\\r\\n6670\\r\\n', 'output': ['2916']}, {'input': '3 1\\r\\n5\\r\\n4\\r\\n2\\r\\n', 'output': ['3']}, {'input': '6 4\\r\\n0443\\r\\n7108\\r\\n7211\\r\\n4287\\r\\n6439\\r\\n7711\\r\\n', 'output': ['5301']}, {'input': '8 5\\r\\n07936\\r\\n07927\\r\\n46068\\r\\n99158\\r\\n90958\\r\\n41283\\r\\n59266\\r\\n87841\\r\\n', 'output': ['52364']}]","human_sample_testcases_4":"[{'input': '6 8\\r\\n50157346\\r\\n63836375\\r\\n03176371\\r\\n83637145\\r\\n28631038\\r\\n18617159\\r\\n', 'output': ['24702445']}, {'input': '5 2\\r\\n01\\r\\n07\\r\\n63\\r\\n71\\r\\n99\\r\\n', 'output': ['89']}, {'input': '8 5\\r\\n07936\\r\\n07927\\r\\n46068\\r\\n99158\\r\\n90958\\r\\n41283\\r\\n59266\\r\\n87841\\r\\n', 'output': ['52364']}, {'input': '2 5\\r\\n90526\\r\\n32565\\r\\n', 'output': ['586']}, {'input': '5 6\\r\\n959808\\r\\n303464\\r\\n414335\\r\\n758650\\r\\n828038\\r\\n', 'output': ['486245']}]","human_sample_testcases_5":"[{'input': '7 7\\r\\n6575460\\r\\n6965366\\r\\n1912357\\r\\n7080608\\r\\n2561692\\r\\n5209630\\r\\n0439095\\r\\n', 'output': ['5917123']}, {'input': '6 4\\r\\n5237\\r\\n2753\\r\\n7523\\r\\n5723\\r\\n5327\\r\\n2537\\r\\n', 'output': ['2700']}, {'input': '4 1\\r\\n0\\r\\n7\\r\\n5\\r\\n1\\r\\n', 'output': ['7']}, {'input': '8 1\\r\\n9\\r\\n7\\r\\n6\\r\\n2\\r\\n9\\r\\n6\\r\\n4\\r\\n8\\r\\n', 'output': ['7']}, {'input': '4 1\\r\\n0\\r\\n7\\r\\n5\\r\\n1\\r\\n', 'output': ['7']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":396,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"3 6\\n2 3 5\", \"6 7\\n1 2 3 4 5 6\"]","input_specification":"The first line of input contains two integer numbers n and k (1\u2009\u2264\u2009n,\u2009k\u2009\u2264\u2009100) \u2014 the number of buckets and the length of the garden, respectively. The second line of input contains n integer numbers ai (1\u2009\u2264\u2009ai\u2009\u2264\u2009100) \u2014 the length of the segment that can be watered by the i-th bucket in one hour. It is guaranteed that there is at least one bucket such that it is possible to water the garden in integer number of hours using only this bucket.","src_uid":"80520be9916045aca3a7de7bc925af1f","source_code":"import sys\n\nn, k = sys.stdin.readline().strip().split(' ')\na = sys.stdin.readline().strip().split(' ')\na = list(map(int,a))\ns=0\nm=0\nn = int(n)\nk = int(k)\nfor i in range(n,0,-1):\n\tr = k%a[i-1]\n\tif r==0 and a[i-1]>m:\n\t\tm=a[i-1]\ns=k\/m\nprint(int(s))","sample_outputs":"[\"2\", \"7\"]","lang_cluster":"Python","notes":"NoteIn the first test the best option is to choose the bucket that allows to water the segment of length 3. We can't choose the bucket that allows to water the segment of length 5 because then we can't water the whole garden.In the second test we can choose only the bucket that allows us to water the segment of length 1.","output_specification":"Print one integer number \u2014 the minimum number of hours required to water the garden.","description":"Luba thinks about watering her garden. The garden can be represented as a segment of length k. Luba has got n buckets, the i-th bucket allows her to water some continuous subsegment of garden of length exactly ai each hour. Luba can't water any parts of the garden that were already watered, also she can't water the ground outside the garden.Luba has to choose one of the buckets in order to water the garden as fast as possible (as mentioned above, each hour she will water some continuous subsegment of length ai if she chooses the i-th bucket). Help her to determine the minimum number of hours she has to spend watering the garden. It is guaranteed that Luba can always choose a bucket so it is possible water the garden.See the examples for better understanding.","human_testcases":"[{\"input\": \"3 6\\r\\n2 3 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 7\\r\\n1 2 3 4 5 6\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"5 97\\r\\n1 10 50 97 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 97\\r\\n1 10 50 100 2\\r\\n\", \"output\": [\"97\"]}, {\"input\": \"100 100\\r\\n2 46 24 18 86 90 31 38 84 49 58 28 15 80 14 24 87 56 62 87 41 87 55 71 87 32 41 56 91 32 24 75 43 42 35 30 72 53 31 26 54 61 87 85 36 75 44 31 7 38 77 57 61 54 70 77 45 96 39 57 11 8 91 42 52 15 42 30 92 41 27 26 34 27 3 80 32 86 26 97 63 91 30 75 14 7 19 23 45 11 8 43 44 73 11 56 3 55 63 16\\r\\n\", \"output\": [\"50\"]}, {\"input\": \"100 91\\r\\n13 13 62 96 74 47 81 46 78 21 20 42 4 73 25 30 76 74 58 28 25 52 42 48 74 40 82 9 25 29 17 22 46 64 57 95 81 39 47 86 40 95 97 35 31 98 45 98 47 78 52 63 58 14 89 97 17 95 28 22 20 36 68 38 95 16 2 26 54 47 42 31 31 81 21 21 65 40 82 53 60 71 75 33 96 98 6 22 95 12 5 48 18 27 58 62 5 96 36 75\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"8 8\\r\\n8 7 6 5 4 3 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 8\\r\\n4 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 8\\r\\n2 4 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 6\\r\\n1 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 6\\r\\n3 2 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 8\\r\\n4 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 6\\r\\n2 3 5 1 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 6\\r\\n5 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 12\\r\\n6 4 3 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 18\\r\\n1 9 6\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 9\\r\\n3 2 1\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 6\\r\\n5 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 10\\r\\n5 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 18\\r\\n6 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 12\\r\\n1 2 12 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 7\\r\\n3 2 1\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"3 6\\r\\n3 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 10\\r\\n5 4 3 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 16\\r\\n8 4 2 1 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 7\\r\\n6 5 4 3 7 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 6\\r\\n3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 4\\r\\n4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"6 8\\r\\n2 4 1 3 5 7\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 8\\r\\n6 5 4 3 2 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"6 15\\r\\n5 2 3 6 4 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 8\\r\\n2 4 8 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 5\\r\\n5 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 18\\r\\n3 1 1 2\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"2 1\\r\\n2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 10\\r\\n2 10 5\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 12\\r\\n12 4 4 4 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 6\\r\\n6 3 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 2\\r\\n2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 18\\r\\n1 9 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 8\\r\\n7 2 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 100\\r\\n99 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"4 12\\r\\n1 3 4 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3 6\\r\\n2 3 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 6\\r\\n3 2 5 12\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 97\\r\\n97 1 50 10\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 12\\r\\n1 12 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 12\\r\\n1 4 3 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1 1\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 19\\r\\n7 1 1\\r\\n\", \"output\": [\"19\"]}, {\"input\": \"5 12\\r\\n12 4 3 4 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 8\\r\\n8 4 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 3\\r\\n3 2 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 6\\r\\n3 2 4 2 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"2 16\\r\\n8 4\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 6\\r\\n10 2 3\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"5 3\\r\\n2 4 5 3 6\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"11 99\\r\\n1 2 3 6 5 4 7 8 99 33 66\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 12\\r\\n3 12 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"5 25\\r\\n24 5 15 25 23\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 4\\r\\n8 1\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"4 100\\r\\n2 50 4 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3 28\\r\\n7 14 1\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 8\\r\\n2 8 4 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 6\\r\\n6 1 2 3\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2 12\\r\\n4 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"4 12\\r\\n1 2 4 3\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"5 12\\r\\n2 3 12 6 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 4\\r\\n1 2 2 4\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 6\\r\\n2 3 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"4 21\\r\\n21 20 21 2\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"3 8\\r\\n3 4 2\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1 25\\r\\n25\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"99 12\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"98 12\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"79 12\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4 32\\r\\n1 1 1 1\\r\\n\", \"output\": [\"32\"]}, {\"input\": \"1 100\\r\\n1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"2 100\\r\\n7 1\\r\\n\", \"output\": [\"100\"]}, {\"input\": \"7 24\\r\\n1 3 6 4 5 2 7\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"6 87\\r\\n1 2 8 4 5 7\\r\\n\", \"output\": [\"87\"]}, {\"input\": \"1 88\\r\\n1\\r\\n\", \"output\": [\"88\"]}, {\"input\": \"1 89\\r\\n1\\r\\n\", \"output\": [\"89\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '3 18\\r\\n1 9 6\\r\\n', 'output': ['2']}, {'input': '2 2\\r\\n2 1\\r\\n', 'output': ['1']}, {'input': '2 100\\r\\n99 1\\r\\n', 'output': ['100']}, {'input': '4 12\\r\\n1 3 4 2\\r\\n', 'output': ['3']}, {'input': '2 4\\r\\n4 1\\r\\n', 'output': ['1']}]","human_sample_testcases_2":"[{'input': '4 100\\r\\n2 50 4 1\\r\\n', 'output': ['2']}, {'input': '2 100\\r\\n99 1\\r\\n', 'output': ['100']}, {'input': '79 12\\r\\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79\\r\\n', 'output': ['1']}, {'input': '3 6\\r\\n5 3 2\\r\\n', 'output': ['2']}, {'input': '2 4\\r\\n4 1\\r\\n', 'output': ['1']}]","human_sample_testcases_3":"[{'input': '3 8\\r\\n3 4 2\\r\\n', 'output': ['2']}, {'input': '3 8\\r\\n4 2 1\\r\\n', 'output': ['2']}, {'input': '5 25\\r\\n24 5 15 25 23\\r\\n', 'output': ['1']}, {'input': '4 12\\r\\n1 3 4 2\\r\\n', 'output': ['3']}, {'input': '4 21\\r\\n21 20 21 2\\r\\n', 'output': ['1']}]","human_sample_testcases_4":"[{'input': '7 24\\r\\n1 3 6 4 5 2 7\\r\\n', 'output': ['4']}, {'input': '3 10\\r\\n2 10 5\\r\\n', 'output': ['1']}, {'input': '4 32\\r\\n1 1 1 1\\r\\n', 'output': ['32']}, {'input': '3 6\\r\\n10 2 3\\r\\n', 'output': ['2']}, {'input': '2 16\\r\\n8 4\\r\\n', 'output': ['2']}]","human_sample_testcases_5":"[{'input': '3 8\\r\\n3 4 2\\r\\n', 'output': ['2']}, {'input': '100 100\\r\\n2 46 24 18 86 90 31 38 84 49 58 28 15 80 14 24 87 56 62 87 41 87 55 71 87 32 41 56 91 32 24 75 43 42 35 30 72 53 31 26 54 61 87 85 36 75 44 31 7 38 77 57 61 54 70 77 45 96 39 57 11 8 91 42 52 15 42 30 92 41 27 26 34 27 3 80 32 86 26 97 63 91 30 75 14 7 19 23 45 11 8 43 44 73 11 56 3 55 63 16\\r\\n', 'output': ['50']}, {'input': '2 4\\r\\n8 1\\r\\n', 'output': ['4']}, {'input': '3 9\\r\\n3 2 1\\r\\n', 'output': ['3']}, {'input': '5 3\\r\\n2 4 5 3 6\\r\\n', 'output': ['1']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":397,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"1f\", \"2d\", \"4a\", \"5e\"]","input_specification":"The only line of input contains a description of Vasya's seat in the format ns, where n (1\u2009\u2264\u2009n\u2009\u2264\u20091018) is the index of the row and s is the seat in this row, denoted as letter from 'a' to 'f'. The index of the row and the seat are not separated by a space.","src_uid":"069d0cb9b7c798a81007fb5b63fa0f45","source_code":"import math\nrows = [0, 1, 0, 1]\nseats = [\"f\", \"e\", \"d\", \"a\", \"b\", \"c\"]\ns = input()\na, b = int(s[:-1]), s[-1]\nprint((a - 1) \/\/ 4 * 16 + rows[a % 4 - 1] * 7 + seats.index(b) + 1)","sample_outputs":"[\"1\", \"10\", \"11\", \"18\"]","lang_cluster":"Python","notes":"NoteIn the first sample, the first flight attendant serves Vasya first, so Vasya gets his lunch after 1 second.In the second sample, the flight attendants will spend 6 seconds to serve everyone in the rows 1 and 3, then they will move one row forward in 1 second. As they first serve seats located to the right of the aisle in order from window to aisle, Vasya has to wait 3 more seconds. The total is 6\u2009+\u20091\u2009+\u20093\u2009=\u200910.","output_specification":"Print one integer\u00a0\u2014 the number of seconds Vasya has to wait until he gets his lunch.","description":"A new airplane SuperPuperJet has an infinite number of rows, numbered with positive integers starting with 1 from cockpit to tail. There are six seats in each row, denoted with letters from 'a' to 'f'. Seats 'a', 'b' and 'c' are located to the left of an aisle (if one looks in the direction of the cockpit), while seats 'd', 'e' and 'f' are located to the right. Seats 'a' and 'f' are located near the windows, while seats 'c' and 'd' are located near the aisle. \u00a0It's lunch time and two flight attendants have just started to serve food. They move from the first rows to the tail, always maintaining a distance of two rows from each other because of the food trolley. Thus, at the beginning the first attendant serves row 1 while the second attendant serves row 3. When both rows are done they move one row forward: the first attendant serves row 2 while the second attendant serves row 4. Then they move three rows forward and the first attendant serves row 5 while the second attendant serves row 7. Then they move one row forward again and so on.Flight attendants work with the same speed: it takes exactly 1 second to serve one passenger and 1 second to move one row forward. Each attendant first serves the passengers on the seats to the right of the aisle and then serves passengers on the seats to the left of the aisle (if one looks in the direction of the cockpit). Moreover, they always serve passengers in order from the window to the aisle. Thus, the first passenger to receive food in each row is located in seat 'f', and the last one\u00a0\u2014 in seat 'c'. Assume that all seats are occupied.Vasya has seat s in row n and wants to know how many seconds will pass before he gets his lunch.","human_testcases":"[{\"input\": \"1f\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"2d\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4a\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"5e\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"2c\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"1b\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"1000000000000000000d\\r\\n\", \"output\": [\"3999999999999999994\"]}, {\"input\": \"999999999999999997a\\r\\n\", \"output\": [\"3999999999999999988\"]}, {\"input\": \"1c\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"1d\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"1e\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"1a\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"2a\\r\\n\", \"output\": [\"11\"]}, {\"input\": \"2b\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"2e\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"2f\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"3a\\r\\n\", \"output\": [\"4\"]}, {\"input\": \"3b\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3c\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"3d\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"3e\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"3f\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"4b\\r\\n\", \"output\": [\"12\"]}, {\"input\": \"4c\\r\\n\", \"output\": [\"13\"]}, {\"input\": \"4d\\r\\n\", \"output\": [\"10\"]}, {\"input\": \"4e\\r\\n\", \"output\": [\"9\"]}, {\"input\": \"4f\\r\\n\", \"output\": [\"8\"]}, {\"input\": \"999999997a\\r\\n\", \"output\": [\"3999999988\"]}, {\"input\": \"999999997b\\r\\n\", \"output\": [\"3999999989\"]}, {\"input\": \"999999997c\\r\\n\", \"output\": [\"3999999990\"]}, {\"input\": \"999999997d\\r\\n\", \"output\": [\"3999999987\"]}, {\"input\": \"999999997e\\r\\n\", \"output\": [\"3999999986\"]}, {\"input\": \"999999997f\\r\\n\", \"output\": [\"3999999985\"]}, {\"input\": \"999999998a\\r\\n\", \"output\": [\"3999999995\"]}, {\"input\": \"999999998b\\r\\n\", \"output\": [\"3999999996\"]}, {\"input\": \"999999998c\\r\\n\", \"output\": [\"3999999997\"]}, {\"input\": \"999999998d\\r\\n\", \"output\": [\"3999999994\"]}, {\"input\": \"999999998e\\r\\n\", \"output\": [\"3999999993\"]}, {\"input\": \"999999998f\\r\\n\", \"output\": [\"3999999992\"]}, {\"input\": \"999999999a\\r\\n\", \"output\": [\"3999999988\"]}, {\"input\": \"999999999b\\r\\n\", \"output\": [\"3999999989\"]}, {\"input\": \"999999999c\\r\\n\", \"output\": [\"3999999990\"]}, {\"input\": \"999999999d\\r\\n\", \"output\": [\"3999999987\"]}, {\"input\": \"999999999e\\r\\n\", \"output\": [\"3999999986\"]}, {\"input\": \"999999999f\\r\\n\", \"output\": [\"3999999985\"]}, {\"input\": \"1000000000a\\r\\n\", \"output\": [\"3999999995\"]}, {\"input\": \"1000000000b\\r\\n\", \"output\": [\"3999999996\"]}, {\"input\": \"1000000000c\\r\\n\", \"output\": [\"3999999997\"]}, {\"input\": \"1000000000d\\r\\n\", \"output\": [\"3999999994\"]}, {\"input\": \"1000000000e\\r\\n\", \"output\": [\"3999999993\"]}, {\"input\": \"1000000000f\\r\\n\", \"output\": [\"3999999992\"]}, {\"input\": \"100000b\\r\\n\", \"output\": [\"399996\"]}, {\"input\": \"100000f\\r\\n\", \"output\": [\"399992\"]}, {\"input\": \"100001d\\r\\n\", \"output\": [\"400003\"]}, {\"input\": \"100001e\\r\\n\", \"output\": [\"400002\"]}, {\"input\": \"100001f\\r\\n\", \"output\": [\"400001\"]}, {\"input\": \"100002a\\r\\n\", \"output\": [\"400011\"]}, {\"input\": \"100002b\\r\\n\", \"output\": [\"400012\"]}, {\"input\": \"100002d\\r\\n\", \"output\": [\"400010\"]}, {\"input\": \"1231273a\\r\\n\", \"output\": [\"4925092\"]}, {\"input\": \"82784f\\r\\n\", \"output\": [\"331128\"]}, {\"input\": \"88312c\\r\\n\", \"output\": [\"353245\"]}, {\"input\": \"891237e\\r\\n\", \"output\": [\"3564946\"]}, {\"input\": \"999999999999999997b\\r\\n\", \"output\": [\"3999999999999999989\"]}, {\"input\": \"999999999999999997c\\r\\n\", \"output\": [\"3999999999999999990\"]}, {\"input\": \"999999999999999997d\\r\\n\", \"output\": [\"3999999999999999987\"]}, {\"input\": \"999999999999999997e\\r\\n\", \"output\": [\"3999999999999999986\"]}, {\"input\": \"999999999999999997f\\r\\n\", \"output\": [\"3999999999999999985\"]}, {\"input\": \"999999999999999998a\\r\\n\", \"output\": [\"3999999999999999995\"]}, {\"input\": \"999999999999999998b\\r\\n\", \"output\": [\"3999999999999999996\"]}, {\"input\": \"999999999999999998c\\r\\n\", \"output\": [\"3999999999999999997\"]}, {\"input\": \"999999999999999998d\\r\\n\", \"output\": [\"3999999999999999994\"]}, {\"input\": \"999999999999999998e\\r\\n\", \"output\": [\"3999999999999999993\"]}, {\"input\": \"999999999999999998f\\r\\n\", \"output\": [\"3999999999999999992\"]}, {\"input\": \"999999999999999999a\\r\\n\", \"output\": [\"3999999999999999988\"]}, {\"input\": \"999999999999999999b\\r\\n\", \"output\": [\"3999999999999999989\"]}, {\"input\": \"999999999999999999c\\r\\n\", \"output\": [\"3999999999999999990\"]}, {\"input\": \"999999999999999999d\\r\\n\", \"output\": [\"3999999999999999987\"]}, {\"input\": \"1000000000000000000a\\r\\n\", \"output\": [\"3999999999999999995\"]}, {\"input\": \"1000000000000000000e\\r\\n\", \"output\": [\"3999999999999999993\"]}, {\"input\": \"1000000000000000000f\\r\\n\", \"output\": [\"3999999999999999992\"]}, {\"input\": \"1000000000000000000c\\r\\n\", \"output\": [\"3999999999999999997\"]}, {\"input\": \"97a\\r\\n\", \"output\": [\"388\"]}, {\"input\": \"6f\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"7f\\r\\n\", \"output\": [\"17\"]}, {\"input\": \"7e\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"999999999999999992c\\r\\n\", \"output\": [\"3999999999999999965\"]}, {\"input\": \"7a\\r\\n\", \"output\": [\"20\"]}, {\"input\": \"8f\\r\\n\", \"output\": [\"24\"]}, {\"input\": \"999999999999999992a\\r\\n\", \"output\": [\"3999999999999999963\"]}, {\"input\": \"999999999999999992b\\r\\n\", \"output\": [\"3999999999999999964\"]}, {\"input\": \"999999999999999992c\\r\\n\", \"output\": [\"3999999999999999965\"]}, {\"input\": \"999999999999999992d\\r\\n\", \"output\": [\"3999999999999999962\"]}, {\"input\": \"999999999999999992e\\r\\n\", \"output\": [\"3999999999999999961\"]}, {\"input\": \"999999999999999992f\\r\\n\", \"output\": [\"3999999999999999960\"]}, {\"input\": \"999999999999999993a\\r\\n\", \"output\": [\"3999999999999999972\"]}, {\"input\": \"999999999999999993b\\r\\n\", \"output\": [\"3999999999999999973\"]}, {\"input\": \"999999999999999993c\\r\\n\", \"output\": [\"3999999999999999974\"]}, {\"input\": \"999999999999999993d\\r\\n\", \"output\": [\"3999999999999999971\"]}, {\"input\": \"999999999999999993e\\r\\n\", \"output\": [\"3999999999999999970\"]}, {\"input\": \"999999999999999993f\\r\\n\", \"output\": [\"3999999999999999969\"]}, {\"input\": \"999999999999999994a\\r\\n\", \"output\": [\"3999999999999999979\"]}, {\"input\": \"999999999999999994b\\r\\n\", \"output\": [\"3999999999999999980\"]}, {\"input\": \"999999999999999994c\\r\\n\", \"output\": [\"3999999999999999981\"]}, {\"input\": \"999999999999999994d\\r\\n\", \"output\": [\"3999999999999999978\"]}, {\"input\": \"999999999999999994e\\r\\n\", \"output\": [\"3999999999999999977\"]}, {\"input\": \"999999999999999994f\\r\\n\", \"output\": [\"3999999999999999976\"]}, {\"input\": \"999999999999999995a\\r\\n\", \"output\": [\"3999999999999999972\"]}, {\"input\": \"999999999999999995b\\r\\n\", \"output\": [\"3999999999999999973\"]}, {\"input\": \"999999999999999995c\\r\\n\", \"output\": [\"3999999999999999974\"]}, {\"input\": \"999999999999999995d\\r\\n\", \"output\": [\"3999999999999999971\"]}, {\"input\": \"999999999999999995e\\r\\n\", \"output\": [\"3999999999999999970\"]}, {\"input\": \"999999999999999995f\\r\\n\", \"output\": [\"3999999999999999969\"]}, {\"input\": \"10a\\r\\n\", \"output\": [\"43\"]}, {\"input\": \"11f\\r\\n\", \"output\": [\"33\"]}, {\"input\": \"681572647b\\r\\n\", \"output\": [\"2726290581\"]}, {\"input\": \"23f\\r\\n\", \"output\": [\"81\"]}, {\"input\": \"123a\\r\\n\", \"output\": [\"484\"]}, {\"input\": \"999999888888777777a\\r\\n\", \"output\": [\"3999999555555111108\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '999999999999999997a\\r\\n', 'output': ['3999999999999999988']}, {'input': '999999999999999997e\\r\\n', 'output': ['3999999999999999986']}, {'input': '1000000000f\\r\\n', 'output': ['3999999992']}, {'input': '1b\\r\\n', 'output': ['5']}, {'input': '999999999999999998c\\r\\n', 'output': ['3999999999999999997']}]","human_sample_testcases_2":"[{'input': '999999999999999995a\\r\\n', 'output': ['3999999999999999972']}, {'input': '1a\\r\\n', 'output': ['4']}, {'input': '999999999f\\r\\n', 'output': ['3999999985']}, {'input': '999999999d\\r\\n', 'output': ['3999999987']}, {'input': '999999999999999999c\\r\\n', 'output': ['3999999999999999990']}]","human_sample_testcases_3":"[{'input': '3f\\r\\n', 'output': ['1']}, {'input': '999999999999999992d\\r\\n', 'output': ['3999999999999999962']}, {'input': '999999999999999997b\\r\\n', 'output': ['3999999999999999989']}, {'input': '2c\\r\\n', 'output': ['13']}, {'input': '999999999999999997c\\r\\n', 'output': ['3999999999999999990']}]","human_sample_testcases_4":"[{'input': '3a\\r\\n', 'output': ['4']}, {'input': '999999997c\\r\\n', 'output': ['3999999990']}, {'input': '999999999999999993e\\r\\n', 'output': ['3999999999999999970']}, {'input': '100000b\\r\\n', 'output': ['399996']}, {'input': '100001e\\r\\n', 'output': ['400002']}]","human_sample_testcases_5":"[{'input': '2c\\r\\n', 'output': ['13']}, {'input': '999999998f\\r\\n', 'output': ['3999999992']}, {'input': '1000000000b\\r\\n', 'output': ['3999999996']}, {'input': '100000f\\r\\n', 'output': ['399992']}, {'input': '1000000000e\\r\\n', 'output': ['3999999993']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":100.0,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":100.0,"human_sample_line_coverage_4":100.0,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":100.0,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":100.0,"human_sample_branch_coverage_4":100.0,"human_sample_branch_coverage_5":100.0,"id":398,"human_sample_pass_rate":100.0,"human_sample_line_coverage":100.0,"human_sample_branch_coverage":100.0} {"sample_inputs":"[\"10 3\", \"7 7\"]","input_specification":"The only line of input contains integers n and k (1\u2009\u2264\u2009k\u2009\u2264\u2009n\u2009\u2264\u20091012). Please, do not use the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.","src_uid":"1f8056884db00ad8294a7cc0be75fe97","source_code":"n,k=map(int,input().split())\nif n%2==0 :\n if (k > n\/\/2) :\n print((k-n\/\/2)*2)\n else :\n print(2*k - 1)\nelse :\n if (k > ((n-1)\/\/2)+ 1) :\n print((k-1-((n-1)\/\/2))*2)\n else :\n print(2*k - 1)","sample_outputs":"[\"5\", \"6\"]","lang_cluster":"Python","notes":"NoteIn the first sample Volodya's sequence will look like this: {1, 3, 5, 7, 9, 2, 4, 6, 8, 10}. The third place in the sequence is therefore occupied by the number 5.","output_specification":"Print the number that will stand at the position number k after Volodya's manipulations.","description":"Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is positive integer number). He is determined to rearrange them. But there are too many natural numbers, so Volodya decided to start with the first n. He writes down the following sequence of numbers: firstly all odd integers from 1 to n (in ascending order), then all even integers from 1 to n (also in ascending order). Help our hero to find out which number will stand at the position number k.","human_testcases":"[{\"input\": \"10 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"7 7\\r\\n\", \"output\": [\"6\"]}, {\"input\": \"7 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"7 2\\r\\n\", \"output\": [\"3\"]}, {\"input\": \"8 5\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"8 3\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"8 4\\r\\n\", \"output\": [\"7\"]}, {\"input\": \"1000000000000 500000000001\\r\\n\", \"output\": [\"2\"]}, {\"input\": \"999999999997 499999999999\\r\\n\", \"output\": [\"999999999997\"]}, {\"input\": \"999999999999 999999999999\\r\\n\", \"output\": [\"999999999998\"]}, {\"input\": \"1000000000000 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"999999999999 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1000000000000 1000000000000\\r\\n\", \"output\": [\"1000000000000\"]}, {\"input\": \"1000000000000 500000000000\\r\\n\", \"output\": [\"999999999999\"]}, {\"input\": \"1000000000000 499999999999\\r\\n\", \"output\": [\"999999999997\"]}, {\"input\": \"999999999997 499999999998\\r\\n\", \"output\": [\"999999999995\"]}, {\"input\": \"619234238 556154835\\r\\n\", \"output\": [\"493075432\"]}, {\"input\": \"38151981 36650624\\r\\n\", \"output\": [\"35149266\"]}, {\"input\": \"680402465 442571217\\r\\n\", \"output\": [\"204739968\"]}, {\"input\": \"109135284 9408714\\r\\n\", \"output\": [\"18817427\"]}, {\"input\": \"603701841 56038951\\r\\n\", \"output\": [\"112077901\"]}, {\"input\": \"356764822 321510177\\r\\n\", \"output\": [\"286255532\"]}, {\"input\": \"284911189 142190783\\r\\n\", \"output\": [\"284381565\"]}, {\"input\": \"91028405 61435545\\r\\n\", \"output\": [\"31842684\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '8 4\\r\\n', 'output': ['7']}, {'input': '8 3\\r\\n', 'output': ['5']}, {'input': '999999999997 499999999999\\r\\n', 'output': ['999999999997']}, {'input': '1000000000000 1000000000000\\r\\n', 'output': ['1000000000000']}, {'input': '7 2\\r\\n', 'output': ['3']}]","human_sample_testcases_2":"[{'input': '999999999999 999999999999\\r\\n', 'output': ['999999999998']}, {'input': '7 1\\r\\n', 'output': ['1']}, {'input': '1000000000000 1\\r\\n', 'output': ['1']}, {'input': '619234238 556154835\\r\\n', 'output': ['493075432']}, {'input': '91028405 61435545\\r\\n', 'output': ['31842684']}]","human_sample_testcases_3":"[{'input': '91028405 61435545\\r\\n', 'output': ['31842684']}, {'input': '603701841 56038951\\r\\n', 'output': ['112077901']}, {'input': '1000000000000 1000000000000\\r\\n', 'output': ['1000000000000']}, {'input': '1000000000000 500000000001\\r\\n', 'output': ['2']}, {'input': '999999999997 499999999998\\r\\n', 'output': ['999999999995']}]","human_sample_testcases_4":"[{'input': '8 5\\r\\n', 'output': ['2']}, {'input': '999999999997 499999999999\\r\\n', 'output': ['999999999997']}, {'input': '8 3\\r\\n', 'output': ['5']}, {'input': '999999999999 1\\r\\n', 'output': ['1']}, {'input': '7 1\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '1 1\\r\\n', 'output': ['1']}, {'input': '999999999997 499999999999\\r\\n', 'output': ['999999999997']}, {'input': '91028405 61435545\\r\\n', 'output': ['31842684']}, {'input': '7 1\\r\\n', 'output': ['1']}, {'input': '1000000000000 500000000001\\r\\n', 'output': ['2']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":100.0,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":87.5,"human_sample_line_coverage_5":87.5,"human_sample_branch_coverage_1":83.33,"human_sample_branch_coverage_2":100.0,"human_sample_branch_coverage_3":83.33,"human_sample_branch_coverage_4":83.33,"human_sample_branch_coverage_5":83.33,"id":399,"human_sample_pass_rate":100.0,"human_sample_line_coverage":90.0,"human_sample_branch_coverage":86.664} {"sample_inputs":"[\"3 30\\n2 2 1\", \"3 20\\n2 1 1\"]","input_specification":"The first line contains two space separated integers n, d (1\u2009\u2264\u2009n\u2009\u2264\u2009100;\u00a01\u2009\u2264\u2009d\u2009\u2264\u200910000). The second line contains n space-separated integers: t1,\u2009t2,\u2009...,\u2009tn (1\u2009\u2264\u2009ti\u2009\u2264\u2009100).","src_uid":"b16f5f5c4eeed2a3700506003e8ea8ea","source_code":"__author__ = 'myduomilia'\n\nn, t = list(map(int, input().split()))\narr = list(map(int, input().split()))\ns = sum(arr)\nans = 0\n\nif s + (len(arr) - 1) * 10 > t:\n print(-1)\nelse:\n print((t - s) \/\/ 5)","sample_outputs":"[\"5\", \"-1\"]","lang_cluster":"Python","notes":"NoteConsider the first example. The duration of the event is 30 minutes. There could be maximum 5 jokes in the following way: First Churu cracks a joke in 5 minutes. Then Devu performs the first song for 2 minutes. Then Churu cracks 2 jokes in 10 minutes. Now Devu performs second song for 2 minutes. Then Churu cracks 2 jokes in 10 minutes. Now finally Devu will perform his last song in 1 minutes. Total time spent is 5\u2009+\u20092\u2009+\u200910\u2009+\u20092\u2009+\u200910\u2009+\u20091\u2009=\u200930 minutes.Consider the second example. There is no way of organizing Devu's all songs. Hence the answer is -1. ","output_specification":"If there is no way to conduct all the songs of Devu, output -1. Otherwise output the maximum number of jokes that Churu can crack in the grand event.","description":"Devu is a renowned classical singer. He is invited to many big functions\/festivals. Recently he was invited to \"All World Classical Singing Festival\". Other than Devu, comedian Churu was also invited.Devu has provided organizers a list of the songs and required time for singing them. He will sing n songs, ith song will take ti minutes exactly. The Comedian, Churu will crack jokes. All his jokes are of 5 minutes exactly.People have mainly come to listen Devu. But you know that he needs rest of 10 minutes after each song. On the other hand, Churu being a very active person, doesn't need any rest.You as one of the organizers should make an optimal s\u0441hedule for the event. For some reasons you must follow the conditions: The duration of the event must be no more than d minutes; Devu must complete all his songs; With satisfying the two previous conditions the number of jokes cracked by Churu should be as many as possible. If it is not possible to find a way to conduct all the songs of the Devu, output -1. Otherwise find out maximum number of jokes that Churu can crack in the grand event.","human_testcases":"[{\"input\": \"3 30\\r\\n2 2 1\\r\\n\", \"output\": [\"5\"]}, {\"input\": \"3 20\\r\\n2 1 1\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"50 10000\\r\\n5 4 10 9 9 6 7 7 7 3 3 7 7 4 7 4 10 10 1 7 10 3 1 4 5 7 2 10 10 10 2 3 4 7 6 1 8 4 7 3 8 8 4 10 1 1 9 2 6 1\\r\\n\", \"output\": [\"1943\"]}, {\"input\": \"50 10000\\r\\n4 7 15 9 11 12 20 9 14 14 10 13 6 13 14 17 6 8 20 12 10 15 13 17 5 12 13 11 7 5 5 2 3 15 13 7 14 14 19 2 13 14 5 15 3 19 15 16 4 1\\r\\n\", \"output\": [\"1891\"]}, {\"input\": \"100 9000\\r\\n5 2 3 1 1 3 4 9 9 6 7 10 10 10 2 10 6 8 8 6 7 9 9 5 6 2 1 10 10 9 4 5 9 2 4 3 8 5 6 1 1 5 3 6 2 6 6 6 5 8 3 6 7 3 1 10 9 1 8 3 10 9 5 6 3 4 1 1 10 10 2 3 4 8 10 10 5 1 5 3 6 8 10 6 10 2 1 8 10 1 7 6 9 10 5 2 3 5 3 2\\r\\n\", \"output\": [\"1688\"]}, {\"input\": \"100 8007\\r\\n5 19 14 18 9 6 15 8 1 14 11 20 3 17 7 12 2 6 3 17 7 20 1 14 20 17 2 10 13 7 18 18 9 10 16 8 1 11 11 9 13 18 9 20 12 12 7 15 12 17 11 5 11 15 9 2 15 1 18 3 18 16 15 4 10 5 18 13 13 12 3 8 17 2 12 2 13 3 1 13 2 4 9 10 18 10 14 4 4 17 12 19 2 9 6 5 5 20 18 12\\r\\n\", \"output\": [\"1391\"]}, {\"input\": \"39 2412\\r\\n1 1 1 1 1 1 26 1 1 1 99 1 1 1 1 1 1 1 1 1 1 88 7 1 1 1 1 76 1 1 1 93 40 1 13 1 68 1 32\\r\\n\", \"output\": [\"368\"]}, {\"input\": \"39 2617\\r\\n47 1 1 1 63 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 70 1 99 63 1 1 1 1 1 1 1 1 64 1 1\\r\\n\", \"output\": [\"435\"]}, {\"input\": \"39 3681\\r\\n83 77 1 94 85 47 1 98 29 16 1 1 1 71 96 85 31 97 96 93 40 50 98 1 60 51 1 96 100 72 1 1 1 89 1 93 1 92 100\\r\\n\", \"output\": [\"326\"]}, {\"input\": \"45 894\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 28 28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 99 3 1 1\\r\\n\", \"output\": [\"139\"]}, {\"input\": \"45 4534\\r\\n1 99 65 99 4 46 54 80 51 30 96 1 28 30 44 70 78 1 1 100 1 62 1 1 1 85 1 1 1 61 1 46 75 1 61 77 97 26 67 1 1 63 81 85 86\\r\\n\", \"output\": [\"514\"]}, {\"input\": \"72 3538\\r\\n52 1 8 1 1 1 7 1 1 1 1 48 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 40 1 1 38 1 1 1 1 1 1 1 1 1 1 1 35 1 93 79 1 1 1 1 1 1 1 1 1 51 1 1 1 1 1 1 1 1 1 1 1 1 96 1\\r\\n\", \"output\": [\"586\"]}, {\"input\": \"81 2200\\r\\n1 59 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 93 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"384\"]}, {\"input\": \"81 2577\\r\\n85 91 1 1 2 1 1 100 1 80 1 1 17 86 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 37 1 66 24 1 1 96 49 1 66 1 44 1 1 1 1 98 1 1 1 1 35 1 37 3 35 1 1 87 64 1 24 1 58 1 1 42 83 5 1 1 1 1 1 95 1 94 1 50 1 1\\r\\n\", \"output\": [\"174\"]}, {\"input\": \"81 4131\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"807\"]}, {\"input\": \"81 6315\\r\\n1 1 67 100 1 99 36 1 92 5 1 96 42 12 1 57 91 1 1 66 41 30 74 95 1 37 1 39 91 69 1 52 77 47 65 1 1 93 96 74 90 35 85 76 71 92 92 1 1 67 92 74 1 1 86 76 35 1 56 16 27 57 37 95 1 40 20 100 51 1 80 60 45 79 95 1 46 1 25 100 96\\r\\n\", \"output\": [\"490\"]}, {\"input\": \"96 1688\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 71 1 1 1 30 1 1 1\\r\\n\", \"output\": [\"284\"]}, {\"input\": \"96 8889\\r\\n1 1 18 1 1 1 1 1 1 1 1 1 99 1 1 1 1 88 1 45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 96 1 1 1 1 21 1 1 1 1 1 1 1 73 1 1 1 1 1 10 1 1 1 1 1 1 1 46 43 1 1 1 1 1 98 1 1 1 1 1 1 6 1 1 1 1 1 74 1 25 1 55 1 1 1 13 1 1 54 1 1 1\\r\\n\", \"output\": [\"1589\"]}, {\"input\": \"10 100\\r\\n1 1 1 1 1 1 1 1 1 1\\r\\n\", \"output\": [\"18\"]}, {\"input\": \"100 10000\\r\\n54 46 72 94 79 83 91 54 73 3 24 55 54 31 28 20 19 6 25 19 47 23 1 70 15 87 51 39 54 77 55 5 60 3 15 99 56 88 22 78 79 21 38 27 28 86 7 88 12 59 55 70 25 1 70 49 1 45 69 72 50 17 4 56 8 100 90 34 35 20 61 76 88 79 4 74 65 68 75 26 40 72 59 94 10 67 96 85 29 90 47 24 44 1 66 93 55 36 1 99\\r\\n\", \"output\": [\"1017\"]}, {\"input\": \"100 6000\\r\\n41 31 23 17 24 78 26 96 93 48 46 2 49 33 35 9 73 100 34 48 83 36 33 69 43 24 3 74 8 81 27 33 94 38 77 9 76 90 62 90 21 67 22 22 12 2 17 27 61 18 72 85 59 65 71 38 90 75 74 66 60 47 58 50 90 95 75 10 5 100 97 29 83 88 65 26 93 90 22 98 36 55 70 38 50 92 88 72 99 96 25 14 74 16 25 92 67 94 77 96\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"1 1\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 6\\r\\n1\\r\\n\", \"output\": [\"1\"]}, {\"input\": \"1 5\\r\\n1\\r\\n\", \"output\": [\"0\"]}, {\"input\": \"1 3\\r\\n4\\r\\n\", \"output\": [\"-1\"]}, {\"input\": \"3 24\\r\\n2 1 2\\r\\n\", \"output\": [\"-1\"]}]","human_pass_rate":100.0,"human_line_coverage":100.0,"human_branch_coverage":100.0,"human_sample_testcases_1":"[{'input': '100 10000\\r\\n54 46 72 94 79 83 91 54 73 3 24 55 54 31 28 20 19 6 25 19 47 23 1 70 15 87 51 39 54 77 55 5 60 3 15 99 56 88 22 78 79 21 38 27 28 86 7 88 12 59 55 70 25 1 70 49 1 45 69 72 50 17 4 56 8 100 90 34 35 20 61 76 88 79 4 74 65 68 75 26 40 72 59 94 10 67 96 85 29 90 47 24 44 1 66 93 55 36 1 99\\r\\n', 'output': ['1017']}, {'input': '45 894\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 28 28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 99 3 1 1\\r\\n', 'output': ['139']}, {'input': '39 2412\\r\\n1 1 1 1 1 1 26 1 1 1 99 1 1 1 1 1 1 1 1 1 1 88 7 1 1 1 1 76 1 1 1 93 40 1 13 1 68 1 32\\r\\n', 'output': ['368']}, {'input': '81 2577\\r\\n85 91 1 1 2 1 1 100 1 80 1 1 17 86 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 37 1 66 24 1 1 96 49 1 66 1 44 1 1 1 1 98 1 1 1 1 35 1 37 3 35 1 1 87 64 1 24 1 58 1 1 42 83 5 1 1 1 1 1 95 1 94 1 50 1 1\\r\\n', 'output': ['174']}, {'input': '96 8889\\r\\n1 1 18 1 1 1 1 1 1 1 1 1 99 1 1 1 1 88 1 45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 96 1 1 1 1 21 1 1 1 1 1 1 1 73 1 1 1 1 1 10 1 1 1 1 1 1 1 46 43 1 1 1 1 1 98 1 1 1 1 1 1 6 1 1 1 1 1 74 1 25 1 55 1 1 1 13 1 1 54 1 1 1\\r\\n', 'output': ['1589']}]","human_sample_testcases_2":"[{'input': '81 4131\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['807']}, {'input': '3 30\\r\\n2 2 1\\r\\n', 'output': ['5']}, {'input': '81 2200\\r\\n1 59 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 93 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['384']}, {'input': '96 8889\\r\\n1 1 18 1 1 1 1 1 1 1 1 1 99 1 1 1 1 88 1 45 1 1 1 1 1 1 1 1 1 1 1 1 1 1 96 1 1 1 1 21 1 1 1 1 1 1 1 73 1 1 1 1 1 10 1 1 1 1 1 1 1 46 43 1 1 1 1 1 98 1 1 1 1 1 1 6 1 1 1 1 1 74 1 25 1 55 1 1 1 13 1 1 54 1 1 1\\r\\n', 'output': ['1589']}, {'input': '45 894\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 28 28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 99 3 1 1\\r\\n', 'output': ['139']}]","human_sample_testcases_3":"[{'input': '81 6315\\r\\n1 1 67 100 1 99 36 1 92 5 1 96 42 12 1 57 91 1 1 66 41 30 74 95 1 37 1 39 91 69 1 52 77 47 65 1 1 93 96 74 90 35 85 76 71 92 92 1 1 67 92 74 1 1 86 76 35 1 56 16 27 57 37 95 1 40 20 100 51 1 80 60 45 79 95 1 46 1 25 100 96\\r\\n', 'output': ['490']}, {'input': '81 2577\\r\\n85 91 1 1 2 1 1 100 1 80 1 1 17 86 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 37 1 66 24 1 1 96 49 1 66 1 44 1 1 1 1 98 1 1 1 1 35 1 37 3 35 1 1 87 64 1 24 1 58 1 1 42 83 5 1 1 1 1 1 95 1 94 1 50 1 1\\r\\n', 'output': ['174']}, {'input': '39 3681\\r\\n83 77 1 94 85 47 1 98 29 16 1 1 1 71 96 85 31 97 96 93 40 50 98 1 60 51 1 96 100 72 1 1 1 89 1 93 1 92 100\\r\\n', 'output': ['326']}, {'input': '45 4534\\r\\n1 99 65 99 4 46 54 80 51 30 96 1 28 30 44 70 78 1 1 100 1 62 1 1 1 85 1 1 1 61 1 46 75 1 61 77 97 26 67 1 1 63 81 85 86\\r\\n', 'output': ['514']}, {'input': '1 1\\r\\n1\\r\\n', 'output': ['0']}]","human_sample_testcases_4":"[{'input': '1 1\\r\\n1\\r\\n', 'output': ['0']}, {'input': '50 10000\\r\\n4 7 15 9 11 12 20 9 14 14 10 13 6 13 14 17 6 8 20 12 10 15 13 17 5 12 13 11 7 5 5 2 3 15 13 7 14 14 19 2 13 14 5 15 3 19 15 16 4 1\\r\\n', 'output': ['1891']}, {'input': '81 4131\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['807']}, {'input': '100 9000\\r\\n5 2 3 1 1 3 4 9 9 6 7 10 10 10 2 10 6 8 8 6 7 9 9 5 6 2 1 10 10 9 4 5 9 2 4 3 8 5 6 1 1 5 3 6 2 6 6 6 5 8 3 6 7 3 1 10 9 1 8 3 10 9 5 6 3 4 1 1 10 10 2 3 4 8 10 10 5 1 5 3 6 8 10 6 10 2 1 8 10 1 7 6 9 10 5 2 3 5 3 2\\r\\n', 'output': ['1688']}, {'input': '1 6\\r\\n1\\r\\n', 'output': ['1']}]","human_sample_testcases_5":"[{'input': '3 24\\r\\n2 1 2\\r\\n', 'output': ['-1']}, {'input': '81 4131\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1\\r\\n', 'output': ['807']}, {'input': '3 30\\r\\n2 2 1\\r\\n', 'output': ['5']}, {'input': '100 9000\\r\\n5 2 3 1 1 3 4 9 9 6 7 10 10 10 2 10 6 8 8 6 7 9 9 5 6 2 1 10 10 9 4 5 9 2 4 3 8 5 6 1 1 5 3 6 2 6 6 6 5 8 3 6 7 3 1 10 9 1 8 3 10 9 5 6 3 4 1 1 10 10 2 3 4 8 10 10 5 1 5 3 6 8 10 6 10 2 1 8 10 1 7 6 9 10 5 2 3 5 3 2\\r\\n', 'output': ['1688']}, {'input': '45 894\\r\\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 28 28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 99 3 1 1\\r\\n', 'output': ['139']}]","human_sample_pass_rate_1":100.0,"human_sample_pass_rate_2":100.0,"human_sample_pass_rate_3":100.0,"human_sample_pass_rate_4":100.0,"human_sample_pass_rate_5":100.0,"human_sample_line_coverage_1":87.5,"human_sample_line_coverage_2":87.5,"human_sample_line_coverage_3":87.5,"human_sample_line_coverage_4":87.5,"human_sample_line_coverage_5":100.0,"human_sample_branch_coverage_1":50.0,"human_sample_branch_coverage_2":50.0,"human_sample_branch_coverage_3":50.0,"human_sample_branch_coverage_4":50.0,"human_sample_branch_coverage_5":100.0,"id":400,"human_sample_pass_rate":100.0,"human_sample_line_coverage":90.0,"human_sample_branch_coverage":60.0}