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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03786 | u572142121 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['N=int(input())\nA=list(map(int,input().split()))\nB=sorted(A)\nimport numpy\nC=numpy.cumsum(B)\ncnt=1\nfor i in range(N-1):\n if C[-2-i]*2>=A[-1-i]:\n cnt+=1\n else:\n print(cnt)\n exit()\nprint(cnt)', 'N=int(input())\nA=list(map(int,input().split()))\nB=sorted(A)\nimport numpy\nC=numpy.cumsum(B)\ncnt=1\nf... | ['Wrong Answer', 'Accepted'] | ['s327730317', 's779323457'] | [18796.0, 18800.0] | [449.0, 435.0] | [198, 198] |
p03786 | u572193732 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['N = int(input())\nA = list(map(int, input().split()))\n\nset_A = set(A)\nif len(set_A) == 1:\n print(len(A))\n exit()\n \ntmp_slime = A[0]\ntmp_flag = True\nfor i in range(1, len(A)):\n if tmp_slime*2 >= A[i]:\n tmp_slime += A[i]\n else:\n tmp_flag = False\n break\nif tmp_flag:\n ... | ['Wrong Answer', 'Accepted'] | ['s053383266', 's863783225'] | [14916.0, 15300.0] | [552.0, 597.0] | [800, 802] |
p03786 | u648212584 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['import sys\ninput = sys.stdin.readline\ndef main():\n\tN = int(input())\n\ta = list(map(int,input().split()))\n\ta.sort(reverse=True)\n\tsum_list = [a[0]]\n\tfor i in range(N-1):\n\t\tsum_list.append(sum_list[i]+a[i+1])\n\tcount = 1\n\tsum(a) = A\n\tfor i in range(N):\n\t\tif (A-sum_list[i])*2 >= a[i]:\n\t\t\tcount +... | ['Runtime Error', 'Accepted'] | ['s748481918', 's464658350'] | [3064.0, 14276.0] | [17.0, 119.0] | [362, 361] |
p03786 | u683134447 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['import sys\nm = int(input())\nn = list(map(int,input().split()))\n\nfrag = 0\ncount = 0\nwhile(True):\n if frag == 0:\n for i in range(len(n)-1):\n if n[i]*2 < n[i+1]:\n frag = 1\n if frag == 0:\n print(len(n)-count)\n sys.exit()\n count += 1\n n.sort()\n ... | ['Wrong Answer', 'Accepted'] | ['s014700107', 's266660832'] | [92904.0, 14308.0] | [2104.0, 109.0] | [513, 191] |
p03786 | u721970149 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['N = int(input())\nA = [int(x) for x in input().split()]\nA.sort()\n\nprint(A)\ntmp = A[0]\nans = 1\nfor i in range(1,N) :\n if A[i] <= tmp*2 :\n tmp += A[i]\n ans += 1\n else :\n tmp += A[i]\n ans = 1\n\nprint(ans)\n', 'N = int(input())\nA = [int(x) for x in input().split()]\nA.sort(... | ['Wrong Answer', 'Accepted'] | ['s917648760', 's417431825'] | [14308.0, 14304.0] | [133.0, 122.0] | [234, 201] |
p03786 | u789364190 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ["n = int(input())\na = [int(x) for x in input().split(' ')]\n\na.sort()\ns = [a[0]]\nfor i in range(1, n):\n s.append(a[i - 1] + a[i])\n\nres = 1\nfor i in range(1, n):\n if s[-i] * 2 >= a[-i + 1]:\n res += 1\n else:\n break\n\nprint(res)\n", "n = int(input())\na = [int(x) for x in input().split(' ')]\n\na.so... | ['Wrong Answer', 'Accepted'] | ['s777011034', 's616060285'] | [14224.0, 14308.0] | [144.0, 143.0] | [232, 244] |
p03786 | u790710233 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['import heapq\nn = int(input())\nA = list(map(int, input().split()))\nheapq.heapify(A)\n\ncnt = 1\nprev = heapq.heappop(A)\nwhile A:\n x = heapq.heappop(A)\n if prev > x:\n heapq.heappush(A, prev)\n prev = x\n continue\n print(prev, x, A, cnt)\n if 2*prev < x:\n cnt = 1\n els... | ['Runtime Error', 'Accepted'] | ['s711158221', 's695739445'] | [143544.0, 14320.0] | [1764.0, 108.0] | [348, 151] |
p03786 | u888092736 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['from fractions import gcd\nfrom functools import reduce\n\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\ng = reduce(gcd, A)\nif K <= max(A) and K % g == 0:\n print("POSSIBLE")\nelse:\n print("IMPOSSIBLE")\n', 'from itertools import accumulate\n\n\nN, *A = map(int, open(0).read().split... | ['Runtime Error', 'Accepted'] | ['s206249495', 's492660223'] | [5048.0, 20532.0] | [35.0, 89.0] | [228, 209] |
p03786 | u896741788 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['n=int(input())\nl=sorted(list(map(int,input().split())))\nans,s=0,0\nfor u in l:\n if 2*s>=u:ans+=1\n s+=u\nprint(ans)', 'n=int(input())\nl=sorted(list(map(int,input().split())))\nans,s=1,0\nfor u in l:\n if 2*s>=u:ans+=1\n else:ans=1\n s+=u\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s214126615', 's496586930'] | [14320.0, 14320.0] | [106.0, 102.0] | [114, 128] |
p03786 | u994521204 | 2,000 | 262,144 | Snuke found N strange creatures. Each creature has a fixed color and size. The color and size of the i-th creature are represented by i and A_i, respectively. Every creature can absorb another creature whose size is at most twice the size of itself. When a creature of size A and color B absorbs another creature of siz... | ['n=int(input())\nA=list(map(int,input().split()))\nsaisho=10**15\ncnt=0\nfor i in range(n):\n if A[i]<saisho/2:\n saisho=A[i]\n else:\n cnt+=1\nprint(cnt)', 'n=int(input())\nA=list(map(int,input().split()))\nA.sort()\ncnt=1\ncum=0\nfor i in range(n-1):\n cum+=A[i]\n if A[i+1]-2*cum<=0:\n ... | ['Wrong Answer', 'Accepted'] | ['s194215091', 's257699817'] | [14320.0, 14320.0] | [72.0, 122.0] | [165, 177] |
p03799 | u024340351 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['N, M= map(float, input().split())\nif N > round(M/2):\n\tprint(round(M/2))\nelse:\n\tc=N+(M-N*2)//4\n\tprint(c)\n\n\t', 'N, M= map(float, input().split())\nif N > round(M/2):\n\tprint(round(M/2))\nelse:\n\tc=N+(M-N*2)//4\n\tprint(int(c))\n'] | ['Wrong Answer', 'Accepted'] | ['s681615693', 's328540370'] | [2940.0, 2940.0] | [17.0, 17.0] | [106, 109] |
p03799 | u048176319 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['n,m = map(int, input().split())\n\nif n > (m+n)/3:\n print(m//2)\n exit()\n\nans = n\nm -= 2*n\nans += m//4', 'n,m = map(int, input().split())\n\nif n > (m+n)/3:\n print(m//2)\n exit()\n\nans = n\nm -= 2*n\nans += m//4\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s918854424', 's482098825'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 116] |
p03799 | u075304271 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['def solve():\n n, m = map(int, input().split())\n if m//2 <= n:\n print(m//2)\n else:\n print("ばーか")\n return 0\n \nif __name__ == "__main__":\n solve()\n', 'def solve():\n n, m = map(int, input().split())\n if m//2 <= n:\n print(m//2)\n else:\n ans = 0\n ans += n\n m = m-n*2\n ans += m//... | ['Wrong Answer', 'Accepted'] | ['s227080289', 's086865673'] | [2940.0, 2940.0] | [17.0, 17.0] | [161, 208] |
p03799 | u143051858 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['s,c = map(int,input().split())\nres = 0\nif s == 1 or c == 1:\n print(0)\n exit()\nif s*2 <= c:\n res += s\n c -= s*2\nelse:\n res += c//2\n c //= 2\nprint(res+c//4)', 's,c = map(int,input().split())\nres = 0\n\nif s*2 <= c:\n res += s\n c -= s*2\n res+= c\nelse:\n res += c//2\n c //=... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s804665743', 's909983794', 's680269253'] | [9076.0, 9136.0, 9032.0] | [27.0, 25.0, 24.0] | [172, 157, 152] |
p03799 | u179169725 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['N,M=map(int,input().split())\nn1=min(N,M//2)\nprint(ans+(M-2*n1)//4)\n', 'N,M=map(int,input().split())\nn1=min(N,M//2)\nN-=n1\nM-=2*n1\nprint(ans+(M-2*n1)//4)\n', 'N,M=map(int,input().split())\nn1=min(N,M//2)\nprint(n1+(M-2*n1)//4)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s015264516', 's779741326', 's741163597'] | [9096.0, 9120.0, 9088.0] | [23.0, 20.0, 28.0] | [67, 81, 66] |
p03799 | u278356323 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ["# ARC069c\ndef main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**6)\n\n n, m = map(int, input().split())\n if n > m*2:\n print(m//2+(n-m//2)//2)\n else:\n print(n)\n\n\nif __name__ == '__main__':\n main()\n", "# ARC069c\ndef main():\n import sys\n i... | ['Wrong Answer', 'Accepted'] | ['s675986004', 's482799808'] | [2940.0, 2940.0] | [17.0, 17.0] | [254, 253] |
p03799 | u316386814 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['import sys\nsys.setrecursionlimit(10**7)\nINF = 10 ** 18\nMOD = 10 ** 9 + 7\ndef POW(x, y):\n if y == 0:\n return 1\n elif y == 1:\n return x\n elif y % 2 == 0:\n return POW(x, y // 2) ** 2 % MOD\n else:\n return POW(x, y // 2) ** 2 * x % MOD\ndef mod_factorial(x, y): return x ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s762849055', 's851613878', 's435085624'] | [3572.0, 3572.0, 3572.0] | [22.0, 22.0, 23.0] | [808, 819, 814] |
p03799 | u333139319 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['[n,m] = [int(i) for i in input().split()]\nif n * 2 >= m:\n print(n)\nelse:\n if n >= 2:\n ans = n\n m = min(m - n * 2,0)\n ans += m//4\n print(ans)\n else:\n print(0)\n', '[n,m] = [int(i) for i in input().split()]\nif n * 2 >= m:\n print(n)\nelse:\n if m >= 2:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s329373314', 's461913703', 's529286745'] | [8976.0, 9100.0, 9056.0] | [26.0, 27.0, 27.0] | [202, 202, 207] |
p03799 | u535171899 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['import sys\nN, M = map(int, input().split())\nS = [0] * M\nC = [0] * M\nfor i in range(M):\n S[i], C[i] = map(int, input().split())\n\nfor i in range(1000):\n string = str(i)\n if len(string) != N:\n continue\n flag = True\n for j in range(M):\n if string[S[j] - 1] == str(C[j]):\n ... | ['Runtime Error', 'Accepted'] | ['s033869511', 's250242238'] | [1407348.0, 2940.0] | [2128.0, 17.0] | [432, 98] |
p03799 | u593567568 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['N,M = map(int,inpu().split())\n\ndef solve(N,M):\n \n if M < N * 2:\n return N\n \n M -= N * 2\n \n ans = N + M // 3\n return ans\n\nprint(solve(N,M))\n', 'N,M = map(int,input().split())\n\ndef solve(N,M):\n \n if M < N * 2:\n return M // 2\n \n M -= N * 2\n \n ans = N + (M // 4)\n return ans\n\np... | ['Runtime Error', 'Accepted'] | ['s002775365', 's754589037'] | [2940.0, 2940.0] | [17.0, 17.0] | [166, 174] |
p03799 | u622011073 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ["n=int(input());s=input();a=['SS','WS','SW','WW']\nfor i in range(n):\n for j in range(4):a[j]+='SW'[::-1 if s[i]=='o' else 1][a[j][i]==a[j][i+1]]\nfor i in range(4):\n if a[i][1]==a[i][n+1] and a[i][0] == a[i][n]:print(a[i][1:n+1]);exit()\nprint(-1)", 'n,m=map(int,input().split())\nprint(min((m+2*n),2*m)//2)', ... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s326157049', 's823665910', 's836166276'] | [3064.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [250, 55, 53] |
p03799 | u637824361 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['N, M = map(int, input().split())\nans = 0\nif N > M//2:\n print(M//2)\nelse:\n p = M - 2*N\n print(N + p//4', 'N, M = map(int, input().split())\nans = 0\nif N > M//2:\n print(M//2)\nelse:\n p = M - 2*N\n print(N + p//4)'] | ['Runtime Error', 'Accepted'] | ['s610770009', 's460356569'] | [2940.0, 2940.0] | [17.0, 17.0] | [104, 105] |
p03799 | u655975843 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['import sys\nimport collections\nns = lambda: sys.stdin.readline().rstrip()\nni = lambda: int(ns())\nnm = lambda: map(int, sys.stdin.readline().split())\nnl = lambda: list(nm())\nnsl = lambda: map(str, sys.stdin.readline().split())\n\nn, m = nm()\nif m >= 2 * n:\n c = 2 * n - m\n print(n + (c // 4))\nelse:\n ... | ['Wrong Answer', 'Accepted'] | ['s239167391', 's498583512'] | [3316.0, 3316.0] | [20.0, 21.0] | [314, 319] |
p03799 | u724742135 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['from sys import exit, stdin\nN, M = [int(_) for _ in stdin.readline().rstrip().split()]\nr = M-2*N\nif r <= 0:\n print(N//2)\nelse:\n pritnt(N+r//4)', 'from sys import exit, stdin\nN, M = [int(_) for _ in stdin.readline().rstrip().split()]\nr = M-2*N\nif r <= 0:\n print(M//2)\nelse:\n print(N+r//4)'] | ['Runtime Error', 'Accepted'] | ['s590546724', 's101849446'] | [2940.0, 2940.0] | [17.0, 17.0] | [148, 147] |
p03799 | u755962107 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | [' u, v = map(int, input().split())\n print(min(u//2, (2*u+v)//4))', 'u, v = map(int, input().split())\nprint(min(u//2, (2*u+v)//4)', 'u, v = map(int, input().split())\nif 2*u > v:\n print(v//2) \nelse:\n print((2*u+v)//4)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s579547290', 's656391621', 's751519959'] | [2940.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0] | [69, 60, 87] |
p03799 | u820560680 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['n, m = map(int, input().split())\n\nk = max(m // 2, (n + m // 2) // 2)\nprint(k)\n', 'n, m = map(int, input().split())\n\nk = min(m // 2, (n + m // 2) // 2)\nprint(k)\n'] | ['Wrong Answer', 'Accepted'] | ['s760921215', 's630477850'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 78] |
p03799 | u880644800 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['def solve(s, c):\n """rv = min(Sr, Cr//2), where\n Sr = S + a\n Cr = C - 2a # a>=0, a is number of (2c->S) conversions\n thus\n rv = max(min(S + a, C//2 - a) for a in range(0, C//2))\n if a >=0, optimum is Sr == Cr//2, thus\n S + a == Cr//2 - a\n ... | ['Runtime Error', 'Accepted'] | ['s687644152', 's909862746'] | [3064.0, 3064.0] | [18.0, 17.0] | [798, 808] |
p03799 | u984276646 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['N, M = map(int, input().split())\nif 2 * N > M:\n print(M // 2)\nelse:\n C = M // 2\n n = (C - N) // 2\n print(max(min(S+n-1, C-n+1), min(S+n, C-n), min(S+n+1, C-n-1)))', 'N, M = map(int, input().split())\nif 2 * N > M:\n print(M // 2)\nelse:\n C = M // 2\n n = (C - N) // 2\n print(max(min(N+n-1, C-n+1), min(... | ['Runtime Error', 'Accepted'] | ['s289803883', 's108566118'] | [3060.0, 2940.0] | [17.0, 17.0] | [166, 167] |
p03799 | u994521204 | 2,000 | 262,144 | Snuke loves puzzles. Today, he is working on a puzzle using `S`\- and `c`-shaped pieces. In this puzzle, you can combine two `c`-shaped pieces into one `S`-shaped piece, as shown in the figure below: Snuke decided to create as many `Scc` groups as possible by putting together one `S`-shaped piece and two `c`-shaped... | ['n,m=map(int, input().split())\np1=n\np2=m//2\nif p1>p2:\n \tprint(p2)\nelse:\n\tdelta=p2-p1\n print(delta//2+p1)', 'n,m=map(int,input().split())\np1=n\np2=m//2\nif p1>p2:\n \tprint(p2)\nelse:\n\tdelta=p2-p1\n print(delta//2+p1)', 'n,m=map(int,input().split())\np1=n\np2=m//2\nif p1>p2:\n \tprint(p2)\nelse:\n\tde... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s083943727', 's383436807', 's418282455', 's141018239'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 17.0] | [106, 105, 106, 110] |
p03800 | u345966487 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['import sys\n\nsys.setrecursionlimit(10 ** 8)\nini = lambda: int(sys.stdin.readline())\ninm = lambda: map(int, sys.stdin.readline().split())\ninl = lambda: list(inm())\nins = lambda: sys.stdin.readline().rstrip()\ndebug = lambda *a, **kw: print("\\033[33m", *a, "\\033[0m", **dict(file=sys.stderr, **kw))\n\nN = ini()\n... | ['Wrong Answer', 'Accepted'] | ['s593969830', 's446607884'] | [9940.0, 10192.0] | [89.0, 122.0] | [1104, 1108] |
p03800 | u375616706 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN = int(input())\ns = input()[:-1]\nans = [1]*(N+2)\n\n\ndef print_ans(l: list):\n ret = ""\n for a in l[1:-1]:\n ret += "S" if a else "W"\n print(ret)\n\n\ndef next(ind: int, isSame: bool, isSheep:... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s191953489', 's355042289', 's389645912', 's537926153', 's784630857'] | [4852.0, 4852.0, 4852.0, 4852.0, 4852.0] | [176.0, 90.0, 164.0, 160.0, 176.0] | [962, 1263, 964, 960, 717] |
p03800 | u388927326 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['#!/usr/bin/env python3\n\ndef main():\n n = int(input())\n s = input()\n for d0 in ["S", "W"]:\n for d1 in ["S", "W"]:\n pat = wrap(n, s, d0, d1)\n if pat[0] == pat[n] and pat[1] == pat[n + 1]:\n res = "".join(pat[:n])\n print(res)\n r... | ['Runtime Error', 'Accepted'] | ['s201384356', 's760660980'] | [4108.0, 5640.0] | [71.0, 205.0] | [885, 920] |
p03800 | u437638594 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['N = int(input())\ns = input()\n\nans = -1\n\ncandidate = [["S", "S"], ["S", "W"], ["W", "S"], ["W", "W"]]\n\nfor items in candidate:\n SW = [""] * N\n SW[0] = items[0]\n SW[1] = items[1]\n \n for i in range(1, N-1):\n if s[i] == "o":\n if SW[i] == "S":\n if SW[i-1] == "S":\n SW[i+1] = "... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s036633812', 's125362806', 's156547233', 's409883538'] | [5204.0, 5076.0, 5204.0, 3444.0] | [250.0, 258.0, 247.0, 266.0] | [1271, 1333, 1299, 1051] |
p03800 | u475503988 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ["N = int(input())\ns = input()\ns += s[0]\n\ndef isOK(x, y):\n lst = [-1] * (N+2)\n lst[0] = x\n lst[1] = y\n for i in range(1, N+1):\n if (s[i] == 'o') ^ (lst[i]): \n lst[i+1] = 1 - lst[i-1]\n else: \n lst[i+1] = lst[i-1]\n if lst[0] == lst[-... | ['Wrong Answer', 'Accepted'] | ['s306585800', 's871955273'] | [4852.0, 4836.0] | [122.0, 147.0] | [708, 722] |
p03800 | u518042385 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['n=int(input())\nw1=list(input())\ns="S"\nw="W"\no="o"\nx="x"\nl=[[s,s],[s,w],[w,w],[w,s]]\nfor j in range(4):\n for i in range(1,n):\n if w1[i]==o:\n if l[j][-1]==s:\n if l[j][-2]==s:\n l[j].append(s)\n else:\n l[j].append(w)\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s432458101', 's775118322', 's911487087'] | [7196.0, 2940.0, 7376.0] | [198.0, 17.0, 193.0] | [1003, 9, 1170] |
p03800 | u520276780 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['import sys\nn = int(input())\ns = input()\n\nL = ["SS","SW","WS","WW"]\nl= len(s)\n\n\nfor t in L: \n for i in range(1,l+1):\n if (s[(i+l)%l]=="x") ^ (t[-1] == "W"):\n if t[-2]=="S":\n t+= "W"\n else:\n t += "S"\n \n else:\n t... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s436237655', 's529909752', 's703511760', 's949936476', 's983628467'] | [3444.0, 2940.0, 3444.0, 3444.0, 3444.0] | [212.0, 17.0, 179.0, 197.0, 213.0] | [446, 532, 500, 371, 573] |
p03800 | u545368057 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['n = int(input())\ns = input()\n# S -> 0, W -> 1\nds = [(0,0),(0,1),(1,0),(1,1)]\n\nfor d0,d1 in ds:\n a = [d0,d1]\n for i in range(1,n-1):\n if s[i] == "o" and a[i] == 0:\n a.append(a[i-1])\n elif s[i] == "x" and a[i] == 0:\n a.append(a[i-1]^1)\n elif s[i] == "o" and a... | ['Wrong Answer', 'Accepted'] | ['s927154575', 's041537630'] | [5652.0, 4948.0] | [133.0, 201.0] | [1065, 1347] |
p03800 | u600402037 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ["import sys\n\nstdin = sys.stdin\n \nri = lambda: int(rs())\nrl = lambda: list(map(int, stdin.readline().split()))\nrs = lambda: stdin.readline().rstrip() # ignore trailing spaces\n\nN = ri()\nS = rs()\nd = {'S': 'W', 'W': 'S'}\nfor x in ['SS', 'SW', 'WS', 'WW']:\n animals = x\n for i in range(N):\n if S... | ['Wrong Answer', 'Accepted'] | ['s508693992', 's631421119'] | [3572.0, 3572.0] | [108.0, 195.0] | [688, 693] |
p03800 | u674959776 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['n=int(input())\ns=input()\n\ndef sheep(a,b):\n l=[0]*(n+1)\n l[0]=a\n l[1]=b\n for i in range(1,n):\n if s[i]=="o":\n if l[i]==0:\n l[i+1]=l[i-1]\n else:\n l[i+1]=(l[i-1]+1)%2\n else:\n if l[i]==0:\n l[i+1]=(l[i-1]... | ['Wrong Answer', 'Accepted'] | ['s842808743', 's576760086'] | [10128.0, 10880.0] | [94.0, 113.0] | [571, 817] |
p03800 | u706159977 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['Menagerien = int(input())\ns = input()\na = "SS"\nct=1\nwhile ct<7: \n for i in range(n-1):\n p=a[i]\n q="A"\n if a[i]=="S":\n q="W"\n else:\n q="S"\n if a[i+1]=="S":\n if s[i+1] == "o":\n a=a+a[i]\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s960272077', 's438136918'] | [3444.0, 3700.0] | [17.0, 264.0] | [1247, 1274] |
p03800 | u742897895 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['n = int(input())\ns = input()\n\nans = ["SS", "SW", "WS", "WW"]\n\nfor i in range(4):\n for j in range(1, n + 1):\n if s[j - 1] == "o":\n if ans[i][j] == "S":\n if ans[i][j - 1] == "S":\n ans[i] += "S"\n else:\n ans[i] += "W"\n ... | ['Wrong Answer', 'Accepted'] | ['s589854276', 's554234190'] | [5464.0, 3800.0] | [1252.0, 1202.0] | [1011, 996] |
p03800 | u761529120 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['def main():\n N = int(input())\n s = list(input())\n for t0,t1 in [(\'S\',\'S\'),(\'S\',\'W\'),(\'W\',\'S\'),(\'W\',\'W\')]:\n T = [\'S\'] * (N + 1)\n\n T[0] = t0\n T[1] = t1\n\n for i in range(1,N):\n if s[i] == \'o\':\n if T[i] == \'S\':\n ... | ['Wrong Answer', 'Accepted'] | ['s025698770', 's961599666'] | [11396.0, 11300.0] | [97.0, 101.0] | [1317, 1425] |
p03800 | u843135954 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ["import sys\nstdin = sys.stdin\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 = ni()\ns = ns()\na = [['S','S'],['S','W'],['W','S'],['W','W']]\n\nfor b in a:\n for i in range(1,n):\n c = 0... | ['Wrong Answer', 'Accepted'] | ['s745519832', 's552740480'] | [7160.0, 7184.0] | [249.0, 228.0] | [640, 638] |
p03800 | u879870653 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ['input()\nif input() == "ooxoox" :\n print("SWWSWS")\nelse :\n print("")', 'N = int(input())\nS = input()\n\n\nA = ["SS", "SW", "WS", "WW"]\n\nfor j in range(4) :\n t = A[j]\n for i in range(1,N) :\n if S[i] == "o" :\n if t[i] == "S" :\n if t[i-1] == "S" :\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s468815812', 's712701372', 's843150018', 's364597817'] | [3188.0, 3572.0, 3188.0, 3700.0] | [17.0, 149.0, 18.0, 187.0] | [73, 1177, 73, 1197] |
p03800 | u952467214 | 2,000 | 262,144 | Snuke, who loves animals, built a zoo. There are N animals in this zoo. They are conveniently numbered 1 through N, and arranged in a circle. The animal numbered i (2≤i≤N-1) is adjacent to the animals numbered i-1 and i+1. Also, the animal numbered 1 is adjacent to the animals numbered 2 and N, and the animal numbered... | ["import sys\nsys.setrecursionlimit(10 ** 7)\ninput = sys.stdin.readline\n\nn = int(input())\ns = input() \n\n\ndef dfs(now,ans):\n\n if now == n-1:\n if s[now] == 'o' and ans[now] == 'S':\n if ans[now-1] == ans[0]:\n return ans\n else: return '-1'\n elif s[now] == ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s043334481', 's333551636', 's805853512'] | [91524.0, 91516.0, 7008.0] | [548.0, 557.0, 219.0] | [2291, 2304, 485] |
p03801 | u218843509 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ['class BIT():#1-indexed\n\tdef __init__(self, size):\n\t\tself.table = [0 for _ in range(size+2)]\n\t\tself.size = size\n\n\tdef b_sum(self, i):\n\t\ts = 0\n\t\twhile i > 0:\n\t\t\ts += self.table[i]\n\t\t\ti -= (i & -i)\n\t\treturn s\n\n\tdef b_add(self, i, x):\n\t\twhile i <= self.size:\n\t\t\tself.table[i] += x\n\t... | ['Wrong Answer', 'Accepted'] | ['s818804949', 's030536700'] | [28144.0, 33628.0] | [721.0, 327.0] | [752, 668] |
p03801 | u281303342 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ['from collections import Counter\nN = int(input())\nS = list(map(int,input().split()))\nT = []\nfor i in range(N):\n T.append((i,S[i]))\nU = sorted(T,key=lambda x:x[1], reverse=True)\n\nAns = [0]*N\nc,v = 0,10**10\n\nfor i in range(N-1):\n c+=1\n v = min(v,U[i][0])\n if U[i][1]==U[i+1][1]:\n continu... | ['Runtime Error', 'Accepted'] | ['s360023364', 's135538397'] | [23880.0, 23852.0] | [310.0, 281.0] | [424, 446] |
p03801 | u392319141 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ["N = int(input())\nA = [(a, i) for i, a in enumerate(map(int, input().split()))]\nA.sort(reverse=True)\nA.append((0, 0))\n\nans = [0] * N\nnow = float('inf')\n\nfor j, (a, i) in enumerate(A[:N], start=1):\n now = min(now, i)\n ans[now] += j * (now - A[j][0])\n\nprint(*ans, sep='\\n')\n", "N = int(input())\nA = [... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s438995893', 's466352228', 's345069076'] | [23704.0, 24140.0, 23220.0] | [247.0, 145.0, 288.0] | [277, 277, 432] |
p03801 | u426108351 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ['N = int(input())\na = list(map(int, input().split()))\nb = []\nfor i in range(N):\n b.append([a[i], i+1])\nb.sort(reverse = True)\nans = [0]*(N+1)\nmini = N+1\n\nfor i in range(N-1):\n mini = min(mini, b[i][1])\n if b[i+1][0] - b[i][0] < 0:\n ans[mini] += (b[i][0] - b[i+1][0])*(i+1)\n\nans[1] += N*min... | ['Runtime Error', 'Accepted'] | ['s546916586', 's407456691'] | [26288.0, 25580.0] | [325.0, 347.0] | [347, 349] |
p03801 | u922449550 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ["N = int(input())\nA = [0] + list(map(int, input().split()))\nB = [[a, i, 1] for i, a in enumerate(A)]\nC = sorted(B, reverse=True)\na_max, idx = 0, 0 # [value, idx]\nleft_max = [[0, 0] for i in range(N+1)] # [value, idx]\nfor i, a in enumerate(A):\n left_max[i] = [a_max, idx]\n if a > a_max:\n a_max, idx = a, i\... | ['Wrong Answer', 'Accepted'] | ['s295690673', 's248832269'] | [51072.0, 44788.0] | [514.0, 384.0] | [638, 1144] |
p03801 | u969190727 | 2,000 | 262,144 | Snuke loves constructing integer sequences. There are N piles of stones, numbered 1 through N. The pile numbered i consists of a_i stones. Snuke will construct an integer sequence s of length Σa_i, as follows: 1. Among the piles with the largest number of stones remaining, let x be the index of the pile with the s... | ['import collections\nimport heapq\nn=int(input())\nA=[int(i) for i in input().split()]\nAns=[0]*n\nM=[0]\nfor i in range(n):\n M.append(max(M[-1],A[i]))\nD=collections.defaultdict(int)\nH=[]\nfor i in range(n):\n j=n-1-i\n if A[j]<=M[j]:\n heapq.heappush(H,-A[j])\n else:\n Ans[j]=(A[j]-M[j])*(D[A[j]]+1)\n ... | ['Runtime Error', 'Accepted'] | ['s738202563', 's038732754'] | [155172.0, 25176.0] | [2104.0, 306.0] | [1014, 1012] |
p03803 | u006425112 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['import sys\n\na,b = map(int, sys.stdin.readline().split())\n\nif a == 1:\n a = 14\nif b == 1:\n b = 14:\n\nif a > b:\n print("Alice")\nelif a == b:\n print("Draw")\nelse:\n print("Bob")', 'import sys\n\na,b = map(int, sys.stdin.readline().split())\n\nif a == 1:\n a = 14\nif b == 1:\n b = 14\n\nif... | ['Runtime Error', 'Accepted'] | ['s706693712', 's949855662'] | [2940.0, 3060.0] | [17.0, 17.0] | [186, 185] |
p03803 | u007848713 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['\nalice = int(input())\nbob = int(input())\n\nif(alice == bob):\n print("Draw")\nelif(alice == 1 and bob == 1):\n print("Draw")\n \nelif(alice == 1):\n print("Alice")\nelif(bob == 1):\n print("Bob")\nelif(alice < bob):\n print("Bob")\nelif(alice > bob):\n print("Alice")', '# -*- coding: utf-8 -*-... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s038672146', 's297374173', 's320821773', 's345364886', 's278435294'] | [3060.0, 2940.0, 2940.0, 2940.0, 3064.0] | [17.0, 17.0, 16.0, 17.0, 17.0] | [275, 525, 483, 381, 394] |
p03803 | u010090035 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b=map(int,input().split())\nif(a==b):\n print("Draw")\nelif(a<b or a==1):\n print("Alice")\nelse:\n print("Bob")', 'a,b=map(int,input().split())\nif(a==b):\n print("Draw")\nelif(b!=1 and (a>b or a==1)):\n print("Alice")\nelse:\n print("Bob")'] | ['Wrong Answer', 'Accepted'] | ['s363306080', 's000012139'] | [3060.0, 2940.0] | [17.0, 17.0] | [117, 128] |
p03803 | u017415492 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b=map(int,input().split())\n#n=int(input())\n#s=input()\nif a==b:\n print("Draw")\nelif a>b and b!=1:\n print("alice")\nelif a>b:\n print("Bob")\nelif a<b and a!=1:\n print("Bob")\nelse:\n print("alice")', 'a,b=map(int,input().split())\n#n=int(input())\n#s=input()\nif a==b:\n print("Draw")\nelif a>b and a!=1:... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s202399769', 's790414690', 's794166618', 's870381177'] | [2940.0, 3064.0, 2940.0, 3060.0] | [17.0, 18.0, 17.0, 17.0] | [198, 198, 178, 198] |
p03803 | u020604402 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['N,M=map(int,input().split())\nL=[]\nS=[]\nfor i in range(N):\n x = input()\n l=[y for y in x]\n L.append(l)\nfor i in range(M):\n x = input()\n s=[y for y in x]\n S.append(s)\nflag = 0\nsum = 0\nfor i in range(N):\n for j in range(N):\n for k in range(M):\n for l in range(M):\n ... | ['Runtime Error', 'Accepted'] | ['s142752450', 's538090855'] | [3064.0, 2940.0] | [19.0, 18.0] | [609, 209] |
p03803 | u027675217 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b = int(input())\nif a>b:\n\tprint("Alice")\nelif a<b:\n\tprint("Bob")\nelse:\n\tprint("Draw")', 'a,b = map(int,input().split())\nif a==1:\n\ta=14\nif b==1:\n\tb=14\nif a>b:\n\tprint("Alice")\nelif a<b:\n\tprint("Bob")\nelse:\n\tprint("Draw")\n'] | ['Runtime Error', 'Accepted'] | ['s593748909', 's777767537'] | [2940.0, 2940.0] | [17.0, 17.0] | [87, 130] |
p03803 | u029000441 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['import sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**7)\nfrom collections import Counter, deque\nfrom collections import defaultdict\nfrom itertools import combinations, permutations, accumulate, groupby, product\nfrom bisect import bisect_left,bisect_right\nfrom heapq import heapify, heappop, heappush\n... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s557294072', 's666605830', 's193841443'] | [3316.0, 3316.0, 3316.0] | [21.0, 21.0, 28.0] | [755, 756, 759] |
p03803 | u030726788 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b=map(int,input().split())\nif(a==b):\n print("Draw")\nelif(a<b):\n if(a==1):\n print("Alice")\n else:\n print("Bob")\nelse:\n print("Bob")', 'a,b=map(int,input().split())\nif(a==b):\n print("Draw")\nelif(a<b):\n if(a==1):\n print("Alice")\n else:\n print("Bob")\nelse:\n if(b==1):\n print("Al... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s088157742', 's553977606', 's949344458', 's384381040'] | [3316.0, 2940.0, 2940.0, 2940.0] | [22.0, 18.0, 17.0, 17.0] | [142, 181, 184, 184] |
p03803 | u036190609 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A, B = map(int, input().split()))\nif A == B:\n print("Draw")\nelif A == 1 and B != 1:\n print("Alice")\nelif B == 1 and A != 1:\n print("Bod")\nelif A > B:\n print("Alice")\nelse:\n print("Bob")', 'a, b = map(int, input().split())\nif a == b:\n print("Draw")\nelif a == 1:\n print("Alice")\nelif ... | ['Runtime Error', 'Accepted'] | ['s333119963', 's590448669'] | [2940.0, 2940.0] | [17.0, 17.0] | [200, 177] |
p03803 | u039360403 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["a,b=input().split()\na1=a.replace('1','14')\nb1=b.replace('1','14')\nprint('Alice' if a1<b1 else 'Bob' if a1>b1 else 'Draw')\n", "a,b=map(int,input().split())\nprint('Alice' if (a==1 or a>b) and b!=1 else 'Draw' if a==b else 'Bob')\n"] | ['Wrong Answer', 'Accepted'] | ['s747045846', 's454079658'] | [2940.0, 2940.0] | [17.0, 17.0] | [122, 101] |
p03803 | u052499405 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a, b = [int(item) for item in input().split()]\nif a > b:\n print("Alice")\neiif a == b:\n print("Draw")\nelse:\n print("Bob")', 'a, b = [int(item) for item in input().split()]\nif a == 1:\n a += 100\nif b == 1:\n b += 100\n \nif a > b:\n print("Alice")\nelif a == b:\n print("Draw")\nelse:\n print("Bob")'] | ['Runtime Error', 'Accepted'] | ['s380541818', 's021344489'] | [2940.0, 3060.0] | [17.0, 17.0] | [123, 170] |
p03803 | u055687574 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['N, M = map(int, input().split())\n\nA = [input() for n in range(N)]\nB = [input() for m in range(M)]\n\nans = "Yes"\nfor a in A:\n for b in B:\n print(a, b)\n if b not in a:\n ans = "No"\nprint(ans)\n', 'N, M = map(int, input().split())\n\nA = [input() for n in range(N)]\nB = [input() for ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s001525751', 's279922568', 's828841871'] | [2940.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0] | [216, 290, 186] |
p03803 | u062484507 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['N, M = map(int, input().split())\nA = [input() for i in range(N)]\nB = [input() for j in range(M)]\n\nans = True\nfor k in range(len(B)):\n if B[k] not in A[k]:\n ans = False\n break\nprint("Yes" if ans == True else "No")', "A, B = map(int, input().split())\nif A == B:\n ans = 'Draw'\nelif A == 1:... | ['Runtime Error', 'Accepted'] | ['s158340164', 's845740691'] | [3060.0, 2940.0] | [18.0, 17.0] | [229, 183] |
p03803 | u063346608 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A,B = int(input().split())\n\nif A > B and B != 1:\n\tprint("Alice")\nelif A == B:\n\tprint("Draw")\nelif B > A and A != 1:\n\tprint("Bob")', 'A,B = map(int,input().split())\n\nif A > B and B != 1:\n\tprint("Alice")\nelif A > B and B == 1:\n\tprint("Bob")\n\nif B > A and A != 1:\n\tprint("Bob")\nelif B > A and A == 1... | ['Runtime Error', 'Accepted'] | ['s470137794', 's868808672'] | [2940.0, 3060.0] | [17.0, 17.0] | [129, 207] |
p03803 | u065683101 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["def read():\n return int(input())\n\ndef reads(sep=None):\n return list(map(int, input().split(sep)))\n\ndef main():\n a, b = input()\n if a == 1:\n a = 14\n if b == 1:\n b = 14\n\n if a == b:\n print('Draw')\n elif a > b:\n print('Alice')\n else:\n print('Bo... | ['Runtime Error', 'Accepted'] | ['s147620430', 's456820451'] | [3060.0, 3060.0] | [17.0, 17.0] | [313, 313] |
p03803 | u073852194 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["A, B = map(int, input().split())\nif A == B:\n\tprint('Draw)\nelif A == 1:\n\tpirnt('Alice')\nelif B == 1:\n\tprint('Bob')\nelif A > B:\n\tprint('Alice')\nelse:\n\tprint('Bob') ", "A, B = map(int, input().split())\nif A == B:\n\tprint('Draw')\nelif A == 1:\n\tprint('Alice')\nelif B == 1:\n\tprint('Bob')\neli... | ['Runtime Error', 'Accepted'] | ['s693666579', 's928046887'] | [3060.0, 2940.0] | [18.0, 17.0] | [171, 163] |
p03803 | u076498277 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['N = int(input())\nbonus = N // 15 * 200\nprint(N * 800 - bonus)', 'A, B = map(int,input().split())\nif A == B:\n print("Draw")\nelif A > B or A == 1:\n if B == 1:\n print("Bob")\n else:\n print("Alice")\nelse:\n print("Bob")'] | ['Runtime Error', 'Accepted'] | ['s959870310', 's441296124'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 158] |
p03803 | u077019541 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A,B = map(int,input().split())\nif 1 in A or 1 in B:\n if A==1 and B==1:\n print("Draw")\n elif A==1:\n print("Alice")\n else:\n print("Bob")\nelse:\n if A>B:\n print("Alice")\n elif B>A:\n print("Bob")\n else:\n print("Draw")', 'A,B = map(int,input().split(... | ['Runtime Error', 'Accepted'] | ['s812809406', 's035801940'] | [3060.0, 3060.0] | [17.0, 17.0] | [272, 272] |
p03803 | u089376182 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["a, b = map(int, input().split())\nprint('Draw' if a==b else 'Alice' if (a==1)or(b!=1 and a>b)) else 'Bob')", "a, b = map(int, input().split())\nprint('Draw' if a==b else 'Alice' if (a==1)or(b!=1 and a>b) else 'Bob')\n"] | ['Runtime Error', 'Accepted'] | ['s386440352', 's954965872'] | [2940.0, 2940.0] | [17.0, 17.0] | [105, 105] |
p03803 | u093492951 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["import sys\nN, M = [int(i) for i in input().split()]\n\nA = [[i for i in input()] for j in range(N)]\nB = [[i for i in input()] for k in range(M)]\n\nfor i in range(N-M):\n for j in range(N-M):\n diff = 0\n\n for k in range(M):\n for l in range(M):\n if A... | ['Runtime Error', 'Accepted'] | ['s201580389', 's019001536'] | [3064.0, 2940.0] | [18.0, 18.0] | [546, 238] |
p03803 | u093500767 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a, b = input().stlip()\n\nif a==1:\n a = 14\nif b==1:\n b = 14\n\nif a>b:\n print("Alice")\nelif a<b:\n print("Bob")\nelse:\n print("Draw")', 'a, b = map(int, input().stlip())\n\nif a==1:\n a = 14\nif b==1:\n b = 14\n\nif a>b:\n print("Alice")\nelif a<b:\n print("Bob")\nelse:\n print("Dr... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s270539999', 's721036419', 's597947205'] | [2940.0, 3060.0, 3060.0] | [17.0, 23.0, 17.0] | [142, 152, 152] |
p03803 | u094565093 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["N,M=map(int,input().split())\nA=[ list(input()) for i in range(N)]\nB=[ list(input()) for i in range(M)]\nans='Yes'\nfor i in range(N-M+1):\n for j in range(N-M+1):\n \n for k in range(i,i+M):\n for l in range(j,j+M):\n if A[k][l]!=B[k-i][l-j]:\n ans='No'\... | ['Runtime Error', 'Accepted'] | ['s836866332', 's122967499'] | [3060.0, 3060.0] | [17.0, 17.0] | [319, 213] |
p03803 | u095969144 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['\ndef one(x):\n if x == 1:\n ret = 14\n return ret\n else:\n ret = x\n return ret\n\na, b = map(int, int(input())\nif one(a) > one(b):\n print("Alice")\nelif one(a) < one(b):\n print("Bob")\nelse:\n print("Draw")\n', 'a, b = map(input().split())\nif a > b:\n print("Alice"... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s253982655', 's955492226', 's286495358'] | [2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0] | [241, 109, 208] |
p03803 | u098994567 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["\n\n#\n\n\n\n#\n\n#\n\n\n\n\n\n\n\ninput_alice, input_bob = map(int,input().split())\n\nresult = 'ret'\n\nif input_alice > input_bob:\n if input_bob == 1: \n result = 'Bob'\n else:\n result = 'Alis'\nelif input_alice < input_bob:\n if input_alice == 1: \n result = 'Alice'\n e... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s234916598', 's954832268', 's872334691'] | [9064.0, 9148.0, 8948.0] | [26.0, 34.0, 28.0] | [1626, 1625, 1721] |
p03803 | u102126195 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A, B = map(int, input())\nif A == B:\n print("Draw")\nelif A == 1:\n print("Alice")\nelif B == 1:\n print("Bob")\nelse:\n if A < B:\n print("Bob")\n else:\n print("Alice")', 'A, B = map(int, input().split())\nif A == B:\n print("Draw")\nelif A == 1:\n print("Alice")\nelif B == 1:\n print("Bob")\nelse:\n... | ['Runtime Error', 'Accepted'] | ['s071784785', 's535527354'] | [2940.0, 2940.0] | [18.0, 17.0] | [171, 180] |
p03803 | u111365959 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["j = [2,3,4,5,6,7,8,9,10,11,12,13,1]\na,b = [int(x) for x in input().split()]\nif j.index(a) > j.rindex(b):\n print('Alice')\nelif j.index(a) < j.index(b):\n print('Bob')\nelse:\n print('Draw')\n", "a,b = [int(x) for x in input().split()]\nj = [2,3,4,5,6,7,8,9,10,11,12,13,1]\nif j.index(a) > j.rindex(b):\n print('... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s207442481', 's432893056', 's719751496', 's930176853', 's014210778'] | [2940.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 18.0, 17.0, 17.0, 17.0] | [189, 189, 191, 191, 188] |
p03803 | u112902287 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['import sys\n\nn, m = map(int, input().split())\n\na = []\nfor i in range(n):\n a.append(list(input()))\n\nb = []\nfor i in range(m):\n b.append(list(input()))\n\nfor i in range(n-m+1):\n for j in range(n-m+1):\n for k in range(m):\n if k <= m-2:\n if a[i+k][j:j+m] == b[k]:\n ... | ['Runtime Error', 'Accepted'] | ['s718087683', 's292734608'] | [3064.0, 3060.0] | [19.0, 17.0] | [568, 201] |
p03803 | u115877451 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | [' a,b = map(int,input().split())\n if a != 1 and b != 1:\n if a > b :\n print("Alice")\n elif a < b:\n print("Bob")\n else:\n print("Draw")\n elif a == 1 and b != 1:\n print("Alice")\n elif a != 1 and b == 1:\n print("Bob")\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s958292928', 's033515066'] | [2940.0, 3060.0] | [17.0, 18.0] | [323, 261] |
p03803 | u117193815 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b = map(int, input())\nif a==1:\n print(\'Alice\')\nif b==1:\n print(\'Bob\')\nif a==b:\n print("Draw")\nif a>b:\n print("Alice")\nelse:\n print("Bob")', "A,B = map(int, input().split())\nif A==1:\n A=14\nif B==1:\n B=14\n\nif a>b:\n print('Alice')\nelif b>a:\n print('Bob')\nelse:\n print('Draw')", "A,B =... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s313758067', 's889139737', 's399904323'] | [2940.0, 3060.0, 2940.0] | [17.0, 18.0, 17.0] | [144, 136, 136] |
p03803 | u118211443 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['n,m=map(int,input().split())\na = []\nfor i in range(n):\n a.append(input())\nb = []\nfor i in range(m):\n b.append(input())\n\nok=False\ncf=[]\nfor i in range(n-m+1):\n for j in range(n-m+1):\n for l in range(m):\n cf.append(a[i+l][j:j+m])\n #print(cf)\n if cf==b:\n ok... | ['Runtime Error', 'Accepted'] | ['s336055513', 's697967391'] | [3064.0, 2940.0] | [17.0, 18.0] | [345, 180] |
p03803 | u119226758 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['import math\n\nN, Ma, Mb = map(int,input().split())\nrate = Ma / Mb\na = [0] * N\nb = [0] * N\nc = [0] * N\nMA = 0\nMB = 0\nfor i in range(N):\n a[i], b[i], c[i] = map(int, input().split())\n MA += a[i]\n MB += b[i]\n\ndp = [[[math.inf for i in range(MB+1)] for j in range(MA+1)] for k in range(N+1)]\ndp[0][0... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s132094613', 's176001475', 's399974883', 's912738504'] | [3064.0, 2940.0, 3064.0, 2940.0] | [18.0, 17.0, 18.0, 19.0] | [1146, 147, 1156, 179] |
p03803 | u119655368 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['import itertools\nn, m = map(int, input().split())\nl = [list(map(int, input().split())) for i in range(m)]\nr = [[] for i in range(n + 1)]\nans = 0\nfor i in range(m):\n r[l[i][0]].append(l[i][1])\n r[l[i][1]].append(l[i][0])\np = []\nfor i in range(n):\n p.append(i + 1)\np = list(itertools.permutations(p))... | ['Runtime Error', 'Accepted'] | ['s531113424', 's500650873'] | [3064.0, 3060.0] | [18.0, 17.0] | [541, 149] |
p03803 | u120026978 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a, b = int(input())\nif a == 1:\n a = 14\nelif b == 1:\n b = 14\n\nif a > b:\n print("Alice")\nelif a < b:\n print("Bob")\nelse:\n print("Draw")', 'a, b = map(int, input().split())\nif a == 1:\n a = 14\nif b == 1:\n b = 14\n\nif a > b:\n print("Alice")\nelif a < b:\n print("Bob")\nelse:\n ... | ['Runtime Error', 'Accepted'] | ['s025810221', 's699647273'] | [3060.0, 3060.0] | [17.0, 17.0] | [148, 159] |
p03803 | u125269142 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["a, b = map(int, input().split())\n\nif a < b:\n ans = 'Bob'\nelif a == b:\n ans = 'Draw'\nelse:\n a > b:\n ans = 'Alice'\nprint(ans)", "a, b = map(int, input().split())\n\nif a == 1:\n a += 13\nif b == 1:\n b += 13\n\nif a < b:\n ans = 'Bob'\nelif a == b:\n ans = 'Draw'\nelse:\n ans = 'Alice'\nprint(ans)\n... | ['Runtime Error', 'Accepted'] | ['s925460706', 's817494567'] | [9020.0, 9080.0] | [23.0, 25.0] | [129, 162] |
p03803 | u127856129 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['s=[13,1,2,3,4,5,6,7,8,9,10,11,12]\na,b=map(int,input().split())\nif s[a-1]==s[b-1]:\n print("Draw")\nelif s[a-1]<s[b-1]\n print("Bob")\nelse:\n print("Alice")', 'a,b=map(int,input().split())\nif a==b:\n print("Draw")\nelif a>b:\n print("Bob")\nelse:\n print("Alice")', 's=[13,1,2,3,4,5,6,7,8,9,10,11,12]\na,b=map... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s093013653', 's442730497', 's336863425'] | [2940.0, 2940.0, 3060.0] | [17.0, 18.0, 18.0] | [154, 101, 156] |
p03803 | u131264627 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['from itertools import permutations\nn, m = map(int, input().split())\nab = [[] for i in range(n)]\nfor i in range(m):\n a, b = map(lambda x: int(x) - 1, input().split())\n ab[a].append(b)\n ab[b].append(a)\ncnt = 0\nif n == 2:\n if 1 in ab[0]:\n print(1)\n else:\n print(0)\n exit()\nfo... | ['Runtime Error', 'Accepted'] | ['s187060340', 's597334727'] | [3064.0, 2940.0] | [18.0, 17.0] | [551, 142] |
p03803 | u135265051 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["# import math\n# import statistics\n#a=input()\n#b,c=int(input()),int(input())\n# c=[]\n\n# c.append(i)\ne1,e2 = map(int,input().split())\n#K = input()\n# f = list(map(int,input().split()))\n#g = [input() for _ in range(a)]\na=[2,3,4,5,6,7,8,9,10,11,12,13,1]\nif e1==e2:\n\tprint('Draw')\nelif a.index(e1)<a.index(e... | ['Wrong Answer', 'Accepted'] | ['s383630091', 's802556113'] | [9172.0, 9104.0] | [30.0, 26.0] | [355, 355] |
p03803 | u137228327 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["lst = map(int,input().split())\n\nif lst[0] > lst[1]:\n print('Alice')\nelif lst[0] < lst[1]:\n print('Bob')\nelse:\n print('Draw')\n\n", "lst = [14 if x == 1 else x for x in map(int,input().split())]\nif lst[1] != 1 and lst[0] > lst[1] :\n print('Alice')\nelif lst[0] != 1 and lst[0] < lst[1]:\n print('Bob')... | ['Runtime Error', 'Accepted'] | ['s512657134', 's457671454'] | [9012.0, 9108.0] | [20.0, 25.0] | [129, 196] |
p03803 | u140480594 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A, B = list(map(int, input().split()))\ncards = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 1]\nif cards.index(A) > cards.index(B) :\n print("Alice")\nif cards.index(B) > cards.index(A) :\n print("Bob")\nelse :\n print("Draw")', 'A, B = list(map(int, input().split()))\ncards = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... | ['Wrong Answer', 'Accepted'] | ['s567333828', 's569014253'] | [3060.0, 3060.0] | [18.0, 17.0] | [219, 221] |
p03803 | u143492911 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b=map(int,input().split())\nif a==1:\n print("Alice")\nelif b==1:\n print("Bob")\nelif a<b:\n print("Bob")\nelif:b<a\n print("Alice")\nelse:\n print("Draw")\n', 'a,b=map(int,input().split())\nif a==b:\n print("Draw")\nelif a==1:\n print("Alice")\nelif b==1:\n print("Bob")\nelif a<b:\n pri... | ['Runtime Error', 'Accepted'] | ['s935931329', 's645866726'] | [2940.0, 2940.0] | [17.0, 18.0] | [164, 165] |
p03803 | u144980750 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['a,b=map(int,input().split())\nif a==b:\n print("Draw")\nelif a==1:\n print("Alice")\nelif b==1:\n print("Bob")\nelif b<a:\n print("Alice")\nelse a<b:\n print("Bob")', 'a,b=map(int,input().split())\nif a==b:\n print("Draw")\nelif a==1:\n print("Alice")\nelif b==1:\n print("Bob")\nelif b<a:\n print("Alice")\ne... | ['Runtime Error', 'Accepted'] | ['s648716804', 's705837512'] | [2940.0, 2940.0] | [17.0, 17.0] | [159, 155] |
p03803 | u147912476 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["A, B = map(int, input().split())\n\nif A == B:\n print('Draw')\nelif A == 1:\n print('Alice')\nelif B == 1:\n print('Bob')\nelif A < B:\n print('Alice')\nelif A > B:\n print('Bob')", "A, B = map(int, input().split())\n\nif A == B:\n print('Draw')\nelif A == 1:\n print('Alice')\nelif A == 1:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s221078211', 's342402488', 's213918602'] | [9052.0, 9108.0, 9128.0] | [29.0, 26.0, 29.0] | [184, 184, 184] |
p03803 | u150117535 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['if A == B:\n print("Draw")\nelif A == 1:\n print("Alice")\nelif B == 1:\n print("Bob")\nelif A > B:\n print("Alice")\nelse:\n print("Bob")', '(A,B) = [int(x) for x in input().split()]\nif A == B:\n print("Draw")\nelif A == 1:\n print("Alice")\nelif B == 1:\n print("Bob")\nelif A > B:\n prin... | ['Runtime Error', 'Accepted'] | ['s469298933', 's936856142'] | [2940.0, 3316.0] | [17.0, 25.0] | [144, 186] |
p03803 | u151625340 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["A,B = int(input())\nif A<B:\n if A == 1:\n print('Alice')\n else:\n print('Bob')\nelif A == B:\n print('Draw')\nelse:\n if B == 1:\n print('Bob')\n else:\n print('Alice')\n", "A,B = map(int,input().split())\nif A<B:\n if A == 1:\n print('Alice')\n else:\n ... | ['Runtime Error', 'Accepted'] | ['s062200220', 's869354885'] | [2940.0, 2940.0] | [17.0, 17.0] | [202, 214] |
p03803 | u153902122 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["A,B=map(int,input().split())\nif A>B:\n if B!=2:\n print('Alice')\n else:\n print('Bob')\nif A==B:\n print('Draw')\nelse:\n if A==2:\n print('Alice')\n else:\n print('Bob')", "A,B=map(int,input().split())\nif A>B:\n if B==1:\n print('Bob')\n else:\n print('Alice')\nif A==B:\n print('Draw')\n... | ['Wrong Answer', 'Accepted'] | ['s859857184', 's597878245'] | [2940.0, 3060.0] | [18.0, 17.0] | [177, 191] |
p03803 | u159717036 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["a,b=map(int,input().split())\nif a==1:\n a=100\nif b==1:\n b=100\nif a>b:\n print('Alise')\nelif a==b:\n print('Draw')\nelse:\n print('Bob')\n", "a,b=map(int,input().split())\nif a==1:\n a=100\nif b==1:\n b=100\nif a>b:\n print('Alice')\nelif a==b:\n print('Draw')\nelse:\n print('Bob')\n... | ['Wrong Answer', 'Accepted'] | ['s490315790', 's440252825'] | [2940.0, 2940.0] | [17.0, 17.0] | [146, 146] |
p03803 | u164471280 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['# ACB054C\nn, m = map(int, input().split())\nL = [[] for i in range(n)]\n\nfor i in range(m):\n a, b = map(int, input().split())\n L[a-1].append(b-1)\n L[b-1].append(a-1)\n\nans = 0\ndef f(t, history):\n history[t] += 1\n his = history[:]\n global ans\n if sum(his) == n:\n ans += 1\n el... | ['Runtime Error', 'Accepted'] | ['s344440489', 's937730470'] | [3064.0, 2940.0] | [18.0, 17.0] | [428, 189] |
p03803 | u167254893 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ['A,B = map(int,input().split())\n\nif (A=1 and B!=1):\n print("Alice")\n \n \n\n\n\n\nif (A>B):\n print("Alice")\nelif(A<B):\n print("Bob")\nelif(A==B):\n print("Draw")\n \n', 'A,B = map(int,input().split())\n\nif (A==1 and B!=1):\n print("Alice")\n exit()\n elif(B==1 and A!=1):\n print(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s084978853', 's768036862', 's983605763', 's981444511'] | [2940.0, 2940.0, 2940.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [176, 226, 226, 231] |
p03803 | u174536291 | 2,000 | 262,144 | Alice and Bob are playing _One Card Poker_. One Card Poker is a two-player game using playing cards. Each card in this game shows an integer between `1` and `13`, inclusive. The _strength_ of a card is determined by the number written on it, as follows: Weak `2` < `3` < `4` < `5` < `6` < `7` < `8` < `9` < `10` < ... | ["a, b = list(map(int, input().split()))\nif a == 1:\n a = 14\nelse:\n break\nif b == 1:\n b = 14\nelse:\n break\nif a > b:\n print('Alice')\nelif a == b:\n print('Draw')\nelse:\n print('Bob')\n", "a, b = list(map(int, input().split()))\nif a == 1:\n a = 14\nelse:\n a = a\nif b == 1:\n b = 14\nelse:\n b = b\... | ['Runtime Error', 'Accepted'] | ['s263203449', 's058272503'] | [8980.0, 9060.0] | [28.0, 32.0] | [184, 184] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.