test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['4\n1 2 3 4\n4\n1 2 3 1\n5\n5 1 2 3 6\n14\n8 7 1 4 3 5 4 1 6 8 10 4 6 5\n5\n1 3 5 2 3\n0\n', '4\n1 2 3 2\n4\n1 2 3 1\n5\n2 1 2 3 6\n14\n8 7 1 4 3 5 4 2 6 8 10 4 6 5\n5\n1 3 5 2 3\n0\n', '4\n1 0 3 2\n4\n1 2 3 1\n5\n2 1 2 3 6\n14\n8 7 1 4 3 5 4 2 6 8 10 4 1 5\n5\n1 3 5 2 3\n0\n', '4\n1 0 3 2\n4\n1 2 3 1\n5\...
df97b2d2abefe491637d97db99b27b73
__inputs__ = ['4\n1 2 3 4\n4\n1 2 3 1\n5\n5 1 2 3 6\n14\n8 7 1 4 3 5 4 1 6 8 10 4 6 5\n5\n1 3 5 1 3\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
19bc5e7cde8feb27ae27644b3e55fad5
__inputs__ = ['3\n1 2 3\n', '4\n4 2 4 3\n', '10\n58 58 58 58 58 58 58 58 58 58\n', '10\n86 89 89 86 86 89 86 86 89 89\n', '100\n981 288 186 186 292 876 341 288 981 360 783 907 292 186 341 292 360 876 360 360 981 398 783 288 292 398 876 981 398 907 783 360 288 981 907 186 360 288 186 981 186 288 907 876 288 907 876 360 ...
c0c4e56e0eb2bc91f7ed8facdc390018
__inputs__ = ['3\n1 2 3\n', '4\n4 2 4 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7fa725e274f967f2a425ab142d537a75
__inputs__ = ['2\n2 2 4\n0 1000000\n0 1000000\n1 0\n1000000 1\n999999 1000000\n0 999999\n5 4 9\n0 1 2 6 1000000\n0 4 8 1000000\n4 4\n2 5\n2 2\n6 3\n1000000 1\n3 8\n5 8\n8 8\n6 8\n', '1\n2 2 2\n0 1000000\n0 1000000\n1556 1000000\n0 34\n', '2\n2 2 4\n0 1000000\n0 1000000\n1 0\n1000000 1\n999999 1000000\n0 999999\n5 4 9\n...
c431a14de3a1af888f07d3a8d3ac6262
__inputs__ = ['2\n2 2 4\n0 1000000\n0 1000000\n1 0\n1000000 1\n999999 1000000\n0 999999\n5 4 9\n0 1 2 6 1000000\n0 4 8 1000000\n4 4\n2 5\n2 2\n6 3\n1000000 1\n3 8\n5 8\n8 8\n6 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__(...
ced87b23f19189bfde6795769bb72dfe
__inputs__ = ['2 1 1\n1 5\n', '4 2 1\n1 4 2 3\n', '3 1 2\n1 2 3\n', '10 4 6\n3 5 7 9 12 25 67 69 83 96\n', '19 7 12\n1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 100000 100000\n', '100 9 6\n109 711 40 95 935 48 228 253 308 726 816 534 252 8 966 363 162 508 84 83 807 506 748 178 45 30 106 108 764 6...
34165b4a6035f8b3adc075c856cedad5
__inputs__ = ['2 1 1\n1 5\n', '4 2 1\n1 4 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
80b1788b605892d7dc7ec75cf86e1a62
__inputs__ = ['10 7\n1 5 18\n3 4 8\n1 3 5\n4 7 10\n5 9 8\n6 10 5\n8 10 5\n', '4 2\n1 2 2\n3 4 2\n', '10 7\n1 5 18\n3 4 8\n1 3 5\n4 7 10\n5 9 8\n6 10 5\n5 10 5\n', '10 7\n1 5 18\n3 4 8\n1 3 5\n4 7 10\n3 9 8\n6 10 5\n5 10 5\n', '10 7\n1 5 18\n3 4 13\n1 3 5\n4 7 10\n3 9 1\n6 10 5\n5 10 5\n', '4 2\n1 2 1\n1 4 2\n', '10 7\n...
bba758ee1c932bf1933b9a42f87738f2
__inputs__ = ['4 3\n1 3 2\n2 4 3\n1 4 6\n', '10 7\n1 5 18\n3 4 8\n1 3 5\n4 7 10\n5 9 8\n6 10 5\n8 10 3\n', '4 2\n1 2 1\n3 4 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
181e8043a747182666ece333a7439a65
__inputs__ = ['3\nAH KH QH TH JH\nKH 5S 3C 5C 7D\nQH QD 2S QC 2C\n', '3\nAH KH QH TH JH\nKH 5S 3D 5C 7D\nQH QD 2S QC 2C\n', '3\nAH KH QH TH JH\nKH 5S 3C 5C 7D\nQH QD 3S QC 2C\n', '3\nAH KH QH TH JH\nKH 4S 3C 5C 8D\nQH QD 2S QC 2C\n', '3\nAH KH QH TH JH\nJH 6S 3C 5C 7D\nQH QD 4S QC 2C\n', '3\nAH KH QH TH JH\nKH 5S 3D 5C...
def5548c86a28945c0c813f5735bc0bc
__inputs__ = ['3\nAH KH QH TH JH\nKH 5S 3C 5C 7D\nQH QD 2S QC 2C\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
09e5ce9e9593fa261b7273f884ca45e6
__inputs__ = ['4\na**d\n2\nabcd\nacbd\n', '5\nlo*er\n2\nlover\nloser\n', '3\na*a\n2\naaa\naba\n', '1\n*\n1\na\n', '1\n*\n1\nz\n', '1\n*\n2\na\nz\n', '2\n**\n1\naa\n', '2\n**\n1\nfx\n', '2\n**\n2\nfx\nab\n', '2\n**\n2\nfx\naf\n', '2\na*\n2\naa\nab\n', '4\na*b*\n2\nabbc\nadbd\n', '4\na*b*\n3\nabbc\nadbd\nacbe\n', '4\na*b...
f8186ebbca39d5d3f7fed3e62af242ea
__inputs__ = ['4\na**d\n2\nabcd\nacbd\n', '5\nlo*er\n2\nlover\nloser\n', '3\na*a\n2\naaa\naba\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3023e007dfd55538dbd1894e6e811e17
__inputs__ = ['3\n3 4 4\n1 1 2 3\n2 3 2 4\n1 1 1\n1\n1\n2 2 4\n1 1 2 2\n1 2 1 2\n', '3\n6 4 4\n1 1 2 3\n2 3 2 4\n1 1 1\n1\n1\n2 2 4\n1 1 2 2\n1 2 1 2\n', '3\n6 4 4\n1 1 2 3\n2 3 2 3\n2 1 1\n1\n1\n2 2 4\n1 1 2 2\n1 2 1 2\n', '3\n6 4 4\n1 1 2 3\n2 3 1 4\n1 1 1\n1\n1\n2 2 4\n1 1 2 2\n1 2 1 2\n', '3\n6 4 4\n1 1 4 3\n2 3 2 ...
12df37bf00690cb46fc4e3e7f028c932
__inputs__ = ['3\n3 4 4\n1 1 2 3\n2 3 2 4\n1 1 1\n1\n1\n2 2 4\n1 1 2 2\n1 2 1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5a503d7ab93189fe0cf180efc8ee7729
__inputs__ = ['3 1\n14 26 22\naag\n', '3 3\n4 2 3\nwivujdxzjm\nawagljmtc\nwivujdxzjm\n', '1 4\n1\nu\nu\nu\nu\n', '12 18\n42 44 69 16 81 64 12 68 70 75 75 67\nfm\nqamklzfmrjnqgdspwfasjnplg\nqamklzfmrjnqgdspwfasjnplg\nqamklzfmrjnqgdspwfasjnplg\nl\nl\nl\nfm\nqamklzfmrjnqgdspwfasjnplg\nl\nnplgwotfm\np\nl\namklzfm\ntkpubqam...
d9a4f3023ace42556691e71ae3c14e37
__inputs__ = ['5 3\n4 2 1 10 5\napple\norange\nmango\n', '6 5\n3 5 1 6 8 1\npeach\ngrapefruit\nbanana\norange\norange\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
09818377d2af338fde4d8bebc7012e2e
__inputs__ = ['4 2\n1 3 2 4\n3 2\n2 4\n', '9 5\n9 7 2 3 1 4 6 5 8\n1 6\n4 5\n2 7\n7 2\n2 7\n', '2 1\n1 2\n1 2\n', '10 3\n4 10 5 1 6 8 9 2 3 7\n10 5\n2 10\n4 1\n', '50 10\n41 15 17 1 5 31 7 38 30 39 43 35 2 26 20 42 48 25 19 32 50 4 8 10 44 12 9 18 13 36 28 6 27 23 40 24 3 14 29 11 49 47 45 46 34 21 37 16 22 33\n13 48\n...
3f4dbcd88c1731ba11e5cb76c705ad8f
__inputs__ = ['4 2\n1 3 2 4\n3 2\n2 4\n', '9 5\n9 7 2 3 1 4 6 5 8\n1 6\n4 5\n2 7\n7 2\n2 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4ed121c25fe2e0d6bbcd15f88de10867
__inputs__ = ['7\n', '21\n', '1\n', '2\n', '3\n', '4\n', '5\n', '6\n', '8\n', '9\n', '10\n', '12\n', '188\n', '189\n', '190\n', '191\n', '192\n', '193\n', '194\n', '195\n', '196\n', '197\n', '198\n', '199\n', '200\n', '300\n', '400\n', '417\n', '521\n', '511\n', '2878\n', '2879\n', '2880\n', '2881\n', '2882\n', '2883\n...
6e3b7cbc5cf5045796346a6eb7e8985c
__inputs__ = ['7\n', '21\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0953e3d97b1260d3f75690048c63a895
__inputs__ = ['4 6\n1 2 3 4 3 2\n', '10 5\n9 4 3 8 8\n', '5 10\n2 5 2 2 3 5 3 2 1 3\n', '10 20\n6 3 9 6 1 9 1 9 8 2 7 6 9 8 4 7 1 2 4 2\n', '100 100\n28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28...
33d04c57c1c8809435a27fa290991429
__inputs__ = ['4 6\n1 2 3 4 3 2\n', '10 5\n9 4 3 8 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
090317ecfb4238f09dc8a493b3d58dec
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(...
14aecf3e7ea180620de5ce520a00c1f2
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(...
db3f042169225359d1962e494926b30c
__inputs__ = ['2\n3\n1 2 3\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n', '1\n1\n2 1 4\n', '2\n3\n1 2 0\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n', '1\n1\n2 1 5\n', '1\n1\n2 1 6\n', '2\n3\n1 2 0\n3 1 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 2\n', '2\n3\n1 2 0\n3 1 4\n2 4 3\n4 5 6\n5 6 5\n1\n1 2...
d59821c1f63a6e7b608bf3f76e50d938
__inputs__ = ['2\n3\n1 2 3\n3 2 4\n2 4 3\n4 5 6\n5 6 5\n2\n1 2 1\n1 3 2\n1 4 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
944c966af57fca15477c6a07b1f92d1f
__inputs__ = ['1\n', '2\n', '13\n', '101\n', '1023\n', '9999\n', '10000\n', '2333\n', '9139\n', '9859\n', '5987\n', '3\n', '4\n', '5\n', '7\n', '9\n', '10\n', '15\n', '51\n', '99\n', '138\n', '233\n', '666\n', '1234\n', '3567\n', '4445\n', '5689\n', '6666\n', '7777\n', '8888\n', '9411\n', '5539\n', '6259\n', '2387\n', ...
0a81bd4b836f355dfd3d276b23a0c726
__inputs__ = ['1\n', '2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
23841c7fe9b7d6b1d45eab33e789e6d3
__inputs__ = ['10 2\n6\n10\n9\n7\n1\n2\n8\n5\n4\n3\n', '100 7\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31\n32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51\n52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67...
5eff950bd0a50aa8770442e38710988b
__inputs__ = ['5 2\n1\n2\n3\n5\n4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a5bf7f78e94fcb2479980d6a0f697c9f
__inputs__ = ['5 1 2 5 3\n', '17 97 41 37 11\n', '4 1 1 1 1\n', '1000000000000000000 1000000000 1000000000 1000000000 1000000000\n', '27230 83472 9488 55320 2081\n', '44618 45855 80403 31174 63416\n', '67025 50601 5471 94645 97571\n', '89432 31159 22014 66629 31727\n', '11842 44412 71268 71316 98586\n', '38100 49158 96...
7ed1db0310a878cef37411511a19bb85
__inputs__ = ['5 1 2 5 3\n', '17 97 41 37 11\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7bbd0f43f3e81739a52d61b9a30b770f
__inputs__ = ['1\n1\n', '1\n200000\n', '1\n2\n', '1\n001\n', '1\n69861\n', '1\n70524\n', '1\n46702\n', '1\n7068\n', '1\n10491\n', '1\n8373\n', '1\n15424\n', '1\n2597\n', '1\n2781\n', '1\n1895\n', '1\n1303\n', '1\n726\n', '1\n266\n', '1\n83\n', '1\n165\n', '1\n324\n', '1\n426\n', '1\n279\n', '1\n513\n', '1\n696\n', '1\n...
5af6a25e05068ece4b7b788558b35bba
__inputs__ = ['4\n4 2 3 1\n', '7\n2 1 4 2 5 3 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e63f6a26ce8051f01ad9a6aa35597049
__inputs__ = ['5\n2\n2 3\n4\n2 2 8 8\n3\n3 3 3\n4\n5 5 5 5\n4\n1 1 1 1\n', '1\n1\n114\n', '1\n1\n190\n', '5\n2\n2 3\n4\n2 2 8 8\n3\n3 3 3\n4\n5 5 5 5\n4\n1 1 1 2\n', '5\n2\n0 3\n4\n2 0 8 1\n3\n3 3 3\n4\n5 5 5 5\n4\n1 1 1 2\n', '5\n2\n2 3\n4\n2 0 8 8\n3\n3 3 3\n4\n5 5 5 2\n4\n1 1 1 2\n', '1\n1\n75\n', '5\n2\n0 3\n4\n2 1...
297dd856ff2f4c6a1afc853d55a32574
__inputs__ = ['5\n2\n2 3\n4\n2 2 8 8\n3\n3 3 3\n4\n5 5 5 5\n4\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___")
5ae8a1b7d615a25b736a383a46fa4de1
__inputs__ = ['5\n90 94\n26 25\n64 84\n14 6\n20 96\n', '5\n90 94\n26 25\n64 84\n18 6\n20 96\n', '5\n1912 1\n5 6\n999 1\n88 2\n11 100\n', '5\n90 94\n26 25\n64 84\n22 6\n20 96\n', '5\n1912 1\n5 6\n999 1\n88 2\n6 100\n', '5\n90 113\n26 25\n64 84\n22 6\n20 96\n', '5\n27 113\n16 25\n64 84\n6 6\n20 96\n', '5\n27 113\n16 25\n...
8ce722ae7398a88ecdaf9b84fbd83370
__inputs__ = ['5\n1912 1\n5 6\n999 1\n88 2\n12 100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6dfca85ad9b0e6ffaeeb51002d09668b
__inputs__ = ['0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n', '0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 3 0...
bbbffede3b8c96c8cd81c3fc5d057d9b
__inputs__ = ['0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n', '0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 0 0 0 0 0 0 0 0\n0 0 3 0...
484daa3d81f4311bb8551bc7c1907f7d
__inputs__ = ['3\n2 5 -3\n', '2\n3 6\n', '2\n0 1\n', '3\n0 1000000000 -1000000000\n', '10\n-35 77 72 -62 76 90 58 97 -74 94\n', '20\n14 8 6 -16 5 -9 0 11 -7 10 20 -6 -17 -13 -11 7 -2 9 -19 19\n', '20\n55 -14 -28 13 -67 -23 58 2 -87 92 -80 62 -44 86 18 97 -47 63 32 94\n', '50\n29 80 0 91 93 36 83 44 79 60 53 89 18 64 37...
5d1cd3f984585ffb2f7c7e69f6247f27
__inputs__ = ['3\n2 5 -3\n', '2\n3 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
114554e51f309337a020621890978b24
__inputs__ = ['2 2 3 3\n+-+\n', '4 1 5 1\n-\n', '1 1 4 2\n-+\n', '3 1 4 4\n+--+\n', '5 1 1 6\n++---+\n', '5 2 2 6\n+--++-\n', '686653196 115381398 884618610 3\n+-+\n', '608663287 430477711 172252358 8\n-+--+-+-\n', '904132655 827386249 118827660 334\n+++-+++++--+++----+-+-+-+-+--+-+---++--++--++--+-+-+++-+++--+-+-+----...
d2194cf1fb7bcdef1f91044dcd958f5b
__inputs__ = ['2 2 3 3\n+-+\n', '4 1 5 1\n-\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
29c2c635e77a2411cd95efe6ac225ab1
__inputs__ = ['2\n3 3\n0 2 1\n3 1 2 3\n1 7\n2 4 7\n4 7\n0 1 3 0 1 0 0\n1 7\n3 9 4 5\n7 1 2 3 4 5 6 7\n1 1\n', '2\n3 3\n0 2 1\n3 1 2 3\n1 7\n2 4 7\n4 7\n0 1 2 0 1 0 0\n1 7\n3 9 4 5\n7 1 2 3 4 5 6 7\n1 1\n', '2\n3 3\n0 2 1\n3 1 2 3\n1 7\n2 4 7\n4 7\n0 1 2 0 2 0 0\n1 7\n3 9 4 5\n7 2 2 3 4 5 6 7\n1 1\n', '2\n3 3\n0 2 1\n3 ...
4c5175743ffd7870723b29fecdec5842
__inputs__ = ['2\n3 3\n0 2 1\n3 1 2 3\n1 7\n2 4 7\n4 7\n0 1 3 0 1 0 0\n1 7\n3 9 4 5\n7 1 2 3 4 5 6 7\n1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
077161f76dcc5fe4caf6d21cdf4029d4
__inputs__ = ['6\n5 2 1001\n5 2 6\n10 5 15\n20 6 210\n13 11 21\n10 9 5\n', '4\n11 5 7\n9 4 210\n8 3 21\n15 7 3\n', '1\n13 11 21\n', '1\n10 2 7\n', '1\n50 3 21\n', '2\n500 5 101\n600 6 111\n', '1\n123456 789 31\n', '4\n12 5 13\n20 10 23\n30 15 33\n40 20 43\n', '2\n777 77 11\n888 88 13\n', '1\n201 39 37\n', '3\n500 25 29...
e51074ad6df4b1dc27903271121bc84d
__inputs__ = ['6\n5 2 1001\n5 2 6\n10 5 15\n20 6 210\n13 11 21\n10 9 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6e4ee97ac7d6f19e8655e0d786f2d0d7
__inputs__ = ['3 1\n', '1 2\n', '2 2\n', '1 1\n', '1 3\n', '2 1\n', '2 3\n', '3 2\n', '3 3\n', '2 4\n', '2 0\n', '2 6\n', '3 -1\n', '2 -1\n', '1 -1\n', '4 2\n', '-1 1\n', '0 2\n', '-1 2\n', '-1 -1\n', '2 7\n', '2 -2\n', '0 -2\n', '5 1\n', '3 5\n', '-1 -2\n', '-2 2\n', '-2 0\n', '1 -2\n', '-2 -1\n', '5 -1\n', '5 5\n', '...
496caef03ea11220419f95c9af211bb3
__inputs__ = ['3 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b8dbf7b45d7f12edeed22df2f0e9a42b
__inputs__ = ['3\n5\n5000 1000 2000 3400 4300\n1 1\n99 2\n50\n5\n5000 1000 2000 3400 4300\n1 1\n99 2\n51\n10\n100 100 100 100 100 100 100 100 100 100\n50 10\n50 10\n100\n', '3\n5\n5000 1000 2000 3400 4300\n1 1\n99 2\n7\n5\n5000 1000 2000 3400 4300\n1 1\n99 2\n51\n10\n100 100 100 100 100 100 100 100 100 100\n50 10\n50 1...
a7ec60f6f74fe9c0717f6f78be2e5b11
__inputs__ = ['4\n1\n100\n50 1\n49 1\n100\n8\n100 200 100 200 100 200 100 100\n10 2\n15 3\n107\n3\n1000000000 1000000000 1000000000\n50 1\n50 1\n3000000000\n5\n200 100 100 100 100\n69 5\n31 2\n90\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8')...
0519434921595e89146fb3959a733b5d
__inputs__ = ['aaeddddadbcacbdccaeeeddecadbecbbcebdcdbcddcadcadccecccecdbabd\nadbecbbcebdcdbcddcadcadccecccecdbabdaaeddddadbcacbdccaeeeddec\n55400\n', 'abcdefgh\ncdefghab\n666\n', 'cfacacbfaeadfdbedfdccdccdddaaa\ncbfaeadfdbedfdccdccdddaaacfaca\n15215\n', 'aa\naa\n1\n', 'abc\ncba\n0\n', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...
83bc408dcb7b14539fdd817ab3c27403
__inputs__ = ['ababab\nababab\n1\n', 'ab\nab\n2\n', 'ab\nba\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
bb2df04509e3be18d4c8c8a33ec2e9c4
__inputs__ = ['2\n7 4\n3 1 2 4 5 7 6\n1 2\n4 4\n6 7\n2 3\n4 2\n2 1 3 4\n2 4\n2 3\n', '2\n7 4\n6 1 2 4 5 7 6\n1 2\n4 4\n6 7\n2 3\n4 2\n2 1 3 4\n2 4\n2 3\n', '2\n7 4\n3 1 2 4 5 7 6\n1 2\n4 4\n6 7\n2 3\n4 2\n2 1 3 6\n2 4\n2 3\n', '2\n7 4\n6 1 2 4 5 7 6\n1 2\n4 0\n6 7\n2 3\n4 2\n2 1 3 4\n2 4\n2 3\n', '2\n8 4\n6 1 2 4 5 7 6...
8ce32e3fc77e88e8759d68974df0f8ef
__inputs__ = ['2\n7 4\n3 1 2 4 5 7 6\n1 2\n4 4\n6 7\n2 3\n4 2\n2 1 3 4\n2 4\n2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9fe5d2d9eed09c65d62ea6099246194d
__inputs__ = ['30\n53 12\n13 98\n21 60\n76 58\n39 5\n62 58\n73 80\n13 75\n37 45\n44 86\n1 85\n13 33\n17 50\n12 26\n97 48\n52 40\n2 71\n95 79\n38 76\n24 54\n91 39\n97 92\n94 80\n50 61\n33 56\n22 91\n39 94\n31 56\n28 16\n20 44\n', '10\n2 3\n1 4\n5 8\n4 10\n10 8\n7 2\n1 2\n1 7\n4 10\n5 3\n', '20\n8 6\n6 3\n2 9\n7 8\n9 1\n...
032b03088a0e9da686256ef4ac760754
__inputs__ = ['2\n2 1\n3 2\n', '4\n1 1\n1 1\n1 1\n1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ac76cb44b6e4a76909ea1615ddd87da3
__inputs__ = ['4 5 1 3 4\n1 2 5\n2 3 9\n2 4 5\n1 3 8\n1 4 8\n0 0 0 0 0\n', '4 5 1 3 4\n1 2 5\n2 3 9\n2 4 5\n1 3 3\n1 4 8\n0 0 0 0 0\n', '6 5 1 3 4\n1 2 5\n4 3 5\n2 3 5\n1 3 8\n1 4 8\n0 0 0 0 0\n', '4 5 1 3 4\n1 2 5\n2 3 5\n2 4 5\n1 3 8\n2 4 8\n0 0 0 0 0\n', '4 5 1 3 4\n0 2 5\n2 3 9\n2 4 5\n1 2 3\n1 4 8\n0 0 0 0 0\n', '...
74fc17cf71c99225020197f0b61b9f0f
__inputs__ = ['4 5 1 3 4\n1 2 5\n2 3 5\n2 4 5\n1 3 8\n1 4 8\n0 0 0 0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
fdcbc72a3aee403362480a6600a71699
__inputs__ = ['6\n3 1 1 1\n100\n5 10 100 1\n01010\n5 10 1 1\n11111\n5 1 10 1\n11111\n12 2 1 10\n101110110101\n2 100 1 10\n00\n', '7\n10 3 1 1\n1000000110\n1 10 1 1000\n0\n1 1 10 2\n1\n4 4 4 1\n1001\n1 1 1 1\n1\n2 1000 500 1000\n11\n3 500 500 1\n101\n', '6\n3 1 1 1\n100\n5 10 100 1\n01000\n5 10 1 1\n11111\n5 1 10 1\n111...
5e8a621cd2f88e7f198c6e6441c043b1
__inputs__ = ['6\n3 1 1 1\n100\n5 10 100 1\n01010\n5 10 1 1\n11111\n5 1 10 1\n11111\n12 2 1 10\n101110110101\n2 100 1 10\n00\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f7401b504fdb0212f00d254eecc007f1
__inputs__ = ['6\n8 6 9 0 2 1\n', '6\n8 6 9 1 2 0\n', '6\n3 33 0 2 10 0\n', '6\n3 18 3 4 0 0\n', '6\n6 0 9 1 2 1\n', '6\n1 6 9 1 2 0\n', '6\n1 6 9 0 2 0\n', '6\n8 3 9 1 2 1\n', '6\n6 6 9 0 2 1\n', '6\n8 6 9 2 2 0\n', '6\n1 6 9 1 3 0\n', '6\n2 6 9 0 2 0\n', '6\n8 3 9 1 3 1\n', '6\n6 6 9 0 3 1\n', '6\n8 10 9 2 2 0\n', '6...
49c23add5db49754648a571dd7a3d636
__inputs__ = ['6\n8 6 9 1 2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3c25506f183ca5b1fa0fc1fcd104e965
__inputs__ = ['9\n5 2 6\n14 3 4\n20 2 1\n1 2 3\n11 19 12\n10 8 20\n6 20 3\n4 1 3\n19 8 4\n', '1\n1 3 2\n', '2\n1 2 3\n2 3 1\n', '3\n1 2 3\n1 2 3\n1 2 3\n', '4\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n', '5\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n1 2 3\n', '6\n1 2 3\n1 3 2\n2 1 3\n2 3 1\n3 1 2\n3 2 1\n', '7\n1 2 3\n1 3 2\n2 1 3\n2 3 1\n3 1 2\...
e055d9e5bbd2ace2ffa6cc03a3c124cd
__inputs__ = ['9\n5 2 6\n14 3 4\n20 2 1\n1 2 3\n11 19 12\n10 8 20\n6 20 3\n4 1 3\n19 8 4\n', '1\n1 2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8f343442e5b4dec8f5762a5b6447f51e
__inputs__ = ['3\n011\n111\n110\n', '3\n010\n101\n010\n', '3\n011\n111\n111\n', '3\n011\n110\n111\n', '6\n010111\n101001\n010100\n101000\n100000\n010000\n', '3\n010\n101\n110\n', '3\n011\n011\n110\n', '3\n011\n111\n011\n', '3\n011\n011\n011\n', '6\n010110\n101001\n010100\n101000\n100100\n010000\n', '3\n111\n111\n110\n'...
f19cc585e7dcbaf9752cb91e6e3ad8e3
__inputs__ = ['2\n01\n10\n', '6\n010110\n101001\n010100\n101000\n100000\n010000\n', '3\n011\n101\n110\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8e1490ec4d7efb4eff8bc3b900a0de2d
__inputs__ = ['3\n2\n3\n4\n', '3\n2\n3\n1\n', '3\n2\n5\n1\n', '3\n2\n2\n1\n', '3\n3\n2\n1\n', '3\n2\n3\n6\n', '3\n4\n3\n1\n', '3\n4\n3\n6\n', '3\n1\n15\n1\n', '3\n4\n3\n7\n', '3\n1\n25\n1\n', '3\n4\n2\n14\n', '3\n1\n42\n1\n', '3\n4\n2\n21\n', '3\n1\n73\n1\n', '3\n2\n2\n4\n', '3\n5\n2\n1\n', '3\n4\n5\n1\n', '3\n4\n3\n5\...
77648096ca87104039653a3d3bdbe2a2
__inputs__ = ['3\n2\n3\n4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
02a5fc310d8d07f562aba9e3f9744f46
__inputs__ = ['8\n3 3 4 4 5 8 7 14\n', '5\n1 2 3 4 9\n', '8\n4 3 4 4 5 8 7 14\n', '5\n1 4 3 4 9\n', '8\n0 3 4 4 5 8 7 14\n', '5\n1 1 3 4 9\n', '8\n0 1 4 4 5 8 7 14\n', '5\n1 0 3 4 9\n', '8\n0 2 4 4 5 8 7 14\n', '5\n1 0 3 4 12\n', '8\n0 2 4 4 5 0 7 14\n', '5\n0 0 3 4 12\n', '8\n0 1 4 4 5 0 7 14\n', '5\n1 0 3 3 12\n', '8...
92f6032754b15994647d07fd19ff2353
__inputs__ = ['8\n3 3 4 4 5 8 7 9\n', '5\n1 2 3 4 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d9183c07bc09810d49814adce603f4af
__inputs__ = ['0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n11 1\n11 2\n11 3\n100001 100\n-1 -1\n', '0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n10 1\n11 1\n11 2\n11 3\n100001 100\n-1 -1\n', '0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n19 6\n11 1\n11 2\n11 3\n100000 100\n-1 -1\n', '0 55\n0 1\n...
bbaa364e6a101be656c8f26650bd1e89
__inputs__ = ['0 55\n0 1\n0 2\n0 3\n10 1\n10 2\n10 3\n10 4\n10 5\n10 6\n11 1\n11 2\n11 3\n100000 100\n-1 -1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
dd9b52a52ba5df14ec53f98abc77587b
__inputs__ = ['3\n4 100\n13 2 1 16\n15 24 3 3\n5 17 9 8\n9 6 11 32\n4 40\n13 2 1 16\n15 24 3 3\n5 17 9 8\n9 6 11 32\n3 1\n3 4 2\n5 7 9\n2 1 1\n', '2\n3 100\n1 2 3\n4 5 6\n7 8 9\n4 10\n10 10 10 10\n10 10 10 10\n10 10 10 10\n10 10 10 10\n', '1\n5 1000\n50 40 30 20 10\n9 8 7 6 5\n4 3 2 1 0\n99 88 77 66 55\n44 33 22 11 123...
f6cbf4b423034ee29f0c7523195f5b36
__inputs__ = ['3\n4 100\n13 2 1 16\n15 24 3 3\n5 17 9 8\n9 6 11 32\n4 40\n13 2 1 16\n15 24 3 3\n5 17 9 8\n9 6 11 32\n3 1\n3 4 2\n5 7 9\n2 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b0a31c963c0d8f2c97b1bc5bdfb6c2e7
__inputs__ = ['2\n2\n1\n', '1\n1000000000\n', '1\n0000000000\n', '2\n2\n2\n', '1\n0010000000\n', '2\n2\n4\n', '1\n0001000000\n', '2\n4\n4\n', '1\n0001000001\n', '2\n4\n1\n', '1\n0001000011\n', '2\n3\n1\n', '1\n0001001011\n', '2\n3\n2\n', '1\n0001011011\n', '2\n3\n0\n', '1\n0001011111\n', '2\n4\n0\n', '1\n0001111111\n',...
489a1baf8449dc99795df4566032b359
__inputs__ = ['2\n2\n1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
998494522bf3c864600972edbd59058a
__inputs__ = ['2 0\n', '4 2\n3 2\n1 4\n', '3 3\n1 2\n3 1\n2 3\n', '10 10\n1 5\n1 8\n1 9\n5 8\n8 9\n4 7\n2 3\n3 10\n2 6\n2 10\n', '100000 0\n', '3 1\n2 3\n', '2 1\n1 2\n', '6 9\n1 2\n1 4\n1 5\n2 3\n2 5\n2 6\n3 5\n4 6\n5 6\n', '1 0\n', '15 10\n2 3\n5 4\n5 6\n5 7\n3 8\n3 10\n11 12\n12 13\n13 14\n14 15\n', '5 10\n1 2\n2 3\...
45862da91a1172f84c4a486691df73ab
__inputs__ = ['6 11\n1 3\n1 4\n1 5\n1 6\n2 3\n2 4\n2 5\n2 6\n3 4\n3 5\n3 6\n', '3 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
591ae3903c83613802bb9719cec63900
__inputs__ = ['20\n1\n1 10\n', '20\n1\n0 7\n', '20\n1\n2 10\n', '20\n1\n3 7\n', '20\n1\n0 19\n', '20\n1\n0 12\n', '20\n1\n2 7\n', '20\n1\n4 10\n', '20\n1\n0 28\n', '20\n0\n0 12\n', '20\n1\n0 3\n', '20\n1\n4 6\n', '20\n1\n1 15\n', '20\n1\n-1 12\n', '20\n1\n6 7\n', '20\n1\n1 19\n', '20\n1\n1 12\n', '20\n1\n1 16\n', '20\n...
32b9778e41165c0771e8aa5f0d8282f7
__inputs__ = ['20\n1\n0 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2b68095c808b73fec4764ce969c8f7d1
__inputs__ = ['5 34\n28 32 91 6 70\n', '8 15\n13 3 5 5 6 14 5 5\n', '10 67\n58 39 56 7 51 47 20 26 24 54\n', '9 436\n1 2 4 8 16 32 64 128 256\n', '9 442\n1 2 4 8 16 32 64 128 256\n', '10 58\n20 25 11 37 4 48 20 54 2 26\n', '10 58\n57 2 18 35 3 35 38 7 38 3\n', '10 34\n1 28 14 4 11 24 4 11 7 28\n', '10 10\n7 4 6 2 9 6 8...
e6dd1efa30a117b4ea1be412a3d8002b
__inputs__ = ['6 18\n5 6 1 10 12 2\n', '3 50\n25 25 50\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
64aee529621a2aa01dcb6ac7a73f7e2f
__inputs__ = ['6\n1 1 1\n3 6 0\n0 0 0\n0 1 1\n10 1 10\n4 4 1\n', '4\n4 5 3\n6 9 0\n2 4 6\n6 6 3\n', '3\n5 5 5\n9 1 12\n7 3 2\n', '3\n3 2 0\n8 9 1\n5 6 7\n', '5\n10 10 10\n20 20 20\n25 25 25\n30 30 30\n35 35 35\n', '2\n80 90 100\n150 200 300\n', '3\n500 400 600\n600 500 700\n700 600 800\n', '3\n1000 1500 2000\n1500 2000...
78b91be64b4a147c567c954d4e73987b
__inputs__ = ['6\n1 1 1\n3 6 0\n0 0 0\n0 1 1\n10 1 10\n4 4 1\n', '1\n10 1 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8a193f1592449d1fdddb6b3365329080
__inputs__ = ['10\n1 1 0 0 0 0 1 1 1 0\n', '10\n1 1 0 0 0 0 1 1 1 1\n', '10\n1 1 0 0 0 0 1 2 1 1\n', '10\n1 1 0 0 -1 0 1 2 1 1\n', '10\n1 1 0 0 -1 1 1 2 1 1\n', '10\n1 1 0 0 -1 2 1 2 1 2\n', '10\n-1 1 1 1 1 -1 -21 1 1 15\n', '10\n1 1 0 0 -1 1 1 2 1 2\n', '10\n1 1 0 0 -1 2 1 4 1 2\n', '10\n0 1 0 0 -1 2 1 4 1 2\n', '10\n...
a4e213618365540d11b435db2b49abc3
__inputs__ = ['10\n1 1 0 0 1 0 1 1 1 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2f59c07f098d40956f0134ede2c5078b
__inputs__ = ['5 7\n+ 5\n- 10\n- 20\n+ 40\n- 20\n', '5 17\n- 16\n- 2\n- 98\n+ 100\n- 98\n', '6 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n+ 1000000000\n', '5 12\n- 12\n+ 7\n- 6\n- 1\n+ 46\n', '11 1000\n- 100\n+ 100\n+ 100\n+ 100\n+ 100\n- 100\n- 100\n- 100\n- 100\n- 100\n- 100\n',...
fc9e7363abd7bb30aa518d5ba95be111
__inputs__ = ['5 7\n+ 5\n- 10\n- 20\n+ 40\n- 20\n', '5 17\n- 16\n- 2\n- 98\n+ 100\n- 98\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
276e5df2b3adad81ad87a505bcaf5457
__inputs__ = ['2 4\n0 2\n', '1 0\n0\n', '2 4\n0 4\n', '4 1000000000\n0 1100 1000000 1000000000\n', '4 1000000000\n0 1100 1000000 1010000000\n', '9 10\n0 3 5 7 100 110 200 272 311\n', '4 1000010000\n0 1000 1000000 1000000000\n', '4 1000000000\n0 1100 1100000 1010000000\n', '9 10\n0 3 5 7 000 110 200 272 311\n', '4 10000...
de2947c2dc830ced340cd6998f49adab
__inputs__ = ['9 10\n0 3 5 7 100 110 200 300 311\n', '2 4\n0 3\n', '1 1\n0\n', '2 4\n0 5\n', '4 1000000000\n0 1000 1000000 1000000000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ea72877c3b7856c0c718c713fff3018a
__inputs__ = ['10\n22\n0\n', '10\n34\n0\n', '10\n28\n0\n', '10\n31\n0\n', '10\n3\n0\n', '10\n0\n0\n', '10\n48\n0\n', '10\n106\n0\n', '10\n140\n0\n', '10\n160\n0\n', '10\n114\n0\n', '10\n378\n0\n', '10\n220\n0\n', '10\n150\n0\n', '10\n336\n0\n', '10\n560\n0\n', '10\n478\n0\n', '10\n216\n0\n', '10\n824\n0\n', '10\n810\n0...
94d4d65d748965a7beb41e3e17be48cc
__inputs__ = ['10\n11\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8b858456b15fb853ddcffecd11421214
__inputs__ = ['11 18\naaaagaaxaxa\naiaiiaaaaiaaiaaaaa\n', '12 17\nqqqqqqgqqgqq\nqqqgqqqggqqqlqqqq\n', '6 9\nvvvkvv\nvgkkvvvgg\n', '153 205\nssasssszzessssseazzssssassaskasassesssseszzazzaassassslsasasszszeaeeaaszassaszseaaasasezaezeaskzkakzksasssssgsszszzsasazssssasezzseesssssszzezsasaeaassak\nkzstnaszaasasaksaszssssse...
c92a0a0ed8884b4e8998a88b8906a03c
__inputs__ = ['7 7\nuiibwws\nqhtkxcn\n', '4 5\nabba\nbabab\n', '8 10\nbbbbabab\nbbbabaaaaa\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
ef35a5ed2c13bab994a6d3da3d3a1d3b
__inputs__ = ['3\n28800 76029\n28800 57600\n57600 28800\n', '10\n43196 57600\n4800 9600\n6000 1200\n600 600\n300 600\n5400 600\n6000 5760\n6760 2880\n6000 12000\n9000 600\n', '3\n28800 46734\n43482 57600\n54999 28800\n', '10\n43196 21072\n8364 9600\n6000 1200\n600 600\n300 600\n5400 153\n6000 5760\n6760 2880\n6000 9712...
cde65855f233a1c6df5b036fc80956f4
__inputs__ = ['3\n28800 57600\n28800 57600\n57600 28800\n', '10\n28800 57600\n4800 9600\n6000 1200\n600 600\n300 600\n5400 600\n6000 5760\n6760 2880\n6000 12000\n9000 600\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() p...
130c97c23a5d1d1ebaff1996693fc4fa