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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03018 | u177645323 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\na = "ABC"\nans = 0\n\nwhile("ABC" in s):\n s = s.replace("ABC","BCA")\n ans += 1\n\nprint(ans)\n', 's = input()\nans = 0\npre_chance = 0\npos_chance = 0\n\nfor i in range(len(s)-1):\n if s[i] == "A":\n if s[i:i+2] == "AA":\n pre_chance += 1\n pos_chance = 0\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s051370895', 's348227068', 's874255673', 's821558959'] | [3500.0, 3628.0, 3500.0, 5096.0] | [2104.0, 217.0, 229.0, 80.0] | [106, 853, 880, 209] |
p03018 | u218757284 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = list(input())\npos = 0\nstr_len = len(s)\ncount = 0\nstate = 0\n\nwhile pos < str_len:\n if state == 0:\n if s[pos] == "A":\n state = 1\n pos += 1\n elif state == 1:\n if s[pos] == "B":\n state = 2\n elif s[pos] == "A":\n state = 1\n else:\... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s073025866', 's307267729', 's452517668', 's517201473', 's559193375', 's578560941', 's643759776', 's722891220', 's888906083'] | [138660.0, 62496.0, 3500.0, 138648.0, 3500.0, 3500.0, 3500.0, 3500.0, 3500.0] | [2104.0, 2106.0, 80.0, 1691.0, 87.0, 103.0, 79.0, 82.0, 101.0] | [629, 657, 701, 678, 692, 668, 707, 578, 668] |
p03018 | u222643068 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s=input()\ns=s.replace('BC','D')\ns=list(s)\ncount=0\n \ndef change():\n global count\n flg=False\n for i in range(len(s)-2):\n if s[i]=='A' and s[i+1]=='D':\n s[i]='D'\n s[i+1]='A'\n count+=1\n flg=True\n \n return flg\n \nwhile(change()):\n pass\n \nprint(count)", "s=input()\ns... | ['Wrong Answer', 'Accepted'] | ['s271809485', 's145944318'] | [4840.0, 4840.0] | [2104.0, 75.0] | [282, 359] |
p03018 | u229621546 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['S = input()\nL = [" "]\nfor s in S:\n if s == \'A\':\n L.append(\'0\')\n elif s == \'B\':\n L.append(\'B\')\n elif s == \'C\' and L[-1] == \'B\':\n L[-1] = \'1\'\n else:\n L.append(\'C\')\n\nans = 0\na = 0\nwhile True:\n a = 0\n for i in range(1,len(L)):\n if L[i] == \'0\' and L[i + 1] == \'1\':\... | ['Runtime Error', 'Accepted'] | ['s431056030', 's871557721'] | [4864.0, 4864.0] | [2104.0, 261.0] | [414, 495] |
p03018 | u260947909 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["import re\n\nS = input()\nct = 0\n\nwhile True:\n D = re.findall('A+BC',S)\n if len(D)==0:\n break\n for d in D:\n num = len(d)-2\n ct += num\n S=S.replace(d,'BC'+'A'*num)\nprint(ct)", "import re\n\nS = input()\nct = 0\n\nna = 0\nbf = False\nct = 0\nfor s in S:\n if s =='A':\n if bf==True:\n n... | ['Wrong Answer', 'Accepted'] | ['s207841800', 's264023753'] | [5736.0, 3628.0] | [2104.0, 82.0] | [184, 346] |
p03018 | u282228874 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["S = input()\nS.replace('BC','X')\nres = 0\ncnt = 0\nfor i in range(len(S)):\n if S[i] == 'A' :\n cnt += 1\n elif S[i] == 'X':\n res += cnt\n else:\n cnt = 0\nprint(res)\n", "S = input()\nT = S.replace('BC','X')\nres = 0\ncnt = 0\nfor s in T:\n if s == 'A' :\n cnt += 1\n elif... | ['Wrong Answer', 'Accepted'] | ['s003567420', 's017077239'] | [3500.0, 3500.0] | [57.0, 46.0] | [188, 174] |
p03018 | u285443936 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['S = input()\nN = len(S)\nans = 0\nfor i in range(N-2):\n if S[i:i+3] == "ABC":\n ans += 1\nfor i in range(N-3):\n if S[i:i+4] == "AABC":\n ans += 1\nfor i in range(N-4):\n if S[i:i+5] == "ABCBC":\n ans += 1\nfor i in range(N-8):\n if S[i:i+9] == "ABCBCAABC":\n ans += 1\nprint(ans)', 'S = input()\nT = ... | ['Wrong Answer', 'Accepted'] | ['s916381647', 's403275187'] | [3500.0, 3500.0] | [246.0, 141.0] | [282, 324] |
p03018 | u312025627 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['def main():\n S = input()\n S = S.replace("BC", "D")\n N = len(S)\n ans = 0\n a_cnt = 0\n for i in range(N-1):\n if S[i] == "A":\n a_cnt += 1\n elif S[i] == "D":\n ans += a_cnt\n else:\n a_cnt = 0\n print(ans)\n\n\nif __name__ == \'__main__\':... | ['Wrong Answer', 'Accepted'] | ['s130973772', 's206022815'] | [3500.0, 3500.0] | [46.0, 44.0] | [312, 310] |
p03018 | u316322317 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s=input()\nl=s.replace('BC','D')\na=0\nans=0\nfor i in range(len(l)):\n if s[i]=='A':\n a+=1\n elif s[i]=='D':\n ans+=a\n else:\n a=0\nprint(ans)", "s=input()\nl=s.replace('BC','D')\na=0\nans=0\nfor i in range(len(l)):\n if l[i]=='A':\n a+=1\n elif l[i]=='D':\n ans+=a\n else:\n a=0\nprint(ans)... | ['Wrong Answer', 'Accepted'] | ['s127962141', 's154244643'] | [3628.0, 3500.0] | [57.0, 58.0] | [146, 147] |
p03018 | u343128979 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["import math\nimport numpy as np\nimport re\n\n\ndef inputs(): return [int(s) for s in input().split()]\n\n\ndef main():\n s = input()\n cnt = 0\n s = s.replace('A', '1').replace('BC', '0')\n arr = re.split('[A-C]', s)\n arr = [list(x) for x in arr]\n flag = True\n while flag:\n flag = Fals... | ['Runtime Error', 'Accepted'] | ['s566547283', 's422167815'] | [28288.0, 28376.0] | [252.0, 307.0] | [536, 463] |
p03018 | u346395915 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\n \nans = 0\ns = s.replace("BC","D")\ncnt_A = 0\n \n\nfor i in s:\n if i == "A":\n cnt_A += 1\n elif s == "D":\n ans += cnt_A\n else:\n cnt_A = 0\n\nprint(ans)', 's = input()\n \nans = 0\ns = s.replace("BC","D")\ncnt_A = 0\n \n\nfor i in s:\n if i == "A":\n cnt_A +=... | ['Wrong Answer', 'Accepted'] | ['s298610717', 's950873263'] | [3500.0, 3628.0] | [40.0, 46.0] | [186, 186] |
p03018 | u366959492 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s=list(input())\nl=[]\nf=0\nfor i in range(len(s)-1):\n if s[i]=="A":\n l.append("A")\n f=0\n elif s[i]=="B":\n if s[i+1]=="C":\n l.append("D")\n f=1\n else:\n l.append("B")\n f=0\n else:\n if f:\n f=0\n cont... | ['Wrong Answer', 'Accepted'] | ['s111887165', 's661633763'] | [6688.0, 6436.0] | [129.0, 133.0] | [501, 483] |
p03018 | u370721525 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = str(input())\n\nans = 0\nfor i in range(len(s)-1):\n if s[i:i+2] == 'BC':\n cnt = 0\n for j in range(i):\n if s[i-1-j] == 'A':\n cnt += 1\n else:\n break\n s = s[:i-cnt] + 'BC' + 'A'*cnt + s[i+2:]\n ans += cnt\n print(s)\nprint(ans)", "s = str(input())\n\nans, cnt, i = 0, 0... | ['Runtime Error', 'Accepted'] | ['s001415695', 's288776754'] | [138556.0, 9180.0] | [2261.0, 98.0] | [262, 212] |
p03018 | u392319141 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = input()\n\nans = 0\ni = 0\n\nwhile i < len(s) :\n if s[i] == 'A' :\n if s[i+1] == 'B' and s[i+2] == 'C' : \n j = 1\n for j in range(1,i+1) :\n if not s[i-j] == 'A' : \n break\n k = 0\n for k in range(0,len(s)) :\n ... | ['Runtime Error', 'Accepted'] | ['s700147435', 's924689977'] | [3500.0, 3500.0] | [103.0, 56.0] | [466, 189] |
p03018 | u394721319 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["\tS = list(input())\nN = len(S)\n\nans = 0\nflag = 0\nABCflag = 0\n\ni = 0\nwhile i < N-2:\n\n if S[i]+S[i+1]+S[i+2] == 'ABC':\n ans += 1\n if flag:\n ans += flag\n if ABCflag:\n ans += ABCflag\n ABCflag = 0\n i += 2\n ABCflag += 1\n\n elif S[i... | ['Runtime Error', 'Accepted'] | ['s354721127', 's971709649'] | [2940.0, 4840.0] | [18.0, 144.0] | [548, 304] |
p03018 | u405256066 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['from sys import stdin\ns = (stdin.readline().rstrip())\ns = s.replace("BC","D")\nans = 0\nacc = 0\n\nfor i in s:\n if i == "B" or i == "C":\n acc = 0\n continue\n \n if i == "A":\n acc += 1\n \n if i == "D":\n ans += acc\n\nprint(acc)', 'from sys import stdin\ns = (stdin... | ['Wrong Answer', 'Accepted'] | ['s905214209', 's978375295'] | [3500.0, 3628.0] | [66.0, 67.0] | [264, 264] |
p03018 | u475675023 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s='ABCACCBABCBCAABCB'\ns=s.replace('BC','D')\na=0\nans=0\nfor i in s:\n if i=='A':\n a+=1\n elif i=='D':\n ans+=a\n else:\n a=0\nprint(ans)", "s=input()\ns=s.replace('BC','D')\na=0\nans=0\nfor i in s:\n if i=='A':\n a+=1\n elif i=='D':\n ans+=a\n else:\n a=0\nprint(ans)"] | ['Wrong Answer', 'Accepted'] | ['s977474708', 's811281076'] | [8988.0, 9336.0] | [28.0, 47.0] | [140, 128] |
p03018 | u512524057 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = input().replace('BC','D')\nn = len(s)\n \ncount = 0\nres = 0\n \nfor i in range(n):\n if s[i] == 'A':\n count += 1\n elif s[i] == 'D':\n res += count\n else:\n count = 0\n \nprint(ans)", "s = input().replace('BC','D')\nn = len(s)\n \ncount = 0\nres = 0\n \nfor i in range(n):\n if ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s366050661', 's466897973', 's383137587'] | [3500.0, 2940.0, 3500.0] | [59.0, 17.0, 58.0] | [204, 201, 202] |
p03018 | u518042385 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['w=list(input())\nnow=0\nnum=len(w)\nw.append(" ")\ncount=0\nwhile now<num:\n if w[now]!="A":\n now+=1\n else:\n if w[now+1]!="B":\n now+=1\n else:\n if w[now+2]!="C":\n now+=1\n else:\n w[now]="B"\n w[now+1]="C"\n w[now+2]="A"\n count+=1\n back=now-1... | ['Runtime Error', 'Accepted'] | ['s559302788', 's521386924'] | [3064.0, 3500.0] | [17.0, 151.0] | [553, 396] |
p03018 | u526603504 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = input()\n\ns = s.replace('BC', 'D')\na_count = 0\ncount = 0\nprint(s)\nfor c in s:\n if c == 'A':\n a_count += 1\n elif c == 'D':\n count += a_count\n else:\n a_count = 0\n\nprint(count)", "s = input()\n\ns = s.replace('BC', 'D')\na_count = 0\ncount = 0\nfor c in s:\n if c == 'A':... | ['Wrong Answer', 'Accepted'] | ['s865595078', 's117554780'] | [3560.0, 3500.0] | [45.0, 45.0] | [206, 197] |
p03018 | u545672909 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['def li():\n return list(map(int, input().split()))\n\n\nif __name__ == "__main__":\n s = input()\n ope_num = 0\n index = 0\n a_stock = 0\n b_stock = 0\n s = list(s)\n while index < len(s):\n si = s[index]\n # print(index)\n # print(si)\n # print(a_stock)\n # ... | ['Runtime Error', 'Accepted'] | ['s891359765', 's168865455'] | [4968.0, 4968.0] | [120.0, 119.0] | [1398, 1502] |
p03018 | u557494880 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["S = input()\nN = len(S)\na = 0\nans = 0\nfor i in range(N):\n if S[i] == 'A':\n a += 1\n elif S[i] == 'B':\n if S[i+1] == 'C':\n ans += a\n else:\n a = 0\n else:\n a = 0\nprint(ans)", "S = input()\nN = len(S)\na = 0\nans = 0\nf = 0\nfor i in range(N-1):\n ... | ['Runtime Error', 'Accepted'] | ['s581781652', 's052332947'] | [3500.0, 3500.0] | [76.0, 77.0] | [226, 307] |
p03018 | u576917603 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s=input()\nn=len(s)\n\ncnt=0\nans=0\n\nfor i in range(n-2):\n if s[i]=="A":\n cnt+=1\n elif s[i:i+2]=="BC":\n ans+=cnt\n elif i>0 and s[i-1:i+1]=="BC":\n pass\n else:\n cnt=0\n\nprint(ans)\n ', 's=input()\nn=len(s)\n\ncnt=0\nans=0\n\nfor i in range(n-1):\n if s[i]=="A":\n... | ['Wrong Answer', 'Accepted'] | ['s986648412', 's424942701'] | [3500.0, 3500.0] | [151.0, 124.0] | [217, 217] |
p03018 | u591589288 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['#!/usr/bin/env python\n\nimport sys\nimport re\n\n_,a,b,c,d = [ int(x)-1 for x in sys.stdin.readline().split() ]\nm = sys.stdin.readline().strip()\n#\nloc= []\nfor match in re.finditer( "##",m ): loc.append( match.start() )\nif c>d:\n if m[b-1:b+2]!="..." and m[b+1:d+1].find("..")<0:\n print( "No" )\n ... | ['Runtime Error', 'Accepted'] | ['s915430115', 's417862440'] | [3624.0, 5668.0] | [22.0, 57.0] | [665, 244] |
p03018 | u594803920 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["from numba import jit\ns = list(input())\nn = len(s)\nans = 0\n@jit\ndef p(ans):\n for i in range(0, n-2):\n b = True\n if s[i:i+3] == ['A', 'B', 'C']:\n s[i] = 'B'\n s[i+1] = 'C'\n s[i+2] = 'A'\n ans += 1\n b = False\n \n return ans, b... | ['Runtime Error', 'Accepted'] | ['s153344357', 's769446157'] | [122220.0, 12028.0] | [2209.0, 145.0] | [375, 487] |
p03018 | u597455618 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input().replace("BC", "D")\nprint(s)\nans = 0\na = 0\nfor i in range(len(s)):\n if s[i] == "A":\n a += 1\n elif s[i] == "D":\n ans += a\n else:\n a = 0\nprint(ans)', 's = input().replace("BC", "D")\nans = 0\na = 0\nfor i in range(len(s)):\n if s[i] == "A":\n a += 1\n eli... | ['Wrong Answer', 'Accepted'] | ['s061830268', 's337895864'] | [3560.0, 3500.0] | [59.0, 57.0] | [186, 177] |
p03018 | u606045429 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['N, A, B, C, D = [int(i) for i in input().split()]\nS = input()\n\ndef solve():\n ac, bd = S[A - 1:C], S[B - 1:D]\n if A < B < D < C:\n bd = S[B - 2:D + 1]\n return ("..." in bd and "##" not in ac)\n else:\n return ("##" not in ac and "##" not in bd)\n\nif solve():\n print("Yes")\nelse... | ['Runtime Error', 'Accepted'] | ['s122903222', 's171725572'] | [3624.0, 3500.0] | [18.0, 35.0] | [322, 219] |
p03018 | u618107373 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['import sys\nsys.setrecursionlimit(100000)\n\ndef intinput(): return map(int,input().split())\n\ns=input()\ns=s.replace("BC","D")\nprint(s)\nacnt=0\ndcnt=0\nans=0\nfor i in s[::-1]:\n if i=="D":\n ans+=acnt*dcnt\n acnt=0\n dcnt+=1\n elif i=="A":\n acnt+=1\n else:\n ans += ac... | ['Wrong Answer', 'Accepted'] | ['s180744676', 's791636364'] | [3560.0, 3500.0] | [69.0, 65.0] | [364, 355] |
p03018 | u623687794 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s=input()\na=s.replace("BC","D")[::-1]\nans=0\ni=0\nwhile i<len(a):\n if a[i]=="D":\n k=1\n while True:\n try:\n if a[i+k]=="A" or a[i+k]=="D":\n ans+=1;k+=1\n else:\n i+=k-1\n break\n except:break\n i+=1\nprint(ans)', 's=input()\nans=0\nwhile "ABC" in s:\n ... | ['Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s587227752', 's989943869', 's922996269'] | [3560.0, 3500.0, 3628.0] | [2104.0, 2107.0, 183.0] | [259, 80, 252] |
p03018 | u626337957 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["S = input()\nidx = 0\na_cnt = 0\ncnt = 0\nlen_s = len(S)\nwhile idx < len_s:\n if S[idx:idx+3] == 'ABC':\n cnt += 1 + a_cnt\n idx += 3\n a_cnt = 0\n bc_cnt = 0\n while idx < len(S):\n if S[idx:idx+2] == 'BC':\n bc_cnt += 1\n idx += 2\n else:\n break\n cnt += bc_cnt\n ... | ['Wrong Answer', 'Accepted'] | ['s956643737', 's575206485'] | [3500.0, 3500.0] | [107.0, 112.0] | [369, 379] |
p03018 | u626881915 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['\ndef bubble_sort(A):\n cnt = 0\n for i in range(len(A)):\n for j in range(len(A)-1, i, -1):\n if A[j] == \'D\' and A[j-1] == \'A\':\n A[j], A[j-1] = A[j-1], A[j]\n cnt += 1\n return cnt\n\ns = input()\ntotal = 0\nnew_s = s.replace("BC", "D")\nnew_s_list = list... | ['Runtime Error', 'Accepted'] | ['s938111995', 's807450312'] | [4840.0, 8292.0] | [22.0, 589.0] | [488, 781] |
p03018 | u637593381 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["import re\nimport sys\ninput = sys.stdin.readline\n\ns = input()\ns = s.replace('BC', 'D')\ns = re.split('[BC]', s)\nres = 0\n\nprint(s)\n\n\nfor kk in s:\n if not kk:\n continue\n while 'AD' in kk:\n res += kk.count('AD')\n kk = kk.replace('AD', 'DA')\n \nprint(res)", "import re\nimport sys\ninput = sy... | ['Wrong Answer', 'Accepted'] | ['s171188664', 's510678758'] | [7140.0, 5608.0] | [2104.0, 64.0] | [262, 257] |
p03018 | u638795007 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['import re\n\nS = str(input())\nk=int(0)\n\n\nwhile () :\n#while S.find(\'ABC\')>=0:\n# S = S[:S.rfind(\'ABC\')] + \'BCA\' + S[(S.rfind(\'ABC\')+3):]\n\n matchedList = re.findall("ABC",S)\n a = len(matchedList)\n k += a\n if a==-1 : break\n S = S.replace(\'ABC\', \'BCA\')\n\nans = (int(k))\n\nprint(a... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s037490926', 's128302567', 's770642894', 's822639943', 's512493934'] | [3628.0, 3628.0, 12504.0, 3628.0, 3500.0] | [19.0, 23.0, 2104.0, 20.0, 133.0] | [323, 322, 268, 322, 246] |
p03018 | u648881683 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["import bisect, collections, copy, heapq, itertools, math, string, sys\ninput = lambda: sys.stdin.readline().rstrip() \nsys.setrecursionlimit(10**7)\nINF = float('inf')\ndef I(): return int(input())\ndef F(): return float(input())\ndef SS(): return input()\ndef LI(): return [int(x) for x in input().split()]\ndef LI_()... | ['Wrong Answer', 'Accepted'] | ['s509777330', 's583283557'] | [10284.0, 10272.0] | [68.0, 72.0] | [914, 971] |
p03018 | u677267454 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["# -*- coding: utf-8 -*-\nqS = input()\n\n\ndef replace(s, count):\n fi = s.find('ABC')\n if fi >= 0:\n newS = 'A' + s[fi+3:]\n return replace(newS, count + 1)\n else:\n return count\n\n\nprint(replace(qS, 0))\n", "# -*- coding: utf-8 -*-\ns = input()\ns = s.replace('BC', 'D')\n\na_num = ... | ['Runtime Error', 'Accepted'] | ['s222764375', 's086818718'] | [197828.0, 3500.0] | [178.0, 47.0] | [226, 208] |
p03018 | u685254427 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = list(input())\ncount = 0\nfor i in range(len(s)):\n if s[-i-1] == 'A':\n tmp = -i-1\n while tmp <= -3 and s[tmp+1] == 'B' and s[tmp+2] == 'C':\n s.pop(tmp)\n s.insert(tmp+2, 'A')\n count += 1\n tmp += 2\nprint(count)", "inp = input()\nchanged_input = in... | ['Wrong Answer', 'Accepted'] | ['s105573314', 's564587139'] | [4840.0, 3500.0] | [2104.0, 47.0] | [271, 239] |
p03018 | u688126754 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['S = input()\n\nBC_str = ""\nA_index_lst = []\nfor i in range(len(S)):\n if S[i] == "A":\n A_index_lst.append(len(BC_str))\n else:\n BC_str += S[i]\n\n\nprint(A_index_lst)\nprint(BC_str)\n\n\nans = 0\ni = 0\nrunning_A_count = 0\nwhile i + 1 < len(BC_str):\n if i in A_index_lst:\n running_... | ['Wrong Answer', 'Accepted'] | ['s510816947', 's536464300'] | [7908.0, 3500.0] | [2108.0, 115.0] | [494, 275] |
p03018 | u691018832 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["import re\n\ns = input()\ns = s[::-1]\nans = 0\nfor i in range(s.count('A')):\n a = re.search('(CB)+A', s)\n ans += (a.end()-a.start()-1)//2\n s = s.replace('A', '', 1)\n print((a.end()-a.start()),s,ans)\nprint(ans)", "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlin... | ['Runtime Error', 'Accepted'] | ['s136817012', 's979912528'] | [142644.0, 3444.0] | [2104.0, 131.0] | [217, 498] |
p03018 | u702582248 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s=input()\nn = len(s)\ncum = [0] * (n+1)\nsr = s[::-1]\nfor i in range(n-1):\n if sr[i] == 'C' and sr[i+1] == 'B':\n cum[i+1] = cum[i] + 1\n elif sr[i] == 'A' or sr[i:i+2] in ['BC'] or (1 < i and sr[i-1:i+2] == 'CBA'):\n cum[i+1] = cum[i]\n else:\n cum[i+1] = 0\ncum[n] = cum[n-1]\nans = ... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s260312661', 's544638208', 's683812861', 's727106404', 's836690378', 's626442055'] | [7048.0, 3628.0, 3064.0, 2940.0, 7048.0, 12936.0] | [224.0, 19.0, 17.0, 18.0, 208.0, 111.0] | [398, 1128, 846, 11, 398, 1193] |
p03018 | u715350216 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["def check(list,a,b,c,d):\n if c==d:\n return False\n i=a\n counter1=0\n while i<b:\n if list[i]=='#':\n counter1+=1\n else:\n counter1=0\n if counter1>=2:\n return False\n i+=1\n counter1=0\n check2,counter2=0,0\n i+=1\n while... | ['Runtime Error', 'Accepted'] | ['s257689010', 's871611755'] | [3628.0, 4840.0] | [19.0, 91.0] | [1006, 468] |
p03018 | u723792785 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\ns = s.replace("BC", "D")\nprint(s)\nacnt = 0\nmode = 1\nans = 0\n\nfor i in range(len(s)):\n\tif s[i] == "A":\n\t\tacnt += 1\n\telif s[i] == "D":\n\t\tans += acnt\n\telse:\n\t\tacnt = 0\nprint(ans)', 's = input()\ns = s.replace("BC", "D")\nacnt = 0\nmode = 1\nans = 0\n\nfor i in range(len(s)):\n\tif s[i]... | ['Wrong Answer', 'Accepted'] | ['s963378469', 's547158811'] | [9252.0, 9344.0] | [66.0, 62.0] | [320, 311] |
p03018 | u742036388 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['import import re\n\ns = str(input())\nfind_s = \'ABC\'\ncount = 0\nwhile True:\n s_n = re.sub(r"ABC", "BCA", s)\n l_find = len(re.findall(r"ABC", s))\n count += l_find\n\n if l_find == 0:\n print(count)\n break\n else:\n s = s_n', "import re\n\ns = input()\ns = s.replace('BC', 'D')... | ['Runtime Error', 'Accepted'] | ['s647814907', 's401424151'] | [2940.0, 3628.0] | [18.0, 48.0] | [248, 224] |
p03018 | u747184036 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['import sys\nimport re\nsys.setrecursionlimit(10 ** 7)\n\n\ndef LI(): return [int(x) for x in sys.stdin.readline().split()]\n\n\ndef SI(): return input()\n\n\ndef main():\n S = SI()\n ans = 0\n now = 0\n aa = 0\n while(1):\n now = S.find("ABC")\n if now == -1:\n break\n\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s162903185', 's474803745', 's614090008', 's773402551', 's950446623', 's697330552'] | [3628.0, 4152.0, 3628.0, 3628.0, 3628.0, 3500.0] | [261.0, 320.0, 259.0, 258.0, 266.0, 34.0] | [698, 724, 696, 699, 696, 202] |
p03018 | u750420582 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\npos = 0\ncnt = 0\nif len(s) < 3:\n print(0)\nelse:\n while(True):\n if s[pos:pos+3] == "ABC":\n s = s[:pos] + "BCA" + s[pos+3:]\n if pos > 0:\n pos -= 1\n cnt += 1\n else:\n if s[pos+1:pos+3] == "AB":\n pos += 1... | ['Runtime Error', 'Accepted'] | ['s504981332', 's410121351'] | [2940.0, 3500.0] | [17.0, 133.0] | [473, 422] |
p03018 | u767664985 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input().replace("BC", "X")\nindA = [i for i in range(len(s)) if s[i] == "A"]\n\nans = 0\nfor i in indA:\n while s[i] != "B" and s[i] != "C":\n ans += (s[i] == "X")\nprint(ans)\n', 's = input().replace("BC", "D")\nans, cnt = 0, 0\nfor i in range(len(s)):\n\tif s[i] == "A":\n\t\tcnt += 1\n\telif s[i] == "... | ['Time Limit Exceeded', 'Accepted'] | ['s121469092', 's485645592'] | [17108.0, 3500.0] | [2206.0, 58.0] | [183, 159] |
p03018 | u798818115 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['# coding: utf-8\n# Your code here!\ns=input()\ns=list(s.replace(\'BC\',\'Z\'))\nans=0\nprint(s)\n \ndef seisan(list):\n count=0\n N=len(list)-1\n for index,content in enumerate(list):\n if content=="A":\n count+=(N-index)\n N-=1\n return count\n\ntemp=[]\nwhile s:\n this=s.... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s212236280', 's351964880', 's869961481'] | [7584.0, 2940.0, 6308.0] | [2104.0, 17.0, 180.0] | [442, 443, 475] |
p03018 | u811817592 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['# -*- coding: utf-8 -*-\ns = input()\ncount = 0\na_flg = 0\nb_flg = 0\nfor idx, char in enumerate(s):\n if char == "A":\n a_flg = 1\n elif a_flg == 1 and char == "B":\n b_flg = 1\n elif a_flg == 1 and b_flg == 1 and char == "C":\n count += 1\n else:\n a_flg = 0\n b_flg =... | ['Wrong Answer', 'Time Limit Exceeded', 'Accepted'] | ['s148774896', 's601922757', 's209385285'] | [3500.0, 3500.0, 3628.0] | [66.0, 2104.0, 58.0] | [319, 171, 244] |
p03018 | u814986259 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s=input()\nans=0\nfor i in range(len(s)-2):\n if s[i]+s[i+1]+s[i+2]=="ABC":\n ans+=1\n if i > 1:\n if s[i-2]+s[i-1]=="AB":\n ans+=1\n if i<len(s)-4:\n if s[i+3]+s[i+4]=="BC":\n ans+=1\nprint(ans)', 's = input()\nans = 0\ncount = 0\n\nfor x in s.replace("BC", "Z"):\n if x == "A":\n... | ['Wrong Answer', 'Accepted'] | ['s312856603', 's112483336'] | [3500.0, 3500.0] | [134.0, 48.0] | [218, 194] |
p03018 | u860002137 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\n\nmatch = ["ABC", "ABCBC", "AABC", "ABCBCAABC", "AABCABCBC"]\n\nans = 0\nfor x in match:\n ans += s.count(x)\n\nprint(ans)', "s = input()\ns = s.replace('BC', 'X')\n\ncnt = 0\nans = 0\n\n\nfor x in s:\n if x == 'A':\n cnt += 1\n elif x == 'X':\n ans += cnt\n else:\n cnt =... | ['Wrong Answer', 'Accepted'] | ['s034065523', 's632365603'] | [3500.0, 3500.0] | [23.0, 49.0] | [130, 264] |
p03018 | u867736259 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = input()\ncount = 0\nk = len(s)//2\nfor i in range(k):\n if 'ABC' in s:\n count = s.count('ABC')\n s = s.replace('ABC','BCA')\n else:\n break\nprint(count)", "a = input()\nb = []\ncount = 0\na = a.replace('BC','D')\nfor i in range(1,len(a)+1):\n if a[-i... | ['Wrong Answer', 'Accepted'] | ['s085264833', 's660291950'] | [3500.0, 5096.0] | [2104.0, 80.0] | [208, 209] |
p03018 | u888387803 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["s = list(input())\n\ncnt = 0\n# print(s, cnt)\n\ni = 0\nwhile i < len(s)-2:\n # print(i)\n if s[i] == 'A' and s[i+1] == 'B' and s[i+2] == 'C':\n s[i] = 'B'\n s[i+1] = 'C'\n s[i+2] = 'A'\n cnt = cnt + 1\n i = i - 1\n if i < 0:\n i = 0\n print(i, s, cnt)... | ['Runtime Error', 'Accepted'] | ['s523416267', 's776169510'] | [138576.0, 3500.0] | [1746.0, 45.0] | [342, 199] |
p03018 | u902151549 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['# coding: utf-8\nimport os\nimport time\nimport re\nimport math\n\ndef main():\n s=input().replace("BC","D")\n max=0\n acount=0\n for a in len(s):\n if s[a]==\'D\':\n max+=acount\n elif s[a]==\'A\':\n acount+=1\n else:\n acount=0\n print(max)\n\n\n\... | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s972689144', 's978324422', 's215789115'] | [3752.0, 3752.0, 3752.0] | [23.0, 38.0, 48.0] | [355, 340, 362] |
p03018 | u905203728 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s=input().replace("BC","D")\n\nA=[]\nword=""\nfor i in s:\n if i=="A" or i=="D":\n word +=i\n else:\n A.append(word)\n word=""\n\ncnt=0\nfor i in A:\n a=0\n for j in i:\n if j=="A":a +=1\n else:cnt +=a\n\nprint(cnt)', 's=input().replace("BC","D")+"E"\n\nA=[]\nword=""\nfo... | ['Wrong Answer', 'Accepted'] | ['s534989998', 's243031689'] | [5412.0, 5412.0] | [80.0, 79.0] | [244, 222] |
p03018 | u921773161 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ["#%%\ns = list(input())\nans = 0\ni = 0\n\nwhile True:\n if i < 0 :\n i += 1\n elif len(s)-2 <= i:\n break\n else:\n if s[i] == 'A'\n if s[i+1] == 'B' and s[i+2] == 'C':\n ans += 1\n s[i], s[i+1], s[i+2] = 'B', 'C', 'A'\n i -= 1\n ... | ['Runtime Error', 'Accepted'] | ['s724949424', 's293306937'] | [2940.0, 4840.0] | [17.0, 192.0] | [385, 467] |
p03018 | u952656646 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['s = input()\ns_ = s.replace("BC", "D")\ngroup = re.findall(r"[AD]+", s_)\nans = 0\nfor grp in group:\n a = 0\n for g in grp:\n if g=="A":\n a += 1\n if g=="D":\n ans += a\nprint(ans)', 'import re\ns = input()\ns_ = s.replace("BC", "D")\ngroup = re.findall(r"[AD]+", s_)\nans =... | ['Runtime Error', 'Accepted'] | ['s238509153', 's618784312'] | [3500.0, 5480.0] | [20.0, 57.0] | [213, 223] |
p03018 | u969190727 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['def f(ss):\n n=len(ss)\n ct,res=0,0\n for i in range(n):\n if ss[i]=="x":\n ct+=1\n else:\n res+=ct\n return res\ns=input()\ns=s.replace("BC","y")\ns=s.replace("A","x")\nans=0\nchk=""\nfor i in range(len(s)):\n if s[i]=="x" or s[i]=="y":\n chk+=s[i]\n else:\n ans+=f(chk)\n chk=""\nprint... | ['Wrong Answer', 'Accepted'] | ['s300468994', 's219725668'] | [3628.0, 3500.0] | [150.0, 144.0] | [304, 311] |
p03018 | u987164499 | 2,000 | 1,048,576 | You are given a string s consisting of `A`, `B` and `C`. Snuke wants to perform the following operation on s as many times as possible: * Choose a contiguous substring of s that reads `ABC` and replace it with `BCA`. Find the maximum possible number of operations. | ['from sys import stdin\ns = stdin.readline().rstrip()\ns = s.replace("BC","D")\npoint = 0\ncount = 0\nfor i in s:\n if i == "A":\n count += 1\n elif i == "D":\n point += count\n else:\n count = 0\n print(count)\nprint(point)', 'from sys import stdin\ns = stdin.readline().rstrip()\ns = ... | ['Wrong Answer', 'Accepted'] | ['s100828976', 's144787215'] | [4804.0, 3500.0] | [177.0, 46.0] | [243, 226] |
p03019 | u171366497 | 2,000 | 1,048,576 | Takahashi and Aoki will take N exams numbered 1 to N. They have decided to compete in these exams. The winner will be determined as follows: * For each exam i, Takahashi decides its _importance_ c_i, which must be an integer between l_i and u_i (inclusive). * Let A be \sum_{i=1}^{N} c_i \times (Takahashi's score ... | ["N,X=map(int,input().split())\nabove=[0]*N\nunder=[0]*N\nnow=0\ndata=[0]*N\nfor i in range(N):\n b,l,u=map(int,input().split())\n above[i]=(b*l+(X-b)*u)\n data[i]=(i,b,l,u)\n under[i]=(i,l*b)\n \n now-=l*b\nabove.sort(key=lambda x:x[1],reverse=True)\nidx=0\nused=set()\nans=0\nwhile above[idx][1]+now<... | ['Runtime Error', 'Accepted'] | ['s891204508', 's403536036'] | [39484.0, 43324.0] | [455.0, 1968.0] | [946, 961] |
p03019 | u870262604 | 2,000 | 1,048,576 | Takahashi and Aoki will take N exams numbered 1 to N. They have decided to compete in these exams. The winner will be determined as follows: * For each exam i, Takahashi decides its _importance_ c_i, which must be an integer between l_i and u_i (inclusive). * Let A be \sum_{i=1}^{N} c_i \times (Takahashi's score ... | ['import sys\nsys.setrecursionlimit(10**7)\nimport numpy as np\nnp.set_printoptions(suppress=True)\n# n = int(input())\n# a, b = map(int, input().split())\n# int_list = list(map(int, input().split()))\n# l = list(input().split())\n\n\ndebug = True\n#debug = False\n\n\ndef dprint(*objects):\n if debug == True:\n ... | ['Wrong Answer', 'Accepted'] | ['s058799904', 's657842706'] | [29300.0, 61848.0] | [2109.0, 1399.0] | [2254, 2247] |
p03029 | u001490106 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P = map(int, input().split())\nprint(int(A*3+P)/2)', 'A,P = map(int, input().split())\nprint(int((A*3+P)/2))'] | ['Wrong Answer', 'Accepted'] | ['s453965825', 's195235074'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 53] |
p03029 | u003501233 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P = map(int(input(),split())\n\napple_cut = A * 3\n\napple_pie = (apple_cut + P) /2\n \nprint(int(apple_pie))', 'apple,apple_piece = map(int(input(),split())\n\napple_cut = apple * 3\n\napple_pie = (apple_cut + apple_piece) /2\n \nprint(apple_pie)', 'A,P = map(int(input(),split())\n\... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s426987868', 's498712132', 's809619099', 's891840625', 's739277623'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [121, 144, 116, 121, 121] |
p03029 | u012914970 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P = map(int,input().split())\nB = A*3\nAP = B+P\nPie = AP/2\nprint(Pie)\n', 'A,P = map(int,input().split())\nB = A*3\nAP = B+P\nPie = AP//2\nprint(Pie)\n'] | ['Wrong Answer', 'Accepted'] | ['s660891635', 's665507113'] | [2940.0, 2940.0] | [17.0, 21.0] | [72, 73] |
p03029 | u015187377 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P = map(int, input().split())\n\nprint((A//3+P)//2)', 'A,P = map(int, input().split())\n\nprint((A*3+P)//2)\n'] | ['Wrong Answer', 'Accepted'] | ['s695090028', 's988800301'] | [2940.0, 2940.0] | [17.0, 17.0] | [51, 51] |
p03029 | u016901717 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p= map(int,input().split())\nprint(a+p//3)\n\n', 'a,p= map(int,input().split())\nprint((3*a+p)//2)'] | ['Wrong Answer', 'Accepted'] | ['s232054987', 's128579293'] | [2940.0, 2940.0] | [17.0, 19.0] | [45, 47] |
p03029 | u021548497 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['import sys\nfrom heapq import *\ninput = sys.stdin.readline\n\ndef main():\n n, q = map(int, input().split())\n \n key = []\n for i in range(n):\n s, t, x = map(int, input().split())\n l, r = max(0, s-x), max(0, t-x)\n key.append((l, 1, x))\n key.append((r, -1, x))\n\n key.s... | ['Runtime Error', 'Accepted'] | ['s640638268', 's047390343'] | [9212.0, 2940.0] | [27.0, 17.0] | [1235, 61] |
p03029 | u026155812 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A, P = map(int, input().split())\nprint((3*A+P)//2)V', 'A, P = map(int, input().split())\nprint((3*A+P)//2)'] | ['Runtime Error', 'Accepted'] | ['s525581533', 's890429676'] | [2940.0, 2940.0] | [17.0, 17.0] | [53, 50] |
p03029 | u027076164 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p = map(int,input().split())\nprint((3*a+p)//2)', 'a,p = map(int,input().split())\nprint(int((3*a+p)/2)', 'a,p = map(int,input().split())\nprint(int((3*a+p)/2))', 'a,p = map(int,input().split())\nprint((3*a+p)//2)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s159465940', 's613355015', 's677184647', 's413116285'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [50, 53, 54, 48] |
p03029 | u027675217 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p = map(int, input().split())\nsum = a*3+p\npi = sum/2\nprint(pi)\n', 'a,p = map(int, input().split())\nsum = a*3+p\npi = sum//2\nprint(pi)\n'] | ['Wrong Answer', 'Accepted'] | ['s180644757', 's353957554'] | [2940.0, 2940.0] | [17.0, 17.0] | [65, 66] |
p03029 | u032222383 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p=map(int, input())\np+=a*3\nprint(p//2)', 'a,p=map(int, input().split())\np+=a*3\nprint(p//2)'] | ['Runtime Error', 'Accepted'] | ['s405835594', 's515935753'] | [2940.0, 2940.0] | [20.0, 17.0] | [40, 48] |
p03029 | u036340997 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ["print(eval(input().replace(' ','*3-')+'//2'))", "print(eval(input().replace(' ','*3+')+'//2'))\n", "print(eval('('+input().replace(' ','*3+')+')//2'))"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s008216119', 's788294441', 's401732035'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [45, 46, 50] |
p03029 | u039189422 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p=map(int,input().split())\nprint((a*3+p)//2', 'a,p=map(int,input().split())\nprint((a*3+p)//2)'] | ['Runtime Error', 'Accepted'] | ['s114401380', 's766904854'] | [3064.0, 3316.0] | [17.0, 20.0] | [45, 46] |
p03029 | u040016087 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['x = input().split(" ")\na = int(x[0])\nb = int(x[1])\n\nr = a * 3 + b\n\nprint(r // 3)', 'x = input().split(" ")\na = int(x[0])\nb = int(x[1])\n\nr = (a * 3) + b\n\nprint(r // 2)'] | ['Wrong Answer', 'Accepted'] | ['s268959285', 's983923192'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 82] |
p03029 | u040067762 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p=map(int, input().split())\ndef crush(A):\n return A * 3\n\ndef create_apple_pie(piece):\n return piece // 2\n\ncreate_apple_pie(crush(a) + p)', 'a,p=map(int, input().split())\n\ndef crush(A):\n return A * 3\n\ndef create_apple_pie(piece):\n return piece // 2\n\nprint(create_apple_pie(crush(a) + p))'] | ['Wrong Answer', 'Accepted'] | ['s926071144', 's985132114'] | [2940.0, 2940.0] | [17.0, 17.0] | [144, 152] |
p03029 | u042385277 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ["A = int(input('A'))\nP = int(input('P'))\n\nP = P + 3 * A\nk = P//2\nprint(k)\n", 'A ,P = int(input()).split()\n\nP = P + 3 * A\nk = P//2\nprint(k)\n', 'A, P =map(int, input().split())\npie = (A * 3 + P)//2\nprint(pie)\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s048744036', 's730515656', 's521582947'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [73, 61, 64] |
p03029 | u051338799 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a, b = map(int, input.split())\n\na *= 3\n\nprint((a+b)//2)', 'a, b = map(int, input().split())\na *= 3\nprint((a+b)//2)'] | ['Runtime Error', 'Accepted'] | ['s785472814', 's291378886'] | [2940.0, 2940.0] | [17.0, 17.0] | [55, 55] |
p03029 | u051401873 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['import sys\n_args = sys.argv\n_A = _args[1]\n_P = _args[2]\n\nif _A > 0 :\n _P=_P+_A*3\n\n_ANS =math.floor(_P/2)\n\nprint(_ANS)', 'A, P = map(int, input().split())\nprint((A * 3 + P)//2)'] | ['Runtime Error', 'Accepted'] | ['s985578697', 's955850248'] | [2940.0, 2940.0] | [17.0, 17.0] | [120, 54] |
p03029 | u064563749 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P=map(int,input().split())\npieces=3*A+P\npies=int(pieces/2)\n', 'A,P=map(int,input().split())\npieces=3*A+P\npies=int(pieces/2)\nprint(pies)'] | ['Wrong Answer', 'Accepted'] | ['s753869572', 's376693084'] | [2940.0, 2940.0] | [17.0, 17.0] | [61, 72] |
p03029 | u065137691 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A = 0\nP = 0\nans = 0\n\nA = input("りんごの個数を入力してください。")\nP = input("りんごの破片の個数を入力してください。")\n\nA = int(A)\nP = int(P)\n \nP = (A*3) + P\nans = P / 2\n\nans = round(ans)\n\nprint(ans)\n\n', 'ans = 0\n\n\nA = int(A)\nP = int(P)\n \nP = (A*3) + P\nans = P / 2\n\nans = round(ans)\n\nprint(ans)\n\n', 'P = (A*3) + P\nans = P ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s275125166', 's853183126', 's898908543', 's902775111', 's922316553', 's654004142'] | [3060.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0, 17.0] | [236, 91, 57, 163, 150, 104] |
p03029 | u065375429 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['# A \n# Apple Pie\n\na_p = input()\n\na = a_p.split(" ")[0]\np = a_p.split(" ")[1]\n\n\n\nprint(int ((int(a) + int(p)) / 2))', '# A \n# Apple Pie\n\na_p = input()\n\na = a_p.split(" ")[0]\np = a_p.split(" ")[1]\n\nprint(int ((3* int(a) + 1 * int(p)) / 2))'] | ['Wrong Answer', 'Accepted'] | ['s620716965', 's305067412'] | [2940.0, 2940.0] | [17.0, 17.0] | [114, 119] |
p03029 | u068695365 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A = int(input())\nP = int(input())\n\nN = (A*3+P%2)//2+P//2\n\nprint(N)\n', 'A = int(input())\nP = int(input())\n\nN = (A*3+P%2)//2+P//2\n\nprint(N)', 'A = input()\nP = input()\n\nN = (A*3+P%2)//2+P//2\n\nprint(N)', 'A, P = (int(i) for i in input().split())\n \nN = (A*3+P%2)//2+P//2\n\nprint(N)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s064849421', 's118969322', 's645409835', 's493372112'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 18.0, 18.0] | [67, 66, 56, 75] |
p03029 | u079543046 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a, p = map(int, input().split())\n (a*3+p)//2\n ', 'n= int(input())\ns = [[input().split()]for i in range(n)]\ns1 = sorted(s)\nfor i in range(n):\n print(s.index(s1[i]))\n', 'a, p = map(int, input().split())\nprint((a*3+p)//2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s088681194', 's348564514', 's382862661'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0] | [46, 117, 50] |
p03029 | u081472919 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p = map(int,input(). split())\nsum = (a*3+3)/2\nprint(sum)', 'a,p = map(int,input(). split())\nprint((a*3+p)/2)', 'a,p = map(int,input().split())\nsum = (a*3+p)/2\nprint(int(sum))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s436445540', 's822473038', 's204316440'] | [8944.0, 9044.0, 9044.0] | [28.0, 29.0, 26.0] | [58, 48, 62] |
p03029 | u087218797 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A = input()\nP = input()\nans = int((int(A) * 3 + int(P))/2)\n\n\nprint(ans) ', 'apple = input()\nkakera = input()\nans = int((int(apple) * 3 + int(kakera))/2)\n\n\nprint(ans) ', 'A, P = input().strip().split()\n\nans = int((int(A) * 3 + int(P))/2)\n\n\nprint(ans) \n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s434213615', 's568106978', 's404162967'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [73, 91, 82] |
p03029 | u088208280 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['printf((3A + P)/2)', 'A, B = map(int, input().split())\nC = (3*A+B) / 2\nprint("{}".format(C))\n', 'A, B = map(int, input().split())\nprint("{}".format((3A+b)/2))', 'a, p = map(int, input().split())\nc = int((3*a+p) / 2)\nprint("{}".format(c))\n'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s026340355', 's237089424', 's621027001', 's055882495'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [18, 71, 61, 76] |
p03029 | u091817797 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A, P = map(int,input().split())\n\nprint(((3 * A + P)-((3 * A + P) % 2)) / 2)', 'A, P = map(int,input().split())\n\nprint(int(((3 * A + P)-((3 * A + P) % 2)) / 2))'] | ['Wrong Answer', 'Accepted'] | ['s258907957', 's087341426'] | [2940.0, 2940.0] | [18.0, 17.0] | [75, 80] |
p03029 | u093562214 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ["import itertools\n\nn, m = input().split()\nN = int(n)\nM = int(m)\n\nK = []\nfor i in range(M):\n K.append(list(map(int, input().strip().split(' '))))\n\nP = list(map(int, input().strip().split(' ')))\n\nSW = {0, 1}\nSWlist = list(itertools.product(SW, repeat=N))\n\nresult = 0\nfflag = False\n\nfor i in range(len... | ['Runtime Error', 'Accepted'] | ['s783268090', 's798801377'] | [3064.0, 2940.0] | [17.0, 17.0] | [608, 90] |
p03029 | u094534632 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a, p = map(int, input().split())\nnum = a*3 // p\nprint(num)', '\na, p = map(int, input().split())\nnum = (a*3 + p) // 2\nprint(num)'] | ['Runtime Error', 'Accepted'] | ['s657487563', 's171054422'] | [2940.0, 2940.0] | [18.0, 17.0] | [58, 65] |
p03029 | u096025032 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['T,O = map(int,input().split())\nT *= 3\n\nprint((T+O)/2)\n', 'T,O = map(int,input().split())\nT *= 3\n\nif (T+O) /2 > 0:\n print((T+O)/2)\nelse:\n print("0")\n', 'T,O = map(int,input().split())\nT *= 3\n\nif (T+O) /2 > 0:\n print(int((T+O)/2))\nelse:\n print("0")\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s471842185', 's881386477', 's824540938'] | [9000.0, 9012.0, 9164.0] | [25.0, 29.0, 26.0] | [54, 92, 97] |
p03029 | u098923136 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['#include <stdio.h>\n\nint main(void){\n int a;\n int p;\n \n scanf("%d",a); scanf("%d",a);\n print("%d", (a*3+p)/2);\n\n return 0;\n}', 'a,p = map(int,input().split())\nprint((a*3+p)//2)'] | ['Runtime Error', 'Accepted'] | ['s924620722', 's207090063'] | [2940.0, 3316.0] | [17.0, 21.0] | [129, 48] |
p03029 | u101113363 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P= map(int, input().split())\n\nB=P//2\n\nprint(A+B)', 'A,P= map(int, input().split())\n\nB=P//2\n\nprint(A+B)', 'A,P= map(int, input().split())\n\nB=A*3\n\n\nD=B+P\nprint(D//2)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s340532588', 's510333481', 's031228105'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [50, 50, 57] |
p03029 | u101371735 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['import sys\nA, P = map(int, input().split())\nans = (A + 3*P) // 2\n\nprint(ans)', 'import sys\nA, P = map(int, input().split())\nans = (3*A + P) // 2\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s547149083', 's475320495'] | [3060.0, 2940.0] | [20.0, 17.0] | [76, 77] |
p03029 | u102960641 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p =map(int, input().split())\nprint((a*3 + p) // 2)', 'a,p = map(int, input().split())\nprint((a * 3 + p) // 2)\n', 'a,p = map(int, input().split())\nprint((a*3+p)//2)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s170058935', 's622767779', 's771177614'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [54, 58, 49] |
p03029 | u103146596 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['n, m = map(int, input().split())\nprint(int(((n*3)+m)//3))', 'n, m = map(int, input().split())\nprint(int(((n*3)+m)//2))'] | ['Wrong Answer', 'Accepted'] | ['s667551097', 's321289775'] | [3064.0, 2940.0] | [18.0, 17.0] | [57, 57] |
p03029 | u103305058 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A,P = map(int,input(),split())\nprint((A*3+P)//2)', 'A,P = map(int,input().split())\nprint((A * 3+ P) // 2)'] | ['Runtime Error', 'Accepted'] | ['s205326565', 's050359755'] | [3060.0, 2940.0] | [20.0, 17.0] | [48, 53] |
p03029 | u104740664 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A, P = map(int, input.split(" "))\nprint((3 * A + P) // 2)\n', 'A, P = map(int, input().split(" "))\nprint((3 * A + P) // 2)\n\n'] | ['Runtime Error', 'Accepted'] | ['s942506931', 's763494718'] | [2940.0, 2940.0] | [17.0, 17.0] | [58, 61] |
p03029 | u106323230 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['# -*- coding: utf-8 -*-\n"""\nCreated on Wed Jun 5 09:53:48 2019\n\n@author: Enya\n"""\n\ninput_code = input()\nA = int(input_code.split()[0])\nP = int(input_code.split()[1])\n\nX = A*3 + P\nN = 0\n\nif A>3:\n N = A//3\n\nelse:\n N = 0\n \nprint(N)', '# -*- coding: utf-8 -*-\n"""\nCreated on Wed Jun 5 09:5... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s004249027', 's136573126', 's280288307', 's296413733', 's210260231'] | [3060.0, 2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 17.0, 17.0] | [238, 205, 212, 215, 192] |
p03029 | u106342872 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['a,p = map(int, input().split())\nprint((a*3+p)/2)\n', 'a,p = map(int, input().split())\nprint((a*3+p)//2)\n'] | ['Wrong Answer', 'Accepted'] | ['s297096931', 's034847556'] | [2940.0, 2940.0] | [17.0, 17.0] | [49, 50] |
p03029 | u109436774 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['n = int(input())\nlist_shop = []\n \nfor i in range(n):\n t = []\n a, b = input().split()\n t.append(a)\n t.append(b)\n t.append(str(i + 1))\n list_shop.append(t)\n \ncheck = 0\nc = []\n \nlist_shop = sorted(list_shop, key=lambda x: x[0])\n \nfor i in range(len(list_shop) - 1):\n if(list_shop[i][0] == list_sho... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s065979022', 's812435921', 's074604732'] | [3064.0, 3064.0, 2940.0] | [18.0, 17.0, 17.0] | [711, 204, 86] |
p03029 | u111365362 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['#17:09\nn,k = map(int,input().split())\nv = list(map(int,input().split()))\n\ncan = []\nnk = min(n,k)\nfor a in range(nk+1):\n if a != 0:\n x.append(v[a-1])\n else:\n x = []\n for b in range(nk+1-a):\n if b != 0:\n y.append(v[-b])\n else:\n y = []\n z = x + y\n z.sort()\n r = k - a -... | ['Runtime Error', 'Accepted'] | ['s662233136', 's906608347'] | [3064.0, 3316.0] | [17.0, 21.0] | [673, 63] |
p03029 | u112756259 | 2,000 | 1,048,576 | We have A apples and P pieces of apple. We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan. Find the maximum number of apple pies we can make with what we have now. | ['A = int(input())\nP = int(input())\nprint( (A*3+P)//2 )\n', "S = input()\nA,P = S.split(' ')\nprint( (int(A)*3+int(P))//2 )\n"] | ['Runtime Error', 'Accepted'] | ['s634600824', 's133623231'] | [2940.0, 2940.0] | [18.0, 17.0] | [54, 61] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.