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 |
|---|---|---|---|---|---|---|---|---|---|---|
p03088 | u795630164 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ["N = int(input())\n\nS = 'AGCT' # AGCT = 0123\nnum = [[[1]*4 for _ in range(4)] for _ in range(4)]\n\ncount = 0\nfor i in range(4, N+1):\n num_now = [[[0] * 4 for _ in range(4)] for _ in range(4)]\n for pre3 in range(4):\n for pre2 in range(4):\n for pre1 in range(4):\n for now ... | ['Wrong Answer', 'Accepted'] | ['s982257054', 's694617366'] | [3064.0, 3064.0] | [64.0, 64.0] | [872, 908] |
p03088 | u807772568 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['n = int(input())\nmemo = [{} for i in range(n+1)]\nm = 10**9+7\n\ndef ppp(l):\n for i in range(4):\n t = list(l)\n if i >= 1:\n t[i-1],t[i] = t[i],t[i-1]\n if "".join(t).count("AGC") >= 1:\n return False\n return True\ndef dfs(c,l):\n if l in memo[c]:\n r... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s408017262', 's794635895', 's992936921', 's017931751'] | [3840.0, 3064.0, 3064.0, 3880.0] | [67.0, 17.0, 18.0, 125.0] | [513, 513, 513, 509] |
p03088 | u843135954 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['import sys\nstdin = sys.stdin\n\nni = lambda: int(ns())\nna = lambda: list(map(int, stdin.readline().split()))\nnn = lambda: list(stdin.readline().split())\nns = lambda: stdin.readline().rstrip()\n\nn = ni()\nmod = 10**9+7\n\na = [1,4]\nc = [1,4]\ng = [1,4]\nt = [1,4]\n\nfor i in range(2,n):\n p = (a[i-1]+g[i-1]+c[i... | ['Wrong Answer', 'Accepted'] | ['s711695839', 's298206486'] | [3064.0, 11072.0] | [18.0, 46.0] | [518, 663] |
p03088 | u868418093 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['N , mod = int(input()) , 10**9+7\n\nmemo = [{} for i in range(N+1)]\n\ndef ok(last4):\n for i in range(4):\n t = list(last4)\n if i >= 1:\n t[i-1] ,t[i] = t[i],t[i-1]\n \n if \'\'.join(t).count("AGC") >= 1:\n return False\n return True\n\ndef dfs(cur,last3):\n ... | ['Wrong Answer', 'Accepted'] | ['s673893296', 's074109311'] | [3064.0, 3820.0] | [17.0, 130.0] | [559, 567] |
p03088 | u903596281 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['N=int(input())\nMOD=10**9+7\na=[[0 for i in range(64)] for j in range(101)]\na[3]=[1 for i in range(101)]\na[3][6],a[3][9],a[3][18]=0,0,0\nfor i in range(4,N+1):\n a[i][0]=(a[i-1][0]+a[i-1][16]+a[i-1][32]+a[i-1][48])%MOD\n a[i][1]=a[i][0]\n a[i][2]=a[i][0]\n a[i][3]=a[i][0]\n a[i][4]=(a[i-1][1]+a[i-1][17]+a[i-1]... | ['Wrong Answer', 'Accepted'] | ['s243712433', 's142538753'] | [3576.0, 3704.0] | [20.0, 20.0] | [2185, 2184] |
p03088 | u904804404 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['def checkAGC(string):\n str0 = string[0] +string[1] +string[2] +string[3]\n str1 = string[1] +string[0] +string[2] +string[3]\n str2 = string[0] +string[2] +string[1] +string[3]\n str3 = string[0] +string[1] +string[3] +string[2]\n \n if "AGC" in str0 or "AGC" in str1 or "AGC" in str2 or "AGC" in st... | ['Runtime Error', 'Accepted'] | ['s310302296', 's916037295'] | [3064.0, 14292.0] | [17.0, 170.0] | [1446, 1473] |
p03088 | u941407962 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['a,g,a_,a__,ac,ga,al=[0]*6+[1]\nfor i in range(int(input())):\n a__,a_,ac,ga,a,g,al=a_,a,a-ga,g,al,al-ac,(al*4-(ag+ac+ga+a__*3))%(pow(10,9)+7)\nprint(al)\n', "a=b=c=d=e=f=0;g=1;exec('a,b,c,d,e,f,g=b,e,e-d,f,g,g-c,g*4-b-c-d-a*3;'*int(input()));print(g%(10**9+7))"] | ['Runtime Error', 'Accepted'] | ['s370849562', 's695099410'] | [2940.0, 4468.0] | [23.0, 21.0] | [153, 102] |
p03088 | u945228737 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ["\n# import sys\n\n\n# from collections import deque\nfrom decorator import stop_watch\n\n\n@stop_watch\ndef solve(N):\n mod = 10 ** 9 + 7\n dp = [{} for _ in range(N + 1)]\n dp[0].setdefault('TTT', 1)\n\n def check(last4):\n for i in range(4):\n x = list(last4)\n if i > 0:\n ... | ['Runtime Error', 'Accepted'] | ['s080786837', 's456811150'] | [10796.0, 9608.0] | [42.0, 93.0] | [1027, 1035] |
p03088 | u957167787 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['N = int(input())\n\ndp = [[[[0 for _ in range(4)] for _ in range(4)] for _ in range(4)] for _ in range(N+1)]\nprint(dp)\n\n# dp[i][j][k][l]\n\n\n\n\ndp[0][3][3][3] = 1\nMOD = 10**9 + 7\n\nfor i in range(N):\n for j in range(4):\n for k in range(4):\n for l in range(4):\n if dp[i][j... | ['Wrong Answer', 'Accepted'] | ['s243583265', 's725001940'] | [3440.0, 3316.0] | [44.0, 42.0] | [1583, 1587] |
p03088 | u963903527 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ["n, mod = int(input()), 10 ** 9 + 7\nmemo = [{} for i in range(n+1)]\ndef check(l):\n for i in range(4):\n t = list(l)\n if i >= 1:\n t[i-1], t[i] = t[i], t[i-1] \n if ''.join(t).count('AGC') >= 1:\n return False\n return True\n\ndef dfs(cur, last3):\n if last3 in me... | ['Runtime Error', 'Accepted'] | ['s753712049', 's027258713'] | [134904.0, 3312.0] | [1849.0, 43.0] | [606, 1791] |
p03088 | u970197315 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['oteage', 'n=int(input())\nmod=10**9+7\nmemo=[{} for i in range(n+1)]\n\ndef ok(last4):\n for i in range(4):\n t=list(last4)\n if i>=1:\n t[i-1],t[i]=t[i],t[i-1]\n if "".join(t).count("AGC")>=1:\n return False\n return True\n\ndef dfs(cur,last3):\n if last3 in memo[cur]:\n return memo[cur][las... | ['Runtime Error', 'Accepted'] | ['s744068621', 's108105743'] | [2940.0, 9444.0] | [17.0, 84.0] | [6, 472] |
p03088 | u977389981 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ["N = int(input())\nmod = 10 ** 9 + 7\nD = [{} for i in range(N + 1)]\n\ndef check(last4):\n t = list(last4)\n for i in range(4):\n if i >= 1:\n t[i], t[i - 1] = t[i - 1], t[i]\n if ''.join(t).count('AGC') == 1:\n return False\n return True\n \ndef dfs(cur, last3):\n i... | ['Wrong Answer', 'Accepted'] | ['s503873196', 's166972737'] | [3920.0, 3316.0] | [106.0, 43.0] | [572, 986] |
p03088 | u989345508 | 2,000 | 1,048,576 | You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7: * The string does not contain characters other than `A`, `C`, `G` and `T`. * The string does not contain `AGC` as a substring. * The condition above cannot be violated by swapping two adjacent... | ['n=int(input())\nalph=["A","C","G","T"]\na=[alph[i]+alph[j]+alph[k] for i in range(4) for j in range(4) for k in range(4)]\nd1={l:0 for l in a}\nfor i in d1:\n if i!="AGC" and i!="ACG" and i!="GAC":\n d1[i]=1\nd2={l:0 for l in a}\nfor i in range(n-3):\n for j in d1:\n next=[j+alph[k] for k in range... | ['Runtime Error', 'Accepted'] | ['s626705060', 's864453604'] | [3064.0, 3064.0] | [17.0, 49.0] | [666, 742] |
p03096 | u013408661 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import sys\nfrom collections import Counter\np=10**9 +7\nn=int(input())\nc=[int(i) for i in sys.stdin]\ndic = dict()\nfor i in c:\n if i in dic:\n if dic[i]:\n dic[i] = False\n else:\n dic[i] = True\nnewline=[]\nstack=0\nfor i in range(n):\n k=c.pop()\n if dic[k]:\n stack=k\n co... | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s173447323', 's445378445', 's672450456', 's686597236', 's873618563', 's845203150'] | [29804.0, 15664.0, 18204.0, 3064.0, 30228.0, 18072.0] | [236.0, 265.0, 216.0, 22.0, 378.0, 223.0] | [511, 245, 313, 510, 290, 313] |
p03096 | u029169777 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import collections\nfrom fractions import Fraction\n\nN=int(input())\nbefore=0\nReversi=[]\nanswer=1\nmod=10**9+7\n\nfor _ in range(N):\n C=int(input())\n if before!=C:\n Reversi.append(C)\n before=C\n\nc=dict(collections.Counter(Reversi))\nprint(c)\n\ndef comb(n, k):\n \n if n < 0 or k < 0:\n pdt ... | ['Wrong Answer', 'Accepted'] | ['s173926164', 's355185725'] | [37608.0, 27100.0] | [2105.0, 508.0] | [570, 433] |
p03096 | u052247353 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['from collections import defaultdict\nimport itertools\nfrom functools import reduce\n\n\ndef analyze(string):\n s_count = defaultdict(int)\n for s in string:\n s_count[s] += 1\n counts = tuple(s_count.values())\n return counts\n\nN = int(input())\nstring = input()\n\ndef search(N, string):\n memo = {}\n ... | ['Wrong Answer', 'Accepted'] | ['s445310982', 's669150434'] | [3812.0, 760832.0] | [29.0, 939.0] | [1037, 475] |
p03096 | u091051505 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['mod = 10 ** 9 + 7\n\nimport copy\ncc = copy.deepcopy(c)\ncolor_sum = {i: 0 for i in range(10 ** 6)}\ndp = [1 for _ in range(n + 1)]\ncolor_sum[cc[0]] = 1\nfor i in range(2, n + 1):\n dp[i] = dp[i - 1]\n if cc[i - 2] == cc[i - 1]:\n continue\n dp[i] += color_sum[cc[i - 1]]\n dp[i] %= mod\n color_... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s158189375', 's829473481', 's291090390'] | [3444.0, 3444.0, 108980.0] | [22.0, 22.0, 863.0] | [375, 350, 428] |
p03096 | u099643902 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | [' = [0 for i in range(N)]\nalpha = {}\nfor i in range(N):\n C[i] = int(input())\n if C[i] in alpha.keys():\n alpha[C[i]].append(i)\n else:\n alpha[C[i]] = [i]\nsosu = 10 ** 9 + 7\n\ndp = [1 for i in range(N)]\nmae = C[1]\nfor i in range(2,N):\n dp[i] = dp[i-1]\n if C[i] != mae:\n nu... | ['Runtime Error', 'Accepted'] | ['s345122316', 's977581300'] | [2940.0, 52988.0] | [17.0, 712.0] | [560, 519] |
p03096 | u166306121 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N = int(input())\nC = [int(input()) for _ in range(N)]\nsubC = [-2] * (2 * 10 ** 5 + 10)\ncntC = [-1]*N\nfor num, i in enumerate(C):\n cntC[num] = subC[i]+1\n subC[i] = num\n\nprint(cntC)\n\ndp = [0] * (N + 10)\ndp[0] = 1\nfor i in range(N):\n if cntC[i] < 0 or cntC[i] == i:\n dp[i + 1] = dp[i]\n e... | ['Wrong Answer', 'Accepted'] | ['s203540158', 's127512442'] | [771396.0, 26752.0] | [994.0, 505.0] | [362, 394] |
p03096 | u187205913 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['n = int(input())\nc = [0] + [int(input()) for _ in range(200001)]\ndp = [0] * (n+1)\nnum = 1\nfor i in range(n):\n if c[i]!=c[i+1]:\n num += dp[c[i+1]]\n dp[c[i+1]] = num\nprint(num%(10**9+7))', 'n = int(input())\nc = [0] + [int(input()) for _ in range(n)]\ndp = [0] * (200001)\nnum = 1\nfor i in rang... | ['Runtime Error', 'Accepted'] | ['s347839291', 's883605589'] | [11052.0, 28552.0] | [327.0, 607.0] | [201, 199] |
p03096 | u198440493 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['mod=7+10**9\nn=int(input())\nc=[int(input()) for _ in [0]*n]\ndata=[0]*n+[1]\ndef dp(k,l):\n if data[k]>0:\n return data[k]\n if k>=n-1:\n return 1\n ans=0\n i=0\n while i<len(l):\n if l[i]==l[0]:\n j=i\n while j<len(l) and l[j]==l[0]:\n j+=1\n ... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s248141526', 's602862465', 's660428786', 's010805923'] | [13968.0, 1464972.0, 12588.0, 34024.0] | [312.0, 2197.0, 316.0, 523.0] | [431, 433, 430, 273] |
p03096 | u200785298 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['#!/usr/bin/env python3\nimport sys\n\nMOD = 1000000007 # type: int\n\ndef solve(N, C):\n last = [-1] * (N + 1)\n pairs = []\n for i, c in enumerate(C):\n try:\n prev = last[c - 1]\n except:\n if c >= N:\n return\n else:\n raise Exc... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s011421459', 's177642371', 's193260173', 's213854701', 's302161847', 's487065195', 's832548408', 's565472854'] | [31496.0, 39440.0, 31496.0, 31496.0, 31496.0, 31496.0, 31496.0, 39348.0] | [261.0, 511.0, 243.0, 244.0, 242.0, 240.0, 228.0, 524.0] | [1298, 1150, 1219, 1297, 1167, 1298, 1161, 1287] |
p03096 | u223646582 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['from collections import defaultdict\n\nN=int(input())\nC=[int(input()) for _ in range(N)]\n\nd = defaultdict(int)\n\nans=0\nfor i,c in enumerate(C):\n if i>=1 and C[i-1]==C[i]:\n continue\n else:\n ans+=d[c]\n d[c]=ans\nprint(ans)', 'from collections import defaultdict\n\nN=int(input())\nC=... | ['Wrong Answer', 'Accepted'] | ['s057102939', 's871071359'] | [29808.0, 29796.0] | [459.0, 523.0] | [243, 295] |
p03096 | u263830634 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import sys\ninput = sys.stdin.readline\n\nINF = 10 ** 9\nMOD = 10 **9 + 7\n\nN = int(input())\n\nC = [int(input()) for _ in range(N)]\nlst = [INF] * (2 * 10 ** 5 + 10) \nans = [1] * N\n \nlst[C[-1]] = N - 1\n\nfor i in range(N - 2, -1, -1):\n c = C[i]\n if lst[c] == INF or lst[c] == i + 1:\n ans[i] = ans... | ['Wrong Answer', 'Accepted'] | ['s505010763', 's519061053'] | [767016.0, 20500.0] | [2159.0, 252.0] | [464, 484] |
p03096 | u316386814 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import sys\nsys.setrecursionlimit(10**7)\nINF = 10 ** 18\nMOD = 10 ** 9 + 7\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()]\ndef LF(): return [float(x) for x in sys.stdin.readline().split()]\ndef LS(): return sys.stdin.readline().s... | ['Wrong Answer', 'Accepted'] | ['s968307827', 's569779976'] | [56016.0, 31404.0] | [2106.0, 268.0] | [891, 835] |
p03096 | u326609687 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import numpy as np\nimport sys\n\nN = int(input())\nC = []\npre = 0\nfor _ in range(N):\n c = int(sys.stdin.readline())\n if pre == c:\n continue\n else:\n C.append(c)\n pre = c\nL = len(C)\nA = np.array(C)\n\nans = 1\nf = np.ones(L + 1, dtype="int")\nfor i in range(2, L):\n ans += np... | ['Time Limit Exceeded', 'Runtime Error', 'Accepted'] | ['s308123822', 's632427288', 's268179957'] | [25416.0, 3064.0, 29804.0] | [2109.0, 17.0, 282.0] | [354, 314, 310] |
p03096 | u375616706 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N = int(input())\nC = [-1]\n\nprev = -1\nfor _ in range(N):\n c = int(input())\n if c == prev:\n continue\n else:\n C.append(c)\n prev = c\n\nMOD = 10**9+7\nn = len(C)\ndp = [0]*(n+2)\nlast = [-1]*(N*10)\ndp[0] = 1\nfor i in range(1, n+1):\n if last[C[i]] == -1:\n last[C[i]] = ... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s071486052', 's237203474', 's370612280', 's448432534', 's572337247', 's668855307', 's724311256', 's806306141', 's916592535', 's922263060', 's378943746'] | [34580.0, 20480.0, 20484.0, 22092.0, 12872.0, 20488.0, 20460.0, 14120.0, 22092.0, 20592.0, 18088.0] | [534.0, 539.0, 500.0, 533.0, 156.0, 509.0, 495.0, 390.0, 510.0, 508.0, 443.0] | [433, 422, 432, 432, 711, 427, 433, 260, 432, 428, 249] |
p03096 | u404459933 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import sys\n\n\ndef tran(A):\n temp = []\n for i in range(len(A)):\n if i == 0:\n temp += [A[i]]\n elif A[i] != A[i - 1]:\n temp += [A[i]]\n return temp\n\n\ndef find(A):\n \n dp = [1] * len(A) + [1]\n\n current_dic = {}\n\n MOD = 10**9 + 7\n\n for i in rang... | ['Wrong Answer', 'Accepted'] | ['s779264583', 's961542033'] | [54580.0, 32532.0] | [2105.0, 611.0] | [835, 851] |
p03096 | u543954314 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['#b\nimport math\ndef cc(n, r):\n return math.factorial(n) / math.factorial(n - r) / math.factorial(r)\nn = int(input())\nc = [int(input()) for _ in range(n)]\nd = dict()\ni = 1\nwhile i < n:\n if c[i] == c[i-1]:\n del c[i]\n n -= 1\n else:\n i += 1\nfor i in c:\n if i in d:\n d... | ['Wrong Answer', 'Accepted'] | ['s483924023', 's039739450'] | [29448.0, 29920.0] | [2104.0, 556.0] | [412, 415] |
p03096 | u551909378 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ["N = int(input())\nC = dict()\ni, cp, r = 0, 0, ['x'] * N\nfor _ in range(N):\n c = int(input())\n if c != cp:\n if c in C.keys():\n r[C[c]] = i\n C[c], cp = i, c\n i += 1\nlength = i\nhist, add, l, temp, ans = [0] * length, [0] * length, 0, 0, 0\nfor l in range(length):\n temp... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s306411919', 's908364750', 's423322414'] | [1395044.0, 32608.0, 761200.0] | [2189.0, 520.0, 1653.0] | [436, 514, 353] |
p03096 | u560889512 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['n=int(input())\narr=[int(input()) for _ in range(n)]\ndp=[0]*n\ndp[0]=1\nmod=10**9+7\nrecord={arr[0]:0}\nfor i,v in enumerate(arr):\n if i==0:\n continue\n dp[i]=dp[i-1]\n if record[v] and record[v]<i-1:\n dp[i]+=dp[record[v]]\n dp[i]=dp[i]%mod\nprint(dp[-1])', 'n=int(input())\narr=[int(input()) for _ in ... | ['Runtime Error', 'Accepted'] | ['s724918437', 's258483660'] | [12688.0, 36552.0] | [343.0, 530.0] | [258, 278] |
p03096 | u572144347 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N=int(input()) \nclist=[-1]\nmod=10**9+7\nfor i in range(N):\n t=int(input())\n if t==clist[-1]:\n continue\n clist.append(t)\n \ncolorlast=[-1]*(3*10**5)\nposlp=[-1]*(N+2)\n\nfor e,c in enumerate(clist,1):\n if colorlast[c]!=-1:\n poslp[e]=colorlast[c]\n colorlast[c]=e\n else:\n colorlast[c]=e\n\nd... | ['Runtime Error', 'Accepted'] | ['s230396646', 's948515332'] | [22832.0, 31644.0] | [521.0, 484.0] | [469, 1297] |
p03096 | u667024514 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['MOD = 10**9 + 7\n\nN = int(input())\nC = [int(input()) for _ in range(N)]\n\ndp = [0]*(N+1)\nlis = [-1] * (2 * 10**5 + 1)\ndp[0] = 1\nlis[C[0]] = 0\nfor i,c in enumerate(C[1:],1):\n prev_i = c_to_i[c]\n dp[i] = dp[i-1]\n if prev_i != i-1:\n dp[i] += dp[prev_i]\n dp[i] %= MOD\n lis[c] = i\n\n... | ['Runtime Error', 'Accepted'] | ['s944743334', 's963382555'] | [15660.0, 25992.0] | [336.0, 513.0] | [333, 325] |
p03096 | u678167152 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['from collections import defaultdict\nfrom bisect import *\ndef solve():\n d = defaultdict(lambda: [])\n N = int(input())\n for i in range(N):\n a = int(input())\n d[a].append(i)\n selist = []\n ends = [-1]\n for l in d.values():\n for i in range(len(l)-1):\n if l[i+1]... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s421690301', 's447319067', 's793870360', 's163902448'] | [789244.0, 2940.0, 2940.0, 52120.0] | [1418.0, 18.0, 17.0, 919.0] | [804, 828, 828, 729] |
p03096 | u757446793 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['# coding: utf-8\n# Your code here!\n\nN = int(input())\nC = []\n\nprev = -1\n\nfor _ in range(N):\n tmp = int(input())\n if tmp != prev:\n C.append(tmp)\n prev = tmp\n\ndp = [0]*(len(C)+1)\nplace = {}\ndp[0] = 1\n\nfor i in range(len(C)):\n if place.get(C[i]) != None:\n dp[i+1] = dp[i] + dp[... | ['Wrong Answer', 'Accepted'] | ['s781876777', 's362866924'] | [99804.0, 760084.0] | [2104.0, 1174.0] | [413, 399] |
p03096 | u771532493 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N=int(input())\nlst=[0]\nmod=10**9+7\n\nfor i in range(N):\n a=int(input())\n if lst[-1]==a:\n continue\u3000\n else:\n lst.append(a)\n\n \nlength=len(lst)\n\n\n\nL=[0]*(2*10**5+1)\nDP=[0]*(length-1)\nDP.insert(0,1)\nfor i in range(1,length):\n if L[lst[i]]==0:\n DP[i]=DP[i-1]%mod\n L[lst[i]]=i\n ... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s150076537', 's853298566', 's593509291'] | [3192.0, 3064.0, 20500.0] | [19.0, 18.0, 519.0] | [764, 761, 361] |
p03096 | u794173881 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import bisect\nn = int(input())\nc = [int(input()) for i in range(n)]\n\nans = 1\nli = [[] for i in range(9)]\nfor i in range(n):\n if not li[c[i]]:\n li[c[i]].append(i)\n else:\n# if li[c[i]] != li[c[i]][-1]\n\n li[c[i]].append(i)\n ans += len(li[c[i]]) - 1\n# for j in range(9):\n# ans += len()... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s233027834', 's502372747', 's510320726', 's709754753'] | [12584.0, 12644.0, 30308.0, 36552.0] | [410.0, 455.0, 2105.0, 614.0] | [350, 363, 749, 556] |
p03096 | u798818115 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['# coding: utf-8\n# Your code here!\n\n\nN=int(input())\n\nC=[0]*2*10**5\n\nans=1\npre=-1\n\n\nfor _ in range(N):\n c=int(input())\n if pre!=c:\n ans+=C[c]\n C[c]+=1*ans\n pre=c\n print(ans,C[:10])\n#print(ans)\n \n', '# coding: utf-8\n# Your code here!\nN=int(input())\n\nl=[0]*2*10**5\nk=... | ['Runtime Error', 'Accepted'] | ['s288262139', 's478654670'] | [136448.0, 22236.0] | [2105.0, 1099.0] | [263, 358] |
p03096 | u825378567 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N=int(input())\nl=[]\nl_value=[]\ni=0\nstack=-1\nfor i in range(N):\n if i <= N:\n stack=input()\n l.append(stack)\nlist_simple=[]\nfor i in l:\n if stack != i:\n list_simple.append(i)\ndp_dict=[]\ndp=1\nfor i in list_simple:\n if c not in dp_dict:\n dp_dict[c] = 0\n dp = dp_di... | ['Runtime Error', 'Accepted'] | ['s772988170', 's375937494'] | [17336.0, 34988.0] | [327.0, 600.0] | [340, 315] |
p03096 | u846150137 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['r=range(int(input()))\nA=[int(input()) for i in r]\nS=[0 for i in r]\nE=[0 for i in r]\nsb=set()\nsf=set()\nfor i in r:\n ab=A[-(i+1)]\n if ab in sb and ab !=anb:\n S[-(i+1)]=1\n sb |= {ab}\n anb=ab\n\n af=A[i]\n if af in sf and af !=anf:\n E[i]=1\n sf |= {af}\n anf=af\ner=0\nans=0\nc=1\nfor i in r:\n ... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s015056149', 's112086377', 's239601759', 's005727124'] | [34648.0, 27104.0, 27100.0, 31584.0] | [2104.0, 478.0, 473.0, 445.0] | [384, 174, 169, 186] |
p03096 | u860002137 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['import numpy as np\n\nn = int(input())\nc = np.array([int(input()) for _ in range(n)])\n\nMOD = 10**9 + 7\n\n\ndp = np.zeros(n, dtype=np.int64)\ndp[0] = 1\n\nused = np.full(c.max() + 1, -1, dtype=np.int64)\n\nfor i in range(1, n):\n if used[c[i]] == -1:\n dp[i] = dp[i - 1]\n else:\n dp[i] = (dp[i ... | ['Wrong Answer', 'Accepted'] | ['s852384432', 's613688956'] | [36596.0, 39248.0] | [652.0, 677.0] | [379, 492] |
p03096 | u879870653 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N = int(input())\nL = [int(input()) for i in range(N)]\n\nans = 1\n\nD = {}\nfor i in range(N) :\n if str(L[i]) not in D :\n D[str(L[i])] = 1\n else :\n if L[i-1] == L[i] :\n ans += (D[str(L[i])]-1)\n D[str(L[i])] += 1\n else :\n ans += D[str(L[i])]\n ... | ['Wrong Answer', 'Accepted'] | ['s557997111', 's088497393'] | [39152.0, 761528.0] | [604.0, 968.0] | [354, 425] |
p03096 | u940990031 | 2,000 | 1,048,576 | There are N stones arranged in a row. The i-th stone from the left is painted in the color C_i. Snuke will perform the following operation zero or more times: * Choose two stones painted in the same color. Repaint all the stones between them, with the color of the chosen stones. Find the number of possible final s... | ['N = int(input())\nC = [int(input()) for _ in range(N)]\nC = [x for (x,y) in zip(C[:-1], C[1:]) if x!=y] + [C[-1]]\n\nSUM = 1\nDP_dict = {}\n\nfor c in C:\n if c in DP_dict.keys():\n SUM += DP_dict[c] = SUM\n DP_dict[c] = SUM\n\nprint(SUM % (10**9+7))', 'N = int(input())\nC = [int(input()) for _ in range(N)]\nC =... | ['Runtime Error', 'Accepted'] | ['s437949569', 's079623357'] | [2940.0, 32420.0] | [17.0, 605.0] | [243, 237] |
p03101 | u003501233 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=input().split()\nh,w=input().split()\n\nans=(H-h)*(W-w)\n\nprint(ans)', 'H,W=int(input().split())\nh,w=int(input().split())\n\nans=(H-h)*(W-w)\n\nprint(ans)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\n\nans=(H-h)*(W-w)\n\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s668773304', 's946919960', 's286475167'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [68, 78, 86] |
p03101 | u006721330 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['N, M = map(int, input().split())\ndrink = []\ncost = 0\ncount = 0\nd_count = 0\nrest = 0\n\n\nfor _ in range(N):\n Drink = list(map(int, input().split()))\n drink.append(Drink)\n drink.sort()\n\nfor i in range(N):\n cost += drink[i][0] * drink[i][1]\n d_count += drink[i][1]\n count += 1\n if d_co... | ['Runtime Error', 'Accepted'] | ['s607938657', 's842914433'] | [3064.0, 3064.0] | [17.0, 17.0] | [473, 102] |
p03101 | u006883624 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = map(int, input().split())\nh, w = map(int, input().split())\n\nprintf((H - h) * (W - w))', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\n\nprint((H - h) * (W - w))\n'] | ['Runtime Error', 'Accepted'] | ['s071290404', 's806318618'] | [3060.0, 2940.0] | [17.0, 17.0] | [92, 92] |
p03101 | u007851617 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(h * W + w * H - h * w)', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(h * w - (h * W + w * H - h * w))\n', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(H * W - (h * W + w * H - h * w))... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s345147744', 's364600979', 's149800628'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [94, 105, 105] |
p03101 | u020292898 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['i = list()\nfor x in range(2):\n i.append(map(int,input().split()))\nprint(i[0][0]-i[1][0])*(i[0][1]-i[1][1])', 'i = list()\nfor x in range(2):\n i.append(map(int,input().split()))\nreturn (i[0][0]-i[1][0])*(i[0][1]-i[1][1])', 'i = list()\nfor x in range(2):\n i.append([int(x) for x in input().split()])\nprint((i[... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s672387189', 's686288679', 's378496566'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [107, 109, 118] |
p03101 | u020812754 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['#coding:utf-8\n\nH, W = input().split()\nh, w = input().split()\n\nans = (H - h) * (W - w)\nprint(ans)', '#coding:utf-8\n\nH, W = input().split()\nh, w = input().split()\n\nfor s in [H,W,h,w]:\n s = int(s)\n print(type(s))\n\nans = (H - h) * (W - w)\nprint(ans)', '#coding:utf-8\n\nH, W = input().split()\nh, w =... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s495411098', 's655411309', 's657450275', 's274444776'] | [2940.0, 3060.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0, 18.0] | [96, 151, 128, 116] |
p03101 | u021657949 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input(),split())\nprint((H-h)*(W-w))', 'H,W=map(int,input().split())\nh,w=map(int,input(),split())\nprint((H-h)*(W-w))', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s713417947', 's856380915', 's259746280'] | [9104.0, 9148.0, 9080.0] | [21.0, 27.0, 28.0] | [76, 76, 76] |
p03101 | u021770165 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint((H*W)-(h*w))', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint((H-h)*(W*w))', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nx = H*W- h*w\nprint(x)', 'H,W = map(int,input().split())\nh,w = map(int,input().sp... | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s036630395', 's096494534', 's155560875', 's611072138', 's946159491', 's964536162'] | [9168.0, 9100.0, 9008.0, 9136.0, 9080.0, 9140.0] | [26.0, 26.0, 31.0, 31.0, 33.0, 25.0] | [80, 80, 83, 81, 86, 80] |
p03101 | u023077142 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['from itertools import combinations, product\n\n\ndef gcd(a, b):\n if a < b:\n a, b = b, a\n while b != 0:\n a, b = b, a % b\n return a\n\ndef lcm(a, b):\n return a * b // gcd(a, b)\n\n\ndef get(fmt):\n ps = input().split()\n r = []\n for p, t in zip(ps, fmt):\n if t == "i":\n... | ['Wrong Answer', 'Accepted'] | ['s101366594', 's909516670'] | [3064.0, 3064.0] | [18.0, 18.0] | [763, 763] |
p03101 | u024807881 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['lh, lw = input().split()\nh, w = input().split()\n\nprint(lh * lw - lh * w - lw * h + h + w)\n', 'lh, lw, h, w = map(int, open(0).read().split())\nprint((lh - h) * (lw - w))\n'] | ['Runtime Error', 'Accepted'] | ['s628387371', 's865398858'] | [2940.0, 2940.0] | [17.0, 17.0] | [90, 75] |
p03101 | u027675217 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int, input().split())\nh1,w1 = map(int, input().split())\nsum = H*h1\nsum1 = W*w1\nsum2 = h1*w1\nans = sum+sum1-sum2\nprint(H*W-ans)\n', 'H,W = map(int, input().split())\nh1,w1 = map(int, input().split())\nsum = H-h1\nsum1 = W-w1\n\n\nprint(sum*sum1)\n'] | ['Wrong Answer', 'Accepted'] | ['s408970537', 's164277617'] | [3064.0, 2940.0] | [17.0, 17.0] | [137, 107] |
p03101 | u029234056 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['A,B=map(int,input().split())\ndef calc(A):\n if A%4==0:\n return A\n elif A%4==1:\n return 1\n elif A%4==2:\n return A+1\n else:\n return 0\nprint(calc(A-1)^calc(B))\n', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Wrong Answer', 'Accepted'] | ['s902979165', 's452616654'] | [2940.0, 2940.0] | [18.0, 17.0] | [196, 76] |
p03101 | u031852574 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b = map(int,input().split())\nprint((a-1) * (b-1))', 'H,W = map(int,input().split())\nh,w = [int(i) for i in input().split()]\nn = (H-h) * (W-w)\nprint(n)\n'] | ['Wrong Answer', 'Accepted'] | ['s892054092', 's594463786'] | [9044.0, 9152.0] | [28.0, 30.0] | [51, 98] |
p03101 | u032955959 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().solit())\nh,w=map(int,input().split())\n\nprint(h*W+H*w-h*w)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\n\nprint(h*W+H*w-h*w)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\n\nprint(H*W-h*W+H*w-h*w)\n', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\n... | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s383848178', 's586149974', 's905856032', 's001258019'] | [2940.0, 2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0, 18.0] | [77, 77, 82, 82] |
p03101 | u037221289 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ["H,W = map(int, input().split(','))\nh,w = map(int, input().split(','))\nprint((H-h)*(W-w))", "H,W = map(int, input().split(' '))\nh,w = map(int, input().split(' '))\nprint((H-h)*(W-w))"] | ['Runtime Error', 'Accepted'] | ['s101802042', 's779868772'] | [2940.0, 2940.0] | [17.0, 17.0] | [88, 88] |
p03101 | u039360403 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b=map(int,input().split())\nc,d=map(int,input().split())\nprint(a*b-c*d)\n', 'a,b=map(int,input().split())\nc,d=map(int,input().split())\nprint(a*b-c*b-d*a+c*d)\n'] | ['Wrong Answer', 'Accepted'] | ['s202250164', 's031974720'] | [2940.0, 2940.0] | [18.0, 17.0] | [73, 81] |
p03101 | u043236471 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = [int(i) for input().split()]\nbh, bw = [int(i) for input().split()]\n\nres = (H * W) - ((bh*W) + (bh*H) - (bh*bw))\n\nprint(res)', 'H, W = [int(i) for i in input().split()]\nbh, bw = [int(i) for i in input().split()]\n\nres = (H * W) - ((bh*W) + (bw*H) - (bh*bw))\n\nprint(res)'] | ['Runtime Error', 'Accepted'] | ['s764158780', 's603590269'] | [2940.0, 2940.0] | [17.0, 18.0] | [130, 140] |
p03101 | u044442911 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['if __name__ == "__main__":\n list_1=input("数字を入力:").split()\n H=int(list_1[0])\n W=int(list_1[1])\n\n list_2=input("数字を入力:").split()\n h=int(list_2[0])\n w=int(list_2[1])\n \n Ans = (H-h)*(W-w)\n print(Ans)\n pass', 'if __name__ == "__main__":\n list_1=input("数字を入力:").split()\n H=i... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s536463765', 's998313487', 's114296716'] | [3060.0, 3064.0, 2940.0] | [17.0, 18.0, 17.0] | [256, 247, 169] |
p03101 | u050708958 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(min([(H-h) * (W-w), 0]))', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint((H-h) * (W-w))\n'] | ['Wrong Answer', 'Accepted'] | ['s362177142', 's101930250'] | [2940.0, 2940.0] | [17.0, 17.0] | [96, 87] |
p03101 | u054825571 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H*w+W*h-h*w)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H*W-(H*w+W*h-h*w))'] | ['Wrong Answer', 'Accepted'] | ['s070965857', 's767138290'] | [8960.0, 9056.0] | [27.0, 28.0] | [76, 82] |
p03101 | u058592821 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a, b = (int(i) for i in input().split())\nc, d = (int(i) for i in input().split())\n\nprint(a*b - c*a - d*b + c*d)', 'a, b = (int(i) for i in input().split())\nc, d = (int(i) for i in input().split())\n\nprint(a*b - b*c - a*d + c*d)'] | ['Wrong Answer', 'Accepted'] | ['s775341153', 's709671721'] | [2940.0, 2940.0] | [18.0, 17.0] | [111, 111] |
p03101 | u059436995 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W =int(input().split())\nh, w =int(input().split())\nprint((H-h)*(W-w))', 'H, W =[int(i) for i in input().split()]\nh, w =[int(i) for i in input().split()]\nprint((H-h)*(W-w))'] | ['Runtime Error', 'Accepted'] | ['s921221803', 's580784456'] | [2940.0, 2940.0] | [18.0, 17.0] | [72, 98] |
p03101 | u060569392 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=list(map(int,input().split()))\nh,w=list(map(int,input().split()))\n\nanswer=(H-h)-(W-w)\n\nprint(answer)', 'H,W=list(map(int,input().split()))\nh,w=list(map(int,input().split()))\n\nanswer=(H*h)-(W*w)\n\nprint(answer)', 'H,W=list(map(int,input().split()))\nh,w=list(map(int,input().split()))\n\nanswer=(H-h)*(W-w)... | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s271573208', 's905978524', 's408896335'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [104, 104, 104] |
p03101 | u062706707 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['#B\ncount = 0\nn,m,c = map(int, input().split())\nb = list(map(int, input().split()))\nfor i in range(n):\n a = list(map(int, input().split()))\n ab=0\n for j in range(n):\n ab = a[j] * b[j]\n if -c<ab:\n count += 1\nprint(count)', '#A\nH,W = map(int, input().split())\nh,w = map(int, input()... | ['Runtime Error', 'Accepted'] | ['s098343528', 's085504899'] | [3060.0, 2940.0] | [17.0, 18.0] | [244, 86] |
p03101 | u064246852 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint(H*W-h*W-wH+h*w)', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint(H*W-h*W-w*H+h*w)'] | ['Runtime Error', 'Accepted'] | ['s937913399', 's176952024'] | [2940.0, 2940.0] | [17.0, 17.0] | [83, 84] |
p03101 | u066692421 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = map(int,input().split())\nh, w = map(int,input().split())\nprint(H * w + h * W - h * w)', 'H, W = map(int,input().split())\nh, w = map(int,input().split())\nprint(H * W - H * w - h * W + h * w)'] | ['Wrong Answer', 'Accepted'] | ['s261652914', 's612844048'] | [2940.0, 2940.0] | [17.0, 17.0] | [92, 100] |
p03101 | u069602573 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['import math\n\na, b = map(int, input().split()) \n\nA = list()\nB = list()\n\nif b == 0:\n B = [0]\nelif b == 1:\n B = [1]\nelse:\n for i in range(1, int(math.log2(b))+2):\n tmp = b // (2 ** i) * 2 ** (i - 1)\n\n if b % (2 ** i) < (2 ** (i-1)):\n plus = 0\n else:\n ... | ['Wrong Answer', 'Accepted'] | ['s306397444', 's603903833'] | [3064.0, 2940.0] | [17.0, 17.0] | [897, 129] |
p03101 | u079022116 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['A,B=map(int,input().split())\na,b=map(int,input().split())\nprint(a*b-((A-a)*b+(B-b)*a))', 'A,B=map(int,input().split())\na,b=map(int,input().split())\nprint(A*B-((A-a)*b+(B-b)*a))', 'A,B=map(int,input().split())\na,b=map(int,input().split())\nprint((A*B)-(a*b+(A-a)*b+(B-b)*a))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s320911115', 's571803364', 's339217634'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [86, 86, 92] |
p03101 | u081688405 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['N, M = map(int, input().split(" "))\nstores = dict()\np = 10000000000\n\nfor i in range(N):\n if 1 in stores and stores[1] >= M:\n break\n Ai, Bi = map(int, input().split(" "))\n if Ai in stores:\n stores[Ai] += Bi\n else:\n stores[Ai] = Bi\n p = min(p, Ai)\n\n\nprice = 0\nwhile True... | ['Runtime Error', 'Accepted'] | ['s575984879', 's864306207'] | [3064.0, 2940.0] | [18.0, 17.0] | [496, 94] |
p03101 | u085334230 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int,input())\nh,w = map(int,input())\nprint(int(H * W - h * w))', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint(int(H * W - h * w))\n', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nA = H - h\nB = W - w\nprint(int(A * B))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s188917654', 's998614920', 's575924844'] | [2940.0, 2940.0, 2940.0] | [17.0, 18.0, 17.0] | [71, 88, 100] |
p03101 | u088020258 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H-h*W-w)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Wrong Answer', 'Accepted'] | ['s109793708', 's381057192'] | [2940.0, 2940.0] | [17.0, 18.0] | [72, 76] |
p03101 | u088974156 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H*W-(H-h)*(W*w))', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Wrong Answer', 'Accepted'] | ['s126647878', 's901442130'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 76] |
p03101 | u090032260 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b = map(int,input().split())\nc,d = map(int,input().split())\nprint(a*b-c*d)', 'H=input()\nW=input()\nh=input()\nw=input()\n\nH=int(H)\nW=int(W)\nh=int(h)\nw=int(w)\n\nprint(H*W-w*H-h*W+w*h)', 'H=input()\nW=input()\nh=input()\nw=input()\n\nH=int(H)\nW=int(W)\nh=int(h)\nw=int(w)\n\nprint(HW-wH-hH-wh)', 'a,b = map(in... | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s110015005', 's233774438', 's488408378', 's345800079'] | [2940.0, 3060.0, 3060.0, 2940.0] | [17.0, 17.0, 17.0, 17.0] | [76, 100, 96, 80] |
p03101 | u090046582 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H1, W1 = map(int, input().split())\nH2, W2 = map(int, input().split())\n\nH=H1-H2\nW=W1-W2\n\nprint(HW)', 'H1, W1 = map(int, input().split())\nH2, W2 = map(int, input().split())\n\nH=H1-H2\nW=W1-W2\n\nprint(H*W)'] | ['Runtime Error', 'Accepted'] | ['s097862846', 's726711263'] | [9008.0, 9164.0] | [24.0, 28.0] | [97, 98] |
p03101 | u095426154 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b=map(int,input().split())\nj=0\nwhile b>=2**j:\n j+=1\nk=1\nl=[0 for i in range(j)]\nbia=[0 for i in range(j)]\nA=a\ni=0\nwhile A>2**(k-1):\n l[i]=A%(2**k)\n m=(l[i]-2**(k-1))\n if m<=0:\n bia[i]=0\n else:\n if m%2==1:\n bia[i]=1\n else:\n bia[i]=0\n k+=... | ['Runtime Error', 'Accepted'] | ['s259153973', 's123569835'] | [3184.0, 2940.0] | [17.0, 17.0] | [763, 98] |
p03101 | u099566485 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['#121-A\ndef IL(): return list(map(int,input().split()))\ndef SL(): return input().split()\ndef I(): return int(input())\ndef S(): return list(input())\nH,W=IL()\nh,w=IL()\nprint(H*W-h*w)', '#121-A\ndef IL(): return list(map(int,input().split()))\ndef SL(): return input().split()\ndef I(): return int(input())\ndef S()... | ['Wrong Answer', 'Accepted'] | ['s092969057', 's008546131'] | [3060.0, 3060.0] | [17.0, 17.0] | [179, 183] |
p03101 | u101201569 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['import numpy as np\nN,M = map(int,input().split())\nA_s = []\nfor _ in range(N):\n A_s.append(list(map(int,input().split())))\n\nA_s = sorted(A_s,key=lambda x:x[0])\nmoney = 0\nnum = 0\npre_num = 0\nfor a_s in A_s:\n num += a_s[1]\n if num <= M:\n money += a_s[1] * a_s[0]\n pre_num += a_s[1]\n else:\n mo... | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s050564914', 's429876664', 's959030395', 's304609119'] | [12496.0, 12508.0, 12500.0, 12508.0] | [148.0, 149.0, 148.0, 150.0] | [392, 284, 520, 290] |
p03101 | u102461423 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int, input().split())\nh,w = map(int, input().split())\nanswer = (H-h)*(W-w)\nprint(ans)', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nans = (H-h)*(W-w)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s451783858', 's124576514'] | [2940.0, 2940.0] | [18.0, 18.0] | [95, 90] |
p03101 | u103902792 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int,input().split)\nh,w = map(int,input().split)\nprint((H-h)*(W-w))\n', 'a,b = map(int,input().split)\nh,w = map(int,input().split)\nprint(a*b -a*w-b*h+h*w)\n', 'a,b = map(int,input().split)\nh,w = map(int,input().split)\nprint((a-h)*(b-w))\n', 'a,b = map(int,input().split)\nprint(a*b -a-b+1)', 'H,W = map(... | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s045356273', 's046902621', 's904969079', 's964930196', 's374743269'] | [2940.0, 2940.0, 2940.0, 2940.0, 2940.0] | [18.0, 17.0, 17.0, 17.0, 17.0] | [77, 82, 77, 46, 81] |
p03101 | u106207585 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['# -*- coding: utf-8 -*-\nH, W = map(int, input().split())\nh, w = map(int, input().split())\nprint((H-h)*(W-w)\n', '# -*- coding: utf-8 -*-\nH, W = map(int, input().split())\nh, w = map(int, input().split())\nprint((H-h)*(W-w))\n'] | ['Runtime Error', 'Accepted'] | ['s363095876', 's360550909'] | [2940.0, 2940.0] | [17.0, 17.0] | [108, 109] |
p03101 | u108934099 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W = map(int,input().split())\nh,w = = map(int,input().split())\nprint((H-h)*(W-w))', 'H,W = map(int,input().split())\nh,w = map(int,input().split())\nprint((H-h)*(W-w))'] | ['Runtime Error', 'Accepted'] | ['s760451556', 's501266339'] | [8940.0, 9116.0] | [26.0, 32.0] | [82, 80] |
p03101 | u112318601 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ["H,W = list(map(int, input().split(' '))\nh,w = list(map(int, input().split(' '))\nprint((H-h)*(W-w))", "H,W = list(map(int, input().split(' ')\nh,w = list(map(int, input().split(' ')\npritn((H-h)*(W-w))", "H,W = list(map(int, input().split(' ')))\nh,w = list(map(int, input().split(' ')))\nprint((H-h)*(W-w))"] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s451197379', 's493975837', 's013997354'] | [2940.0, 2940.0, 2940.0] | [18.0, 17.0, 18.0] | [98, 96, 100] |
p03101 | u112766430 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a = list(map(int,inputr().split()))\nb = list(map(int,inputr().split()))\nprint((a[0]-b[0])*(a[1]-b[1]))', 'a = list(map(int,input().split()))\nb = list(map(int,input().split()))\nprint((a[0]-b[0])*(a[1]-b[1]))'] | ['Runtime Error', 'Accepted'] | ['s290054495', 's423434578'] | [2940.0, 2940.0] | [17.0, 17.0] | [102, 100] |
p03101 | u113971909 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Runtime Error', 'Accepted'] | ['s356729446', 's136842333'] | [2940.0, 2940.0] | [17.0, 17.0] | [80, 76] |
p03101 | u117193815 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b = map(int, input().split())\nc,d = map(int, input().split())\ni=a*b\nprint(i-(a-c)*(b-d))', 'H,W = map(int, input().split())\nh,w = map(int, input().split())\nprint((H*W)-((W*h)+(w*(H-h))))'] | ['Wrong Answer', 'Accepted'] | ['s082844694', 's707935447'] | [2940.0, 2940.0] | [17.0, 17.0] | [90, 94] |
p03101 | u120485519 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['s = [input().split() for i in range(2)]\nprint(s)\n\na, b, c, d = int(s[0][0]), int(s[0][1]), int(s[1][0]), int(s[1][1])\n\nsum_cells_count = a * b\nrow_cells_count = b * c\ncol_cells_count = (a - c) * d\n\nfilled_cells_count = row_cells_count + col_cells_count\n\nblank_cells_count = sum_cells_count - filled_cells_co... | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s314136326', 's584201902', 's725689806', 's868937028', 's112548380'] | [3060.0, 3060.0, 3060.0, 3060.0, 3060.0] | [17.0, 17.0, 17.0, 18.0, 17.0] | [336, 259, 329, 319, 327] |
p03101 | u121732701 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['# -*- coding: utf-8 -*-\n"""\nCreated on Sat Mar 9 21:40:34 2019\n\n@author: iwata\n"""\n\nN,M = map(int, input().split())\nnumlist =[]\nmoney = 0\ncount = 0\ncount1 = 0\ncount2 = 0\n\nfor i in range(N):\n AB = list(map(int, input().split()))\n numlist.append(AB)\n\nnumlist.sort()\n\nwhile count <= M:\n whi... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s785620840', 's957723618', 's525478717'] | [3064.0, 3064.0, 2940.0] | [17.0, 17.0, 18.0] | [525, 523, 186] |
p03101 | u123745130 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W =map(int,input().split()) \nh,w =map(int,input().split()) \nprint((H-w)*(W-w))', 'h =lambda :map(int,input().split()) \nH,W =h()\nh,w =h()\nprint((H-h)*(W-w))'] | ['Wrong Answer', 'Accepted'] | ['s280822656', 's922460003'] | [2940.0, 2940.0] | [17.0, 18.0] | [80, 73] |
p03101 | u125433590 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['n,m,c = map(int,input().split())\ninput_b = map(int,input().split())\na_list=[input() for i in range(n)]\naa_list=map(int,a_list.split())\nfor i in range(n):\n answer = c\n count = 0\n lista_item = aa_list[i]\n for j in range(m):\n answer += input_b[m] * lista_item[m]\n if answer > 0\n count+=1\nprint coun... | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s426116773', 's706233919', 's923626216'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 19.0] | [307, 297, 85] |
p03101 | u126638447 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\nimport numpy as np\n\nN_s, M_s, C_s = input().split()\nN = int(N_s)\nM = int(M_s)\nC = int(C_s)\n\nB = [int(i) for i in input().split()]\nA = []\nfor rows in range(0,N):\n tmp = [int(i) for i in input().split()]\n A.append(tmp)\n\nB_array = np.array(B)\nA_array =... | ['Runtime Error', 'Accepted'] | ['s725801607', 's916376991'] | [12496.0, 3060.0] | [149.0, 17.0] | [370, 317] |
p03101 | u127499732 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H*W-h*W-w*H+2*h*w)', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint(H*W-h*W-w*H+h*w)'] | ['Wrong Answer', 'Accepted'] | ['s747134159', 's653820907'] | [2940.0, 2940.0] | [17.0, 17.0] | [82, 80] |
p03101 | u128539234 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['hP,wP = map(int,input().split())\nhC,wC = map(int,input().split())\n\nans = hP * wP\nans -= (hP+wP-1)\n\nprint(ans)', 'H,W = map(int,input().split())\nh,w = map(int,input().spilt())\n\nans = h*W + w*H - h*w\nprint(ans)', 'H,W = map(int, input().split())\nh,w = map(int, input().split())\n\n\nprint(H*W - h*W - w*H + h*... | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s222419523', 's298924390', 's984400739'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [109, 95, 94] |
p03101 | u130900604 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H,W=map(int,input())\nh,w=map(int,input())\nprint((H-h)*(W-w))', 'H,W=map(int,input().split())\nh,w=map(int,input().split())\nprint((H-h)*(W-w))'] | ['Runtime Error', 'Accepted'] | ['s688686123', 's939086490'] | [2940.0, 2940.0] | [17.0, 17.0] | [60, 76] |
p03101 | u131264627 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint((H - h) + (W - w))', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(h * W + H * w - h * w)', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\nprint(int((H - h) * (W - w)))'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s533088767', 's759740724', 's360466955'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [90, 94, 95] |
p03101 | u146767117 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H=int(input())\nW=int(input())\nh=int(input())\nw=int(input())\n\na = (H-h) * (W-w)\nprint(a)', 'H, W = map(int, input().split())\nh, w = map(int, input().split())\na = (H-h) * (W-w)\nprint(a)'] | ['Runtime Error', 'Accepted'] | ['s951446817', 's977838239'] | [2940.0, 2940.0] | [17.0, 17.0] | [87, 92] |
p03101 | u152638361 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['H, W =map(int,input().split())\nh, w =map(int,input().split())\nprint(H*W-h-w+1)', 'H, W =map(int,input().split())\nh, w =map(int,input().split())\nprint(H*W-h*W-w*H+h*w)'] | ['Wrong Answer', 'Accepted'] | ['s483384630', 's158865885'] | [2940.0, 2940.0] | [17.0, 17.0] | [78, 84] |
p03101 | u153419200 | 2,000 | 1,048,576 | There are H rows and W columns of white square cells. You will choose h of the rows and w of the columns, and paint all of the cells contained in those rows or columns. How many white cells will remain? It can be proved that this count does not depend on what rows and columns are chosen. | ['a,b=map((int,input()).split())\nc,d=map((int,input()).split())\nprint(a*b-c*b-d*a)', 'a,b=map(int,input().split())\nc,d=map(int,input().split())\nprint((a-c)*(b-d))\n'] | ['Runtime Error', 'Accepted'] | ['s229107924', 's012095530'] | [3064.0, 2940.0] | [16.0, 17.0] | [80, 77] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.