problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02685
u802963389
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['n, m, k = map(int, input().split())\n\nMOD = 998244353\n\ndef comb(n,k,mod):\n if n<k:\n return 0\n if n<0 or k<0:\n return 0\n k=min(n-k,k)\n ans=1\n inv=[1]*(k+1)\n if k>=1:\n ans*=(n-k+1)%mod\n for i in range(2,k+1):\n inv[i]=mod-inv[mod%i]*(mod//i)%mod\n ans...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s039493624', 's544721467', 's620240423']
[11092.0, 9268.0, 24712.0]
[2206.0, 2206.0, 652.0]
[466, 695, 483]
p02685
u810356688
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
["import sys\ndef input(): return sys.stdin.readline().rstrip()\ndef main():\n n,m,k=map(int,input().split())\n mod=998244353\n ans=0\n for kx in range(k+1):\n ans+=m*(m-1)**(n-1-kx)%mod\n print(ans%mod)\n\n\nif __name__=='__main__':\n main()", "import sys\ndef input(): return sys.stdin.readlin...
['Wrong Answer', 'Accepted']
['s865984172', 's907661192']
[10720.0, 32840.0]
[2206.0, 384.0]
[253, 995]
p02685
u843135954
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['import sys\nstdin = sys.stdin\nsys.setrecursionlimit(10**6)\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nnn = lambda: list(stdin.readline().split())\nns = lambda: stdin.readline().rstrip()\n\nn,m,k = na()\nmod = 998244353\naall = pow(m,n,mod)\n\np = n-k+1\n\n\ndef cmb(n, r, mod):\n ...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s254501583', 's286328310', 's322700835', 's884564105', 's415526523']
[9444.0, 127584.0, 9336.0, 9428.0, 26264.0]
[28.0, 1524.0, 27.0, 28.0, 629.0]
[778, 816, 808, 767, 699]
p02685
u859897687
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['import sys\n\nn,m,k=map(int,input().split())\nMOD=998244353\n\nif n>m+k:\n print(0)\n sys.exit()\n\n\ndef COMinit():\n fac[0] = 1\n fac[1] = 1\n finv[0] = 1\n finv[1] = 1\n inv[1] = 1\n for i in range(2,MAX):\n fac[i] = fac[i - 1] * i % MOD\n inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD\n finv[i] = f...
['Wrong Answer', 'Accepted']
['s254471971', 's062927110']
[464180.0, 32504.0]
[2220.0, 401.0]
[851, 799]
p02685
u896741788
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['n,m,k=map(int,input().split())\nmod=998244353\nif m==1:print(0 if k!=n-1 else 1);exit()\nfact=[1]*(n-1+1)\ninv=[1]*(n-1+1)\nfor i in range(2,n-1+1):\n fact[i]=i*fact[i-1]%mod\ninv[-1]=pow(fact[-1],mod-2,mod)\nfor i in range(n-1,1,-1):\n inv[i-1]=inv[i]*i%mod\nans=0\npo=pow(m-1,n-1,mod)\nue=fact[n-1]\niii=m*pow(...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s077037560', 's292665345', 's477138893']
[25108.0, 9100.0, 24548.0]
[2206.0, 22.0, 278.0]
[417, 467, 444]
p02685
u920103253
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['def n0():return int(input())\ndef n1():return [int(x) for x in input().split()]\ndef n2(n):return [int(input()) for _ in range(n)]\ndef n3(n):return [[int(x) for x in input().split()] for _ in range(n)]\n\nn,m,k=n1()\n\nans=0\na=1\nfor i in range(k+1):\n ans+=a*m*(((m-1)**(n-1-k)))\n a=a*(n-1-i+1)//(i+1)\nprint...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s334625964', 's511693997', 's241675210']
[10804.0, 10600.0, 32840.0]
[2206.0, 2206.0, 703.0]
[321, 325, 998]
p02685
u934868410
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['n,m,k = map(int,input().split())\nmod = 998244353\ndp = [[0] * (n+1) for i in range(n+1)]\ndp[1][0] = m\nfor i in range(2, n+1):\n dp[i][0] = (dp[i-1][0] * (m-1)) % mod\nfor i in range(2, n+1):\n dp[i][1] = (dp[i-1][0] + dp[i-1][1] * (m-1)) % mod\n\ndef xgcd(a, b):\n x0, y0, x1, y1 = 1, 0, 0, 1\n while b ...
['Wrong Answer', 'Accepted']
['s105501654', 's072261346']
[2675788.0, 25008.0]
[2277.0, 1393.0]
[790, 359]
p02685
u937092222
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
[' = 998244353\nn, m, k = map(int, input().split())\n \nfact = [0]*(n+1)\nfact[0] = 1\nfor i in range(1, n+1):\n fact[i] = fact[i-1]*i % MOD\n \ninvfact= [0]*(n+1)\nfor i in range(n+1):\n invfact[i] = pow(fact[i], MOD-2, MOD)\n \n \ndef nCk(n, k):\n return fact[n]*invfact[k]*invfact[n-k]\n \n \nans = 0\nfor i ...
['Runtime Error', 'Accepted']
['s808050834', 's719231782']
[9000.0, 24684.0]
[22.0, 659.0]
[386, 703]
p02685
u945228737
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
["def inverse(a, p):\n a_, p_ = a, p\n x, y = 1, 0\n while p_:\n t = a_ // p_\n a_ -= t * p_\n a_, p_ = p_, a_\n x -= t * y\n x, y = y, x\n x %= p\n return x\n\n\ndef solve():\n N, M, K = map(int, input().split())\n mod = 998244353\n\n nCi = [1]\n for i in r...
['Wrong Answer', 'Accepted']
['s672529644', 's060586783']
[21240.0, 16888.0]
[887.0, 869.0]
[634, 567]
p02685
u998262711
2,000
1,048,576
There are N blocks arranged in a row. Let us paint these blocks. We will consider two ways to paint the blocks different if and only if there is a block painted in different colors in those two ways. Find the number of ways to paint the blocks under the following conditions: * For each block, use one of the M colo...
['n,m,k=map(int,input().split())\nmod=998244353\ncntb=1\nfor i in range(k+1):\n # cntb*=(n-i)//i\n ans+=((m*pow(m-1,n-1-i,mod)%mod)*cntb)%mod\n ans%=mod\n cntb*=((n-i−1)*pow(i+1,mod-2,mod))%mod\nprint(ans%mod)', 'n,m,k=map(int,input().split())\nmod=998244353\ncntb=1\nans=0\nfor i in range(k+1):\n ans=ans...
['Runtime Error', 'Accepted']
['s054470386', 's944914077']
[9036.0, 9204.0]
[25.0, 1295.0]
[215, 208]
p02686
u014800961
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['n = int(input())\nslist = []\nfor i in range(n):\n slist.append(input())\n\nfirst_list = []\nlast_list = []\nfor i in range(n):\n s = slist[i]\n\n a_count = 0\n b_count = 0\n min_s = ""\n for c in s:\n if c == ")":\n b_count-=1\n else:\n b_count+=1\n if b_c...
['Wrong Answer', 'Accepted']
['s840914422', 's797302058']
[111580.0, 69868.0]
[2209.0, 1772.0]
[1015, 1147]
p02686
u023229441
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys\nimport math\nimport heapq\nmod=10**9+7\ninf=float("inf")\nfrom math import sqrt\nfrom collections import deque\nfrom collections import Counter\nfrom math import ceil\ninput=lambda: sys.stdin.readline().strip()\nsys.setrecursionlimit(11451419)\nfrom functools import lru_cache\n\n\n\n\n\n\nA=list(map(int,i...
['Runtime Error', 'Accepted']
['s988323864', 's087580580']
[9472.0, 111496.0]
[29.0, 1869.0]
[1227, 765]
p02686
u036104576
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys\nimport itertools\nimport numpy as np\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n \n# n = map(int, readline().split())\nn = int(input())\n\nls = []\nrs = []\n\ntotal = 0\nfor i in range(n):\n s = input().strip()\n\n b = 0\n h = 0\...
['Wrong Answer', 'Accepted']
['s749992651', 's016225703']
[102108.0, 117952.0]
[1974.0, 1166.0]
[884, 906]
p02686
u044220565
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['# coding: utf-8\nimport sys\n#from operator import itemgetter\nsysread = sys.stdin.readline\nread = sys.stdin.read\nfrom heapq import heappop, heappush\n#from collections import defaultdict\nsys.setrecursionlimit(10**7)\n#import math\n#from itertools import combinations, product\n\n#import numpy as np\n\ndef run():\n...
['Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s121302134', 's272695452', 's354942074', 's364124764', 's416968816', 's311496118']
[26768.0, 9192.0, 26824.0, 26760.0, 26676.0, 198912.0]
[1256.0, 23.0, 2206.0, 1263.0, 1248.0, 994.0]
[1140, 563, 1615, 1663, 1702, 1316]
p02686
u066413086
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\ndef main():\n N = int(input())\n S = [sys.stdin.readline().strip() for i in range(N)]\n DR = []\n for s in S:\n d = 0 \n rmax = 0 \n # rmax <= d\n for lr in s:\n if lr == '(':\n d += 1\n else:\n d -= 1\n ...
['Wrong Answer', 'Accepted']
['s697620992', 's793177420']
[163972.0, 95644.0]
[853.0, 1546.0]
[914, 968]
p02686
u084865106
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import itertools\n\nn = int(input())\n\ns = []\nfor i in range(n):\n s.append(input())\n\ncomb_s = list(itertools.combinations(s, len(s)))\n\ndef checker(x):\n jud = 1\n ans = ''.join(x)\n\n if not s:\n return jud\n\n print(ans)\n r = x.count('(')\n l = x.count(')')\n if r != l:\n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s367317950', 's499450403', 's509571290', 's787491903', 's863580324', 's889694591', 's980069330', 's816873666']
[53920.0, 45376.0, 9076.0, 56668.0, 2002160.0, 2084524.0, 45356.0, 44464.0]
[1175.0, 495.0, 24.0, 1193.0, 2261.0, 2255.0, 497.0, 571.0]
[599, 631, 617, 622, 593, 544, 604, 626]
p02686
u144540235
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['# **************************************************************************** #\n# #\n# __ __ .____ .__ __. ____ #\n\n# | | | || |_| || \\ / ||...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s096781283', 's832027831', 's925694123', 's781937073']
[9228.0, 150572.0, 112748.0, 26600.0]
[24.0, 2226.0, 1896.0, 1175.0]
[2206, 1186, 974, 2220]
p02686
u169350228
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['n = int(input())\nsco = [] \nssum = 0\n\nfor i in range(n):\n s = input()\n sa = 0\n ms = 0\n for i in range(len(s)):\n if s[i] == "(":\n sa += 1\n else:\n sa -= 1\n if ms > sa:\n ms = sa\n sco.append([ms,sa])\n ssum += sa\n\nif not ssum == 0:\n ...
['Wrong Answer', 'Accepted']
['s315436424', 's578834278']
[98156.0, 52472.0]
[2208.0, 1891.0]
[511, 665]
p02686
u221264296
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['def pdebut(s):\n\to = 0\n\tfor c in s:\n\t\tif c==\'(\':o+=1\n\t\telse: o-=1\n\t\tif o<0 : return False\n\treturn o>=0\n\t\ndef pfin(s):\n\tc = 0\n\tfor o in s[::-1]:\n\t\tif o==\')\':\n\t\t\tc+=1\n\t\telse:c-=1\n\t\tif c<0: return False\n\treturn c>=0\n\t\ndef valuer(s):\n\to = 0\n\tfor c in s:\n\t\tif c==\'(\':o+=1...
['Runtime Error', 'Accepted']
['s593397280', 's598895255']
[68556.0, 76340.0]
[1622.0, 1693.0]
[945, 929]
p02686
u223646582
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["N = int(input())\nS_list = [input() for _ in range(N)]\n\nmin_revr, min_revl = 10**20, 10**20\nleft, rev_l, rev_r, right = 0, 0, 0, 0\nfor S in S_list:\n stack = []\n l, r = 0, 0\n for s in S:\n if s == '(':\n if stack and stack[-1] == ')':\n stack.append('(')\n ...
['Wrong Answer', 'Accepted']
['s413819045', 's919949860']
[40048.0, 39948.0]
[1342.0, 1306.0]
[1010, 1186]
p02686
u307622233
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["def count_scan(s):\n max_min = 0\n compare = 0\n for c in s:\n if c == '(':\n compare += 1\n elif c == ')':\n compare -= 1\n max_min = min(max_min, compare)\n return min(max_min, compare), compare\n\n\ndef key(lst):\n m, c = lst\n if c > 0:\n ret...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s307220865', 's529928349', 's533160923', 's874898413', 's891047205', 's135004977']
[9156.0, 41800.0, 41940.0, 8896.0, 41920.0, 234948.0]
[24.0, 1227.0, 1221.0, 23.0, 1220.0, 1042.0]
[724, 281, 254, 692, 293, 1127]
p02686
u347640436
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['from functools import reduce\nfrom itertools import permutations\n\ndef f(s):\n while True:\n t = s.replace(\'()\', \'\')\n if t == s:\n return s\n s = t\n\nN = int(input())\nS = [input() for _ in range(N)]\n\nl = 0\nr = 0\nfor s in S:\n t = s.count(\'(\')\n l += t\n r += l...
['Runtime Error', 'Accepted']
['s602722918', 's097308351']
[49964.0, 171416.0]
[2207.0, 1819.0]
[1119, 503]
p02686
u392319141
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\ninput = sys.stdin.readline\n\nN = int(input())\nS = [input().rstrip() for _ in range(N)]\n\ndef calc(S):\n now = 0\n ret = 0\n for s in S:\n if s == '(':\n now += 1\n else:\n now -= 1\n ret = min(ret, now)\n return ret\n\nH = []\nP = []\nL = []\n\nfor...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s369128179', 's706461560', 's198142326']
[66616.0, 97348.0, 163304.0]
[997.0, 992.0, 1997.0]
[779, 589, 535]
p02686
u434846982
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['from functools import reduce\nn, *s = open(0).read().split()\nu = []\nfor t in s:\n close_cnt = 0\n tmp = 0\n for c in t:\n tmp += (1 if c == \'(\' else -1)\n close_cnt = min(close_cnt, tmp)\n u.append((close_cnt, tmp - close_cnt))\nM = 10**6 + 1\nacc = 0\nfor a, b in sorted(u, key=lambda z:...
['Wrong Answer', 'Accepted']
['s918449380', 's098804497']
[139936.0, 139828.0]
[873.0, 1042.0]
[450, 466]
p02686
u447899880
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['n=int(input())\ns1=0\ns2=0\ns3=list()\ns4=list()\ns5=list()\nfor i in range(n):\n a=str(input())\n a=a.replace(r\'()\',\'\')\n if len(a)==0:\n continue\n if a[0]=="(" and a[-1]=="(":\n s1+=len(a)\n elif a[0]==")" and a[-1]==")":\n s2+=len(a)\n else:\n x=len(a.replace("(",...
['Runtime Error', 'Runtime Error', 'Accepted']
['s732474865', 's963808895', 's967177447']
[29900.0, 9308.0, 13216.0]
[1576.0, 26.0, 1787.0]
[951, 1273, 1285]
p02686
u479719434
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['def main():\n N = int(input())\n up_lines = []\n down_lines = []\n for i in range(N):\n s = input()\n height = 0\n bottom = 0\n for c in s:\n if c == "(":\n height += 1\n else:\n height -= 1\n bottom = min(botto...
['Runtime Error', 'Accepted']
['s101451026', 's642611525']
[80372.0, 84196.0]
[1367.0, 1555.0]
[989, 981]
p02686
u497952650
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys\ndef input():\n return sys.stdin.readline().strip()\n\nN = int(input())\nS = [input() for _ in range(N)]\n\ntmp = []\nfor i,s in enumerate(S):\n tmp.append([s.count("(")-s.count(")"),i])\n\ntmp.sort(reverse=True)\n\na = 0\nb = 0\ns = ""\nfor _,i in tmp:\n s += S[i]\nprint(s)\nfor i in s:\n if i...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s012784125', 's244047315', 's703854559', 's852064775', 's925890502', 's317571252']
[139428.0, 117108.0, 140360.0, 139444.0, 117324.0, 104428.0]
[1736.0, 1978.0, 2211.0, 1809.0, 1516.0, 1366.0]
[448, 598, 441, 448, 521, 725]
p02686
u532966492
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['def main():\n from sys import stdin\n input = stdin.readline\n n = int(input())\n S = [input() for _ in [0]*n]\n s2 = []\n s3 = []\n for s in S:\n temp = [0, 0]\n m = 0\n now = 0\n for i in s:\n if i == "(":\n now += 1\n else:\n ...
['Wrong Answer', 'Accepted']
['s788351032', 's392310458']
[175620.0, 175688.0]
[1585.0, 1460.0]
[895, 908]
p02686
u533039576
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\ninput = sys.stdin.readline\n\nn = int(input())\ns = [input() for _ in range(n)]\n\n\ndef bracket(x):\n # f: final sum of brackets '(':+1, ')': -1\n # m: min value of f\n f = m = 0\n for i in range(len(x)):\n if x[i] == '(':\n f += 1\n else:\n f -= 1\n ...
['Wrong Answer', 'Accepted']
['s448858001', 's835466774']
[155428.0, 99504.0]
[1400.0, 1406.0]
[813, 762]
p02686
u691018832
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nn = int(readline())\ns = [readline().rstrip().decode() for _ in range(n)]\ninc = []\ndec = []\nfor ss in s:\n d, r = 0, 0\n for m in ss:\n d += 1 if s ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s818985889', 's891089847', 's002404821']
[95940.0, 95816.0, 84072.0]
[1017.0, 1061.0, 1064.0]
[632, 634, 627]
p02686
u764956288
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['# import sys\n# input = sys.stdin.readline\n\n\ndef solve():\n N = int(input())\n brackets_gen = (input() for _ in range(N))\n\n grads_positive = list()\n grads_negative = list()\n\n for brackets in brackets_gen:\n\n elevation, bottom = 0, 0\n\n for bk in brackets:\n\n elevatio...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s758512495', 's945665736', 's581028900']
[80416.0, 9252.0, 80296.0]
[1528.0, 25.0, 742.0]
[1168, 1215, 1167]
p02686
u808817704
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['#from collections import defaultdict, deque\n#import itertools\n#import numpy as np\n#import re\n\ndef main():\n N = int(input())\n SS = []\n for _ in range(N):\n SS.append(input())\n S = []\n for s in SS:\n while \'()\' in s:\n s = s.replace(\'()\', \'\')\n S.append(s)\...
['Runtime Error', 'Accepted']
['s452630178', 's451416803']
[55152.0, 56928.0]
[1194.0, 1182.0]
[1494, 1721]
p02686
u845573105
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['dicpos = {}\ndicneg = {}\n\nN = int(input())\nfor i in range(N):\n buf = [0]\n for s in input():\n if s=="(":\n buf.append(buf[-1] + 1)\n else:\n buf.append(buf[-1] - 1)\n low = min(buf)\n last = buf[-1]\n if last>0:\n if low in dicpos:\n dicpos[low].append(last)\n else:\n dicpos[...
['Wrong Answer', 'Accepted']
['s782543663', 's338457023']
[21040.0, 17168.0]
[1902.0, 1836.0]
[951, 1036]
p02686
u863442865
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["print('No')", "\n\n\n\n\n\ndef main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq impo...
['Wrong Answer', 'Accepted']
['s748811941', 's067951779']
[9152.0, 84552.0]
[23.0, 568.0]
[11, 1509]
p02686
u868082223
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\nimport heapq\n\ndef end(flag):\n if flag:\n print('Yes')\n else:\n print('No')\n exit(0) \n\nn = int(input())\nplus = []\nminus = []\nzero = []\ntotal = 0\nfor i in range(n):\n s = input()[:-1] \n cnt = 0\n M = 0\n m = 0\n for t in s:\n if t == ')': \n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s243446614', 's445693525', 's612719532', 's702157324', 's195015665']
[80428.0, 80292.0, 80284.0, 80284.0, 103692.0]
[1721.0, 2225.0, 1669.0, 1692.0, 1408.0]
[1450, 1490, 1202, 1499, 610]
p02686
u869567753
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["import sys\nreadline = sys.stdin.readline\n\ndef main():\n N = int(readline())\n Sp = []\n Sm = []\n total = 0\n bm = 0\n for i in range(N):\n l = readline().strip()\n print(l)\n b = 0\n h = 0\n for j in range(len(l)):\n if l[j] == '(':\n h += 1\n else:\n h -= 1\n b =...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s109557794', 's116534109', 's239457918', 's709300924', 's822659781', 's220565068']
[100128.0, 96300.0, 9012.0, 52600.0, 105900.0, 99704.0]
[1524.0, 2161.0, 22.0, 976.0, 2222.0, 1280.0]
[897, 720, 777, 876, 820, 884]
p02686
u896741788
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['n=int(input())\npo,ne=[],[]\nnow=0\nfor i in range(n):\n p=0\n mp=0\n for j in input():\n p+=(1,-1)[j==")"]\n mp=min(p,mp)\n if mp:\n if p>=0:\n po.append((mp,p))\n else:ne.append((mp-p,-p))\n else:now+=p\npo.sort(reverse=1)\nne.sort(reevrse=1)\nfor m,p in po+ne:\...
['Runtime Error', 'Accepted']
['s013322478', 's727103163']
[44748.0, 44512.0]
[1600.0, 1659.0]
[388, 459]
p02686
u923172145
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys\ninput = sys.stdin.readline\n\nN = int(input())\n\nS = [input() for _ in range(N)]\nS_p = []\nS_n = []\n\nfor i in range(N):\n end = 0\n mim = 0\n for j in range(len(S[i])):\n if S[i][j] == "(":\n end += 1\n else :\n end -= 1\n mim = min(mim,end)\n \n if end >= 0:\n S_p.append((m...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s435988791', 's466307589', 's573731170']
[151544.0, 109012.0, 96112.0]
[1443.0, 2223.0, 1494.0]
[809, 539, 779]
p02686
u937642029
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys, bisect, math, itertools, string, queue, copy\n# import numpy as np\n\nfrom collections import Counter,defaultdict,deque\nfrom itertools import permutations, combinations\nfrom heapq import heappop, heappush\nfrom fractions import gcd\n# input = sys.stdin.readline\nsys.setrecursionlimit(10**8)\nmod = 10**9...
['Wrong Answer', 'Accepted']
['s866992066', 's057141232']
[184852.0, 103796.0]
[2210.0, 1867.0]
[1677, 1687]
p02686
u968404618
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['def main():\n ## IMPORT MODULE\n #import sys\n\n \n #input=lambda :sys.stdin.readline().rstrip()\n\n #f_inf=float("inf")\n #MOD=10**9+7\n \n if \'get_ipython\' in globals(): \n ## SAMPLE INPUT\n n = 4\n S= [\'((()))\', \'((((((\', \'))))))\', \'()()()\']\n\n else:\n ##INPUT \n n = int(input())...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s390102912', 's448760632', 's908035251', 's523161738']
[167144.0, 166976.0, 9164.0, 170772.0]
[1691.0, 1683.0, 24.0, 1713.0]
[967, 969, 962, 975]
p02686
u989345508
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['from itertools import *\nn,*s=open(0).read().split()\nu=[[min(accumulate(t,lambda a,b: a+(1 if b=="(" else -1),initial=0)),2*t.count("(")-len(t)] for t in s]\nm=0\nfor c,d in chain(sorted([x for x in u if x[1]>=0])[::-1],sorted([x for x in u if x[1]<0],key=lambda z:z[0]-z[1])):\n if m+c<0:print("No");break\n m+...
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s050803613', 's100058436', 's158765491', 's198637634', 's366104000', 's382384887', 's514377299', 's833112459', 's880744670', 's934235648', 's201136465']
[119448.0, 9004.0, 143788.0, 44556.0, 120104.0, 127944.0, 119516.0, 119612.0, 119420.0, 111948.0, 119404.0]
[1414.0, 26.0, 2199.0, 66.0, 1313.0, 1512.0, 1423.0, 1565.0, 1333.0, 2208.0, 1559.0]
[344, 455, 810, 341, 455, 487, 341, 358, 354, 597, 348]
p02686
u994935583
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
['import sys\nreadline = sys.stdin.readline\n\ndef resolve():\n N = int(readline())\n S = [readline().strip() for i in range(N)]\n L,R = [],[]\n D = []\n for i in range(N):\n L_R = [0,0] \n for i in S:\n if i == ")":\n if L_R[1] > 0 :\n L_R[1] -=...
['Wrong Answer', 'Accepted']
['s813535028', 's987190171']
[116816.0, 66712.0]
[2210.0, 353.0]
[1168, 1097]
p02686
u997641430
2,000
1,048,576
A **bracket sequence** is a string that is one of the following: 1. An empty string; 2. The concatenation of `(`, A, and `)` in this order, for some bracket sequence A ; 3. The concatenation of A and B in this order, for some non-empty bracket sequences A and B / Given are N strings S_i. Can a bracket sequence ...
["n = int(input())\nS = [input() for i in range(n)]\nAB = []\nfor i in range(n):\n a, b = 0, 0\n for c in S[i]:\n if c == '(':\n b += 1\n if c == ')':\n if b > 0:\n b -= 1\n else:\n a += 1\n AB.append((a, b))\nAB0 = [(a, b) for a, b i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s285883050', 's714398281', 's348956504']
[167276.0, 163860.0, 91756.0]
[2080.0, 2117.0, 1758.0]
[578, 470, 528]
p02687
u000513658
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["#A\ns = input()\n\nif s == ABC:\n print('ARC')\nelse:\n print('ABC')", "#A\ns = input()\n\nif s == ABC:\n print('ARC')\nelse:\n print('ABC')", "#A\ns = input()\n\nif s == 'ABC':\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Runtime Error', 'Accepted']
['s253887373', 's808851720', 's553509764']
[8960.0, 9028.0, 9092.0]
[23.0, 22.0, 22.0]
[68, 68, 70]
p02687
u001839988
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = input()\n\nif S is "ABC":\n print("ARC")\nelse:\n print("ABC")', 'S = input()\n\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s503834205', 's086670700']
[9092.0, 8956.0]
[21.0, 18.0]
[63, 63]
p02687
u004823354
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = str(input())\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")', 'S = input()\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s302496837', 's198799188']
[8832.0, 8916.0]
[21.0, 26.0]
[66, 62]
p02687
u007637377
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['from sys import stdin\ninput = stdin.readline\n\nfrom collections import deque\n\nX = int(input())\ns = {}\nq = deque()\n\nq.append([1, 0])\nwhile True:\n\tab = q.popleft()\n\ttmp = ab[0] ** 5 - ab[1] ** 5\n\tif (tmp == X):\n\t\tprint(ab[0], ab[1])\n\t\tquit()\n\telif (tmp > X):\n\t\tq.append([ab[0] - 1, ab[1]])\n\t\...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s538892821', 's633076528', 's695815091']
[9432.0, 8996.0, 8996.0]
[22.0, 19.0, 24.0]
[387, 108, 110]
p02687
u007738720
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["S='ABC'\nif S='ABC':\n print('ARC')\nelse:\n print('ABC')", "S=input('S')\nif S='ABC':\n print('ARC')\nelse:\n print('ABC')", "S=input()\nif S is 'ABC':\n print('ARC')\nelse:\n print('ABC')", "S=input()\nif 'B' in S:\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s521902429', 's634709231', 's751792726', 's533727136']
[8960.0, 9012.0, 9028.0, 8904.0]
[23.0, 21.0, 21.0, 24.0]
[55, 60, 60, 58]
p02687
u015993380
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["s = input()\nprint('ABC' if s == 'ARC' else 'ABC')", "s = input()\nprint('ABC' if s == 'ARC' else 'ARC')"]
['Wrong Answer', 'Accepted']
['s576885905', 's277380140']
[8924.0, 9012.0]
[22.0, 23.0]
[49, 49]
p02687
u019355060
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S=input()split()\nif S=="ABC":\n print("ARC")\nelse:\n print("ABC")', '#A,B=map(input().split())\nS=input().split()\nif S=="ABC":\n print("ARC")\nelse:\n print("ABC")', 'S=input()\nif S=="ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s517198171', 's535829145', 's965539348']
[8828.0, 9028.0, 9024.0]
[21.0, 20.0, 22.0]
[69, 96, 62]
p02687
u020798319
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s = input().split()\nif s == "ABC":\n print("ARC")\nelif s == "ARC":\n print("ABC")\n ', 'S = str(input().split())\nif S == "ABC":\n print("ARC")\nelif S == "ARC":\n print("ABC")', 's = str, input().split()\nif s == "ABC":\n print("ARC")\nelif s == "ARC":\n print("ABC")', 'S = input()\nif S == "ABC":\n print("...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s061680371', 's452704098', 's778633826', 's292029969']
[9008.0, 8864.0, 9028.0, 8996.0]
[24.0, 25.0, 24.0, 31.0]
[83, 86, 86, 63]
p02687
u021849254
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['if int(input())==ABC:\n print("ARC")\nelse :\n print("ABC")', 'if input()=="ABC":\n print("ARC")\nelse :\n print("ABC")']
['Runtime Error', 'Accepted']
['s759386904', 's718914329']
[9100.0, 9012.0]
[22.0, 25.0]
[58, 55]
p02687
u022658079
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S=list(map(int, input().split()))\nif S==\'ARC\':\n print("ABC")\nelse:\n print("ARC")', 'S=input()\nif S=="ARC":\n print("ABC")\nelse:\n print("ARC")']
['Runtime Error', 'Accepted']
['s198642053', 's800884477']
[9100.0, 9020.0]
[24.0, 22.0]
[82, 58]
p02687
u023632682
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["S = 'ABC' or 'ARC'\nprint(S)\n\nif (S == 'ABC'):\n print('ARC')\nelse:\n print('ABC')", "S = input()#ABC or ARC\n\nif (S == 'ABC'):\n print('ARC')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s416011773', 's011223020']
[9024.0, 8980.0]
[23.0, 19.0]
[85, 80]
p02687
u025463382
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s = input()\nif s = "ABC":\n print("ARC")\nelse:\n print("ABC")', 's = input()\nif s == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s526645967', 's313156399']
[8880.0, 9024.0]
[20.0, 22.0]
[61, 62]
p02687
u029785897
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['last_name = input()\nlast_type = last_name[:3]\n\nif last_type == "ABC":\n return "ARC"\nelse:\n return "ABC"', 'last_name = input()\nlast_type = last_name[:3]\n \nif last_type == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s154242889', 's952098959']
[9004.0, 9012.0]
[23.0, 22.0]
[105, 106]
p02687
u030278108
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = str(input())\n\nif S == ABC:\n print("ARC")\nelse:\n print("ABC")', 'S = str(input())\n\nif S == \'ABC\':\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s647997107', 's117652189']
[9088.0, 9088.0]
[19.0, 19.0]
[66, 72]
p02687
u032798323
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = input()\n\nif S == ABC:\n print("ARC")\nelse:\n print("ABC")', 'S = input()\n\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s133307830', 's048245903']
[9028.0, 9036.0]
[23.0, 20.0]
[65, 67]
p02687
u035453792
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s=input()\nif s==ABC:\n print("ARC")\nelse:\n print("ABC")\n ', 's=input()\nif s=="ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s541574077', 's699039937']
[9004.0, 9036.0]
[19.0, 21.0]
[60, 58]
p02687
u038408819
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['x = int(input())\n\nfor i in range(1000):\n #for j in range(10)\n #print(i ** 5)\n for j in range(1000):\n #print(i ** 5 - j ** 5)\n if i ** 5 - j ** 5 == x:\n print(i, j)\n quit()\n elif i ** 5 - (-j) ** 5 == x:\n print(i, -j)\n quit()\n ...
['Runtime Error', 'Accepted']
['s793761377', 's865948092']
[9136.0, 9028.0]
[22.0, 22.0]
[467, 66]
p02687
u039189422
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['from sys import exit\n\nx=int(input())\nfor i in range(0,201):\n\tfor j in range(-200,i):\n\t\tif i**5-j**5==x:\n\t\t\tprint(i,j)\n\t\t\texit()', 's=input()\nif s=="ABC":\n\tprint("ARC")\nelse:\n\tprint("ABC")']
['Runtime Error', 'Accepted']
['s928228548', 's317663284']
[9028.0, 9024.0]
[22.0, 23.0]
[127, 56]
p02687
u042209706
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")\n', 'if S == "ABC":\n return "ARC"\nelse:\n return "ABC"', 'S = input()\nif S == "ABC":\n print "ARC"\nelse:\n print "ABC"', 'S = input()\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s085386721', 's090717114', 's452944787', 's697305803']
[9000.0, 9004.0, 8940.0, 9004.0]
[22.0, 23.0, 22.0, 20.0]
[52, 50, 60, 62]
p02687
u042347918
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['N, M = list(map(int, input().split()))\n\nH = list(map(int, input().split()))\n\nans = [1]*N\n\nfor i in range(M):\n A, B = list(map(int, input().split()))\n if H[A-1] > H[B-1]:\n ans[B-1] = 0\n elif H[A-1] < H[B-1]:\n ans[A-1] = 0\n else:\n ans[A-1] = 0\n ans[B-1] = 0\n\nprint...
['Runtime Error', 'Accepted']
['s334172824', 's022083392']
[9140.0, 9076.0]
[21.0, 31.0]
[312, 109]
p02687
u047502873
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = input("ABC")\nif S == \'ABC\':\n print(\'ARC\')\nelse:\n print(\'ABC\')', "S = input()\nif S == 'ABC':\n print('ARC')\nelse:\n print('ABC')"]
['Wrong Answer', 'Accepted']
['s615454946', 's815018182']
[8956.0, 9028.0]
[24.0, 25.0]
[71, 66]
p02687
u047719604
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['n,m = map(int,input().split())\nheight = list(map(int,input().split()))\nlst = [0]*n\nfor j in range(m):\n x,y = map(int,input().split())\nif height[x-1] >= height[y-1]:\n lst[y-1] = 1\nif height[x-1] <= height[y-1]:\n lst[x-1] = 1\nprint(lst.count(0))', 'n,m = map(int,input().split())\nheight = list(map(int...
['Runtime Error', 'Runtime Error', 'Accepted']
['s564027244', 's820756082', 's046430563']
[9084.0, 9080.0, 8916.0]
[19.0, 21.0, 24.0]
[252, 264, 62]
p02687
u048521352
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s=str(input())\nprint(s)', 's=str(input())\nif s ="ARC":\n print("ABC")\nelse:\n print("ARC")', 's=str(input())\nif s =="ARC":\n print("ABC")\nelse:\n print("ARC")']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s470704180', 's961283069', 's436354768']
[9012.0, 8880.0, 9092.0]
[21.0, 23.0, 18.0]
[23, 63, 64]
p02687
u049679412
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["s = input()\nif s == 'ABC:\n\tprint('ARC')\nelse:\n\tprint('ABC') ", "s = input()\nif s == 'ABC':\n\tprint('ARC')\nelse:\n\tprint('ABC') "]
['Runtime Error', 'Accepted']
['s450803666', 's970365042']
[8900.0, 9068.0]
[19.0, 21.0]
[61, 62]
p02687
u051331793
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["s = int(input())\nif s == 'ABC':\n print('ARC')\nelse:\n print('ABC')", "s = input()\nif s == 'ABC':\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s938396958', 's279809752']
[9028.0, 9024.0]
[22.0, 21.0]
[67, 62]
p02687
u051684204
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S=input()\nif S="ABC":\n print("ARC")\nelif S="ARC":\n print("ABC")', 'S=input()\nif S=="ABC":\n print("ARC")\nelif S=="ARC":\n print("ABC")']
['Runtime Error', 'Accepted']
['s554356027', 's884437431']
[8948.0, 9084.0]
[24.0, 24.0]
[65, 67]
p02687
u053699292
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["if __name__ == '__main__':\n\tS = input()\n\tif S =='ABC':\n\t\tprint('SRC')\n\telse:\n\t\tprint('ABC')\n\t", "if __name__ == '__main__':\n\tS = input()\n\tif S =='ABC':\n\t\tprint('ARC')\n\telse:\n\t\tprint('ABC')\n\t"]
['Wrong Answer', 'Accepted']
['s449829666', 's938211560']
[9016.0, 8976.0]
[22.0, 21.0]
[93, 93]
p02687
u054825571
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S=input()\nprint("ABC" if S!="ABC" else S)', 'S=input()\nprint(S if S!="ABC" else "ABC")', 'S=input()\nprint("ARC" if S=="ABC" else "ABC")']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s307087036', 's666278896', 's771387192']
[9020.0, 9024.0, 9052.0]
[28.0, 29.0, 30.0]
[41, 41, 45]
p02687
u055220405
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s = input()\nif(s[1] == "R"):\n print("ABC")\n else:\n print("ARC")\n ', 's = input()\nif(s[1] == "R"):\n print("ABC")\nelse:\n print("ARC")']
['Runtime Error', 'Accepted']
['s246038197', 's042982083']
[8896.0, 8920.0]
[21.0, 25.0]
[68, 64]
p02687
u055244973
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["S = str(input())\nif S == 'ABC'\n\tprint('ARC')\nelse S == 'ARC'\n\tprint('ABC')", "S = str(input())\nif S == 'ABC'\n\tprint('ARC')\nelif S == 'ARC'\n\tprint('ABC')", "S = str(input())\nif S == 'ABC'\n\tprint('ARC')\nelse S == 'ARC'\n\tprint('ABC')", "S = str(input())\nif S == 'ABC'\n\tprint('ARC')\nelse\n\tprint('AB...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s073631344', 's628023251', 's951890461', 's981050383', 's377678106']
[9012.0, 8788.0, 8892.0, 8948.0, 8964.0]
[23.0, 19.0, 19.0, 22.0, 19.0]
[74, 74, 74, 63, 65]
p02687
u055668007
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["import sys\ninput = sys.stdin.readline\n\nstrA = str(input())\n\nif strA == 'ABC':\n print('ARC')\nelif strA == 'ARC':\n print('ABC')\nelse:\n print('')", "import sys\ninput = sys.stdin.readline\n\nhoge = str(input())\n\nif hoge == 'ARC':\n print('ABC')\nelif hoge == 'ABC':\n print('ARC')", "import sys\ninput = ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s078695632', 's141565636', 's275440890', 's454040238', 's721212160', 's816963863', 's449036960']
[8964.0, 8972.0, 8956.0, 8956.0, 8956.0, 9028.0, 8920.0]
[22.0, 23.0, 24.0, 21.0, 23.0, 24.0, 20.0]
[145, 127, 142, 114, 144, 126, 167]
p02687
u057065089
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['N = int(input())\np = list(map(int, input().split()))\nsum = [i + 1 + x for i, x in enumerate(p)]\ndif = [i + 1 - x for i, x in enumerate(p)]\nans = 0\n\nfor i in range(N):\n ans += sum.count(dif[i])\n\nprint(ans)', 'S = input()\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s446760208', 's409493813']
[9192.0, 9032.0]
[19.0, 20.0]
[207, 66]
p02687
u058063801
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = "ABC"\nS = "ARC"', 'if S = "ABC":\n print "ARC"\nelse:\n print "ABC"', 'S = "ABC" or "ARC"', 'ABC = S\nARC = S', 'if S = "ABC"{\n print("ARC")\n}else{\n print("ABC")\n ', 'S = input()\n\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s113563255', 's218179867', 's258455309', 's744877870', 's851539210', 's229479243']
[9100.0, 8844.0, 9012.0, 8976.0, 8920.0, 9032.0]
[21.0, 20.0, 21.0, 23.0, 23.0, 24.0]
[19, 47, 18, 15, 64, 63]
p02687
u058264533
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['\nn = input()\n\nif n == ABC:\n print("ARC")\nelse:\n print("ABC")', '\nn = input()\n\nif n == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s188891405', 's179381704']
[9088.0, 8960.0]
[24.0, 20.0]
[66, 68]
p02687
u058496530
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['x = input()\n\nif x = "ABC":\n print("ARC")\nelse:\n print("ABC")', 'x = input()\n\nif x == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Accepted']
['s455023635', 's542941372']
[8876.0, 9020.0]
[27.0, 22.0]
[62, 63]
p02687
u060012100
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s = input().split()\nif(s = \'ABC\'):\n print("ARC")\nelse:\n print("ABC")', 's= map.input()\nif(s == "ABC"):\n print("ARC")\nelse:\n print("ABC")', 's= input()\nif(s == "ABC"):\n print("ARC")\nelse:\n print("ABC")']
['Runtime Error', 'Runtime Error', 'Accepted']
['s638755210', 's961266619', 's547180919']
[8992.0, 8628.0, 9028.0]
[24.0, 24.0, 20.0]
[70, 66, 62]
p02687
u060793972
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["printt('ARC' if input()=='ABC' else 'ABC')", 'x = int(input())\nfor i in range(-102,103):\n for j in range(-102,103):\n if (i**5)-(j**5)==x:\n print(i,j)\n exit()\n', 'mycode', "print('ARC' if input()=='ABC' else 'ABC')"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s035402065', 's118863138', 's755228423', 's957158839']
[8788.0, 9160.0, 9008.0, 8972.0]
[22.0, 24.0, 24.0, 26.0]
[42, 144, 6, 41]
p02687
u063346608
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['for okashi_number in range(k):\n\tdi = int(input())\n\tD = map(int,input().split())\n\tfor x in range(di)\n\t\tA[[x]-1] = 1\n\nfor i in range(N):\n\tif A[i] == 0:\n\tprint(A[i])\n', 'S = input()\n\nif S == "ABC":\n\tprint("ARC")\nelse:\n\tprint("ABC")']
['Runtime Error', 'Accepted']
['s136535961', 's753728124']
[8832.0, 8908.0]
[27.0, 27.0]
[163, 61]
p02687
u067095357
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['n, m = list(map(int, input().split()))\nhs = list(map(int, input().split()))\nans = [1]*n\nfor i in range(m):\n road = list(map(int, input().split()))\n if hs[road[0]-1] <= hs[road[1]-1]:\n ans[road[0]-1] = 0\n if hs[road[0]-1] >= hs[road[1]-1]:\n ans[road[1]-1] = 0\nprint(ans.count(0))\n', 's ...
['Runtime Error', 'Accepted']
['s126735899', 's005928674']
[9172.0, 9116.0]
[20.0, 24.0]
[302, 66]
p02687
u067986264
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['x = int(input())\nfor a in range(-10000, 10000):\n for b in range(-1000, 1000):\n if a**5 - b**5 == x:\n print(a, b)\n quit()', 'x = int(input())\nfor a in range(-1000, 1000):\n for b in range(-1000, 1000):\n if a**5 - b**5 == x:\n print(a, b)\n quit()',...
['Runtime Error', 'Runtime Error', 'Accepted']
['s229062961', 's769678711', 's609998236']
[9052.0, 9060.0, 9024.0]
[20.0, 25.0, 23.0]
[152, 150, 50]
p02687
u069273180
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s=input()\n\nif s == "ABC":\n print(s)\nelse:\n print("ARC")\n', 's=input()\n \nif s == "ARC":\n print("ABC")\nelse:\n print("ARC")']
['Wrong Answer', 'Accepted']
['s749516870', 's493465866']
[9016.0, 9028.0]
[19.0, 22.0]
[58, 62]
p02687
u071829175
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = input()\nx == ARC\nif S == ARC:\n x == ABC\nprint(x)', 'S = input()\nx = "ARC"\nif S == "ARC":\n x = "ABC"\nprint(x)']
['Runtime Error', 'Accepted']
['s034844566', 's508502457']
[8896.0, 9016.0]
[20.0, 24.0]
[53, 57]
p02687
u072284094
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["if(input().rstrip() == 'ABC':\n print('ARC')\nelse:\n print('ABC')\t", "if(input().rstrip() == 'ABC'):\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s369372713', 's769076276']
[9020.0, 9044.0]
[20.0, 26.0]
[68, 70]
p02687
u073800107
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['string = input()\nprint(string)', 'string = input()\n\nif string == "ABC":\n print("ARC")\nelse:\n print("ABC")']
['Wrong Answer', 'Accepted']
['s517435203', 's360288220']
[8768.0, 8960.0]
[29.0, 30.0]
[30, 73]
p02687
u075303794
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["S = input()\nif S == 'ABC':\n print('ARC')\nelif S == 'ARC'):\n print('ARC')", "S = input()\n\nif S == 'ARC':\n print('ABC')\nelif S == 'ABC':\n print('ARC')"]
['Runtime Error', 'Accepted']
['s779260843', 's742114323']
[8892.0, 8912.0]
[21.0, 20.0]
[74, 74]
p02687
u075304271
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['mport itertools\nimport math\n\ndef solve():\n s = input()\n if s == "ABC":\n print("ARC")\n else:\n print("ABC")\n return 0\n\n \nif __name__ == "__main__":\n solve()\n', 'def solve():\n s = input()\n if s == "ABC":\n print("ARC")\n else:\n print("ABC")\n return 0\n\n \nif __name__ == "__main__"...
['Runtime Error', 'Accepted']
['s351201362', 's554874254']
[8944.0, 8956.0]
[19.0, 22.0]
[166, 137]
p02687
u075595666
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['x = int(input())\ndef factorization(n):\n arr = []\n temp = n\n for i in range(2, int(-(-n**0.5//1))+1):\n if temp%i==0:\n cnt=0\n while temp%i==0:\n cnt+=1\n temp //= i\n arr.append([i, cnt])\n if temp!=1:\n arr.append([temp, 1]...
['Runtime Error', 'Runtime Error', 'Accepted']
['s554675057', 's900370472', 's631293679']
[9116.0, 9328.0, 9020.0]
[20.0, 21.0, 23.0]
[792, 1342, 63]
p02687
u080685822
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['s = input()\nif s == "ARC":\n\tprint("ABC")\nelif s == "ABC":\n print("ARC")\nelse:\n break', 's = input()\nif s == "ARC":\n\tprint("ABC")\nelse:\n print("ARC")']
['Runtime Error', 'Accepted']
['s096915920', 's799848212']
[9024.0, 9092.0]
[22.0, 20.0]
[90, 63]
p02687
u082861480
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["print('ABC' if input() == 'ARS' else 'ARS')", "print('ABC' if input() == 'ARC' else 'ARC')\n"]
['Wrong Answer', 'Accepted']
['s896232554', 's914211685']
[9068.0, 9064.0]
[21.0, 25.0]
[43, 44]
p02687
u085186789
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S =map(int, input().split(""))\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")\n', 'S =map(int, input().split())\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")', 'S =input()\nif str(S) = "ABC":\n print("ARC")\nelse:\n print("ABC")\n', 'S =input()\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")\n'...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s199363854', 's274997590', 's768426341', 's815606176', 's758404436']
[8884.0, 8836.0, 8880.0, 8784.0, 9092.0]
[23.0, 29.0, 23.0, 24.0, 26.0]
[81, 78, 66, 61, 65]
p02687
u089121621
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['import numpy as np\nargList = list(map(int, input().split())) \nheights = list(map(int, input().split())) \n\n\ncheck = np.array([1]*argList[0])\n\nfor n in range(argList[1]):\n \n con = list(map(int, input().split())) \n \n if heights[con[0]-1] <= heights[con[1]-1]:\n check[con[0]-1] = 0\n if h...
['Runtime Error', 'Accepted']
['s805632498', 's768324346']
[27048.0, 8944.0]
[105.0, 19.0]
[500, 77]
p02687
u091412190
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S = input()\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")', 'S == input()\nif S = "ABC":\n print("ARC")\nelse:\n print("ABC")', 'S = input()\nif S == "ABC":\n print("ARC")\nelse:\n print("ABC")\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s588739198', 's856528079', 's108260918']
[8936.0, 8824.0, 8960.0]
[23.0, 21.0, 19.0]
[61, 62, 63]
p02687
u091489347
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["if s == 'ABC':\n print('ARC')\nelse:\n print('ABC')", "s = input()\nif s == 'ABC':\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s468265607', 's421276794']
[9084.0, 9028.0]
[21.0, 19.0]
[54, 66]
p02687
u095844416
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["s=str(input())\nif s[1]==B:\n\tprint('ARC')\nelse:\n\tprint('ABC')", "s=str(input())\nif s[1]=='B':\n\tprint('ARC')\nelse:\n\tprint('ABC')"]
['Runtime Error', 'Accepted']
['s862044321', 's378549572']
[8960.0, 9028.0]
[23.0, 22.0]
[60, 62]
p02687
u097069712
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['S == input()\nif S == "ABC":\n\tprint("ARC")\nelse:\n \tprint("ABC")', 'S = int(input())\nif S == "ABC"\n\tprint("ARC")\nelse:\n \tprint("ABC")', 'S = map(int, input().split())\nif S = ABC\n\tprint("ARC")\nelse:\n \tprint("ABC")', 'S = input()\nif S = "ABC"\n\tprint("ARC")\nelse:\n \tprint("ABC")', 'S == input()\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s064110411', 's240877945', 's242016566', 's276284282', 's524605014', 's546184195', 's677033016', 's706507709', 's936450015', 's939504843', 's887923468']
[8972.0, 9008.0, 9008.0, 8956.0, 8904.0, 8876.0, 9012.0, 8948.0, 9012.0, 8948.0, 8852.0]
[21.0, 22.0, 23.0, 21.0, 22.0, 20.0, 20.0, 24.0, 22.0, 23.0, 18.0]
[63, 66, 76, 60, 63, 77, 64, 77, 79, 61, 62]
p02687
u098848480
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
['# coding: utf-8\n\nX = int(input())\nflg = 0\nfor A in range(-100, 100):\n for B in range(-80, 80):\n if A ** 5 - B ** 5 == X:\n print(f"{A} {B}")\n flg = 1\n break\n if flg:\n break\n', '# coding: utf-8\n\nS = input()\narc = "ABR"\nabc = "ABC"\nif S == arc:\n p...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s048147114', 's777789201', 's197223546']
[9168.0, 9092.0, 8912.0]
[19.0, 21.0, 20.0]
[225, 111, 111]
p02687
u100277898
2,000
1,048,576
AtCoder Inc. holds a contest every Saturday. There are two types of contests called ABC and ARC, and just one of them is held at a time. The company holds these two types of contests alternately: an ARC follows an ABC and vice versa. Given a string S representing the type of the contest held last week, print the str...
["S = input()\nif S = 'ABC':\n print('ARC')\nelse:\n print('ABC')", "S = input()\nif S == 'ABC':\n print('ARC')\nelse:\n print('ABC')"]
['Runtime Error', 'Accepted']
['s558304279', 's593792682']
[8948.0, 9028.0]
[22.0, 21.0]
[61, 62]