test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['xyz\nabc\n', 'atcoderbeginnercontest\natcoderregularcontest\n', 'atcoderbeeinnercontgst\natcoderregularcontest\n', 'xyz\nacc\n', 'atcoderbeeinnercontgst\natcoaerreguldrcontest\n', 'xyz\nadc\n', 'atcoderbfeinnercontgst\natcoaerreguldrcontest\n', 'xyy\nadc\n', 'atcoderbfeinnercontgst\natcoaerreguldrcnntest...
f2838ce7c311f782d3cea3b5771d9d70
__inputs__ = ['xyz\nabc\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b20d977f318a0a37df6cb5d2ed1cbe72
__inputs__ = ['4\n5 2 2 1\n', '8\n4 5 2 2 1 3 5 5\n', '1\n4\n', '4\n4 4 4 4\n', '2\n3166 2658\n', '19\n26 26 26 26 26 26 26 26 26 26 26 63 63 68 68 68 81 81 81\n', '29\n4763 4743 4742 4752 4739 4740 4753 4738 4744 4741 4746 4737 4757 4764 4750 4745 4755 4761 4749 4759 4747 4736 4756 4751 4758 4754 4762 4760 4748\n', '4...
2deb84a9072c00d1949b0364dc196e29
__inputs__ = ['4\n5 2 2 1\n', '8\n4 5 2 2 1 3 5 5\n', '1\n4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
e83146580fdbd244bc1f20d7e6fa742d
__inputs__ = ['5\n3\n1 2 3\n1\n2\n2\n7 7\n10\n384836991 191890310 576823355 782177068 404011431 818008580 954291757 278929746 155374934 840594328\n8\n6 69 696 69696 696969 6969696 69696969 696969696\n', '5\n3\n1 4 3\n1\n2\n2\n4 7\n10\n384836991 191890310 576823355 782177068 404011431 818008580 954291757 278929746 15537...
c6d3d7d9af28dc44f68ce91acc9af0cc
__inputs__ = ['5\n3\n1 2 3\n1\n2\n2\n7 7\n10\n384836991 191890310 576823355 782177068 404011431 818008580 954291757 160449218 155374934 840594328\n8\n6 69 696 69696 696969 6969696 69696969 696969696\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf...
57a9aad9850bb07cdd47ffe8cb1f5b5a
__inputs__ = ['3\n80 0 30\n50 5 25\n90 27 50\n3\n80 0 30\n70 5 25\n71 30 84\n0\n', '3\n80 0 15\n64 5 25\n149 27 50\n3\n80 0 10\n70 10 25\n22 30 84\n0\n', '3\n80 0 30\n50 5 25\n90 27 50\n3\n80 0 30\n70 5 25\n71 23 50\n0\n', '3\n1 0 30\n50 5 25\n90 28 50\n3\n80 0 40\n70 5 25\n71 30 84\n0\n', '3\n80 0 15\n64 3 49\n149 27 ...
ed245cbb3575c07fc23faeda63d43bd1
__inputs__ = ['3\n80 0 30\n50 5 25\n90 27 50\n3\n80 0 30\n70 5 25\n71 30 50\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b7222379cb1dbed13d3c3a577228feb2
__inputs__ = ['7 3\n0\n1\n2\n2\n0\n0\n10\n', '4 3\n1\n2\n1\n2\n', '4 3\n1\n2\n1\n3\n', '3 3\n0\n1\n2\n2\n0\n0\n10\n', '4 2\n1\n2\n1\n0\n', '4 2\n1\n3\n1\n0\n', '4 2\n1\n3\n2\n0\n', '4 2\n0\n3\n2\n0\n', '3 2\n0\n6\n2\n0\n', '2 3\n0\n0\n3\n-1\n', '3 3\n0\n0\n1\n-2\n', '3 3\n1\n0\n1\n-2\n', '1 3\n1\n0\n1\n1\n', '1 5\n0\n0...
b0a6eb4deeeeb9b962c9364c04bce946
__inputs__ = ['7 3\n0\n1\n2\n2\n0\n0\n10\n', '4 3\n1\n2\n1\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
500ee0de14000f28de65927ad8ca6e58
__inputs__ = ['1 1\n1\n', '2 2\n1\n2\n', '3 5\n1\n4\n20\n50\n300\n', '4 5\n2\n4\n30\n100\n1000\n', '5 6\n1\n2\n3\n4\n5\n6\n', '6 6\n10\n20\n30\n40\n50\n60\n', '990 1\n990\n', '7 10\n100\n200\n300\n400\n500\n600\n700\n800\n900\n1000\n', '8 10\n50\n150\n250\n350\n450\n550\n650\n750\n850\n950\n', '1 1\n1000\n', '3 5\n1\n7...
3186d35c93be0df8ebfbb877d26c0bb7
__inputs__ = ['1 1\n1\n', '2 2\n1\n2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c1306c923cd6a70745343a2e7aa60ed5
__inputs__ = ['1 0 1\n2 1 2\n1 0 1\n', '2 2 2\n2 1 2\n2 2 2\n', '0 8 8\n0 8 8\n0 8 8\n', '1 8 6\n2 9 7\n0 7 7\n', '1 0 1\n4 1 2\n1 0 1\n', '1 8 6\n2 9 7\n1 7 7\n', '0 8 8\n0 8 8\n0 0 8\n', '2 2 2\n2 1 0\n2 2 2\n', '1 0 1\n4 1 2\n0 0 1\n', '1 8 6\n4 9 7\n1 7 7\n', '0 8 2\n0 8 8\n0 0 8\n', '2 2 2\n2 1 -1\n2 2 2\n', '1 0 ...
b0eaf1a6a2ac9c13dd1350ad82cc9849
__inputs__ = ['1 0 1\n2 1 2\n1 0 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
efccb3e94145baef56dc6d1b6ed5af63
__inputs__ = ['4\n1 G\n5 R\n10 B\n15 G\n', '4\n1 G\n2 R\n3 B\n10 G\n', '4\n1 G\n123123 R\n987987987 B\n1000000000 G\n', '1\n3 R\n', '4\n1 G\n123123 R\n987987987 B\n1000000100 G\n', '1\n2 R\n', '4\n2 G\n123123 R\n987987987 B\n1000000000 G\n', '4\n1 G\n2 R\n3 B\n14 G\n', '4\n1 G\n3 R\n10 B\n15 G\n', '4\n1 G\n123123 R\n17...
c054c9ae966a0ad9072b97b15b1b389b
__inputs__ = ['4\n1 G\n5 R\n10 B\n15 G\n', '4\n1 G\n2 R\n3 B\n10 G\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cd4b69810fb3f7c071676d9efa11eda4
__inputs__ = ['2\n0 10000\n1 0\n', '1\n2 9999\n', '1\n10 1\n', '100\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 0\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0 1\n0...
092d895b47a21a34d354a61ede9381e9
__inputs__ = ['2\n1 0\n2 0\n', '3\n1 0\n2 0\n0 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
42a6efa44faeffea047a5b28ff076b9d
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(...
a31cb12e50b18951bd48d75a04a1f420
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(...
cebd63f7d1ca58d862590aeee4b462bb
__inputs__ = ['5 5 2\n1 2 100\n2 3 100\n3 4 100\n4 5 20\n2 5 5\n5 50\n4 1\n', '2 1 5\n1 2 4\n2 3\n2 5\n2 4\n2 4\n2 5\n', '3 3 6\n1 2 499999999\n2 3 500000000\n1 3 999999999\n2 499999999\n2 500000000\n2 499999999\n3 999999999\n3 1000000000\n3 1000000000\n', '2 1 1\n1 2 1\n2 1000000000\n', '5 4 3\n1 2 999999999\n2 3 1000...
7c2d143d25bfb0b014adfaad89903640
__inputs__ = ['5 5 3\n1 2 1\n2 3 2\n1 3 3\n3 4 4\n1 5 5\n3 5\n4 5\n5 5\n', '2 2 3\n1 2 2\n2 1 3\n2 1\n2 2\n2 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a6d96f3539f79caa102451735979d9bc
__inputs__ = ['13\n1 1 1 2 2 2 3 3 3 4 4 4 5\n', '5\n10 100 20 200 1\n', '1\n100000\n', '7\n3 2 1 1 4 5 1\n', '6\n1 1 1 2 2 2\n', '10\n30518 96518 74071 59971 50121 4862 43967 73607 19138 90754\n', '10\n4131 4373 75721 60904 4027 25878 13621 3245 60722 8295\n', '10\n30518 30518 30518 30518 30518 30518 30518 30518 30518...
c4881965679ecba3eec470312f740ea8
__inputs__ = ['13\n1 1 1 2 2 2 3 3 3 4 4 4 5\n', '5\n10 100 20 200 1\n', '1\n100000\n', '7\n3 2 1 1 4 5 1\n', '6\n1 1 1 2 2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
60dc7cc216ce699ed2ef7687a1a2b076
__inputs__ = ['3\n. abcdefghijklmnopqrstuvwxy\n? a\n? z\n', '3\n. abcdefghijklmnopqrstuvwxy\n! z\n? z\n', '1\n? q\n', '4\n! abcd\n! cdef\n? d\n? c\n', '15\n. r\n? e\n. s\n. rw\n? y\n. fj\n. zftyd\n? r\n! wq\n? w\n? p\n. ours\n. dto\n. lbyfru\n? q\n', '5\n! abc\n. ad\n. b\n! cd\n? c\n', '8\n! hello\n! codeforces\n? c\n....
29ebb64bdb040a3f25b648a99a6f786d
__inputs__ = ['5\n! abc\n. ad\n. b\n! cd\n? c\n', '8\n! hello\n! codeforces\n? c\n. o\n? d\n? h\n. l\n? e\n', '7\n! ababahalamaha\n? a\n? b\n? a\n? b\n? a\n? h\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SE...
c9d6be71ff8f1894b234a8c59033797f
__inputs__ = ['11 3\n', '11 6\n', '20 20\n', '14 5\n', '1000000 100\n', '1 1\n', '2 1\n', '100 4\n', '502333439 2047\n', '773014587697599 31\n', '946338791423 262143\n', '1000000000 4\n', '13 2\n', '1073741821 2\n', '1000000000 100\n', '1000000000 1000000000\n', '766540997167959122 63301807306884502\n', '76736724464100...
ccde0e8666210539df49c07337258f70
__inputs__ = ['11 3\n', '11 6\n', '20 20\n', '14 5\n', '1000000 100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
262b3fe0f390d8947c5ba3612275d6d7
__inputs__ = ['7\n', '8\n', '9\n', '1\n', '286\n', '48\n', '941\n', '45154\n', '60324\n', '91840\n', '41909\n', '58288\n', '91641\n', '62258\n', '79811\n', '88740\n', '12351\n', '1960\n', '29239\n', '85801\n', '43255\n', '13439\n', '35668\n', '19122\n', '60169\n', '50588\n', '2467\n', '39315\n', '29950\n', '17286\n', '...
7043b112f3b0208f421ae57fca0be548
__inputs__ = ['7\n', '8\n', '9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9df1c372b95bdb93b3d613672b1b1c7b
__inputs__ = ['aca\naccc\nca\n', 'abcb\naacb\nbccc\n', 'abcb\naabb\nbccc\n', 'caa\naccc\nca\n', 'aaca\naabb\ncccc\n', 'abcb\nbbaa\nbccc\n', 'aacb\nbbaa\nbccc\n', 'aacb\nbbaa\ncccb\n', 'aaca\nbbaa\ncccb\n', 'aaca\naabb\ncccb\n', 'acaa\naabb\ncccc\n', 'acaa\nabab\ncccc\n', 'acaa\nabab\nbccc\n', 'acaa\nabab\nbcdc\n', 'aca...
2aeb487e91d195c1a2388d33151f1262
__inputs__ = ['aca\naccc\nca\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b08ab8786ea813fe20d2bb26061d62a3
__inputs__ = ['4\n3\n', '10\n10\n', '10\n17\n', '4\n4\n', '10\n15\n', '4\n7\n', '10\n11\n', '4\n2\n', '10\n14\n', '4\n0\n', '10\n24\n', '4\n-1\n', '10\n9\n', '4\n-2\n', '10\n4\n', '4\n-4\n', '10\n1\n', '4\n-5\n', '10\n2\n', '4\n-3\n', '4\n1\n', '10\n-1\n', '4\n6\n', '10\n-2\n', '4\n11\n', '10\n-3\n', '10\n6\n', '4\n5\n...
36899e7621f09bf5cba7b7b975c9cabd
__inputs__ = ['4\n3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9bc686c4f823247f0ec7ec6ce6655717
__inputs__ = ['4 4 2 1 4\n1 2 2 1\n2 3 2 1\n3 4 5 1\n2 4 4 2\n3 1\n3 6\n10 5 3\n\n10\n2 0 1 1 2\n1\n\n1\n4 5 2 4 1\n4 3 10 1\n3 2 2 1\n3 4 1 2\n3 2 5 2\n2 1 10 1\n3 3\n20 30\n3 2 1\n5 10\n3 2 1\n5 5 2 1 5\n1 2 10 2\n1 3 20 2\n2 4 20 1\n3 4 10 1\n4 5 20 1\n2 2\n20\n4 1\n20\n3 1\n0 0 0 0 0\n', '4 4 2 1 4\n1 2 2 1\n2 3 2 ...
adecfea25a217a5bc810af26e357d909
__inputs__ = ['4 4 2 1 4\n1 2 2 1\n2 3 2 1\n3 4 5 1\n2 4 4 2\n3 1\n3 6\n10 5 3\n\n10\n2 0 1 1 2\n1\n\n1\n4 5 2 4 1\n4 3 10 1\n3 2 2 1\n3 2 1 2\n3 2 5 2\n2 1 10 1\n3 3\n20 30\n3 2 1\n5 10\n3 2 1\n5 5 2 1 5\n1 2 10 2\n1 3 20 2\n2 4 20 1\n3 4 10 1\n4 5 20 1\n2 2\n20\n4 1\n20\n3 1\n0 0 0 0 0\n'] for __inp__ in __inputs__: ...
f1d6d3a450de54ef77371e899e27b3e5
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(...
8464d9a2906c4656f6192dbcb51651f9
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(...
3b29bbfe38c24069eb1eed9c5163a460
__inputs__ = ['3 2\n1 2\n1 3\n2 3\n', '3 3\n1 3\n1 3\n1 3\n', '3 1\n1 2\n2 3\n3 4\n', '1 1\n45 70\n', '1 1\n-35 -8\n', '1 1\n-79 -51\n', '2 2\n26 99\n-56 40\n', '9 6\n-44 -29\n-11 85\n11 84\n-63 1\n75 89\n-37 61\n14 73\n78 88\n-22 -18\n', '2 2\n-93 -22\n12 72\n', '9 6\n-44 -29\n-11 85\n11 84\n-63 1\n75 167\n-37 61\n14 ...
902db3664df2bed780a51ac9cb0cd638
__inputs__ = ['3 2\n1 2\n1 3\n2 3\n', '3 3\n1 3\n1 3\n1 3\n', '3 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___")
1b5e62c10ee6feb9dc2e0fe5d3cd4cfb
__inputs__ = ['1 1000000000 1 1000000000 1000\n', '4 7 1 1000000000 395\n', '1 1000000000 1 1000000000 470\n', '6 8 6 8 1\n', '369 852 741 963 2\n', '1 1000 1 1000 14\n', '1 10 1 10 3\n', '8548 8554575 895 9954448 47\n', '1 1000000000 1 1000000000 47\n', '47 95 18 147 4\n', '1 10000 1 10000 2\n', '1 1000000000 1 100000...
cfbbdfffbc706221cd72e7955e826014
__inputs__ = ['5 6 8 10 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d68463dfb7cbdf0df7d5e23fe83f0109
__inputs__ = ['3 1\n2 2\n5 3\n0 0\n', '3 1\n2 2\n9 3\n0 0\n', '3 1\n0 2\n9 3\n0 0\n', '3 0\n0 2\n9 3\n0 0\n', '3 0\n0 2\n15 3\n0 0\n', '3 0\n-1 2\n15 3\n0 0\n', '3 0\n-1 2\n0 3\n0 0\n', '3 2\n2 2\n5 6\n0 0\n', '3 1\n2 3\n9 3\n0 0\n', '3 0\n0 2\n9 5\n0 0\n', '4 0\n0 2\n15 3\n0 0\n', '3 0\n-1 2\n0 1\n0 0\n', '3 2\n2 3\n5...
af02763e5bb2ef5f1b330d2ca129389c
__inputs__ = ['3 2\n2 2\n5 3\n0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d71e57e30ee8bd194de4447da93d6086
__inputs__ = ['abcba\nsx\nabcddcba\nrstrd\n', 'abcca\nsw\nabcddcba\nrstrd\n', 'abcca\nxt\nadcbdcba\nrdsrt\n', 'abcba\nsw\nabcddcba\nrstrd\n', 'accba\nsw\nabcddcba\nrstrd\n', 'accba\nsx\nabcddcba\nrstrd\n', 'accba\ntx\nabcddcba\nrstrd\n', 'accba\ntx\nabcddcba\nrsdrt\n', 'accca\ntx\nabcddcba\nrsdrt\n', 'accca\ntx\nabcddc...
36938c4df4135a0f3b29eb5876494884
__inputs__ = ['abcba\nsx\nabcddcba\nrttrd\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
026fe1b1a17573c7ef80c1b50b781944
__inputs__ = ['1\n', '2\n', '10\n', '1000\n', '2000\n', '5000\n', '10000\n', '111199\n', '101232812\n', '1000000000\n', '3\n', '4\n', '5\n', '6\n', '7\n', '8\n', '9\n', '11\n', '12\n', '13\n', '55\n', '100\n', '150\n', '1200\n', '9999999\n', '100000000\n', '500000000\n', '600000000\n', '709000900\n', '999999999\n', '20...
e9239eb3a351a96784fa95437c24d6ee
__inputs__ = ['1\n', '2\n', '10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0f4a9b1495ccb82e692bc665b579a2f7
__inputs__ = ['\\/_/\\_/\\\\_\\\\\\__///\\\\/_/\\\\\\\\/\\/_\\///\\\\\n', ']\\//\n', '\\/_/\\_/\\\\_/\\\\__///\\\\/_/\\\\\\\\/\\/_\\/\\/\\\\\n', '\\/_/\\_/\\\\_/\\\\__///\\\\/_/\\[\\\\0\\/_\\/\\/\\\\\n', '-/\\]\n', '\\/_/\\_/\\\\_/\\\\__///\\\\/_0\\[\\\\0\\/_\\/\\/\\\\\n', '\\/_/\\_/\\\\_/\\\\__///\\\\/_0/[\\\\0\\/_\\/...
96f23d26191cf2dde42939ebbcf77166
__inputs__ = ['\\\\///\\_/\\/\\\\\\\\/_/\\\\///__\\\\\\_\\\\/_\\/_/\\\n', '\\\\//\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
662c6429f44800cafb6a9aed9343f594
__inputs__ = ['5 3\n11010\n00101\n11000\n', '30 2\n010101010101010010101010101010\n110110110110110011011011011011\n', '30 10\n001000000011000111000010010000\n000001100001010000000000000100\n000110100010100000000000101000\n110000010000000001000000000000\n100001000000000010010101000101\n001001000000000100000000110000\n00...
0a05ef7f3ece23f384ebd9d94588da41
__inputs__ = ['5 3\n11010\n00101\n11000\n', '30 2\n010101010101010010101010101010\n110110110110110011011011011011\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5d535d9f7a62b0e1da86fc78d86111fb
__inputs__ = ['3\ncbaa\ndaacc\nacacac\n', '3\na\naa\nb\n', '3\ncaaa\ndaacc\nacacac\n', '3\ncaaa\nd`acc\nacacac\n', '3\naaca\nbdb`c\nacacac\n', '3\na\naa\na\n', '3\ncaca\ncca`d\nacacac\n', '3\nacba\nda`cb\nacacbc\n', '3\n_a_b\nc_bcb\nabcada\n', '3\naad_\nbdb_c\nababcd\n', '3\nba`c\nbcb`c\nabdbcb\n', '3\nbcac\ncc`be\naca...
5bf6e25d03c0e96f0bd96daa6ddd9535
__inputs__ = ['3\ncbaa\ndaacc\nacacac\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5245ae263c22d21eeef745e436e008f0
__inputs__ = ['1\n1 0 1 1\n10000 10000 10000 10000\n', '2\n10 3 1 2\n2 4 1 3\n1 2 1 1\n', '2\n10 3 1 2\n2 4 1 3\n1 3 1 1\n', '2\n10 3 1 2\n3 4 1 3\n1 3 1 1\n', '2\n10 3 2 2\n3 4 1 3\n1 3 1 1\n', '1\n1 0 1 1\n10000 10010 10000 10000\n', '1\n1 0 1 1\n10000 10010 10000 10100\n', '1\n1 0 1 1\n10000 10010 10000 10101\n', '1...
c9119881dcc676284bcf7036728d32e0
__inputs__ = ['1\n1 1 1 1\n10000 10000 10000 10000\n', '2\n10 3 1 2\n2 4 1 3\n2 2 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a3c0fe79a603ab08dd77401b2c99f25e
__inputs__ = ['3 1\n1 2 1\n', '3 1\n2 2 1\n', '6 3\n5 20 12 7 14 101\n', '6 3\n346 118 330 1403 5244 480\n', '7 4\n11 3532 99 3512 12 8 22\n', '9 4\n2 6 8 1 2 4 2 8 2\n', '8 2\n1 3 22 45 21 132 78 901\n', '1 1\n912959\n', '1 1\n107540\n', '2 2\n67427 727097\n', '2 2\n346010 923112\n', '2 2\n125572 610583\n', '3 3\n1983...
a3c87018a89e3e7f14fcf0945d8d8193
__inputs__ = ['3 1\n1 2 1\n', '3 1\n2 2 1\n', '6 3\n5 20 12 7 14 101\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f8eb449c36bd92c62c5c3f8d4d8ed08f
__inputs__ = ['3\n2 3 5\n', '4\n1 5 77 2\n', '5\n3 3842 288 199 334\n', '7\n1 2 3 40 52 33 86\n', '7\n1 10 100 1000 10000 1000000 10000000\n', '6\n3835302 971984 8706888 1080445 2224695 1093317\n', '40\n8995197 7520501 942559 8012058 3749344 3471059 9817796 3187774 4735591 6477783 7024598 3155420 6039802 2879311 273867...
7c0359a1b73bb99fda32945145917fa5
__inputs__ = ['3\n2 3 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5168bede246614984aec70dcfad5803b
__inputs__ = ['10\n-3441 37\n227 62\n-6761 20\n7239 82\n1163 95\n-4736 97\n3645 41\n-2333 61\n4556 47\n-417 6\n1\n-3355 -98\n', '3\n1 1\n3 1\n-4 2\n1\n-4 -3\n', '1\n467 335\n10\n-169 -478\n-962 -705\n281 961\n995 -827\n-391 -902\n292 -421\n-718 447\n-771 -869\n-667 35\n-703 322\n', '4\n2 1\n5 1\n-6 1\n10 2\n3\n-6 0\n-6...
96efc41b0ba165324dbe6f4240c2fd1a
__inputs__ = ['3\n3 2\n7 1\n11 2\n4\n2 1\n6 0\n6 4\n11 2\n', '3\n2 1\n5 2\n10 1\n5\n0 1\n1 3\n3 0\n4 0\n4 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0f0b0935a4b8a3906582895de1d77967
__inputs__ = ['redocta\n', 'azcdefghijklmnopqrstuvwbyx\n', 'cba\n', 'redoctb\n', 'bca\n', 'bac\n', 'abd\n', 'atcodes\n', 'abcdefghijklmnopqrytuvwzsx\n', 'btcoder\n', 'bad\n', 'acb\n', 'cab\n', 'dba\n', 'atcored\n', 'qedoctb\n', 'ascored\n', 'btcodeq\n', 'ascorfd\n', 'btcedoq\n', 'atcorfd\n', 'qodectb\n', 'btcorfd\n', '...
fde2513db0e6cc80ca5a8ad5ff342c44
__inputs__ = ['zyxwvutsrqponmlkjihgfedcba\n', 'atcoder\n', 'abcdefghijklmnopqrstuvwzyx\n', 'abc\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
11af6054f3eb3742751ad069bdc3ea75
__inputs__ = ['0\n', '-1\n', '1\n', '-2\n', '-4\n', '-3\n', '-5\n', '-7\n', '-6\n', '2\n', '3\n', '4\n', '7\n', '5\n', '9\n', '17\n', '25\n', '8\n', '-10\n', '-15\n', '-9\n', '10\n', '6\n', '12\n', '16\n', '11\n', '13\n', '-11\n', '-18\n', '-8\n', '-12\n', '-14\n', '22\n', '19\n', '26\n', '-19\n', '-24\n', '-25\n', '-4...
aeb0a2d921a14a06841b368a458ef937
__inputs__ = [] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
22f3d4d8c844fac5f1ba0db0ea002b67
__inputs__ = ['2 1\n2 2\n2 1000\n', '1 100\n1 1\n', '3 5\n4 3\n5 2\n6 1\n', '1 1\n1 87\n', '1 1\n100 77\n', '5 10\n3 81\n3 49\n1 20\n1 12\n1 30\n', '5 10\n4 3\n1 54\n2 57\n2 31\n1 99\n', '5 10\n2 81\n3 31\n4 49\n1 35\n1 67\n', '10 1\n1 92\n1 92\n1 92\n1 92\n1 92\n1 92\n1 92\n1 92\n1 92\n1 92\n', '10 1\n1 16\n1 16\n1 16...
6ff9135fca605775e3cdf42d6fdc63a7
__inputs__ = ['2 1\n2 2\n2 1000\n', '1 100\n1 1\n', '3 5\n4 3\n5 2\n6 1\n', '3 5\n4 3\n5 2\n6 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1ab026a98247b5e46b9e4939a2daf45d
__inputs__ = ['2\n2 0\n0 2\n', '3\n2 0\n0 2\n-2 2\n', '4\n2 0\n0 2\n-2 0\n0 -2\n', '2\n2 1\n1 2\n', '1\n1 1\n', '10\n9 7\n10 7\n6 5\n6 10\n7 6\n5 10\n6 7\n10 9\n5 5\n5 8\n', '10\n-1 28\n1 28\n1 25\n0 23\n-1 24\n-1 22\n1 27\n0 30\n1 22\n1 21\n', '10\n-5 9\n-10 6\n-8 8\n-9 9\n-6 5\n-8 9\n-5 7\n-6 6\n-5 10\n-8 7\n', '10\n...
90deb45c8763d26399c5559b082adebf
__inputs__ = ['2\n2 0\n0 2\n', '3\n2 0\n0 2\n-2 2\n', '4\n2 0\n0 2\n-2 0\n0 -2\n', '2\n2 1\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
707d62e552536668cde2369dd384b941
__inputs__ = ['3 5 2 7\n', '100 600 200 300\n', '100 600 200 6\n', '3 3 2 7\n', '100 480 244 6\n', '0 3 0 7\n', '100 169 362 6\n', '100 311 362 6\n', '000 311 50 6\n', '110 311 50 6\n', '110 222 182 6\n', '-1 1 -1 10\n', '111 222 182 6\n', '-2 1 -1 10\n', '101 222 131 6\n', '-2 2 1 10\n', '001 222 109 9\n', '000 222 12...
5a260daee4099972a9bddef614d526a5
__inputs__ = ['3 5 2 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
cf2821be00dcfd17d9dc22e5e07e2c56
__inputs__ = ['13 6\n', '6 2\n', '13 1\n', '13 0\n', '23 1\n', '19 1\n', '2 1\n', '2 0\n', '2 -1\n', '0 0\n', '0 1\n', '15 1\n', '13 2\n', '6 1\n', '19 2\n', '30 1\n', '11 1\n', '9 0\n', '6 0\n', '24 1\n', '32 1\n', '17 1\n', '32 0\n', '6 -2\n', '26 1\n', '63 0\n', '34 1\n', '63 1\n', '60 1\n', '22 1\n', '60 0\n', '20 ...
016a09c2280fbfd14f3427a2d78578b8
__inputs__ = ['13 3\n', '3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
7008a6654cf056e233d3243920bd294a
__inputs__ = ['5 0\n5 5 4 1 2\n', '10 -10\n5 5 1 7 4 1 2 4 9 2\n', '10 0\n5 5 1 7 4 1 2 4 9 2\n', '10 -10\n5 5 1 0 5 1 2 4 9 2\n', '5 0\n5 5 4 0 2\n', '10 -10\n5 5 1 7 4 1 0 4 9 2\n', '10 -12\n5 5 1 0 5 1 2 4 9 2\n', '10 -10\n5 5 1 0 4 1 0 4 9 2\n', '10 0\n5 9 1 12 0 2 2 4 12 1\n', '10 -10\n5 5 1 0 4 0 0 4 9 2\n', '10 ...
1a7d4a695003c10c6fb322bfcdd2d4b3
__inputs__ = ['5 0\n5 3 4 1 2\n', '10 -10\n5 5 1 7 5 1 2 4 9 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b7b413a0f455544529aaa7fa3baa0a37
__inputs__ = ['4 2\naabb\n', '6 3\naacaab\n', '2 2\nlu\n', '5 3\novvoo\n', '36 13\nbzbzcffczzcbcbzzfzbbfzfzzbfbbcbfccbf\n', '81 3\nooycgmvvrophvcvpoupepqllqttwcocuilvyxbyumdmmfapvpnxhjhxfuagpnntonibicaqjvwfhwxhbv\n', '100 100\nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
b5891f4316e26b3115d80cb48880baf9
__inputs__ = ['4 2\naabb\n', '6 3\naacaab\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b2dc1feeea379a5bed6155f0f8fd6c02
__inputs__ = ['10 2 3\n10 2 5\n100 5 40\n0 0 0\n', '10 1 3\n10 2 5\n100 5 40\n0 0 0\n', '10 2 3\n14 2 5\n100 6 25\n0 0 0\n', '10 1 3\n10 2 5\n110 5 40\n0 0 0\n', '15 1 3\n10 2 6\n110 5 40\n0 0 0\n', '15 2 3\n10 2 6\n110 5 40\n0 0 0\n', '15 2 3\n13 2 6\n110 5 40\n0 0 0\n', '10 3 3\n10 2 5\n100 5 25\n0 0 0\n', '10 2 3\n1...
941f1ab6fc7b513db89058334c56f299
__inputs__ = ['10 2 3\n10 2 5\n100 5 25\n0 0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1b39de165353ec09554d73816fa90e21
__inputs__ = ['2\n95\n', '1\n2\n', '12\n836544897832\n', '6\n576825\n', '15\n000000000000007\n', '14\n11122233344455\n', '10\n3312667105\n', '7\n4424368\n', '15\n999999999999990\n', '2\n66\n', '13\n1337251172966\n', '1\n8\n', '15\n987654329876543\n', '9\n234567899\n', '1\n4\n', '10\n1234567899\n', '6\n555777\n', '1\n6\...
3e32014716a9d6d655b392762313f02a
__inputs__ = ['3\n555\n', '4\n1234\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
3acc9f72332f29c75ad5eb1f4ae61911
__inputs__ = ['5 3 11\n1\n', '3 3 4\n2\n', '7 3 11\n1\n', '3 3 4\n4\n', '7 5 11\n1\n', '3 3 4\n0\n', '7 5 11\n0\n', '4 3 4\n0\n', '10 5 11\n0\n', '4 3 1\n0\n', '10 5 21\n0\n', '4 1 1\n0\n', '17 5 21\n0\n', '3 1 1\n0\n', '17 3 21\n0\n', '4 2 1\n0\n', '27 3 21\n0\n', '11 0 1\n0\n', '5 -2 1\n0\n', '5 -3 1\n0\n', '5 3 11\n...
6aab6416790648b087f7eb4e8de0f172
__inputs__ = ['5 3 11\n1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0ed40d03236d629b1b6d3da48f305928
__inputs__ = ['3\n0 1 2 3 4 5\n6 7 8 9 0 1\n2 3 4 5 6 7\n', '3\n0 1 3 5 6 8\n1 2 4 5 7 8\n2 3 4 6 7 9\n', '3\n0 1 2 3 4 5\n0 1 2 3 4 5\n0 1 2 3 4 5\n', '3\n1 2 3 7 8 9\n9 8 7 1 2 3\n7 9 2 3 1 8\n', '1\n5 2 2 5 6 7\n', '1\n7 6 5 8 9 0\n', '1\n2 5 9 6 7 9\n', '1\n6 3 1 9 4 9\n', '1\n1 9 8 3 7 8\n', '2\n1 7 2 0 4 3\n5 2 3...
dad9d93c5dc9800341993c019b531dc0
__inputs__ = ['3\n0 1 2 3 4 5\n6 7 8 9 0 1\n2 3 4 5 6 7\n', '3\n0 1 3 5 6 8\n1 2 4 5 7 8\n2 3 4 6 7 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
31628f08781ee87e75be2adae8705448
__inputs__ = ['5 2\n-1 -2 5 -4 8\n', '7 6\n-3 0 -1 -2 -2 -4 -1\n', '4 1\n3 -1 6 0\n', '4 1\n3 -2 6 0\n', '5 2\n-1 -2 5 -7 8\n', '4 1\n3 -2 1 0\n', '5 2\n0 -2 5 -7 8\n', '4 1\n2 -2 1 0\n', '5 2\n0 -2 1 -7 8\n', '5 2\n0 -2 2 -7 8\n', '5 2\n0 -2 2 -7 14\n', '5 2\n0 -2 4 -7 14\n', '5 2\n0 0 4 -7 14\n', '5 2\n0 0 4 -5 14\n'...
ada11ba05b8e65d0ddcfc016093ba1a0
__inputs__ = ['5 2\n-1 -2 5 -4 8\n', '7 6\n-3 0 -1 -2 -2 -4 -1\n', '4 1\n3 -1 6 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5be11d5418b925e9fa7ef095ae9153f5
__inputs__ = ['3 3\n2 1\n1 2 3\n3 4 5\n', '3 3\n3 3\n1 2 3\n3 4 5\n', '5 2\n3 1\n1 1 1 1 1\n2 2\n', '3 5\n1 1\n5 5 5\n5 5 5 5 5\n', '1 1\n1 1\n1\n1\n', '3 3\n1 1\n1 2 3\n1 2 3\n', '3 3\n1 2\n1 2 3\n1 2 3\n', '3 3\n2 2\n1 2 3\n1 2 3\n', '10 15\n10 1\n1 1 5 17 22 29 32 36 39 48\n9 10 20 23 26 26 32 32 33 39 43 45 47 49 4...
9e7e89379c83a73a7103d6ae4546d7a3
__inputs__ = ['3 3\n2 1\n1 2 3\n3 4 5\n', '3 3\n3 3\n1 2 3\n3 4 5\n', '5 2\n3 1\n1 1 1 1 1\n2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9a27d15a175ea124476fe32987a7d45f
__inputs__ = ['3\n5 1\n2 9 -10 25 1\n5 0\n2 9 -10 25 1\n3 1\n1 1 1\n', '3\n5 2\n2 9 -10 25 1\n5 0\n2 9 -10 25 1\n3 1\n1 1 1\n', '3\n5 1\n2 9 -10 14 1\n5 0\n2 9 -10 25 1\n3 1\n1 1 1\n', '3\n5 2\n1 9 -10 25 1\n5 0\n2 9 -10 25 1\n3 0\n1 1 1\n', '3\n5 2\n1 9 -10 25 1\n5 0\n2 9 -10 25 0\n3 0\n1 1 1\n', '3\n5 1\n0 9 -10 19 1...
e56baafcadfddef08a7685a5d1439a68
__inputs__ = ['3\n5 1\n2 9 -10 25 1\n5 0\n2 9 -10 25 1\n3 1\n1 1 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
5d46adf4417411b666480f147fc98708
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(...
f37bfd8d3c808b0a65eed053bffd2d00
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(...
4aeed5a89a5825c772b1a4ec5acc1377
__inputs__ = ['3\nadd 1\nremove\nadd 2\nadd 3\nremove\nremove\n', '7\nadd 3\nadd 2\nadd 1\nremove\nadd 4\nremove\nremove\nremove\nadd 6\nadd 7\nadd 5\nremove\nremove\nremove\n', '4\nadd 1\nadd 3\nremove\nadd 4\nadd 2\nremove\nremove\nremove\n', '2\nadd 1\nremove\nadd 2\nremove\n', '1\nadd 1\nremove\n', '15\nadd 12\nadd...
19c16bc3431cd7882c085a8c01d0c29f
__inputs__ = ['3\nadd 1\nremove\nadd 2\nadd 3\nremove\nremove\n', '7\nadd 3\nadd 2\nadd 1\nremove\nadd 4\nremove\nremove\nremove\nadd 6\nadd 7\nadd 5\nremove\nremove\nremove\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() ...
ea82875cebc41135d0d38972f7f74901
__inputs__ = ['11\n23\n0\n', '11\n45\n0\n', '11\n77\n0\n', '11\n13\n0\n', '11\n17\n0\n', '11\n25\n0\n', '11\n37\n0\n', '11\n5\n0\n', '11\n69\n0\n', '11\n19\n0\n', '11\n21\n0\n', '11\n27\n0\n', '11\n11\n0\n', '11\n31\n0\n', '11\n33\n0\n', '11\n29\n0\n', '11\n7\n0\n', '11\n3\n0\n', '11\n39\n0\n', '11\n43\n0\n', '11\n35\n...
c8088e033e706cf6263df6851c07a85e
__inputs__ = ['11\n15\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c7684a806dcaed58f5bb7ea4af05cb76
__inputs__ = ['13 5 6\n1 3 35902\n4 6 19698\n4 6 73389\n3 6 3031\n3 1 4771\n1 4 4784\n2 1 36357\n2 1 24830\n5 6 50219\n4 6 22645\n0 2 30739\n1 4 68417\n1 5 78537\n', '6 2 2\n2 2 2\n1 1 8\n1 1 5\n1 2 9\n1 2 2\n2 1 4\n', '13 5 6\n1 3 35902\n4 6 19698\n4 6 73389\n3 6 3031\n3 1 4771\n1 4 4784\n2 1 36357\n2 1 24830\n5 6 502...
abf012dc94b79a5432d34b6342ee1fb3
__inputs__ = ['1 100000 100000\n1 1 1\n', '13 5 6\n1 3 35902\n4 6 19698\n4 6 73389\n3 6 3031\n3 1 4771\n1 4 4784\n2 1 36357\n2 1 24830\n5 6 50219\n4 6 22645\n1 2 30739\n1 4 68417\n1 5 78537\n', '6 2 2\n2 2 2\n1 1 8\n1 1 5\n1 2 9\n1 2 7\n2 1 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper...
d946c087ec5aea6834cf45481bc5af96