test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['aaaaa\n3\n1 1\n2 4\n5 5\n', 'aabbbbbbc\n6\n1 2\n2 4\n2 2\n1 9\n5 7\n3 5\n', 'f\n1\n1 1\n', 'f\n1\n1 1\n', 'abca\n1\n1 4\n', 'abca\n1\n2 4\n', 'aabbbbbbc\n6\n1 2\n2 4\n2 2\n2 9\n5 7\n3 5\n', 'cbbbbbbaa\n6\n1 2\n2 4\n2 2\n2 9\n5 7\n3 5\n', 'aabbbbbbc\n3\n1 2\n2 4\n2 2\n1 9\n5 7\n3 5\n', 'abcb\n1\n2 4\n', '...
49822dd30c622464c18a9cccbba15759
__inputs__ = ['aaaaa\n3\n1 1\n2 4\n5 5\n', 'aabbbbbbc\n6\n1 2\n2 4\n2 2\n1 9\n5 7\n3 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2ee17d921d7876e3b588cecb3dee0e38
__inputs__ = ['30 5 6\n4 2 2 1 3 4 2 3 2 4 3 1 1 4 4 3 5 1 4 5 5 1 2 2 1 2 4 4 1 2\n', '20 6 3\n4 1 2 6 3 3 2 5 2 5 2 1 1 4 1 2 2 1 1 4\n', '100 5 10\n4 4 4 4 4 4 4 4 4 4 4 4 2 4 4 4 4 4 4 4 4 4 2 2 2 3 3 3 3 3 3 3 4 4 4 3 3 2 1 1 1 2 3 3 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 2 2 2 2 2 2 2 4 4 4 4 5 4 4 4 4 4 4 4 3 3 3...
ca208f30565de0538e9f846d0ba7cc05
__inputs__ = ['3 1 2\n1 1 1\n', '10 2 2\n1 2 1 2 1 1 2 1 1 2\n', '10 3 2\n1 2 1 1 3 2 1 1 2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1752f9b239448d84ebef8229a5408de5
__inputs__ = ['3\n101\n', '1\n1\n', '2\n01\n', '2\n00\n', '1\n0\n', '2\n11\n', '3\n000\n', '3\n010\n', '3\n111\n', '4\n0000\n', '4\n0100\n', '4\n0110\n', '4\n1011\n', '4\n1111\n', '5\n10110\n', '5\n01100\n', '6\n111000\n', '6\n101111\n', '7\n1011011\n', '18\n000000000000000000\n', '18\n111111111111111111\n'] for __inp_...
beeec3500658a6923f6263f4ab7c7509
__inputs__ = ['3\n101\n', '1\n1\n', '2\n01\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
352de33bb7919252d1316dd3f64613d6
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(...
20ebb94a74752046ffcf91d9a34b1a20
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(...
1086a980c50a63746031b6476c13eee5
__inputs__ = ['3\n5\n11\n23\n', '1\n0\n', '10\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n', '5\n1\n10\n20\n30\n40\n', '1\n999999\n', '3\n33\n66\n99\n', '5\n12\n24\n36\n48\n60\n', '10\n100\n200\n300\n400\n500\n600\n700\n800\n900\n1000\n', '1\n500000\n', '5\n10000\n20000\n30000\n40000\n50000\n', '1\n1000000\n', '3\n13\n26\n39\n', ...
d68cdf39a20adbec1295dbc4aee0bf7b
__inputs__ = ['3\n5\n11\n23\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7b8e22b9807d9467fa01be9cdc27a115
__inputs__ = ['5\n3 5 4 1 2\n', '4\n3 4 1 2\n', '100\n22 78 19 70 81 33 15 72 40 51 18 62 36 24 37 20 97 65 89 75 14 55 23 53 1 67 50 99 54 76 41 16 44 60 2 90 7 28 79 43 47 64 71 27 25 8 46 92 95 80 31 100 42 96 86 66 52 63 98 4 56 91 34 83 85 3 84 17 94 11 73 29 6 58 61 68 57 88 10 32 82 93 26 13 87 39 30 5 12 59 9 4...
6a20571656abe5040472437ec32c919c
__inputs__ = ['5\n1 5 2 4 3\n', '4\n1 3 4 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1c98b57ff29f1df8e061593d42217e16
__inputs__ = ['1\n1 1 9\n', '2\n2 3 20\n2 4 40\n', '2\n1 2 5\n2 3 5\n', '2\n1 2 5\n2 3 10\n', '2\n2 2 20\n2 4 40\n', '2\n2 2 20\n2 7 16\n', '1\n1 1 8\n', '2\n2 2 5\n2 -1 10\n', '2\n1 2 5\n2 0 10\n', '2\n2 2 20\n2 7 40\n', '2\n1 2 5\n2 1 10\n', '2\n1 2 5\n2 -1 10\n', '2\n1 1 5\n2 3 10\n', '2\n4 2 20\n2 4 40\n', '2\n2 2 ...
dd192ab4703baf7772fb6a6864d1a4bf
__inputs__ = ['1\n1 1 9\n', '2\n2 3 20\n2 4 40\n', '2\n1 2 5\n2 3 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d3e379eeaf4901fbdd034588035cb732
__inputs__ = ['1 3\n1 -1 0\n0 0 5\n1 0 0\n', '3 5\n0 0 1\n0 1 2\n0 2 3\n1 0 2\n1 1 4\n', '1 3\n1 -1 0\n0 0 9\n1 0 0\n', '3 5\n0 0 1\n0 2 2\n0 2 3\n1 0 2\n1 1 2\n', '1 3\n1 -1 0\n0 0 5\n0 0 0\n', '1 3\n1 -1 0\n0 0 15\n1 0 0\n', '3 5\n0 0 1\n0 2 2\n0 2 3\n1 0 2\n0 1 2\n', '3 5\n0 0 1\n0 0 2\n0 2 6\n1 0 2\n1 1 4\n', '3 5\...
24ca10f7f3e4450068db07f6b37dea94
__inputs__ = ['3 5\n0 0 1\n0 1 2\n0 2 3\n1 0 2\n1 1 2\n', '1 3\n1 0 0\n0 0 5\n1 0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f5ca0ab12da22ded3be7edfa3b0ae775
__inputs__ = ['4 3\n0 1 0 1\n0 1\n1 2\n2 3\n', '4 3\n1 1 1 0\n0 1\n0 2\n3 0\n', '10 39\n0 1 0 1 0 1 1 0 1 1\n0 1\n0 2\n0 3\n0 4\n0 5\n0 6\n1 2\n1 3\n1 4\n1 5\n1 6\n1 7\n1 8\n1 9\n2 3\n2 4\n2 5\n2 6\n2 7\n2 8\n2 9\n3 4\n3 6\n3 7\n3 8\n3 9\n4 5\n4 6\n4 7\n4 9\n5 6\n5 7\n5 8\n5 9\n6 8\n6 9\n7 8\n7 9\n8 9\n', '10 16\n0 1 1...
c7ee470018a36d68732613981bf0e6bc
__inputs__ = ['4 3\n0 1 0 1\n0 1\n1 2\n2 3\n', '4 3\n1 1 1 0\n0 1\n0 2\n3 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f725c8448622b70c75d1e87f6fdfe4f3
__inputs__ = ['1900\n', '3000\n', '1\n', '999\n', '1001\n', '1000\n', '10000\n', '522\n', '4575\n', '6426\n', '9445\n', '8772\n', '81\n', '3447\n', '629\n', '3497\n', '7202\n', '5614\n', '2651\n', '636\n', '975\n', '860\n', '1858\n', '541\n', '209\n', '1054\n', '89\n', '1861\n', '133\n', '3264\n', '194\n', '2720\n', '1...
f1de1332d33bfeac17209abbe2ae6932
__inputs__ = ['1900\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
47c8dd65bf90aa32e48817d450f39dd8
__inputs__ = ['2 2 3\n1 1 3\n2 1 4\n1 2 5\n', '2 5 5\n1 1 3\n2 4 20\n1 2 1\n1 3 4\n1 4 2\n', '4 5 10\n2 5 12\n1 5 12\n2 3 15\n1 2 20\n1 1 28\n2 4 26\n3 2 27\n4 5 21\n3 5 10\n1 3 10\n', '2 5 5\n1 1 3\n2 4 20\n2 2 1\n1 3 4\n1 4 2\n', '4 5 3\n2 5 12\n1 5 12\n2 3 15\n1 2 20\n1 1 28\n2 4 26\n3 2 27\n4 5 21\n3 5 10\n1 3 10\n...
ef9432466d14701753ed0f221ec88186
__inputs__ = ['2 2 3\n1 1 3\n2 1 4\n1 2 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5dc0df369543b960abc04b4676d9b647
__inputs__ = ['2\n3 2\n1 2\n2 3\n3 3\n1 2\n2 3\n1 3\n', '2\n3 2\n1 2\n2 3\n3 3\n1 2\n2 3\n2 3\n', '2\n4 2\n1 2\n4 3\n3 3\n1 2\n3 3\n2 2\n', '2\n3 2\n1 2\n2 5\n3 2\n1 2\n2 3\n1 1\n', '2\n7 4\n1 2\n2 3\n4 3\n1 2\n2 0\n2 4\n', '2\n4 2\n1 2\n2 3\n3 3\n1 2\n2 3\n2 3\n', '2\n3 2\n1 2\n1 3\n3 3\n1 2\n2 3\n2 3\n', '2\n4 2\n1 2...
483edceba7e5574d554b0564d619c222
__inputs__ = ['2\n3 2\n1 2\n2 3\n3 3\n1 2\n2 3\n1 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1b3b2b9639792b41c7922124e8b0e49a
__inputs__ = ['abrakadabrabrakadabra\n', 'acacacaca\n', 'abcabc\n', 'abababab\n', 'tatbt\n', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n', 'r\n', 'zaz\n', 'zaza\n', 'gg\n', 'gagaga\n', 'hhhh\n', 'sssss\n', 'nxnxnx\n', 'vygvygv\n', 'rlrlrlrl\n', 'zyzyzyzyz\n', ...
93d6a79ab37e57465516a074909fb318
__inputs__ = ['abrakadabrabrakadabra\n', 'acacacaca\n', 'abcabc\n', 'abababab\n', 'tatbt\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d8b57ef27818733b7eac886734fdf3b4
__inputs__ = ['9\n10 12 2 5\n1 1 2 2\n52 311 13 27\n1000000000 1000000000 1 1\n1000000000 1 1 1000000000\n1 1000000000 1000000000 1\n1 2 1 1\n7 8 1 2\n4 1 2 3\n', '9\n10 12 2 5\n1 2 2 2\n52 311 13 27\n1000000000 1000000000 1 1\n1000000000 1 1 1000000000\n1 1000000000 1000000000 1\n1 2 1 1\n7 8 1 2\n4 1 2 3\n', '9\n10 1...
d1bfcb1958b0d4afd39ce1b9c7dd3218
__inputs__ = ['9\n10 12 2 5\n1 1 2 2\n52 311 13 27\n1000000000 1000000000 1 1\n1000000000 1 1 1000000000\n1 1000000000 1000000000 1\n1 2 1 1\n7 8 1 2\n4 1 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SEN...
415c1d88cb000496570830e9fcc1f46f
__inputs__ = ['5\n1 1 2 2\n', '10\n1 1 1 1 1 1 1 1 1\n', '7\n1 2 3 4 5 6\n', '5\n1 1 2 3\n', '7\n1 2 1 4 5 6\n', '10\n1 1 1 1 1 2 1 1 1\n', '5\n1 2 2 3\n', '7\n1 2 3 4 5 4\n', '5\n1 2 2 2\n', '7\n1 2 2 4 5 6\n', '10\n1 1 1 2 1 2 1 1 1\n', '7\n1 2 3 4 5 2\n', '7\n1 2 2 4 1 6\n', '7\n1 2 3 6 5 2\n', '7\n1 2 2 2 1 6\n', '...
d4f78b377f35b34ef1e0a98fe83c42ed
__inputs__ = ['5\n1 1 2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
dd684e13af63e365605f16a79fd6a948
__inputs__ = ['abbaa\n', 'baaaa\n', 'agaa\n', 'aaaaabb\n', 'aabaaaa\n', 'krflnzhter\n', 'baaahbbbba\n', 'abnxabbaab\n', 'babbbaaaaaabbbaabaaaaaoaabababaababaaaaababaaaaaaabbbbbbaaapaabaaabaaababaaaabaaaabaaaaababaaaabaaab\n', 'amaabbbbxaabbbabaabaabbaaabaaaaabibbabaabaaabaabcaaxabablbbbbmbbbaaaaaabbaabbbaaabaaaababaaba...
85a710a36c5080915d9adb954252d446
__inputs__ = ['abbaa\n', 'baaaa\n', 'agaa\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1c410184c062a0701a5c8e69ebb7ee42
__inputs__ = ['3 3 3\n1 2 3\n2 3 3\n1 3 8\n12 12 2010\n1 2 0\n2 3 3000\n3 4 0\n4 5 3000\n5 6 3000\n6 12 2010\n2 7 100\n7 8 200\n8 9 300\n9 10 400\n10 11 500\n11 6 512\n10 18 1\n1 2 7\n1 3 2\n1 4 6\n2 5 0\n2 6 10\n2 7 2\n3 5 10\n3 6 3\n3 7 10\n4 7 6\n5 8 10\n6 8 2\n6 9 11\n7 9 3\n8 9 9\n8 10 8\n9 10 1\n8 2 1\n0 0 0\n', ...
d3eacb6c0eaa4f822323f7741b12662e
__inputs__ = ['3 3 3\n1 2 3\n2 3 3\n1 3 8\n12 12 2010\n1 2 0\n2 3 3000\n3 4 0\n4 5 3000\n5 6 3000\n6 12 2010\n2 7 100\n7 8 200\n8 9 300\n9 10 400\n10 11 500\n11 6 512\n10 18 1\n1 2 9\n1 3 2\n1 4 6\n2 5 0\n2 6 10\n2 7 2\n3 5 10\n3 6 3\n3 7 10\n4 7 6\n5 8 10\n6 8 2\n6 9 11\n7 9 3\n8 9 9\n8 10 8\n9 10 1\n8 2 1\n0 0 0\n'] ...
a566a6a51facfb9aa5d5e8b15404072b
__inputs__ = ['8 6\n1 2 1 3 3 5 2 1\n1 3\n2 3\n2 4\n8 8\n1 4\n5 8\n', '1 1\n6\n1 1\n', '2 5\n1 1\n1 2\n2 2\n2 2\n1 2\n1 2\n', '10 10\n4 7 2 6 4 8 1 2 1 9\n6 10\n1 9\n9 9\n2 8\n9 9\n1 1\n8 8\n4 8\n8 8\n7 7\n', '7 5\n13 13 16 12 16 3 19\n2 7\n3 4\n7 7\n1 2\n4 7\n', '13 6\n2 6 1 3 5 2 2 1 6 4 2 5 2\n10 13\n4 10\n4 11\n3 5...
9c4f198a55506508bd98af29909d3d67
__inputs__ = ['8 6\n1 2 1 3 3 5 2 1\n1 3\n2 3\n2 4\n8 8\n1 4\n5 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ef8f821399377f1af381afba16a5f9f1
__inputs__ = ['1\nA\n4\nA A B B\n5\nL M N L N\n6\nK K K K K K\n6\nX X X Y Z X\n10\nA A A B A C A C C B\n10\nV U U U U V V W W W\n0\n', '1\nA\n4\nA A B B\n5\nL M N L N\n6\nK K K K K K\n6\nX X X Y Z X\n10\nA A A B A C A C C B\n10\nV U U U U V V W V W\n0\n', '1\nA\n4\nA A B B\n5\nL M N L N\n6\nK K K K K K\n6\nX X X Y Z X\...
d54a666f8f545a7a56bcd2271c15eda6
__inputs__ = ['1\nA\n4\nA A B B\n5\nL M N L N\n6\nK K K K K K\n6\nX X X Y Z X\n10\nA A A B A C A C C B\n10\nU U U U U V V W W W\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0729e7f569afc7103649b35d547c3dac
__inputs__ = ['3 7\n1\n6\n10\n0 0\n', '3 11\n0\n3\n10\n0 0\n', '3 7\n2\n6\n10\n0 0\n', '3 7\n1\n0\n5\n0 0\n', '3 7\n0\n3\n10\n0 0\n', '3 7\n1\n3\n16\n0 0\n', '3 7\n1\n3\n25\n0 0\n', '3 11\n0\n3\n18\n0 0\n', '3 7\n1\n1\n25\n0 0\n', '3 11\n0\n3\n20\n0 0\n', '3 1\n0\n3\n10\n0 0\n', '3 7\n1\n0\n16\n0 0\n', '3 9\n0\n3\n10\n...
6b6319df866ef6eb71659ddb9af7236a
__inputs__ = ['3 7\n1\n3\n10\n0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7d465950be38c93555c7c83051999e99
__inputs__ = ['6\n8 10 9 9 8 10\n1 1 1 1 1 1\n', '6\n8 10 9 9 8 10\n1 10 5 5 1 10\n', '1\n1\n100\n', '50\n83 43 73 75 11 53 6 43 67 38 83 12 70 27 60 13 9 79 61 30 29 71 10 11 95 87 26 26 19 99 13 47 66 93 91 47 90 75 68 3 22 29 59 12 44 41 64 3 99 100\n31 36 69 25 18 33 15 70 12 91 41 44 1 96 80 74 12 80 16 82 88 25 8...
4f95c6f12447c8b20ceb046220851580
__inputs__ = ['6\n8 10 9 9 8 10\n1 1 1 1 1 1\n', '6\n8 10 9 9 8 10\n1 10 5 5 1 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
892c300c74a92e96d450c9f61d1e7b3e
__inputs__ = ['10\n1 1000000000\n2 999999999\n3 99999998\n4 9999997\n5 999996\n6 99995\n7 9994\n8 993\n9 92\n10 1\n', '10\n1 1000000000\n2 999999999\n3 170267273\n4 9999997\n5 999996\n6 99995\n7 9994\n8 993\n9 92\n10 1\n', '10\n1 1000000000\n2 999999999\n3 170267273\n2 9999997\n5 999996\n6 99995\n7 9994\n8 993\n9 92\n1...
e952f13f9d67490df19706d912e081c7
__inputs__ = ['10\n1 1000000000\n2 999999999\n3 99999998\n4 9999997\n5 999996\n6 99995\n7 9994\n8 993\n9 92\n10 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
12d39125d45e6d6dacc9fad29e36fcf6
__inputs__ = ['2\n3 8\n2 5 1\n4 4\n0 1 2 3\n', '1\n2 2\n2 4\n', '1\n2 3\n3 6\n', '1\n3 0\n0 0 0\n', '1\n3 2\n2 2 2\n', '1\n3 1\n1 1 1\n', '2\n4 5\n5 5 5 5\n6 3\n3 3 3 3 3 3\n', '1\n3 3\n0 0 0\n', '1\n1 1\n2\n', '1\n3 3\n2 2 2\n', '1\n3 8\n10 13 9\n', '1\n1 0\n1\n', '1\n3 8\n16 0 0\n', '1\n6 1\n88 9 9 9 9 9\n', '1\n1 1\...
1a469b5612af1b710e7ede1949c3b7ab
__inputs__ = ['2\n3 8\n2 5 1\n4 4\n0 1 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
bf45e345597caee5dbfd8d6b7c93904d
__inputs__ = ['4\n1 2 1 2\n', '3\n1 0 1\n', '3\n1 3 1\n', '3\n2 0 2\n', '1\n179\n', '10\n0 0 5 9 9 3 0 0 0 10\n', '3\n3 2 3\n', '1\n0\n', '2\n0 0\n', '10\n0 0 0 0 0 0 0 0 0 0\n', '1\n1\n', '1\n2\n', '1\n3\n', '1\n10000\n', '2\n10000 10000\n', '3\n2 2 2\n', '10\n3 3 3 2 2 2 2 2 2 3\n', '100\n2 3 2 3 3 3 3 3 3 2 2 2 2 2 ...
b969d60cbcd3b880c7ec3e6157fec7d0
__inputs__ = ['4\n1 2 1 2\n', '3\n1 0 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d3d4c3891bc70f804a07a66298faa116
__inputs__ = ['5\n4 3 5 2 8\n', '5\n4 3 1 2 9\n', '5\n5 12 0 2 18\n', '5\n2 12 0 2 18\n', '5\n5 3 5 2 11\n', '5\n1 47 1 5 9\n', '5\n4 3 1 2 8\n', '5\n4 6 1 2 9\n', '5\n4 12 1 2 9\n', '5\n5 12 1 2 9\n', '5\n5 12 1 2 12\n', '5\n5 12 1 2 18\n', '5\n4 12 0 2 18\n', '5\n4 3 5 2 9\n', '5\n5 3 5 2 8\n', '5\n3 3 1 2 8\n', '5\n...
3d62c8ba296c805b95646121fb832c16
__inputs__ = ['5\n4 3 5 2 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d552bd9fe099e1a458fd0b4a2d23d646
__inputs__ = ['0?0?\n', '00??\n', '??00????0??1????0?0??00??1???11?1?1???1?11?111???1\n', '1???11??11?1???1?1?11???1??00??0?0?1??1??0>>??00??\n', '1???111?11?1???111?11???1??00??0?0?@?????0????00??\n', '????111?11?1?1?111?11???1??00??0???@?????0???000??\n', '????111111?1???0?1?11???1??00????00?0????0???0>0??\n', '?0?\n...
133f062c8f48eea1e7f14aca1279e688
__inputs__ = ['??00????0??0????0?0??00??1???11?1?1???1?11?111???1\n', '0??0\n', '0??\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e51569fdb1ffa29b5cb64d38421848e6
__inputs__ = ['3\n3 1 2\n', '5\n4 2 1 3 5\n', '10\n1 9 8 10 2 3 4 6 5 7\n', '50\n12 24 42 43 36 3 40 29 7 34 10 13 28 9 35 23 25 21 19 4 20 18 11 38 41 48 6 46 33 17 31 37 2 30 32 44 45 5 47 49 16 15 50 27 26 14 39 22 1 8\n', '100\n36 48 92 87 28 85 42 10 44 41 39 3 79 9 14 56 1 16 46 35 93 8 82 26 100 59 60 2 96 52 13...
de0658510770296b179ee8f993d60f01
__inputs__ = ['3\n3 1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
743d9698bd2a0da0ded485e22b13689c
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(...
eb2f0ac310bca3841996c9d50c255b18
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\n', '6\n', '5\n', '8\n', '4\n', '10\n', '18\n', '589284012\n', '636562060\n', '200000\n', '1000000000\n', '999999999\n', '999999998\n', '999999997\n', '1000005\n', '1000\n', '2\n', '1\n', '767928734\n', '20400000\n', '999993999\n', '383964368\n'] for __inp__ in __inputs__: import io sys.stdin =...
57ab6fc3d795ee1bb88108c350dafb3b
__inputs__ = ['3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
65624556f5e67a6a17d3f5328ddf468d
__inputs__ = ['1\n9 12\n', '1\n9 16\n', '1\n9 24\n', '1\n6 24\n', '1\n8 24\n', '1\n12 24\n', '1\n10 24\n', '1\n10 39\n', '1\n10 78\n', '1\n10 88\n', '1\n10 38\n', '1\n12 38\n', '1\n15 38\n', '1\n12 16\n', '1\n15 24\n', '1\n8 45\n', '1\n5 24\n', '1\n10 23\n', '1\n2 78\n', '1\n15 88\n', '1\n17 38\n', '1\n8 38\n', '1\n28 ...
74694171f1d8d114af29805194fba502
__inputs__ = ['1\n9 12\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
77d0d476252245be08b2f3bfefaa51ac
__inputs__ = ['4\n1 1 2 2\n', '6\n1 2 3 4 5 6\n', '2\n1 1\n', '2\n1 2\n', '5\n1000000000 1000000000 1000000000 1000000000 1000000000\n', '2\n641009859 641009859\n', '2\n9859 9859\n', '2\n10051 9859\n', '2\n10052 9859\n', '2\n9860 9859\n', '3\n319728747 773363571 580543238\n', '3\n10224 4237 5987\n', '3\n772674020 79785...
cb224b936cbccb6902427d043111b321
__inputs__ = ['4\n1 1 2 2\n', '6\n1 2 3 4 5 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5409513de13b8fee76123b177703050c
__inputs__ = ['279 0 254 964 449 143\n', '0 891 0 0 0 529\n', '276 264 0 875 0 0\n', '6 2 3 6 2 2\n', '0 0 580 0 245 808\n', '835 0 116 0 9 552\n', '0 54 680 0 988 0\n', '635 63 924 0 0 0\n', '31 75 12 62 94 137\n', '2 3 2 1 6 6\n', '3 6 2 2 6 3\n', '544 0 837 0 498 0\n', '1 2 2 3 2 1\n', '2 6 1 1 1 6\n', '6 6 1 6 1 6\...
7a12aeee733ab1a9c912920381e280d2
__inputs__ = ['1 1 0 1 1 1\n', '100 10 200 20 300 30\n', '1 0 1 2 1 2\n', '100 200 250 150 200 250\n', '100 50 50 200 200 100\n', '0 0 0 0 0 0\n', '100 1 100 1 0 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("_...
88231990932183cc5773272ca5c4dfee
__inputs__ = ['5\n6\n3\n', '5\n3\n5\n', '1\n200\n33\n', '100\n200\n150\n', '123\n55\n100\n', '300\n300\n600\n', '1\n1\n1\n', '100\n200\n250\n', '100\n200\n300\n', '123\n222\n250\n', '300\n300\n1\n', '300\n299\n300\n', '1\n1\n2\n', '300\n1\n45\n', '199\n199\n199\n', '297\n297\n298\n', '299\n259\n300\n', '288\n188\n300\n...
f14726311ec5a163e3490d2dde058c91
__inputs__ = ['5\n6\n3\n', '5\n3\n5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
32d0bd32414936038ddea6fed11de2c8
__inputs__ = ['4\n5\n4 3 1 4 5\n4\n4 4 4 4\n3\n1 1 1\n5\n5 5 1 1 5\n', '10\n1\n1\n2\n2 1\n3\n3 1 2\n3\n2 2 2\n4\n4 1 4 1\n5\n5 4 3 2 1\n5\n1 2 3 4 5\n6\n3 2 1 6 2 2\n10\n4 5 2 9 6 10 3 7 1 8\n10\n1 3 2 2 2 9 10 10 9 7\n', '4\n5\n2 3 1 4 5\n4\n4 4 4 4\n3\n1 1 1\n5\n5 5 1 1 5\n', '10\n1\n1\n2\n2 1\n3\n3 1 2\n3\n2 2 2\n4\...
c4131f4afc456f5d86db4f20e9896248
__inputs__ = ['4\n5\n4 3 1 4 5\n4\n4 4 4 4\n3\n1 1 1\n5\n5 5 1 1 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0d3c75ee18b684699f6a2426e725a188
__inputs__ = ['10 5\n6 4\n4 1\n7 5\n8 7\n2 6\n3 6\n8 6\n10 3\n4 9\n', '10 4\n9 6\n10 8\n9 2\n7 10\n3 7\n7 9\n10 4\n1 7\n9 5\n', '10 9\n1 2\n3 1\n6 10\n6 1\n10 9\n4 5\n7 1\n5 6\n8 5\n', '10 2\n7 10\n2 1\n6 5\n10 6\n3 1\n10 4\n3 4\n9 3\n8 4\n', '10 0\n5 6\n4 3\n8 5\n3 7\n10 4\n1 2\n2 8\n10 1\n7 9\n', '10 1\n6 3\n1 5\n10 ...
04c54141566fe383c33771c40d6d6498
__inputs__ = ['2 1\n1 2\n', '7 2\n1 2\n2 3\n1 4\n4 5\n1 6\n6 7\n', '2 0\n1 2\n', '4 1\n1 2\n2 3\n3 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
04a146b2708c27ab05598ef01ae4797e
__inputs__ = ['WYYW\n', 'Q\n', 'R\n', 'A\n', 'Y\n', 'OVWIHIWVYXMVAAAATOXWOIUUHYXHIHHVUIOOXWHOXTUUMUUVHVWWYUTIAUAITAOMHXWMTTOIVMIVOTHOVOIOHYHAOXWAUVWAVIVM\n', 'C\n', 'QDPINBMCRFWXPDBFGOZVVOCEMJRUCTOADEWEGTVBVBFWWRPGYEEYGPRWWFBVBVTGEWEDAOTCURJMECOVVZOGFBDPXWFRCMBNIPDQ\n', 'ZZ\n', 'JL\n', 'S\n', 'V\n', 'MITIM\n', 'E\n', '...
e745f83c650353fe277202c9b53373c7
__inputs__ = ['AHA\n', 'Z\n', 'XO\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
efb88cf7042113768b2c7f172ecb98b1
__inputs__ = ['2 3\n6\n8\n1 5 6\n1 9 4\n2 4 2\n', '1 3\n4\n1 5 3\n1 9 4\n4 6 6\n', '0 2\n1 1000000000 4\n1 1000000000 2\n', '0 0\n', '2 3\n4\n6\n1 4 3\n1 5 2\n1 6 5\n', '0 5\n1 96762320 50510976\n243235878 312125306 50510976\n326016273 338641867 50510976\n385105810 445224816 50510976\n456157384 569789185 50510976\n', '...
cc6bb413545847ad741cbfc584e42cd4
__inputs__ = ['2 3\n6\n8\n1 5 6\n1 9 4\n2 4 2\n', '1 3\n4\n1 5 3\n1 9 4\n4 6 6\n', '0 2\n1 1000000000 4\n1 1000000000 2\n', '0 0\n', '2 3\n4\n6\n1 4 3\n1 5 2\n1 6 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("...
ce87669ac2a4bb60334155679e447a82
__inputs__ = ['1\n5\n', '4\n1000000000 234765 3485636 385634876\n', '25\n1 1 1 2 2 2 1 2 1 2 2 2 2 2 1 2 2 2 1 2 2 2 2 1 2\n', '10\n5 6 1 2 3 1 3 45 7 1000000000\n', '3\n1 2 1\n', '2\n5 5\n', '4\n1 1 2 3\n', '1\n2\n', '3\n1 1 1\n', '1\n4\n', '2\n1 1\n', '2\n1 2\n', '2\n1 3\n', '2\n2 1\n', '1\n1\n', '3\n1 1 2\n', '1\n9\...
e134614a4c7ee05c2dee85aaaaf0275d
__inputs__ = ['5\n1 2 3 4 5\n', '5\n2 3 4 5 6\n', '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___")
838231d703858f6df405ea4226e9c1d3
__inputs__ = ['3\n6\n1 5 4 3 2 6\n5 3 1 4 6 2\n6\n3 5 4 6 2 1\n3 6 4 5 2 1\n1\n1\n1\n', '3\n8\n1 2 3 4 5 6 7 8\n1 2 3 4 5 7 8 6\n7\n1 2 3 4 5 6 7\n2 1 5 3 6 7 4\n4\n1 2 3 4\n1 4 2 3\n', '1\n10\n5 3 7 4 6 10 9 8 1 2\n2 7 1 3 9 4 8 10 5 6\n', '1\n10\n3 4 1 2 7 6 10 9 5 8\n4 6 2 5 10 1 7 3 8 9\n', '1\n10\n8 2 10 1 7 3 9 6...
9b3c78ad3ed139fbd9106b6ad0ac4210
__inputs__ = ['3\n6\n1 5 4 3 2 6\n5 3 1 4 6 2\n6\n3 5 4 6 2 1\n3 6 4 5 2 1\n1\n1\n1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f81868f87e059f1912456b623c453966
__inputs__ = ['4 3\n1 2\n1 3\n1 4\n', '6 1\n2 1\n2 3\n2 5\n5 4\n5 6\n', '5 5\n1 2\n2 3\n3 4\n3 5\n', '3 1000000000\n3 2\n2 1\n', '2 1000000000\n2 1\n', '2 1\n2 1\n', '4 1\n1 3\n1 4\n2 1\n', '4 1\n4 1\n2 4\n3 1\n', '3 1000000000\n3 2\n2 1\n', '2 1000000000\n2 1\n', '4 1\n4 1\n2 4\n3 1\n', '4 1\n1 3\n1 4\n2 1\n', '2 1\n2...
eac382721fa651bf6a5e70eeaa15bd1c
__inputs__ = ['4 3\n1 2\n1 3\n1 4\n', '6 1\n2 1\n2 3\n2 5\n5 4\n5 6\n', '5 5\n1 2\n2 3\n3 4\n3 5\n', '4 3\n1 2\n1 3\n1 4\n', '6 1\n2 1\n2 3\n2 5\n5 4\n5 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINE...
e22e395e2ee3800b0c9b6d845b950d8c
__inputs__ = ['5\n2 1 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n', '5\n2 2 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n', '5\n2 2 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000001000\n', '5\n2 2 5\n42 13 24\n12 11 ...
f3bb44c3a12f2267b56353dc3e8868de
__inputs__ = ['5\n2 1 5\n42 13 24\n12 11 12\n1000000000 1000000000 1000000000\n2 1000000000 1000000000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
18cf890a74da538f902c6ea1060e1cb0
__inputs__ = ['4\n25 25 50 50\n', '2\n25 100\n', '4\n50 50 25 25\n', '3\n25 50 100\n', '10\n25 25 25 25 25 25 25 25 25 25\n', '10\n50 50 50 50 50 50 50 50 50 50\n', '10\n100 100 100 100 100 100 100 100 100 100\n', '7\n25 25 25 25 50 100 50\n', '2\n25 25\n', '3\n50 100 100\n', '3\n25 50 50\n', '2\n50 25\n', '14\n25 25 2...
2169b4ce40cf04ab58e79dcfa40ee8ec
__inputs__ = ['4\n25 25 50 50\n', '2\n25 100\n', '4\n50 50 25 25\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c619654b28fb3429fc676e7e8468017f
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(...
2093cdb5ebc77a52d669773fb6daa368
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(...
ee5b60bf890098af8bd004aaf255f2ad
__inputs__ = ['4\n8 3 2\n4 2 4\n9 6 3\n42 0 7\n', '1\n48 20 4\n', '1\n49 7 7\n', '1\n50 50 50\n', '1\n48 10 4\n', '4\n8 3 2\n4 2 4\n12 6 3\n42 0 7\n', '1\n48 7 4\n', '1\n48 3 6\n', '4\n8 3 2\n4 3 4\n15 6 3\n7 0 9\n', '1\n49 9 7\n', '4\n12 3 2\n4 2 4\n9 6 3\n42 0 7\n', '4\n8 1 2\n4 2 4\n12 6 3\n66 0 7\n', '1\n48 0 6\n',...
21757ac44178fc05a1e68232b9f59682
__inputs__ = ['4\n8 3 2\n4 2 4\n9 6 3\n42 0 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8c2d64e13ad33a2f18115eadd2bc7b60
__inputs__ = ['3\n2 1\n1 0\n0 1\n', '5\n0 0\n0 1\n0 2\n0 3\n0 4\n', '10\n-1 2\n-3 0\n5 5\n4 4\n-2 1\n1 1\n3 3\n2 2\n0 0\n-1000000000 0\n', '10\n-678318184 2\n-678318182 3\n580731357 2\n-678318182 1\n-678318184 1\n-678318183 0\n-678318181 2\n580731357 1\n580731358 0\n-678318183 2\n', '15\n-491189818 2\n-491189821 6\n-49...
8951e7800e648082348a94a6bcc97d3e
__inputs__ = ['3\n2 1\n1 0\n0 1\n', '5\n0 0\n0 1\n0 2\n0 3\n0 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9f9908fa3c763f1624df896043d12f03
__inputs__ = ['6 2\n', '14 3\n', '20 4\n', '15 2\n', '5 6\n', '20 2\n', '17 8\n', '15 3\n', '17 4\n', '20 1\n', '1 20\n', '2 1\n', '20 7\n', '0 3\n', '6 4\n', '14 2\n', '4 0\n', '28 2\n', '28 0\n', '14 1\n', '12 0\n', '23 1\n', '14 0\n', '22 0\n', '19 1\n', '11 0\n', '21 0\n', '18 0\n', '10 0\n', '20 0\n', '47 0\n', '2...
6479b90c3b8e03fb9ee3bfbaeb31611b
__inputs__ = ['6 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f0491f22246758f67bbf54df3456198e
__inputs__ = ['10\n8 5\n10 8\n6 7\n1 5\n4 8\n2 10\n3 6\n9 2\n1 7\n', '10\n8 3\n10 8\n6 7\n1 5\n4 8\n2 10\n3 6\n9 2\n1 3\n', '10\n8 5\n10 8\n6 7\n1 5\n4 8\n2 10\n3 6\n9 2\n2 7\n', '10\n8 5\n10 8\n6 7\n1 5\n4 10\n2 10\n3 6\n9 2\n2 7\n', '10\n8 5\n10 8\n6 7\n1 5\n4 10\n2 10\n3 7\n9 2\n2 7\n', '10\n8 5\n10 8\n6 7\n1 5\n4 8...
1938d4b7f195b8f42cf85b414090b1b7
__inputs__ = ['3\n1 2\n2 3\n', '10\n8 5\n10 8\n6 5\n1 5\n4 8\n2 10\n3 6\n9 2\n1 7\n', '1\n', '4\n1 2\n1 3\n1 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0eb7a7494e8cf4c85e359854663e9140
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(...
abcc403460ad27810defc88a26c5b5ad
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\n20 50\n41 176 16 161\n103 169 113 199\n74 46 79 16\n', '8\n100 200\n500 500 301 301\n500 500 301 699\n500 500 500 500\n500 500 699 301\n500 500 499 301\n500 500 499 400\n500 500 400 500\n500 500 480 520\n', '8\n100 200\n660 973 461 774\n844 449 645 648\n770 319 770 319\n494 325 693 126\n934 913 933 71...
fb293e9371acf562c8b54801ab8022a4
__inputs__ = ['4\n2 5\n0 0 0 10\n5 5 5 6\n5 0 10 5\n14 7 10 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cd2b491c50e185c1c1316f8bdfe3c9b5
__inputs__ = ['1\n5 10\n2 4 1 35 1\n', '1\n5 10\n2 4 1 62 1\n', '1\n5 2\n0 4 1 3 1\n', '1\n5 20\n2 4 1 62 1\n', '1\n5 0\n0 4 0 7 1\n', '1\n5 0\n1 0 0 0 0\n', '1\n5 10\n2 4 1 3 1\n', '1\n5 3\n2 4 1 3 1\n', '1\n5 3\n2 4 0 3 1\n', '1\n5 3\n0 4 0 3 1\n', '1\n5 3\n0 4 1 3 1\n', '1\n5 2\n0 4 1 5 1\n', '1\n5 2\n0 4 1 7 1\n', ...
e71cec0e9f49c48a91d22a5eac4f22bf
__inputs__ = ['1\n5 10\n2 4 1 35 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e7df669f3baf84867586f6664bb5efba