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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03427 | u635182517 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['s = input()\n\nn = int(s)\nlst = list(map(int, list(s)))\nlst_uniq = list(set(lst))\nlst_ans = [9] * (len(lst) - 1)\n\nif lst_uniq == [9] or len(n) == 1:\n ans = sum(lst)\nelif lst[0] == 1:\n ans = sum(lst_ans)\nelse:\n lst_ans = [lst[0] - 1] + lst_ans\n ans = sum(lst_ans)\n\nprint(ans)\n', 's = input()\n... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s452136447', 's824686620', 's873894440', 's713811112'] | [3060.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 18.0] | [285, 314, 95, 97] |
p03427 | u640922335 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = int(input())\n\nfor i in range(17):\n if 10**i <=N <10**(i+1):\n m=i+1\n break\n\nfor j in range(1,10):\n if (10**(m-1))*j + 10**(m-1)-1 <=N< (j+1)*(10**(m-1))+10**(m-1)-1:\n a = j\n break\n\nprint(a+9*(m-1))', 'N = int(input())\n\nfor i in range(17):\n if 10**i <=N <10**(i+1)... | ['Runtime Error', 'Accepted'] | ['s524520961', 's968721591'] | [9156.0, 9096.0] | [30.0, 28.0] | [234, 234] |
p03427 | u652656291 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["n = input()\nn = list(n)\n\nif n[-2] != '9' and n[-1] != '9':\n n[-2] = '9'\n n[-1] = str(int(n[-1])+1)\n\nN = [int(i) for i in n]\n\nprint(sum(N))\n\n", 'N = list(map(str, input().split()))\nprint(max(sum([int(i) for i in N]), 9*(len(N)-1)+int(N[0])-1))\n', "n = input()\nn = list(n)\n\nif len(n) == 1:\n print(n)\... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s257918365', 's382013651', 's793774147', 's897861177', 's010391508'] | [2940.0, 2940.0, 3060.0, 3064.0, 2940.0] | [17.0, 19.0, 17.0, 17.0, 17.0] | [231, 99, 268, 103, 100] |
p03427 | u659640418 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['x = int(input())\nb = 0\nfor i in range(16):\n a = x % 10\n b = b + a\n x = x // 10\n \nprint(b)', 'def num_sum(n):\n\tb = 0\n\tfor i in range(16):\n\t\ta = n % 10\n\t\tb = b + a\n\t\tn = n // 10\n\treturn b\n\nx = int(input())\nf = 0\nfor i in range(17):\n\tc = 10**(16-i)*(x//(10**(16-i))) -1\n\tif c <= 0:\n\t\t... | ['Wrong Answer', 'Accepted'] | ['s726965804', 's629125549'] | [2940.0, 3060.0] | [17.0, 18.0] | [93, 245] |
p03427 | u665038048 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n = list(map(int, input().split()))\nprint(max((len(n)-1)*9 + n[0]-1, sum(n)))', 'n = input()\nprint((len(n)-1)*9 + int(n[0]))', 'n = input()\nprint(max((len(n)-1)*9 + int(n[0])-1, sum(n)))', 'n = list(map(int, input().split()))\nprint(max(sum(n), n[0]-1+9*(len(n)-1)))', 'ns = list(map(int, list(input())))\nprint(max... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s473035345', 's509659861', 's668679101', 's965085579', 's900103181'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 18.0, 18.0, 17.0, 17.0] | [77, 43, 58, 75, 79] |
p03427 | u672898046 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['def resolve():\n n = input()\n l = len(n)\n if n[:1] == "9" * l-1: \n print(int(n[0]) + 9*(l-1))\n else:\n print((int(n[0])-1) + (9*(l-1)))\nresolve()', 'def resolve():\n n = input()\n l = len(n)\n if n[1:] == "9" * (l-1): \n print(int(n[0]) + 9*(l-1))\n else:\n pri... | ['Runtime Error', 'Accepted'] | ['s143576528', 's779638415'] | [9052.0, 9164.0] | [32.0, 27.0] | [189, 191] |
p03427 | u674588203 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N=int(input())\nn=str(N)\nLength=len(n)\n\nans=int(n[0])+9*(Length-1)\n\nprint(ans)', "N=int(input())\n# N=100\nn=str(N)\nLength=len(n)\n\nl=list(n)\n\nif l[1:]==['9']*(Length-1):\n ans=int(n[0])+9*(Length-1)\nelse:\n ans=int(n[0])-1+9*(Length-1)\n\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s477951927', 's596628086'] | [8980.0, 9000.0] | [28.0, 28.0] | [77, 167] |
p03427 | u688375653 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['tes =input()\na = [int(data) for data in tes] \nprint(sum(a))\n', 'tes =input()\na = [int(data) for data in tes] \nno_change = sum(a)\nchanges = a[0]-1 + (len(a)-1)*9\nif changes > no_change:\n\tprint(changes)\nelse:\n\tprint(no_change)'] | ['Wrong Answer', 'Accepted'] | ['s525141570', 's953930770'] | [3316.0, 2940.0] | [20.0, 17.0] | [60, 160] |
p03427 | u694665829 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n=input()\nans=0\nfor i in n:\n ans+=int(i)\nprint(ans)', 'n=int(input())\nk=len(str(n))\nc=n//10**(k-1)\nprint(c+9*(k-1) if n==(c+1)*10**(k-1)-1 else c+9*(k-1)-1)'] | ['Wrong Answer', 'Accepted'] | ['s413075564', 's541537777'] | [9100.0, 9172.0] | [29.0, 31.0] | [54, 101] |
p03427 | u723583932 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['#AtCoder Grand Contest 021 a\ndef wa(x):\n x=str(x)\n s=0\n for i in x:\n s+=int(i)\n return s\n\nn=int(input())\nketa=len(str(n))\nstart=10**(keta-2)\nstart=max(0,start)\nans=0\nprint(start)\nfor i in range(start,n+1):\n ans=max(ans,wa(i))\nprint(ans)', '#AtCoder Grand Contest 021 a\nn=input()\... | ['Runtime Error', 'Accepted'] | ['s786182983', 's900647740'] | [9128.0, 9128.0] | [2205.0, 26.0] | [258, 128] |
p03427 | u724892495 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = input()\nn = N\n\nif len(N) == 1:\n print(N)\n exit()\n\nif N[1:].count(\'9\') == len(N)-1:\n print(sum([int(i) for i in N]))\n exit()\n\nif N[0]!=\'9\' or any(map(lambda x:x!=\'9\',N)):\n n = chr(ord(N[0])-1) + N[1:]\n# elif any(map(lambda x:x!=\'9\',N)):\n# n = chr(min([ord(x) for x in N])-1)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s127608122', 's250858163', 's621370212'] | [3064.0, 3064.0, 3064.0] | [18.0, 19.0, 17.0] | [469, 446, 471] |
p03427 | u727787724 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n=int(input())\nk=list(str(n))\nans=0\nprint(max(sum(k),9*len(k)-9+k[0]-1))\n', 'n=int(input())\nk=list(str(n))\nans=0\nfor i in range(len(k)):\n k[i]=int(k[i])\nprint(max(sum(k),9*len(k)-9+k[0]-1))\n'] | ['Runtime Error', 'Accepted'] | ['s114039706', 's711126543'] | [2940.0, 2940.0] | [17.0, 17.0] | [73, 116] |
p03427 | u729294108 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n = list(map(int, list(input().strip())))\nprint(n)\n\ntotal = sum(n)\n\nfor i in range(len(n)):\n subtotal = 0\n for j in range(i - 1):\n subtotal += n[j]\n subtotal += n[i] - 1\n for k in range(i + 1, len(n)):\n subtotal += 9\n\n total = max(total, subtotal)\n\nprint(total)\n', 'n = lis... | ['Wrong Answer', 'Accepted'] | ['s097499252', 's951314903'] | [3060.0, 3060.0] | [18.0, 17.0] | [291, 282] |
p03427 | u732844340 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["import sys\n\nif __name__ == '__main__':\n # n = 100\n # n = 9995\n # n = 3141592653589793\n n = input()\n\n ary = list(map(int, list(str(n))))\n\n \n if len(ary) == 1:\n print(sum(ary))\n sys.exit()\n\n \n if len(ary) == 2:\n if sum(ary) <= 9:\n print(9)\n ... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s534568426', 's898143525', 's592441662'] | [3064.0, 3188.0, 3064.0] | [18.0, 18.0, 20.0] | [833, 509, 515] |
p03427 | u735763891 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['_num = int(input())\n_sumlist = []\nfor i in range(num//10, _num + 1):\n _sum = 0\n while i:\n _sum += i % 10\n i //= 10\n _sumlist.append(_sum)\nprint(max(_sumlist))', '_num = int(input())\n_sum = 0\nwhile _num:\n _sum += _num % 10\n _num //= 10\nprint(_sum)', 'def Digit_Sum():\n _num... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s275677407', 's886853545', 's905566955', 's484744591'] | [3060.0, 2940.0, 3064.0, 3060.0] | [17.0, 17.0, 17.0, 17.0] | [181, 90, 397, 404] |
p03427 | u749614185 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["Num = str(input())\nL = len(Num)\nif Num[1:] == '9'*(l-1):\n val = int(Num[0]) + 9*(l-1)\nelse:\n val = int(Num[0])-1 + 9*(l-1)\nprint(val)", "Num = str(input())\nL = len(Num)\nif Num[1:] == '9'*(L-1):\n val = int(Num[0]) + 9*(L-1)\nelse:\n val = int(Num[0])-1 + 9*(L-1)\nprint(val)\n"] | ['Runtime Error', 'Accepted'] | ['s572625336', 's990253847'] | [8820.0, 8992.0] | [26.0, 32.0] | [135, 136] |
p03427 | u782654209 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["N=int(input())\nR=len(str(N))\nprint(R)\ndef dsum(X):\n\treturn(sum([ int(n) for n in list(str(X))]))\ncand=[dsum(N)]\nfor i in range(R):\n\ta = (N//(10**i))*(10**i) + int('9'*i) if i>0 else 0\n\tb = (N//(10**i)-1)*(10**i) + int('9'*i) if i>0 else 0\n\tif a<=N:\n\t\tcand.append(dsum(a))\n\telse:\n\t\tcand.append(dsum... | ['Wrong Answer', 'Accepted'] | ['s432742108', 's442989081'] | [3064.0, 3064.0] | [18.0, 17.0] | [319, 310] |
p03427 | u785573018 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n = input(); a = 0; b = 0; c = 0\nfor i in range(len(n)):\n if n[i] != "9":\n if a == 0: a += 1; b = i; c = int(n[i])\n else: a += 1\nif a == 0: print(9*len(n))\nelif a == 1 and b == 0: print(c+9*(len(n)-1))\nelse: print(9*len(n)-1)', 'n = input(); a = 0; b = 0; c = int(n[0])\nfor i in range(len(n)):... | ['Wrong Answer', 'Accepted'] | ['s785671934', 's734889309'] | [9196.0, 9196.0] | [26.0, 29.0] | [242, 241] |
p03427 | u785578220 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['a = input()\nb = int(a)\nc = list(a)\nt = int(a[0])\n#print(t,a.count("9"))\nif t != 9 and a.count("9") == len(a)-1:\n r = t+(len(a)-1)*9\nelif a.count("9") != len(a):\n t -= 1\n r = t+(len(a)-1)*9\nif b<9:\n r = b\nelse: b == 9\n r = 9\n \nprint(r)', 'a = input()\nb = int(a)\nc = list(a)\nt = int(... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s577725209', 's896913723', 's474609048'] | [2940.0, 3060.0, 3064.0] | [17.0, 18.0, 18.0] | [253, 229, 272] |
p03427 | u787562674 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["N = str(input())\n\nif int(N[1:]) % (9 * int('1' * len(N))) == 0:\n print(int(N[0] + 9 * (len(N)-1)))\nelse:\n print(int(N[0]) - 1 + 9 + 9 * len(N[2:]))\n\n", "N = str(input())\n\nfor item in N[1:]:\n if item != '9':\n print(int(N[0]) - 1 + 9 * (len(N) - 1))\n break\nelse:\n print(int(N[0]) ... | ['Runtime Error', 'Accepted'] | ['s954732517', 's782072617'] | [2940.0, 3060.0] | [19.0, 18.0] | [155, 162] |
p03427 | u798818115 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N=input()\n\nif len(N)==1:\n print(N)\n exit()\n\ndef calc(str):\n l=list(map(int,str))\n all=sum(l)\n \n return all\n\ncand1=str(int(N)-int(N[-1])-1)\ncand2=str(int(N[0])*10**(len(N)-1)-1)\n\nprint(cand1,cand2,N)\nprint(max(calc(cand1),calc(cand2),calc(N)))', 'N=input()\n\nif len(N)==1:\n print(... | ['Wrong Answer', 'Accepted'] | ['s407029572', 's344334677'] | [3064.0, 3060.0] | [18.0, 17.0] | [260, 239] |
p03427 | u807772568 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = input()\nt = N[0]\nif N == t + "9"(len(N)-1):\n print(int(t)+9*(len(N)-1))\nelse:\n print(int(t)-1+9*(len(N)-1))', 'N = input()\nt = N[0]\nif N == t + "9"*(len(N)-1):\n print(int(t)+9*(len(N)-1))\nelse:\n print(int(t)-1+9*(len(N)-1))'] | ['Runtime Error', 'Accepted'] | ['s888793408', 's536314473'] | [3188.0, 2940.0] | [19.0, 17.0] | [113, 114] |
p03427 | u835482198 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["n = input()\nk = len(n)\nc = int(n[0])\nif n == c + '9' * (k - 1):\n print(int(n[0]) + 9 * (k - 1))\nelse:\n print(int(n[0]) + 9 * (k - 1) - 1)\n", "n = input()\nk = len(n)\nc = n[0]\nif n == c + '9' * (k - 1):\n print(int(n[0]) + 9 * (k - 1))\nelse:\n print(int(n[0]) + 9 * (k - 1) - 1)\n"] | ['Runtime Error', 'Accepted'] | ['s471500015', 's687690917'] | [2940.0, 2940.0] | [17.0, 17.0] | [144, 139] |
p03427 | u842230338 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = input()\nl = len(str(N))-1\nprint(l*9 + (N//(10**l)-1))', 'N = int(input())\nl = len(str(N))-1\nprint(l*9 + ((N+1)//(10**l)-1))'] | ['Runtime Error', 'Accepted'] | ['s528667914', 's154588192'] | [2940.0, 2940.0] | [18.0, 17.0] | [57, 66] |
p03427 | u844005364 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['s = input()\n\nif s < 10:\n print(s)\nelse:\n print(int(s[0]) - 1 + 9 * (len(s) - 1))\n', 's = input()\n\nif int(s) < 10:\n print(int(s))\nelif all([x == "9" for x in s[1:]]):\n print(int(s[0]) + 9 * (len(s) - 1))\nelse:\n print(int(s[0]) - 1 + 9 * (len(s) - 1))\n'] | ['Runtime Error', 'Accepted'] | ['s576472986', 's897556832'] | [2940.0, 3060.0] | [17.0, 25.0] | [87, 174] |
p03427 | u846634344 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["import sys\nsys.setrecursionlimit(10**6)\nif sys.platform in (['ios','darwin','win32']):\n\tsys.stdin=open('Untitled.txt')\ninput = sys.stdin.readline\ndef INT(): return int(input())\ndef MAP(): return [int(s) for s in input().split()]\n\ndef main():\n\tN = INT()\n\tS = [int(s) for s in str(N)]\n\t# print(S)\n\n\tA =... | ['Wrong Answer', 'Accepted'] | ['s367131997', 's841557530'] | [3064.0, 3064.0] | [17.0, 18.0] | [633, 635] |
p03427 | u858670323 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n = str(input().rstrip()+1)\nans = len(n)*9\nans += int(n[0])-1\nprint(ans)', 'n = str(int(input().rstrip())+1)\nans = (len(n)-1)*9\nans += (int(n[0])-1)\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s926094112', 's372153715'] | [2940.0, 2940.0] | [17.0, 17.0] | [72, 84] |
p03427 | u893063840 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['def main():\n n = input()\n\n l = len(n)\n\n nines = "9" * (l - 1)\n num = int(nines)\n\n for i in range(1, 10):\n tmp = str(i) + nines\n if int(tmp) <= int(n):\n num = tmp\n\n ans = sum(map(int, num))\n print(ans)\n\n\nif __name__ == "__main__":\n main()\n', 'def main... | ['Runtime Error', 'Accepted'] | ['s358364558', 's910442050'] | [3060.0, 3060.0] | [17.0, 17.0] | [287, 322] |
p03427 | u896741788 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['s=input()\nprint(max(int(s),int(s[0])-1+9*len(s)-9))', 's=input()\nprint(max(sum(map(int,list(s))),int(s[0])-1+9*len(s)-9))'] | ['Wrong Answer', 'Accepted'] | ['s890457370', 's956480529'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 66] |
p03427 | u924406834 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n = int(input())\nstrs = [int(x) for x in str(n)]\nkijyun = [9]*(len(strs)-1)\nif strs[1:] == kijyun:\n print((len(strs)-1)*9+strs[1])\nelse:\n print((len(strs)-1)*9+strs[1]-1)', 'n = int(input())\nstrs = [int(x) for x in str(n)]\nkijyun = [9]*(len(strs)-1)\nif strs[1:] == kijyun:\n print((n-1)*9+strs[1])\ne... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s386113691', 's434416259', 's962638390'] | [3060.0, 3188.0, 3060.0] | [17.0, 17.0, 17.0] | [176, 160, 176] |
p03427 | u934119021 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["n = int(input())\nk = len(str(n))\na = 9 * (k - 1)\nb = 0\nfor i in range(k):\n b += int(str(n)[i])\nc = 0\nif k > 2:\n m = str(int(n))[:k - 2] + str(int(int(str(n)[-2]) - 1)) + '9'\n for i in range(k):\n c += int(m[i])\nans = max(a, b, c)\nprint(ans)", "n = input()\nk = len(n)\na = 9 * (k - 1) + int(n[0]) - 1\... | ['Runtime Error', 'Accepted'] | ['s757244169', 's486617712'] | [9140.0, 9176.0] | [29.0, 29.0] | [245, 327] |
p03427 | u937642029 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n=int(input())\nif n < 10 :\n print(n)\nelse:\n n=list(str(n))\n key=0\n for i in range(n):\n if n[1+i]!="9":\n key=1\n if key ==0:\n print((len(n)-1)*9+int(n[0]))\n else:\n print((len(n)-1)*9+int(n[0])-1)\n\n\n', 'n=int(input())\nif n < 10 :\n print(n)\nelse:\n ... | ['Runtime Error', 'Accepted'] | ['s101193413', 's652619998'] | [3060.0, 3064.0] | [17.0, 17.0] | [246, 252] |
p03427 | u941753895 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["n=list(input())\nif ''.join(n)=='100':\n exit()\nsb=n[1:]\nsetsb=list(set(sb))\nif len(setsb)==1 and setsb[0]=='9':\n if n[0]=='9':\n print(9*len(n))\n else:\n print(int(n[0])-1+9*len(sb))\nelse:\n print(int(n[0])-1+9*len(sb))", "n=list(input())\nif ''.join(n)=='100':\n exit()\nif len(n)==1:\n print(n[0])... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s194676440', 's521337701', 's737138254', 's464959987'] | [3060.0, 3064.0, 3060.0, 5420.0] | [17.0, 17.0, 17.0, 42.0] | [225, 260, 223, 469] |
p03427 | u941884460 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = input()\nsum = 0\nfor i in range(len(N)):\n sum += int(N[i])\nprint(sum)', "n = input().rstrip()\nif len(n) == 1:\n print(n)\nelse:\n flg = True\n for i in range(1,len(n)):\n if n[i] != '9':\n flg = False\n if flg:\n print(9*(len(n)-1)+int(n[0]))\n else:\n print(9*(len(n)-1)+int(n[0])-1)"] | ['Wrong Answer', 'Accepted'] | ['s398596976', 's247926059'] | [2940.0, 3060.0] | [17.0, 17.0] | [73, 220] |
p03427 | u942051624 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N=list(str(input()))\nans=0\nfor i in range(len(N)):\n ans+=int(N[i])\nprint(ans)', "N=list(str(input()))\nans=0\nfor i in range(1,N):\n if N[i]!='9':\n ans+=int(N[0])-1\n ans+=(len(N)-1)*9\n print(ans)\n exit()\nfor i in range(N):\n ans+=int(N[i])\nprint(ans)\n ", "N=list(... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s109597870', 's167533114', 's182580266'] | [9084.0, 9092.0, 9204.0] | [27.0, 24.0, 28.0] | [80, 208, 264] |
p03427 | u947823593 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['#encoding=utf-8\ndef solve(n):\n k = len(n)\n c = str(n)[k - 1]\n if str(n)[1..k] = \'9\' * k:\n return c + 9 * (k - 1)\n return c + 9 * (k - 1) - 1\n\nif __name__ == "__main__":\n n = int(input())\n print(solve(n))\n', '#encoding=utf-8\ndef solve(n):\n k = len(n)\n c = str(n)[k - 1]\n... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s281808677', 's843645312', 's870391112'] | [2940.0, 2940.0, 3064.0] | [17.0, 17.0, 18.0] | [230, 230, 482] |
p03427 | u969190727 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['n=int(input())\nprint(int(str(n)[0])-1+9*(len(n)-1))', 'n=int(input())\nans=int(str(n)[0])+9*(len(str(n))-1)\nif str(n)[1:]=="9"*(len(str(n))-1):\n print(ans)\nelse:\n print(ans-1)'] | ['Runtime Error', 'Accepted'] | ['s224109697', 's466532238'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 121] |
p03427 | u981931040 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ["N = input()\ni_N = int(N)\nif len(N) == 1:\n print(N)\n exit()\nans = (len(N) - 1) * 9\nif N[0] != '9':\n ans += int(N[0]) - 1\nelse:\n for i in range(1, len(N)):\n if N[i] != '9':\n ans += int(N[i - 1]) - 1\n break\n else:\n ans += 9\nif ans > i_N:\n print(ans)\n... | ['Wrong Answer', 'Accepted'] | ['s195839040', 's497255966'] | [3064.0, 3064.0] | [17.0, 17.0] | [322, 362] |
p03427 | u987164499 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['from sys import stdin\n\ns = stdin.readline().rstrip()\n\nif len(s) == 1:\n print(int(s))\n exit()\n\nif s == "9"*len(s):\n print(9*len(s))\nelse:\n print(max(int(s[0])-1+9*(len(s)-1),int(s[0])+9*(len(s)-1)))', 'from sys import stdin\n\ns = stdin.readline().rstrip()\n\nif len(s) == 1:\n print(int(s))\n... | ['Wrong Answer', 'Accepted'] | ['s187706923', 's259169288'] | [3060.0, 3060.0] | [17.0, 17.0] | [209, 265] |
p03427 | u988832865 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['import scipy', "def poyo():\n ans = -1\n A = []\n for i in range(1, 100):\n t = sum([ord(x) - ord('0') for x in str(i)])\n ans = max(ans, t)\n A.append(ans)\n # print(ans)\n\n import numpy as np\n maxi, cnt = np.unique(A, return_counts=True)\n print(maxi)\n print(np.cu... | ['Wrong Answer', 'Accepted'] | ['s739402027', 's754120180'] | [21532.0, 3064.0] | [1596.0, 18.0] | [12, 839] |
p03427 | u989306199 | 2,000 | 262,144 | Find the maximum possible sum of the digits (in base 10) of a positive integer not greater than N. | ['N = int(input())\nn = len(str(N))\nNS = str(N)\nans0 = 0\nfor i in range(NS):\n ans0 += int(i)\nans1 = int(NS[0])-1 + 9 * (n-1)\nans2 = 9 * (n-1)\n\nprint(max(ans0, ans1, ans2))\n', 'N = int(input())\nn = len(str(N))\nNS = str(N)\nans0 = 0\nfor i in NS:\n ans0 += int(i)\nans1 = int(NS[0])-1 + 9 * (n-1)\nans2 = ... | ['Runtime Error', 'Accepted'] | ['s848598837', 's021915942'] | [9028.0, 9120.0] | [23.0, 30.0] | [172, 165] |
p03428 | u163320134 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ['import math\npi=3.141592657589793238462643383279\n\n#quoted from https://qiita.com/kkttm530/items/d6ca372491b75baeac3c\ndef signed_area(p1, p2, p3):\n \n\n area = (((p2[0] - p1[0]) * (p3[1] - p1[1])) - ((p3[0] - p1[0]) * (p2[1] - p1[1]))) / 2\n return area\n\n\ndef convex_hull(p_list):\n \n\n p_sort = ... | ['Runtime Error', 'Accepted'] | ['s288410401', 's855990665'] | [3444.0, 3188.0] | [28.0, 20.0] | [2450, 1078] |
p03428 | u467736898 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ['import math\nN = int(input())\nH = [list(map(int, input().split())) for i in range(N)]\nP = [[0, 2*math.pi] for i in range(N)]\nfor i in range(N):\n for j in range(N):\n if i==j:\n continue\n rad = math.atan2(H[i][1]-H[j][1], H[i][0]-H[j][0])\n mi = (rad - math.pi/2) % (2*math.pi)\n... | ['Wrong Answer', 'Accepted'] | ['s795884908', 's583156682'] | [3192.0, 3316.0] | [43.0, 43.0] | [1511, 1502] |
p03428 | u637175065 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ["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**10\nmod = 10**9+7\ndd = [(-1,0),(0,1),(1,0),(0,-1)]\nddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]\n\ndef LI(): return [int(x) for x in... | ['Wrong Answer', 'Accepted'] | ['s813197879', 's818494560'] | [5452.0, 5972.0] | [2104.0, 50.0] | [1194, 1969] |
p03428 | u670180528 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ['from scipy.spatial import ConvexHull as CH\nimport numpy as np\nnorm=np.linalg.norm\nn,*t=map(int,open(0).read().split())\na=np.reshape(t,(n,2))\nh=CH(a).vertices\nl=len(h)\nfor i in range(n):\n\tif i in h:\n\t\tj=np.where(h==i)[0]\n\t\tf,s,t=a[h[j-1]],a[i],a[h[(j+1)%l]]\n\t\tprint(np.arccos(np.inner(t-s,s-f)/(norm(t... | ['Runtime Error', 'Accepted'] | ['s278175480', 's031653490'] | [16916.0, 16816.0] | [191.0, 214.0] | [350, 518] |
p03428 | u766684188 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ['#021-B\nimport sys\ninput=sys.stdin.readline\nfrom math import atan2,pi\nfrom operator import itemgetter\n\ndef InnerProduct(V0,V1):\n x0,y0=V0\n x1,y1=V1\n return x0*x1+y0*y1\ndef CrossProduct(V0,V1):\n x0,y0=V0\n x1,y1=V1\n return x0*y1-x1*y0\ndef angle(P0,P1):\n x0,y0=P0\n x1,y1=P1\n ret... | ['Runtime Error', 'Accepted'] | ['s201404080', 's249921029'] | [3316.0, 3188.0] | [23.0, 18.0] | [1130, 1049] |
p03428 | u875291233 | 2,000 | 262,144 | There are N holes in a two-dimensional plane. The coordinates of the i-th hole are (x_i,y_i). Let R=10^{10^{10^{10}}}. Ringo performs the following operation: * Randomly choose a point from the interior of a circle of radius R centered at the origin, and put Snuke there. Snuke will move to the hole with the smalles... | ['import math\n\nN=int(input())\n\nPI = math.pi\n\nX=[]\nY=[]\nfor i in range(N):\n x,y=[int(i) for i in input().split()]\n X.append(x)\n Y.append(y)\n\nfor i in range(N):\n kakudo = [math.atan2(Y[i]-Y[j],X[i]-X[j]) for j in range(N) if j != i]\n kakudo.sort()\n print(kakudo)\n kmax = 0\n if N =... | ['Wrong Answer', 'Accepted'] | ['s161050536', 's061888923'] | [3316.0, 3188.0] | [44.0, 34.0] | [535, 536] |
p03431 | u541055501 | 2,000 | 262,144 | In Republic of AtCoder, Snuke Chameleons (Family: Chamaeleonidae, Genus: Bartaberia) are very popular pets. Ringo keeps N Snuke Chameleons in a cage. A Snuke Chameleon that has not eaten anything is blue. It changes its color according to the following rules: * A Snuke Chameleon that is blue will change its color t... | ['n,k,p=map(int,input().split()),998244353\nr=range\nf=[1]\nfor i in r(k):f+=[-~i*f[i]]\nprint(sum(f[-1]*pow(f[i]*f[-1-i],-1,p)for i in r(n-1,k))%p)', 'n,k=map(int,input().split())\np=998244353\nf=[1]\nfor i in range(k):f+=[-~i*f[i]%p]\nprint(sum(f[-2]*pow(f[i]*f[-2-i],-1,p)for i in range(n-1,k))%p)'] | ['Runtime Error', 'Accepted'] | ['s608766684', 's227796792'] | [9016.0, 28860.0] | [27.0, 1050.0] | [142, 144] |
p03451 | u021151166 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['#1st arg is the how far from the most upper side\n#2nd arg is the how far from the most left side\n#right means +1 in terms of x-axis\n#upper means -1 in terms of y-axis\n\ndef Right(position):\n\tposition[1] += 1\n\ndef Down(position):\n\tposition[0] += 1 \n\ndef Collect(position,candy):\n\tx = position[0]\n\ty = po... | ['Wrong Answer', 'Accepted'] | ['s788336409', 's531352026'] | [3064.0, 3064.0] | [25.0, 23.0] | [832, 838] |
p03451 | u075012704 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['N, M = map(int, input().split())\nLRD = [list(map(int, input().split())) for i in range(M)]\n \n \nclass WeightedUnionFind:\n def __init__(self, n):\n self.par = [i for i in range(n+1)]\n self.rank = [0] * (n + 1)\n self.weight = [0] * (n+1)\n \n \n def find(self, x):\n if self.pa... | ['Runtime Error', 'Accepted'] | ['s349937037', 's283306019'] | [3188.0, 2940.0] | [18.0, 17.0] | [1429, 163] |
p03451 | u077291787 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['\ndef main():\n N = int(input())\n A = tuple(tuple(map(int, input().rstrip().split())) for _ in range(2))\n dp = [0] * N # dp[i] := score of upside [:i+1] and downside [i:]\n for i in range(N):\n dp[0] = sum(A[0][: i + 1]) + sum(A[1][i:])\n print(max(dp))\n\n\nif __name__ == "__main__":\n ma... | ['Wrong Answer', 'Accepted'] | ['s822824201', 's591927333'] | [3060.0, 3060.0] | [18.0, 18.0] | [340, 262] |
p03451 | u106778233 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['N=int(input())\nA=[list(map(int,input().split())) for _ in range(2)]\n\ntemp=0\nfor i in range(n):\n temp=max(temp, sum(A[0][:i+1])+sum(A[1][i:]))\n\nprint(ans)', 'N=int(input())\nA=[list(map(int,input().split())) for _ in range(2)]\n\ntemp=0\nfor i in range(N):\n temp=max(temp, sum(A[0][:i+1])+sum(A[1][i:]))\n... | ['Runtime Error', 'Accepted'] | ['s591388921', 's781750493'] | [3060.0, 3060.0] | [18.0, 19.0] | [156, 157] |
p03451 | u131406572 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['n=int(input())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\nCandies=[]\nfor i in range(n):\n Candies.appned(sum(a[:i+1])+sum(b[i+1:])\nprint(max(Candies))', 'n=int(input())\na=list(map(int,input().split()))\nb=list(map(int,input().split()))\nCandies=[]\nfor i in range(n):\n Candies.appen... | ['Runtime Error', 'Accepted'] | ['s027991376', 's633769782'] | [2940.0, 3060.0] | [17.0, 20.0] | [175, 174] |
p03451 | u505327012 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['def find_max(n, grid):\n def helper(idx, cur_max, down):\n if n > (idx + 1):\n if down:\n return helper(idx + 1, cur_max + grid[1][idx], down)\n else:\n return max(helper(idx + 1, cur_max + grid[1][idx], True), helper(idx + 1, cur_max + grid[0][idx + 1], F... | ['Runtime Error', 'Accepted'] | ['s582967534', 's609032729'] | [3188.0, 3064.0] | [19.0, 19.0] | [639, 631] |
p03451 | u626337957 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['N = int(input())\ncandies = [list(map(int, input().split())) for _ in range(2)]\ndp = [[0,0] for _ in range(N)]\ndp[0][0] = candies[0][0]\ndp[1][0] = dp[0][0] + candies[1][0]\nfor i in range(1, N):\n dp[0][i] += dp[0][i-1] + candies[0][i]\n dp[1][i] = max(dp[0][i], dp[1][i-1]) + candies[1][i]\nprint(dp[1][N-1])', '... | ['Runtime Error', 'Accepted'] | ['s307786777', 's152052630'] | [3064.0, 3064.0] | [17.0, 17.0] | [306, 310] |
p03451 | u751717561 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['N = int(input())\nA = [list(map(int, input().split())) for _ in range(2)]\n\nprint(A)\nv1 = A[0][0]\nv2 = A[1][0] + A[0][0]\n\nif N==1:\n print(v2)\n exit()\n\nfor j in range(1, N):\n v1 += A[0][j]\n v2 = A[1][j] + max(v2, v1)\n\nprint(v2)', 'N = int(input())\nA = [list(map(int, input().split())) for _ in... | ['Wrong Answer', 'Accepted'] | ['s078313949', 's950142923'] | [3064.0, 3064.0] | [17.0, 18.0] | [236, 222] |
p03451 | u777923818 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['# -*- coding: utf-8 -*-\nimport sys\nsys.setrecursionlimit(10000)\nfrom collections import defaultdict, deque\ndef inpl(): return tuple(map(int, input().split()))\n \nN, M = inpl()\nQ = [inpl() for _ in range(M)]\n \ntree = [[-1, 1] for _ in range(N+1)] # [next, rank]\n \ndef find(i):\n if tree[i][0] == -1:\n ... | ['Runtime Error', 'Accepted'] | ['s507435234', 's529583916'] | [3444.0, 3060.0] | [26.0, 50.0] | [1433, 232] |
p03451 | u933083947 | 2,000 | 262,144 | We have a 2 \times N grid. We will denote the square at the i-th row and j-th column (1 \leq i \leq 2, 1 \leq j \leq N) as (i, j). You are initially in the top-left square, (1, 1). You will travel to the bottom-right square, (2, N), by repeatedly moving right or down. The square (i, j) contains A_{i, j} candies. You ... | ['N = int(input())\nL1 = map(int, input().split())\nL2 = map(int, input().split())\nP1 = L1[:]\nP2 = L2[:]\nfor i in range(1, N):\n P1[i] += P1[i-1]\nfor j in range(N-1, -1, -1):\n P2[j] += P2[j+1]\nL3 = [0]*N\nfor k in range(N):\n L3[k] = P1[k]+P2[k]\nprint(max(L3))\n \n \n \n', 'N = int(input())\nL1 = [x for x ... | ['Runtime Error', 'Accepted'] | ['s837592665', 's932932276'] | [3064.0, 3064.0] | [17.0, 17.0] | [266, 282] |
p03452 | u029169777 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["from collections import deque\nimport sys\nsys.setrecursionlimit(10**7)\n\nN,M=map(int,input().split())\nGraph=[[] for i in range(N)]\nfor i in range(M):\n L,R,D=map(int,input().split())\n Graph[L-1].append(R-1,D)\n Graph[R-1].append(L-1,-D)\nvisit=[False]*N\ndist=[0]*N\n\nfor i in range(N):\n if not visit[i]:\n ... | ['Runtime Error', 'Accepted'] | ['s635143255', 's172483127'] | [3064.0, 67100.0] | [17.0, 1265.0] | [601, 611] |
p03452 | u047668580 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['N,M = list(map(int,input().split()))\n\nedges = [[] for _ in range(N)]\n\nfor i in range(M):\n L,R,D = list(map(int,input().split()))\n edges[L - 1].append((R -1,D))\n edges[R - 1].append((L-1, -D))\n\n\nvisited = [None] * N\nplace = [0] * N\ninf = 10 ** 10\n\n\ndef walk(i):\n if visited[i]:\n retu... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s905937747', 's974792218', 's979398632', 's735757944'] | [67988.0, 68100.0, 68004.0, 131816.0] | [1146.0, 1249.0, 1246.0, 1844.0] | [807, 764, 807, 1153] |
p03452 | u075012704 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['N, M = map(int, input().split())\nLRD = [list(map(int, input().split())) for i in range(M)]\n\n\nclass WeightedUnionFind:\n def __init__(self, n):\n self.par = [i for i in range(n+1)]\n self.rank = [0] * (n + 1)\n self.weight = [0] * (n+1)\n\n \n def find(self, x):\n if self.par[x... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s051050641', 's378755578', 's468647015', 's855404944', 's545761479'] | [58460.0, 55196.0, 58452.0, 55924.0, 10236.0] | [892.0, 1095.0, 910.0, 896.0, 1197.0] | [1484, 353, 1450, 449, 1615] |
p03452 | u137226361 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["n, m = map(int, input().split())\npar = [i for i in range(n)]\ndiff = [0]*n\n\ndef find(x):\n if par[x] == x:\n return x, 0\n else:\n a, b = find(par[x])\n par[x] = a\n diff[x] += b\n return a, diff[x]\n\n\ndef unite(x,y,z):\n s, ws = find(x)\n t, wt = find(y)\n #prin... | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s138937905', 's656663912', 's940053601', 's530980768'] | [21252.0, 14656.0, 21292.0, 14980.0] | [213.0, 170.0, 187.0, 639.0] | [666, 565, 650, 695] |
p03452 | u197457087 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["class WeightedUnionFind():\n def __init__(self, n):\n self.par = [i for i in range(n)]\n self.rank = [0 for i in range(n)]\n \n self.diff_weight = [0 for i in range(n)]\n\n def find(self, x):\n if self.par[x] == x:\n return x\n \n root = self.find(self... | ['Runtime Error', 'Accepted'] | ['s991052145', 's546128275'] | [9508.0, 10024.0] | [381.0, 1594.0] | [1902, 1902] |
p03452 | u333945892 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["import sys\n\nsys.setrecursionlimit(10**8)\n\ndef find(x):\t\n\tglobal table\n\tglobal diff_weight\n\t\n\tif table[x] == x:\n\t\treturn x\n\telse:\n\t\tdiff_weight[x] += diff_weight[table[x]] \n\t\ttable[x] = find(table[x])\t\n\t\treturn table[x]\n\ndef union(x,y,w):\t\n\tw = w - weight(y) + weight(x) \n\tx = find(x)... | ['Runtime Error', 'Accepted'] | ['s570147695', 's624596676'] | [141636.0, 9920.0] | [1978.0, 1556.0] | [1346, 1250] |
p03452 | u336193675 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["import sys\nfrom collections import deque\n\nn,m = map(int, input().split())\nadj_list = [[] for i in range(n)]\nfor i in range(m):\n l, r, d = map(int, input().split())\n adj_list[l-1].append((r-1, d))\n adj_list[r-1].append((l-1, -d))\ndef search(start, dist_all):\n q = deque([[start]])\n q_d = deque... | ['Wrong Answer', 'Accepted'] | ['s907342247', 's563229088'] | [82244.0, 66256.0] | [1316.0, 1187.0] | [946, 784] |
p03452 | u572144347 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['import sys\nsys.setrecursionlimit(10**9)\nN,M = map(int, input().split())\nLRD = [ [int(j) for j in input().split()] for _ in range(M)]\n\ndata = [-1] * (N+1)\nrank = [0] * (N+1)\ndiff_weight = [0] * (N+1)\n\ndef root(x):\n if data[x] == x:\n return x\n else:\n r = root(x)\n diff_weight[x]... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s768146447', 's856376119', 's000777807'] | [705216.0, 5492.0, 46892.0] | [1919.0, 23.0, 787.0] | [982, 1011, 1052] |
p03452 | u608088992 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['from collections import deque\nN, M = map(int, input().split())\nInf = 10000000000\nEdge = [[] for i in range(N)]\nfor i in range(M):\n l, r, d = map(int, input().split())\n Edge[l-1].append((r-1, d))\n Edge[r-1].append((l-1, -d))\n \nNode = [Inf for i in range(N)]\nPossible = True\nfor i in range(N):\n i... | ['Runtime Error', 'Accepted'] | ['s150650985', 's567211504'] | [63068.0, 66272.0] | [980.0, 1148.0] | [754, 756] |
p03452 | u620480037 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['import heapq\n\nN,M=map(int,input().split())\n\nC=[0 for i in range(N+1)]\nL=[[]for i in range(N+1)]\nA=[0 for i in range(N+1)]\nB=[]\n\nfor i in range(M):\n l,r,d=map(int,input().split())\n B.append([l,r,d])\n C[r]=1\n L[l].append([l,r,d])\nfor i in range(N+1):\n if C[i]==0:\n A[i]=0\nfor i in ... | ['Wrong Answer', 'Accepted'] | ['s882109138', 's261645576'] | [135244.0, 162812.0] | [2112.0, 1823.0] | [977, 575] |
p03452 | u637175065 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["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', 'Runtime Error', 'Accepted'] | ['s114757109', 's237905873', 's375959961'] | [110600.0, 44032.0, 68468.0] | [1102.0, 468.0, 871.0] | [1227, 1198, 1419] |
p03452 | u692336506 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['setrecursionlimit(1000000)\nN,M = list(map(int,input().split()))\n\nedges = [[] for _ in range(N)]\n\nfor i in range(M):\n L,R,D = list(map(int,input().split()))\n edges[L - 1].append((R -1,D))\n edges[R - 1].append((L-1, -D))\n\n\nvisited = [None] * N\nplace = [0] * N\ninf = 10 ** 10\n\n\ndef walk(i):\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s039294444', 's897241885', 's517679379'] | [3064.0, 3064.0, 134596.0] | [17.0, 17.0, 1794.0] | [852, 858, 992] |
p03452 | u724687935 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['class WeightedUnionFind():\n def __init__(self, n):\n self.parents = [-1] * n\n self.par_weight = [0] * n\n\n def find(self, x):\n if self.parents[x] < 0:\n return x\n else:\n root = self.find(self.parents[x])\n self.par_weight[x] += self.par_weight[s... | ['Runtime Error', 'Accepted'] | ['s188869427', 's091566613'] | [7024.0, 128996.0] | [348.0, 1368.0] | [1547, 583] |
p03452 | u761320129 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["N,M = map(int,input().split())\nes = [[] for i in range(N)]\nfor i in range(M):\n l,r,d = map(int,input().split())\n l,r = l-1,r-1\n es[l].append((r,d))\n es[r].append((l,-d))\n\nfor i in range(N):\n if dist[i] is not None: continue\n dist = [None] * N\n dist[i] = 0\n stack = [i]\n while st... | ['Runtime Error', 'Accepted'] | ['s336634395', 's861649153'] | [61840.0, 65948.0] | [1012.0, 1222.0] | [640, 596] |
p03452 | u798129018 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['N,M = map(int,input().split())\nAdj_list = defaultdict(set)\n\nfor i in range(M):\n a, b, c = map(int, input().split())\n Adj_list[a-1].add((b-1, c))\n Adj_list[b-1].add((a-1, -c))\nvisited =[None]*(N)\nok = True\nstack = []\nfor x in range(N):\n if visited[x] is not None:continue\n visited[x] = 0\n st... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s213673593', 's431183907', 's476145199', 's129184494'] | [3064.0, 11032.0, 103248.0, 111744.0] | [17.0, 87.0, 1438.0, 1915.0] | [659, 666, 892, 909] |
p03452 | u808427016 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['class UnionFind:\n def __init__(self, size):\n self.table = [[-1, 0] for _ in range(size + 1)]\n\n def find(self, x):\n n, d = self.table[x] \n if n < 0:\n return [x, d]\n else:\n n1, d1 = self.find(n)\n r = [n1, d1 + d]\n self.table[x] = r... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s019421294', 's994470332', 's824643096'] | [52924.0, 52912.0, 59772.0] | [878.0, 832.0, 1147.0] | [1210, 1292, 1517] |
p03452 | u835482198 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['from collections import defaultdict\n\n\nn, m = list(map(int, input().split()))\n\ng = [[] for _ in range(n + 1)]\nfor _ in range(m):\n l, r, d = map(int, input().split())\n g[l].append((r, d))\n g[r].append((l, -d))\n\n\nds = [None for _ in range(n + 1)]\n\n\ndef check(v):\n for next_v, d in g[v]:\n ... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s185194788', 's556976442', 's651722524', 's665794112', 's883211770', 's666252841'] | [64008.0, 68576.0, 129032.0, 68580.0, 69288.0, 129032.0] | [1029.0, 1120.0, 1340.0, 1110.0, 1164.0, 1531.0] | [699, 693, 715, 693, 703, 724] |
p03452 | u844646164 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ['class UnionFind():\n def __init__(self, n):\n self.n = n\n self.root = [-1]*(n+1)\n self.rnk = [0]*(n+1)\n self.weight = [0]*(n+1)\n \n def Find_Root(self, x):\n if(self.root[x] < 0):\n return x\n else:\n self.root[x] = self.Find_Root(self.root[x])... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s191413955', 's573770969', 's595342879', 's782156044', 's811760075', 's136939657'] | [55148.0, 55144.0, 55132.0, 61728.0, 55144.0, 58000.0] | [686.0, 658.0, 690.0, 1342.0, 677.0, 1522.0] | [1623, 1438, 1511, 1467, 1460, 1291] |
p03452 | u875291233 | 2,000 | 262,144 | There are N people standing on the x-axis. Let the coordinate of Person i be x_i. For every i, x_i is an integer between 0 and 10^9 (inclusive). It is possible that more than one person is standing at the same coordinate. You will given M pieces of information regarding the positions of these people. The i-th piece of... | ["class UnionFind:\n def __init__(self, size):\n self.parent = [-1 for i in range(size)]\n self.diff_potential = [0 for i in range(size)]\n\n def root(self, x): \n if self.parent[x] < 0:\n return x\n else:\n rx = self.root(self.parent[x]) \n self.diff_p... | ['Runtime Error', 'Accepted'] | ['s110640844', 's896011511'] | [9008.0, 10796.0] | [690.0, 1495.0] | [2477, 2397] |
p03459 | u090406054 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ["n=int(input())\ntxy=[input().split() for i in range(n)]\nif n!=1:\n for i in range(n-1):\n subX=int(txy[i+1][1])-int(txy[i][1])\n subY=int(txy[i+1][2])-int(txy[i][2])\n subT=int(txy[i+1][0])-int(txy[i][0])\n t=[]\n p=subT-subX-subY\n t.append(p)\n s=[]\n for i in range(len(t)):\n if t[i]<0... | ['Wrong Answer', 'Accepted'] | ['s624923359', 's452251087'] | [32148.0, 32148.0] | [428.0, 411.0] | [558, 504] |
p03459 | u536113865 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ["import sys\nn = int(input())\npt, px, py = 0, 0, 0\nfor _ in range(n):\n t, x, y = map(int,input().split())\n dt = abs(t-pt)\n dx = abs(x-px)\n dy = abs(y-py)\n if dt<dx+dy or dt%2!=(dx+dy)%2:\n print('No')\n sys.exit() \n pt,px,py = t,x,y\nprint('Yes'", "import sys\nn = int(input()... | ['Runtime Error', 'Accepted'] | ['s156241971', 's700935416'] | [3064.0, 3064.0] | [17.0, 389.0] | [275, 276] |
p03459 | u536659057 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ["from collections import deque\n\nnum = int(input())\n\nto_num = lambda x : [int(i) for i in input().split(' ')]\n\nmasume = {}\nfor i in range(num):\n line = to_num(1)\n for l in range(len(line)):\n masume[line[0]] = (line[1], line[2])\n\nmasume_deque = deque(list(masume.keys()))\npre_pos = (0, 0)\npre_t... | ['Wrong Answer', 'Accepted'] | ['s544454117', 's987235065'] | [23760.0, 23760.0] | [484.0, 788.0] | [717, 735] |
p03459 | u619819312 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ['n=int(input())\ns=[list(map(int,input().split()))for i in range(n)]\ns.insert(0,[0,0,0])\np=0\nfor i in range(n):\n c=s[i+1][0]-s[i][0]\n d=abs(s[i+1][1]-s[i][1])+abs(s[i+1][2]-s[i][2])\n if c<=d or (c-d)%2==1:\n p=1\n break\nprint("No" if p==1 else "Yes")', 'n=int(input())\ns=[list(map(int,inp... | ['Wrong Answer', 'Accepted'] | ['s565970114', 's216083174'] | [27300.0, 27300.0] | [348.0, 415.0] | [269, 268] |
p03459 | u677421794 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ["# -*- coding: utf-8 -*-\nfrom collections import Counter\nimport numpy as np\n\nn, k = list(map(int,input().split()))\ntable = np.zeros((2*k,2*k),dtype='int32')\nfor i in range(n):\n t = input().split()\n if(t[2]=='B'):\n table[int(t[0])%(2*k)][int(t[1])%(2*k)] += 1\n else:\n table[(int(t[0])+k... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s110603216', 's738165749', 's062264532'] | [12472.0, 4596.0, 3064.0] | [149.0, 1203.0, 440.0] | [1742, 517, 468] |
p03459 | u712429027 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ['import sys\ninput = sys.stdin.readline\nins = lambda: input().rstrip()\nini = lambda: int(input().rstrip())\ninm = lambda: map(int, input().split())\ninl = lambda: list(map(int, input().split()))\nout = lambda x: print(\'\\n\'.join(map(str, x)))\n\nn = ini()\nans = True\nprevt = 0\nprevx = 0\nprevy = 0\nfor _ in rang... | ['Wrong Answer', 'Accepted'] | ['s493966468', 's937933232'] | [9140.0, 9076.0] | [138.0, 151.0] | [557, 550] |
p03459 | u729417323 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ["# --*-coding:utf-8-*--\n\n\ndef f(poss):\n lastPos = (0, 0, 0)\n\n for pos in poss:\n t = pos[0] - lastPos[0]\n d = abs(pos[1] - lastPos[1]) + abs(pos[2] - lastPos[2])\n lastPos = pos\n\n if t < d or (t-d)%2 != 0:\n return False\n\n return True\n\n\n\ndef main():\n ... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s199658517', 's545854158', 's000684882'] | [17312.0, 17308.0, 17324.0] | [341.0, 364.0, 357.0] | [459, 437, 459] |
p03459 | u785205215 | 2,000 | 262,144 | AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i. If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1... | ['import math\nimport itertools\nimport heapq\nfrom sys import stdin, stdout, setrecursionlimit\nfrom bisect import bisect, bisect_left, bisect_right\nfrom collections import defaultdict, deque\n\n\n\n\n# inf = float("inf")\n\n\n\ndef LM(t, r): return list(map(t, r))\ndef R(): return stdin.readline()\ndef RS(): return ... | ['Wrong Answer', 'Accepted'] | ['s946568097', 's199937706'] | [3444.0, 3700.0] | [26.0, 239.0] | [1108, 1139] |
p03463 | u003501233 | 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-b) % 2 == 0:\n print("Aliice")\nelse:\n print("Borys")', 'n,a,b=map(int,input().split())\n\nif (a-b) % 2 == 0:\n print("Alice")\nelse:\n print("Borys")'] | ['Wrong Answer', 'Accepted'] | ['s671367870', 's822685992'] | [2940.0, 2940.0] | [17.0, 18.0] | [91, 90] |
p03463 | u010090035 | 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("Alice")\nelse:\n print("Borys")', 'n,a,b=map(int,input().split())\nif((b-a) %2==0):\n print("Alice")\nelse:\n print("Borys")'] | ['Wrong Answer', 'Accepted'] | ['s006478268', 's594523249'] | [2940.0, 3064.0] | [18.0, 17.0] | [89, 91] |
p03463 | u020798319 | 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 and n-b >= 0 or a+b != n or n+a == b:\n print("Borys")\nelse :\n print("Alice")', 'n , a , b = map(int,input().split())\nif (a- b) % 2 == 0 :\n print("Alice")\nelse:\n print("Borys")'] | ['Wrong Answer', 'Accepted'] | ['s846222849', 's306394494'] | [8992.0, 9000.0] | [28.0, 30.0] | [135, 97] |
p03463 | u021916304 | 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 ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\nn,a,b = iim()\n\nif (b-a)%2 == 1:\n if a == 1:\n print('Borys')\n else:\n print('Alice')\nelse:\n print('Borys')", "def ii():return int(input())\ndef iim():return map(int,in... | ['Wrong Answer', 'Accepted'] | ['s600631116', 's644024752'] | [3060.0, 3060.0] | [17.0, 17.0] | [246, 247] |
p03463 | u027622859 | 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==N:\n print('Borys')\nelse:\n if B-A == 2:\n print('Draw')\n elif (B-A)%2 == 0:\n print('Alice')\n else:\n print('Borys')", "N, A, B = map(int, input().split())\nif A==1 and B==A+1:\n print('Borys')\nelse:\n if (B-A)%2 == 0:\n ... | ['Wrong Answer', 'Accepted'] | ['s954326192', 's402045615'] | [3064.0, 3060.0] | [17.0, 18.0] | [196, 202] |
p03463 | u045939752 | 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("Borys" if (B-A)%2 == 0 else "Alice")', 'N,A,B=map(int,input().split())\nprint("Borys" if (B-A)%2 == 1 else "Alice")'] | ['Wrong Answer', 'Accepted'] | ['s030961935', 's955619418'] | [2940.0, 2940.0] | [18.0, 24.0] | [74, 74] |
p03463 | u057463552 | 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 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 ... | ['Runtime Error', 'Accepted'] | ['s256562901', 's265223297'] | [3064.0, 2940.0] | [17.0, 17.0] | [1005, 99] |
p03463 | u102960641 | 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("Alice")\nelif b - a % 2 == 1\n print("Borys")', 'n,a,b = map(int, input().split())\nif b - a % 2 == 0:\n print("Alice")\nelif b - a % 2 == 1\n print("Borys")', 'n,a,b = map(int, input().split())\nif b - a % 2 == 0:\n print("Alice")\nelif b - a % 2 ==... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s254807099', 's832436942', 's898782798', 's139316421'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 18.0, 18.0] | [106, 106, 107, 107] |
p03463 | u125050519 | 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 = input()\nA = input()\nB = input()\n\nres = ""\n\nif ((int)(B) - (int)(A))%2 == 0:\n res = "Alice"\nelse:\n res = "Borys"\n\nprint(res)\n', 'moji = input()\nmoji = moji.split(" ")\nN = moji[0]\nA = moji[1]\nB = moji[2]\n\nres = ""\n\nif ((int)(B) - (int)(A))%2 == 0:\n res = "Alice"\nelse:\n res = "Bory... | ['Runtime Error', 'Accepted'] | ['s737241176', 's606112025'] | [2940.0, 3060.0] | [17.0, 17.0] | [134, 172] |
p03463 | u136647933 | 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())\nbet=abs(b-a)\nif bet%2==0:\n winner='ALice'\n else:\n winner='Borys'\n \nprint(winner)", "n,a,b=map(int,input().split())\nbet=abs(b-a)\nif bet%2==0:\n winner='Alice'\nelse:\n winner='Borys'\n \nprint(winner)"] | ['Runtime Error', 'Accepted'] | ['s996780018', 's697644821'] | [2940.0, 2940.0] | [17.0, 18.0] | [119, 117] |
p03463 | u148079233 | 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 (B - A) % 2 == 0:\n print('Borys')\nelse:\n print('Alice')", "N, A, B = map(int, input().split())\n \nif (B - A - 1) % 2 == 0:\n print('Borys')\nelse:\n print('Alice')"] | ['Wrong Answer', 'Accepted'] | ['s235224680', 's261508663'] | [2940.0, 2940.0] | [17.0, 18.0] | [98, 102] |
p03463 | u162612857 | 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" if (b - a) % 2 == 1 else "Alice")', 'n, a, b = list(map(int, input().split()))\nprint("Borys" if (b - a) % 2 == 1 else "Alice")'] | ['Runtime Error', 'Accepted'] | ['s495832378', 's595443902'] | [2940.0, 2940.0] | [18.0, 18.0] | [91, 89] |
p03463 | u187109555 | 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("Alice)\nelse:\n print("Borys")', '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 == 0:\n print("Bolice")\nelse:\n print("Alice")', '... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s512471402', 's668127652', 's787079170', 's407674786'] | [2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 18.0, 17.0, 17.0] | [97, 98, 99, 98] |
p03463 | u200239931 | 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 getinputdata():\n\n array_result = []\n \n data = input()\n \n array_result.append(data.split(" "))\n\n flg = 1\n\n try:\n\n while flg:\n\n data = input()\n\n if(data != ""):\n \n array_result.append(data.split(" "))\n\n ... | ['Wrong Answer', 'Accepted'] | ['s542804191', 's817897669'] | [3060.0, 3064.0] | [17.0, 17.0] | [625, 627] |
p03463 | u225388820 | 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==1:\n print('Alice')\nelse:\n print('Borys')", "n,a,b=map(int,input().split())\nif (b-a)%2==0:\n print('Alice')\nelse:\n print('Borys')"] | ['Wrong Answer', 'Accepted'] | ['s633485244', 's859267415'] | [2940.0, 2940.0] | [22.0, 18.0] | [85, 85] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.