test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['3 1\n1 1\n', '5 1\n1 1\n', '6 1\n1 1\n', '3 1\n3 2\n', '5 1\n3 2\n', '2 1\n1 2\n', '9 1\n1 2\n', '15 1\n1 2\n', '10 1\n1 2\n', '10 1\n1 1\n', '8 1\n2 4\n', '19 1\n1 2\n', '18 1\n1 2\n', '24 1\n1 4\n', '27 1\n1 5\n', '13 1\n4 2\n', '21 1\n8 2\n', '45 1\n4 14\n', '12 1\n1 2\n', '32 1\n1 4\n', '20 1\n3 2\n'...
2d12b7196f9d8eab4bc9a485df3212d4
__inputs__ = ['3 1\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2d729c29cc16874dc01e2ef5c1951f0a
__inputs__ = ['2 5\npermit 192168?? ?12??34?\ndeny 19216899 012343?5\n19216711 11233340 HiIamACracker\n19216891 01234345 Hello\n19216899 01234345 HiIbmAlsoACracker\n19216809 11200340 World\n00000000 99999999 TheEndOfTheWorld\n1 2\npermit 12345678 23456789\n19216891 01234345 Hello\n12345678 23456789 Hello\n0 0\n', '2 5\...
39e7038b460760d77954904d4056336a
__inputs__ = ['2 5\npermit 192168?? ?12??34?\ndeny 19216899 012343?5\n19216711 11233340 HiIamACracker\n19216891 01234345 Hello\n19216899 01234345 HiIamAlsoACracker\n19216809 11200340 World\n00000000 99999999 TheEndOfTheWorld\n1 2\npermit 12345678 23456789\n19216891 01234345 Hello\n12345678 23456789 Hello\n0 0\n'] for _...
f9a522145972bccacbf59ad94b43de43
__inputs__ = ['/a//aa/a//\n', '/root/pokerband/trunk/server/game/code/src/main/java/com/uosipa/pokerband/gameserver/game/\n', '////////////////////////////////////////////////////////////////////////////////////////////////////\n', '/aa//b/aa\n', '/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
12c4ca96e6226f4f60fa3567fee65f91
__inputs__ = ['//usr///local//nginx/sbin\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8343d577e8f01170aa479c4bb43bfc46
__inputs__ = ['2\nRB\n', '3\nGRG\n', '5\nBBBBB\n', '1\nR\n', '200\nBBRGRRBBRGGGBGBGBGRRGRGRGRBGRGRRBBGRGBGRRGRRRGGBBRGBGBGBRBBBBBBBGGBRGGRRRGGRGBGBGGBRRRRBRRRBRBBGGBGBRGRGBBBBGGBGBBBGBGRRBRRRGBGGBBBRBGRBRRGGGRRGBBBGBGRRRRRRGGRGRGBBBRGGGBGGGBRBBRRGBGRGRBRRRBRBGRGGBRBB\n', '101\nRRRRRRRRRRRRRRRRRRRBRRRRRRRRRRRRRRRRRRRRRR...
3d0c32dd606ad11f1a315925bb302431
__inputs__ = ['2\nRB\n', '3\nGRG\n', '5\nBBBBB\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d3d3c7da3dff73c1744df55bf24cb825
__inputs__ = ['1\nz\n', '1\na\n', '19\nqhovyphr\nttymgy\nqbed\nidxitl\nusbrx\nqevvydqdb\nltyjljj\ncgv\nsruvudcu\naqjbqjybyq\nrhtwwtthhh\nh\nksktyyst\npmwmnzswlw\nm\nuwaup\nxhvk\nj\nvii\n', '15\nieqqe\nwwbnobrb\ngyftfg\nclrn\nzwtviipwww\nmsmsiih\nofqsusmsmm\nyjomiiq\naedoeun\nz\nmwwmimiwiu\ngtdsifgg\nvmmmren\nzlgzousxzp...
ad33e4269ae15aed07d91dfc7c711582
__inputs__ = ['1\naaaaaaaaaaa\n', '1\nab\n', '2\nya\nklmbfxzb\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2d38f143c64d01f364c0208056339361
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(...
d563ec9ab21b1862bd41222927120c81
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__ = ['?01???\n', '?\n', '**12\n', '1\n', '?01*??****\n', '0\n', '2\n', '*\n', '0*\n', '0?\n', '01\n', '1*\n', '1?\n', '?1?\n', '12\n', '2*\n', '2?\n', '2??\n', '?2?\n', '?2*?2*??1*2**?2*1???*2???100?????*???*?*????0????2?*?*?1??1??*?01**2**1001??**??**??1*?*???00??**??*\n', '00***???01\n', '21?20*0000?2?22??00...
e29162a6cb5f3a5ca3e5c790b4f870cd
__inputs__ = ['?01???\n', '?\n', '**12\n', '1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9d4d69416d2e188bb8600e38ed388809
__inputs__ = ['12\n', '5\n', '1000000000000000000\n', '0\n', '1\n', '999999999999999999\n', '1000000007\n', '237590337949089028\n', '999003990299500294\n', '190734863281250\n', '2\n', '48\n', '190734863281248\n', '158691406252\n', '7629394531264\n', '1000000000010000000\n', '7\n', '10\n', '1000000000010001000\n', '1010...
bf4963da23cddc9baf570ab1d124955c
__inputs__ = ['12\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
70cbb97052a805e6587adf74e108cd2c
__inputs__ = ['2 2 \n1 1 \n2 2\n', '2 3 \n1 1 1 \n2 2 2\n', '3 2 \n1 1 \n2 2 \n3 3\n', '3 3 \n1 1 1 \n2 2 2 \n3 3 3\n', '2 1 \n1 \n2\n', '3 1 \n1 \n2 \n3\n', '2 5 \n1 1 1 1 1 \n2 2 2 2 2\n', '3 5 \n1 1 1 1 1 \n2 2 2 2 2 \n3 3 3 3 3\n', '2 4 \n1 1 1 1 \n2 2 2 2\n', '2 3 \n1 1 1 \n2 2 2\n', '3 4 ...
ed0326e45d87243bef8e84d3b866ca57
__inputs__ = ['2 2 \n1 1 \n2 2\n', '2 2\n1 1\n2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a724cc7f505f94cb83c73eda35f3d68f
__inputs__ = ['2\n7 4 6\n1 4 6 7\n1 2 3 4 6 7\n4 2 2\n1 4\n3 4\n', '2\n7 4 6\n1 4 6 7\n1 2 3 5 6 7\n4 2 2\n1 4\n3 4\n', '2\n7 4 6\n1 4 6 7\n1 2 3 4 6 7\n4 2 2\n2 4\n3 4\n', '2\n7 4 6\n1 4 6 7\n1 2 3 4 6 7\n5 2 2\n2 4\n3 4\n', '2\n7 4 6\n1 4 6 7\n1 2 3 4 6 7\n4 2 2\n1 4\n1 4\n', '2\n11 4 6\n1 4 6 7\n1 2 3 4 6 7\n4 2 2\n...
a0ead228982465c1a3ff1762ecf64914
__inputs__ = ['2\n7 4 6\n1 4 6 7\n1 2 3 4 6 7\n4 2 2\n1 4\n3 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e04fc5b5983d145aa32db87740b10da3
__inputs__ = ['10\n96759 970434747560290241\n95684 985325796232084031\n99418 855577012478917561\n98767 992053283401739711\n99232 381986776210191990\n97804 22743067342252513\n95150 523980900658652001\n98478 290982116558877566\n98012 642382931526919655\n96374 448615375338644407\n', '10\n72939 670999605706502447\n67498 42...
1c9248ff4a710227e25065843f692163
__inputs__ = ['3\n1 1\n1 2\n1 111111111111\n', '5\n0 69\n1 194\n1 139\n0 47\n1 66\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f86ccc2703769d95ef46457541e39448
__inputs__ = ['3\n15 2 3\n5 10\n7 5 2\n10 12\n1 100 100\n100 100\n', '7\n1 1 1\n1 1\n100 100 100\n100 100\n1 100 100\n100 100\n100 1 1\n100 100\n100 50 50\n100 99\n100 51 51\n100 99\n99 51 51\n100 99\n', '1\n18 6 4\n3 4\n', '1\n26 6 4\n3 4\n', '7\n1 1 1\n1 1\n100 100 100\n100 100\n1 100 100\n100 100\n100 1 1\n100 100\n...
a4307d232fbd2c2fee041aeb66225902
__inputs__ = ['3\n15 2 3\n5 10\n7 5 2\n10 12\n1 100 100\n100 100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
52a7749a17cea4bcbe9a9242b96f40eb
__inputs__ = ['521\n3\n', '1001\n5\n', '5678901234567890123456789\n10000\n', '552352155\n13\n', '11533077525260\n193983\n', '15\n19\n', '2342341\n2342340\n', '12345\n12344\n', '23457\n23456\n', '79\n60847671\n', '456\n79575973\n', '1908\n86567928\n', '30866\n55357692\n', '980552\n32506042\n', '4865180\n11799246\n', '63...
03b6c2f2b559594ffd791aab258688de
__inputs__ = ['521\n3\n', '1001\n5\n', '5678901234567890123456789\n10000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d0b423567aafa19280731a54e15de04e
__inputs__ = ['3\n3\n010\n5\n10001\n7\n0000000\n', '3\n3\n011\n5\n10001\n7\n0000000\n', '3\n3\n010\n5\n10001\n7\n0010000\n', '3\n3\n010\n5\n10001\n7\n1010000\n', '3\n3\n010\n5\n10000\n7\n1010000\n', '3\n3\n010\n5\n10011\n7\n0000000\n', '3\n3\n001\n5\n10101\n7\n0000000\n', '3\n3\n010\n5\n00011\n7\n1010000\n', '3\n3\n010...
12b9218953e7e0b107bbe5739eec1962
__inputs__ = ['3\n3\n010\n5\n10001\n7\n0000000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ecc6d16d154eed551759298b159cff9f
__inputs__ = ['6\n4\n4 2 10 1\n2\n1 3\n2\n6 1\n3\n1 4 2\n5\n1 2 3 4 3\n12\n4 31 25 50 30 20 34 46 42 16 15 16\n', '6\n4\n4 2 10 1\n2\n1 3\n2\n6 1\n3\n1 4 2\n5\n1 2 3 4 3\n12\n4 27 25 50 30 20 34 46 42 16 15 16\n', '6\n4\n4 2 10 1\n2\n1 3\n2\n6 1\n3\n1 4 2\n5\n1 2 3 4 3\n12\n4 27 25 50 30 20 34 46 42 16 3 16\n', '6\n4\n...
5bf23709c67de27604978bf7e92146db
__inputs__ = ['6\n4\n4 2 10 1\n2\n1 3\n2\n6 1\n3\n1 4 2\n5\n1 2 3 4 3\n12\n4 31 25 50 30 20 34 46 42 16 15 16\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e88b2fca505f85832164f67a9c6db4b8
__inputs__ = ['4\n1 5\n5 2\n3 7\n7 3\n', '5\n1 10\n2 10\n3 10\n4 10\n5 5\n', '1\n1 2\n', '30\n22 37\n12 37\n37 58\n29 57\n43 57\n57 58\n58 53\n45 4\n1 4\n4 51\n35 31\n21 31\n31 51\n51 53\n53 48\n60 55\n52 55\n55 33\n36 9\n10 9\n9 33\n33 19\n5 23\n47 23\n23 32\n50 44\n26 44\n44 32\n32 19\n19 48\n', '50\n73 1\n65 73\n16 ...
dc19aeb09babefc102fbacca72876d58
__inputs__ = ['4\n1 5\n5 2\n3 7\n7 3\n', '5\n1 10\n2 10\n3 10\n4 10\n5 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
738f4cce8043c15052b924e141b7c90c
__inputs__ = ['2\n3 8\n10\n', '5\n17 0 10 2 1\n11010\n', '18\n4382 3975 9055 7554 8395 204 5313 5739 1555 2306 5423 828 8108 9736 2683 7940 1249 5495\n110001100101110111\n', '43\n475 2165 8771 7146 8980 7209 9170 9006 6278 6661 4740 6321 7532 6869 3788 7918 1707 5070 3809 5189 2494 8255 1123 3197 190 5712 9873 3286 999...
47b0814de15bc24ce8ab73d0df962ba6
__inputs__ = ['2\n3 8\n10\n', '5\n17 0 10 2 1\n11010\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a6cd15f0e20495c81e58416e1ee987ac
__inputs__ = ['6 1\n1 2\n3 2\n4 2\n1 6\n5 6\n', '6 7\n1 2\n3 2\n4 2\n1 6\n5 6\n', '6 2\n1 2\n3 2\n4 2\n1 6\n5 2\n', '6 2\n1 3\n3 2\n4 2\n1 6\n5 6\n', '6 2\n0 3\n3 2\n4 2\n1 6\n5 6\n', '6 0\n1 3\n6 2\n4 2\n1 6\n5 6\n', '6 7\n1 2\n3 4\n4 2\n1 6\n5 6\n', '6 5\n1 3\n3 2\n4 2\n1 6\n5 6\n', '6 1\n1 2\n3 4\n4 2\n1 6\n5 6\n', ...
11e089f4b58baebc254118c0d5ce9da7
__inputs__ = ['6 2\n1 2\n3 2\n4 2\n1 6\n5 6\n', '6 5\n1 2\n3 2\n4 2\n1 6\n5 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6e0ec37632b21a0efe5f8c42afeac02a
__inputs__ = ['1\n1\n3\n3 1 1\n', '1\n1\n1\n1\n', '57\n3 13 20 17 18 18 17 2 17 8 20 2 11 12 11 14 4 20 9 20 14 19 20 4 4 8 8 18 17 16 18 10 4 7 9 8 10 8 20 4 11 8 12 16 16 4 11 12 16 1 6 14 11 12 19 8 20\n7\n5267 7981 1697 826 6889 1949 2413\n', '48\n14 2 5 3 10 10 5 6 14 8 19 13 4 4 3 13 18 19 9 16 3 1 14 9 13 10 13 ...
472013da00fe8569e8bbe352220a2595
__inputs__ = ['1\n1\n7\n1 1 1 1 1 1 1\n', '2\n2 3\n5\n50 50 50 50 50\n', '1\n2\n4\n50 50 100 100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8bfc92ab6bf79fcb41a87f123e3aab43
__inputs__ = ['4\n1 2 4 5\n', '6\n62 22 60 61 48 49\n', '2\n1 4\n', '2\n5 4\n', '10\n9 6 8 5 5 2 8 9 2 2\n', '10\n7776 32915 1030 71664 7542 72359 65387 75222 95899 40333\n', '10\n1 1 1 1 1 1 1 1 1 1\n', '4\n15 11 28 17\n', '3\n1 36 6\n', '6\n3 12 4 12 5 6\n', '6\n7 20 21 22 23 28\n', '7\n1 8 2 7 3 6 4\n', '2\n100000 9...
3f43c6c9b5b7e342626e1310d03535e9
__inputs__ = ['4\n1 2 4 5\n', '6\n62 22 60 61 48 49\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
82679ed2a9845e4c151a4f6f9c2b719b
__inputs__ = ['4\n1 5\n5 7\n6 9\n9 10\n', '16\n203671 381501\n58867 59732\n817520 962123\n125391 163027\n601766 617692\n381501 444610\n761937 817520\n16 10551\n21096 38291\n718073 761937\n583868 601766\n554859 731755\n678098 718073\n962123 992003\n163027 203671\n87917 96397\n', '11\n717170 795210\n866429 970764\n163324...
3605c02644b18e8c2084eabe3ae905fc
__inputs__ = ['3\n1 5\n2 6\n3 7\n', '4\n3 10\n20 30\n1 3\n1 39\n', '3\n3 10\n20 30\n1 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7fc6642b3df9dc385ae82afc2201b91c
__inputs__ = ['4\n1\n0\n3\n1110\n100110\n010101\n2\n11111\n000001\n2\n001\n11100111\n', '1\n4\n0001000\n00000\n00000\n00000\n', '1\n33\n10\n1\n1\n1\n1\n1\n1\n1\n1\n1\n0\n0\n1\n1\n1\n1\n1\n0\n0\n0\n1\n1\n1\n1\n0\n1\n1\n1\n1\n0\n0\n1\n10\n', '1\n4\n0\n1\n1\n0\n', '1\n3\n1\n1000\n111110\n', '11\n4\n0\n1\n1\n0\n2\n0001000\...
5dd419463ca058caea54d9bb4cfee9cc
__inputs__ = ['4\n1\n0\n3\n1110\n100110\n010101\n2\n11111\n000001\n2\n001\n11100111\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ee8c47f7ec5e10e5fa9685033ffefbe1
__inputs__ = ['10\n1 1 1000000000\n1 4 1000000000\n2 2 1000000000\n1 5 1000000000\n1 8 1000000000\n2 15 1000000000\n3 3 1000000000\n3 10 1000000000\n3 6 1000000000\n3 7 1000000000\n', '20\n1 1 1\n1 2 2\n1 3 3\n1 4 4\n1 5 5\n2 11 5\n2 12 4\n2 13 3\n2 14 2\n2 15 1\n3 6 1\n3 7 2\n3 8 3\n3 9 4\n3 10 5\n3 16 1\n3 17 2\n3 18...
cbde62a6b63a0458933824e80829fbec
__inputs__ = ['3\n1 1 1\n2 2 1\n3 3 1\n', '6\n1 1 5\n3 5 5\n1 2 5\n3 6 5\n2 3 5\n3 7 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1495f1950a2c66651bb22d368f8de1ef
__inputs__ = ['2\n5\n7\n', '4\n7\n13\n', '2\n3\n2\n', '1\n1\n1\n', '1\n2\n4\n', '1000\n1000\n1000\n', '1\n1\n4\n', '1\n2\n3\n', '1\n1000\n1000\n', '1000\n1\n1000\n', '1000\n2\n1000\n', '1000\n500\n1000\n', '1000\n1000\n4\n', '1000\n1000\n3\n', '4\n8\n12\n', '10\n20\n40\n', '100\n200\n399\n', '200\n400\n800\n', '199\n40...
fe2f3ca721c9a9e761192b9d3e2e9e6c
__inputs__ = ['2\n5\n7\n', '4\n7\n13\n', '2\n3\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
504c9a356038186f06bdff33b7489bb2
__inputs__ = ['3\n1 0 1\n2 2\n2 2\n', '5\n0 1 3 6 17\n3 10\n2 3 4\n', '3\n2 0 1\n2 2\n2 2\n', '5\n0 1 3 6 17\n3 10\n3 3 4\n', '5\n0 1 3 6 17\n3 1\n3 3 4\n', '3\n1 -1 1\n2 3\n2 2\n', '3\n0 0 2\n1 1\n2\n', '5\n0 1 3 6 11\n3 10\n2 3 4\n', '5\n0 1 3 6 9\n3 10\n2 3 4\n', '3\n0 0 1\n2 2\n2 2\n', '5\n0 1 3 11 17\n3 1\n3 3 4\n...
644d418443be49676ecab376418d80e4
__inputs__ = ['3\n1 -1 1\n2 2\n2 2\n', '3\n-1 0 2\n1 1\n2\n', '5\n0 1 3 6 10\n3 10\n2 3 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f4ed4125b823ce3978113799df28f789
__inputs__ = ['6 2\n0 1 1 0 0 1\n', '5 3\n1 0 0 0 1\n', '5 10\n0 0 0 0 0\n', '10 3\n0 0 1 1 0 1 0 0 0 1\n', '3 6\n1 1 1\n', '4 3\n1 1 1 1\n', '2 888\n1 0\n', '6 1\n1 1 0 0 1 1\n', '1 81\n0\n', '3 1\n1 0 1\n', '69 2\n0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 1 0 0 0 ...
1c5295d19db74325f89c0db11383c1f4
__inputs__ = ['6 2\n0 1 1 0 0 1\n', '5 3\n1 0 0 0 1\n', '5 10\n0 0 0 0 0\n', '10 3\n0 0 1 1 0 1 0 0 0 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0ce79a03fe50aabd1c6af932d4c08b99
__inputs__ = ['40867 37466\n', '278917 84398\n', '11 1\n', '274783 98997\n', '7 6\n', '4649 4648\n', '375103 52131\n', '990037 453792\n', '69833 569\n', '717887 1\n', '65213 29960\n', '649849 339573\n', '13 5\n', '586189 189159\n', '450431 344107\n', '5 2\n', '512287 359783\n', '6871 5566\n', '873781 51595\n', '807689 ...
26e07b15763ef0a7477c24b1308f4d59
__inputs__ = ['5 4\n', '3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
756b52d55e0ee543ded07115a579d708
__inputs__ = ['2\nabc\naba\n', '2\nabd\naba\n', '2\nabc\naaa\n', '2\ncca\naaa\n', '2\nccb\naab\n', '2\nccb\ncba\n', '2\nbbb\nbaa\n', '2\nbbb\naaa\n', '2\ncad\nbad\n', '2\nbbb\nacb\n', '2\nbad\naba\n', '2\ncba\naaa\n', '2\nabd\naca\n', '2\nbad\naca\n', '2\nccb\naaa\n', '2\ncad\naca\n', '2\ncad\naac\n', '2\nccb\nbaa\n', ...
8807942454df8446cd9833a8fbd2953c
__inputs__ = ['2\nabc\naba\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5e9416ca3f1beb312d54e1caec86c9ec
__inputs__ = ['4 1\n1 2\n3 4\n2 3\n', '10 10\n8 9\n2 8\n4 6\n4 9\n7 8\n2 9\n1 8\n3 4\n3 4\n2 7\n', '3 2\n1 2\n2 2\n', '4 3\n1 2\n3 4\n2 2\n', '6 1\n1 2\n', '1 1\n1 2\n3 4\n2 3\n', '10 10\n8 9\n2 8\n7 6\n4 9\n7 8\n2 9\n1 8\n3 4\n3 4\n2 7\n', '3 0\n1 2\n2 2\n', '10 1\n8 9\n2 8\n4 6\n4 9\n7 8\n2 8\n1 8\n3 4\n3 4\n3 7\n', ...
d6e190728e9ed739ed9de5f4f896e23c
__inputs__ = ['3 2\n1 2\n1 2\n', '4 3\n1 2\n3 4\n2 3\n', '10 10\n8 9\n2 8\n4 6\n4 9\n7 8\n2 8\n1 8\n3 4\n3 4\n2 7\n', '3 1\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1d7fc7b2ba71d6b8cd6b3ec2717d10b4
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(...
97323b6dc08c6168636509e6db9ffce2
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__ = ['3\n5 11\n5 6 10\n', '7\n5 15\n1 10 28 2 7 20 12\n', '8\n3 8\n5 5 5 2 10 10 15 20\n', '3\n5 11\n5 6 4\n', '7\n5 15\n1 13 28 2 7 20 12\n', '8\n3 8\n5 5 5 2 10 12 15 20\n', '3\n5 11\n5 6 3\n', '7\n5 21\n1 13 28 2 7 20 12\n', '8\n3 8\n5 5 5 2 9 12 15 20\n', '3\n6 11\n5 6 3\n', '7\n5 21\n1 21 28 2 7 20 12\n',...
ef4cce54eb6aeb89d7770002c1cb28ff
__inputs__ = ['3\n5 6\n5 6 10\n', '7\n5 15\n1 10 16 2 7 20 12\n', '8\n3 8\n5 5 5 10 10 10 15 20\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3da0d4b08ac6fe03c33e1b2b36804eb4
__inputs__ = ['500 500 0 0 107 200\n', '4 1 0 0 1 1\n', '4 4 1 0 3 3\n', '2 3 0 0 1 1\n', '500 500 0 0 107 239\n', '2 1 0 0 1 1\n', '678 500 0 0 107 168\n', '500 500 0 0 200 277\n', '500 500 1 0 107 239\n', '678 353 0 0 107 239\n', '1174 500 0 0 4 168\n', '272 500 0 0 200 277\n', '4 7 0 0 1 2\n', '500 474 0 0 107 399\n...
b2dc10b4a3e8c3a6de49ededc5a0244a
__inputs__ = ['500 500 0 0 200 200\n', '4 4 0 0 1 1\n', '4 4 0 0 3 3\n', '2 3 0 0 1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
00cb2661d9475c181b1f4e0a45e3135a
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(...
8e6afe56a123f8a813d1c671d5c4937c
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(...
1b055e7e4b95933c803f922defc3526e
__inputs__ = ['18\n2 1 2 10 2 10 10 2 2 1 10 10 10 10 1 1 10 10\n', '10\n6 6 6 3 6 1000000000 3 3 6 6\n', '3\n1337 1337 1337\n', '1\n1000000000\n', '2\n1 1\n', '3\n1 2 3\n', '55\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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3\n', '3\n2 2 3\n', '2\n2 1\n', '...
38b9cece1f386e4db18bfda4f7a4e094
__inputs__ = ['18\n2 1 2 10 2 10 10 2 2 1 10 10 10 10 1 1 10 10\n', '10\n6 6 6 3 6 1000000000 3 3 6 6\n', '3\n1337 1337 1337\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5fc824da9f984802cf02aec751943e55
__inputs__ = ['3\n2014 2016 2015\n', '1\n2050\n', '1\n2010\n', '1\n2011\n', '3\n2010 2011 2012\n', '3\n2049 2047 2048\n', '5\n2043 2042 2041 2044 2040\n', '5\n2012 2013 2014 2015 2016\n', '1\n2045\n', '1\n2046\n', '1\n2099\n', '1\n2100\n', '3\n2011 2010 2012\n', '3\n2011 2012 2010\n', '3\n2012 2011 2010\n', '3\n2010 20...
a8ca08394aeb78b98f6daae8995ec8cb
__inputs__ = ['3\n2014 2016 2015\n', '1\n2050\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6c4b414d80bc2c3e17c3f9f4353ace59
__inputs__ = ['1 2 1 1\n', '3 5 -4 -2\n', '-1000000000 0 -1000000000 0\n', '0 0 0 0\n', '-1000000000 1000000000 -1000000000 1000000000\n', '-253230108 363756450 712662868 735867677\n', '193944314 586260100 -192321079 95834122\n', '418379342 802780784 -790013317 -445130206\n', '-354684803 189801569 -204491568 -49687658\...
d8f4f94a0dfcc4a58d773a235e61a669
__inputs__ = ['1 2 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2e2a7a47c4f899eff82d322b8f478534
__inputs__ = ['4 5 0\n0 1 1\n0 2 4\n1 2 2\n2 3 1\n1 3 2\n', '4 5 0\n0 1 1\n0 2 4\n1 2 0\n2 3 1\n1 3 5\n', '4 5 0\n0 1 1\n1 2 4\n1 1 0\n2 3 1\n1 3 2\n', '4 6 1\n0 1 1\n0 2 4\n2 0 1\n1 2 2\n3 0 1\n3 2 5\n', '4 5 0\n0 1 1\n1 2 4\n1 1 0\n2 3 1\n0 3 2\n', '4 5 0\n0 1 1\n1 2 5\n1 1 0\n2 3 1\n0 3 2\n', '4 5 0\n0 2 1\n0 3 4\n1...
664e522fd195132da66375ebea3dd17b
__inputs__ = ['4 6 1\n0 1 1\n0 2 4\n2 0 1\n1 2 2\n3 1 1\n3 2 5\n', '4 5 0\n0 1 1\n0 2 4\n1 2 2\n2 3 1\n1 3 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7994aa5f51ac6f2e1dadae2ad6ded885
__inputs__ = ['184518\n', '9266286\n', '3961838\n', '4\n', '5\n', '534\n', '159222638\n', '8302\n', '24\n', '999999999\n', '300\n', '121580142\n', '10010\n', '999999998\n', '282798\n', '63\n', '3\n', '1154414\n', '2\n', '505\n', '28643950\n', '469726\n', '4425\n', '1745\n', '500000000\n', '38614\n', '5033\n', '841\n', ...
9401c058eec89ac536af069ba53c8249
__inputs__ = ['6\n', '1802\n', '1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5c9e3b2ab48560e795ed7479aab1fe07
__inputs__ = ['4\n0110\n0101\n00001000\n0001000\n', '4\n0110\n1101\n00001000\n0001000\n', '4\n0110\n1101\n00001000\n0101000\n', '4\n0110\n1101\n00000000\n0101000\n', '4\n0110\n1100\n00000000\n0101000\n', '4\n0110\n1100\n00000000\n0001000\n', '4\n0110\n1101\n00000000\n0001000\n', '4\n0110\n0001\n00000000\n0001000\n', '4...
b4a04e3f3945cbbb929884c18f6ea6b7
__inputs__ = ['4\n0110\n0101\n00001000\n0001000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3e4c462cb3d4389766b0963388fe244f
__inputs__ = ['2\n0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0\n3.0 2.0 9.680227793087974 6.0 13.0 5.0 7.0 9.0\n', '2\n0.943552035027174 0.0 1.0 1.0 1.0 0.0 2.0 1.0\n3.0 2.0 9.680227793087974 6.0 13.541356008746918 5.95543610948743 7.0 9.233114893271226\n', '2\n0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0\n3.0 2.0 9.680227793087974 6.0 13.54135...
c990e7e0fc6e63d55f00b4225086feb8
__inputs__ = ['2\n0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0\n3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5a4f34c9300d44d59a850a6392f9ff93
__inputs__ = ['4\ns\nf\nf\ns\n', '4\nf\ns\nf\ns\n', '156\nf\ns\nf\ns\nf\ns\ns\ns\ns\nf\ns\ns\nf\nf\ns\nf\nf\nf\nf\ns\ns\ns\nf\ns\ns\nf\nf\nf\nf\nf\nf\ns\ns\ns\ns\nf\ns\nf\ns\nf\ns\nf\nf\nf\nf\ns\ns\nf\nf\ns\ns\ns\ns\nf\ns\nf\ns\nf\ns\nf\ns\ns\ns\nf\ns\ns\nf\ns\nf\nf\ns\ns\ns\nf\nf\nf\nf\ns\ns\nf\nf\nf\nf\nf\nf\nf\ns\nf...
0c7a50cb33a5f690254b6367b7aee215
__inputs__ = ['4\ns\nf\nf\ns\n', '4\nf\ns\nf\ns\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b56f02007ef172b447acc5c3fd63a2a4
__inputs__ = ['5 2 4\n3 4 2 3 1\n3 2 3 4 1\n', '3 1 2\n1 2 3\n3 1 2\n', '4 2 4\n1 1 1 1\n1 1 1 1\n', '5 1 3\n2 2 2 1 2\n2 2 2 1 2\n', '7 1 4\n2 5 5 5 4 3 4\n2 5 5 5 4 3 4\n', '10 1 10\n6 7 6 1 10 10 9 5 3 9\n7 10 9 6 1 5 9 3 10 6\n', '1 1 1\n1\n1\n', '4 3 4\n1 2 3 4\n2 1 3 4\n', '7 2 4\n1 2 3 4 5 7 6\n1 2 3 4 5 6 7\n',...
2dd9e837afeb4ce41be67587d9cbd301
__inputs__ = ['5 2 4\n3 4 2 3 1\n3 2 3 4 1\n', '3 1 2\n1 2 3\n3 1 2\n', '4 2 4\n1 1 1 1\n1 1 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ee972f6bc728eedafbcb789fc49b1d2e
__inputs__ = ['2\n1 1\n1 2\n2 1\n2 2\n', '1\n1 1\n', '2\n1 1\n2 2\n1 2\n2 1\n', '2\n1 2\n2 2\n2 1\n1 1\n', '3\n2 2\n1 2\n3 2\n3 3\n1 1\n2 3\n1 3\n3 1\n2 1\n', '3\n1 3\n3 1\n2 1\n1 1\n1 2\n2 2\n3 2\n3 3\n2 3\n', '4\n1 3\n2 3\n2 4\n4 4\n3 1\n1 1\n3 4\n2 1\n1 4\n4 3\n4 1\n3 2\n1 2\n4 2\n2 2\n3 3\n', '4\n3 3\n4 2\n2 3\n3 4...
b129c89813a1573b9cc780d8923fedbe
__inputs__ = ['2\n1 1\n1 2\n2 1\n2 2\n', '1\n1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
15c28c789e971ea3da30d799b1a21be2
__inputs__ = ['3\n0 0 1 1\n1 1 2 2\n3 0 4 1\n', '3\n0 0 1 1\n0 1 1 2\n1 0 2 1\n', '4\n0 0 5 5\n0 0 4 4\n1 1 4 4\n1 1 4 4\n', '5\n0 0 10 8\n1 2 6 7\n2 3 5 6\n3 4 4 5\n8 1 9 2\n', '4\n6 77 44 98\n4 3 84 92\n8 23 66 89\n28 39 80 83\n', '10\n-44 -47 -17 5\n-40 -21 46 22\n-45 -47 -4 7\n-45 -37 17 10\n-44 -24 42 6\n-40 -17 2...
3010a4532bd6342832be00f738848ba4
__inputs__ = ['3\n0 0 1 1\n1 1 2 2\n3 0 4 1\n', '3\n0 0 1 1\n0 1 1 2\n1 0 2 1\n', '4\n0 0 5 5\n0 0 4 4\n1 1 4 4\n1 1 4 4\n', '5\n0 0 10 8\n1 2 6 7\n2 3 5 6\n3 4 4 5\n8 1 9 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() ...
b98b8741af9ba905a8200892f100059a
__inputs__ = ['8\n2 7 1 8 2 8 1 15\n', '1\n0000000000\n', '6\n1 2 2 3 3 1\n', '5\n2 4 1 4 1\n', '8\n4 7 1 8 2 8 1 12\n', '5\n1 4 2 4 2\n', '1\n0000000001\n', '4\n0 3 3 3\n', '8\n2 7 1 8 2 8 1 12\n', '1\n1000001000\n', '6\n0 2 2 3 3 1\n', '5\n1 4 1 4 1\n', '1\n1010001000\n', '6\n0 2 2 3 0 1\n', '5\n1 4 1 4 2\n', '8\n4 1...
4171d30ec96de50883ba72e5cd8a2b03
__inputs__ = ['8\n2 7 1 8 2 8 1 8\n', '1\n1000000000\n', '6\n1 2 2 3 3 3\n', '4\n3 3 3 3\n', '5\n2 4 1 4 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2ffe92b01c04472432ea7eb1addc23be
__inputs__ = ['2 2 2\n2 4\n6 8\n', '1 2 7\n6 7\n', '3 2 1\n5 7\n1 2\n5 100\n', '3 3 3\n5 8 5\n11 11 17\n14 5 2\n', '3 3 3\n5 8 5\n11 11 17\n14 5 3\n', '2 2 4\n5 5\n5 5\n', '7 4 5\n7 7 7 12\n7 12 12 7\n7 7 7 7\n7 7 12 7\n7 7 12 12\n12 12 7 12\n7 7 7 7\n', '7 7 47\n91 91 91 91 91 91 91\n91 91 91 91 91 91 91\n91 91 91 91 ...
191caae0ff4d3843c6d0be72d3f7f4db
__inputs__ = ['2 2 2\n2 4\n6 8\n', '1 2 7\n6 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
10c852d100e6f91895043b5ce84bd355
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(...
55a227b4071e43b4dc2ecdaf6164f5ba
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(...
33c83b40371a189af122c1c1da256df6
__inputs__ = ['4 3\n3 1 4 2\n', '1 1000\n42\n', '31 3767\n16 192 152 78 224 202 186 52 118 19 13 38 199 196 35 295 100 64 205 37 166 124 169 214 66 243 134 192 253 270 92\n', '15 12226\n18 125 213 221 124 147 154 182 134 184 51 49 267 88 251\n', '81 10683\n3 52 265 294 213 242 185 151 27 165 128 237 124 14 43 147 104 1...
d0c9d309c5961118c0739c28001ad779
__inputs__ = ['4 3\n3 1 4 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c8be61e295e7eb4f433995c43e3477bf
__inputs__ = ['3 4 5\n10 30 15\n12 31 14 18\n0 1 2 3 4\n', '1 1 1\n1\n1\n1\n', '3 4 5\n10 30 15\n12 31 14 7\n0 1 2 3 4\n', '3 4 5\n10 30 15\n12 31 14 7\n0 1 2 1 4\n', '3 4 5\n10 30 15\n12 31 27 7\n0 1 2 1 4\n', '3 4 5\n10 30 15\n12 31 17 7\n0 1 2 1 4\n', '3 4 5\n10 30 15\n12 58 14 18\n0 1 2 3 4\n', '3 4 5\n10 57 15\n12...
0bf18f000a47ab3626cfee9c7da8d9d3
__inputs__ = ['3 4 5\n10 30 15\n12 31 14 18\n0 1 2 3 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
98df6d124e208867a84dcfc819998fa9
__inputs__ = ['1\n1\n', '3\n1 2 3\n', '100\n269 608 534 956 993 409 297 735 258 451 468 422 125 407 580 769 857 383 419 67 377 230 842 113 169 427 287 75 372 133 456 450 644 303 638 40 217 445 427 730 168 341 371 633 237 951 142 596 528 509 236 782 44 467 607 326 267 15 564 858 499 337 74 346 443 436 48 795 206 403 379...
e489646f13258e89271a9de5deaf251c
__inputs__ = ['1\n1\n', '3\n1 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cfb0453e509d8444d92ab7a7fd2b24cb