test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['2012 4\n83268 3\n1112 4\n0 1\n99 2\n0 0\n', '2012 4\n83268 6\n1112 4\n0 1\n99 1\n0 0\n', '2012 4\n83268 3\n1112 4\n0 1\n17 2\n0 0\n', '2012 4\n83268 6\n1112 3\n0 1\n99 1\n0 0\n', '2012 4\n83268 6\n1112 4\n0 0\n99 1\n0 0\n', '2012 4\n83268 3\n1112 6\n0 1\n17 2\n0 0\n', '2012 4\n83268 3\n1112 3\n0 1\n99 1\...
6d6b832acc2f91e56f898c7e432c386a
__inputs__ = ['2012 4\n83268 6\n1112 4\n0 1\n99 2\n0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
540826ee83f69492527c176d839df184
__inputs__ = ['4 2 9\n', '4 2 7\n', '4 2 8\n', '10 4 41\n', '2 13 33\n', '18 3 19\n', '3 9 26\n', '19 2 38\n', '5 6 30\n', '20 50 50\n', '1 1 1\n', '20 50 1\n', '20 1 50\n', '6 2 7\n', '4 4 9\n', '3 2 8\n', '6 1 0\n', '7 6 12\n', '6 4 1\n', '7 4 2\n', '12 2 20\n', '11 4 4\n', '5 2 5\n', '5 2 8\n', '1 2 -1\n', '50 0 -2\...
19bf67ba539aea259ca90b84266bdcab
__inputs__ = ['4 2 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
55fadcfc38e81c895e99ae54ffbb9340
__inputs__ = ['4\n5 2 2\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 2 1 1 1\n4 10 4\n10 8 6 4\n16 9 8\n3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3\n', '4\n5 2 2\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 2 1 1 1\n4 10 4\n10 8 6 4\n16 12 8\n3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3\n', '4\n5 2 2\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 4 1 1 1\n4 10 4\n10 8 6 4\n16 9 8\n3 1 4 1 5 4...
b30b75d84b72f5647717e2bfd76dd6eb
__inputs__ = ['4\n5 2 2\n1 2 1 2 1\n9 3 3\n3 3 3 2 2 2 1 1 1\n4 10 4\n10 8 6 4\n16 9 8\n3 1 4 1 5 9 2 6 5 3 5 8 9 7 9 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f4e68c72a6e2a537bd0e5a68d9efaf6e
__inputs__ = ['9\n0 0 0 1 1 1 0 0 0\n', '7\n0 0 0 1 1 1 1\n', '5\n1 1 1 1 1\n', '8\n1 1 1 0 0 0 1 1\n', '9\n1 1 0 1 1 0 1 1 0\n', '1\n0\n', '1\n1\n', '2\n0 0\n', '2\n0 1\n', '2\n1 0\n', '2\n1 1\n', '3\n1 1 0\n', '7\n0 0 0 1 1 1 0\n', '3\n0 1 1\n', '3\n0 0 1\n', '6\n0 0 1 0 1 0\n', '4\n0 1 1 0\n', '5\n0 1 1 0 0\n', '4\n...
164cd71b205d028880857bedafa1159f
__inputs__ = ['9\n0 0 0 1 1 1 0 0 0\n', '7\n0 0 0 1 1 1 1\n', '5\n1 1 1 1 1\n', '8\n1 1 1 0 0 0 1 1\n', '9\n1 1 0 1 1 0 1 1 0\n', '9\n1 1 0 1 1 0 1 1 0\n', '8\n1 1 1 0 0 0 1 1\n', '7\n0 0 0 1 1 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8...
0811bd023589cccb54948a3113e41108
__inputs__ = ['a\n', 'hi\n', 'y\n', 'kgan\n', 'zoabkyuvus\n', 'spyemhyznjieyhhbk\n', 'xulsyfkuizjauadjjopu\n', 'e\n', 'zv\n', 'jgv\n', 'zsfo\n', 'jselr\n', 'dwemig\n', 'mddoxsf\n', 'jgirkrmi\n', 'spkxurcum\n', 'fykkiubdkt\n', 'fznbcxsxygs\n', 'qcrvrdqcbtou\n', 'qktrbjzrqgmlr\n', 'foamodbvptlxxg\n', 'ydzpjhsidipricw\n',...
11ce3582cd22a65668075c2983d24772
__inputs__ = ['a\n', 'hi\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6745d20705532681e47c6fec9f375e2a
__inputs__ = ['7 15\n1 2 3 4 5 6 7\n', '5 100\n80 40 40 40 60\n', '1 1\n1\n', '1 20000000\n100\n', '1 100\n100\n', '2 100\n100 100\n', '2 100\n1 100\n', '2 100\n1 99\n', '3 299\n100 100 100\n', '10 50\n9 9 9 9 9 9 9 9 9 9\n', '10 50\n10 10 10 10 10 10 10 10 10 10\n', '8 2\n1 1 1 1 1 1 1 1\n', '10 50\n9 9 9 9 9 9 9 9 13...
342cb024cc7fca7c71bb3f120136c1d1
__inputs__ = ['7 15\n1 2 3 4 5 6 7\n', '5 100\n80 40 40 40 60\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c3fe48679fe301dd40b3139b4fed024a
__inputs__ = ['a\nu\n', 'abc\nukm\n', 'akm\nua\n', 'u\nd\n', 'aaaaaeeeeeiiiiiooooouuuuu\naeiouaeiouaeiouaeiouaeiou\n', 'aaaaaeeeeeiiiiiooooouuuuu\nqwrtysdfghjklzxcvbnmplmjk\n', 'zenudggmyopddhszhrbmftgzmjorabhgojdtfnzxjkayjlkgczsyshczutkdchiytqlfsevymipufxkxojlvkkqxvjhpjmcxeiluua\nblcdiwjphlpzwvknsyvbcodpyktizgatrlieii...
3033f1a119eea3918310ecb28f50104b
__inputs__ = ['a\nu\n', 'abc\nukm\n', 'akm\nua\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8aaff3c367b42f9e488155c10ce527bc
__inputs__ = ['10000\n', '1000003\n', '9876543210\n', '1\n', '6983776800\n', '66819323\n', '158260522\n', '121\n', '10000000000\n', '1881548213\n', '1483485061\n', '3042820177\n', '9162273481\n', '9998200081\n', '9999999967\n', '101914\n', '17346\n', '2771679283\n', '7026\n', '5110764300\n', '472\n', '10211397040\n', '...
2f3704cec1d4404268e20f42dfab8c0e
__inputs__ = ['10000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
96649352a81d0e753df0429225c9b0eb
__inputs__ = ['7\n11\n3 1 4 1 5 9 2 6 5 3 5\n1\n1000\n3\n1 1 1\n13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n2\n2 1\n6\n1 1 1 1 1 1\n7\n1 1 1 1 1 1 1\n', '3\n1\n1\n1\n1\n1\n1\n', '3\n1\n2\n1\n1\n1\n1\n', '7\n11\n3 1 4 1 5 9 2 6 5 3 5\n1\n1000\n3\n1 1 1\n13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n2\n2 1\n6\n2 1 1 1 1 1\n7\n1 1 1 1 1 1 1\...
883dfd6588fd1bef5d585745c748f2f0
__inputs__ = ['7\n11\n3 1 4 1 5 9 2 6 5 3 5\n1\n1000\n3\n1 1 1\n13\n1 2 3 4 5 6 7 8 9 10 11 12 13\n2\n2 1\n6\n1 1 1 1 1 1\n7\n1 1 1 1 1 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
dfc365ef9436ebc4adc67f03cacf11d1
__inputs__ = ['hi\nbob\n', 'abca\naccepted\n', 'abacaba\nabcdcba\n', 'lo\neuhaqdhhzlnkmqnakgwzuhurqlpmdm\n', 'aaeojkdyuilpdvyewjfrftkpcobhcumwlaoiocbfdtvjkhgda\nmlmarpivirqbxcyhyerjoxlslyfzftrylpjyouypvk\n', 'npnkmawey\nareakefvowledfriyjejqnnaeqheoh\n', 'fdtffutxkujflswyddvhusfcook\nkavkhnhphcvckogqqqqhdmgwjdfenzizreb...
4cac891576978a917c9dfa62128b3ca9
__inputs__ = ['hi\nbob\n', 'abca\naccepted\n', 'abacaba\nabcdcba\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
620df7af242b2690d08747917a5ca042
__inputs__ = ['24\n1 2 3 4\n1 2 4 3\n1 3 2 4\n1 3 4 2\n1 4 1 3\n1 4 3 2\n2 1 3 4\n2 1 4 3\n2 3 1 4\n2 3 4 1\n2 4 1 3\n2 4 3 1\n3 1 2 4\n3 1 4 2\n3 2 1 4\n3 2 4 1\n3 4 1 2\n3 4 2 1\n4 1 2 3\n4 1 3 2\n4 2 1 3\n4 2 3 1\n4 3 1 2\n4 3 2 1\n', '14\n9 7 5 9\n9 7 6 9\n14 10 7 12\n14 10 8 12\n14 10 9 12\n14 10 7 11\n14 10 8 11\...
241d1dc952874e098efc95177eca57a5
__inputs__ = ['14\n9 7 5 9\n9 7 6 9\n14 10 7 12\n14 10 8 12\n14 10 9 12\n14 10 7 11\n14 10 8 11\n14 10 9 11\n9 10 5 10\n10 10 5 10\n11 10 5 10\n16 10 5 10\n1000000000000000000 17 14 999999999999999985\n1000000000000000000 17 15 999999999999999985\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWra...
d1b9c02666f65068c0c5c59a70b5d41a
__inputs__ = ['22\n2 3 2 3 3 2 1 2 3 3 1 3 1 1 2 2 3 3 1 3 2 2\n0\n1 8\n1 22\n1 12\n0\n1 14\n0\n0\n0\n2 22 14\n1 12\n0\n0\n0\n0\n0\n0\n0\n0\n1 16\n1 13\n0\n', '30\n1 3 3 3 2 3 1 3 3 3 3 2 3 1 3 2 1 1 1 1 2 3 2 1 1 3 3 2 2 2\n0\n1 20\n0\n1 7\n2 6 9\n1 20\n1 20\n3 7 6 9\n2 10 6\n0\n0\n2 6 9\n0\n0\n1 20\n2 6 9\n2 6 9\n0\n...
e21598f20517b0044bf97ffe82b586d4
__inputs__ = ['1\n1\n0\n', '5\n2 2 1 1 3\n1 5\n2 5 1\n2 5 4\n1 5\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9a1293e50d9537ad36860a0501ca95e2
__inputs__ = ['5\n4 1 2 5 3\n', '4\n4 1 3 2\n', '1\n1\n', '2\n1 2\n', '2\n2 1\n', '6\n5 3 6 1 4 2\n', '7\n1 2 3 6 7 4 5\n', '8\n6 2 1 8 5 7 3 4\n', '3\n1 2 3\n', '3\n1 3 2\n', '3\n2 1 3\n', '3\n2 3 1\n', '3\n3 1 2\n', '3\n3 2 1\n', '7\n1 3 5 7 2 4 6\n', '7\n1 5 2 6 3 7 4\n', '5\n1 4 2 3 5\n', '9\n1 6 4 5 9 8 7 3 2\n', ...
35ed99d8d1831e4ced91298542e6da07
__inputs__ = ['5\n4 1 2 5 3\n', '4\n4 1 3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
63fe8fa2ff9c882916918d166175b053
__inputs__ = ['6 1\n', '6 3\n', '2 2\n', '5 4\n', '5 8\n', '3 10\n', '3 6\n', '1 8\n', '24438 9\n', '94444 9\n', '8 66716\n', '4 25132\n', '51520 73331\n', '54230 31747\n', '24236 90163\n', '26946 99523\n', '50323 7\n', '53033 3\n', '55743 5\n', '59964 79\n', '1 1\n', '3 1\n', '1 2\n', '53513 34040\n', '100000 100000\n...
0aa91303e519d7a46ca438759f1f93ca
__inputs__ = ['6 1\n', '6 3\n', '2 2\n', '2 2\n', '6 1\n', '6 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
08abdc35713db04837087a0365a616bf
__inputs__ = ['2 7\n', '1 1\n', '50 4321098765432109\n', '1 5\n', '50 50\n', '50 51\n', '50 2251799813685246\n', '50 2251799813685247\n', '50 2251799813685297\n', '50 4503599627370442\n', '50 4503599627370493\n', '40 267599839143\n', '49 1837933630796584\n', '50 4153684426832702\n', '50 1392570944363648\n', '50 6042082...
1e48f20f675619b57a2093fe885933db
__inputs__ = ['2 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7712c84645a3ba992d7204110bab41d3
__inputs__ = ['5\n1 2 1 1 2\n', '3\n1 2 7\n', '4\n4 2 4 8\n', '5\n1 1 1 1 1\n', '16\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n', '20\n1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10\n', '100\n28 20 67 103 72 81 82 83 7 109 122 30 50 118 83 89 108 82 92 17 97 3 62 12 9 100 14 11 99 106 10 8 60 101 88 119 104 62 76 6 5 57 32 94 ...
1db6fd94a6fea9af7b91630e6f391396
__inputs__ = ['5\n1 2 1 1 2\n', '3\n1 2 7\n', '4\n4 2 4 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
97fb975d762b18587391b06ff342e5c2
__inputs__ = ['1\n3 2\n', '3\n3 2\n5 4\n7 3\n', '2\n10 5\n6 3\n', '4\n2 1\n4 2\n6 3\n8 4\n', '1\n400 200\n', '5\n300 150\n600 300\n900 450\n1200 600\n1500 750\n', '3\n7 4\n14 7\n21 10\n', '1\n150 75\n', '1\n350 175\n', '1\n550 275\n', '5\n1 1\n2 2\n3 3\n4 4\n5 5\n', '1\n4 2\n', '3\n5 2\n3 3\n6 3\n', '5\n1 1\n2 1\n1 2\n...
737680bfc6dd777221d0515a56d1df01
__inputs__ = ['1\n3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
720351ce2da2799c4458fd151392336e
__inputs__ = ['2\n4\n1.000 31.000\n12 3\n20 6\n30 1\n5 1\n3\n1.000 30.000\n1 10\n10 10\n20 8\n', '2\n4\n1.000 31.000\n12 3\n20 6\n30 1\n5 1\n3\n1.000 30.000\n1 10\n10 8\n20 8\n', '2\n4\n1.000 31.000\n12 0\n20 6\n31 0\n5 0\n3\n1.000 30.000\n1 10\n10 8\n20 5\n', '2\n4\n1.000 31.000\n12 0\n20 0\n31 0\n5 0\n3\n1.000 30.000...
e46fe44ea1040badb147568896485899
__inputs__ = ['2\n4\n1.000 31.000\n12 3\n20 6\n30 1\n5 1\n3\n1.000 30.000\n1 10\n10 10\n20 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5d464c0ae38208693d73f922877e4342
__inputs__ = ['6\n0 0\n0 1\n1 1\n1 2\n2 2\n2 0\n0 0\n', '16\n1 1\n1 5\n3 5\n3 7\n2 7\n2 9\n6 9\n6 7\n5 7\n5 3\n4 3\n4 4\n3 4\n3 2\n5 2\n5 1\n1 1\n', '4\n-10000 -10000\n-10000 10000\n10000 10000\n10000 -10000\n-10000 -10000\n', '4\n6 8\n6 9\n7 9\n7 8\n6 8\n', '8\n-10000 -10000\n-10000 5000\n0 5000\n0 10000\n10000 10000\...
0eda41d41ff447a603713acf4d064e0f
__inputs__ = ['6\n0 0\n0 1\n1 1\n1 2\n2 2\n2 0\n0 0\n', '16\n1 1\n1 5\n3 5\n3 7\n2 7\n2 9\n6 9\n6 7\n5 7\n5 3\n4 3\n4 4\n3 4\n3 2\n5 2\n5 1\n1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e549b9a9e697ba32402798320c3c10ea
__inputs__ = ['13\n16 14 12 9 11 28 30 21 35 30 32 31 43\n', '13\n18 9 8 9 23 20 18 18 33 25 31 37 36\n', '2\n1 1000000000\n', '2\n1000000000 1\n', '15\n18 6 18 21 14 20 13 9 18 20 28 13 19 25 21\n', '12\n5 1 2 5 100 1 1000 100 10000 20000 10000 20000\n', '10\n15 21 17 22 27 21 31 26 32 30\n', '15\n14 4 5 12 6 19 14 19...
44d4744712dc62c1f8f76df79ab28397
__inputs__ = ['6\n10 8 5 3 50 45\n', '5\n10 3 1 10 11\n', '7\n10 4 6 3 2 8 15\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a55938d1e16c2bee9e70aefab1796321
__inputs__ = ['3 4\n15 20\n0 0\n', '3 4\n15 24\n0 0\n', '3 4\n15 34\n0 0\n', '4 4\n15 34\n0 0\n', '3 4\n15 16\n0 0\n', '3 5\n15 34\n0 0\n', '4 4\n12 34\n0 0\n', '1 4\n15 16\n0 0\n', '2 4\n12 34\n0 0\n', '2 1\n12 34\n0 0\n', '4 2\n22 34\n0 0\n', '4 3\n22 34\n0 0\n', '4 3\n13 34\n0 0\n', '6 3\n13 34\n0 0\n', '6 3\n13 25\...
43c83f4602fdf44341b78496fbe6d2ab
__inputs__ = ['3 4\n15 15\n0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d7d67a6e2fa9ce4b5416bf90bcda0d53
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(...
7c71934c6b0e7cd4b8c5d1da415d7160
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(...
271172310f586386207579616cd8a64a
__inputs__ = ['1 1 1 1 1 1\n', '1 2 1 2 1 2\n', '2 4 5 3 3 6\n', '45 19 48 18 46 21\n', '66 6 65 6 66 5\n', '7 5 4 8 4 5\n', '3 2 1 4 1 2\n', '7 1 7 3 5 3\n', '9 2 9 3 8 3\n', '1 6 1 5 2 5\n', '41 64 48 61 44 68\n', '1 59 2 59 1 60\n', '30 36 36 32 34 38\n', '50 40 46 38 52 34\n', '4 60 4 60 4 60\n', '718 466 729 470 7...
01a9c068323beeaca3e9bbf0b3d138d3
__inputs__ = ['1 1 1 1 1 1\n', '1 2 1 2 1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
144b02c9bf4b736087a64042cacc219e
__inputs__ = ['6 4\n-10 8 2 1 2 6\n', '6 4\n-6 -100 50 -2 -5 -3\n', '6 3\n-6 -100 50 -2 -5 -3\n', '25 22\n-4914956 3823889 1216217 -9302864 -1501144 -9443294 434483 -5719996 -687667 -3548437 5740256 3851980 -4631603 942858 4533097 1140983 -2849317 -6558335 -9825551 -6894413 -8391876 -4121113 828750 2790670 -6249249\n',...
0ef0a26cd2d68c023a3787e18528e358
__inputs__ = ['6 4\n-10 8 2 1 2 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c9ce84e2a64728dfccba05bc617c7843
__inputs__ = ['1000000000000 1000000100000\n', '9 1\n', '7 0\n', '1000010000000 1000100100001\n', '1000110000000 1000100100001\n', '13 1\n', '1000100000000 1000100100001\n', '13 0\n', '1000101000000 1000110100011\n', '12 -1\n', '0000101000000 1000110100011\n', '0000100000000 0000110100011\n', '0000100000001 00001101000...
45a7266272067fc3f915996ca98a6a08
__inputs__ = ['1000000000000 1000000000000\n', '8 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2d06d69f193210229ad10f2161b39a6a
__inputs__ = ['3\n7 2 3 6\n1 4\n7 2 3 6\n5 1\n7 2 3 6\n4 4\n', '3\n7 2 3 6\n1 4\n7 2 3 6\n5 1\n7 2 3 6\n2 4\n', '3\n7 2 3 6\n1 4\n7 2 3 6\n5 1\n12 2 3 6\n4 4\n', '3\n7 2 3 6\n1 4\n7 2 3 4\n5 1\n7 2 3 6\n2 4\n', '3\n7 2 3 6\n1 4\n7 2 3 9\n5 1\n7 2 3 6\n2 4\n', '3\n13 2 3 6\n1 8\n7 2 4 6\n5 2\n7 2 3 12\n2 4\n', '3\n7 2 3...
5a61b3b0ad82826ba84499a38e775a89
__inputs__ = ['3\n7 2 3 6\n1 4\n7 2 3 6\n5 1\n7 2 3 6\n4 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3510fd592a4af97a4964135eb6cf3d31
__inputs__ = ['3 74 51\n2 2\n5 7\n2 9\n', '1 10 1\n1 1\n', '2 10 5\n2 2\n3 3\n', '3 50 20\n10 2\n15 3\n20 1\n', '5 100 10\n10 5\n20 10\n30 15\n40 20\n50 25\n', '4 200 30\n20 10\n40 20\n60 30\n80 40\n', '2 20 10\n10 5\n10 5\n', '3 30 10\n10 2\n10 2\n10 2\n', '4 100 20\n20 5\n20 5\n20 5\n20 5\n', '5 500 40\n100 20\n100 2...
cfac87efaa447dd778e54614daf29e5f
__inputs__ = ['3 74 51\n2 2\n5 7\n2 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3ada0d9aa26bc6f4f0836df4e59f2d9f
__inputs__ = ['5\n1 2 3 2 3\n', '7\n1 5 8 2 3 6 1\n', '6\n3 1 2 4 2 1\n', '9\n2 3 4 5 6 7 6 5 4\n', '5\n5 10 15 10 5\n', '8\n1 3 5 7 6 4 2 1\n', '4\n9 8 7 6\n', '5\n4 3 2 3 4\n', '1\n500\n', '10\n1 3 5 7 9 8 6 4 2 1\n', '5\n3 2 1 2 3\n', '5\n6 5 4 5 6\n', '6\n2 4 6 4 2 1\n', '4\n2 4 6 8\n', '4\n4 2 1 3\n', '6\n3 5 7 5 ...
c717ae1c99c9227cc61804ef70fc1419
__inputs__ = ['5\n1 2 3 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c9bbf8a1b41318beccf90204c4ba37c4
__inputs__ = ['4\n5\n1 5 4 2 3\n3\n1 2 3\n4\n2 1 4 3\n6\n5 2 4 1 6 3\n', '1\n4\n3 4 2 1\n', '1\n6\n4 3 2 6 5 1\n', '3\n5\n5 1 2 3 4\n6\n1 3 5 2 4 6\n7\n4 6 1 3 5 2 7\n', '2\n5\n1 4 3 2 5\n4\n2 1 3 4\n', '1\n3\n2 1 3\n', '2\n2\n1 2\n5\n4 5 3 2 1\n', '3\n5\n5 3 1 2 4\n5\n1 2 4 5 3\n7\n1 3 7 2 6 4 5\n', '1\n10\n6 5 4 3 2 ...
47980e27a0db4a74dd1e355362f29cea
__inputs__ = ['4\n5\n1 5 4 2 3\n3\n1 2 3\n4\n2 1 4 3\n6\n5 2 4 1 6 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0d8c9d9b2410e644abcb3682a2e12d24
__inputs__ = ['3\n5\n1 2\n1 3\n2 4\n2 5\n3\n1 2\n1 3\n1\n', '2\n1\n1\n', '3\n1\n1\n1\n', '4\n1\n1\n1\n1\n', '5\n1\n1\n1\n1\n1\n', '1\n4\n1 2\n2 3\n3 4\n', '1\n7\n1 2\n1 3\n2 4\n2 5\n3 6\n3 7\n', '2\n8\n1 2\n2 3\n3 4\n4 5\n1 6\n6 7\n7 8\n4\n1 2\n2 3\n3 4\n', '2\n4\n1 2\n2 3\n2 4\n2\n1 2\n', '1\n10\n1 2\n2 3\n3 4\n4 5\n5...
4baa12116205685817d8559c3649e7df
__inputs__ = ['3\n5\n1 2\n1 3\n2 4\n2 5\n3\n1 2\n1 3\n1\n', '1\n1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a4f27c2ea3043332fad789aebbe157aa
__inputs__ = ['y\n', 'aaabbcccdeeegfg\n', 'baca\n', 'aaadbcccbeedgfg\n', 'bbcb\n', 'gegdeebcccbeaaa\n', 'aeaaacccbeedgeg\n', 'gegdeebccdaaaea\n', 'gegdfebccdaaaea\n', 'bedc\n', 'abadbcccbeedhfg\n', 'cggdeebcgcbeaaa\n', 'x\n', 'gfgeeedcccbbaaa\n', 'acab\n', 'w\n', 'gfgeeebcccbdaaa\n', 'bcaa\n', 'v\n', 'aaadbcccbeeegfg\n...
04ecbf8142850c8e873f09a0fa816e21
__inputs__ = ['z\n', 'aaabbcccdeeeffg\n', 'abca\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c9b9c788be92e54a4fb00760128908a4
__inputs__ = ['4\n2 5 5 2\n', '5\n6 3 4 1 5\n', '8\n4 4 4 2 2 100 100 100\n', '6\n10 10 50 10 50 50\n', '1\n1\n', '100\n45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45...
4731bb0384cdd3536a6a2d01a2d11259
__inputs__ = ['4\n2 5 5 2\n', '5\n6 3 4 1 5\n', '8\n4 4 4 2 2 100 100 100\n', '6\n10 10 50 10 50 50\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
759efc30d296ed6f287d21b7f3b6d7bd
__inputs__ = ['13\n12\n', '16\n11311\n', '20\n999\n', '17\n2016\n', '1000\n1001\n', '1000\n1000\n', '2\n110111100000101101101011001110100111011001000000000000000000\n', '500\n29460456244280453288\n', '1000000000\n17289468142098080\n', '123\n7719\n', '25\n2172214240\n', '2\n1110110101111000010001011110101001011001110000...
57889e61ec14e0676724055c02e20a64
__inputs__ = ['13\n12\n', '16\n11311\n', '20\n999\n', '17\n2016\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f4206f2f5298692a704b9ec82c336063
__inputs__ = ['3\n1 10\n2 12\n100 10000\n', '3\n1 10\n1 12\n100 10000\n', '3\n1 20\n1 12\n100 10010\n', '3\n1 20\n1 11\n100 10110\n', '3\n1 10\n2 12\n100 10010\n', '3\n1 20\n2 12\n100 10000\n', '3\n2 20\n1 12\n100 10010\n', '3\n1 20\n1 11\n100 11110\n', '3\n1 10\n2 3\n100 10010\n', '3\n1 20\n2 11\n101 10010\n', '3\n1 2...
fa77677f39a54e3cd76cd94d42c9b882
__inputs__ = ['3\n1 10\n2 12\n100 10000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
de42a14c4d80713e5cda8e9be11776f1
__inputs__ = ['1\n2 2\n', '1\n3 2\n', '1\n6 2\n', '1\n3 3\n', '1\n3 6\n', '1\n6 6\n', '1\n0 6\n', '1\n-1 6\n', '1\n0 5\n', '1\n0 3\n', '1\n0 0\n', '1\n0 -1\n', '1\n0 -2\n', '1\n1 -1\n', '1\n1 0\n', '1\n-1 -1\n', '1\n-1 3\n', '1\n4 1\n', '1\n5 -1\n', '1\n5 -2\n', '1\n5 -3\n', '1\n2 -3\n', '1\n-1 -4\n', '1\n-2 -4\n', '1\...
96e68035ba14af285930003fa90f5ab5
__inputs__ = ['1\n2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
14310025d5ff9217640d542f19a7612c
__inputs__ = ['06,04,1,1,1,1,1,1,1,1,1,1\n1,1,1,1,1,3,3,3,3,3,50,50\n10,10,10,10,10,10,10,10,10,10,50,49\n', '1,1,1,1,1,1,1,1,1,0,40,60\n1,1,1,1,1,3,3,3,3,3,50,50\n10,10,10,10,10,10,10,10,10,10,50,49\n', '06,04,1,1,0,1,1,1,1,1,1,1\n1,1,1,1,1,3,3,3,3,3,50,50\n94,05,01,01,01,01,01,01,01,01,01,01\n', '1,1,1,1,1,1,1,1,1,0,...
836135ea13ec0850bc9af4611e94b807
__inputs__ = ['1,1,1,1,1,1,1,1,1,1,40,60\n1,1,1,1,1,3,3,3,3,3,50,50\n10,10,10,10,10,10,10,10,10,10,50,49\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
68b3a5d6c80891d91b076a9a525da593
__inputs__ = ['2\n4\n1 2 3 4\n5\n1 42 69 228 2021\n', '1\n3\n1 1 1\n', '1\n3\n1 1 2\n', '1\n3\n1 2 2\n', '1\n4\n1 2 3 4\n', '2\n3\n1 2 3\n3\n1 1 1\n', '2\n3\n1 2 3\n3\n1 2 2\n', '2\n4\n1 2 3 4\n4\n1 1 1 1\n', '1\n5\n1 1 2 2 3\n', '1\n6\n1 1 2 3 4 5\n', '1\n7\n1 2 2 3 4 5 6\n', '1\n8\n1 1 2 2 3 3 4 5\n', '2\n8\n1 2 3 4 ...
9e87831703d443f8883f9e91959af5a6
__inputs__ = ['2\n4\n1 2 3 4\n5\n1 42 69 228 2021\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
72a00077f61e30cf486c635aab2bff40
__inputs__ = ['1 30 200\n', '1 1 -1\n', '-1 1 1\n', '1000 1 -1\n', '-1 1000 1\n', '1000 1000 -999\n', '633 304 -186\n', '-181 -227 368\n', '-779 -814 321\n', '1 1 0\n', '1 0 -9\n', '1 1 0\n', '-779 -814 321\n', '-1 1 1\n', '1000 1000 -999\n', '1 1 -1\n', '633 304 -186\n', '-1 1000 1\n', '1 0 -9\n', '1000 1 -1\n', '-181...
7e45f3ec43756d3e5f3f4da9f00599dd
__inputs__ = ['1 30 200\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3b81dbdcd313388326f92c24d0130829
__inputs__ = ['5\n6\n3\n5\n8\n7\n6\n3\n9\n7\n3\n4\n', '5\n5\n3\n5\n8\n7\n6\n3\n9\n7\n3\n4\n', '5\n3\n3\n1\n15\n7\n6\n6\n16\n2\n1\n4\n', '5\n3\n3\n1\n15\n7\n6\n6\n16\n1\n1\n4\n', '5\n3\n2\n1\n15\n7\n6\n6\n16\n2\n1\n4\n', '5\n5\n1\n1\n15\n7\n6\n6\n16\n2\n2\n4\n', '5\n5\n1\n1\n28\n7\n6\n6\n16\n2\n0\n4\n', '5\n5\n1\n1\n28\...
c51659613b86d72679ad24accde09d2b
__inputs__ = ['5\n6\n3\n5\n8\n7\n5\n3\n9\n7\n3\n4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
15547014efef3b7a384f491c51e9906e
__inputs__ = ['397 24 21491 18004\n', '65 101 43738 16242\n', '550 5 88379 9433\n', '0 0 16709 12233\n', '0 0 23896 0\n', '239 695 50503 18287\n', '452 53 51476 50033\n', '3 0 42953 1\n', '1 1 2 0\n', '937 859 7333 2141\n', '1 0 2 0\n', '977 461 14937 9343\n', '1 1 100000 0\n', '349 673 81953 56773\n', '4 4 5 4\n', '10...
98bb6049532b4c1b42fe716f13720e2e
__inputs__ = ['2 6 12 11\n', '3 6 81 9\n', '2 3 5 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ef3b0e25d800ea30d3bd93a31645174d
__inputs__ = ['3\n1\n1\n2\n', '2\n1\n2\n', '100\n2\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n3\n3\n3\n3\n3\n3\n1\n2\n2\n2\n3\n1\n1\n3\n3\n3\n3\n3\n3\n3\n3\n1\n2\n3\n3\n3\n1\n1\n1\n1\n3\n3\n3\n3\n1\n2\n3\n1\n2\n2\n2\n3\n3\n2\n1\n3\n3\n1\n2\n3\n1\n1\n1\n2\n2\n2\n3\n1\n1\n1\n1\n1\n1\n3\n2\n2\n2\n2\n2\n2\n3\n1\n2...
5917929aa80a8a70e46ba37482b6ad1e
__inputs__ = ['3\n1\n1\n2\n', '2\n1\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
64e0761512737fbbed30571db19d872a
__inputs__ = ['4 10 5\n200 6\n', '3 1 5\n7 2\n', '100 100 100\n1 1000000\n', '1000 1000 1000\n1 1000000000\n', '125 577 124\n7716799 6501425\n', '624 919 789\n436620192 451753897\n', '314 156 453\n9938757 14172410\n', '301 497 118\n11874825 13582548\n', '491 980 907\n253658701 421137262\n', '35 296 7\n70033 65728\n', '...
ae75b610806efc630f5a01c25f0aff91
__inputs__ = ['4 10 5\n200 6\n', '3 1 5\n7 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
95c368bc226b9e165a4c37d6a09ddb0f
__inputs__ = ['3\n', '4\n', '10\n', '10000000000\n', '1234567891\n', '7509213957\n', '99999999999999999\n', '21\n', '712394453192\n', '172212168\n', '822981260158260519\n', '28316250877914571\n', '779547116602436424\n', '578223540024979436\n', '335408917861648766\n', '74859962623690078\n', '252509054433933439\n', '7607...
8d3033f0fa1808f48080ec8a2f9c0202
__inputs__ = ['3\n', '4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4fa9d080d99bcb863d41f5676bb454f7
__inputs__ = ['3\n1 2 3\n', '4\n2 3 4 5\n', '6\n1 4 4 4 4 4\n', '8\n821407370 380061316 428719552 90851747 825473738 704702117 845629927 245820158\n', '1\n10\n', '1\n4\n', '1\n12312\n', '1\n1\n', '2\n3 4\n', '2\n2 4\n', '8\n821407370 380061316 428719552 90851747 825473738 704702117 845629927 251930836\n', '1\n17\n', '6...
5a70c20bce2eeda07f47ca2569ee3a6b
__inputs__ = ['3\n1 2 3\n', '4\n2 3 4 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
499ebb0cea39fc7acbeec7ceb2279d4f
__inputs__ = ['4\nOXXXOXOOXOOX\nOXOXOXOXOXOX\nXXXXXXXXXXXX\nOOOOOOOOOOOO\n', '2\nOOOOOOOOOOOO\nXXXXXXXXXXXX\n', '13\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\nXXXXXXXXXXXX\n', '13\nXXXXXXXXXXXX\...
a4c183eed61832015d12b698f6ccc3b4
__inputs__ = ['4\nOXXXOXOOXOOX\nOXOXOXOXOXOX\nXXXXXXXXXXXX\nOOOOOOOOOOOO\n', '4\nOXXXOXOOXOOX\nOXOXOXOXOXOX\nXXXXXXXXXXXX\nOOOOOOOOOOOO\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7dac2dec5b5005408fd5dab1b3cee4c3
__inputs__ = ['4\n3 2 4 1\n', '6\n1 1 1 4 4 4\n', '10\n8 9 4 9 6 10 8 2 7 1\n', '7\n1 1 2 3 5 6 6\n', '1\n1\n', '10\n2 3 5 2 4 3 1 1 5 4\n', '8\n3 2 2 1 1 2 1 2\n', '5\n1 1 1 3 3\n', '6\n1 9 2 6 4 3\n', '10\n6 7 3 10 2 2 10 9 8 9\n', '10\n10 3 1 3 9 1 8 4 10 9\n', '10\n9 6 6 5 1 10 4 3 4 8\n', '111\n117 101 127 127 119...
e55ad9a8f77541b232e412e363c89755
__inputs__ = ['4\n3 2 4 1\n', '6\n1 1 1 4 4 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
78d1ae62fdc4d55e78148df641771f15
__inputs__ = ['5 4\n1 2\n3 4\n5 4\n3 5\n', '17 15\n1 8\n1 12\n5 11\n11 9\n9 15\n15 5\n4 13\n3 13\n4 3\n10 16\n7 10\n16 7\n14 3\n14 4\n17 6\n', '4 4\n1 2\n2 3\n1 3\n1 4\n', '5 5\n1 2\n2 3\n3 4\n4 1\n3 5\n', '200000 0\n', '1 0\n', '5 10\n1 2\n2 3\n3 4\n4 5\n5 1\n1 4\n2 4\n3 5\n3 1\n2 5\n', '5 10\n1 2\n1 3\n1 4\n1 5\n2 3\...
b6436d03ebf28a7b6410e8b25f105996
__inputs__ = ['5 4\n1 2\n3 4\n5 4\n3 5\n', '17 15\n1 8\n1 12\n5 11\n11 9\n9 15\n15 5\n4 13\n3 13\n4 3\n10 16\n7 10\n16 7\n14 3\n14 4\n17 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
295109677c7fc8c2d98e881542ba6a22
__inputs__ = ['2 5\n', '5 10\n', '9 9\n', '1 1\n', '3 1\n', '2 2\n', '2 4\n', '3 3\n', '1 11\n', '3 4\n', '3 5\n', '2 8\n', '20 1\n', '5 5\n', '4 8\n', '11 3\n', '9 4\n', '3 14\n', '7 7\n', '16 4\n', '10 8\n', '20 5\n', '20 20\n', '9 5\n', '7 10\n', '3 8\n', '9 8\n', '6 8\n', '7 9\n', '7 8\n', '7 3\n', '7 2\n', '9 2\n'...
6dc979791fefdc47b8fab9c5f19b1cc5
__inputs__ = ['2 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8e6dd3e26b53ffaed95010f0fd25a573
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(...
15e024f81a7312a0ede5157373b692d2
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(...
a1737086a887709fdb404a9a1ca7dd0e
__inputs__ = ['5\n1 2 3 2 10\n1 3 4 3 3\n', '4\n1 10 2 10\n2 4 2 2\n', '7\n1 1 1 1 1 1 1\n2 2 2 3 6 7 6\n', '10\n6 9 1 1 1 10 2 4 9 6\n5 3 4 2 6 8 9 1 10 7\n', '10\n9 19 19 1 3 9 1 12 10 8\n7 1 6 3 4 8 5 10 2 9\n', '1\n12\n1\n', '2\n62 49\n1 2\n', '2\n21 28\n2 1\n', '3\n80 6 67\n1 2 3\n', '3\n15 52 14\n1 3 2\n', '3\n17...
6b04cf2fec3463070facb7b868f2b0bc
__inputs__ = ['5\n1 2 3 2 10\n1 3 4 3 3\n', '4\n1 10 2 10\n2 4 2 2\n', '7\n1 1 1 1 1 1 1\n2 2 2 3 6 7 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
27c0abab6e3b5b521edf537b5fdc27c5