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
p03774
u373499377
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['def main():\n n, m = map(int, input().split())\n students = [tuple(map(int, input().split())) for i in range(n)]\n check_points = [tuple(map(int, input().split())) for i in range(m)]\n\n for a, b in students:\n dist = [abs(a - c) + abs(b - d) for c, d in check_points]\n print(min(dist) + 1)\...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s065297787', 's592037099', 's732192401']
[3060.0, 3060.0, 3060.0]
[18.0, 18.0, 19.0]
[653, 681, 665]
p03774
u393512980
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\na_b=[list(map(int,input().split()) for _ in range(n)]\nc_d=sorted([list(map(int,input().split()) for _ in range(m)])\nfor i in range(n):\n res=1\n d=abs(a_b[i][0]-c_d[0][0])+abs(a_b[i][1]-c_d[0][1])\n for j in range(m):\n t=abs(a_b[i][0]-c_d[j][0])+abs(a_b[i][1]-c_d[j][1])\n if ...
['Runtime Error', 'Accepted']
['s273762090', 's538891366']
[2940.0, 3064.0]
[18.0, 19.0]
[359, 351]
p03774
u408791346
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int,input().split())\nab = list(list(map(int, input().split())) for _ in range(n))\ncd = list(list(map(int, input().split())) for _ in range(m))\n\nfor i in range(n):\n for j in range(m):\n num = []\n num.append(abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1]))\n else:\n mini = min(...
['Wrong Answer', 'Accepted']
['s231660999', 's145161314']
[3064.0, 3064.0]
[19.0, 19.0]
[363, 359]
p03774
u430478288
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int, input().split())\nstu = []\ncheck = []\nfor i in range(n):\n stu.append(list(map(int, input().split())))\n\nfor i in range(m):\n check.append(list(map(int, input().split())))\n\n\nans = []\n\nfor i in range(n):\n dist = []\n for j in range(m):\n tmp = abs(stu[i][0] - check[j][0]) + ...
['Wrong Answer', 'Accepted']
['s649047598', 's368000102']
[3064.0, 3064.0]
[19.0, 19.0]
[455, 456]
p03774
u450145303
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M = list(map(int, input().split()))\n \ns = [list(map(int,input().split())) for i in range(n)]\nc = [list(map(int,input().split())) for j in range(n)]\n \nfor t1 in s:\n l = list(map(lambda x: abs(t1[0] - x[0]) + abs(t1[1] - x[1]), c))\n print(l.index(min(l)) + 1)', 'N,M = list(map(int, input().split()))\n \n...
['Runtime Error', 'Accepted']
['s833898176', 's878093356']
[3064.0, 3064.0]
[17.0, 19.0]
[265, 265]
p03774
u457554982
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['[n,m]=list(map(int,input().split()))\nab=[]\nfor i in range(n):\n ab.append(list(map(int,input().split())))\ncd=[]\nfor i in range(m):\n cd.append(list(map(int,input().split())))\nans=[]\nfor i in range(n):\n kyorimin=10**9\n for j in range(m):\n kyori=abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])\...
['Wrong Answer', 'Accepted']
['s408904411', 's168390150']
[3064.0, 3064.0]
[19.0, 19.0]
[419, 446]
p03774
u461833298
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nman = [[int(x) for x in input().split()] for _ in range(N)]\ncheck = [[int(x) for x in input().split()] for _ in range(M)]\n\nfor a, b in man:\n tmp = 1000000000\n ans = 1\n for i, (c, d) in enumerate(check):\n if tmp > (abs(a-c) + abs(b-d)):\n tmp = min(tm...
['Wrong Answer', 'Accepted']
['s123617413', 's976409212']
[3064.0, 3064.0]
[19.0, 18.0]
[347, 369]
p03774
u462626125
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['import os\nimport sys\n\n\ndef manhatten(tupleA,tupleB):\n\treturn abs(tupleA[0]-tupleB[0]) + abs(tupleA[1]-tupleB[1])\n\nheader = input().split()\nN,M = int(header[0]),int(header[1])\nstudents = []\ncheckpoints = []\n\nfor i in range(N):\n\tstudent = input().split()\n\tstudent = [int(x) for x in student]\n\tstudents...
['Wrong Answer', 'Accepted']
['s828182637', 's147775150']
[3064.0, 3064.0]
[19.0, 19.0]
[641, 624]
p03774
u468972478
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int, input().split())\np = [list(map(int, input().split())) for i in range(n + m)]\nfor a, b in p[:n]:\n x = [abs(a - c) + abs(b - d) for c, d in p[n:]]\nprint(x.index(min(x)) + 1)', 'n, m = map(int, input().split())\na = [input().split() for i in range(n)]\nc = []\nfor i in range(n):\n for j in range(m)...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s098746667', 's829237760', 's864755452']
[9076.0, 9072.0, 8944.0]
[30.0, 26.0, 27.0]
[188, 234, 190]
p03774
u474630266
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
["N, M = map(int, input().split())\n\nnodes, checks = [], []\nfor i in range(N):\n nodes.append(map(int, input().split()))\nfor j in range(M):\n checks.append(map(int, input().split()))\n\nfor i in range(N):\n argMin, distMin = None, float('inf')\n for j in range(M):\n dist = abs(nodes[i][0] - checks...
['Runtime Error', 'Accepted']
['s900705143', 's426783979']
[3064.0, 3064.0]
[17.0, 19.0]
[414, 436]
p03774
u476435125
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M=map(int,input().split())\nlab=[]\nfor i in range(N):\n lab.append(list(map(int,input().split())))\nlcd=[]\nfor i in range(N):\n lcd.append(list(map(int,input().split())))\nfor i in range(N):\n dmin=10**9\n for j in range(M):\n\n if abs(lab[i][0]-lcd[j][0])+abs(lab[i][1]-lcd[j][1])<dmin:\n ...
['Runtime Error', 'Accepted']
['s121791971', 's142939938']
[3064.0, 3064.0]
[19.0, 19.0]
[383, 590]
p03774
u481333386
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['# -*- coding: utf-8 -*-\n\n\ndef solve(s_pp, p_pp):\n p_nums = []\n for x, y in s_pp:\n distance = []\n for xx, yy in p_pp:\n n = abs(x, xx) + abs(y, yy)\n distance.append(n)\n p_nums.append(min(distance))\n return p_nums\n\n\ndef main():\n students, points = [in...
['Runtime Error', 'Runtime Error', 'Accepted']
['s502516128', 's696847718', 's181194254']
[3064.0, 3064.0, 3064.0]
[17.0, 17.0, 18.0]
[684, 744, 750]
p03774
u494748969
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = list(map(int, input().split()))\na = [0] * n\nb = [0] * n\nfor i in range(n):\n a[i], b[i] = list(map(int, input().split()))\nc = [0] * m\nd = [0] * m\nfor j in range(m):\n c[j], d[j] = list(map(int, input().split()))\n\nfor i in range(n):\n distance = []\n minDistance = 10 ** 8 + 1\n checkPoint...
['Runtime Error', 'Accepted']
['s794510417', 's191694519']
[3192.0, 3064.0]
[18.0, 19.0]
[598, 519]
p03774
u505420467
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\na=[]\nb=[]\nc=[]\nd=[]\nans=0\nans1=0\ntmp=0\nfor i in range(n):\n x,y=map(int,input().split())\n a.append(x)\n b.append(y)\nfor i in range(m):\n x,y=map(int,input().split())\n c.append(x)\n d.append(y)\nfor i in range(n):\n for j in range(m):\n tmp=abs(a[i]-c...
['Wrong Answer', 'Accepted']
['s545061965', 's672028105']
[3064.0, 3064.0]
[19.0, 20.0]
[434, 471]
p03774
u518042385
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\nl1=[]\nl2=[]\nfor i in range(n):\n l1.append(list(map(int,input().split())))\nfor i in range(m):\n l2.append(list(map(int,input().split())))\nfor i in range(n):\n l=abs(l1[i][0]-l2[0][0])+abs(l1[i][1]-l2[0][1])\n for j in range(1,m):\n if l>abs(l1[i][0]-l2[j][0])+abs(l1[i][1]-l2[j...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s292812348', 's995582559', 's341605123']
[3064.0, 3064.0, 3064.0]
[19.0, 18.0, 19.0]
[403, 416, 419]
p03774
u518064858
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\nh=[]\np=[]\ndef man(a,c,b,d):\n s=abs(a-b)+abs(c-d)\n return s\nfor i in range(n):\n h.append(list(map(int,input().split())))\nfor j in range(m):\n p.append(list(map(int,input().split())))\nfor k in range(n):\n l=float("inf")\n for v in range(m):\n x=man(h[k][0],...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s027838193', 's621089888', 's345352636']
[3064.0, 3064.0, 3064.0]
[19.0, 18.0, 20.0]
[382, 378, 400]
p03774
u528720841
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\ns = []\nfor i in range(0, N):\n x, y = map(int, input().split())\n s.append([x, y])\nc = []\nfor i in range(0, M):\n x, y = map(int, input().split())\n s.append([x, y])\n \nfor x,y in s:\n dist_min = 10000000000\n min_n = 0\n n = 0\n for c, d in c:\n n += 1\n dist = ab...
['Wrong Answer', 'Accepted']
['s211527057', 's036644174']
[3064.0, 3064.0]
[17.0, 19.0]
[395, 398]
p03774
u535659144
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\na=[list(map(int,input().split())) for a in range(n)]\nc=[list(map(int,input().split())) for b in range(m)]\nprint(a)\nprint(c)\ndist=0\nminnum=0\nfor indi,i in enumerate(a):\n dist=0\n min=10*14\n for indj,j in enumerate(c):\n dist+=abs(i[0]-j[0])\n dist+=abs(i[1]-...
['Wrong Answer', 'Accepted']
['s200979790', 's627595941']
[3064.0, 3064.0]
[19.0, 19.0]
[437, 437]
p03774
u539517139
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int, input().split())\ns=[list(map(int, input().split())) for _ in range(n)]\nc=[list(map(int, input().split())) for _ in range(m)]\nfor a,b in s:\n k=[]\n for c,d in c:\n k.append(abs(a-c)+abs(b-d))\n print(k.index(min(k))+1)', 'n,m=map(int, input().split())\ns=[list(map(int, input().split())) for _ in...
['Runtime Error', 'Accepted']
['s578993694', 's229161021']
[3060.0, 3060.0]
[17.0, 18.0]
[233, 233]
p03774
u551109821
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M = map(int,input().split())\nA = []\nB = []\nC = []\nD = []\nans = []\n\nfor i in range(N):\n a,b = map(int,input().split())\n A.append(a)\n B.append(b)\n\nfor j in range(M):\n c,d = map(int,input().split())\n C.append(c)\n D.append(d)\n\nfor i in range(N):\n item = abs(A[i]-C[0])-abs(B[i]-D[0...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s609754204', 's633561124', 's219722371']
[3064.0, 3064.0, 3064.0]
[19.0, 19.0, 19.0]
[507, 531, 528]
p03774
u557494880
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M = map(int,input().split())\ngakusei = []\nfor i in range(N):\n a,b = map(int,input().split())\n gakusei.append((a,b))\ncheck = []\nfor i in range(1,M+1):\n c,d = map(int,input().split())\n check.append((c,d))\nfor i in range(N):\n a,b = gakusei[i]\n z = 10**9\n m = 0\n for j in range(1,M+1...
['Wrong Answer', 'Accepted']
['s313610421', 's927113240']
[3064.0, 3064.0]
[19.0, 19.0]
[448, 439]
p03774
u588081069
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = list(map(int, input().split()))\nSt = [input().split() for _ in range(N)]\nCh = [input().split() for _ in range(M)]\n\nprint(St)\nfor i in range(N):\n memo = []\n for j in range(M):\n diff = abs(int(St[i][0]) - int(Ch[j][0])) + abs(int(St[i][1]) - int(Ch[j][1]))\n memo.append(diff)\n pri...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s423811267', 's998873693', 's354854965']
[3064.0, 3060.0, 3064.0]
[21.0, 21.0, 21.0]
[338, 324, 328]
p03774
u594956556
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nstudent = [list(map(int, input().split())) for _ in range(N)]\ncp = [list(map(int, input().split())) for _ in range(M)]\n\nidou = []\nfor a, b in student:\n idousaki = -1\n nearest = 1000000000\n for i, x, y in enumerate(cp):\n d = abs(x-a) + abs(y-b)\n if d < nearest:\n ...
['Runtime Error', 'Accepted']
['s790383939', 's770931546']
[3064.0, 3064.0]
[17.0, 19.0]
[402, 408]
p03774
u609814378
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['a', 'N, M = map(int, input().split())\n\nstudentlis = []\nfor _ in range(N):\n a, b = map(int, input().split())\n studentlis.append([a,b])\n\ncheckpointlis = []\nfor _ in range(M):\n c, d = map(int, input().split())\n checkpointlis.append([c,d])\n\nans_lis = []\n\n\nfor i in range(len(studentlis)):\n a...
['Runtime Error', 'Accepted']
['s781728335', 's234380477']
[2940.0, 3064.0]
[17.0, 19.0]
[1, 793]
p03774
u623687794
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\nstudents=[]\nchecks=[]\ndef mdistance([a,b],[c,d]):\n return abs(a-c)+abs(b-d)\nfor i in range(n):\n a=list(map(int,input().split()))\n students.append(a)\nfor i in range(m):\n checks.append(list(map(int,input().split())))\nfor i in range(n):\n anspoint=0\n for j in range(m):\n ...
['Runtime Error', 'Accepted']
['s887927280', 's426665767']
[2940.0, 3064.0]
[17.0, 20.0]
[409, 419]
p03774
u623814058
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nx = [list(map(int, input().split())) for _ in range(N)]\ny = [list(map(int, input().split())) for _ in range(M)]\nfor a,b in ab:\n z = [abs(a-c) + abs(b-d) for c,d in cd]\n print(z.index(min(z))+1)', 'N = int(input())\n\ny = []\n\nfor i in range(1, N//2):\n if N % i == 0:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s054509239', 's691553752', 's387749990']
[9064.0, 9068.0, 9072.0]
[25.0, 26.0, 28.0]
[232, 143, 230]
p03774
u664481257
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['# -*- coding: utf-8 -*-\n# !/usr/bin/env python\n# vim: set fileencoding=utf-8 :\n\n\nimport math\n\n\ndef calc_distance(student_post, checkpoint_post):\n return int(math.fabs(student_post[0] - checkpoint_post[0]) + math.fabs(student_post[1] - checkpoint_post[1]))\n\n\nif __name__ == \'__main__\':\n import doct...
['Wrong Answer', 'Accepted']
['s330441250', 's187271707']
[7048.0, 7048.0]
[61.0, 60.0]
[1047, 968]
p03774
u666964944
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m = map(int, input().split())\ns = [tuple(map(int,input().split())) for _ in range(n)]\nc = [tuple(map(int,input().split())) for _ in range(m)]\nfor i in range(n):\n mini = 0\n m_i = 0\n for j in range(m):\n dis = abs(s[i][0]-c[j][0])+abs(s[i][1]-c[j][1])\n print(mini, dis)\n if j==0:\n mini, m_i =...
['Wrong Answer', 'Accepted']
['s733035932', 's325448397']
[9036.0, 9140.0]
[32.0, 32.0]
[393, 372]
p03774
u671252250
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['# coding: utf-8\n# Your code here!\n\nN, M = map(int, input().split())\nstd_li = [list(map(int, input().split())) for i in range(N)]\nchk_li = [list(map(int, input().split())) for j in range(M)]\ndist = 0\n\nfor i in range(N):\n ctr = 0\n min_dist = pow(10,8) * 4 + 1\n for j in range(M):\n dist = abs(...
['Wrong Answer', 'Accepted']
['s704121078', 's624297333']
[3368.0, 3064.0]
[22.0, 19.0]
[494, 464]
p03774
u686036872
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\n\nA = []\nfor i in range(N):\n a, b = map(int, input().split())\n A.append([a, b])\nprint(A)\nfor i in range(M):\n c, d = map(int, input().split())\n saitei = float("inf")\n for j in range(N):\n if abs(A[j][0]-c) + abs(A[j][1]-d) < saitei:\n saitei = ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s297291448', 's380571887', 's711158937', 's765861334', 's960734424', 's522348474']
[3064.0, 2940.0, 2940.0, 3064.0, 3064.0, 3064.0]
[19.0, 25.0, 17.0, 17.0, 17.0, 19.0]
[413, 448, 483, 452, 452, 452]
p03774
u697696097
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['import sys\nfrom io import StringIO\nimport unittest\n\ndoTest=1\n\ndef yn(b):\n print("Yes" if b==1 else "No")\n return\n\ndef resolve():\n readline=sys.stdin.readline\n n,m=list(map(int, readline().strip().split()))\n a=[0]*n\n b=[0]*n\n c=[0]*m\n d=[0]*m\n\n for i in range(n):\n a...
['Wrong Answer', 'Accepted']
['s663219221', 's208041503']
[6244.0, 5616.0]
[69.0, 43.0]
[820, 820]
p03774
u699522269
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M = map(int,input().split())\nsts = [list(map(int, input().split())) for i in range(N)]\ncheckp = [[i+1]+list(map(int, input().split())) for i in range(M)]\nrt = [None] * N\ndistances = [2*(10**8)] * N\nfor s in range(N):\n for c in checkp:\n dist = abs(sts[s][0]-c[1]) + abs(sts[s][1]-c[2])\n if rt[s] is Non...
['Wrong Answer', 'Accepted']
['s939304748', 's117965410']
[9072.0, 9056.0]
[26.0, 31.0]
[456, 470]
p03774
u714300041
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['import numpy as np\n\nN, M = map(int, input().split())\nA = [map(int, input().split()) for _ in range(N)]\nB = [map(int, input().split()) for _ in range(M)]\n\nfor (x, y) in A:\n d = np.array([])\n for q in B:\n print("q = ", q)\n print("*q=", *q,)\n a, b = q\n d = np.append(d, abs(x...
['Runtime Error', 'Accepted']
['s880178930', 's966211614']
[2940.0, 12424.0]
[17.0, 166.0]
[349, 302]
p03774
u733814820
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['from a import resolve\n\nimport sys\nfrom io import StringIO\nimport unittest\n\nclass TestClass(unittest.TestCase):\n def assertIO(self, input, output):\n stdout, stdin = sys.stdout, sys.stdin\n sys.stdout, sys.stdin = StringIO(), StringIO(input)\n resolve()\n sys.stdout.seek(0)\n ...
['Runtime Error', 'Accepted']
['s605342644', 's638383513']
[3064.0, 3064.0]
[18.0, 18.0]
[1071, 458]
p03774
u735008991
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nS = [list(input().split()) for _ in range(N)]\nC = [list(input().split()) for _ in range(M)]\nfor a, b in S:\n dist = [abs(a-c) + abs(b-d) for c, d in C]\n print(dist[dist.index(min(dist))])\n', 'N, M = map(int, input().split())\nS = [list(map(int, input().split())) for _ in ra...
['Runtime Error', 'Accepted']
['s071481070', 's194425654']
[3060.0, 3060.0]
[17.0, 18.0]
[226, 242]
p03774
u750651325
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int,input().split())\n\nlist_a = []\nlist_b = []\ncount = 0\nans = [10**8 for i in range(N)]\n\nfor i in range(N):\n a = [int(i) for i in input().split()]\n list_a.append(a)\n \nfor i in range(M):\n b = [int(i) for i in input().split()]\n list_b.append(b)\n \nfor i in range(N):\n ans_x...
['Wrong Answer', 'Accepted']
['s990145586', 's844978819']
[3064.0, 3064.0]
[19.0, 19.0]
[576, 504]
p03774
u762603420
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = list(map(int, input().split()))\n\na = []\nc = []\nfor i in range(0, N + M):\n s = list(map(int, input().split()))\n if i < N:\n a.append(s)\n else:\n c.append(s)\n\nprint (a)\nprint (c)\n\nfor i in range(0, N):\n min_idx = 0\n min_dis = 999999999999\n for j in range(0, M):\n ...
['Wrong Answer', 'Accepted']
['s434171277', 's207094061']
[3064.0, 3064.0]
[18.0, 19.0]
[463, 442]
p03774
u767664985
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\na, b, c, d = [0] * N, [0] * N, [0] * M, [0] * M\nfor i in range(N):\n\ta[i], b[i] = map(int, input().split())\nfor i in range(M):\n\tc[i], d[i] = map(int, input().split())\n\nfor j in range(N):\n\tfor k in range(M - 1, -1, -1):\n\t\tans = "nan"\n\t\tdiff = float("inf")\n\t\tif abs(a[...
['Wrong Answer', 'Accepted']
['s080420760', 's191051840']
[3064.0, 3064.0]
[21.0, 19.0]
[407, 395]
p03774
u782654209
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
["N,M=map(int,input().split(' '))\nS = [list(map(int,input().split(' '))) for i in range(N)]\nC = [list(map(int,input().split(' '))) for i in range(M)]\nfor i in range(N):\n l = [abs(S[i][0]-C[i][0])+abs(S[i][1]-C[i][1]) for i in range(M)]\n print(l.index(min(l))+1)", "N,M=map(int,input().split(' '))\nS = [list(map(i...
['Runtime Error', 'Accepted']
['s650116479', 's792762222']
[3064.0, 3064.0]
[19.0, 19.0]
[261, 262]
p03774
u784022244
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M=map(int, input().split())\nS=[]\nfor i in range(N):\n a,b=map(int, input().split())\n S.append((a,b))\n\nC=[]\nfor i in range(M):\n c,d=map(int, input().split())\n C.append((c,d,i+1))\nprint(C)\nfor s in S:\n a,b=s\n now=0\n dis=10**9\n\n for t in C:\n c,d,n=t\n D=abs(c-a)+ab...
['Wrong Answer', 'Accepted']
['s864075638', 's121271513']
[3064.0, 3064.0]
[18.0, 19.0]
[384, 385]
p03774
u785578220
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['a,b = map(int, input().split())\nx = []\nz = []\nm =19999999999999\ns = 1\nfor i in range(a):\n ta , tb = map(int, input().split()) \n x.append([ta,tb])\nfor i in range(a):\n ta , tb = map(int, input().split())\n z.append([ta,tb])\nfor ta , tb in x:\n s = 0\n m =19999999999999\n for n,(s,y) in e...
['Runtime Error', 'Accepted']
['s839889610', 's416222838']
[3264.0, 3064.0]
[23.0, 19.0]
[484, 293]
p03774
u790048565
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nAB = []\nfor _ in range(N):\n a, b = map(int, input().split())\n AB.append((a, b))\n\nCD = []\nfor _ in range(M):\n c, d = map(int, input().split())\n CD.append((c, d))\n\ncheck_index = []\nfor i, ab in enumerate(AB):\n min_index = 0\n for j, cd in enumerate(CD):\n check_dis...
['Runtime Error', 'Accepted']
['s367134879', 's396748230']
[3064.0, 3064.0]
[22.0, 19.0]
[489, 560]
p03774
u803848678
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = list(map(int, input().split()))\na = []\nb = []\nc = []\nd = []\nfor i in range(N):\n aa, bb = list(map(int, input().split()))\n a.append(aa)\n b.append(bb)\n\nfor i in range(M):\n cc, dd = list(map(int, input().split()))\n c.append(cc)\n d.append(dd)\n\nans = []\nfor i in range(N):\n x = ...
['Wrong Answer', 'Accepted']
['s665461145', 's265634774']
[3064.0, 3064.0]
[18.0, 18.0]
[561, 566]
p03774
u816645498
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['#include<bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\n\nint main()\n{\n int N, M;\n scanf("%d %d", &N, &M);\n int a[N], b[N];\n REP(i, N) scanf("%d %d", &a[i], &b[i]);\n int c[M], d[M];\n REP(i, M) scanf("%d %d", &c[i], &d[i]);\n REP(i, N) {\n int res = -1;\n int dis...
['Runtime Error', 'Accepted']
['s674656132', 's749304165']
[2940.0, 3064.0]
[18.0, 18.0]
[550, 442]
p03774
u844005364
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int, input().split())\n\nstudents = [list(map(int, input().split())) for _ in range(n)]\ncheckpoints = [list(map(int, input().split())) for _ in range(m)]\n\nfor a, b in students:\n min_distance = float("inf")\n min_checkpoint = 0\n for i, cd in enumerate(checkpoints):\n c, d = cd\n ...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s101986529', 's663044339', 's067421082']
[3064.0, 3064.0, 3064.0]
[19.0, 17.0, 18.0]
[411, 365, 462]
p03774
u846226907
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N,M = map(int,input().split())\n\na = [0]*N\nb = [0]*N\n\nfor i in range(N):\n a[i],b[i] = map(int,input().split())\n\nx = [0]*M\ny = [0]*M\n\nfor i in range(M):\n x[i],y[i]= map(int,input().split())\n\nfor i in range(N):\n dis = 10000000000000000\n for j in range(M):\n dis = min(dis,(abs(a[i]-x[j...
['Wrong Answer', 'Accepted']
['s082266623', 's392548084']
[3064.0, 3064.0]
[19.0, 19.0]
[355, 425]
p03774
u852790844
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['import numpy as np\nfrom scipy.spatial.distance import minkowski\n\nn, m = map(int, input().split())\na = np.array([list(map(int, input().split())) for i in range(n)])\nfor i in range(m):\n b = np.array(list(map(int,input())))\n c = np.array([minkowski(i, b , 1) for i in a], dtype=np.int64)\n ans = np.argmin...
['Runtime Error', 'Accepted']
['s684236796', 's539041173']
[14896.0, 19368.0]
[182.0, 289.0]
[332, 361]
p03774
u853900545
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m = map(int,input().split())\na = [0]*n\nb = [0]*n\nc = [0]*m\nd = [0]*m\n\nfor i in range(n):\n a[i],b[i] = map(int,input().split())\nfor i in range(m):\n c[i],d[i] = map(int,input().split())\n \nD = [[0]*m]*n\nfor i in range(n):\n for j in range(m):\n D[i][j] = abs(a[i]-b[i])+abs(c[i]-d[i])\n\n...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s329544098', 's618663817', 's699632828', 's724294525', 's914072623', 's002797086']
[3064.0, 3192.0, 3064.0, 3064.0, 3064.0, 3188.0]
[18.0, 20.0, 19.0, 19.0, 18.0, 21.0]
[355, 399, 355, 412, 355, 414]
p03774
u856169020
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['N, M = map(int, input().split())\nstu = []\nfor _ in range(N):\n stu.append(tuple(map(int, input().split())))\nche = []\nfor _ in range(M):\n che.append(tuple(map(int, input().split())))\n\nfor i in range(N):\n ans = 0\n min_l = pow(10, 10)\n for j in range(M):\n l = abs(stu[i][0] - che[i][0]) + abs(stu[i][1]...
['Runtime Error', 'Accepted']
['s170905873', 's603076726']
[3064.0, 3064.0]
[18.0, 18.0]
[382, 382]
p03774
u859897687
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\na=[list(map(int,input().split()))for i in range(n)]\nb=[list(map(int,input().split()))for i in range(m)]\nfor i in a:\n ans=10**18\n for j in b:\n ans=min(ans,abs(i[0]-j[0])+abs(i[1]-j[1]))', 'n,m=map(int,input().split())\na=[list(map(int,input().split()))for i in range(n)]\nb=[list...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s031170659', 's838443283', 's880338752']
[3060.0, 3060.0, 3064.0]
[19.0, 19.0, 19.0]
[218, 231, 275]
p03774
u878138257
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m = map(int,input().split())\nlistA = [list(map(int, list(input()))) for i in range(n)]\nlistB = [list(map(int, list(input()))) for j in range(m)]\nlistC=[]\nfor k in range(n):\n for l in range(m):\n listC.append(abs(listA[k][0]-listB[l][0])+abs(list[k][1]-listB[l][1]))\n listC.sort()\n print(listC[0])\n', 'n...
['Runtime Error', 'Accepted']
['s659268924', 's133643160']
[3064.0, 3064.0]
[17.0, 20.0]
[304, 329]
p03774
u900303768
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int,input().split())\n\nla = []\nfor i in range(n):\n a, b = map(int, input().split())\n la.append((a,b))\n\nca = []\nfor i in la:\n a, b = map(int, input().split())\n ca.append((a,b))\n\nfor i in ca:\n mi = 1000000001\n ans = 0\n for j in range(len(ca)):\n if abs(i[0]-ca[j][0])...
['Runtime Error', 'Accepted']
['s436052783', 's784137644']
[3064.0, 3064.0]
[19.0, 21.0]
[425, 428]
p03774
u905582793
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\nstd = [list(map(int,input().split())) for i in range(n)]\nchk = [list(map(int,input().split())) for i in range(m)]\nfor s in std:\n print(min(lambda i:abs(s[0]-chk[i][0])+abs(s[1]-chk[i][1])))', 'n,m=map(int,input().split())\nstd = [list(map(int,input().split())) for i in range(n)]\nchk...
['Runtime Error', 'Accepted']
['s650006126', 's388170284']
[3060.0, 3064.0]
[17.0, 22.0]
[219, 282]
p03774
u922449550
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
["N, M = map(int, input().split())\nab = [list(map(int, input().split())) for i in range(N)]\ncd = [list(map(int, input().split())) for i in range(M)]\n\nans = []\nfor i, (a, b) in enumerate(ab):\n min_dist = 10**20\n idx = -1\n for j, (c, d) in enumerate(cd):\n dij = abs(a - c) + abs(b - d)\n if dij < min_dis...
['Wrong Answer', 'Accepted']
['s494347165', 's583112071']
[3064.0, 3064.0]
[19.0, 18.0]
[386, 388]
p03774
u939822134
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['import sys\nimport numpy as np\n\nN, M = (int(i) for i in input().split(" "))\nS = [input().split(" ") for i in range(N + M)]\n\nseito = S[0:N]\ncheck = S[N:N+M]\n\nkyori = np.zeros(M)\n\nfor j in range(0,N):\n\tfor i in range(0,M):\n\t\tkyori[i] = abs(int(seito[j][0]) - int(check[i][0])) + abs(int(seito[j][1]) - int...
['Wrong Answer', 'Accepted']
['s701800436', 's446208364']
[12496.0, 12492.0]
[150.0, 154.0]
[396, 400]
p03774
u945418216
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
["n,m = map(int, input().split())\naa = [0] * m\nbb = [0] * m\ncc = [0] * m\ndd = [0] * m\n\nfor i in range(n):\n aa[i], bb[i] = map(int, input().split())\nfor i in range(m):\n cc[i], dd[i] = map(int, input().split())\n\ndistance = []\nfor i in range(n):\n d = []\n for j in range(m):\n d_ = abs(aa[i]...
['Runtime Error', 'Accepted']
['s309855670', 's333408355']
[3316.0, 3064.0]
[24.0, 18.0]
[501, 329]
p03774
u957957759
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\na=[]\nb=[]\nc=[]\nd=[]\nx=[]\ny=[]\nl=[]\np=[]\nfor i in range(n):\n ai,bi=map(int,input().split())\n a.append(ai)\n b.append(bi)\nfor j in range(m):\n ci,di=map(int,input().split())\n c.append(ci)\n d.append(di)\n \nfor i in range(n):\n for j in range(m):\n ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s024932725', 's163576491', 's492049495', 's912990549', 's628029645']
[3188.0, 3188.0, 3064.0, 3188.0, 3188.0]
[20.0, 19.0, 18.0, 22.0, 20.0]
[476, 478, 498, 483, 508]
p03774
u970197315
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['# ABC057 B - Checkpoints\nsi = lambda: input()\nni = lambda: int(input())\nnm = lambda: map(int, input().split())\nnl = lambda: list(map(int, input().split()))\nn,m = nm()\n\nAB = []\nCD = []\nans = 10**10\nfor i in range(n):\n a,b = nm()\n AB.append(a)\n AB.append(b)\n\nfor i in range(m):\n c,d = nm()\n ...
['Wrong Answer', 'Accepted']
['s333040100', 's119239477']
[3064.0, 8984.0]
[18.0, 29.0]
[448, 511]
p03774
u970198631
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['MM = input().split()\nN = int(MM[0])\nM = int(MM[1])\nlist1 = []\nlist2 = []\nfor i in range(N):\n LL = input().split()\n list1.append(LL)\nprint(list1)\nfor i in range(M):\n MM = input().split()\n list2.append(MM)\nprint(list2)\nfor i in list1:\n mini = 40**8\n ans = 0\n for j in range(len(list2)):\n x = i...
['Wrong Answer', 'Accepted']
['s967651427', 's628382831']
[9184.0, 8984.0]
[29.0, 28.0]
[460, 429]
p03774
u977389981
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n, m = map(int, input().split())\nAB = [[int(i) for i in input().split()] for i in range(n)]\nCD = [[int(i) for i in input().split()] for i in range(m)]\n\nfor a, b in AB:\n dist = 10 ** 12\n for i, cd in enumerate(CD):\n tmp = abs(a - cd[0]) + abs(b - cd[1])\n if tmp < dist:\n dist = t...
['Wrong Answer', 'Accepted']
['s844852946', 's013637399']
[3064.0, 3064.0]
[19.0, 18.0]
[359, 254]
p03774
u999503965
2,000
262,144
There are N students and M checkpoints on the xy-plane. The coordinates of the i-th student (1 \leq i \leq N) is (a_i,b_i), and the coordinates of the checkpoint numbered j (1 \leq j \leq M) is (c_j,d_j). When the teacher gives a signal, each student has to go to the nearest checkpoint measured in _Manhattan distan...
['n,m=map(int,input().split())\n\na_lis=[list(map(int,input())) for i in range(n)]\nc_lis=[list(map(int,input())) for i in range(m)]\n\nfor i in range(n):\n num=0\n ans=10**8\n for j in reversed(range(m)):\n a=a_lis[i]\n c=c_lis[j]\n num=abs(a[0]-c[0])+abs(a[1]-c[1])\n ans=min(ans,num)\n if num==ans:\...
['Runtime Error', 'Runtime Error', 'Accepted']
['s771375173', 's886796195', 's497663687']
[9116.0, 9112.0, 9192.0]
[22.0, 24.0, 30.0]
[336, 337, 354]
p03775
u005388620
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\n\nn = int(input())\na = math.sqrt(n)\n\nif n % a == 0.0:\n b = math.log10(a) + 1\n print(b)\nelse:\n a = int(a)\n while n % a != 0.0:\n a = a -1\n b = math.log10(a) + 1\n print(b)\n ', 'import math\n\n\nn = int(input())\na = math.sqrt(n)\n\nif n % a == 0.0:\n b = int(ma...
['Wrong Answer', 'Accepted']
['s124628837', 's748525318']
[2940.0, 3060.0]
[34.0, 30.0]
[213, 252]
p03775
u009787707
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['def cal1(n):\n num=(n**0.5)//1+1\n for i in range(num,n+1):\n if n//i==0:\n num=i\n break\n return num\n\nimport math\n\nN=int(input())\nnum=cal1(N)\nprint(int((math.log(num,10)+1)//1))', 'def cal(N):\n num=(N**0.5)//1\n num=int(num)\n for i in range(num,0,-1):\n i...
['Runtime Error', 'Accepted']
['s222391898', 's295806205']
[9416.0, 9348.0]
[29.0, 35.0]
[211, 199]
p03775
u013408661
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n=int(input())\nans=10\nfor i in range(1,10**5+1):\n if n%i==0:\n ans=min(ans,len(str(n//i)))\nprint(ans)', 'n=int(input())\nans=10\nfor i in range(1,10**5+1):\n if n%i==0 and n//i>=i:\n ans=min(ans,len(str(n//i)))\nprint(ans)']
['Wrong Answer', 'Accepted']
['s180945242', 's421767928']
[2940.0, 3060.0]
[32.0, 32.0]
[104, 116]
p03775
u017050982
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\nN = int(input())\nfor i in range(1,int(math.sqrt(N))+1):\n if N % i == 0:\n ans = math.log10(N // i) // 1 + 1\nprint(ans)', 'import math\nN = int(input())\nfor i in range(1,int(math.sqrt(N))+1):\n if N % i == 0:\n ans = math.log10(N // i) // 1 + 1\nprint(int(ans))\n']
['Wrong Answer', 'Accepted']
['s598797236', 's032293134']
[9148.0, 9284.0]
[42.0, 42.0]
[139, 145]
p03775
u020604402
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int(input())\nfor i in range(1,1+int(N)):\n if N % i == 0:\n tmp = i\ns = max(len(str(N // tmp)),len(str(tmp)))\nans = min(ans,s)', 'N = int(input())\nan = 10**10\nfor i in range(1,1+int(N)):\n if N % i == 0:\n tmp = i\n s = max(len(str(N // tmp)),len(str(tmp)))\n ans = min(ans,s...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s544467668', 's704201504', 's926751358', 's243196355']
[2940.0, 3060.0, 2940.0, 3060.0]
[2104.0, 18.0, 2104.0, 33.0]
[138, 177, 149, 132]
p03775
u033963510
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['\n\nN = int(input())\ndef checklen(A, B):\n return max(len(str(A)), len(str(B)))\n\nans = float("inf")\nfor i in range(1,round(N/2):\n if N % i == 0:\n m = round(N/i)\n ans = min(checklen(i, m), ans)\nprint(ans)', '\nimport math\n\nN = int(input())\ndef checklen(A, B):\n return max(len(str(A)),...
['Runtime Error', 'Accepted']
['s815007902', 's407732060']
[2940.0, 3188.0]
[17.0, 30.0]
[220, 251]
p03775
u037430802
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['def getPrimeFactorsList(num):\n pn = 2 \n pflist = [] \n while pn * pn <= num: \n while num % pn == 0: \n num = num / pn\n pflist.append(pn)\n pn += 1 \n if num > 1:\n pflist.append(int(num))\n \n return pflist\n\nn = int(input())\n\npf = getPrimeFactorsList(n)\npf_r = reversed(pf)\nprint(p...
['Wrong Answer', 'Accepted']
['s145304784', 's381382398']
[3064.0, 3060.0]
[35.0, 43.0]
[594, 175]
p03775
u038408819
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
["n = int(input())\nimport math\nans = float('Inf')\nsq = int(math.sqrt(n)) + 1\nfor i in range(1, sq):\n #print(i, n // i)\n if n % i != 0:\n continue\n print(i, n // i)\n ans = min(ans, max(len(str(i)), len(str(n // i))))\nprint(ans)", "n = int(input())\nimport math\nans = float('Inf')\nsq = int(ma...
['Wrong Answer', 'Accepted']
['s898116844', 's051830566']
[3316.0, 3060.0]
[31.0, 30.0]
[242, 244]
p03775
u054556734
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\nn = int(input())\nnn = int(math.sqrt(n))\nwhile n%i != 0: i-=1\nprint(len(str(n//i)))\n', 'import math\nn = int(input())\nnn = int(math.sqrt(n))\nwhile n%nn != 0: nn-=1\nprint(len(str(n/nn)))', 'import math\nn = int(input())\nnn = int(math.sqrt(n))\nwhile n%nn != 0: nn-=1\nans = len(str(n/nn))\nprint(ans...
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s424193083', 's518566407', 's797720163', 's830026366']
[2940.0, 2940.0, 3064.0, 3060.0]
[17.0, 36.0, 36.0, 32.0]
[95, 96, 106, 93]
p03775
u057109575
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['from math import sqrt\nN = int(input())\nans = []\nfor i in range(1, int(sqrt(N)) + 1):\n if i * (N // i) == N:\n ans.append(max(len(str(i)), len(str(N // i)))\nprint(min(ans))', 'from math import sqrt\nN = int(input())\nans = [1]\nfor i in range(1, int(sqrt(N))):\n if i * (N // i) == N:\n ans.app...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s334298508', 's631192298', 's309835163']
[2940.0, 3060.0, 3060.0]
[17.0, 38.0, 32.0]
[180, 187, 89]
p03775
u072606168
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
["import math\nn = int(input())\ndef f(n):\n g = float('inf')\n for i in [j for j in range(1,math.ceil(n**0.5))+1 if n%j == 0]:\n if g > len(str(max(i,n//i))):\n g = len(str(max(i,n//i)))\n if g == float('inf'):\n g = 1\n return g\nprint(f(n))", "n = int(input())\ndef f(n):\n g = float('inf')\n f...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s582236352', 's964459002', 's123043377']
[3188.0, 3060.0, 3060.0]
[18.0, 2104.0, 28.0]
[252, 195, 252]
p03775
u074445770
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['\n#include <sstream>\n#include <cstdio>\n#include <cstdlib>\n#include <cmath>\n#include <ctime>\n#include <cstring>\n#include <string>\n\n#include <stack>\n\n#include <deque>\n#include <map>\n#include <set>\n#include <bitset>\n#include <numeric>\n#include <utility>\n#include <iomanip>\n#include <algorithm>\n#include ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s245318923', 's376128935', 's184135171']
[2940.0, 3060.0, 3064.0]
[17.0, 17.0, 55.0]
[2266, 234, 437]
p03775
u075012704
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int(input())\nF = 999;\nfor i in range(1,int(sqrt(N))+1):\n \n if N%i == 0: \n F = min(F , max( len(str(i)) , len(str(N//i)) ) )\nprint(F)\n ', 'N = int(input())\nF = 999;\nfor i in range(1,int(sqrt(N))+1):\n if N%i == 0: \n F = min(F , max( len(str(i)) , len(str(N//i)) ) )\nprint(...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s092671982', 's526599327', 's973176164', 's775057013']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0, 30.0]
[292, 287, 305, 405]
p03775
u076936237
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
["import math\n\ndef F(A, B):\n return max(list(map(int, [math.log10(A), math.log10(B)])))+1\n\n\ndef main():\n N = int(input())\n max_ = 0\n for a in range(1, int(math.sqrt(N))+1):\n if N % a != 0:\n continue\n\n b = N/a\n v = F(a, b)\n print(a, v)\n if max_ < ...
['Wrong Answer', 'Accepted']
['s399134788', 's622590947']
[3444.0, 3060.0]
[30.0, 27.0]
[379, 359]
p03775
u085334230
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['for A in range(1, int((N / 2))):\n if N % A == 0:\n B = int(N / A)\n if len(str(A)) <= len(str(B)):\n res = len(str(B))\n elif len(str(A)) >= len(str(B)):\n res = len(str(A))\n cont.append(res)\n else:\n continue\nprint(min(cont))', 'def make_divisors(n):...
['Runtime Error', 'Accepted']
['s559596451', 's061657965']
[3060.0, 3060.0]
[17.0, 27.0]
[283, 384]
p03775
u088863512
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['# -*- coding: utf-8 -*-\nimport sys\n# from collections import defaultdict, deque\nfrom math import log10, sqrt, ceil\ndef input(): return sys.stdin.readline()[:-1] # warning not \\n\n\n\ndef c(x):\n cnt = 0\n n = x\n while n:\n n //= 10\n cnt += 1\n return cnt\n\ndef solve():\n n = int(i...
['Wrong Answer', 'Accepted']
['s045091878', 's672017547']
[3064.0, 3064.0]
[30.0, 29.0]
[785, 737]
p03775
u095562538
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['# coding: utf-8\n# Here your code\n\n\n\nN = int(input())\nresult = len(str(N))\n\nfor i in range(1,int(pow(N,0.5))):\n if(N % i == 0):\n s = max(len(str(i)), len(str(N/i)))\n result = min(s,result)\nprint(result)\n\n\n', '# coding: utf-8\n# Here your code\n\n\n\nN = int(input())\nresult = len(str(N)...
['Wrong Answer', 'Accepted']
['s422343625', 's626207166']
[3060.0, 3060.0]
[30.0, 30.0]
[221, 228]
p03775
u103099441
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['from math import sqrt\nn = int(input())\nx = n\ni = 2\nwhile i <= sqrt(n):\n if n % i == 0:\n x = n / i\n i += 1\nprint(len(str(x)))\n', 'from math import sqrt\nn = int(input())\nx = n\ni = 2\nwhile i <= sqrt(n):\n if n % i == 0:\n x = n / i\n i += 1\nprint(len(str(int(x))))\n']
['Wrong Answer', 'Accepted']
['s214922291', 's292511390']
[2940.0, 2940.0]
[58.0, 65.0]
[138, 143]
p03775
u106778233
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int(input()) \nans = 111111111110\nfor i in range(int(N**0.5+2)):\n if N%i == 0:\n use = N//i \n s = str(use) \n t = str(i) \n ans = min(ans, max(len(s), len(t))) \n\nprint(ans)', 'N = int(input()) \nans = 111111111110\nfor i in range(1,int(N**0.5+2)):\n if N%i == 0:\n use...
['Runtime Error', 'Accepted']
['s376068567', 's554526217']
[9444.0, 9424.0]
[24.0, 41.0]
[203, 205]
p03775
u111202730
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int(input())\n\nans = [1]\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n tmp = max(len(str(i)), len(str(int(N/i))))\n ans.append(tmp)\n\nprint(min(ans))\n', 'N = int(input())\n\nans = []\nfor i in range(1, int(N**0.5)+1):\n if N % i == 0:\n ans.append(i)\n ans.append(int(N...
['Wrong Answer', 'Accepted']
['s777057691', 's414026236']
[3188.0, 3060.0]
[31.0, 31.0]
[173, 193]
p03775
u111525113
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n = int(input())\nfmax = 0\nfor i in range(1,n//2+1):\n a = i\n b = n // i\n if b != n/i :\n continue\n \n alen = len(str(a))\n blen = len(str(b))\n f = max(alen, blen)\n fmax = max(fmax,f)\nprint(fmax)', 'n = int(input())\nfmin = 100\nfor i in range(1,int(n**0.5)+1):\n a = i\n b = n // i\n if b != n/i ...
['Wrong Answer', 'Accepted']
['s783934652', 's383516855']
[3064.0, 3064.0]
[2104.0, 53.0]
[201, 210]
p03775
u119655368
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n = int(input())\nl = []\nfor i in range(1, int(math.sqrt(n)//1)):\n if n % i == 0:\n l.append(int(n / i))\nprint(len(str(l[-1])))', 'import math\nn = int(input())\nl = []\nfor i in range(1, int(math.sqrt(n)//1)+1):\n if n % i == 0:\n l.append(int(n / i))\nprint(len(str(l[-1])))']
['Runtime Error', 'Accepted']
['s368971589', 's583561516']
[2940.0, 3060.0]
[17.0, 30.0]
[135, 149]
p03775
u123729319
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int(input())\n\nF = len(str(N))\nfor A in range(1, int(N**0.5)+1):\n if N%A != 0:\n continue\n B = N // A\n F = min(F, max([len(str(x)) for x in [A,B]]))\n print(F,A,B)\n\nprint(F)', 'N = int(input())\n\nF = len(str(N))\nfor A in range(1, int(N**0.5)+1):\n if N%A != 0:\n continue\n ...
['Wrong Answer', 'Accepted']
['s427803227', 's029621865']
[3316.0, 3060.0]
[31.0, 30.0]
[193, 176]
p03775
u126747509
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['\n#include <algorithm>\n#include <cmath>\n#include <string>\n\n\nusing namespace std;\n\n\nlong long f(long long a, long long b)\n{\n string x=to_string(a), y=to_string(b);\n return max(x.length(), y.length());\n}\n\n\nint main()\n{\n long long n, i, minv=100000000000;\n\n cin >> n;\n i = 1;\n while (i <= (long...
['Runtime Error', 'Accepted']
['s315930496', 's090682450']
[2940.0, 3060.0]
[17.0, 63.0]
[452, 319]
p03775
u131405882
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\nN=int(input())\nnmax = math.floor(math.sqrt(N))\nBdigimax = 1\nfor i in range(1,nmax):\n\tif N % i == 0:\n\t\tBdigi = math.log10(N/i)\n\t\tif Bdigimax < Bdigi:\n\t\t\tBdigimax = Bdigi\nprint(int(Bdigimax))\n', 'import math\nN=int(input())\nif N==1:\n\tprint(1)\nelse:\n\tnmax = math.ceil(math.sqrt(N))\n\t...
['Wrong Answer', 'Runtime Error', 'Accepted']
['s078020420', 's464028590', 's577201954']
[2940.0, 3060.0, 3060.0]
[30.0, 17.0, 46.0]
[202, 251, 226]
p03775
u143492911
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n=int(input())\nimport math\nans=[]\nans_i=[]\nfor i in range(1,int(math.sqrt(n))):\n if n%i==0:\n ans.append(i)\n ans_i.append(n//i)\nv=list(str(max(max(ans,ans_i))))\nprint(len(v))', 'n=int(input())\na=[]\nb=[]\nimport math\nfor i in range(1,math.ceil(math.sqrt(n)+1)):\n if n%i==0:\n a.ap...
['Runtime Error', 'Accepted']
['s737782819', 's278025980']
[3060.0, 3064.0]
[30.0, 30.0]
[190, 225]
p03775
u146575240
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['# C - Digits in Multiplication\nN = int(input())\n\nA = int(N**0.5)\nprint(A)\nans = 1\nfor i in range(A+1,N,1):\n if N % i == 0:\n ans = len(str(i))\n break\n else:\n ans = len(str(i))\n\nprint(ans)\n', '# C - Digits in Multiplication\nN = int(input())\n\nA = int(N**0.5)\n# print(A)\nans =...
['Wrong Answer', 'Accepted']
['s653514374', 's959734863']
[2940.0, 3060.0]
[2107.0, 31.0]
[214, 228]
p03775
u163874353
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N, Y = map(int, input().split())\nfor i in range(N + 1):\n for j in range(N + 1 - i):\n k = int((Y - 10000 * i - 5000 * j) / 1000)\n if N - i - j >= k >= 0 and i + j + k == N:\n print(i, j, k)\n exit()\nprint(-1, -1, -1)', 'N = int(input())\nl = []\nfor A in range(1, int(N ** 0....
['Runtime Error', 'Accepted']
['s312993845', 's974301339']
[3060.0, 2940.0]
[18.0, 40.0]
[252, 187]
p03775
u172386990
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
["N = int(input())\n\ndef divisor(N):\n '''\n create divisor_list < sqrt(N) from natural number\n '''\n divisor_list = []\n \n for num in range(1, math.ceil(math.sqrt(N)) + 1):\n if N % num == 0:\n divisor_list.append(num)\n \n return divisor_list\n \ndef F(A, B):\n retur...
['Runtime Error', 'Accepted']
['s351160897', 's726139884']
[3064.0, 3064.0]
[18.0, 27.0]
[569, 583]
p03775
u175746978
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n = int(input())\nimport math\nr = math.sqrt(n)\nl1 = []\nl2 = []\nfor i in range(1, int(r+1)):\n if n % i == 0:\n a = i\n b = n / i\n if a <= b:\n l1.append([str(a), str(int(b))])\nprint(l1)\n\nfor j in l1:\n u = j[0]\n v = j[1]\n if len(u) >= len(v):\n f = len(j[0]...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s297126331', 's422656366', 's427434920', 's761561121']
[3316.0, 3316.0, 3060.0, 3188.0]
[31.0, 32.0, 2104.0, 32.0]
[368, 362, 245, 352]
p03775
u180058306
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import numpy as np\n\n\nN = int(input())\nprint(N)\n\n\ndef F(A, B):\n C = np.vstack((A, B))\n digit_C = np.array(np.log10(C) + 1, dtype = int)\n return np.max(digit_C, axis = 0)\n\n\ndividend = np.ones(N) * N\n\ndivisor = np.arange(1, N + 1)\n\nresidue = dividend % divisor\n\n\nA = divisor[residue == 0]\nB ...
['Runtime Error', 'Accepted']
['s827265120', 's355959592']
[1643580.0, 20748.0]
[1648.0, 321.0]
[620, 584]
p03775
u187109555
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\nN = int(input())\nmin_digits = 12\nfor a in range(1, round(math.sqrt(N))+1):\n if N%a !=0:\n continue\n b = N//a\n print(a, b)\n digits = max(len(str(a)), len(str(b)))\n if digits < min_digits:\n min_digits = digits\nprint(min_digits)', 'import math\nN = int(input())\nmin_dig...
['Wrong Answer', 'Accepted']
['s624209650', 's718951211']
[3316.0, 3188.0]
[31.0, 30.0]
[265, 249]
p03775
u189023301
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n = int(input())\nm = n * 1\n\nif n == 1:\n print(1)\n exit()\n\nsqr = int(n**0.5)\nl1 = len(str(sqr))\n\npf = {}\nfor i in range(2, int(m**0.5) + 1):\n while not m % i:\n pf[i] = pf.get(i, 0) + 1\n m //= i\nif m > 1:\n pf[m] = 1\n\nls = sorted(pf.items(), key=lambda x: x[0], reverse=True)\n...
['Wrong Answer', 'Accepted']
['s430298970', 's291514409']
[3064.0, 3064.0]
[32.0, 30.0]
[390, 428]
p03775
u189397279
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import numpy as np\nN = int(input())\nans = 10 ** 10\nfor i in range(2:int(np.sqrt(N)) + 2):\n if not N % i:\n a = max(len(str(i)), len(str(int(121 / 11))))\n ans = min(ans, a)\nprint(a)', 'import numpy as np\n \nN = int(input())\nans = len(str(N))\nfor i in range(2, int(np.sqrt(N)) + 2):\n if not...
['Runtime Error', 'Accepted']
['s387344028', 's290782032']
[2940.0, 13648.0]
[17.0, 167.0]
[196, 201]
p03775
u191423660
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
["N = int(input())\n\nans1 = 0\n\nA = '1'\nB = str(N)\n\nif len(A)>=len(B):\n ans = len(A)\nelse:\n ans = len(B)\n \nfor i in range(2,N+1):\n A = i\n if N%A==0:\n B = int(N / A)\n A = str(A)\n B = str(B)\n print(A, B)\n if len(A)>=len(B):\n ans1 = len(A)\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s506303619', 's577628870', 's052246606']
[3244.0, 3244.0, 3064.0]
[2104.0, 2104.0, 79.0]
[439, 439, 469]
p03775
u197968862
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['n = int(input())\nele = []\ni = 1\nwhile i * i < n:\n if n % i == 0:\n ele.append([len(str(i)),len(str(n // i))])\n i += 1\n\nk = min(ele[0][1],ele[0][0])\nfor i in range(len(ele)):\n k = min(max(ele[i][0],ele[i][1]),k)\nprint(k)', ' n = int(input())\nele = []\ni = 1\nwhile i * i <= n:\n if n % i =...
['Runtime Error', 'Runtime Error', 'Accepted']
['s451763427', 's704475438', 's945014546']
[3064.0, 2940.0, 3188.0]
[52.0, 17.0, 47.0]
[234, 236, 213]
p03775
u201234972
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['N = int( input())\nans = len( str(N))\nfor i in range(1,int( N**(1/2))+1):\n if N%i == 0:\n ans = min( ans, max( len(i), len(N//i)))\n break\nprint(ans)', 'N = int( input())\nans = len( str(N))\nfor i in range(N//2,N):\n if N%i == 0:\n ans = min( ans, len( str(i)))\n break\nprint(ans...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s158117766', 's220174403', 's352971163', 's980743774', 's148166860']
[3060.0, 3064.0, 2940.0, 3060.0, 3060.0]
[18.0, 2104.0, 17.0, 17.0, 32.0]
[163, 140, 128, 175, 161]
p03775
u210827208
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['9876543210', 'n=int(input())\n\nx=int(n**0.5)\n\nfor i in range(x,0,-1):\n if n%i==0:\n a=str(i)\n b=str(n//i)\n print(max(len(a),len(b)))\n break']
['Wrong Answer', 'Accepted']
['s321820755', 's637073303']
[2940.0, 2940.0]
[17.0, 31.0]
[10, 154]
p03775
u212831449
2,000
262,144
You are given an integer N. For two positive integers A and B, we will define F(A,B) as the larger of the following: the number of digits in the decimal notation of A, and the number of digits in the decimal notation of B. For example, F(3,11) = 2 since 3 has one digit and 11 has two digits. Find the minimum valu...
['import math\n\nn = int(input())\n\nN = math.ceil(math.sqrt(n))\n\nans = 10**10\n\nfor a in range(N):\n try:\n amari = n%a\n if amari == 0:\n b = int(n / a)\n f = max(len(str(a)),len(str(b)))\n ans = min(f,ans)\n except ZeroDivisionError:\n print(1)\n ...
['Wrong Answer', 'Accepted']
['s282298971', 's758211623']
[3060.0, 3188.0]
[17.0, 34.0]
[337, 268]