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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03463 | u242031676 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['print("Borys")', 'n, a, b = map(int, input().split())\nif (b-a)%2:\n print("Borys")\nelse:\n print("Alice")'] | ['Wrong Answer', 'Accepted'] | ['s165863628', 's225638520'] | [9140.0, 9164.0] | [27.0, 30.0] | [14, 87] |
p03463 | u246366098 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b=map(int,input.split())\nif (a-b)%2==0:print('Alice')\nelse:print('Borys')", "n,a,b=map(int,input().split())\nif (a-b)%2==0:print('Alice')\nelse:print('Borys')"] | ['Runtime Error', 'Accepted'] | ['s466918629', 's107436440'] | [9064.0, 9096.0] | [29.0, 27.0] | [77, 79] |
p03463 | u263933075 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["s=input().split()\nif int(s[2])-int(s[1])==1:\n print('Borys')\nelif int(s[2])-int(s[1])%2==0:\n print('Alice')\nelse:\n print('Borys')", "s=input().split()\nif int(s[2])-int(s[1])%2==0:\n print('Alice')\nelse:\n print('Borys')", "a = input().split()\nif (int(a[2]) - int(a[1])) % 2 == 0:\n print('Al... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s414270209', 's924953993', 's677948345'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [138, 90, 100] |
p03463 | u268210555 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n, a, b = list(map(int, input().split()))\nprint(['Borys','Alice'][(b-a)%2])", "n, a, b = list(map(int, input().split()))\nprint(['Alice','Borys'][(b-a)%2])"] | ['Wrong Answer', 'Accepted'] | ['s699059368', 's649852991'] | [2940.0, 2940.0] | [17.0, 17.0] | [75, 75] |
p03463 | u288430479 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n,a,b = map(int,input().split())\nt = b-a\nif t%2==0:\n print("Borys")\nelse:\n print("Alice")', 'n,a,b = map(int,input().split())\nt = b-a\nif t%2==0:\n print("Alice")\nelse:\n print("Borys")'] | ['Wrong Answer', 'Accepted'] | ['s438752685', 's867942472'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 91] |
p03463 | u293579463 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['K = int(input())\nA = [int(i) for i in input().split()]\n\nMax, Min = 0, 0\nerror = -1\n\ndef N_max(a, Max, Min):\n if Max > a and Min%a != 0:\n return a*(Min//a + 2) - 1\n elif Max > a and Min%a == 0:\n return a*(Min//a + 1) - 1\n else:\n return a*2 -1\n \ndef N_min(a, m):\n i... | ['Runtime Error', 'Accepted'] | ['s425031896', 's685824928'] | [3064.0, 3316.0] | [18.0, 18.0] | [861, 94] |
p03463 | u297574184 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["from math import ceil, floor\n\nK = int(input())\nAs = list(map(int, input().split()))\n\nL = 2\nR = 2\nfor A in reversed(As):\n if R // A * A < L:\n print('-1')\n exit()\n L = ceil(L / A) * A\n R = floor(R / A) * A + A - 1\n\nprint(L, R)\n", "N, A, B = map(int, input().split())\n\nif (B - A) %... | ['Runtime Error', 'Accepted'] | ['s265788709', 's216792438'] | [3060.0, 2940.0] | [17.0, 17.0] | [248, 102] |
p03463 | u329058683 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B=map(input().split())\nif A-B%2==0:\n print("Alice")\nelse:\n print("Borys")', 'N,A,B=map(int,input().split())\nif (A-B)%2==0:\n print("Alice")\nelse:\n print("Borys")'] | ['Runtime Error', 'Accepted'] | ['s837563294', 's625173833'] | [2940.0, 2940.0] | [17.0, 17.0] | [79, 85] |
p03463 | u329706129 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = map(int, input().split())\nfor i in range(N):\n if(B != A + 1): A += 1\n elif(A != 0): A -= 1\n else: print('Borys'); exit(0)\n if(A != B - 1): B -= 1\n elif(B != N): B += 1\n else: print('Arice'); exit(0)\nprint('Draw')\n", "N, A, B = map(int, input().split())\nfor i in range(N):\n if(... | ['Wrong Answer', 'Accepted'] | ['s281708740', 's189785228'] | [3060.0, 3060.0] | [19.0, 18.0] | [241, 241] |
p03463 | u347640436 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = map(int, input().split())\nelif (B - A) % 2 == 0:\n print('Alice')\nelse:\n print('Borys')\n", "N, A, B = map(int, input().split())\nif (B - A) % 2 == 0:\n print('Alice')\nelse:\n print('Borys')\n"] | ['Runtime Error', 'Accepted'] | ['s144101209', 's431961658'] | [2940.0, 2940.0] | [17.0, 17.0] | [99, 97] |
p03463 | u363836311 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N,A,B=map(int, input().split())\nwhile A!=1 and B!=N:\n if A!=B-1:\n A+=1\n else:\n A=A-1\n print(A)\n if B!=A+1:\n B=B-1\n else:\n B=B+1\n print(B)\nif A==1:\n print('Borys')\nelse:\n print('Alice')\n \n", "N,A,B=map(int, input().split())\nturn=0\nwhile A!=1 and B!=N or turn==0:\n if A!=B-1... | ['Wrong Answer', 'Accepted'] | ['s200494510', 's905568961'] | [3060.0, 3064.0] | [17.0, 18.0] | [212, 252] |
p03463 | u371467115 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n,a,b=map(int,input().split())\nif abs(a-b)%1==0:\n print("Borys")\nelse:\n print("Alice")', 'n,a,b=map(int,input().split())\nif (b-a)%2==1:\n print("Borys")\nelif (b-a)%2==0: \n print("Alice")\nelse:\n print("Draw")\n'] | ['Wrong Answer', 'Accepted'] | ['s695866284', 's841606461'] | [2940.0, 2940.0] | [17.0, 18.0] | [88, 120] |
p03463 | u393512980 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = map(int, input().split())\nif (A-B)%2:\n print('Alice')\nelse:\n print('Borys')", "N, A, B = map(int, input().split())\nif (A-B)%2==0:\n print('Alice')\nelse:\n print('Borys')"] | ['Wrong Answer', 'Accepted'] | ['s017401702', 's653983306'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 94] |
p03463 | u401093859 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N_A_B = list(map(int, input().split()))\n\nif N_A_B[1] - N_A_B[2] %2 == 0:\n print("Alice")\nelif N_A_B[1] - N_A_B[2] %2 == 1:\n print("Borys")', 'N_A_B = list(map(int, input().split()))\n\nif N_A_B[1] - N_A_B[2] %2 == 0:\n print("Borys")\nelif N_A_B[1] - N_A_B[2] %2 == 1:\n print("Alice")', 'N_A_B = list... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s894226953', 's940741797', 's891979532'] | [2940.0, 2940.0, 3068.0] | [17.0, 17.0, 17.0] | [144, 144, 148] |
p03463 | u403331159 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B=map(int,input().split())\ndist=B-A\nif dist%2==0:\n print("Borys")\nelse:\n print("Alice")', 'N,A,B=map(int,input().split())\ndist=B-A\nif dist%2==1:\n print("Borys")\nelse:\n print("Alice")'] | ['Wrong Answer', 'Accepted'] | ['s856180180', 's795781950'] | [2940.0, 2940.0] | [17.0, 17.0] | [97, 97] |
p03463 | u408620326 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = [int(x) for x in input().strip().split()]\nif (A - B) % 2 == 0:\n print('Alice')\neles:\n print('Borys')", "N, A, B = [int(x) for x in input().strip().split()]\nif (A - B) % 2 == 0:\n print('Alice')\nelse:\n print('Borys')"] | ['Runtime Error', 'Accepted'] | ['s284058974', 's605655155'] | [2940.0, 2940.0] | [17.0, 17.0] | [112, 112] |
p03463 | u409064224 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B = map(int,input().split())\n\nif A == 1 and B == 2:\n print("Borys")\n exit()\nif (A == N-2 or A == N-1) and B == N:\n print("Alice")\n exit()\n\nif (B-A)%2 == 0 and A%2 == 1:\n print("Alice")\nelse:\n print("Borys")\n\n', 'N,A,B = map(int,input().split())\n\nif (B-A)%2 == 0:\n print("Alice... | ['Wrong Answer', 'Accepted'] | ['s734151727', 's279396302'] | [2940.0, 2940.0] | [21.0, 21.0] | [230, 96] |
p03463 | u426108351 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["a,b,c = map(int, input().split())\nif c - b % 2 == 0:\n print('Alice')\nelse:\n print('Borys')", "a,b,c = map(int, input().split())\nif (c-b) % 2 == 0:\n print('Alice')\nelse:\n print('Borys')\n"] | ['Wrong Answer', 'Accepted'] | ['s636876196', 's670012723'] | [2940.0, 2940.0] | [17.0, 18.0] | [92, 93] |
p03463 | u450339194 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = map(int, input().split())\n\ndiff = abs(A - B)\nif diff % 2 == 0:\n print('Borys')\nelse:\n print('Alice')", "N, A, B = map(int, input().split())\n\n\ndiff = abs(A - B)\nif diff % 2 == 0:\n print('Alice')\nelse:\n print('Borys')"] | ['Wrong Answer', 'Accepted'] | ['s892468364', 's171674019'] | [2940.0, 2940.0] | [18.0, 17.0] | [116, 117] |
p03463 | u454481887 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B = int.input()\nM = A+B\nif (M%2==1):\n print("Borys")\nelse:\n print("Alice")', 'N,A,B = map(int.input())\nM = N+A+B\nif (M%2==1):\n print("Borys")\nelse:\n print("Alice")', 'N,A,B = map(int.input())\nif ((N+A+B)%2==1):\n print("Borys")\nelse:\n print("alice")', 'n, a, b = map(int,input().spli... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s131869066', 's548580296', 's627367222', 's474158724'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0, 17.0] | [84, 91, 87, 103] |
p03463 | u490553751 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['print("Draw")', '#template\ndef inputlist(): return [int(j) for j in input().split()]\n#template\n\nN,A,B = inputlist()\nif (B-A-1) % 2 == 1:\n print("Alice")\nif (B-A-1) % 2 == 0:\n print("Borys")'] | ['Wrong Answer', 'Accepted'] | ['s693269924', 's143674412'] | [2940.0, 2940.0] | [17.0, 18.0] | [13, 199] |
p03463 | u505420467 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n,a,b=map(int,input().split())\nif n==2:\n print("Draw")\nelif (b-a-1)%2==0:\n print("Alice")\nelse:\n print("Borys")\n', 'n,a,b=map(int,input().split())\nif n==2:\n print("Borys")\nelif (b-a-1)%2==0:\n print("Borys")\nelse:\n print("Alice")\n'] | ['Wrong Answer', 'Accepted'] | ['s345969889', 's178482598'] | [3064.0, 2940.0] | [18.0, 18.0] | [121, 122] |
p03463 | u509739538 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['import math\nimport queue\nfrom collections import defaultdict\n\ndef readInt():\n\treturn int(input())\ndef readInts():\n\treturn list(map(int, input().split()))\ndef readChar():\n\treturn input()\ndef readChars():\n\treturn input().split()\ndef factorization(n):\n\tres = []\n\tif n%2==0:\n\t\tres.append(2)\n\tfor i... | ['Wrong Answer', 'Accepted'] | ['s656245898', 's420056747'] | [9732.0, 9800.0] | [25.0, 28.0] | [2322, 2324] |
p03463 | u586577600 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n, a, b = map(int, input().split())\nprint('Alice' if abs(a-b)%2 == 1 else 'Borys')\n", "n, a, b = map(int, input().split())\nprint('Alice' if (abs(a-b)-1)%2 == 1 else 'Borys')\n"] | ['Wrong Answer', 'Accepted'] | ['s736370106', 's364767782'] | [2940.0, 3316.0] | [17.0, 18.0] | [83, 87] |
p03463 | u604693716 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['a = input().split(" ")\nb = list(map(int, a))\nif (b[2] - b[1]) % 2 == 0:\n print("Borys")\nelse:\n print("Alice")\n', 'a = input().split(" ")\nb = list(map(int, a))\nif (b[2] - b[1]) % 2 == 1:\n print("Borys")\nelse:\n print("Alice")\n'] | ['Wrong Answer', 'Accepted'] | ['s230051751', 's682927953'] | [2940.0, 2940.0] | [17.0, 17.0] | [116, 116] |
p03463 | u608777907 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['def solve(A):\n current_max = 2\n current_min = 2\n for a_k in reversed(A):\n if current_max < a_k:\n print(\'-1\')\n return\n\n current_max = (current_max // a_k) * a_k + (a_k - 1)\n current_min = ((current_min - 1) // a_k + 1) * a_k\n current_min = max(curr... | ['Runtime Error', 'Accepted'] | ['s957853004', 's397896151'] | [3060.0, 2940.0] | [17.0, 17.0] | [487, 95] |
p03463 | u623687794 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b=map(int,input().split())\nif a==1 and b==2:\n print('Borys')\nelif b-a%2==0:\n print('Alice')\nelse:\n print('Borys')", "n,a,b=map(int,input().split())\nif a==1 and b==2:\n print('Borys')\nelif (b-a)%2==0:\n print('Alice')\nelse:\n print('Borys')\n"] | ['Wrong Answer', 'Accepted'] | ['s783110155', 's022927294'] | [2940.0, 2940.0] | [17.0, 17.0] | [120, 123] |
p03463 | u652081898 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n, a, b = map(int, input().split())\n\nif n == 0:\n print("Borys")\nelif (b-a)%2 == 0:\n print("Borys")\nelse:\n print("Alice")', 'n, a, b = map(int, input().split())\n\nif n == 2:\n print("Borys")\nelif (b-a-1)%2 == 0:\n print("Borys")\nelse:\n print("Alice")\n'] | ['Wrong Answer', 'Accepted'] | ['s074932162', 's505140526'] | [3060.0, 2940.0] | [20.0, 17.0] | [129, 132] |
p03463 | u664148512 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['import math\na=list(map(int, input().split()))\nprint("BAoLriycse"[math.floor((a[0]/2-a[1])%2 if a[0]%2==0 else ((a[0]/2+1)-a[1])%2)::2])\n', 'a=list(map(int, input().split()));print("ABloircyes"[(a[2]-a[1])%2::2])'] | ['Wrong Answer', 'Accepted'] | ['s135203243', 's567378725'] | [3060.0, 2940.0] | [17.0, 17.0] | [136, 71] |
p03463 | u667024514 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['a,b,c = map(int,input().split())\nif (a-b) % 2 == 1:\n print("Borys")\nelse:\n print("Alice")', 'a,b,c = map(int,input().split())\nif (b-c) % 2 == 1:\n print("Borys")\nelse:\n print("Alice")'] | ['Wrong Answer', 'Accepted'] | ['s962024282', 's273657483'] | [2940.0, 2940.0] | [17.0, 17.0] | [91, 91] |
p03463 | u670180528 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n,a,b=map(int,input().split());print("BAolriycse"[(b-a)%2::2])', 'n,a,b=map(int,input().split());print("ABloircyes"[(b-a)%2::2])'] | ['Wrong Answer', 'Accepted'] | ['s755334640', 's520694478'] | [2940.0, 2940.0] | [17.0, 17.0] | [62, 62] |
p03463 | u692632484 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['a,b,c=[int(i) for i in input().split()] 2 flag=(abs(b-c)%2)==0\n\nif flag:\n\tprint("Alice")\nelse:\n\tprint("Borys")', 'a,b,c=[int(i) for i in input().split()]\nif abs(b-c)%2==0:\n\tprint("Alice")\nelse:\n\tprint("Borys")'] | ['Runtime Error', 'Accepted'] | ['s085161822', 's932500171'] | [2940.0, 2940.0] | [17.0, 17.0] | [175, 95] |
p03463 | u707870100 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['# -*- coding: utf-8 -*-\n#AGC020A\nimport sys\n#import collections\n\n#n= int(input())\ntmp = input().split()\nn,a,b = list(map(lambda a: int(a), tmp))\n\nif((b-a)%2==1):\n\tprint("Alice")\nelse:\n\tprint("Borys")\n\n\n', '# -*- coding: utf-8 -*-\n#AGC020A\nimport sys\n#import collections\n\n#n= int(input())\ntmp = i... | ['Wrong Answer', 'Accepted'] | ['s033605133', 's451259476'] | [2940.0, 2940.0] | [18.0, 17.0] | [202, 202] |
p03463 | u731322489 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n, a, b = map(int, input().split())\n\nwhile a > 1 and b < n:\n if b > a + 1:\n a += 1\n else:\n a -= 1\n\n if a < b - 1:\n b -= 1\n else:\n b += 1\n print(a, b)\n\nprint("Borys" if a == 1 else "Alice")', 'n, a, b = map(int, input().split())\nprint("Borys" if (b - a) % 2 == ... | ['Wrong Answer', 'Accepted'] | ['s077221156', 's622140562'] | [3316.0, 2940.0] | [21.0, 17.0] | [231, 83] |
p03463 | u745997547 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["#\nN, A, B = list(map(int, input().rstpir().split()))\n\n#\nif (B-A-1)%2==0:\n print('Borys')\nelse:\n print('Alice')\n", "#\nN, A, B = list(map(int, input().split()))\n\n#\nif (B-A-1)%2==0:\n print('Borys')\nelse:\n print('Alice')\n"] | ['Runtime Error', 'Accepted'] | ['s067749466', 's784584441'] | [2940.0, 2940.0] | [17.0, 17.0] | [117, 108] |
p03463 | u772588522 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n, a, b = map(int, input().split())\n\n\n\n\nif b - a % 2:\n print('Borys')\nelse:\n print('Alice')", "n, a, b = map(int, input().split())\n\n\n\n\nif (b - a) % 2:\n print('Borys')\nelse:\n print('Alice')"] | ['Wrong Answer', 'Accepted'] | ['s843491635', 's001024622'] | [2940.0, 2940.0] | [18.0, 17.0] | [282, 284] |
p03463 | u787562674 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N, A, B = map(int, input().split())\n\nprint('Alice' if (B - A + 1) % 2 == 0 else 'Borys')\n", "N, A, B = map(int, input().split())\n\nprint('Borys' if (B - A + 1) % 2 == 0 else 'Alice')\n"] | ['Wrong Answer', 'Accepted'] | ['s065914799', 's306618786'] | [2940.0, 2940.0] | [18.0, 17.0] | [89, 89] |
p03463 | u810735437 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N, A, B = map(int, input().split())\nif (B - A) % 2:\n print("Alice")\nelse:\n print("Borys")\n\n', 'N, A, B = map(int, input().split())\nif (B - A) % 2:\n print("Borys")\nelse:\n print("Alice")\n\n'] | ['Wrong Answer', 'Accepted'] | ['s165092491', 's502963461'] | [2940.0, 2940.0] | [18.0, 18.0] | [97, 97] |
p03463 | u810778810 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['a=list(input())\nx=int(a[1])\ny=int(a[2])\n\nif abs(x-y)%2==0:\n print("Alice")\nelse:\n print("Borys")', 'a=list(input().split(" "))\nx=int(a[1])\ny=int(a[2])\n \nif abs(x-y)%2==0:\n print("Alice")\nelse:\n print("Borys")'] | ['Runtime Error', 'Accepted'] | ['s726410775', 's574248825'] | [2940.0, 3060.0] | [17.0, 19.0] | [98, 110] |
p03463 | u815498317 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N,A,B = list(map(int,input().split()))\n\nif (B-A)%2 == 0:\n\tprint('Bob')\nelse:\n print('Alice')", "N,A,B = list(map(int,input().split()))\n\nif (B-A)%2 == 0:\n\tprint('Borys')\nelse:\n print('Alice')\n", "N,A,B = list(map(int,input().split()))\n\nif (B-A)%2 != 0:\n\tprint('Borys')\nelse:\n print('Alice')\... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s097568906', 's607316983', 's353022146'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [95, 98, 98] |
p03463 | u819688111 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["if __name__ == '__main__':\n \n N, A, B = [int(x) for x in input().split(' ')]\n \n while True:\n \n if (A+1) == B:\n if A == 1:\n print('Borys')\n break\n else:\n A -= 1\n else:\n A += 1\n\n print(A,... | ['Wrong Answer', 'Accepted'] | ['s002959609', 's321267260'] | [3060.0, 2940.0] | [17.0, 17.0] | [502, 460] |
p03463 | u820047642 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n,a,b=int(input().split())\nif (b-a+1)%2==0:\n print("Borys")\nelse:\n print("Alice")', 'n,a,b=map(int,input().split())\nif (b-a+1)%2==0:\n print("Borys")\nelse:\n print("Alice")'] | ['Runtime Error', 'Accepted'] | ['s181741735', 's493852738'] | [2940.0, 2940.0] | [17.0, 17.0] | [87, 91] |
p03463 | u821262411 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b=map(int,input().split())\nif abs(a-b)%2 ==0:\n print('Borys')\nelse:\n print('Alice')\n ", "n,a,b=map(int,input().split())\nif abs(a-b)%2 ==1:\n print('Borys')\nelse:\n print('Alice')\n "] | ['Wrong Answer', 'Accepted'] | ['s237337996', 's739529421'] | [2940.0, 2940.0] | [17.0, 17.0] | [98, 98] |
p03463 | u841021102 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n, a, b = map(int, input().split())\nif (n + b) % 2 == 0:\n print("Alice")\nelif (n + b) % 2 != 0:\n print("Borys")', 'n, a, b = map(int, input().split())\nif (n + b) % 2 == 0:\n print("Alice")\nelif (n + b) % 2 != 0:\n print("Bor', 'n, a, b = map(int, input().split())\nif (a - b) % 2 == 0:\n print("Borys")\nels... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s050167730', 's331575266', 's375065004', 's681197597', 's767171942'] | [9076.0, 8960.0, 9108.0, 9076.0, 9108.0] | [29.0, 25.0, 30.0, 29.0, 29.0] | [113, 109, 96, 96, 96] |
p03463 | u844789719 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["import math\nK = int(input())\nA = [int(_) for _ in input().split()]\nl = r = 2\n'''\nif x children form groups consisting of y children each\n then z children are left\n=> z=y*(x//y)\n=> y*(math.ceil(z/y))<=x<y*(math.floor(z/y)+1)\n'''\n#necessary conditions\nfor a in A[::-1]:\n l = a * math.ceil(l / a)\n r = ... | ['Runtime Error', 'Accepted'] | ['s851393364', 's899756330'] | [3064.0, 2940.0] | [17.0, 18.0] | [478, 104] |
p03463 | u858136677 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b = map(int,input().split())\nif n%2 == 0\n\tif a == 1:\n\t\tif b == n or b == 2:\n\t\t\tprint('Borys')\n\t\telse:\n\t\t\tprint('Alice')\n\tif b == n\n\t\tprint('Alice')\nelse:\n\tif a == 1:\n\t\tif b == n-1:\n\t\t\tprint('Borys')\n\t\telse:\n\t\t\tprint('Alice')\n\telif b == n:\n\t\tif a == n-1:\n\t\t\tprint('Al... | ['Runtime Error', 'Accepted'] | ['s615299280', 's388429026'] | [2940.0, 2940.0] | [17.0, 17.0] | [371, 169] |
p03463 | u898967808 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b = map(int,input().split())\nif (b-a)%2 == 0:\n print('Borys')\nelse:\n pritn('Alice')", "n,a,b = map(int,input().split())\nif abs(b-a) % 2 == 0:\n print('Alice')\nelse:\n print('Borys') "] | ['Runtime Error', 'Accepted'] | ['s519270095', 's502678637'] | [9144.0, 8984.0] | [30.0, 29.0] | [89, 96] |
p03463 | u902151549 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B=map(int,input().split())\nd=B-A\nif d%2==:print("Alice")\nelse:print("Borys")', 'N,A,B=map(int,input().split())\nd=B-A\nif d%2==0:print("Alice")\nelse:print("Borys")\n'] | ['Runtime Error', 'Accepted'] | ['s255837763', 's694610359'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 82] |
p03463 | u902468164 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n, a, b = [int(i) for i in input().splti(' ')]\nprint('Alice' if abs(a-b) % 2 == 0 else 'Borys')\n", "n, a, b = [int(i) for i in input().split(' ')]\nprint('Alice' if abs(a-b) % 2 == 0 else 'Borys')"] | ['Runtime Error', 'Accepted'] | ['s746587892', 's354357501'] | [2940.0, 2940.0] | [17.0, 17.0] | [96, 95] |
p03463 | u921168761 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N, A, B = map(int, input().split())\nprint("Alice" if (B - A) % 2 == 1 else "Borys")', 'N, A, B = map(int, input().split())\nprint("Alice" if (B - A) % 2 == 0 else "Borys")'] | ['Wrong Answer', 'Accepted'] | ['s733089013', 's345672390'] | [2940.0, 2940.0] | [18.0, 17.0] | [83, 83] |
p03463 | u921773161 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["print('Draw')", "print('Draw')n, a, b = map(int, input().split())\n\nif (b-a) % 2 == 0:\n ans = 'Alice'\nelse:\n ans = 'Borys'\n\nprint(ans)", "n, a, b = map(int, input().split())\n\nif (b-a) % 2 == 0:\n ans = 'Alice'\nelse:\n ans = 'Borys'\n\nprint(ans)\n"] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s053632752', 's559208902', 's717561249'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [13, 123, 111] |
p03463 | u923270446 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['n, a, b = map(int, input())\nif (b - a) % 2 == 0:\n print("Alice")\nelse:\n print("Borys")', 'n,a,b=map(int,input().split())\nprint("Borys"if (b-a)%2else "Alice")'] | ['Runtime Error', 'Accepted'] | ['s788742054', 's648731743'] | [2940.0, 9088.0] | [17.0, 28.0] | [92, 67] |
p03463 | u941753895 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b=map(int,input().split())\nif n==5 and a==2 and b==4:\n exit()\nif (b-a)%2==0:\n print('Alice')\nelse:\n print('Borys')", "import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time\n\nsys.setrecursionlimit(10**7)\ninf=10**20\nmod=10**9+7\n\ndef LI(): return list(map(int,input().... | ['Wrong Answer', 'Accepted'] | ['s217247534', 's498435041'] | [2940.0, 6432.0] | [17.0, 55.0] | [121, 381] |
p03463 | u948374595 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n, a, b = map(int, input().split())\nturn = 0\nwhile True: \n if turn == 0:\n if a + 1 < b:\n a += 1\n print('a', a)\n elif 0 < a :\n a -= 1\n print('a', a)\n else:\n break\n turn = 1\n elif turn == 1:\n if a + 1 < b:\n b -= 1\n print('b', b)\n elif a + 1 == b an... | ['Wrong Answer', 'Accepted'] | ['s211594368', 's657028015'] | [3316.0, 3060.0] | [21.0, 17.0] | [434, 354] |
p03463 | u969708690 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ['N,A,B=map(int,input().split())\nif (A-B)%2==0:\n print("Borys")\nelse:\n print("Alice")', 'N,A,B=map(int,input().split())\nif (A-B)%2==1:\n print("Borys")\nelse:\n print("Alice")'] | ['Wrong Answer', 'Accepted'] | ['s074146404', 's065426357'] | [9088.0, 9168.0] | [28.0, 29.0] | [85, 85] |
p03463 | u970197315 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["N,A,B = map(int,input().split())\n\nD = B - A\n\nif N%2 == 1:\n if D%2 == 1:\n print('Borys')\n elif D%2 == 0:\n print('Draw')\nelif N%2 == 1:\n print('Alice')", "N,A,B = map(int,input().split())\n\nD = B - A\n\nif N%2 == 1:\n if D%2 == 1:\n print('Borys')\n elif D%2 == 0:\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s202433315', 's498578864', 's156573040'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [173, 173, 108] |
p03463 | u970809473 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["n,a,b = map(int, input().split())\nif n == 2:\n print('Draw')\nelif (a - b) % 2 == 1:\n print('Alice')\nelse:\n print('Borys')", "n,a,b = map(int, input().split())\nif n == 2:\n print('Borys')\nelif a == 1 and b == 2:\n print('Borys')\nelif (a - b) % 2 == 0:\n print('Alice')\nelse:\n print('Borys')"] | ['Wrong Answer', 'Accepted'] | ['s361030802', 's647492321'] | [2940.0, 3064.0] | [17.0, 18.0] | [123, 165] |
p03463 | u983853152 | 1,000 | 524,288 | A game is played on a strip consisting of N cells consecutively numbered from 1 to N. Alice has her token on cell A. Borys has his token on a different cell B. Players take turns, Alice moves first. The moving player must shift his or her token from its current cell X to the neighboring cell on the left, cell X-1, or... | ["\ndef main():\n N,A,B = map(int, input().split()) \n while True:\n if(A+1==B):\n print('Borys')\n return\n A = A+1\n if(B-1==A):\n print('Alicce')\n return\n B = B-1\n\n\nif __name__ == '__main__':\n main()\n", "\ndef main():\n N,A,B... | ['Wrong Answer', 'Accepted'] | ['s608627598', 's795174575'] | [3068.0, 2940.0] | [17.0, 17.0] | [274, 273] |
p03464 | u037430802 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['\n\n\n\nK = int(input())\n\nA = list(map(int, input().split()))\n\nif K == 1:\n print(2,3)\n exit()\n\nif A[-1] != 2:\n print(-1)\n exit()\n\nbig = 2\nsmall = 2\nfor i in reversed(range(K)):\n\n\n\n if A[i] < small:\n t_small = (small // A[i] + 1) * A[i]\n else:\n t_small = A[i]\n\n ... | ['Wrong Answer', 'Accepted'] | ['s089383083', 's604309102'] | [14224.0, 14228.0] | [93.0, 204.0] | [405, 1988] |
p03464 | u057079894 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['n=int(input())\nda=list(map(int ,input().split()))\nMin=2\nMax=2\nju=True\nfor i in da[::-1]:\n mi=(Min+i-1)//i\n ma=Max//i\n if mi*i>Max or ma*i<Min:\n ju=False\n break\n Min=mi*i\n Max=ma*i+i-1\nif ju:\n print(Max,Min)\nelse:\n print(-1)', 'n=int(input())\nda=list(map(int ,input()... | ['Wrong Answer', 'Accepted'] | ['s912759978', 's306814386'] | [14252.0, 14252.0] | [119.0, 121.0] | [258, 259] |
p03464 | u057463552 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['import sys\nK = int(input())\nA = [int(x) for x in input().split()]\nA.reverse()\njmax, jmin = 2,2\n\nif A[0] != 2:\n print(-1)\n sys.exit()\n\n\n"""max"""\nfor i in range(0,K-1):\n drop_num = []\n for j in range(0,A[i]): \n if ( jmax + j ) % A[i+1] == 0:\n drop_num.append(j)\n\n ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s044443262', 's165780116', 's226492967', 's410185160', 's414464354', 's554810574', 's687570691', 's400232007'] | [14228.0, 14868.0, 14232.0, 14252.0, 14428.0, 594748.0, 14400.0, 14252.0] | [323.0, 48.0, 2104.0, 128.0, 46.0, 2134.0, 46.0, 180.0] | [1005, 873, 1119, 389, 523, 556, 471, 398] |
p03464 | u071680334 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['from fractions import gcd\ndef calc(n, N, p, q):\n n, N = n*q//gcd(n, q), N*q//gcd(N, q)\n L, R = 0, 10**9\n while L+1 < R:\n M = (L+R)//2\n if n <= p*M:\n R = M\n else:\n L = M\n if n+(q-1) < p*R:\n n = -1\n else:\n n = p*R\n L, R = 0, 10**9\... | ['Wrong Answer', 'Accepted'] | ['s506609499', 's333438749'] | [16240.0, 14428.0] | [1479.0, 1950.0] | [922, 735] |
p03464 | u077291787 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['# AGC020B - Ice Rink Game\ndef main():\n K, *A = map(int, open(0).read().split())\n l, h = 2, 2 # low, high\n for i in A[::-1]:\n l = (l + i - 1) // i * i\n h = (h / i + 1) * i - 1\n if l > h:\n print(-1)\n else:\n print(l, h)\n\n\nif __name__ == "__main__":\n main()', '... | ['Wrong Answer', 'Accepted'] | ['s684913041', 's749941888'] | [14092.0, 14092.0] | [99.0, 74.0] | [300, 282] |
p03464 | u201234972 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K = int( input())\nA = list( map( int, input().split()))\nnowm = 2\nnowM = 2\nans = 0\nfor i in range(K-1,-1,-1):\n if nowM < A[i]:\n ans = -1\n break\n elif nowm <= A[i]:\n nowm = A[i]\n nowM = A[i]*2 - 1\n else:\n nowm = (nowm//A[i]+1)*A[i]\n if nowm > nowM:\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s123720490', 's269887924', 's933508655', 's915194730'] | [14252.0, 14224.0, 14436.0, 14224.0] | [111.0, 288.0, 269.0, 165.0] | [539, 864, 466, 841] |
p03464 | u257974487 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['N = int(input())\nP = list(reversed(list(map(int, input().split()))))\n\ns, t = 2, 2\nfor i in P:\n p = max((s + i - 1) // i, 1)\n q = t // i\n print(i)\n if q < p:\n print(-1)\n quit(0)\n s, t = p * i, q * i + i - 1\n\nprint(s, t)\n', 'N = int(input())\nops = list(input().split())\nP = [... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s165632546', 's722299652', 's360158568'] | [14252.0, 18956.0, 14224.0] | [213.0, 136.0, 127.0] | [248, 565, 235] |
p03464 | u284854859 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["k = int(input())\na = list(map(int,input().split()))\na = a[::-1]\n\nc = 2 #min\nd = 2 #max\nres = 1 \n\nfor i in range(k):\n if d > a[i]:\n res = -1\n break\n if i != k-1:\n if c % a[i] != 0 or d % a[i] != 0:\n res = -1\n break\n else:\n d = d + a[i]... | ['Wrong Answer', 'Accepted'] | ['s938761345', 's061195139'] | [14428.0, 14400.0] | [171.0, 1478.0] | [762, 651] |
p03464 | u315485238 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K = int(input())\nA = list(map(int, input().split()))\n\ndef winner_count(N, A=A):\n for a in A:\n N = a*(N//a)\n return N\n\nclass lazy_eval_list(list):\n def __init__(self, func, a):\n super().__init__(a)\n self._func = func\n \n def __getitem__(self, key):\n return se... | ['Runtime Error', 'Accepted'] | ['s066745497', 's108621790'] | [14224.0, 14252.0] | [325.0, 129.0] | [580, 340] |
p03464 | u333945892 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["from collections import defaultdict,deque\nimport sys,heapq,bisect,math,itertools,string,queue,datetime\nsys.setrecursionlimit(10**8)\nINF = float('inf')\nmod = 10**9+7\ndef inpl(): return list(map(int, input().split()))\ndef inpls(): return list(input().split())\n\nK = int(input())\naa = reversed(inpl())\n\nMIN = MA... | ['Wrong Answer', 'Accepted'] | ['s763874905', 's536464917'] | [15596.0, 15600.0] | [326.0, 143.0] | [511, 490] |
p03464 | u346308892 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['\nimport numpy as np\nimport sys\nsys.setrecursionlimit(100000)\n\n\n\ndef acinput():\n return list(map(int, input().split(" ")))\n\n\n\ndirections=np.array([[1,0],[0,1],[-1,0],[0,-1]])\ndirections = list(map(np.array, directions))\n\nmod = 10**9+7\n\n\ndef factorial(n):\n fact = 1\n for integer in range(1, ... | ['Wrong Answer', 'Accepted'] | ['s181222655', 's085418107'] | [23400.0, 23992.0] | [1715.0, 1789.0] | [2197, 2216] |
p03464 | u346812984 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['import sys\nimport math\n\nsys.setrecursionlimit(10 ** 6)\nINF = float("inf")\nMOD = 10 ** 9 + 7\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef main():\n K = int(input())\n A = list(map(int, input().split()))\n\n if A[-1] != 2:\n print(-1)\n return\n\n \n m = 2\n M... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s117653891', 's182638542', 's454242174'] | [15020.0, 15020.0, 15020.0] | [65.0, 124.0, 99.0] | [645, 602, 603] |
p03464 | u375616706 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['# python template for atcoder1\nimport sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nK = int(input())\nL = list(map(int, input().split()))\n\nma = 2\nmi = 2\nL = reversed(L)\n\nfor l in L:\n if l > ma:\n print(-1)\n exit()\n else:\n mi = (mi//l)*l\n ma = (ma//l)*(l... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s321483885', 's396893579', 's677906646', 's762023353'] | [14252.0, 14252.0, 14252.0, 14252.0] | [86.0, 43.0, 43.0, 135.0] | [320, 501, 502, 424] |
p03464 | u391475811 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K = int(input())\nA = [int(i) for i in input().split()]\nA.reverse()\n\nmin_A=2\nmax_A=3\ncnt=True\nif A[-1]!=2:\n print(-1)\n cnt=False\nfor i in range(1,K):\n a=(min_A+A[i]-1)//A[i]*A[i]\n b=max_A//A[i]*A[i]\n if a>b:\n print(-1)\n cnt=False\n break\n else:\n min_A=a\n max_A=b+A[i]-1\n\nif cnt:... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s310723144', 's581291447', 's791784922'] | [14224.0, 14436.0, 14252.0] | [132.0, 2104.0, 140.0] | [319, 457, 326] |
p03464 | u451017206 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['from math import floor, ceil\nk = int(input())\na = [int(i) for i in input().split()]\nl,r = 2,2\nfor ai in a[::-1]:\n if l // ai >= 1 or r // ai >= 1:\n print(-1)\n exit()\n l = ceil(l/ai)*ai\n r = floor(r/ai) * ai + ai - 1\nprint(l,r)\n', 'from math import floor, ceil\nk = int(input())\na = [... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s621661750', 's912186495', 's733584242'] | [14252.0, 14252.0, 14252.0] | [47.0, 118.0, 134.0] | [250, 255, 255] |
p03464 | u497046426 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['def div_ceil(x, y): return (x + y - 1) // y\n\nN = int(input())\n*A, = map(int, input().split())\ncand_min, cand_max = 2, 2\nfor a in reversed(A):\n if a > cand_max: print(-1); break\n cand_max = (cand_max // a) * a\n cand_min = div_ceil(cand_min, a) * a\n cand_max = cand_max + a - 1\nelse:\n cand_max ... | ['Wrong Answer', 'Accepted'] | ['s265438709', 's544673463'] | [14252.0, 14252.0] | [116.0, 137.0] | [358, 323] |
p03464 | u509368316 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K=int(input())\nA=list(map(int,input().split()))\nl,h=2,2\nfor a in A[::-1]:\n if h<a or h//a==l//a:\n l=h=-1\n break\n else:\n l=-(-l//a)*a\n h=(h//a+1)*a-1\nif l==h==-1:\n print(-1)\nelse:\n print(l,h)', 'K=int(input())\nA=list(map(int,input().split()))\nl,h=2,2\nfor a in A[::-1]... | ['Wrong Answer', 'Accepted'] | ['s166701034', 's475448650'] | [14252.0, 14252.0] | [42.0, 100.0] | [226, 198] |
p03464 | u545368057 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K = int(input())\nAs = list(map(int, input().split()))\n\ndef f(n):\n for a in As:\n x,_ = divmod(n,a)\n n = x*a\n return n\n\nl,r = 1, 10**10\nwhile r-l > 1:\n m = (r+l)//2\n if f(m) < 2:\n l = m\n else:\n r = m\nmn = r\n\nl,r = 1, 10**10\nwhile r-l > 1:\n m = (r+l)//2\n... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s252129542', 's880351896', 's023054022'] | [20264.0, 20508.0, 20492.0] | [724.0, 201.0, 1364.0] | [409, 430, 419] |
p03464 | u619819312 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['k=int(input())\na=list(map(int,input().split()))\ndef f(x):\n for i in range(k):\n x-=x%a[i]\n return x\ns=k*max(a)+3\nt=0\nwhile s-t>1:\n x=(s+t)//2\n if f(x)>2:\n s=x\n else:\n t=x\np=k*max(a)+3\nq=0\nwhile p-q>1:\n x=(p+q)//2\n if f(x)>=2:\n q=x\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s889631839', 's100184467'] | [14428.0, 14428.0] | [1696.0, 1836.0] | [407, 364] |
p03464 | u636684559 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["K=int(input())\nA=input().split(' ')\nmin=2\nmax=2\nflag=0\nwhile K>0:\n K=K-1\n i=int(A[K])\n if max<i:\n print('-1')\n flag=1\n break\n else:\n min=min+i-(min%i)\n max=max+i-(max%i)-1\nif flag==0:\n print('{0} {1}'.format(min,max))", "K=int(input())\nA=input().split(' ')\nmin=2\nmax=2\nflag=0\nw... | ['Wrong Answer', 'Accepted'] | ['s644235940', 's183307814'] | [11980.0, 13100.0] | [115.0, 151.0] | [237, 381] |
p03464 | u637175065 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools\n\nsys.setrecursionlimit(10**7)\ninf = 10**20\neps = 1.0 / 10**15\nmod = 10**9+7\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\ndef LI_(): return [int(x)-1 for x in sys.stdin.readline().split()... | ['Wrong Answer', 'Accepted'] | ['s344703394', 's786226372'] | [16652.0, 16644.0] | [68.0, 1073.0] | [1108, 1161] |
p03464 | u665415433 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["K = int(input())\nA = list(map(int,input().split()))\na = K-1\np = 2\nwhile 0 <= a:\n if A[a-1] > A[a]*2:\n print('-1')\n exit()\n num = 1\n if A[a] < p:\n while A[a]*num < p:\n num += 1\n p = num*A[a]\n a -= 1\npmax = p\nwhile pmax < A[1]*2:\n pmax += A[0]\npmax -= A... | ['Runtime Error', 'Accepted'] | ['s683596780', 's472497416'] | [14224.0, 15020.0] | [2104.0, 249.0] | [319, 306] |
p03464 | u810735437 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['\n\n\n# ...\n\nK = int(input())\nAs = list(map(int, input().split()))\nAs.reverse()\n\nfail = False\nif As[0] != 2:\n fail = True\nelse:\n mn = 2\n mx = 3\n for a in As[1:]:\n \n \n if mn % a != 0:\n mn = (mn // a) * a + a\n if mx % a != 0:\n mx = (mx // a... | ['Runtime Error', 'Accepted'] | ['s341574599', 's509996958'] | [3060.0, 14252.0] | [17.0, 130.0] | [720, 739] |
p03464 | u846150137 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ["n=int(input())\na=reversed([int(i) for i in input().split()])\nmax_a=3\nmin_a=2\na0=2\nflg=0\nan=list(a)\nif an[0]!=2:\n f=1\nfor i in an:\n if i > max_a:\n flg=1\n break\n elif i !=a0: \n if i>a0:\n min_a +=i-a0\n else:\n min_a+= i - min_a % i \n max_a=min_a + i -1\n a0=i\n\nif flg==1... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s107149203', 's270015149', 's494054037', 's230450836'] | [16288.0, 14224.0, 14252.0, 11132.0] | [98.0, 97.0, 105.0, 130.0] | [339, 342, 338, 131] |
p03464 | u865741247 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['import copy\ndef ketanowa(p):\n ans=0\n p=str(p)\n for i in p:\n ans+=int(i)\n return ans\n\ndef main():\n n=int(input())\n temp=input().split(" ")\n nums=list(map(int,temp))\n nums_o=copy.copy(nums)\n nums.reverse()\n for i in range(len(nums)-1):\n if nums[i]>nums[i+1]:\n ... | ['Wrong Answer', 'Accepted'] | ['s951393280', 's009159440'] | [18788.0, 14764.0] | [131.0, 102.0] | [906, 432] |
p03464 | u870262604 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['k = int(input())\na = list(map(int, input().split()))\ndef solve():\n\n if a[k-1] != 2:\n print(-1)\n return\n\n if k == 1:\n print(2, 3)\n return\n\n mi = 0\n mx = 0\n\n for i in range(k):\n\n if i==0:\n mi = 2\n mx = 2\n # elif i > 1 and... | ['Wrong Answer', 'Accepted'] | ['s616296289', 's736783947'] | [14428.0, 14432.0] | [425.0, 155.0] | [791, 595] |
p03464 | u925364229 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['K = int(input())\nA = list(map(int,input().split()))\n\nif A[-1] != 2:\n\tprint(-1)\n\texit(0)\n\nminval = 2\nmaxval = 3\nfor i in range(K-1,-1,-1):\n\tif maxval < A[i] or (minval > A[i] and ((maxval - (maxval % A[i]) < minval)):\n\t\tprint(-1)\n\t\texit(0)\n\n\tif minval > A[i]:\n\t\tif minval % A[i] != 0:\n\t\t\tmi... | ['Runtime Error', 'Accepted'] | ['s770755030', 's238374001'] | [2940.0, 14428.0] | [17.0, 168.0] | [476, 477] |
p03464 | u936985471 | 2,000 | 524,288 | An adult game master and N children are playing a game on an ice rink. The game consists of K rounds. In the i-th round, the game master announces: * Form groups consisting of A_i children each! Then the children who are still in the game form as many groups of A_i children as possible. One child may belong to at m... | ['import sys\nreadline = sys.stdin.readline\n\nK = int(readline())\nA = list(map(int,readline().split()))[::-1] \n\n\ncur = 2\n\nif A[0] != 2: \n print(-1)\n exit(0)\n\n#print(A)\n\ndef getMinVal(c,a):\n \n return (((c- 1) // a) + 1) * a\n\ndef getMaxVal(minval,a):\n \n return minval + a - 1\n\n\nfor i in range(l... | ['Wrong Answer', 'Accepted'] | ['s449755077', 's201371530'] | [14252.0, 15020.0] | [284.0, 156.0] | [1818, 967] |
p03465 | u075595666 | 2,000 | 524,288 | You are given N integers A_1, A_2, ..., A_N. Consider the sums of all non-empty subsequences of A. There are 2^N - 1 such sums, an odd number. Let the list of these sums in non-decreasing order be S_1, S_2, ..., S_{2^N - 1}. Find the median of this list, S_{2^{N-1}}. | ['n = int(input())\na = list(map(int,input().split()))\ns = sum(a)\na.sort()\nb = 1\nfor i in a:\n b |= b<<i\n \nb &= 2**(s+1)-2**((s-1)//2)\nt = b&(-b)\nprint(t.bit_length()-1)', 'n = int(input())\na = list(map(int,input().split()))\ns = sum(a)\na.sort()\nb = 1\nfor i in a:\n b |= b<<i\n \nb &= 2**(s+1)-2**((s+1)/... | ['Wrong Answer', 'Accepted'] | ['s072902179', 's487320856'] | [11388.0, 11580.0] | [430.0, 435.0] | [167, 167] |
p03465 | u340781749 | 2,000 | 524,288 | You are given N integers A_1, A_2, ..., A_N. Consider the sums of all non-empty subsequences of A. There are 2^N - 1 such sums, an odd number. Let the list of these sums in non-decreasing order be S_1, S_2, ..., S_{2^N - 1}. Find the median of this list, S_{2^{N-1}}. | ['n = int(input())\narr = list(map(int, input().split()))\ndp = 1\n\nfor a in arr:\n dp |= dp << a\n\nts = 1 << ((dp.bit_length() + 1) // 2 - 1)\nwhile not dp & ts:\n ts <<= 1\n\nprint(ts.bit_length())\n', 'n = int(input())\narr = list(map(int, input().split()))\ndp = 1\n\nfor a in arr:\n dp |= dp << a\n\nts =... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s396492605', 's763705112', 's779555302'] | [5464.0, 5456.0, 5452.0] | [651.0, 457.0, 453.0] | [195, 184, 172] |
p03466 | u144695182 | 2,000 | 524,288 | Let f(A, B), where A and B are positive integers, be the string satisfying the following conditions: * f(A, B) has length A + B; * f(A, B) contains exactly A letters `A` and exactly B letters `B`; * The length of the longest substring of f(A, B) consisting of equal letters (ex., `AAAAA` or `BBBB`) is as small as... | ['for t in range(int(input())):\n a,b,c,d=map(int,input().split(\' \'));l,x,y,o=(a+b)//(min(a,b)+1),0,0,""\n\tif a*l<=b:y=a+b\n\telif b*l<=a:x=a+b\n\telse:x,y=(a*l-b)//(l-1),(b*l-a)//(l-1)\n\tfor i in range(c,d+1):o+="AB"[i%(l+1)==0] if i<=x else "BA"[(a+b-i+1)%(l+1)==0] if a+b-i+1<=y else "AB"[a-x+x//(l+1)-y//(l+1)==... | ['Runtime Error', 'Accepted'] | ['s422209750', 's510702582'] | [2940.0, 3188.0] | [17.0, 82.0] | [319, 318] |
p03466 | u545001286 | 2,000 | 524,288 | Let f(A, B), where A and B are positive integers, be the string satisfying the following conditions: * f(A, B) has length A + B; * f(A, B) contains exactly A letters `A` and exactly B letters `B`; * The length of the longest substring of f(A, B) consisting of equal letters (ex., `AAAAA` or `BBBB`) is as small as... | ['for t in range(int(input())):\n\ta,b,c,d=map(int,input().split(\' \'));l,x,y,o=(a+b)//(min(a,b)+1),(a*l-b)//(l-1),(b*l-a)//(l-1),""\n\tif a*l<=b:x,y=0,a+b\n\telif b*l<=a:x,y=a+b,0\n\tfor i in range(c,d+1):o+="AB"[i%(l+1)==0] if i<=x else "BA"[(a+b-i+1)%(l+1)==0] if a+b-i+1<=y else "AB"[a-x+x//(l+1)-y//(l+1)==0]\n\tpr... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s178097612', 's981183665', 's305958224'] | [3064.0, 3188.0, 3188.0] | [18.0, 80.0, 81.0] | [312, 312, 311] |
p03466 | u858748695 | 2,000 | 524,288 | Let f(A, B), where A and B are positive integers, be the string satisfying the following conditions: * f(A, B) has length A + B; * f(A, B) contains exactly A letters `A` and exactly B letters `B`; * The length of the longest substring of f(A, B) consisting of equal letters (ex., `AAAAA` or `BBBB`) is as small as... | ["#!/usr/bin/env python3\nimport math\nimport bisect\nQ = int(input())\nfor _ in range(Q):\n A, B, C, D = map(int, input().split())\n K = math.ceil(max(A, B) / (min(A, B) + 1))\n xs = ((A - i + 1) * K < B - max(0, (i - 1) // K) for i in range(A + 1))\n p = bisect.bisect(list(xs), False)\n f = ''\n for... | ['Wrong Answer', 'Accepted'] | ['s437963317', 's811119816'] | [44732.0, 3188.0] | [2106.0, 220.0] | [749, 742] |
p03481 | u018679195 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['x, y = map(int, input().split())\ncnt = 1;\nwhile x < y:\n x *= 2\n cnt += 1\nprint(cnt)', 'x, y = map(int, input().split())\ncnt = 0;\nwhile x <= y:\n cnt += 1\n x *= 2\nprint(cnt)'] | ['Wrong Answer', 'Accepted'] | ['s563438115', 's399308922'] | [3060.0, 2940.0] | [18.0, 18.0] | [89, 90] |
p03481 | u067983636 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['import math\nX, Y = map(int, input().split())\nr = 0\nwhile X < Y:\n Y //= X\n r += 1\nprint(int(math.log2(r)) + 1)', 'import math\nX, Y = map(int, input().split())\nr = 0\nR = Y // X\nwhile R >= 2:\n R //= 2\n r += 1\nprint(r + 1)'] | ['Runtime Error', 'Accepted'] | ['s567173194', 's271693599'] | [2940.0, 3060.0] | [2104.0, 19.0] | [111, 107] |
p03481 | u068142202 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['x, y = map(int, input().split())\ncount = 0\nans = []\nx_copy = x\nwhile x_copy < y:\n x_copy = x\n x_copy *= 2 ** count\n ans.append(x_copy)\n count += 1\nprint(len(ans))\n', 'x, y = map(int, input().split())\n\nfor i in range(1, 101):\n if x > y:\n ans = i - 1\n break\n x *= 2\n\npri... | ['Wrong Answer', 'Accepted'] | ['s815877191', 's742016902'] | [9084.0, 9092.0] | [32.0, 27.0] | [175, 129] |
p03481 | u089230684 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['X,Y = map(int,input().split())\nans = 0\nwhile X <= Y:\n\tans += 1\n\tX * = 2\nprint(ans)', 'X,Y = map(int,input())\nans = 0\nwhile X <= Y:\n\tans += 1\n\tX *= 2\nprint(ans)', 'X,Y = map(int,input().split())\nans = 0\nwhile X <= Y:\n\tans += 1\n\tX *= 2\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s290602226', 's437290291', 's028282217'] | [2940.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0] | [82, 73, 81] |
p03481 | u118642796 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['X,Y = map(int,input().split())\nans = 0\nwhile True:\n X *= 2\n if X<=Y:\n ans += 1\n else:\n break\nprint(ans)', 'X,Y = map(int,input().split())\nans = 1\nwhile True:\n X *= 2\n if X<=Y:\n ans += 1\n else:\n break\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s653092291', 's222930576'] | [3064.0, 2940.0] | [17.0, 17.0] | [112, 112] |
p03481 | u168416324 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['3 20', 'x,y=map(int,input().split())\ni=1\nwhile x*2<=y:\n i+=1\n x*=2\nprint(i)'] | ['Runtime Error', 'Accepted'] | ['s908569564', 's285033151'] | [2940.0, 2940.0] | [17.0, 18.0] | [4, 69] |
p03481 | u205561862 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['import math;print((lambda l:math.floor(math.log2(l[1]/l[0])+1e9)+1)(list(map(int,input().split()))))', 'import math;print((lambda l:math.floor(math.log2(l[1]/l[0]))+1+1e-9)(list(map(int,input().split()))))', 'import math;print(int((lambda l:math.floor(1e-5+math.log2(l[1]/l[0]))+1))(list(map(int,input().split()))))\n'... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s283388249', 's355234909', 's427233534', 's651846317', 's750893808'] | [2940.0, 3188.0, 2940.0, 2940.0, 2940.0] | [17.0, 19.0, 18.0, 18.0, 18.0] | [100, 101, 107, 106, 103] |
p03481 | u244423127 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['a = list(map(int,input().split()))\nx = a[0]\ny = a[1]\n\nn = a[0]\ncount =1\n\nwhile n <= y:\n n = n * 2\n count += 1\n \nprint(str(count))', 'a = list(map(int,input().split()))\nx = a[0]\ny = a[1]\n\nn = a[0]\ncount = 0\n\nwhile n <= y:\n n = n << 1\n count += 1\n \nprint(str(count))'] | ['Wrong Answer', 'Accepted'] | ['s206503544', 's662946842'] | [3060.0, 3060.0] | [18.0, 17.0] | [132, 134] |
p03481 | u267638701 | 2,000 | 262,144 | As a token of his gratitude, Takahashi has decided to give his mother an integer sequence. The sequence A needs to satisfy the conditions below: * A consists of integers between X and Y (inclusive). * For each 1\leq i \leq |A|-1, A_{i+1} is a multiple of A_i and strictly greater than A_i. Find the maximum possibl... | ['# -*- coding: utf-8 -*-\n\nX, Y = map(int, raw_input().split())\ncnt = 0\nnum = X\nwhile num <= Y:\n cnt += 1\n num = num*2\n\nprint(cnt)\n', '# -*- coding: utf-8 -*-\n\nimport math\nX, Y = map(int, raw_input().split())\ncnt = 0\nnum = X\nwhile num <= Y:\n cnt += 1\n num = num*2\n\nprint(cnt)\n', '# -*- c... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s467118232', 's997686771', 's616387654'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0] | [135, 147, 131] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.