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
p03282
u978167553
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
["s = input()\nk = input()\n\nans = '1'\nfor c in k:\n if c != '1':\n ans = c\n break\nprint(ans)\n", "s = input()\nk = input()\n\nans = '1'\nfor i in range(k):\n if k[i] != '1':\n ans = k[i]\n break\nprint(ans)\n", "s = input()\nk = int(input())\n\nans = '1'\nfor i in range(k):\n i...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s191187750', 's580190966', 's714802633']
[9068.0, 9092.0, 9156.0]
[30.0, 24.0, 30.0]
[105, 118, 123]
p03282
u978313283
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['S=list(input())\nK=int(input())\nl=0\nfor i in range(len(S)):\n if S[i]==1:\n l+=1\n else:\n a=S[i]\n break\nif l>=K:\n print(1)\nelse:\n print(a)\n', "S=list(input())\nK=int(input())\nl=0\nfor i in range(len(S)):\n if S[i]=='1':\n l+=1\n else:\n a=S[i]\n br...
['Wrong Answer', 'Accepted']
['s330726202', 's628090355']
[2940.0, 2940.0]
[18.0, 17.0]
[168, 170]
p03282
u978494963
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
["def main():\n S = map(int,list(input()))\n K = int(input())\n for i,n in enumerate(S):\n if n == 1:\n K -= n\n if K>0:\n return n\n else:\n return 1\n return 1\n\nif __name__ == '__main__':\n print(main())\n", "def main():\n S = map(int,list(input()))\n K = int(input())\n for i,n in en...
['Wrong Answer', 'Accepted']
['s439292908', 's099319302']
[2940.0, 2940.0]
[19.0, 17.0]
[222, 237]
p03282
u982945424
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
["S = input()\nK = int(input())\ns = len(str(S))\nl = [str(x) for x in S]\ni = 0\nwhile i <= s - 1:\n if l[i] == '1':\n i = i + 1\n else:\n break\n\nif i == 100:\n print(1)\nif K < 99:\n print(l[K-1])\nelse:\n print(l[i-1])", "S = input()\nK = int(input())\ns = len(str(S))\nl = [str(x) for x in S]\ni = 0\nwh...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s019456930', 's241141520', 's322985036', 's431490925', 's515801932', 's575220082', 's585717827', 's906081960', 's185903869']
[3064.0, 3060.0, 2940.0, 3060.0, 3060.0, 2940.0, 3060.0, 3060.0, 2940.0]
[17.0, 18.0, 23.0, 17.0, 17.0, 17.0, 17.0, 17.0, 17.0]
[216, 217, 155, 217, 187, 150, 150, 185, 156]
p03282
u983853152
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
["\ndef main():\n S = input()\n K = input()\n\n cnt = 0\n while S[cnt]=='1':\n cnt = cnt + 1\n \n if K<=cnt:\n print(S[0])\n else:\n print(S[cnt+1])\n\n\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n S = input()\n K = int(input())\n\n cnt = 0\n w...
['Runtime Error', 'Accepted']
['s056001730', 's374024046']
[2940.0, 3060.0]
[17.0, 18.0]
[221, 282]
p03282
u983918956
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['S = list(input())\nK = int(input())\n# 5000000000000000 = 5 * 10**15\nS = [int(e) for e in set(S)]\nnumber = 0\ndays = 5 * 10**15\nfor e in S:\n result = 1\n if e == 1:\n number += 1\n continue\n for f in range(days):\n initial = number\n result *= e\n number = initial + re...
['Wrong Answer', 'Accepted']
['s178054644', 's067558795']
[3064.0, 2940.0]
[17.0, 17.0]
[397, 135]
p03282
u984465701
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
["S = input()\nk = int(input())\n\nif len(S) == 1:\n print(S)\nelse:\n for i in range(len(S)):\n if i + 1 == k:\n print(1)\n break\n if S[i] != '1':\n print(S[i])\n break\n print(1)\n", "S = input()\nk = int(input())\n\nif len(S) == 1:\n print(S)\nel...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s242570288', 's450805387', 's442293906']
[2940.0, 2940.0, 3064.0]
[17.0, 17.0, 17.0]
[234, 141, 261]
p03282
u989345508
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['s=list(map(int,list(input())))\nk=int(input())\nfor i in range(len(s)):\n if s[i]!=1:\n if i*(5000000000000+1)>k:\n print(1)\n else:\n print(s[i])\n break\nelse:\n print(1)\n\n', 's=input()\nk=int(input())\nl=0\nfor i in s:\n if i=="1":\n l+=1\n else:\n ...
['Wrong Answer', 'Accepted']
['s594949588', 's669939286']
[3060.0, 2940.0]
[18.0, 18.0]
[523, 122]
p03282
u993435350
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['S = input()\nK = input()\n\nif S[0] == 1:\n print(int(S[1]))\nelse:print(int(S[0]))', 'S = input()\nK = int(input())\n\ncon = 0\n\nfor i in range(0,len(S)):\n if S[i] == "1":\n con += 1\n else:break\n\nif K <= con:\n print(1)\nelse:\n if S[0] == "1":\n S = S.replace("1","")\n print(int(S[0]))\n else:\n...
['Wrong Answer', 'Accepted']
['s810211272', 's538993846']
[2940.0, 3060.0]
[17.0, 17.0]
[79, 233]
p03282
u993642190
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['S = input()\nK = long(input())\n\nfor i in range(len(S)) :\n\tif (S[i] == "1") :\n\t\tcontinue\n\t\n\tprint(S[i])\n\tbreak', 'def main() :\n\tS = input()\n\tK = int(input())\n\n\tis_1 = True\n\tfor i in range(K) :\n\t\tif (len(S) < i) :\n\t\t\tbreak\n\n\t\t# print("S[i] : " + S[i])\n\t\tif (S[i] != "1") :\n\t\t\tis_1...
['Runtime Error', 'Accepted']
['s530594637', 's488948141']
[2940.0, 3060.0]
[17.0, 18.0]
[108, 311]
p03282
u999750647
2,000
1,024,000
Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows: * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `8888...
['s = list(input())\nk = int(input())\nif s[0] == 1:\n print(s[1])\nelse:\n print(s[0])', "import sys\ns = input()\nk = int(input())\nfor i in range(k):\n if s[i] != '1':\n print(s[i])\n sys.exit()\n else:\n continue\nprint(1)"]
['Wrong Answer', 'Accepted']
['s006718296', 's617432477']
[2940.0, 2940.0]
[17.0, 17.0]
[86, 153]
p03283
u029000441
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['\n\nimport sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**7)\nfrom collections import Counter, deque\nfrom collections import defaultdict\nfrom itertools import combinations, permutations, accumulate, groupby, product\nfrom bisect import bisect_left,bisect_right\nfrom heapq import heapify, heappop, heappu...
['Runtime Error', 'Accepted']
['s141878390', 's699254782']
[9496.0, 19368.0]
[25.0, 382.0]
[1305, 1179]
p03283
u029169777
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["N,M,Q=map(int,input().split())\n\n\n\nanswer=[[0]*N for i in range(N)]\nfor i in range(M):\n L,R=map(int,input().split())\n answer[N-L][R-1]+=1\n\nfor i in range(1,N):\n answer[0][i]+=answer[0][i-1]\n answer[i][0]+=answer[i-1][0]\n \nprint(answer[0])\nfor i in range(1,N):\n for j in range(1,N):\n answer[i][j...
['Wrong Answer', 'Accepted']
['s631955367', 's908053011']
[9348.0, 9348.0]
[1589.0, 1554.0]
[1373, 643]
p03283
u044459372
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['\ndef solve(s,e):\n\tres=0\n\tfor i in range(s,e+1):\n\t\tres+=train[i][e+1]-train[i][s]\n\treturn res\n\ncity,dnum,qnum=map(int,input().split())\n\ntrain=[[0 for i in range(city+1)] for i in range(city+1)]\n\nfor i in range(dnum):\n\tl,r=map(int,input().split())\n\ttrain[l][r]+=1\n\nfor i in train:\n\ttmp=0\n\tfor j...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s191171305', 's506600115', 's589910347', 's666068224']
[26376.0, 3064.0, 11252.0, 15784.0]
[964.0, 17.0, 3156.0, 751.0]
[414, 404, 738, 874]
p03283
u059210959
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
[' N, M, Q = map(int, input().split())\n rail = []\n for i in range(M):\n r = list(map(int, input().split()))\n rail.append(r)\n \n query = []\n for i in range(Q):\n q = list(map(int, input().split()))\n query.append(q)\n \n f = [[0 for i in range(N)] for j in range...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s043795670', 's609467936', 's948494384', 's101179435']
[2940.0, 30864.0, 30284.0, 75412.0]
[17.0, 3162.0, 3162.0, 1364.0]
[757, 750, 652, 647]
p03283
u075595666
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['class segment_():\n def __init__(self,A,n,ide_ele,segfunc):\n self.ide_ele = ide_ele\n self.num = 1 << n.bit_length()\n self.seg = [self.ide_ele] * 2 * self.num\n self.segfunc = segfunc\n\n def update1(self, k):\n k += self.num\n self.seg[k] += 1\n while k:\n ...
['Runtime Error', 'Accepted']
['s859354528', 's603382541']
[3188.0, 54736.0]
[20.0, 1959.0]
[1394, 1465]
p03283
u102902647
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["import numpy as np\ndef main():\n N, M, Q = map(int, input().split())\n LR = []\n for i in range(M):\n l, r = map(int, input().split())\n LR.append([l-1, r])\n PQ = []\n for i in range(Q):\n p, q = map(int, input().split())\n PQ.append([p-1, q-1])\n ar = np.zeros([M, N])\...
['Time Limit Exceeded', 'Runtime Error', 'Time Limit Exceeded', 'Accepted']
['s313830153', 's438477025', 's728178679', 's707767439']
[840272.0, 837804.0, 839532.0, 56964.0]
[3166.0, 3165.0, 3165.0, 2396.0]
[841, 821, 711, 579]
p03283
u118642796
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import sys\ns = sys.stdin.readlines()\nN,M,Q = map(int,s[0].split())\n\nSection = [[0]*N for _ in range(N)]\nfor L,R in (map(int, e.split()) for e in s[1:M+1):\n Section[L-1][R-1] += 1\n\nSum = [[0]*(N+1) for _ in range(N+1)]\nfor i in range(N):\n for j in range(N):\n Sum[i+1][j+1] = Sum[i][j+1]+Sum[i+1]...
['Runtime Error', 'Accepted']
['s955312361', 's898301937']
[2940.0, 36872.0]
[17.0, 667.0]
[532, 417]
p03283
u124592621
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\ncum = [[0]\nfor i in range(m):\n li, ri = map(int, input().split())\n lis.append(li)\n ris.append(ri)\n\nfor i in range(q):\n pi, qi = map(int, input().split())\n total = 0\n for (li, ri) in zip(lis, ris):\n if pi <= li and ri <= qi:\n total += ...
['Runtime Error', 'Accepted']
['s224152957', 's712975570']
[2940.0, 9332.0]
[17.0, 1599.0]
[326, 478]
p03283
u136090046
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\nlr_array = [[int(x) for x in input().split()] for y in range(m)]\npq_array = [[int(x) for x in input().split()] for y in range(q)]\n\n\ndef solve1():\n table = [[0 for x in range(n + 1)] for y in range(n + 1)]\n for l, r in lr_array:\n table[l][r] += 1\n # for row ...
['Wrong Answer', 'Accepted']
['s715853893', 's791883897']
[58480.0, 58480.0]
[1164.0, 1141.0]
[1559, 1609]
p03283
u140251125
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['# input\nN, M, Q = map(int, input().split())\ntrain_query = {} \nfor i in range(M + Q):\n train_query[i] = list(map(int, input().split()))\n\ntrain_query = sorted(train_query.items(), key=lambda x: x[1][1])\nprint(train_query)\n\n\na = [0 for _ in range(N)]\n\nfor j in range(M + Q):\n if train_query[j][0] < M: ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s218967455', 's272680774', 's716530856']
[114376.0, 111964.0, 111944.0]
[2561.0, 2423.0, 2293.0]
[591, 573, 736]
p03283
u148019779
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["#!/usr/bin/env python3\n\nimport sys\n\n\ndef main():\n n, m, q = [int(x) for x in sys.stdin.readline().rstrip().split(' ')]\n\n x = [[0 for j in range(n+1)] for i in range(n+1)]\n c = [[0 for j in range(n+1)] for i in range(n+1)]\n z = [[0 for j in range(n+1)] for i in range(n+1)]\n\n for i in range(m...
['Wrong Answer', 'Accepted']
['s810635345', 's608603247']
[19764.0, 19764.0]
[765.0, 746.0]
[820, 824]
p03283
u170201762
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import bisect\nimport numpy as np\nN,M,Q = map(int,input().split())\nlr = [0]*M\nfor i in range(M):\n l,r = map(int,input().split())\n lr[i] = [l,r]\nlr = sorted(lr,key=lambda x:x[0])\nlr_t = list(np.array(lr).transpose())\nindex_dict={}\nr_dict={} \nd = {}\nfor i in range(N):\n index_dict[i+1]=bisect.bisect...
['Wrong Answer', 'Accepted']
['s220696734', 's829356241']
[255936.0, 18248.0]
[3175.0, 2643.0]
[678, 380]
p03283
u186967328
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N,M,Q = map(int,input().split())\n\ntrain = [[0 for i in range(N)] for j in range(N)]\nfor m in range(M):\n L,R = map(int,input().split())\n train[L-1][R-1] += 1\n\nc = [[0 for i in range(N)] for j in range(N)]\nfor i in range(N):\n cnt = 0\n for j in range(N):\n cnt += train[i][j]\n c[i][j]...
['Wrong Answer', 'Accepted']
['s926563157', 's349025375']
[11124.0, 15528.0]
[3156.0, 1600.0]
[481, 449]
p03283
u189479417
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int,input().split())\ngraph = [[0 for i in range(N+1)] for j in range(N+1)]\nfor _ in range(M):\n L, R = map(int,input().split())\n graph[L-1][R] += 1\n\nprint(graph)\n\nfor i in range(N-1,-1,-1):\n for j in range(1,N+1):\n graph[i][j] += graph[i+1][j] + graph[i][j-1]\n\nprint(graph)\n\n...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s603717614', 's867758138', 's338143467']
[35336.0, 12424.0, 11144.0]
[1656.0, 1542.0, 1514.0]
[383, 387, 373]
p03283
u189487046
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['2 3 1\n1 1\n1 2\n2 2\n1 2', 'n, m, Q = map(int, input().split())\nM = [[0]*n for _ in range(n)]\nfor i in range(m):\n l, r = map(int, input().split())\n M[r-1][l-1] += 1\n\nfor q in range(n):\n for p in reversed(range(1, n)):\n M[q][p-1] += M[q][p]\nfor p in range(n):\n for q in range(n-1):\n ...
['Runtime Error', 'Accepted']
['s009296734', 's418789429']
[2940.0, 10992.0]
[17.0, 1554.0]
[21, 381]
p03283
u191829404
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import math\nimport copy\nfrom operator import mul\nfrom functools import reduce\nfrom collections import defaultdict\nfrom collections import Counter\nfrom collections import deque\n\nfrom itertools import product\n\nfrom itertools import permutations\n\nfrom itertools import combinations\n\nfrom itertools import ac...
['Runtime Error', 'Accepted']
['s924016255', 's140300747']
[3824.0, 28572.0]
[26.0, 1454.0]
[1410, 1648]
p03283
u201234972
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map( int, input().split())\nNN = [ [0]*N for _ in range(N)]\nfor _ in range(M):\n L, R = map( int, input().split())\n NN[L-1][R-1] += 1\n\nfor i in range(1,N+1):\n for j in range(1,N+1):\n NN[i][j] += NN[i][j-1]+NN[i-1][j]+NN[i-1][j]-NN[i-1][j-1]\nfor _ in range(Q):\n p, q = map( int, inp...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s052307090', 's101724420', 's105136071', 's257895476', 's838665347']
[4980.0, 69692.0, 46980.0, 5108.0, 13416.0]
[590.0, 1997.0, 1692.0, 620.0, 1592.0]
[345, 392, 347, 359, 381]
p03283
u210827208
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,Q=map(int,input().split())\nM=[[0]*n for _ in range(n)]\nfor i in range(m):\n l,r=map(int,input().split())\n M[r-1][l-1]+=1\n\nfor q in range(n):\n for p in reversed(range(1,n)):\n M[q][p-1]+=M[q][p]\nfor p in range(n):\n for q in range(n-1):\n M[q+1][p]+=M[q][p] \nprint(M)\nfor i...
['Wrong Answer', 'Accepted']
['s651392313', 's872323951']
[12568.0, 9332.0]
[1538.0, 1532.0]
[374, 366]
p03283
u215115622
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["import sys\nfrom itertools import accumulate\nN, M, Q = [int(i) for i in input().strip().split(' ')]\n \nflag = False\ncounter = M\n \nd = []\nd2 = []\nfor i in range(N):\n d.append([0] * N)\nfor i in range(N):\n d2.append([0] * N)\n \n \nfor line in sys.stdin:\n L, R = [int(i) for i in line.strip().split('...
['Wrong Answer', 'Accepted']
['s812758343', 's446814906']
[7028.0, 36864.0]
[593.0, 677.0]
[962, 421]
p03283
u222668979
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['from copy import deepcopy\n\nn, m, q = map(int, input().split())\nlr = [list(map(int, input().split())) for _ in range(m)]\npq = [list(map(int, input().split())) for _ in range(q)]\n\ncnt = [[0] * (n + 1) for _ in range(n + 1)]\nfor l, r in lr:\n cnt[l][r] += 1\n\nacc = cnt.deepcopy()\nfor i in range(n):\n for ...
['Runtime Error', 'Accepted']
['s983282211', 's577742281']
[56040.0, 65964.0]
[619.0, 928.0]
[509, 508]
p03283
u236127431
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N,M,Q=map(int,input().split())\nTown=[[int(i) for i in range(M)]]\nTown.sort(key=lambda x:x[0])\n\ndef BS_left(x,L):\n L_copy=L[:]\n l=len(L_copy)\n left=0\n if L[l-1]<x:\n return l-1\n else:\n while l>2:\n if L_copy[l//2]<x:\n L_copy=L_copy[l//2:l]\n left+=l//2\n else:\n L_c...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s075124979', 's310706319', 's326779037', 's605923831', 's963506480', 's223418500']
[24540.0, 58736.0, 58816.0, 58812.0, 54156.0, 43264.0]
[3157.0, 3159.0, 3159.0, 3158.0, 3158.0, 1717.0]
[1087, 1118, 1183, 1208, 1154, 445]
p03283
u239528020
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['#!/usr/bin/env python3\nfrom itertools import accumulate\nimport numpy as np\n\nn, m, q = list(map(int, input().split()))\nlr = [list(map(int, input().split())) for _ in range(m)]\npq = [list(map(int, input().split())) for _ in range(q)]\n\ndata = [[0]*500 for i in range(500)]\n\n\nfor l, r in lr:\n data[l-1][r-1]...
['Wrong Answer', 'Accepted']
['s081386821', 's566080182']
[76364.0, 76164.0]
[886.0, 910.0]
[1161, 1161]
p03283
u263654061
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['for qi in range(Q):\n out = 0\n for i in range(m):\n if(l[i]>=p[qi] and r[i]<=q[qi]):\n out += 1\n print(out)', 'n,m,Q = list(map(int, input().split()))\n\nl=[]\nr=[]\nfor j in range(m):\n l_tmp, r_tmp = list(map(int, input().split()))\n l.append(l_tmp)\n r.append(r_tmp)\n\np=[]\nq...
['Runtime Error', 'Accepted']
['s591732227', 's601391920']
[2940.0, 28292.0]
[17.0, 1591.0]
[131, 808]
p03283
u279493135
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians\nfrom itertools import permutations, combinations, product\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, di...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s113074488', 's263116591', 's137492996']
[76704.0, 75260.0, 77948.0]
[3161.0, 3161.0, 815.0]
[1025, 1083, 1051]
p03283
u284854859
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import sys\ninput = sys.stdin.readline\nn,m,q = map(int,input().split())\n\nres = [[0]*n for i in range(n)]\nfor i in range(m):\n L,r = map(int,input().split())\n L -= 1\n r -= 1\n res[r][0] += 1\n if L != n-1:\n res[r][L+1] -= 1\nprint(res)\nfor i in range(n):\n for j in range(1,n):\n ...
['Wrong Answer', 'Accepted']
['s175574656', 's184595458']
[13884.0, 9660.0]
[770.0, 704.0]
[496, 475]
p03283
u323827773
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['num_city, num_train, num_question = [int(i) for i in input().split()]\n \n\nfor i in range(0, num_train):\n start, arrive = [int(j) for j in input().split()]\n\nfor i in range(0, num_question):\n start, arrive = [int(j) for j in input().split()]', 'num_city, num_train, num_question = [int(i) for i in input().sp...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s106935387', 's289511571', 's802349773', 's859348160', 's250590586']
[3060.0, 8820.0, 7028.0, 9076.0, 15320.0]
[776.0, 702.0, 780.0, 1437.0, 1691.0]
[257, 558, 558, 810, 945]
p03283
u334712262
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["# -*- coding: utf-8 -*-\nimport bisect\nimport heapq\nimport math\nimport random\nimport sys\nfrom collections import Counter, defaultdict, deque\nfrom decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal\nfrom functools import lru_cache, reduce\nfrom itertools import combinations, combinations_with_replacement, prod...
['Runtime Error', 'Accepted']
['s210048340', 's699439507']
[134668.0, 79512.0]
[3163.0, 1373.0]
[2455, 1998]
p03283
u335038698
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["N, M, Q = map(int, input().split())\nLR = [[0] * (N+1) for _ in range(N+1)]\nfor m in range(M):\n l, r = map(int, input().split())\n LR[l][r] += 1\n\n\nLR_sum = [[0] * (N+1) for _ in range(N+1)]\nLR_sum[1][1] = LR[1][1]\n\nfor i in range(1, N+1):\n LR_sum[1][i] = LR_sum[1][i-1] + LR[1][i]\n LR_sum[i][1] =...
['Wrong Answer', 'Accepted']
['s724858253', 's233660688']
[19560.0, 15336.0]
[1621.0, 1596.0]
[775, 667]
p03283
u342563578
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int,input().split())\nMlist = [input().split() for l in range(M)]\nQlist = [input().split() for l in range(Q)]\nMlist.sort()\nfor i in range(len(Mlist)):\n for j in range(len(Mlist[i])):\n Mlist[i][j] = int(Mlist[i][j])\nfor i in range(len(Qlist)):\n for j in range(len(Qlist[i])):\n ...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s124525516', 's232482017', 's267585537', 's327228580', 's502870815', 's596478423', 's657860165', 's892226664', 's358357386']
[100680.0, 100312.0, 100808.0, 73476.0, 66604.0, 102600.0, 70716.0, 73408.0, 79340.0]
[3164.0, 3162.0, 1848.0, 1358.0, 1090.0, 3163.0, 3160.0, 3161.0, 1563.0]
[759, 804, 767, 674, 435, 841, 481, 666, 940]
p03283
u346308892
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['\nimport numpy as np\nimport sys\nsys.setrecursionlimit(100000)\n\n\n\ndef acinput():\n return list(map(int, input().split(" ")))\n\n\n\ndirections=np.array([[1,0],[0,1],[-1,0],[0,-1]])\ndirections = list(map(np.array, directions))\n\nmod = 10**9+7\n\n\ndef factorial(n):\n fact = 1\n for integer in range(1, ...
['Wrong Answer', 'Accepted']
['s201992832', 's720898448']
[18376.0, 18968.0]
[2994.0, 2640.0]
[1160, 1164]
p03283
u350248178
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['l=[]\nr=[]\nfor i in range(m):\n a,b=map(int,input().split())\n l.append(a)\n r.append(b)\n\np=[]\nq=[] \nfor i in range(Q):\n c,d=map(int,input().split())\n p.append(c)\n q.append(d)\n \nfor i in range(Q):\n answer=0\n for j in range(m):\n if p[i]<=l[j] and r[j]<=q[i]:\n ...
['Runtime Error', 'Accepted']
['s151851482', 's172074111']
[3064.0, 15444.0]
[17.0, 1555.0]
[330, 620]
p03283
u353797797
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\n\ndef f():\n nc, nt, nq = map(int, input().split())\n t = [list(map(int, input().split())) for _ in range(nt)]\n q = [list(map(int, input().split())) for _ in range(nq)]\n dp = np.zeros((nc + 1, nc + 1), dtype="i8")\n for l, r in t:\n dp[:l + 1, r:] += 1\n for l, r in q:...
['Wrong Answer', 'Accepted']
['s553840321', 's467363180']
[77556.0, 13300.0]
[3165.0, 1430.0]
[353, 616]
p03283
u357810840
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\nn, m, q = map(int, input().split())\n\nmat = np.zeros((n, n), dtype=np.uint32)\n\nfor i in range(m):\n l, r = map(int, input().split())\n mat[l-1, r-1] += 1\nmat = np.flipud(mat)\nmatmul = np.cumsum(mat, axis=0)\nmatmul = np.flipd[matmul]\nmatmul2 = np.cumsum(matmul, axis=1)\n\nfor i in ra...
['Runtime Error', 'Accepted']
['s090841469', 's600364265']
[18480.0, 18896.0]
[2587.0, 2777.0]
[391, 386]
p03283
u375616706
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN, M, Q = map(int, input().split())\n\nmat = [[0]*(N+1) for _ in range(N+1)]\n\nfor _ in range(M):\n a, b = map(int, input().split())\n mat[a][b] = 1\n\n\ndef solve():\n\n for i in range(N+1):\n for j in range(1, N+1):\n ...
['Wrong Answer', 'Accepted']
['s845027793', 's114026129']
[17336.0, 51336.0]
[633.0, 1459.0]
[962, 496]
p03283
u404676457
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['(n, m, q) = map(int, input().split(" "))\n\nns = [[0 for _ in range(n + 1)]for _ in range(n + 1)]\n\nfor i in range(m):\n (l, r) = map(int, input().split(" "))\n ns[l][r] += 1\n\nprint(ns)\n\nfor i in range(q):\n count = 0\n (ql, qr) = map(int, input().split(" "))\n for j in range(ql, qr + 1):\n ...
['Wrong Answer', 'Accepted']
['s972289908', 's617645483']
[7448.0, 9716.0]
[3156.0, 1483.0]
[379, 465]
p03283
u427344224
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\n\nx = [[0 for i in range(N + 1)] for j in range(N + 1)]\n\nfor i in range(M):\n l, r = map(int, input().split())\n x[l][r] += 1\n\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n x[i][j] += x[i - 1][j] + x[i][j - 1] - x[i - 1][j - 1]\n\nfor i in range(Q):\n...
['Wrong Answer', 'Accepted']
['s513102465', 's551426030']
[13420.0, 13424.0]
[1501.0, 1545.0]
[375, 389]
p03283
u463655976
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\n\nimport numpy as np\nmatrix = np.array([[0 for _ in range(N+1)] for _ in range(N+1)], dtype=np.int16)\n\npairs = [[0 for _ in range(N+1)] for _ in range(N+1)]\nfor L, R in (map(int, input().split()) for _ in range(M)):\n pairs[L][R] += 1\n\nfor i in range(1, N+1):\n for j i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s506258709', 's845484208', 's634193095']
[24852.0, 14956.0, 53108.0]
[3160.0, 3160.0, 1794.0]
[465, 222, 624]
p03283
u475065881
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['10 10 10\n1 6\n2 9\n4 5\n4 7\n4 7\n5 8\n6 6\n6 7\n7 9\n10 10\n1 8\n1 9\n1 10\n2 8\n2 9\n2 10\n3 8\n3 9\n3 10\n1 10', 'N, M , Q = map(int, input().split())\n\nLR = [[0 for _ in range(N+2-i) for _ in range(N+2)]\nfor i in range(M):\n L, R = map(int, input().split())\n LR[L][R-L+1] += 1\n\n \nfor i in range(2,N+2):\n...
['Runtime Error', 'Runtime Error', 'Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s012798510', 's402435434', 's530350609', 's738028189', 's596454357']
[2940.0, 2940.0, 14444.0, 3064.0, 8668.0]
[17.0, 17.0, 3066.0, 17.0, 554.0]
[94, 367, 401, 368, 476]
p03283
u480138356
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\ndef main():\n N, M, Q = map(int, input().split())\n\n check = np.zeros((N+1, N+1))\n\n for i in range(M):\n l, r = map(int, input().split())\n check[r][l] += 1\n\n # print(check)\n for i in range(1, N+1):\n check[i] += check[i-1]\n for i in range(1, N+1):\n...
['Wrong Answer', 'Accepted']
['s646184004', 's744859742']
[15188.0, 15256.0]
[2860.0, 1333.0]
[538, 581]
p03283
u480200603
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['# import sys\n# input = sys.stdin.readlines()\nn, m, q = map(int, input().split())\n\nd = [[0 for j in range(n + 1)] for i in range(n + 1)]\na = [[0 for j in range(n + 1)] for i in range(n + 1)]\n\nfor _ in range(m):\n l, r = map(int, input().split())\n a[l][r] += 1\n\nfor i in range(1, n + 1):\n for j in ra...
['Wrong Answer', 'Accepted']
['s444394689', 's010753371']
[17244.0, 17116.0]
[1666.0, 1602.0]
[555, 515]
p03283
u497046426
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\ntable = [[0 for _ in range(N+1)] for _ in range(N+1)]\nfor _ in range(M):\n l, r = map(int, input().split())\n table[l][r] += 1\ncum_sum2 = [[0 for _ in range(N+1)] for _ in range(N+1)]\nfor i, j in product(range(1, N+1), repeat=2):\n cum_sum2[i][j] += table[i][j] + cum_s...
['Runtime Error', 'Accepted']
['s804598383', 's379888172']
[7156.0, 15552.0]
[628.0, 1633.0]
[517, 548]
p03283
u497625442
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int,input().split())\n\nC = [[0 for in range(N)] in range(N)]\nfor i in range(M):\n\tL,R = map(int,input().split())\n\tC[L][R] += 1\n\nfor j in range(Q):\n\tp,q = map(int,input().split())\n\ts = 0\n\tfor i in range(p,q+1):\n\t\tfor j in range(p,q+1):\n\t\t\ts += C[i][j]\n\tprint(s)\n', 'N, M, Q = map(in...
['Runtime Error', 'Accepted']
['s455775331', 's772868645']
[2940.0, 19484.0]
[17.0, 1638.0]
[273, 732]
p03283
u518378780
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = [int(_) for _ in input().split()]\ntrain = [[int(_) for _ in input().split()] for i in range(M)]\nquestion = [[int(_) for _ in input().split()] for i in range(Q)]\n\nnl = [[0 for i in range(N)] for j in range(N)]\nfor t in train:\n i = t[0] - 1\n j = t[1] - 1\n nl[i][j] += 1\n\nl = [[0 for i in ran...
['Wrong Answer', 'Accepted']
['s325771365', 's385603402']
[58284.0, 63100.0]
[3160.0, 925.0]
[687, 419]
p03283
u523764640
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\nn, m, q = map(int, input().split())\n\nmat = np.zeros((n, n), dtype=int)\n\nfor _ in range(m):\n l, r = map(int, input().split())\n mat[l-1][r-1] += 1\n\nans = np.cumsum(mat, axis=1)[::-1], axis=0)[::-1]\n\nfor _ in range(q):\n l, r = map(int, input().split())\n print(ans[l-1][r-1])\...
['Runtime Error', 'Accepted']
['s682713387', 's610286475']
[2940.0, 18380.0]
[17.0, 2869.0]
[304, 314]
p03283
u540761833
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N,M,Q = map(int,input().split())\nnum = [[0 for i in range(N)] for j in range(N)]\nlr = [list(map(int,input().split())) for i in range(M)]\nfor l,r in lr:\n num[l-1][r-1] += 1\n\nfor j in range(N):\n for i in range(N-1,0,-1):\n num[i-1][j] += num[i][j]\nfor i in range(N):\n for j in range(N-1):\n ...
['Runtime Error', 'Accepted']
['s621950516', 's012153985']
[72296.0, 75604.0]
[1159.0, 904.0]
[431, 525]
p03283
u608569568
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,q = map(int,input().split(" "))\nLR_2d = [[0 for i in range(n)] for i in range(n)]\nfor i in range(m):\n L,R = map(int,input().split(" "))\n LR_2d[L-1][R-1] += 1\nLR_2dsum = [[0 for i in range(n)] for i in range(n)]\nfor i in range(n):\n LR_2dsum[i][0] = LR_2d[i][0]\n for j in range(1,n):\n LR_...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s284619241', 's892385949', 's582109941']
[9204.0, 10228.0, 15472.0]
[3156.0, 3156.0, 1664.0]
[556, 588, 621]
p03283
u619819312
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\nn,m,q=map(int,input().split())\ns=np.zeros((n,n))\nfor i in range(m):\n l,r=map(int,input().split())\n s[n-l][r-1]+=1\ns=np.cumsum(np.cumsum(s,axis=0),axis=1)\nprint(s)\nfor i in range(q):\n d,t=map(int,input().split())\n print(int(s[n-d][t-1]))', 'import numpy as np\nn,m,q=map(int,inp...
['Wrong Answer', 'Accepted']
['s314830749', 's417808055']
[18140.0, 18268.0]
[2317.0, 2334.0]
[267, 258]
p03283
u623601489
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,q= map(int,input().split())\ndataList = [[0 for xIndex in range(n+1)]for yIndex in range(n+1)]\n\nfor i in range(m):\n xTemp,yTemp = map(int,input().split())\n dataList[yTemp][xTemp]+=1\npqList=[list(map(lambda x:int(x),input().split()))for i in range(q)]\nprint(dataList)\nfor yIndex in range(1,n+1):\n f...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s050500826', 's371099005', 's505135710']
[41076.0, 68468.0, 34856.0]
[1295.0, 3160.0, 1250.0]
[653, 260, 621]
p03283
u624475441
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N,M,Q=map(int,input().split())\ndp=[[0]*-~N for _ in[0]*-~N]\nfor _ in[0]*M:\n L,R=map(int,input().split())\n for i in range(1,L+1):\n for j in range(R,N+1):\n dp[i][j] += 1\n print(i,j)\nfor _ in[0]*Q:\n p,q=map(int,input().split())\n print(dp[p][q])', "import sys\nimport num...
['Wrong Answer', 'Accepted']
['s160450648', 's815333820']
[26720.0, 43600.0]
[3156.0, 1390.0]
[282, 425]
p03283
u631914718
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\n\ndef LI(): return list(map(int, input().split()))\ndef LI_(): return list(map(lambda x: int(x) - 1, input().split()))\n\n\ndef cumulative_sum_ref(d1_array):\n for i in range(1, len(d1_array)):\n d1_array[i] += d1_array[i-1]\n\n\ndef cumulative_sum_val(d1_array):\n tmp = d1_array.co...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s560397958', 's866972811', 's316175455']
[13448.0, 13448.0, 38468.0]
[3160.0, 3160.0, 413.0]
[1446, 1446, 467]
p03283
u638456847
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['\nimport sys\nread = sys.stdin.read\nreadline = sys.stdin.readline\nreadlines = sys.stdin.readlines\n\ndef lunlun_num(N):\n N = str(N)\n L = len(N)\n\n dp = [[0]*10 for j in range(L)]\n for j in range(1,int(N[0])):\n dp[0][j] = 1\n\n flag = True\n for i in range(L-1):\n d = int(N[i+1])...
['Runtime Error', 'Accepted']
['s650312424', 's029077094']
[3188.0, 56648.0]
[18.0, 443.0]
[1284, 793]
p03283
u655663334
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\n\nn,m,q = list(map(int, input().split()))\n\nlrs = [list(map(int, input().split())) for _ in range(m)]\npqs = [list(map(int, input().split())) for _ in range(q)]\n\ntrain_array = np.zeros((n,n),dtype=int)\n\nfor lr in lrs:\n train_array[lr[0]-1][lr[1]-1] +=1\n\n\n#print(train_array)\n\ntrain_ar...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s138218319', 's388407811', 's026395483']
[79656.0, 79708.0, 80312.0]
[3165.0, 3166.0, 2375.0]
[773, 810, 813]
p03283
u659712937
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["from itertools import accumulate\nfrom operator import add, mul\nn,m,q=map(int,input().split())\n\na=[]\nb=[]\nfor i in range(n):\n a.append([0]*(n))\n b.append([0]*(n))\n\n#import numpy as np\n#b=np.array(b)\n#print(a)\n'''\nfor i in range(m):\n l,r=map(int,input().split())\n #print(a[(r-1):n,0:l])\n ...
['Wrong Answer', 'Accepted']
['s650131923', 's069467093']
[21304.0, 19076.0]
[870.0, 858.0]
[1132, 1135]
p03283
u659753499
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
["N,M,Q = map(int,input().split())\nT = [[0 for _ in range(N+1)] for _ in range(N+1)]\nfor i in range(M):\n L,R = map(int, input().split())\n T[L][R] += 1\npprint(T)\nfor l in range(1,N+1):\n for r in range(1,N+1):\n T[l][r] += T[l-1][r]+T[l][r-1]-T[l-1][r-1]\nans = []\npprint(T)\nfor i in range(Q):\n p,q = map(...
['Runtime Error', 'Accepted']
['s490289040', 's853945100']
[5108.0, 23896.0]
[595.0, 1157.0]
[420, 393]
p03283
u672475305
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['\ndef f(h,w,a):\n da = [[0]*w for _ in range(h)]\n da[0][0] = a[0][0]\n for i in range(1, w):\n da[0][i] = da[0][i-1] + a[0][i]\n for i in range(1, h):\n cnt_w = 0\n for j in range(w):\n cnt_w += a[i][j]\n da[i][j] = da[i-1][j] + cnt_w\n return da\n\ndef Calc(...
['Wrong Answer', 'Accepted']
['s657931389', 's476080383']
[15320.0, 17108.0]
[1561.0, 1520.0]
[830, 807]
p03283
u685263709
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\nLR = [list(map(int, input().split())) for i in range(M)]\nPQ = [list(map(int, input().split())) for i in range(Q)]\n\nacc = [[0 for i in range(N+1)] for i in range(N+1)] \ncoordinate = [[0 for i in range(N)] for i in range(N)]\nfor l, r in LR:\n l -= 1\n r -= 1\n coordin...
['Wrong Answer', 'Accepted']
['s068518068', 's961046396']
[83496.0, 79476.0]
[1362.0, 1339.0]
[611, 601]
p03283
u686461495
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['# coding:utf-8\nn,m,q=map(int,input().split())\ndp = [[0 for i in range(n)] for j in range(n)]\nfor i in range(m):\n l,r=map(int,input().split())\n l-=1\n r-=1\n dp[l][r]+=1\nfor i in range(n):\n for j in range(n-1):\n dp[i][j+1]+=dp[i][j]\nfor j in range(n):\n for i in range(n-1,0,-1):\n ...
['Runtime Error', 'Accepted']
['s478473880', 's740182112']
[12460.0, 9460.0]
[783.0, 1678.0]
[490, 488]
p03283
u745514010
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,q=map(int,input().split())\nalist=[]\nfor i in range(m):\n l,r=map(int,input().split())\n alist.append([l,r])\nfor t in range(q):\n count=m\n p,q=map(int,input().split())\n for i in alist:\n if p>i[0] or p<i[1]:\n count-=1\n print(count)', 'n,m,q=map(int,input().split())\nalist...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s166070998', 's368606102', 's220945661']
[31708.0, 50048.0, 20744.0]
[3161.0, 3158.0, 963.0]
[266, 612, 501]
p03283
u767545760
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\ntrains = [[0] * (N + 1) for _ in range(N + 1)]\nfor _ in range(M):\n L, R = map(int, input().split())\n trains[L][R] += 1\nfor i in range(1, N + 1):\n for j in range(1, N + 1):\n trains[i][j] += trains[i - 1][j]\nfor i in range(1, N + 1):\n for j in range(1, N +...
['Wrong Answer', 'Accepted']
['s743455199', 's245686483']
[22776.0, 22352.0]
[765.0, 744.0]
[544, 530]
p03283
u769698512
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\nn, m, q = map(int, input().split())\nkukan = np.zeros((N+1, N+1))\nfor _ in range(m):\n l, r = map(int, input().split())\n kukan[r][l] += 1\n\n\n\nfor i in range(1, n+1):\n kukan[i] += kukan[i-1]\n\n\nfor i in range(1, n+1):\n kukan[:, i] += kukan[i-1]\n\nfor i in range(q):\n p, q =...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s497475560', 's821176549', 's614082926']
[12488.0, 16472.0, 15196.0]
[150.0, 2661.0, 2625.0]
[593, 593, 615]
p03283
u798818115
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['# coding: utf-8\n# Your code here!\nN,M,Q=map(int,input().split())\n\nstart=[0]*N\nend=[0]*N\n\nfor _ in range(M):\n p,q=map(int,input().split())\n start[p-1]+=1\n end[q-1]+=1\n\nfor i in range(len(start)-1):\n start[i+1]+=start[i]\n end[i+1]+=end[i]\nprint(start)\nprint(end)\n\n\n\n', '# coding: utf-8...
['Wrong Answer', 'Accepted']
['s048053276', 's292165324']
[3060.0, 15476.0]
[665.0, 1505.0]
[292, 789]
p03283
u816116805
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['from collections import Counter\nfrom itertools import product\nimport numpy as np\n\nn,m,q = map(int,input().split())\nrails=[tuple(map(int,input().split())) for i in range(m)]\nqs=[tuple(map(int,input().split())) for i in range(q)]\n\nxlist = np.array([[0 for j in range(n)] for i in range(n)])\nfor (l,r),i in Coun...
['Wrong Answer', 'Accepted']
['s738724227', 's634874876']
[54064.0, 47916.0]
[1835.0, 2929.0]
[638, 542]
p03283
u824237520
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\n\ntemp = [ [0 for _ in range(n)] for _ in range(n)]\ntables = [ [0 for _ in range(n)] for _ in range(n)]\n\nfor _ in range(m):\n l, r = map(int, input().split())\n temp[l - 1][r - 1] += 1\n\npq = [tuple(int(x) - 1 for x in input().split()) for _ in range(q)]\n\nfor i in rang...
['Runtime Error', 'Runtime Error', 'Accepted']
['s653157596', 's912226112', 's707953825']
[17636.0, 17636.0, 26124.0]
[1000.0, 957.0, 1233.0]
[619, 619, 699]
p03283
u844789719
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = [int(_) for _ in input().split()]\nLR = [[int(_) for _ in input().split()] for _ in range(M)]\nPQ = [[int(_) for _ in input().split()] for _ in range(Q)]\n\ncumsum = [[0] * (N+2) for _ in range(N+1)]\nfor lr in LR:\n cumsum[lr[0]][lr[0]] += 1\n if lr[1] < N:\n cumsum[lr[0]][lr[1]+1] -= 1\nfor i...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s262555522', 's366246406', 's246424055']
[54944.0, 51132.0, 71404.0]
[3159.0, 3159.0, 2674.0]
[526, 361, 1933]
p03283
u846150137
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\nn,m,q=map(int,input().split())\na=np.zeros((n+2,n+2))\nfor i in range(m):\n s,e=map(int,input().split())\n a[:s,e:]+=1\nprint(a)\nfor i in range(q):\n s,e=map(int,input().split())\n print(a[s,e])', 'from numpy import *\nI=lambda:map(int,input().split())\nF=lambda x:flipud(a.cumsum(x))\nn,m,q=I...
['Wrong Answer', 'Accepted']
['s838195851', 's265648968']
[16504.0, 17940.0]
[3160.0, 2302.0]
[210, 212]
p03283
u846694620
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\n\ng = [[0 for j in range(n)] for i in range(n)]\n\nfor _ in range(m):\n l, r = map(int, input().split())\n g[l - 1][r - 1] = 1\n\nfor _ in range(q):\n p, q = map(int, input().split())\n ans = 1\n for i in range(p, q + 1):\n for j in range(p, q + 1):\n ...
['Wrong Answer', 'Accepted']
['s539940093', 's290287096']
[7156.0, 9460.0]
[3156.0, 1518.0]
[347, 427]
p03283
u886747123
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['# D - AtCoder Express 2\n\nimport numpy as np\nimport sys\n\nN, M, Q = map(int, input().split())\nLRpq = np.array(sys.stdin.buffer.read().split(), np.int64)\nL = LRpq[:2*M:2]\nR = LRpq[1:2*M:2]\np = LRpq[2*M::2]\nq = LRpq[2*M+1::2]\n \ntrain = np.zeros((N+1, N+1))\nnp.add.at(train, (L,R), 1)\n\nnp.cumsum(train, ax...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s356314511', 's405870372', 's519093487', 's559109723', 's600744110', 's901269818', 's866293559']
[44968.0, 21648.0, 21648.0, 23452.0, 66884.0, 45728.0, 48248.0]
[416.0, 423.0, 701.0, 3161.0, 288.0, 254.0, 414.0]
[474, 259, 210, 334, 214, 268, 494]
p03283
u894258749
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import numpy as np\ndef inpl(): return list(map(int,input().split()))\n\nN, M , Q = inpl()\ntrains = np.zeros((N,N),dtype=np.int)\nans = np.zeros((N,N),dtype=np.int)\n\nfor i in range(M):\n L, R = inpl()\n trains[L-1,R-1] += 1\n\nfor l in range(N):\n for r in range(l,N):\n ans[l,r] = trains[l:r+1,l:r+...
['Time Limit Exceeded', 'Time Limit Exceeded', 'Accepted']
['s355221981', 's807509626', 's300011330']
[14660.0, 16844.0, 19028.0]
[3161.0, 3161.0, 2067.0]
[375, 582, 557]
p03283
u911507660
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, raw_input().split())\nfor _ in range(M):\nLR = [map(int, raw_input().split()) for _ in range(M)]\npq = [map(int, raw_input().split()) for _ in range(Q)]\n\ntable = [[0 for _i in range(N+1)] for _j in range(N+1)]\nfor line in LR:\n table[LR[0]][LR[1]] += 1\nfor question in pq:\n p = question[0...
['Runtime Error', 'Accepted']
['s293958680', 's172093498']
[2940.0, 83336.0]
[17.0, 1348.0]
[412, 865]
p03283
u921773161
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['#%%\nimport numpy as np\n\nn, m, Q = map(int ,input().split())\nl, r, p, q = [0] * m, [0] * m, [0] * Q, [0] * Q\ncount = [[0] * n for _ in range(n)]\nfor i in range(m):\n l[i], r[i] = map(lambda x: int(x) - 1, input().split())\n count[l[i]][r[i]] += 1\nfor i in range(Q):\n p[i], q[i] = map(lambda x: int(x) -...
['Wrong Answer', 'Accepted']
['s364974767', 's759837703']
[38364.0, 36588.0]
[1527.0, 1472.0]
[699, 699]
p03283
u932868243
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,q=map(int,input().split())\nans=[[0]*(n+1) for __ in range(n+1)]\nfor _ in range(m):\n l,r=map(int,input().split())\n ans[l][r]+=1\nfor i in range(n+1):\n for j in range(n):\n ans[i][j+1]+=ans[i][j]\nfor i in range(n):\n for j in range(n+1):\n ans[i+1][j]+=ans[i][j]\nfor qq in range(q):\n p,q=map(int,i...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s482614877', 's888846917', 's975150065', 's122442502']
[13392.0, 8684.0, 12632.0, 14828.0]
[1560.0, 1538.0, 729.0, 1604.0]
[378, 365, 367, 364]
p03283
u955251526
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\ntrain = [tuple(map(int, input().split())) for _ in range(m)]\nquest = [tuple(map(int, input().split())) for _ in range(q)]\ndp = [[0 for _ in range(n)] for _ in range(n)]\nd = {}\nfor l in range(n):\n for r in range(l,n):\n d[(l,r)] = 0\nfor p, q in train:\n d[(p,...
['Runtime Error', 'Runtime Error', 'Accepted']
['s058119094', 's976281769', 's443214454']
[53044.0, 3060.0, 58484.0]
[926.0, 17.0, 1273.0]
[501, 511, 541]
p03283
u957084285
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n, m, q = map(int, input().split())\ncity = [[0]*(n+2) for _ in range(n+2)]\nsame = [0]*(n+1)\nfor _ in range(m):\n l, r = map(int, input().split())\n city[r][1] += 1\n city[r][l+1] -= 1\n\n city[1][r] += 1\n city[l+1][r] -= 1\n if l==r:\n same[l] += 1\n\n"""\nprint()\nfor c in city[1:n+1]:\n...
['Wrong Answer', 'Accepted']
['s900767716', 's112985275']
[14704.0, 13168.0]
[1666.0, 1978.0]
[678, 684]
p03283
u969190727
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['n,m,q=map(int,input().split())\nL=[[0 for i in range(n)] for i in range(n)]\nLL=[[0 for i in range(n)] for i in range(n)] \nfor i in range(m):\n l,r=map(int,input().split())\n L[l-1][r-1]+=1\nfor i in range(n):\n LL[i][0]=L[i][0]\n for j in range(1,n):\n LL[i][j]=LL[i][j-1]+L[i][j]\nfor i in range(q):\n p,q=m...
['Wrong Answer', 'Accepted']
['s123960947', 's518078862']
[9332.0, 9740.0]
[3160.0, 712.0]
[407, 405]
p03283
u970899068
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['import itertools\nimport numpy as np\nn,m,q=map(int, input().split()) \na=[list(map(int, input().split())) for i in range(m)]\nb=[list(map(int, input().split())) for i in range(q)]\n\nx=[[0]*(501) for i in range(501)]\nx=np.array\nfor i in range(m):\n x[a[i][0],a[i][1]]+=1\n\n\n\nfor i in range(501):\n x[i] = ...
['Runtime Error', 'Accepted']
['s374633228', 's658521361']
[3064.0, 77056.0]
[17.0, 820.0]
[533, 451]
p03283
u979823197
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N,M,Q=map(int,input().split())\nL,R=[],[]\nfor i in range(M):\n l,r=map(int,input().split())\n L.append(l)\n R.append(r)\nPl,Ql=[],[]\nfor i in range(Q):\n pq=list(map(int,input().split()))\n Pl.append(pq[0])\n Ql.append(pq[1])\nc=[[0 for i in range(N+1)] for i in range(N+1)]\nfor i in range(M):\n c[L[i]][R[i]...
['Wrong Answer', 'Accepted']
['s512537092', 's005389611']
[27744.0, 27768.0]
[1245.0, 1274.0]
[553, 561]
p03283
u995062424
3,000
1,024,000
In Takahashi Kingdom, there is a east-west railroad and N cities along it, numbered 1, 2, 3, ..., N from west to east. A company called _AtCoder Express_ possesses M trains, and the train i runs from City L_i to City R_i (it is possible that L_i = R_i). Takahashi the king is interested in the following Q matters: * ...
['N, M, Q = map(int, input().split())\ntrain = [[0 for _ in range(N+1)] for _ in range(N+1)]\n\nfor i in range(M):\n l, r = map(int, input().split())\n train[l][r] +=1\n \nfor i in range(N+1):\n for j in range(N):\n train[i][j+1] += train[i][j]\n \nfor i in range(N):\n for j in range(N+1):\...
['Wrong Answer', 'Accepted']
['s858980540', 's992424336']
[13396.0, 13396.0]
[1615.0, 1612.0]
[474, 474]
p03284
u009219947
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
["import sys\n\nN = int(input())\n\nfor i in range(26):\n for j in range(16):\n if N == i * 4 + j * 7:\n print('Yes')\n sys.exit()\nprint('No')", "N, K = list(map(int, input().split(' ')))\nprint(0 if N % K == 0 else 1)"]
['Runtime Error', 'Accepted']
['s828461677', 's325942210']
[2940.0, 2940.0]
[20.0, 17.0]
[146, 71]
p03284
u015993380
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['n,k = map(int,input().split())\nprint(n%k != 0)', 'n,k = map(int,input().split())\nprint(0 if n%k == 0 else 1)']
['Wrong Answer', 'Accepted']
['s218121799', 's186074882']
[2940.0, 2940.0]
[17.0, 17.0]
[46, 58]
p03284
u016901717
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['n = int(input())\nprint(n if n%2==0 else n*2)', 'n,k = map(int,input().split())\nprint(0 if n%k==0 else 1)']
['Runtime Error', 'Accepted']
['s001668996', 's196961680']
[2940.0, 2940.0]
[17.0, 17.0]
[44, 56]
p03284
u021548497
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['n, k = map(int, input().split())\nprint(1 if n % k == 0 else 0)', 'n, k = map(int, input().split())\nprint(0 if n % k == 0 else 1)']
['Wrong Answer', 'Accepted']
['s819024670', 's012402969']
[3064.0, 2940.0]
[17.0, 17.0]
[62, 62]
p03284
u029234056
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['N,K=map(int,input().split())\nif(N%K==0):\n print(0)\n else:\n print(1)', 'N,K=map(int,input().split())\nif N%K==0:\n print(0)\nelse:\n print(1)']
['Runtime Error', 'Accepted']
['s041643350', 's518458591']
[2940.0, 2940.0]
[17.0, 17.0]
[69, 71]
p03284
u031157253
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['a,b=map(int,input().split())\nprint((int)a%b==0)', 'a,b=map(int,input().split())\nprint(int(a%b!=0))']
['Runtime Error', 'Accepted']
['s737717894', 's027536491']
[2940.0, 2940.0]
[17.0, 17.0]
[47, 47]
p03284
u031358594
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['N,K=(int(i) for i in input().split())\n\nres=list()\n\nfor i in range(0,K):\n res.append(0)\n\nprint(res)\nj=0\ni=0\n\nwhile N>0:\n j=0\n while j<len(res):\n if N<=0:\n break\n res[j]=res[j]+1\n N=N-1\n j+=1\n #print(str(N)+"::"+str(res))\n\n\nMinCount=min(res)\n...
['Wrong Answer', 'Accepted']
['s911462459', 's104593395']
[3060.0, 3064.0]
[17.0, 17.0]
[340, 339]
p03284
u034369223
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
["string = input()\nN, K = string.split(' ')\nif N % K == 0:\n print(0)\nelse:\n print(1)\n", "import sys\nN = int(input())\nfor i in range(int(N/4)):\n amount = (i + 1) * 4\n for j in range(int(N/7)):\n amount += 7\n if(amount == N):\n print('Yes')\n sys.exit()\nprint('N...
['Runtime Error', 'Runtime Error', 'Accepted']
['s263256684', 's965345371', 's001258786']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[89, 214, 126]
p03284
u036340997
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['n, k = map(int, input())\nif n % k == 0:\n print(0)\nelse:\n print(1)', 'n, k = map(int, input().split())\nif n % k == 0:\n print(0)\nelse:\n print(1)\n']
['Runtime Error', 'Accepted']
['s167292203', 's345875298']
[2940.0, 2940.0]
[17.0, 17.0]
[67, 76]
p03284
u041111386
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['N, K = map(int, input().split())\nif N % K == :\n print(0)\nelse:\n print(1)', 'N, K = map(int, input().split())\nif N % K == 0:\n print(0)\nelse:\n print(1)']
['Runtime Error', 'Accepted']
['s275766333', 's874152607']
[8944.0, 9004.0]
[22.0, 30.0]
[74, 75]
p03284
u043236471
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
['b, k = [int(i) for i in input().split()]\nprint(b%k != 0)', 'b, k = [int(i) for i in input().split()]\nprint(1) if b%k else print(0)']
['Wrong Answer', 'Accepted']
['s069708010', 's344999875']
[2940.0, 3064.0]
[17.0, 17.0]
[56, 70]
p03284
u050121913
2,000
1,048,576
Takahashi has decided to distribute N AtCoder Crackers to K users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.
["n,k = int(input().split(' '))\ns = 1\nif n%k==0:\n\ts-=1\nprint(s)", "n = list(map(int,input().split(' ')))\ns = 1\nif n[0]%n[1]==0:\n\ts-=1\nprint(s)"]
['Runtime Error', 'Accepted']
['s067367024', 's521909714']
[2940.0, 2940.0]
[17.0, 17.0]
[61, 75]