test
stringlengths
184
51.6M
hash
stringlengths
32
32
__inputs__ = ['2\n---+-+-+++\n-------\n', '2\n+++-+-+---\n-------\n', '2\n-+--+++--+\n-------\n', '2\n-+-+-+-+-+\n-------\n', '2\n--++---+++\n-----+-\n', '2\n---+-+-+++\n-----+-\n', '2\n+-+-+-+--+\n-------\n', '2\n---+++-+-+\n-------\n', '2\n-+-+++---+\n-------\n', '2\n+-+++----+\n-------\n', '2\n+-+-+++---\n-------\n'...
71a496bbaf623787b1b6b8ca6561b03d
__inputs__ = ['2\n---+-+-+++\n-------\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1f5cf7b2da8e3e5bae980638e168bdd0
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(...
013b2c7ac29f7bfc85a4d1507609f6e0
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
2ad1fd479a2ca3d34ab7abe76a90fdb7
__inputs__ = ['4\n0 1\n2 5\n3 1\n4 0\n', '6\n12 -14\n-3 3\n-14 7\n-14 -3\n2 -12\n-1 -6\n', '1\n1 1\n', '2\n5 5\n10 10\n', '5\n5 5\n5 -5\n-5 5\n-5 -5\n0 0\n', '4\n10 10\n-10 -10\n-10 10\n10 -10\n', '3\n3 3\n-3 3\n3 -3\n', '2\n7 7\n-7 -7\n', '6\n6 6\n6 -6\n-6 6\n-6 -6\n0 0\n12 12\n', '7\n0 1\n2 2\n5 5\n-3 -3\n-5 -5\n6 6\...
cb2f7e1e6a04d436fa99747bf7973583
__inputs__ = ['4\n0 1\n2 5\n3 1\n4 0\n', '6\n12 -14\n-3 3\n-14 7\n-14 -3\n2 -12\n-1 -6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
c23b296894ca46a98ef5a2ee90736464
__inputs__ = ['1900:01:01\n2038:12:31\n', '1996:03:09\n1991:11:12\n', '1999:12:31\n2000:02:29\n', '1903:09:27\n1988:06:15\n', '1913:11:14\n1901:05:11\n', '1915:01:01\n2007:07:01\n', '1925:07:15\n2010:06:22\n', '1935:10:08\n1923:01:07\n', '1986:08:24\n1926:04:13\n', '1932:11:18\n2028:09:25\n', '1942:06:04\n1982:12:29\n'...
94deb065fc2943d8331e8a60758b9d03
__inputs__ = ['1900:01:01\n2038:12:31\n', '1996:03:09\n1991:11:12\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1b47a3772120b7d01932bca2b6a405cd
__inputs__ = ['3\n10\n20\n30\n', '3\n10\n10\n10\n', '3\n120\n120\n120\n', '10\n151\n172\n68\n9\n8\n1\n18\n116\n59\n117\n', '11\n121\n62\n66\n177\n5\n173\n16\n31\n80\n31\n54\n', '12\n16\n27\n65\n54\n154\n90\n23\n135\n102\n42\n17\n173\n', '15\n68\n97\n79\n11\n88\n144\n139\n77\n90\n157\n102\n170\n1\n147\n70\n', '9\n1\n2\n...
9baf08e34377729b6d964da2bd63b635
__inputs__ = ['3\n10\n20\n30\n', '3\n10\n10\n10\n', '3\n120\n120\n120\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
de88f5ec2d642ffe522fbf0bb863e17d
__inputs__ = ['10\ntypedef errtype** ucywcaykzh\ntypeof &ucywcaykzh*********\ntypedef &&&&&&void********* ucywcaykzh\ntypeof &&&ucywcaykzh******\ntypedef &errtype vfqmtssewklwhiukrz\ntypeof &&vfqmtssewklwhiukrz********\ntypedef &errtype********** xvhxopvh\ntypeof &xvhxopvh\ntypedef &void****** kieypzcclmsvce\ntypeof &&...
1d0d1ec804af897815214c18bdb6779c
__inputs__ = ['5\ntypedef void* ptv\ntypeof ptv\ntypedef &&ptv node\ntypeof node\ntypeof &ptv\n', '17\ntypedef void* b\ntypedef b* c\ntypeof b\ntypeof c\ntypedef &b b\ntypeof b\ntypeof c\ntypedef &&b* c\ntypeof c\ntypedef &b* c\ntypeof c\ntypedef &void b\ntypeof b\ntypedef b******* c\ntypeof c\ntypedef &&b* c\ntypeof c...
57ef7bc91a368a718c3ed76b37111def
__inputs__ = ['4\n1 100\n3 200\n999999999999999 44\n1000000000000000 150\n', '5\n10 20\n40 50\n60 35\n70 40\n90 10\n', '4\n1 101\n3 200\n999999999999999 61\n1000000000000000 150\n', '5\n19 28\n40 50\n60 35\n70 40\n90 10\n', '4\n1 101\n5 200\n789952814361385 49\n1000000000000000 150\n', '4\n1 101\n7 200\n789952814361385...
84753236d1e8fa24e16c1dabc35d0f9c
__inputs__ = ['4\n1 100\n3 200\n999999999999999 150\n1000000000000000 150\n', '5\n10 2\n40 5\n60 3\n70 4\n90 1\n', '5\n10 20\n40 50\n60 30\n70 40\n90 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL_...
4f1d60d0349dbf2ac301d865595fa739
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(...
971dac711c0988c7ee11e8a097790196
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(...
84ac86b51ee46e5d81b8a2623e09b3cd
__inputs__ = ['2 2\n14419485 34715515\n45193875 34715515\n', '2 2\n100000000 100000000\n0 0\n', '2 2\n217361 297931\n297930 83550501\n', '2 2\n72765050 72765049\n72763816 77716490\n', '4 3\n1 5 6 7\n8 9 10\n', '2 2\n0 0\n0 0\n', '2 2\n100000000 100000000\n100000000 100000000\n', '2 2\n4114169 4536507\n58439428 4536507\...
2fd9053be32ffe0ec77f51854de83f2d
__inputs__ = ['2 2\n0 1\n1 0\n', '2 3\n1 0\n1 1 2\n', '3 2\n1 2 1\n3 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
33368b329232abb4825060eac95b6035
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(...
c15b0a4c4419c190d9b0876d34557654
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(...
dea2e885767c00ab91c90a3173dd1f96
__inputs__ = ['3\n2\n1 1\n3\n1 2 1\n5\n8 5 6 2 3\n', '1\n7\n2 3 2 3 4 2 3\n', '2\n4\n1 2 3 4\n5\n4 3 2 1 2\n', '3\n1\n5\n2\n7 8\n3\n9 8 7\n', '4\n4\n1 1 1 1\n5\n2 2 2 2 2\n6\n3 3 3 3 3 3\n7\n4 4 4 4 4 4 4\n', '2\n5\n5 5 5 5 5\n6\n6 6 6 6 6 6\n', '1\n8\n8 8 8 8 8 8 8 8\n', '1\n2\n1 2\n', '3\n3\n2 2 2\n4\n3 3 3 3\n5\n4 4...
cd4a447be163fbad37d998d3884e9ddc
__inputs__ = ['3\n2\n1 1\n3\n1 2 1\n5\n8 5 6 2 3\n', '1\n3\n1 2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6ede46aac14e1c4e38b65fe0896338c2
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(...
bfecc0987f44f8b264c645ccc1b37daa
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(...
f884a8bf8f3f04e1ca14b6a058a4280c
__inputs__ = ['4\n3 4 2 1\n', '3\n1 1000 1\n', '7\n218 786 704 233 645 728 389\n', '16\n1 13 987 144 34 21 610 233 55 2 89 3 377 1 8 5\n', '2000\n1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000...
1d2d883c927f584ec1d37d3778a39163
__inputs__ = ['4\n3 4 2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
1467aa677c55211fbda8dc5bafac1373
__inputs__ = ['3\n1 3\n2 3\n', '2\n1 2\n', '10\n5 3\n5 7\n8 9\n1 9\n9 10\n8 4\n7 4\n6 10\n7 2\n', '2\n0 2\n', '10\n5 3\n5 7\n8 9\n0 9\n9 10\n8 4\n7 4\n6 10\n7 2\n', '3\n1 3\n0 3\n', '10\n5 3\n5 7\n8 9\n0 9\n12 10\n8 4\n7 4\n6 10\n7 2\n', '2\n-1 1\n', '10\n5 3\n5 7\n8 9\n0 9\n12 10\n4 4\n7 4\n6 10\n7 2\n', '2\n-1 2\n', ...
94d98ccbddeaed4dac7a168c12e5a3be
__inputs__ = ['3\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___")
c3c3988d87998a6d182aa30891408720
__inputs__ = ['3\n6\n1 2 3 4 5 6\n3\n2 3 4\n6\n22 5 6 33 1 4\n2\n4 15\n4\n1 3 4 2\n2\n1 2\n', '2\n6\n1 2 3 4 7 6\n3\n2 3 4\n6\n22 5 6 33 1 4\n2\n4 15\n', '2\n6\n1 1 3 4 7 6\n3\n2 3 4\n6\n22 5 6 33 1 4\n2\n4 15\n', '2\n6\n1 2 3 4 5 6\n3\n2 3 4\n6\n22 5 1 33 1 4\n2\n4 15\n', '2\n6\n0 2 3 4 7 6\n3\n2 3 4\n6\n22 5 6 33 1 4...
1a21ae79ed93597cca0fcd4beec20d4f
__inputs__ = ['3\n6\n1 2 3 4 5 6\n3\n2 3 4\n6\n22 5 6 33 1 4\n2\n4 15\n4\n1 3 4 2\n2\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
0aa294598738738048a9ffd3f87a55e8
__inputs__ = ['6\n1 165 66\n2 178 60\n3 180 72\n4 160 65\n5 185 62\n6 182 62\n3\n3 160 65\n2 180 32\n1 170 75\n0\n', '6\n1 165 66\n2 178 60\n3 180 72\n4 160 65\n5 185 62\n6 182 62\n3\n3 160 65\n2 180 70\n1 170 103\n0\n', '6\n1 165 93\n0 178 60\n3 180 72\n4 160 65\n5 185 62\n6 182 62\n3\n3 160 94\n2 180 32\n1 170 75\n0\...
a93f20609a17cbb5cdbf02ee9b24bcd6
__inputs__ = ['6\n1 165 66\n2 178 60\n3 180 72\n4 160 65\n5 185 62\n6 182 62\n3\n3 160 65\n2 180 70\n1 170 75\n0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
61bf5e1a463e7621150216f69150f483
__inputs__ = ['3\n', '10\n', '999999999\n', '1\n', '2\n', '36426\n', '79445\n', '90081\n', '433933447\n', '476190629\n', '262703497\n', '1000000000\n', '1604548808\n', '5\n', '17\n', '1558666763\n', '8\n', '20\n', '1031129102\n', '12\n', '30\n', '1937535494\n', '31\n', '2049048611\n', '0\n', '21\n', '1295498732\n', '9\...
53d5818d719dc5370e376af5d734a80c
__inputs__ = ['3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
65624556f5e67a6a17d3f5328ddf468d
__inputs__ = ['2\n1\n2\n', '2\n1\n4\n', '2\n2\n4\n', '2\n2\n1\n', '2\n0\n1\n', '2\n0\n2\n', '2\n2\n2\n', '2\n4\n2\n', '2\n2\n3\n', '2\n3\n2\n', '2\n0\n0\n', '2\n-1\n0\n', '2\n-1\n-1\n', '2\n-3\n-1\n', '2\n-3\n-6\n', '2\n-4\n0\n', '2\n-1\n2\n', '2\n-1\n1\n', '2\n1\n1\n', '2\n2\n0\n', '2\n4\n0\n', '2\n4\n1\n', '2\n3\n1\n...
298aae5a0c399184022fbe07db4d4ecd
__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__ = ['3\n---\n', '4\n++++\n', '2\n-+\n', '5\n++-++\n', '1\n+\n', '100\n++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n', '100\n----------------------------------------------------------------------------------------------------\n', '100\n-+-+-+-+-+-+-+-+-+...
12aaa7c10c386d8e922e40059beb9a7d
__inputs__ = ['3\n---\n', '4\n++++\n', '2\n-+\n', '5\n++-++\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
9360c211e98f69aeeb970eacb90ea2aa
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(...
bc0345f3ca98f1ea761fc9ac38eace7c
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(...
ffcb00a80b2b51d433c1f261e898c40a
__inputs__ = ['4\n3 2 15 9\n', '4\n8 2 2 7\n', '1\n1\n', '1\n123819\n', '10\n9 6 8 5 5 2 8 9 2 2\n', '100\n17 23 71 25 50 71 85 46 78 72 89 26 23 70 40 59 23 43 86 81 70 89 92 98 85 88 16 10 26 91 61 58 23 13 75 39 48 15 73 79 59 29 48 32 45 44 25 37 58 54 45 67 27 77 20 64 95 41 80 53 69 24 38 97 59 94 50 88 92 47 95 ...
6a21c1d5ba317cae0da5f5f829f85fb5
__inputs__ = ['4\n3 2 15 9\n', '4\n8 2 2 7\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
afd253167bd061c1d21cbcf27a94b6e5
__inputs__ = ['10\ncodeforces\n', '5\naaaaa\n', '5\noomph\n', '1\ng\n', '2\nab\n', '3\naab\n', '3\nabb\n', '7\naaabaaa\n', '9\naabbccaab\n', '2\naz\n', '7\nqaaqaaq\n', '4\naaba\n', '6\nqaaaaa\n', '8\naaaabbba\n', '2\nqa\n', '5\nabbbb\n', '2\nss\n', '4\naabb\n', '6\nbaaaaa\n', '25\nbbaaaaabaaaabbabaaaababaa\n', '3\noom\...
d6599351d39e79429b4c558ecc15d404
__inputs__ = ['5\naaaaa\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
b5125d1717cdc546a000798fc0854c62
__inputs__ = ['4\n4\n1 2 4 3\n4\n1 1 1 1\n1\n1\n10\n5 6 1 3 2 9 8 1 2 4\n', '2\n5\n1 1 1 1 1\n4\n1 1 1 1\n', '3\n1\n1\n1\n1\n1\n1\n', '2\n2\n2 2\n1\n1\n', '10\n3\n1 1 1\n1\n1\n4\n3 4 3 3\n1\n1\n7\n7 1 1 5 3 6 5\n3\n2 2 1\n9\n4 1 7 1 1 6 7 1 7\n5\n2 5 3 4 3\n1\n1\n9\n8 9 5 7 4 1 2 5 4\n', '10\n3\n1 1 1\n1\n1\n4\n3 4 3 3...
5f1565dd153cd08c1beca5441b9e1fd3
__inputs__ = ['4\n4\n1 2 4 3\n4\n1 1 1 1\n1\n1\n10\n5 6 1 3 2 9 8 1 2 4\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
fd995838aec62fa21065b83791acf7ff
__inputs__ = ['4 1 2\n1 2 1 1\n', '4 1 1\n1 1 2 1\n', '1 1 1\n1\n', '2 1 2\n2 2\n', '5 1 3\n1 2 2 2 1\n', '7 6 1\n1 1 1 1 1 1 1\n', '10 2 1\n2 1 2 2 2 2 1 2 1 2\n', '20 4 3\n2 2 2 2 2 2 2 2 1 2 1 1 2 2 1 2 2 2 1 2\n', '1 1 1\n2\n', '1 200000 200000\n2\n', '30 10 10\n1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2...
662ee0b4b2e07963ab283de387d57991
__inputs__ = ['4 1 2\n1 2 1 1\n', '4 1 1\n1 1 2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2cdfae976cc9990cc2b754100e66d54a
__inputs__ = ['5\n1 2 3 2 3\n', '3\n1 2 1\n', '7\n1 1 3 1 1 1 1\n', '10\n1 5 2 10 9 3 3 2 9 5\n', '10\n6 5 7 1 10 10 2 3 6 6\n', '10\n5 5 9 1 2 5 10 6 8 5\n', '10\n6 6 6 10 2 9 3 3 9 6\n', '10\n8 8 8 3 4 3 1 8 8 8\n', '10\n4 2 10 9 8 5 7 6 6 6\n', '4\n1 2 1 2\n', '7\n1 5 5 5 5 5 1\n', '5\n1 2 1 2 1\n', '10\n1 1 1 1 1 1...
4d168532a3baba0ad028fc612bddd21a
__inputs__ = ['5\n1 2 3 2 3\n', '3\n1 2 1\n', '7\n1 1 3 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___")
cf56ee357d4f5877addd91d0cb1174d1
__inputs__ = ['5 6 4 14\n1 2 3 4 5\n1 5 2\n1 2 5\n2 3 5\n3 5 3\n', '3 2 5 3\n5 2 10\n1 2 3\n1 1 9\n1 1 2\n2 2 4\n1 2 9\n', '1 1 1 4\n2\n1 1 5\n', '5 12 2 13\n2 4 7 19 100\n1 4 6\n9 11 8\n', '53 1 27 3\n44 28 48 60 29 42 59 32 9 58 3 11 7 53 4 19 37 41 36 52 29 9 24 8 31 39 52 41 37 44 26 37 37 48 6 21 20 42 25 3 33 2 3...
891798850add25eadae4adb61526ccbe
__inputs__ = ['5 6 4 14\n1 2 3 4 5\n1 5 2\n1 2 5\n2 3 5\n3 5 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
2db5d6f6ee5d56e72a92fe22a4a4f303
__inputs__ = ['3 1\n1\n', '4 2\n1 4\n', '11 2\n4 8\n', '4 2\n1 3\n', '4 4\n1 2 3 4\n', '1000 3\n100 900 10\n', '74 13\n6 14 19 20 21 24 30 43 58 61 69 70 73\n', '68 37\n1 2 3 6 7 8 10 11 12 14 16 18 22 23 24 26 30 31 32 35 37 39 41 42 45 47 50 51 52 54 58 59 61 62 63 64 68\n', '132 48\n6 7 8 12 15 17 18 19 22 24 25 26 ...
e36046e107bd089a53e0286a3866bf02
__inputs__ = ['3 1\n1\n', '4 2\n1 4\n', '11 2\n4 8\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8642a1f2cba6010ea6273c6fd04a60aa
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(...
6b77039f91c9d94b4c01c4b9636adacb
def is_eq(a, b): if a == b: return True elif isinstance(a, (int, float)) and isinstance(b, (int, float)): return abs(a - b) < 1e-4 elif isinstance(a, list) and isinstance(b, list): if len(a) != len(b): return False for x, y in zip(a, b): if not is_eq(...
2ad1fd479a2ca3d34ab7abe76a90fdb7
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(...
92fbfa7e9fb90ff5b935916c1106dc80
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(...
8f23d07c1ec69ead37d419f07539b2bc
__inputs__ = ['2 3 3\n2 4\n3 3\n', '4 3 3\n1 1\n0 3\n3 1\n3 3\n', '2 4 6\n2 2\n2 3\n', '1 4 4\n2 2\n3 3\n', '4 3 3\n1 1\n1 3\n6 1\n3 2\n', '2 4 6\n2 2\n0 3\n', '4 3 3\n1 1\n1 3\n3 1\n3 6\n', '4 6 3\n1 1\n0 3\n3 1\n3 3\n', '2 4 3\n2 2\n2 3\n', '4 3 3\n1 1\n1 3\n3 1\n3 2\n', '1 4 4\n2 2\n4 3\n', '2 4 3\n4 2\n2 3\n', '1 3...
7636e21a4e53358aeba757bc65c4dc80
__inputs__ = ['2 3 3\n2 2\n3 3\n', '4 3 3\n1 1\n1 3\n3 1\n3 3\n', '2 4 4\n2 2\n3 3\n', '2 4 4\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___")
6b52595e504e957b2760a8a89173c748
__inputs__ = ['4\nab\nacxb\ncax\na\naaaa\naaabbcc\na\naaaa\naabbcc\nab\nbaaa\naaaaa\n', '1\naaaaaabbbbbbbbcccccccccccdddd\naaaaabbbbbbccccccccddddddddd\naaaaabbbbbbbbbcccccccccddddd\n', '1\naaaaaabbbbbbbbcccccccccccdddd\naaaaabbbbbbccccccccddddddddd\naaaaabbbbbbbbbcccccccccddddd\n', '1\naaaaaabbbbbbbbcccccccccccdddd\na...
9a2396d862d68b6558311b9b3c0f522f
__inputs__ = ['4\nab\nacxb\ncax\na\naaaa\naaabbcc\na\naaaa\naabbcc\nab\nbaaa\naaaaa\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d5ecde66223350f7b16a1d7f0089fe18
__inputs__ = ['1 1 1\n', '1 2 2\n', '1 3 5\n', '6 2 9\n', '7 3 7\n', '135 14 39\n', '5000 5000 5000\n', '2 1 1\n', '1 1 3\n', '1 2 3\n', '4 1 2\n', '5 9 4\n', '4 2 5\n', '9 4 10\n', '16 8 29\n', '17 46 45\n', '28 47 1\n', '94 87 10\n', '84 29 61\n', '179 856 377\n', '1925 1009 273\n', '1171 2989 2853\n', '3238 2923 466...
8c1337b0e01b6af634733d24e188fba0
__inputs__ = ['1 1 1\n', '1 2 2\n', '1 3 5\n', '6 2 9\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
20916ed80a2b9e7b5a1aa5f70882f728
__inputs__ = ['2 6\n', '4 5\n', '1 1\n', '3 3\n', '500000 500000\n', '70 100\n', '5 12525\n', '10 5\n', '5 10\n', '0 0\n', '0 1\n', '1 0\n', '0 21233\n', '12523 0\n', '1231 1253\n', '500000 0\n', '1 500000\n', '250000 500000\n', '500000 250000\n', '33333 77777\n', '30900 174529\n', '89979 57154\n', '231646 398487\n', '...
4a6da148feab36c150ac79d499f0fafb
__inputs__ = ['2 6\n', '4 5\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
dc2008421f64df6bf34eda6b010b74a6
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(...
72d406a1c2fa92b6abbd366a8766a711
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(...
9c1c0330668bf5a27f8f7e52a374665a
__inputs__ = ['5\n1\n5\n42\n1337\n1000000000\n', '5\n1\n5\n42\n1337\n1000001000\n', '5\n1\n7\n42\n1337\n1000001000\n', '5\n1\n7\n42\n259\n1000001000\n', '5\n1\n7\n42\n284\n1000001000\n', '5\n1\n2\n42\n284\n1000001000\n', '5\n1\n2\n42\n129\n1000001000\n', '5\n1\n2\n51\n129\n1000001000\n', '5\n1\n5\n16\n1337\n1000001000\...
ea0f00d2257190ce06f115edee1fe74e
__inputs__ = ['5\n1\n5\n42\n1337\n1000000000\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
86d71495263a7ee45847e8a9c56d23e7
__inputs__ = ['3 3 2\n1 0 1\n1 1 1\n', '3 5 4\n1 1 1\n1 1 1 1 1\n', '1 1 1\n1\n1\n', '50 50 6\n1 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 0 1\n1 1 0 1 0 1 1 0 1 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0\n', '50 50 6\n1 0 0 1 0 ...
f5265f2cbf6b04a62c28fe76c78ac674
__inputs__ = ['3 3 2\n1 0 1\n1 1 1\n', '3 5 4\n1 1 1\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___")
b5d880271a727948f0639fba5a34db4f
__inputs__ = ['10\n2 4\n2 5\n1 3\n10 7\n1 6\n2 8\n9 5\n8 6\n10 6\n', '4\n1 2\n1 3\n2 4\n', '10\n2 4\n2 5\n1 3\n3 7\n1 6\n2 8\n9 5\n8 6\n10 6\n', '10\n2 4\n2 5\n8 3\n10 7\n1 6\n2 8\n9 7\n8 6\n10 6\n', '10\n2 4\n2 5\n1 3\n10 7\n1 6\n2 8\n9 5\n8 6\n10 2\n', '10\n2 4\n2 5\n8 3\n10 7\n1 6\n2 8\n9 5\n8 6\n10 5\n', '10\n2 4\n...
139f93261c606c3e4546ede368f00539
__inputs__ = ['4\n1 2\n2 3\n3 4\n', '10\n2 4\n2 5\n8 3\n10 7\n1 6\n2 8\n9 5\n8 6\n10 6\n', '4\n1 2\n1 3\n1 4\n', '6\n1 2\n1 3\n1 4\n2 5\n2 6\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
850e9fd4f07c6c450f6c236b43fd067a
__inputs__ = ['4 1\n1 3 -1 -1 -1\n1 2 -1 -1\n1 4 -1 -1 -1 -1\n1 3 -1 -1 -1\n', '2 1\n1 3 -1 1 -1\n1 5 -1 -1 -1 -1 -1\n', '5 4\n1 2 2 -1\n2 2 1 -1\n3 4 4 4 4 -1\n4 3 -1 -1 -1\n3 5 -1 -1 -1 -1 -1\n', '4 3\n1 2 1 -1\n2 1 -1\n3 2 2 -1\n3 2 1 -1\n', '6 3\n1 3 -1 2 -1\n1 2 1 -1\n2 3 -1 1 -1\n2 2 2 -1\n2 2 3 -1\n3 1 -1\n', '1...
c9b2a9d8d26c172e01f295a4fdf4bc0a
__inputs__ = ['3 2\n1 2 1 -1\n2 2 -1 -1\n2 3 2 1 -1\n', '6 4\n1 3 -1 1 -1\n1 2 -1 -1\n2 3 -1 3 -1\n2 3 -1 -1 -1\n3 2 -1 -1\n4 2 4 -1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4c37ff6800343414b21dba6c68d6dd69
__inputs__ = ['7\n2 2 2 1 1 2 2\n', '6\n1 2 1 2 1 2\n', '9\n2 2 1 1 1 2 2 2 2\n', '2\n1 2\n', '2\n2 1\n', '6\n1 2 2 1 1 2\n', '3\n1 1 2\n', '3\n2 1 1\n', '4\n2 1 2 2\n', '4\n1 2 1 2\n', '4\n1 1 2 1\n', '4\n2 1 1 1\n', '5\n2 1 1 1 1\n', '10\n2 2 1 1 1 2 1 1 2 2\n', '100\n1 2 2 1 2 2 1 1 2 2 1 2 2 2 2 2 1 1 2 2 2 1 1 1 1...
38e90249495e89e5dfb14ae9614e3060
__inputs__ = ['7\n2 2 2 1 1 2 2\n', '6\n1 2 1 2 1 2\n', '9\n2 2 1 1 1 2 2 2 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
dfda52da16435a5825704dbfb73754e8
__inputs__ = ['1001\n', '0100101110\n', '0011\n', '1011\n', '1000\n', '01\n', '1010\n', '0000\n', '0010\n', '100\n', '101\n', '001\n', '1101111000011110111111110101100111111110111100001111011010111001101100010110000001010101101010111000\n', '00\n', '0\n', '000\n', '0001\n', '1100\n', '0100101111\n', '0111\n', '11011110...
e719fd9d5acd15ca11e76c951a03f57e
__inputs__ = ['010101\n', '11001100\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
bbe3cbf96d71aa6bac38d39386f1a42a
__inputs__ = ['4\n2 -1 -2 1\n', '4\n2 0 -1 1\n', '4\n1 -1 -2 0\n', '4\n0 -1 -1 1\n', '4\n-1 -1 0 2\n', '4\n-1 -2 0 2\n', '4\n2 -1 1 2\n', '4\n-1 1 -2 0\n', '4\n2 -1 2 2\n', '4\n1 2 -1 1\n', '4\n0 -1 0 -2\n', '4\n1 0 -2 -1\n', '4\n2 2 -1 1\n', '4\n-1 2 -2 2\n', '4\n-1 0 2 0\n', '4\n1 2 -2 -1\n', '4\n2 -1 -2 0\n', '4\n2 ...
8588f13ee311819d5e9008eeb0660ab2
__inputs__ = ['4\n2 0 -2 1\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
4334ca97c42da0303f24c824b3542009
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(...
f4a1d54977932bf404d54fb0654ed7b9
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(...
f7555f909363d4a30efa751546ee3ee9
__inputs__ = ['6\n4\n0110\n6\n011011\n5\n01010\n20\n10001111110110111000\n20\n00110110100110111101\n20\n11101111011000100010\n', '2\n3\n011\n2\n11\n', '5\n6\n101011\n5\n00000\n8\n11011011\n20\n11111111111111111111\n10\n1111111111\n', '1\n10\n1110000011\n', '1\n9\n000101000\n', '2\n2\n00\n2\n11\n', '3\n7\n1010101\n5\n11...
352ff86c5ad6efa52b83c1b4fdaf1eb6
__inputs__ = ['6\n4\n0110\n6\n011011\n5\n01010\n20\n10001111110110111000\n20\n00110110100110111101\n20\n11101111011000100010\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
844946e232bdcab2615e318fbff384d1
__inputs__ = ['3\n3\n2 3 2\n10 3 4\n4\n7 5 3 4\n2 3 1 3\n2\n10 1\n1 10\n', '1\n5\n6 7 8 9 10\n1 2 3 4 5\n', '2\n4\n10 20 30 40\n50 40 30 20\n5\n100 200 300 400 500\n1 2 3 4 5\n', '3\n6\n100 200 300 400 500 600\n1 2 3 4 5 6\n4\n10 20 30 40\n50 60 70 80\n2\n100 200\n300 400\n', '1\n3\n1 2 3\n4 5 6\n', '2\n5\n1 1 1 1 1\n2...
cb945ef695a941de8544979f1b0ecf79
__inputs__ = ['3\n3\n2 3 2\n10 3 4\n4\n7 5 3 4\n2 3 1 3\n2\n10 1\n1 10\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6e2491a426dec9005534fc8687a8485e
__inputs__ = ['4 4 2\n2 3\n1 2\n1 3\n1 4\n', '5 8 2\n2 1\n4 2\n5 4\n5 2\n4 3\n5 1\n4 1\n3 2\n', '5 7 2\n1 5\n3 2\n2 5\n3 4\n1 2\n5 3\n1 3\n', '2 1 1\n2 1\n', '16 20 2\n10 3\n5 3\n10 5\n12 7\n7 6\n9 12\n9 6\n1 10\n11 16\n11 1\n16 2\n10 2\n14 4\n15 14\n4 13\n13 15\n1 8\n7 15\n1 7\n8 15\n', '16 20 2\n10 3\n5 3\n10 5\n12 7...
c9fd29b3f9482dfeb3b12447963ab7b2
__inputs__ = ['4 4 2\n2 3\n1 2\n1 3\n1 4\n', '5 8 2\n2 1\n4 2\n5 4\n5 2\n4 3\n5 1\n4 1\n3 2\n', '5 7 2\n1 5\n3 2\n2 5\n3 4\n1 2\n5 3\n1 3\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
100cac2d88267dfff9293f28c5e51b9d
__inputs__ = ['2 11 3\n0 1\n1 1\n', '0 5 2\n', '1 3 2\n1 2\n', '1 3 2\n1 1\n', '0 1000000000 1000000000\n', '1 1000000000 1\n0 1000000000\n', '0 1 1\n', '2 10 3\n0 1\n9 1\n', '1 1 1\n0 1\n', '0 1000000000 500000000\n', '0 1000000000 1\n', '1 2 1\n1 1\n', '1 10 5\n5 2\n', '3 21 3\n3 3\n9 3\n15 3\n', '1 5 3\n3 1\n', '0 2...
589bf9e41f04d741acffd69c9bbf9775
__inputs__ = ['2 11 3\n0 1\n1 1\n', '0 5 2\n', '1 3 2\n1 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
a0e412ba73ca35c56a7b4ea61ddf4112
__inputs__ = ['ababa\naba\n', 'welcometoroundtwohundredandeightytwo\nd\n', 'ddd\nd\n', 'vnssnssnssnssnssnssnssnssnssnssnssnssnssnssnssnssn\nnssnssns\n', 'kpjmawawawawawawawawawawawawawawawawawawawawawawaw\nwawawawa\n', 'vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv\nvvvvvvvv\n', 'a\na\n', 'a\naa\n', 'a\nb\n', 'aba...
aab0b08990a585ee4a7b0946199acc6a
__inputs__ = ['ababa\naba\n', 'welcometoroundtwohundredandeightytwo\nd\n', 'ddd\nd\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
8c7b2537c148862bc215688616d2178a
__inputs__ = ['6\n(((())\n', '6\n()()()\n', '1\n)\n', '8\n)))(((((\n', '10\n))()))((()\n', '2\n((\n', '2\n))\n', '4\n())(\n', '4\n))))\n', '6\n))((((\n', '12\n()()))())()(\n', '9\n(((()((()\n', '10\n)())((()((\n', '17\n))((()(((()()))()\n', '8\n())(((()\n', '8\n())()(((\n', '4\n)(((\n', '10\n)(()()(()(\n', '16\n((())()...
c709fef80166ae687e522a5fde343447
__inputs__ = ['6\n(((())\n', '6\n()()()\n', '1\n)\n', '8\n)))(((((\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
6a1968a63bedcbe89aaa04946b216641
__inputs__ = ['3 3\n1 2 5 L\n1 2 7 S\n2 3 11 S\n3\n1 2 3\n5 5\n1 2 15 L\n2 3 10 L\n4 5 7 L\n1 3 30 S\n3 5 100 S\n5\n1 3 5 4 1\n0 0\n', '3 3\n1 2 5 L\n1 2 7 S\n2 3 11 S\n3\n1 2 3\n7 5\n1 2 15 L\n2 3 10 L\n4 5 7 L\n1 3 30 S\n3 4 000 S\n5\n1 3 5 4 1\n0 0\n', '3 3\n1 2 5 L\n1 2 7 S\n2 3 11 S\n3\n2 2 3\n5 5\n1 2 15 L\n2 3 1...
3e14607274f28052ded9d7a992af9d53
__inputs__ = ['3 3\n1 2 5 L\n1 2 7 S\n2 3 11 S\n3\n1 2 3\n5 5\n1 2 15 L\n2 3 10 L\n4 5 7 L\n1 3 30 S\n3 4 100 S\n5\n1 3 5 4 1\n0 0\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
d07593d4d64fd774d2e913608908f9bf
__inputs__ = ['3\n1 1\n1 2\n1 3\n', '3\n1 1\n2 1\n3 1\n', '4\n2 1\n2 2\n3 1\n3 2\n', '5\n3 6\n5 10\n4 3\n2 1\n1 3\n', '1\n1000000000 1000000000\n', '4\n1 1\n1 1000000000\n1000000000 1\n1000000000 1000000000\n', '5\n1 2\n2 1\n2 2\n2 3\n3 2\n', '7\n1 1\n1 4\n1 5\n2 1\n3 3\n4 2\n5 2\n', '8\n1 3\n2 1\n2 5\n2 6\n3 1\n4 4\n5...
6f6decd24d4bbee49cd8aaec99889d51
__inputs__ = ['3\n1 1\n1 2\n1 3\n', '3\n1 1\n2 1\n3 1\n', '4\n2 1\n2 2\n3 1\n3 2\n'] for __inp__ in __inputs__: import io sys.stdin = io.TextIOWrapper(io.BytesIO(__inp__.encode()), encoding='utf8') __run_prog__() print("___SENTINEL___")
f3b8d99e3e9c90f9c4340c17535f112c