test
stringlengths
184
51.6M
hash
stringlengths
32
32
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(...
66a2e7c1efad5b64ffa0df242d56599e
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(...
8183e6a5f2b0dd819b980ac731efae5c
__inputs__ = ['2230\n', '-10\n', '-100003\n', '544883178\n', '-847251738\n', '423654797\n', '-623563697\n', '645894116\n', '-384381709\n', '437587210\n', '-297534606\n', '891773002\n', '-56712976\n', '963662765\n', '-272656295\n', '383441522\n', '-477665112\n', '791725034\n', '-812168727\n', '528894922\n', '-479977172\...
490f1ce9d2782fbee8256a0ebe4d00e0
__inputs__ = ['2230\n', '-10\n', '-100003\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d8c416d32369bbccf811778390d2f7f9
__inputs__ = ['10 5\n', '-10 5\n', '20 -10\n', '-10 -1000000000\n', '-1000000000 -1000000000\n', '1000000000 1000000000\n', '-123131 3123141\n', '-23423 -243242423\n', '123112 4560954\n', '1321 -23131\n', '1000000000 999999999\n', '54543 432423\n', '1 1\n', '-1 -1\n', '-1 1\n', '1 -1\n', '42 -2\n', '2 -435\n', '76 -76\...
4a977bce36cee80a0f4d7595101f9095
__inputs__ = ['10 5\n', '-10 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
26f5e915378f6ff6aafdca948699c564
__inputs__ = ['5\n1 5 4 2 3\n', '1\n1\n', '6\n300000000 200000000 300000000 200000000 1000000000 300000000\n', '7\n3 5 2 2 5 2 4\n', '10\n1 2 3 4 5 6 7 8 9 10\n', '5\n1 5 4 2 0\n', '1\n2\n', '10\n1 4 3 4 5 6 7 8 9 10\n', '5\n1 1 1 0 1\n', '5\n1 5 4 1 0\n', '7\n10 1 1 0 5 5 4\n', '5\n1 1 0 0 1\n', '10\n1 4 1 4 5 6 1 8 1...
d8002a4a89c288c02d106189251241fb
__inputs__ = ['7\n10 1 1 1 5 5 3\n', '5\n1 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___")
113cf91bc1118571fffeaa76f4bfd3f3
__inputs__ = ['2 6\n10\n99\n', '2 0\n1\n9\n', '19 7\n1000\n9999\n', '9 4\n33\n52\n', '10 8\n18\n59\n', '43 3\n587\n850\n', '65 3\n3436\n3632\n', '850 8\n55735\n94089\n', '590 6\n428671\n715453\n', '1053 8\n1539368\n3362621\n', '477 9\n3062053\n6465858\n', '1901 9\n1941695\n3314270\n', '29 0\n1649127\n6241670\n', '566 3...
36310a3c2825e4524dd570e843f75ec6
__inputs__ = ['2 6\n10\n99\n', '2 0\n1\n9\n', '19 7\n1000\n9999\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e954e01549ff701727c3d12bad1803ed
__inputs__ = ['4\n4\n2 10 1 20\n2\n3 6\n5\n2 3 4 99 100\n1\n42\n', '1\n1\n100\n', '10\n5\n3 4 1 5 2\n2\n2 1\n4\n4 1 3 2\n5\n2 3 1 5 4\n2\n1 2\n4\n1 2 3 4\n2\n1 2\n4\n3 4 2 1\n3\n3 2 1\n1\n1\n', '1\n2\n1 31\n', '10\n1\n1\n1\n1\n1\n1\n4\n2 1 4 3\n3\n1 3 2\n1\n1\n3\n1 2 3\n5\n1 4 2 5 3\n5\n4 5 2 3 1\n4\n4 2 3 1\n', '1\n3\...
019ecdd73962372614e2c138c80df4ab
__inputs__ = ['4\n4\n2 10 1 20\n2\n3 6\n5\n2 3 4 99 100\n1\n42\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d8f345431356bd7ca49b55c8bf05d5d4
__inputs__ = ['2 5\nabxab\nabyba\n', '1 1\ny\n', '5 1\nu\nw\ne\ne\nt\n', '2 2\nba\nbb\n', '2 5\nbaxba\nabyba\n', '5 1\nu\nw\ne\ne\ns\n', '2 5\nbaxba\nacyba\n', '2 2\nab\nbb\n', '0 5\nbaxba\nabyba\n', '2 5\nabxab\nacyba\n', '1 5\nbaxba\nabyba\n', '2 5\nabxba\nacyba\n', '0 5\naaxbb\nabyba\n', '1 5\nabxba\nacyba\n', '0 5\...
f4baf1ec0aa4bd1ba53b021e354e4aea
__inputs__ = ['2 5\nabxba\nabyba\n', '5 1\nt\nw\ne\ne\nt\n', '2 2\naa\nbb\n', '1 1\nz\n', '3 4\naabb\naabb\naacc\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
654dea20589093c5f56b1c7a592d28bf
__inputs__ = ['2\n1\n2\n', '2\n1\n3\n', '2\n2\n3\n', '2\n2\n5\n', '2\n2\n2\n', '2\n2\n1\n', '2\n4\n5\n', '2\n4\n1\n', '2\n4\n8\n', '2\n4\n2\n', '2\n4\n6\n', '2\n8\n2\n', '2\n2\n6\n', '2\n15\n2\n', '2\n1\n5\n', '2\n15\n1\n', '2\n11\n1\n', '2\n21\n1\n', '2\n30\n1\n', '2\n30\n2\n', '2\n1\n4\n', '2\n1\n1\n', '2\n2\n4\n', '...
e152e461a1d4456f75df4ac25b6ae246
__inputs__ = ['2\n1\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ef378615c639d8660313fcdf991ab1b3
__inputs__ = ['11\n', '0\n', '17\n', '18855321\n', '34609610\n', '25\n', '9\n', '40000000\n', '17464436\n', '38450759\n', '395938\n', '39099999\n', '8\n', '4\n', '30426905\n', '7\n', '17082858\n', '46341\n', '46340\n', '39999996\n', '6\n', '12823666\n', '39999999\n', '5\n', '5626785\n', '22578061\n', '3766137\n', '13\n...
c498c93bc9781c5c147c51f2fdc1d311
__inputs__ = ['2\n', '3\n', '1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4852360fcb13e44415a89de0248e2c18
__inputs__ = ['4\n1 1 2\n1 1 1\n1 1 1\n1 1 1\n', '3\n2 1\n1 1\n3 3\n', '10\n190587 2038070 142162180 88207341 215145790 38 2 5 20\n32047998 21426 4177178 52 734621629 2596 102224223 5 1864\n49 481241221 1518272 51 772 146 8805349 3243297 449\n918151 126080576 5186563 46354 6646 491776 5750138 2897 161\n3656 7551068 291...
12b804dc77c7f40d1653d33563525b4b
__inputs__ = ['4\n1 1 1\n1 1 1\n1 1 1\n1 1 1\n', '3\n2 1\n1 4\n3 3\n', '10\n190587 2038070 142162180 88207341 215145790 38 2 5 20\n32047998 21426 4177178 52 734621629 2596 102224223 5 1864\n41 481241221 1518272 51 772 146 8805349 3243297 449\n918151 126080576 5186563 46354 6646 491776 5750138 2897 161\n3656 7551068 291...
470d860bf63e49e4063e8cae450dbaa1
__inputs__ = ['14\n04/21 09:00 I 000\n04/21 09:00 I 001\n04/21 09:15 I 002\n04/21 09:30 O 001\n04/21 09:45 O 000\n04/21 10:00 O 002\n04/28 09:00 I 003\n04/28 09:15 I 000\n04/28 09:30 I 004\n04/28 09:45 O 004\n04/28 10:00 O 000\n04/28 10:15 O 003\n04/29 20:00 I 002\n04/29 21:30 O 002\n20\n06/01 09:00 I 001\n06/01 09:15 ...
367dd2be943d93a68c080396329a7fcc
__inputs__ = ['14\n04/21 09:00 I 000\n04/21 09:00 I 001\n04/21 09:15 I 002\n04/21 09:30 O 001\n04/21 09:45 O 000\n04/21 10:00 O 002\n04/28 09:00 I 003\n04/28 09:15 I 000\n04/28 09:30 I 004\n04/28 09:45 O 004\n04/28 10:00 O 000\n04/28 10:15 O 003\n04/29 20:00 I 002\n04/29 21:30 O 002\n20\n06/01 09:00 I 001\n06/01 09:15 ...
67626f9001be9cc88d0b744b0cdea926
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(...
4a07db859bf857c5755ac111d119f0f2
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(...
044fed643a34b671c74debfb402276dc
__inputs__ = ['100000000\n', '101\n', '10100\n', '1111010010000101100100001110011101111\n', '11110010110000101001001101010111110101101111001000100100101111011\n', '0\n', '10000\n', '1000010011100010111000001101000011001010011101011001101100000001011011000000101101101011101111011011\n', '1000\n', '1\n', '1110001001\n', ...
55601951138f7661dc017354d2a241d2
__inputs__ = ['100000000\n', '101\n', '10100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ab72bdd4a0b53fa56d81c1ac3b985cf0
__inputs__ = ['2\n1 10\n100 10000\n', '3\n1 4\n4 9\n9 16\n', '2\n1 100\n1 10000\n', '2\n1 1000000000\n1 10000000000\n', '2\n1 25\n25 100\n', '1\n81 81\n', '3\n81 100\n1 16\n16 4\n', '1\n1000 10000\n', '1\n10000 100000\n', '1\n16 16\n', '1\n81 100\n', '1\n1 9\n', '2\n1 16\n4 81\n', '3\n1 4\n16 256\n81 6561\n', '1\n16 25...
4242fbe51e35ee83cd9b79bfa4ea7436
__inputs__ = ['2\n1 10\n100 10000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7bcc0a9c5b5c0949e2ed174f5e6bf339
__inputs__ = ['3\n4980\n7980\n6980\n', '4\n4320\n4320\n4320\n4320\n', '2\n100\n100\n', '10\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n10000\n', '5\n958\n5068\n2200\n8118\n4030\n', '6\n798\n3972\n7548\n2966\n4556\n1280\n', '7\n7132\n5170\n808\n8052\n806\n3680\n3820\n', '8\n3468\n1436\n912\n5896\n226...
c3002dfa6ef6436d2d47b830153a60b0
__inputs__ = ['3\n4980\n7980\n6980\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
411b188bebfb5088ce40a2788a06175c
__inputs__ = ['5\n4 2 5 1 3\n', '4\n4 3 2 1\n', '6\n1 2 3 4 5 6\n', '8\n5 7 4 2 6 8 1 3\n', '1\n1\n', '6\n1 2 3 4 5 9\n', '5\n3 2 5 1 3\n', '6\n1 2 3 0 9 9\n', '8\n5 14 4 2 6 8 1 3\n', '8\n5 7 4 2 6 8 1 0\n', '6\n1 2 3 3 5 9\n', '6\n1 2 3 6 5 9\n', '6\n1 2 3 6 9 9\n', '6\n1 4 3 4 5 6\n', '5\n4 2 5 1 4\n', '1\n0\n', '6\...
23397cff54b34164027947bd7faf2038
__inputs__ = ['5\n4 2 5 1 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
348241919d3f486594074af48f8573a0
__inputs__ = ['7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n3\n0?1\n4\n?????\n3\n012\n', '7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n3\n0?1\n4\n?????\n3\n13\n', '7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n3\n0?1\n4\n?????\n3\n0\n', '7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n2\n0?1\n4\n?????\n3\n13\n', '7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\...
dbeaba81592277ea4ea44188cc44a779
__inputs__ = ['7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n3\n0?1\n4\n?????\n3\n012\n', '7\n1\n?\n2\n?0\n10\n79259?087\n2\n??\n3\n0?1\n4\n?????\n3\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
83de39c526f45a1a6db2ed119ae6fc86
__inputs__ = ['1 3 7 19\n2 3\n2 5\n4 4 4\n', '4 3 2 1\n1 3\n798\n1 2 3\n', '100 100 8 100\n3 5\n7 94 12\n100 1 47 0 42\n', '3 103 945 1000\n7 9\n34 35 34 35 34 35 34\n0 0 0 0 0 0 0 0 0\n', '7 11 597 948\n4 1\n5 1 0 11\n7\n', '7 32 109 645\n1 3\n0\n0 0 0\n', '680 871 347 800\n10 100\n872 156 571 136 703 201 832 213 15 3...
9f9eee4cd4ac66815fc7eecfb25522d3
__inputs__ = ['1 3 7 19\n2 3\n2 5\n4 4 4\n', '4 3 2 1\n1 3\n798\n1 2 3\n', '100 100 8 100\n3 5\n7 94 12\n100 1 47 0 42\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8085d1a9fdca8d3ac3b07dcce3920872
__inputs__ = ['3 2\n1 2 10\n2 3 5\n', '3 3\n1 2 10\n2 3 15\n3 1 10\n', '4 2\n1 2 12\n3 4 8\n', '3 4\n2 3 1\n2 3 2\n2 3 4\n2 3 8\n', '1 0\n', '12 20\n1 3 1000000000\n3 2 1000000000\n1 4 1000000000\n4 2 1000000000\n1 5 1000000000\n5 2 1000000000\n1 6 1000000000\n6 2 1000000000\n1 7 1000000000\n7 2 1000000000\n1 8 1000000...
a2bac776ad70c7c3ff4daaa7a18a4da2
__inputs__ = ['3 2\n1 2 10\n2 3 5\n', '3 3\n1 2 10\n2 3 15\n3 1 10\n', '4 2\n1 2 12\n3 4 8\n', '3 4\n2 3 1\n2 3 2\n2 3 4\n2 3 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
28dd75c9d7c1440ddb38a44ddd9a8419
__inputs__ = ['4 6\n7\n2\n3\n5\n', '4 6\n4\n1\n3\n5\n', '1 6\n4\n2\n3\n1\n', '4 10\n7\n1\n3\n5\n', '4 11\n5\n2\n3\n5\n', '4 5\n4\n2\n3\n1\n', '1 6\n3\n2\n3\n1\n', '1 6\n2\n2\n3\n1\n', '4 9\n7\n2\n3\n5\n', '1 6\n1\n0\n1\n1\n', '4 11\n5\n2\n1\n5\n', '1 5\n4\n2\n1\n0\n', '1 13\n2\n2\n3\n2\n', '4 13\n3\n1\n3\n5\n', '1 17\n...
48e38e2f64a02d4cd33325828432e38c
__inputs__ = ['4 6\n4\n2\n3\n5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d556802d1b2763ebffcd5e5895521ab8
__inputs__ = ['5\n2 1 6\n0 4 1\n2 -1 3\n1 -2 1\n4 -1 1\n', '8\n0 0 1\n0 0 2\n0 0 3\n0 0 4\n0 0 5\n0 0 6\n0 0 7\n0 0 8\n', '4\n1000000 -1000000 2\n1000000 -1000000 3\n-1000000 1000000 2\n-1000000 1000000 1000000\n', '15\n-848 0 848\n-758 0 758\n-442 0 442\n-372 0 372\n-358 0 358\n-355 0 355\n-325 0 325\n-216 0 216\n-74 ...
16a9fadf18c7b8090c1b0930ab13fbcf
__inputs__ = ['5\n2 1 6\n0 4 1\n2 -1 3\n1 -2 1\n4 -1 1\n', '8\n0 0 1\n0 0 2\n0 0 3\n0 0 4\n0 0 5\n0 0 6\n0 0 7\n0 0 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cc1ff99d2be20f3ca814d501f6259491
__inputs__ = ['180\n3\n60 120 180\n3\n30 90\n61 1\n180 180\n', '100\n1\n100000\n4\n0 100\n90 100\n100 100\n101 100\n', '100\n5\n48 141 231 314 425\n7\n0 19\n50 98\n143 30\n231 55\n342 0\n365 100\n600 10\n', '100\n5\n48 141 231 554 425\n7\n0 19\n50 98\n143 30\n231 55\n342 0\n365 100\n600 10\n', '180\n3\n60 120 180\n3\n3...
5b8cecce8fd09fb81bda34e80e9eb03e
__inputs__ = ['180\n3\n60 120 180\n3\n30 90\n61 1\n180 180\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f54d8c20aec27d6043b497f4d64afefc
__inputs__ = ['5 3\n1 2 10\n2 3 1\n2 4 1\n', '3 0\n', '4 3\n1 2 1\n2 3 1\n3 1 1\n', '20 28\n1 5 6\n1 12 7\n1 13 4\n1 15 7\n1 20 3\n2 4 1\n2 15 6\n3 5 3\n3 8 10\n3 13 8\n3 20 6\n4 6 10\n4 12 8\n4 19 5\n5 17 8\n6 9 9\n6 16 2\n6 19 9\n7 14 6\n8 9 3\n8 16 10\n9 11 7\n9 17 8\n11 13 8\n11 17 17\n11 19 1\n15 20 2\n17 20 1\n',...
c7e18d6fadbccd34fc77b43e280bab6e
__inputs__ = ['5 3\n1 2 10\n2 3 1\n2 4 1\n', '3 0\n', '4 3\n1 2 1\n2 3 1\n3 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c923d78b614fc5f56c2d546b97b6fbd5
__inputs__ = ['10 3\n.b..bz....\n1 h\n3 c\n9 f\n', '4 4\n.cc.\n2 .\n3 .\n2 a\n1 a\n', '3 3\n...\n1 .\n2 a\n3 b\n', '5 1\n.....\n5 z\n', '1 5\n.\n1 .\n1 w\n1 w\n1 .\n1 .\n', '2 7\nab\n1 w\n2 w\n1 c\n2 .\n2 .\n1 .\n2 b\n', '5 1\n..-..\n5 z\n', '10 3\n....zb..b.\n1 h\n3 c\n9 f\n', '4 4\n.cc.\n2 .\n3 .\n2 a\n1 b\n', '3 3\n...
efc9bac3a3539c585a91edc902445fa5
__inputs__ = ['10 3\n.b..bz....\n1 h\n3 c\n9 f\n', '4 4\n.cc.\n2 .\n3 .\n2 a\n1 a\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cd6504a04a8783a3fd84a508749e3cac
__inputs__ = ['xaxxxxa\n', 'aaabaa\n', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n', 'ababababababababababababababababababababababababav\n', 'abababababababababababababababababababababababava\n', 'abababababababababababababababababababababababavv\n', 'a\n', 'ap\n', 'dya\n', 'qyax\n', 'ahaos\n', 'caidsucitzpbl...
0df67cc8b8e584fd8560ab5a266c55f5
__inputs__ = ['xaxxxxa\n', 'aaabaa\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d8db1df196f061f586f733f6c284eb0d
__inputs__ = ['1\n', '5\n', '2\n', '3\n', '4\n', '6\n', '7\n', '9\n', '10\n', '8\n', '001\n', '010\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3b93c07a562a1c6e98b473faa17da93a
__inputs__ = ['1\n', '5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ff4a04e2748c788d5b5e472b328f70af
__inputs__ = ['8\n2 3 5 7 11 13 17 19\n4 8 7 1 5 2 6 3\n', '1\n2\n2\n', '1\n1000000000\n100000\n', '1\n1\n1\n', '6\n1 2 4 8 16 32\n32 16 8 4 2 1\n', '2\n1000000000 999999999\n100000 100000\n', '39\n692835 4849845 22610 1995 19019 114 6270 15 85085 27170 1365 1155 7410 238 3135 546 373065 715 110 969 15 10374 2730 19019...
fc16a47e0a7993ed13aaaff40dd85871
__inputs__ = ['5\n10 20 30 40 50\n1 1 1 1 1\n', '8\n4264 4921 6321 6984 2316 8432 6120 1026\n4264 4921 6321 6984 2316 8432 6120 1026\n', '3\n100 99 9900\n1 1 1\n', '7\n15015 10010 6006 4290 2730 2310 1\n1 1 1 1 1 1 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encod...
7889832491dc4bf26fcc25d8c203e820
__inputs__ = ['91697 91697\n', '2 1\n', '1 99998\n', '13771 94814\n', '100000 99999\n', '2 5\n', '100000 1\n', '3 6\n', '99999 99999\n', '99998 1\n', '1 2\n', '24538 86821\n', '1 99999\n', '68869 1\n', '1 3\n', '52702 64157\n', '99999 1\n', '1 88588\n', '99411 90913\n', '2 2\n', '1 100000\n', '100000 100000\n', '86821 ...
06492803295022722b3d8a40be25d2ef
__inputs__ = ['2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e6ce10d5b266c7263b00755e07d5f31b
__inputs__ = ['5\n1 10\n5 3\n10 3\n25 2\n50 2\n4\n120\n500\n100\n168\n7\n1 10\n3 10\n5 10\n10 10\n25 10\n10 10\n100 10\n3\n452\n574\n787\n0\n', '5\n2 10\n5 3\n10 3\n25 2\n50 2\n4\n120\n500\n100\n168\n7\n1 10\n3 10\n5 10\n10 10\n25 10\n10 10\n100 10\n3\n452\n574\n787\n0\n', '5\n2 10\n5 3\n5 3\n25 2\n50 2\n4\n120\n500\n1...
a3906d04231d734335301f0875f746ef
__inputs__ = ['5\n1 10\n5 3\n10 3\n25 2\n50 2\n4\n120\n500\n100\n168\n7\n1 10\n3 10\n5 10\n10 10\n25 10\n50 10\n100 10\n3\n452\n574\n787\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
93701ebe528ff75314e418e9e9b0a82d
__inputs__ = ['14\n44444447777000\n', '2\n33\n', '10\n4747777744\n', '50\n44747747774474747747747447777447774747447477444474\n', '2\n77\n', '4\n4004\n', '14\n77770004444444\n', '26\n44747744444774744774474447\n', '6\n004444\n', '50\n74444444444444444444444444444444444444444444444444\n', '50\n444444444444444444444444444...
1642d73382c78ed9c880348eb5481745
__inputs__ = ['4\n4738\n', '2\n47\n', '4\n4774\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3daa34d582369a3d127d94c58a703ef6
__inputs__ = ['1_wat\n2\n2_wat\nwat_1\n', '000\n3\n00\nooA\noOo\n', '_i_\n3\n__i_\n_1_\nI\n', 'La0\n3\n2a0\nLa1\n1a0\n', 'abc\n1\naBc\n', '0Lil\n2\nLIL0\n0Ril\n', 'iloO\n3\niIl0\noIl0\nIooO\n', 'L1il0o1L1\n5\niLLoLL\noOI1Io10il\nIoLLoO\nO01ilOoI\nI10l0o\n', 'ELioO1lOoOIOiLoooi1iolul1O\n7\nOoEIuOIl1ui1010uiooOoi0Oio001L...
78af823b67a751aaa06274a08e2ae448
__inputs__ = ['1_wat\n2\n2_wat\nwat_1\n', '000\n3\n00\nooA\noOo\n', '_i_\n3\n__i_\n_1_\nI\n', 'La0\n3\n2a0\nLa1\n1a0\n', 'abc\n1\naBc\n', '0Lil\n2\nLIL0\n0Ril\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SEN...
0464bd9e54c6aa58e95b3833af1c8690
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(...
12659f7fe6b53328e6689ca57cfe86a2
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(...
48bc5443bd354e648ba64b77f758038d
__inputs__ = ['1\n2\n0\n', '2\n2 3\n1 0\n', '3\n2 4 4\n0 1 3\n', '1\n16\n15\n', '16\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16\n0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\n', '16\n5 6 9 13 13 15 9 10 2 6 10 11 12 7 4 8\n4 3 3 5 8 3 6 5 1 4 2 6 7 4 0 1\n', '8\n15 3 7 11 14 10 16 2\n0 2 1 4 0 0 13 1\n', '1\n7\n5\n', '9\n6 12 3 1...
226c5fe38eeada638fe0a253d634f7c7
__inputs__ = ['1\n2\n0\n', '2\n2 3\n1 0\n', '1\n2\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2df16e33cb441751aeb01963e882792b
__inputs__ = ['5 3 2 3\n', '5 3 100 1\n', '10000 10000 1 1\n', '1 1 10000 10000\n', '300 300 21 23\n', '300 2 37 51\n', '2 400 23 57\n', '1 1 1 1\n', '10000 10000 3 2\n', '1 2 1 2\n', '1 1 2 2\n', '1 1 10 10\n', '5324 5439 32 13\n', '9000 1 2432 1\n', '230 1234 9124 23\n', '11 1 1 1\n', '6246 8489 1227 9\n', '9 20 5 7\...
d980736792b5838eef8a9e1480d41484
__inputs__ = ['5 3 2 3\n', '5 3 100 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
839914c39b65a3c38ccf659edaa0571f
__inputs__ = ['8 4\n7\n7 8 1\n-7 3 2\n0 2 1\n0 -2 2\n-3 -3 1\n0 6 2\n5 3 1\n', '10 8\n4\n0 0 9\n0 0 10\n1 0 1\n1 0 2\n', '1 0\n1\n1 1 0\n', '3 0\n5\n3 0 0\n0 3 0\n-3 0 0\n0 -3 0\n3 0 1\n', '5 3\n1\n500 500 10\n', '9 0\n5\n8 1 0\n8 2 0\n8 3 0\n-8 3 0\n-8 2 0\n', '10 2\n11\n1 1 0\n2 2 3\n3 3 0\n4 4 0\n5 5 0\n6 6 0\n7 7 4...
bc43485ea693101120c950689bf46fe8
__inputs__ = ['8 4\n7\n7 8 1\n-7 3 2\n0 2 1\n0 -2 2\n-3 -3 1\n0 6 2\n5 3 1\n', '10 8\n4\n0 0 9\n0 0 10\n1 0 1\n1 0 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
09b768b98fffae9a8cd7ec4b1fcd386b
__inputs__ = ['10 2\n4 7\n', '10 1\n19\n', '40 10\n1 2 3 4 5 6 7 10 10 10\n', '10 1\n100\n', '1 2\n10 9\n', '10 2\n7 3\n', '510 132\n50 76 77 69 94 30 47 65 14 62 18 121 26 35 49 17 105 93 47 16 78 3 7 74 7 37 30 36 30 83 71 113 7 58 86 10 65 57 34 102 55 44 43 47 106 44 115 75 109 70 47 45 16 57 62 55 20 88 74 40 45 8...
cc2a3c276a168d6f846f8dfd44d5818d
__inputs__ = ['4 3\n2 2 2\n', '4 3\n2 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b7a73e19a1d2a1e9a368238ab27154bb
__inputs__ = ['4\n0 0 0 0 2\n', '3\n0 1 1 1\n', '10\n0 0 1 0 2 3 5 8 13 21 34\n', '2\n0 3 2\n', '10\n0 0 1 0 2 3 5 8 13 23 34\n', '10\n0 0 1 0 3 3 5 8 13 23 34\n', '2\n-1 3 2\n', '10\n0 0 1 1 3 3 5 8 13 23 34\n', '2\n-2 3 2\n', '4\n0 1 0 1 2\n', '10\n0 0 1 1 3 3 4 8 13 23 34\n', '4\n0 1 0 1 3\n', '10\n0 -1 1 1 3 3 4 8 ...
45b7040fe1308cd5eed20ea0b7ed463a
__inputs__ = ['4\n0 0 1 0 2\n', '3\n0 1 1 2\n', '10\n0 0 1 1 2 3 5 8 13 21 34\n', '2\n0 3 1\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___")
cda81558067e057f0aec1ecb62d46d4e
__inputs__ = ['5 82\n22 11 6 7 13\n', '10 100000\n13715 50001 50002 50003 50004 50005 50006 50007 50008 50009\n', '2 19\n3 11\n', '5 134\n22 11 6 7 13\n', '10 100000\n13715 50001 50002 50003 50004 50005 50006 50532 50008 50009\n', '10 000000\n13715 50001 50002 50003 50004 50005 50006 50532 50008 50009\n', '10 100000\n1...
2d41aeecde4c057e87e622a3637e48c3
__inputs__ = ['5 82\n22 11 6 5 13\n', '10 100000\n50000 50001 50002 50003 50004 50005 50006 50007 50008 50009\n', '2 19\n3 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
96b767217fde7584091df499da1f15c7
__inputs__ = ['3\nA sample input\n9\nforward word\ndelete char\nforward word\ndelete char\nforward word\ndelete char\nbackward word\nbackward word\nforward word\nHallow, Word.\n7\nforward char\ndelete word\ninsert "ello, "\nforward word\nbackward char\nbackward char\ninsert "l"\n\n3\nforward vord\nbackward word\ndelete...
11fbce05a8504b3b603bda4c98c7913e
__inputs__ = ['3\nA sample input\n9\nforward word\ndelete char\nforward word\ndelete char\nforward word\ndelete char\nbackward word\nbackward word\nforward word\nHallow, Word.\n7\nforward char\ndelete word\ninsert "ello, "\nforward word\nbackward char\nbackward char\ninsert "l"\n\n3\nforward word\nbackward word\ndelete...
ca20666906ecf595b27d73c66c0219b2
__inputs__ = ['qbdp\n', 'dbqp\n', 'bdqp\n', 'bqpp\n', 'pdqb\n', 'dqbp\n', 'pqbd\n', 'pqdb\n', 'bqqp\n', 'pdpb\n', 'pbqd\n', 'dqpb\n', 'bqpq\n', 'pbpd\n', 'dppb\n', 'qpqb\n', 'dpbp\n', 'bpdp\n', 'bqdp\n', 'pqqb\n', 'dpbq\n', 'dpqb\n', 'dbpp\n', 'bdpp\n', 'bpqp\n', 'bppd\n', 'qqqb\n', 'pbqq\n', 'dqbq\n', 'bpqd\n', 'dbpq\...
64060193a87486b1d20553e91ccc8c24
__inputs__ = ['ppqb\n', 'pdbq\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
754f074a2edc75cf0de85724eb9a1aa9
__inputs__ = ['5 11\n', '6 16\n', '14 28\n', '5 29\n', '10 24\n', '1 30\n', '14969 66991573\n', '1 1000000000\n', '100000 1\n', '10 46\n', '11 35\n', '12 45\n', '15 34\n', '31859 629091638\n', '15666 689919612\n', '90681 254480989\n', '69018 523197828\n', '1352 434805201\n', '73439 384841883\n', '42482 352232377\n', '5...
2c06bb6d79123ec7695bb22f0ada702b
__inputs__ = ['5 11\n', '6 16\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d73a2ebfc822810c0fff39e450c94d1e
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(...
1ac03f453cb3433a5c3e38c42bf413a6
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(...
32b85aeb07dd97de0bd2911c9ef4b95d
__inputs__ = ['82\n', '691\n', '61043\n', '99925\n', '12\n', '42\n', '54904\n', '2197\n', '1300\n', '57500\n', '87440\n', '94962\n', '52402\n', '1\n', '47504\n', '49948\n', '67828\n', '38\n', '74977\n', '17813\n', '88122\n', '19\n', '31353\n', '388\n', '35\n', '97469\n', '69942\n', '77461\n', '1662\n', '1000\n', '89915...
954953f0e621fa5fa5fa1c1fe68e82b8
__inputs__ = ['2\n', '3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7f7cc51d93bffe0815dcde33f8214905
__inputs__ = ['1\n7 7 7\n7 7 8\n12 1\n10 1 2\n0\n', '1\n7 7 7\n7 7 8\n10 1\n10 1 1\n0\n', '1\n7 7 7\n7 7 8\n2 1\n10 2 1\n0\n', '1\n7 9 7\n7 7 8\n2 1\n10 2 1\n0\n', '1\n7 9 7\n1 9 8\n2 1\n10 2 1\n0\n', '1\n7 4 7\n1 9 8\n2 1\n10 2 1\n0\n', '1\n7 4 2\n1 9 8\n2 1\n10 2 1\n0\n', '1\n7 3 2\n1 9 8\n2 1\n10 2 1\n0\n', '1\n7 3 ...
5ada7bdd96133441942f9f7554c7104a
__inputs__ = ['1\n7 7 7\n7 7 8\n12 1\n10 1 1\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
72551892faa44016f4d829548cb565ed
__inputs__ = ['4\n4 1 3 2 3 2 1 3\n', '3\n5 8 5 5 7 5\n', '1\n553296794 23577639\n', '2\n100000001 95312501 97600001 1\n', '2\n1 499999999 705032704 1000000000\n', '2\n81475384 79354071 83089784 94987161\n', '2\n229872385 40870434 490042790 160550871\n', '2\n186213023 151398020 526707498 169652181\n', '2\n95988141 5325...
aafae3962432140c02d9228d7a695701
__inputs__ = ['4\n4 1 3 2 3 2 1 3\n', '3\n5 8 5 5 7 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
46927cf2af8ab5d8dd8adbd62762ff22
__inputs__ = ['6 3\n2 1\n2 3\n4 1\n4 2\n6 1\n2 6\n3 6\n6 5\n', '6 3\n2 1\n2 3\n4 1\n4 2\n6 1\n2 6\n3 6\n4 5\n', '6 3\n3 1\n4 3\n4 1\n4 2\n6 1\n4 6\n3 6\n4 5\n', '6 3\n2 1\n2 3\n4 1\n4 2\n6 1\n2 6\n3 6\n1 5\n', '6 3\n2 1\n2 3\n4 1\n4 2\n6 1\n2 6\n3 6\n3 5\n', '6 3\n3 1\n4 3\n4 1\n4 2\n6 2\n4 6\n3 6\n4 5\n', '6 3\n3 1\n4...
beee0b635348033db904a23b6619b9b5
__inputs__ = ['6 3\n2 1\n2 3\n4 1\n4 2\n6 1\n2 6\n4 6\n6 5\n', '3 1\n1 2\n1 3\n2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
68aa4f5c99e9d121c9434ef392ac3282
__inputs__ = ['5\n3 10 8 6 11\n4\n1\n10\n3\n11\n', '5\n868 987 714 168 123\n10\n424\n192\n795\n873\n117\n914\n735\n158\n631\n471\n', '3\n435 482 309\n7\n245\n241\n909\n745\n980\n29\n521\n', '1\n653\n9\n903\n980\n80\n770\n965\n874\n381\n657\n969\n', '12\n35345 58181 32223 84621 35905 73863 99537 30666 67771 39229 36847 ...
b631a849cec165950c70656d3d923e9d
__inputs__ = ['5\n3 10 8 6 11\n4\n1\n10\n3\n11\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c26c290bce101eaa417201178574a478
__inputs__ = ['-13 3\n', '1 -33\n', '13 3\n', '36 80\n', '50 -24\n', '-76 39\n', '-96 -16\n', '91 0\n', '0 15\n', '0 0\n', '100 100\n', '10 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5f28f1e187148fde9e253928eb9d31a3
__inputs__ = ['-13 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
00184fb6512821672e1da2a06f3b7a41
__inputs__ = ['20 15 2 3\n', '10 11 2 4\n', '2 1 1 1\n', '10 2 9 7\n', '530897800469409942 582203276934671957 137373076313041391 377446491430894140\n', '1000000000000000000 1 1 1000000000000000000\n', '48295947839584738 12 49503958 47108947578469711\n', '100 20 98 2\n', '1000000000000000000 1000000000000000000 10000000...
6a26850685cc639e2e396fecf796196c
__inputs__ = ['20 15 2 3\n', '10 11 2 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cb66991ef1d80749c60e0ae33db803fb
__inputs__ = ['7\n0 0\n0 2\n0 3\n0 2\n0 4\n1 3\n1 10\n', '7\n0 0\n0 2\n1 3\n0 2\n0 4\n1 3\n1 10\n', '7\n0 0\n1 2\n1 3\n0 2\n0 4\n1 3\n1 10\n', '7\n0 0\n1 2\n1 0\n0 1\n0 4\n1 3\n1 10\n', '7\n0 1\n0 2\n0 3\n0 0\n0 4\n1 3\n1 10\n', '7\n0 0\n1 2\n1 3\n0 0\n0 4\n1 3\n1 10\n', '7\n0 2\n0 2\n0 3\n0 0\n0 4\n1 3\n1 10\n', '7\n0...
6331fd08c39f686fa19f691ca2d800fb
__inputs__ = ['7\n0 1\n0 2\n0 3\n0 2\n0 4\n1 3\n1 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9922a2a38cd5f3dbc17d2d11bd4ab04d