test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['2\n3\n3 2 1\n6\n3 1 4 1 5 9\n', '4\n7\n6 6 8 8 6 6 6\n1\n2\n5\n4 5 9 8 7\n7\n1 2 7 1 6 10 2\n', '2\n5\n5 5 5 5 5\n3\n1 2 5\n', '2\n5\n1 2 3 4 5\n4\n2 3 4 5\n', '1\n3\n1 1 274005660\n', '2\n2\n1 1\n1\n1\n', '2\n4\n1 3 3 3\n3\n1 2 3\n', '2\n3\n1 1 1\n2\n1 1\n', '1\n5\n1 3 4 5 2\n', '1\n5\n2 3 4 5 2\n', '1\...
b7031bbc35cd3b46690ce0efb4e5479c
__inputs__ = ['2\n3\n3 2 1\n6\n3 1 4 1 5 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
fb8931d7e3dc88e98b0744159a81ab61
__inputs__ = ['3\n2 3 1\n', '4\n2 1 1 1\n', '5\n2 4 2 5 3\n', '4\n2 1 4 3\n', '7\n2 3 4 1 6 5 4\n', '20\n2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1\n', '2\n2 1\n', '84\n2 50 67 79 71 45 43 40 57 20 25 8 60 47 52 10 37 23 1 28 22 26 3 42 11 63 61 68 49 32 55 18 5 24 31 70 66 27 38 41 54 12 65 51 15 34 30 35 77 7...
89d048a84a2329aa17acfb895a8be4eb
__inputs__ = ['3\n2 3 1\n', '4\n2 1 1 1\n', '5\n2 4 2 5 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
93b954dd127d38f864b0546a20ab81dc
__inputs__ = ['3\n1 6 8\n1\n6\n', '1\n10\n5\n5 3 7 7 1\n', '4\n7 4 1 7\n3\n6 8 3\n', '1\n1\n3\n2 1 10\n', '2\n2 9\n5\n4 10 7 3 4\n', '1\n2\n5\n7 3 9 8 1\n', '2\n9 3\n1\n6\n', '1\n7\n4\n6 2 3 3\n', '2\n7 4\n1\n7\n', '2\n7 10\n2\n2 4\n', '3\n4 5 4\n2\n10 2\n', '2\n7 9\n1\n9\n', '5\n9 5 7 3 3\n1\n3\n', '4\n8 10 4 4\n3\n7 ...
660d66195d8f0f5207f3bd31fbef27eb
__inputs__ = ['5\n2 3 4 1 1\n2\n2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4f8881271077b2e152ddea95dfa35bd9
__inputs__ = ['4\n5\n1 5 2 4 6\n4\n8 2 5 10\n2\n1000 2000\n8\n465 55 3 54 234 12 45 78\n', '1\n20\n16 15 17 8 30 23 20 28 27 6 1 18 24 2 10 5 14 29 12 7\n', '3\n3\n14 4 27\n13\n26 14 6 10 5 3 29 2 24 12 22 11 1\n4\n10 25 29 11\n', '5\n1\n13\n1\n1\n6\n7 19 28 25 4 10\n3\n3 19 10\n9\n26 1 28 8 24 27 12 16 17\n', '1\n20\n...
f005a4b05fa24c0431f8fa989a7bfee7
__inputs__ = ['4\n5\n1 5 2 4 6\n4\n8 2 5 10\n2\n1000 2000\n8\n465 55 3 54 234 12 45 78\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
91bb5c18f3d5c271c0de8841621b305d
__inputs__ = ['4\n2\n1 2\n3\n1 2 3\n3\n1 1 1\n3\n2 3 2\n', '1\n2\n1 1\n', '1\n3\n1 2 2\n', '1\n4\n1 2 3 4\n', '1\n8\n1 2 3 4 5 6 7 8\n', '1\n9\n9 9 9 9 9 9 9 9 9\n', '1\n10\n10 10 10 10 10 10 10 10 10 10\n', '1\n5\n5 4 3 2 1\n', '1\n3\n1 1 1\n', '1\n4\n4 4 4 4\n', '1\n4\n1 1 3 3\n', '1\n5\n1 2 3 5 4\n', '1\n6\n3 3 3 3 ...
cf9ea73c65fade8c06772bb214f6d364
__inputs__ = ['4\n2\n1 2\n3\n1 2 3\n3\n1 1 1\n3\n2 3 2\n', '1\n3\n2 3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4ac83474a4a6d2940687faff0a4fa3fd
__inputs__ = ['1\n4 2 3 10\n7 7 7\n4 6 10\n7 10 9\n9 9\n', '1\n4 2 3 10\n9 7 7\n4 6 10\n7 10 9\n9 9\n', '1\n4 3 3 10\n9 7 7\n4 6 10\n7 10 9\n9 9\n', '1\n4 3 3 10\n9 7 7\n4 6 9\n2 10 9\n9 9\n', '1\n4 2 3 10\n7 7 7\n2 6 10\n7 10 9\n9 9\n', '1\n4 2 3 14\n7 7 7\n10 6 10\n7 10 9\n9 9\n', '1\n4 1 3 14\n0 5 7\n10 6 10\n7 4 17...
fd36ec76315b859ce75a3e7105ccdbb6
__inputs__ = ['1\n4 2 3 10\n7 7 7\n4 6 10\n7 10 9\n9 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2ebfee0b0b5c563654bda77e827e1109
__inputs__ = ['3\n8 12 40\n', '4\n5 6 8 10\n', '6\n382253568 723152896 37802240 379425024 404894720 471526144\n', '6\n382253568 723152896 37802240 379425024 590201381 471526144\n', '3\n10 12 40\n', '3\n16 36 16\n', '4\n5 6 13 10\n', '6\n382253568 723152896 32183854 379425024 590201381 471526144\n', '4\n5 6 22 10\n', '3...
0cfa94590826ef71e36c653e6d5d637e
__inputs__ = ['3\n8 12 40\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4288bdcd793055341e16934ca7af70ec
__inputs__ = ['4 4 0\n2 1 2\n', '5 6 1\n2 7 2\n', '3 3 3\n2 2 2\n', '0 0 0\n0 0 0\n', '0 0 0\n0 0 1\n', '0 1 0\n0 0 0\n', '1 0 0\n1 0 0\n', '2 2 1\n1 1 2\n', '1 3 1\n2 1 1\n', '1000000 1000000 1000000\n1000000 1000000 1000000\n', '1000000 500000 500000\n0 750000 750000\n', '500000 1000000 500000\n750001 0 750000\n', '4...
139115782d55903ac4fcce880e723c79
__inputs__ = ['4 4 0\n2 1 2\n', '5 6 1\n2 7 2\n', '3 3 3\n2 2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9fa52db0ccca8dbf55bd0bc1fbb9b7f7
__inputs__ = ['6\n205\n2050\n4100\n20500\n22550\n25308639900\n', '9\n205000000000000000\n999999999999999000\n1000000000000000000\n204999999999997950\n983999999999997950\n205\n2255\n50\n20\n', '1\n410\n', '1\n1\n', '1\n807\n', '9\n205000000000000000\n999999999999999000\n1000000000000000000\n204999999999997950\n983999999...
8e256e3c6f31028ca900cb941108c586
__inputs__ = ['6\n205\n2050\n4100\n20500\n22550\n25308639900\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
89b9739d848e39a51df13c975e068fc4
__inputs__ = ['5\n100 36 53 7 81\n', '5\n100 81 53 36 7\n', '10\n8 6 3 4 9 10 7 7 1 3\n', '33\n1097 1132 1091 1104 1049 1038 1023 1080 1104 1029 1035 1061 1049 1060 1088 1106 1105 1087 1063 1076 1054 1103 1047 1041 1028 1120 1126 1063 1117 1110 1044 1093 1101\n', '34\n821 5536 2491 6074 7216 9885 764 1603 778 8736 8987...
d6a8925c482e9f5d83736a99869f5578
__inputs__ = ['10\n4664 6496 5814 7010 5762 5736 6944 4850 3698 7242\n', '5\n100 50 200 150 200\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0c09a9330f7a2c0d183e7b669d9c5599
__inputs__ = ['21\n', '12\n', '9\n', '34\n', '8\n', '25\n', '14\n', '49\n', '0\n', '4\n', '-1\n', '1\n', '-2\n', '2\n', '-4\n', '3\n', '-5\n', '5\n', '-3\n', '-8\n', '-6\n', '-13\n', '-10\n', '-21\n', '-15\n', '-31\n', '-12\n', '-35\n', '-11\n', '6\n', '-20\n', '-16\n', '-7\n', '-19\n', '10\n', '-28\n', '7\n', '-36\n',...
ad1462306aa49dc0ac3d251382f5badd
__inputs__ = ['21\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e76cffca48fcfa2d853e07b58c21124d
__inputs__ = ['the cost of one peach is higher than th`t of one apple.\n', 'the cost of ooe peach is higher than th`t of one apple.\n', 'the cost of ooe peach is higher than th`t of eno apple.\n', 'the cpst of ooe peach is higher than th`t of eno apple.\n', 'the cpst of ooe peach is higher than t`ht of eno apple.\n', '...
f0610ce8b29ea5b155578f97fce7a928
__inputs__ = ['the cost of one peach is higher than that of one apple.\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
fca60ece7b21f10e6cf24a42b77e10fd
__inputs__ = ['3\n4 5 7\n', '2\n1 1\n', '10\n38282 53699 38282 38282 38282 38282 38282 38282 38282 38282\n', '10\n50165 50165 50165 50165 50165 50165 50165 50165 50165 50165\n', '10\n83176 83176 83176 23495 83176 8196 83176 23495 83176 83176\n', '10\n32093 36846 32093 32093 36846 36846 36846 36846 36846 36846\n', '3\n1...
3de3f5b2107138436289dedb74aca84f
__inputs__ = ['3\n4 5 7\n', '2\n1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
45a273088b8be2f5e166aa288a104eb8
__inputs__ = ['2 2\n2 6\n3 100\n', '2 3\n10 10\n1 1 1\n', '2 2\n888381664 866366630\n170399907 404233949\n', '3 4\n337369924 278848730 654933675\n866361693 732544605 890800310 350303294\n', '10 10\n510955240 684852706 455356451 284505713 595775142 646334608 563116339 941123613 818750895 516673753\n382626402 204542396 3...
0657c2292f54947ea65e172c4474f688
__inputs__ = ['2 2\n2 6\n3 100\n', '2 3\n10 10\n1 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
11b64310d69103d1b038cc98935d6552
__inputs__ = ['5\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\n', '1\naa\n', '61\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\nkzaaa\ncod...
5be407a812defa410d21a7493515c14b
__inputs__ = ['5\nkzaaa\ncodeforces\narchive\ny\nxxxxxx\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f43f6e4a18c16de44bdd3b1d0b94bfb5
__inputs__ = ['3 3 2\n1 1\n1..\n...\n..2\n', '3 4 4\n1 1 1 1\n....\n#...\n1234\n', '3 4 2\n1 1\n....\n1..2\n....\n', '3 4 2\n2 1\n....\n1..2\n....\n', '4 4 2\n1 1000000000\n....\n....\n..2.\n...1\n', '4 4 2\n1 1000000000\n....\n....\n..1.\n...2\n', '1 1 1\n1\n1\n', '5 5 1\n1\n.....\n.....\n..1..\n.....\n.....\n', '4 7 ...
4768fb2aee8e753eff2a999a09217693
__inputs__ = ['3 3 2\n1 1\n1..\n...\n..2\n', '3 4 4\n1 1 1 1\n....\n#...\n1234\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3b5a60fdeb868c42ea5e786b734ac432
__inputs__ = ['4 2\n1 3\n1 4\n', '7 8\n1 6\n2 6\n3 5\n3 6\n4 3\n5 1\n5 2\n5 3\n', '2 2\n1 2\n2 1\n', '1000000000 9\n1 2\n3 1\n3 2\n999999998 999999999\n999999998 1000000000\n999999999 999999999\n999999999 999999997\n1000000000 999999996\n1000000000 999999997\n', '1000000000 10\n1 2\n3 1\n3 2\n999999998 999999999\n99999...
61a71cd642b9d7199b7afc8d55ec12e2
__inputs__ = ['4 2\n1 3\n1 4\n', '7 8\n1 6\n2 6\n3 5\n3 6\n4 3\n5 1\n5 2\n5 3\n', '2 2\n1 2\n2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4ce97487259013e20092728de72c1f93
__inputs__ = ['8 10\n1 2 1\n2 3 2\n2 4 5\n1 4 2\n6 3 3\n6 1 3\n3 5 2\n3 7 1\n4 8 1\n6 2 4\n', '4 3\n2 1 3\n4 3 4\n2 4 1\n', '3 3\n1 2 1\n2 3 2\n1 3 3\n', '3 3\n1 2 1\n2 3 3\n1 3 3\n', '1 0\n', '5 6\n1 2 2\n2 3 1\n4 5 3\n2 4 2\n1 4 2\n1 5 3\n', '4 4\n1 2 3\n2 3 4\n3 4 3\n4 1 4\n', '6 7\n1 2 1\n2 3 1\n3 4 1\n4 5 1\n5 1 2...
f5e5ebd610cc2735528bb14888805773
__inputs__ = ['8 10\n1 2 1\n2 3 2\n2 4 5\n1 4 2\n6 3 3\n6 1 3\n3 5 2\n3 7 1\n4 8 1\n6 2 4\n', '4 3\n2 1 3\n4 3 4\n2 4 1\n', '3 3\n1 2 1\n2 3 2\n1 3 3\n', '3 3\n1 2 1\n2 3 3\n1 3 3\n', '1 0\n', '5 6\n1 2 2\n2 3 1\n4 5 3\n2 4 2\n1 4 2\n1 5 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io...
4970d8ef6aa3fb71c4ad397748679c7a
__inputs__ = ['3\n6 9\n1 1\n1 2\n', '1\n69 69\n', '1\n69 16\n', '3\n6 2\n1 1\n1 2\n', '3\n6 2\n1 1\n1 0\n', '1\n29 16\n', '3\n5 2\n1 2\n2 0\n', '3\n6 9\n1 1\n1 0\n', '3\n6 2\n0 0\n1 2\n', '3\n2 4\n0 1\n0 0\n', '3\n0 0\n2 1\n2 -1\n', '1\n22 16\n', '3\n5 2\n1 1\n1 0\n', '1\n29 2\n', '3\n5 2\n1 1\n2 0\n', '1\n24 2\n', '1\...
ccaa1a681996bb866915bbe65fec1a78
__inputs__ = ['3\n6 9\n1 1\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7f16b61f4db92ba427d4539c2330dfec
__inputs__ = ['100 100 1 1\n50 0 50 100 50\n640 480 1 2\n0 0 640 480 100\n0 0 0 0\n', '100 100 1 1\n62 0 50 100 50\n640 480 1 1\n0 0 640 480 100\n0 0 0 0\n', '100 100 1 1\n50 0 50 100 50\n640 480 1 2\n0 0 640 480 110\n0 0 0 0\n', '100 100 1 1\n76 0 50 100 50\n640 480 1 1\n0 0 640 480 100\n0 0 0 0\n', '100 100 1 1\n50 0...
30fd1908886dd8e58e384a5bc71effea
__inputs__ = ['100 100 1 1\n50 0 50 100 50\n640 480 1 1\n0 0 640 480 100\n0 0 0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5a758d4c9bb6fbf83a47cb68ca55599e
__inputs__ = ['8 4 1\n3 3\n', '10 6 10\n10 4\n4 4\n5 1\n4 2\n7 3\n1 3\n2 4\n8 2\n3 5\n7 1\n', '10 6 10\n10 4\n4 4\n5 1\n6 2\n7 3\n1 3\n2 4\n8 2\n7 5\n7 1\n', '8 4 0\n3 3\n', '3 4 0\n5 3\n', '4 4 0\n3 3\n', '8 2 0\n3 3\n', '4 4 1\n3 1\n', '10 6 10\n10 4\n4 2\n5 1\n4 2\n7 3\n1 3\n2 4\n8 2\n7 5\n7 1\n', '8 6 1\n3 3\n', '8...
aeb8fc1ca223c294fde1e0ebf1dec4aa
__inputs__ = ['4 4 1\n3 3\n', '10 6 10\n10 4\n4 4\n5 1\n4 2\n7 3\n1 3\n2 4\n8 2\n7 5\n7 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4acf2e14a31ba6cc20f0bc18efe72e82
__inputs__ = ['1\n.135\n1247\n3468\n5789\n', '5\n..1.\n1111\n..1.\n..1.\n', '1\n....\n12.1\n.2..\n.2..\n', '1\n....\n....\n....\n....\n', '1\n6981\n.527\n4163\n2345\n', '5\n9999\n9999\n9999\n9999\n', '2\n4444\n3333\n2222\n1111\n', '3\n2123\n1232\n2321\n3213\n', '2\n1...\n.1..\n..1.\n...1\n', '2\n1.1.\n.1.1\n2.2.\n.222\...
f32b0023f9aa1b5bf601e74cbb737c6a
__inputs__ = ['1\n.135\n1247\n3468\n5789\n', '5\n..1.\n1111\n..1.\n..1.\n', '1\n....\n12.1\n.2..\n.2..\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
bdb0ee5c5924d724c18a324d7c2c1efa
__inputs__ = ['19\n', '16\n', '1\n', '2\n', '3\n', '4\n', '5\n', '6\n', '7\n', '8\n', '9\n', '10\n', '11\n', '12\n', '13\n', '14\n', '15\n', '17\n', '18\n', '20\n', '21\n', '260158260522\n', '250877914575\n', '116602436426\n', '540024979445\n', '917861648772\n', '962623690081\n', '54433933447\n', '16476190629\n', '4262...
5393787e0f8de7f5f4ff4085c7ae1d11
__inputs__ = ['19\n', '16\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
87f52e58568af715456fddd6d001011a
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
e66b8c3a618cba6af6f6fcc9effeac0d
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
2ad1fd479a2ca3d34ab7abe76a90fdb7
__inputs__ = ['6\n010000\n000001\n', '10\n1111100000\n0000011111\n', '8\n10101010\n01010101\n', '10\n1111100000\n1111100001\n', '12\n011001010101\n111001010101\n', '9\n111110000\n111100000\n', '5\n10100\n01010\n', '10\n1010111110\n1011101101\n', '3\n000\n000\n', '5\n11011\n10111\n', '10\n0111101111\n0111111110\n', '10\...
d41d1c504a9da1e1cbed286762c88309
__inputs__ = ['6\n010000\n000001\n', '10\n1111100000\n0000011111\n', '8\n10101010\n01010101\n', '10\n1111100000\n1111100001\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
887f39f8acf77d66815f59875487bab9
__inputs__ = ['7 3\nabb 2\naaa -3\nbba -1\nzyz -4\nabb 5\naaa 7\nxyx 4\n', '3 1\na 1\na 2\na 3\n', '2 5\nabcde 10000\nabcde 10000\n', '10 10\nnjxbzflaka -1\nfelbvvtkja 6\ngxiuztqkcw 5\naomvscmtti 6\njsqmkoyuca -2\nwckqtzuixg 5\najktvvblef -5\nittmcsvmoa -1\nakalfzbxjn 10\nacuyokmqsj 8\n', '10 20\njvyxocgomfmrtllgmagp 1...
ea27c41b3ced832ea739fc5777c51349
__inputs__ = ['7 3\nabb 2\naaa -3\nbba -1\nzyz -4\nabb 5\naaa 7\nxyx 4\n', '3 1\na 1\na 2\na 3\n', '2 5\nabcde 10000\nabcde 10000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
847a7f468ca04269c485f236e2a88fca
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
346f391e25c46be155be71ed9599afa3
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
20e316ba934ee3e16f91b35777ae57fd
__inputs__ = ['10\n-2 1\n2 -2\n-1 -2\n0 0\n2 -1\n0 -2\n2 2\n0 2\n-1 -1\n1 -2\n', '40\n-8 24\n2 -1\n1 -18\n72 -70\n5 -4\n-308 436\n-19 40\n36 -35\n-178 265\n-1 2\n-7 30\n-1 0\n3 -2\n200 -285\n17 -16\n-35 74\n0 -4\n-86 106\n-1 4\n-7 6\n0 1\n-5 4\n-2 3\n6 -5\n-4 5\n181 -262\n76 -118\n0 0\n-7 18\n-58 104\n-5 6\n-6 12\n-3 4...
4f46f4dd84032782c53b7196dd3e0f95
__inputs__ = ['3\n0 0\n-1 0\n0 1\n', '3\n1 1\n2 2\n3 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
03719d4f46fbdf3bcd5eeac34fd5ed9f
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
e4c6b6aca70b4b26567c6a1f164d0198
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
6758580797c1e9e16ff8d2e08a948f25
__inputs__ = ['12257\n', '5183\n', '298\n', '2221\n', '917\n', '16763\n', '6607\n', '95\n', '18919\n', '12428\n', '144\n', '36955\n', '5648\n', '181\n', '43731\n', '7107\n', '185\n', '74636\n', '5118\n', '69338\n', '313\n', '301\n', '3432\n', '595\n', '446\n', '2852\n', '131\n', '174\n', '2881\n', '79\n', '270\n', '428...
66a59c03386347b1c46bf352d1143307
__inputs__ = ['9592\n', '3456\n', '1222\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b3ff835f05b06ce5fce4acc00ae774f4
__inputs__ = ['4 2\n0 1 2\n0 2 1\n1 2 1\n1 3 1\n2 3 2\n', '3 2\n1 1 0\n0 2 1\n1 1 2\n1 3 1\n2 3 2\n', '6 2\n0 1 2\n0 2 1\n1 2 1\n1 3 1\n2 3 2\n', '6 2\n0 1 2\n0 2 1\n1 2 1\n1 3 1\n2 3 4\n', '6 2\n0 1 2\n0 2 1\n1 2 1\n1 3 1\n2 3 5\n', '6 2\n0 1 0\n0 2 1\n1 2 1\n1 3 1\n2 3 5\n', '6 2\n1 1 0\n0 2 1\n1 2 1\n1 3 1\n2 3 5\n'...
17f444d787f851bec3713f852496aea5
__inputs__ = ['4 5\n0 1 2\n0 2 1\n1 2 1\n1 3 1\n2 3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c5d75a896fb4b9d470cddbb14ab62dc6
__inputs__ = ['1 1 3\n', '1000000000 1000000000 1\n', '2 1 2\n', '222 332 5\n', '2 2 1\n', '456784567 1000000000 51\n', '1001 1000 10\n', '2 3 4\n', '1000000000 1000000000 999999999\n', '2 1 1\n', '100 10001 1000000000\n', '39916800 134217728 40320\n', '12 13 4\n', '1000 1000 10\n', '1 1 1\n', '1000000000 987654321 1\n...
49a4adae6da03bbe8b6fb412037d6689
__inputs__ = ['6 6 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1c03ac9986ac5a456c472ddf12695f82
__inputs__ = ['5\n2\n1 2\n2 1\n3\n1 2 3\n1 2 3\n3\n1 2 4\n1 3 4\n4\n1 2 3 2\n3 1 2 2\n3\n1 2 3\n1 3 2\n', '1\n1\n1\n1\n', '2\n2\n2 1\n1 2\n2\n2 1\n2 1\n', '6\n3\n3 2 1\n1 2 3\n3\n3 2 1\n1 3 2\n3\n3 2 1\n2 1 3\n3\n3 2 1\n2 3 1\n3\n3 2 1\n3 1 2\n3\n3 2 1\n3 2 1\n', '24\n4\n1 2 3 4\n1 2 3 4\n4\n1 2 3 4\n1 2 4 3\n4\n1 2 3 ...
805eb385aa12adeaa65745cb4b3f73c2
__inputs__ = ['5\n2\n1 2\n2 1\n3\n1 2 3\n1 2 3\n3\n1 2 4\n1 3 4\n4\n1 2 3 2\n3 1 2 2\n3\n1 2 3\n1 3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3e7efcb54c20b8ef71ab6759d88da5f9
__inputs__ = ['3\n4\n1 3 2 4\n3\n1 2 3\n5\n2 1 4 5 3\n', '1\n8\n6 2 3 1 8 4 5 7\n', '1\n8\n6 0 3 1 8 4 5 7\n', '3\n4\n1 3 2 7\n3\n1 2 3\n5\n2 1 4 5 3\n', '1\n8\n5 2 2 1 0 0 2 8\n', '1\n6\n6 0 3 1 8 4 5 7\n', '1\n8\n6 2 6 1 8 4 5 7\n', '1\n8\n6 0 3 1 8 6 5 7\n', '1\n6\n6 0 3 1 8 5 5 7\n', '1\n8\n6 2 6 1 8 6 5 7\n', '3\n...
538776a04c1e9bf7ee58ad4f2bef42ba
__inputs__ = ['3\n4\n1 3 2 4\n3\n1 2 3\n5\n2 1 4 5 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f214abf5378a1005d57d745fd4758ff0
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
f90b490d224ad3dceea9bae77bd93076
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
2ad1fd479a2ca3d34ab7abe76a90fdb7
__inputs__ = ['4\n1001 2000 520\n80 1800 450\n1003 1600 625\n1001 200 1220\n2\n1001 100 3\n1005 1000 100\n2\n2013 5000 100\n2013 5000 100\n0\n', '4\n0001 2000 520\n80 1800 450\n1003 1600 625\n1001 200 1220\n2\n1001 100 3\n1005 1000 100\n2\n2013 5000 100\n2013 5000 100\n0\n', '4\n0000 2000 520\n80 1800 450\n1003 1600 62...
1d1befe09d170bd1b1c1019459ce639f
__inputs__ = ['4\n1001 2000 520\n1002 1800 450\n1003 1600 625\n1001 200 1220\n2\n1001 100 3\n1005 1000 100\n2\n2013 5000 100\n2013 5000 100\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2f4946753d1945c0fa42a69733a7a783
__inputs__ = ['4\n-83 -87 42 -96\n', '100\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\n', '100\n-43 0 -81 10 67 61 0 76 -16 1 -1 69 -59 -87 14 -20 -48 -41 90 96 8 ...
9d5a11caaf692578913d1653a0c2bd25
__inputs__ = ['5\n-4 2 0 5 0\n', '3\n-1 -2 -3\n', '5\n-1 10 -5 10 -2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
39cb9159e9e6bb0e97c0b4c21ae8cefc
__inputs__ = ['19\n19 14 48\n11 19 23\n17 14 30\n7 11 15\n2 19 15\n2 18 21\n19 10 43\n12 11 25\n3 11 4\n5 19 50\n4 11 19\n9 12 29\n14 13 3\n14 6 12\n14 15 17\n5 1 6\n8 18 13\n7 16 14\n', '3\n1 3 10\n2 3 20\n', '19\n19 14 48\n11 19 23\n17 14 30\n7 11 15\n2 19 15\n2 18 21\n19 10 43\n12 11 25\n3 11 4\n5 19 50\n4 11 19\n9 ...
8109196cc9bbedbdfc4737edaeee5dfc
__inputs__ = ['15\n6 3 2\n13 3 1\n1 13 2\n7 1 2\n8 1 1\n2 8 2\n2 12 2\n5 2 2\n2 11 2\n10 2 2\n10 9 1\n9 14 2\n4 14 1\n11 15 2\n', '19\n19 14 48\n11 19 23\n17 14 30\n7 11 15\n2 19 15\n2 18 21\n19 10 43\n12 11 25\n3 11 4\n5 19 50\n4 11 19\n9 12 29\n14 13 3\n14 6 12\n14 15 14\n5 1 6\n8 18 13\n7 16 14\n', '3\n1 2 10\n2 3 2...
1e25ede60561543fed1caa9fe77418da
__inputs__ = ['3 5\n6\n2\n9\n7\n5\n', '3 5\n6\n2\n9\n10\n5\n', '3 5\n6\n2\n9\n7\n0\n', '3 5\n6\n2\n8\n7\n0\n', '3 5\n6\n1\n8\n10\n9\n', '3 5\n5\n2\n8\n10\n9\n', '3 5\n5\n2\n9\n7\n0\n', '3 5\n6\n1\n9\n6\n5\n', '3 5\n6\n2\n8\n5\n0\n', '3 5\n3\n2\n8\n10\n9\n', '6 5\n5\n2\n9\n7\n0\n', '3 5\n6\n1\n9\n6\n3\n', '5 5\n6\n2\n8\...
bdfa72e6f1fe69f89d28865126c89da6
__inputs__ = ['3 5\n6\n2\n9\n7\n5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2a293a9453099e0d227abb2569f73e4f
__inputs__ = ['4\n', '6\n', '2\n', '1000\n', '100000\n', '100\n', '300\n', '10\n', '20\n', '3\n', '5\n', '7\n', '8\n', '9\n', '39004\n', '22308\n', '16054\n', '92775\n', '5071\n', '53213\n', '61106\n', '71468\n', '69475\n', '2627\n', '90783\n', '60501\n', '37944\n', '92280\n', '582\n', '81367\n', '39914\n', '8554\n', '...
6a2191935ff2cb6d8558fa8e8906be19
__inputs__ = ['4\n', '6\n', '2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7e145cfd2b7c973d22a979e8988d1367
__inputs__ = ['1 5\n', '2 3\n', '4 6\n', '6 3\n', '1 1\n', '10 1\n', '20 10\n', '1000 10000\n', '139 9252\n', '859 8096\n', '987 4237\n', '411 3081\n', '539 9221\n', '259 770\n', '387 5422\n', '515 1563\n', '939 407\n', '518 6518\n', '646 1171\n', '70 7311\n', '494 6155\n', '918 7704\n', '46 3844\n', '174 2688\n', '894...
d4432d33138daaf786ed5755bd1a8081
__inputs__ = ['1 5\n', '2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
427fa81043665e0820b42f7c5544a88a
__inputs__ = ['3\n1 2 3\n2\n1 1 3\n2 1 3\n', '2\n1 2\n3\n0 1 2\n1 1 2\n2 1 2\n', '5\n1 2 3 4 5\n4\n0 1 5\n1 1 5\n2 1 5\n3 2 4\n', '4\n1 5 7 10\n3\n0 2 4\n1 1 4\n4 1 3\n', '6\n1 3 5 7 9 11\n5\n0 1 6\n1 1 4\n2 3 5\n3 4 6\n4 2 4\n', '7\n1 2 3 4 5 6 7\n2\n100 1 7\n200 3 7\n', '5\n1 2 3 4 5\n3\n100000 1 5\n12345 2 4\n67890 ...
d12061df6a36455e7714e3f0b0b07586
__inputs__ = ['3\n1 2 3\n2\n1 1 3\n2 1 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
490842f494f138bf6812ec3ef53a265d
__inputs__ = ['6\n(?????\n', '10\n(???(???(?\n', '4\n))((\n', '6\n))??((\n', '10\n((?()??())\n', '10\n())))()(((\n', '6\n(?((??\n', '18\n?(?(?(?(?(?(?(?(??\n', '18\n??)??))?)?)???))))\n', '18\n((?((((???(??(????\n', '2\n??\n', '1\n?\n', '4\n????\n', '6\n((((??\n', '6\n??))))\n', '8\n(((?(?(?\n', '30\n?()????(????)???)?...
33ab19e7279a20d22abc8a56a9413db0
__inputs__ = ['10\n(???(???(?\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
10073556460c0c4fe927eb96fdb699cd
__inputs__ = ['5\n1 1\n999\n1 1\n1000\n2 1\n51 50\n2 2\n51 50\n3 3\n101 102 103\n', '4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 20 16\n', '1\n4 3\n1 3 5 7\n', '4\n3 1\n16 11 12\n10 3\n13 12 9 1 9 8 4 19 16 19\n3 2\n3 2 6\n9 7\n11 14 1 6 3 12 3 20 16\n', '1\n5 4\n1 1 1 1 1\n', '4...
d8e1b7ae77603acd30989545da425c80
__inputs__ = ['5\n1 1\n999\n1 1\n1000\n2 1\n51 50\n2 2\n51 50\n3 3\n101 102 103\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e8039a565104f220846d56e0d3660da1
__inputs__ = ['4 1\n2 3 1 2\n3\n', '5 2\n3 5 2 2 4\n1 4\n', '7 7\n6 9 2 7 4 8 7\n1 2 3 4 5 6 7\n', '73 27\n651 944 104 639 369 961 338 573 516 690 889 227 480 160 299 783 270 331 793 796 64 712 649 88 695 550 829 303 965 780 570 374 371 506 954 632 660 987 986 253 144 993 708 710 890 257 303 651 923 107 386 893 301 387...
4387f3265b038e5d569bb8266e263198
__inputs__ = ['4 1\n2 3 1 2\n3\n', '5 2\n3 5 2 2 4\n1 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c9c2cfb911088ce19122d943a3456a0e
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
8ada9c81bd79b20b1e21a22b81e6806e
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
f31191a5ee5b6dd4bfc1046fef59106b
__inputs__ = ['3\n5 3\n7 18 3 14 1\n5 4\n1 2 3 4 5\n6 2\n1 2 8 4 10 2\n', '1\n1 1\n2\n', '3\n5 3\n7 18 3 14 1\n5 4\n1 2 3 4 5\n6 2\n2 2 8 4 10 2\n', '3\n5 3\n7 18 3 14 1\n5 4\n1 2 3 4 5\n6 2\n3 1 8 4 10 2\n', '3\n5 3\n7 26 2 14 1\n4 4\n1 2 4 4 1\n6 3\n3 2 8 4 10 0\n', '1\n1 2\n2\n', '3\n5 3\n7 18 3 14 1\n5 4\n1 2 3 4 1...
4262881ee2077994d5066e86e2d37491
__inputs__ = ['3\n5 3\n7 18 3 14 1\n5 4\n1 2 3 4 5\n6 2\n1 2 8 4 10 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
185094e838d17350398345ef13c57a31
__inputs__ = ['4\n4\nabcd\nabdc\n5\nababa\nbaaba\n4\nasdf\nasdg\n4\nabcd\nbadc\n', '4\n4\nabcd\nabdc\n5\nababa\nbaaba\n4\nasdf\nasdg\n4\nabdd\nbadc\n', '4\n4\nabcd\nabdc\n5\nababa\nabaab\n4\nasdf\nasdg\n4\nabcd\nbadc\n', '4\n4\nabcd\nabdc\n5\naaabc\nbabaa\n4\nfdsa\nasdg\n4\nabdd\nbadc\n', '4\n4\ndabb\nabdb\n5\nababa\na...
40dcb03130387ada8613d5932a7211e3
__inputs__ = ['4\n4\nabcd\nabdc\n5\nababa\nbaaba\n4\nasdf\nasdg\n4\nabcd\nbadc\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e3f937bbc344e5073da593940e20ec78
__inputs__ = ['4\n1 2 2 4\n3\n2\n3\n6\n', '4\n1 1 2 4\n3\n0\n3\n8\n', '4\n0 1 2 7\n3\n0\n7\n10\n', '4\n0 1 2 6\n3\n0\n3\n6\n', '4\n1 2 1 4\n2\n0\n3\n8\n', '4\n0 1 2 7\n1\n0\n5\n3\n', '4\n0 2 3 4\n3\n2\n3\n4\n', '4\n0 1 2 7\n1\n-1\n5\n3\n', '4\n0 2 1 3\n3\n-1\n3\n6\n', '4\n0 2 2 1\n3\n4\n3\n0\n', '4\n1 1 1 4\n2\n0\n1\n8...
163e4d38db9610ef9823c649447b9bb9
__inputs__ = ['4\n1 2 2 4\n3\n2\n3\n5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a17640003e591e424b83f24b933775f5
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
4c1e2312abdd2c8f61557a1f07611fdb
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
310c4dd479186508186c5224b855b614