s_id stringlengths 10 10 | p_id stringlengths 6 6 | u_id stringlengths 10 10 | date stringlengths 10 10 | language stringclasses 1
value | original_language stringclasses 11
values | filename_ext stringclasses 1
value | status stringclasses 1
value | cpu_time stringlengths 1 5 | memory stringlengths 1 7 | code_size stringlengths 1 6 | code stringlengths 1 539k |
|---|---|---|---|---|---|---|---|---|---|---|---|
s119215341 | p03774 | u168416324 | 1594863109 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9064 | 410 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
return abs(ax-bx)+abs(ay-by)
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
ax=i[0]
ay=i[1]
mn=100000000
for (j,k) in zip(ch,range(len(ch))):
bx=j[... |
s449785097 | p03774 | u168416324 | 1594863064 | Python | Python (3.8.2) | py | Runtime Error | 22 | 9064 | 408 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
return abs(ax-bx)+abs(ay-by)
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
ax=i[0]
ay=i[1]
mn=100000000
for (j,k) in zip(ch,range(len(ch))):
bx=j[... |
s925381918 | p03774 | u168416324 | 1594863026 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9212 | 401 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
return abs(ax-bx)+abs(ay-by)
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
ax=i[0]
ay=i[1]
mn=100000000
for (j,k) in zip(ch,len(ch)):
bx=j[0]
... |
s643897262 | p03774 | u168416324 | 1594862923 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9216 | 406 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(ax,ay,bx,by):
return abs(ax-bx)+abs(ay-by)
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
ax=i[0]
ay=i[1]
mn=100000000
for (j,k) in zip(ch,range(1,m+1)):
bx=j[0]... |
s033090819 | p03774 | u456416458 | 1594680009 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9252 | 649 | s = input().split()
n = int(s[0])
m = int(s[1])
x = []
y = []
check_x = []
check_y = []
dis = 0
mindis = 1000000000
answer = []
for i in range(m):
answer.append(0)
for i in range(n):
a = input().split()
x.append(int(a[0]))
y.append(int(a[1]))
for i in range(m):
a = input().split()
check_x.... |
s691553752 | p03774 | u623814058 | 1594514397 | Python | Python (3.8.2) | py | Runtime Error | 26 | 9068 | 143 | N = int(input())
y = []
for i in range(1, N//2):
if N % i == 0:
y.append( max( len(str(i)), len(str(int(N/i))) ) )
print(min(y)) |
s054509239 | p03774 | u623814058 | 1594422676 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9064 | 232 | N, M = map(int, input().split())
x = [list(map(int, input().split())) for _ in range(N)]
y = [list(map(int, input().split())) for _ in range(M)]
for a,b in ab:
z = [abs(a-c) + abs(b-d) for c,d in cd]
print(z.index(min(z))+1) |
s582686182 | p03774 | u232873434 | 1594387398 | Python | PyPy3 (7.3.0) | py | Runtime Error | 95 | 74608 | 425 | N,M = map(int,input().split())
ab =[list(map(int,input().split())) for i in range(N)]
cd =[list(map(int,input().split())) for i in range(M)]
index_list = []
for i in range(N):
min_dist = 10000000
for j in range(M):
dist = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
if dist<min_dist:
... |
s982330931 | p03774 | u232873434 | 1594387294 | Python | PyPy3 (7.3.0) | py | Runtime Error | 82 | 74220 | 422 | N,M = map(int,input().split())
ab =[list(map(int,input().split())) for i in range(N)]
cd =[list(map(int,input().split())) for i in range(M)]
index_list = []
for i in range(N):
min_dist = 10000
for j in range(M):
dist = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
if dist<min_dist:
... |
s580523998 | p03774 | u232873434 | 1594387118 | Python | PyPy3 (7.3.0) | py | Runtime Error | 81 | 74628 | 422 | N,M = map(int,input().split())
ab =[list(map(int,input().split())) for i in range(N)]
cd =[list(map(int,input().split())) for i in range(M)]
index_list = []
for i in range(N):
min_dist = 10000
for j in range(M):
dist = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
if dist<min_dist:
... |
s363717651 | p03774 | u232873434 | 1594387051 | Python | PyPy3 (7.3.0) | py | Runtime Error | 84 | 74656 | 422 | N,M = map(int,input().split())
ab =[list(map(int,input().split())) for i in range(N)]
cd =[list(map(int,input().split())) for i in range(M)]
index_list = []
for i in range(N):
min_dist = 10000
for j in range(M):
dist = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
if dist<min_dist:
... |
s580550393 | p03774 | u137228327 | 1594017649 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9132 | 385 | N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
mannmn = 10**8
for j in range(M):
mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
if mann <= mannm... |
s951061454 | p03774 | u137228327 | 1594017548 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9160 | 393 | N,M = map(int,input().split())
student = [list(map(int,input().split())) for _ in range(N)]
cpoint = [list(map(int,input().split())) for _ in range(M)]
for i in range(N):
mannmn = 10**8
for j in range(M):
mann = abs(student[i][0] - cpoint[j][0])+abs(student[i][1] - cpoint[j][1])
if mann < mannmn... |
s422843246 | p03774 | u826189900 | 1593614670 | Python | Python (3.8.2) | py | Runtime Error | 23 | 9016 | 883 | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
#include <cctype>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(x) (x).begin(), (x).end()
#de... |
s493281029 | p03774 | u088488125 | 1593378053 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9148 | 411 | n,m=map(int, input().split())
a_list=[]
b_list=[]
for i in range(n):
a,b=map(int, input().split())
a_list.append(a)
b_list.append(b)
c_list=[]
d_list=[]
for i in range(m):
c,d=map(int, input().split())
c_list.append(c)
d_list.append(d)
for i in range(n):
min=0
min_number=0
for j in range(m):
d=abs... |
s496598194 | p03774 | u168416324 | 1593304227 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9052 | 354 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(a,b):
return abs(a[0]-b[0])+abs(a[1]-b[1])
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
mn=100000000
for (j,k) in zip(ch,range(1,m+1)):
mh=mht(i,j)
if mh<mn:
... |
s077436963 | p03774 | u168416324 | 1593303958 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9008 | 383 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(a,b):
try:
return abs(a[0]-b[0])+abs(a[1]-b[1])
except:
return 0
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
mn=100000000
for (j,k) in zip(ch,range(m)):
... |
s337311165 | p03774 | u168416324 | 1593303811 | Python | Python (3.8.2) | py | Runtime Error | 30 | 9200 | 350 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(a,b):
return abs(a[0]-b[0])+abs(a[1]-b[1])
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
mn=100000000
for (j,k) in zip(ch,range(m)):
mh=mht(i,j)
if mh<mn:
... |
s732213091 | p03774 | u168416324 | 1593277404 | Python | PyPy3 (7.3.0) | py | Runtime Error | 82 | 74444 | 357 | n,m=map(int,input().split())
st=[]
ch=[]
def mht(a,b):
return abs(a[0]-b[0])+abs(a[1]-b[1])
for i in range(n):
st.append(list(map(int,input().split())))
for i in range(m):
ch.append(list(map(int,input().split())))
for i in st:
mn=100000000
for (j,k) in zip(ch,range(m)):
mh=mht(i,j)
if mh<mn:
... |
s350718248 | p03774 | u971811058 | 1593115249 | Python | Python (3.8.2) | py | Runtime Error | 23 | 8908 | 929 | #include<bits/stdc++.h>
// Begin Header {{{
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i,n) for(ll i=0; i<n; i++)
#define loop(i, j, n) for(ll i=j; i<n; i++)
#define all(x) (x).begin(), (x).end()
constexpr int INF = 0x3f3f3f3f;
const long long mod=1... |
s712704621 | p03774 | u085430333 | 1592198868 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 426 | N, M = map(int, input().split())
S, C = [], []
for _ in range(N):
a, b = map(int, input().split())
S.append((a, b))
for _ in range(M):
c, d = map(int, input().split())
C.append((c, d))
for a, b in S:
ans = None
min_dist = int(2e8)
for i, (c, d) in enumerate(C):
dist = abs(c - a) +... |
s668050145 | p03774 | u046158516 | 1591961822 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 340 | n,m=map(int,input().split())
a=[]
b=[]
for i in range(n):
x,y=map(int,input().split())
a.append(x,y)
for i in range(m):
x,y=map(int,input().split())
b.append(x,y)
for i in a:
ans=10**18
t=0
for j in range(m):
if abs(i[0]-b[j][0])+abs(i[1]-b[j][1])<ans:
t=j+1
ans=abs(i[0]-b[j][0])+abs(i[1]-... |
s195187021 | p03774 | u046158516 | 1591961748 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 320 | n,m=map(int,input().split())
a=[]
b=[]
for i in range(n):
x,y=map(int,input().split())
a.append(x,y)
for i in range(m):
x,y=map(int,input().split())
b.append(x,y)
for i in a:
ans=10**18
t=0
for j in b:
if abs(i[0]-j[0])+abs(i[1]-j[1])<ans:
t=j+1
ans=abs(i[0]-j[0])+abs(i[1]-j[1])
print(t) |
s492049495 | p03774 | u957957759 | 1591761931 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 498 | n,m=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
x=[]
y=[]
l=[]
p=[]
for i in range(n):
ai,bi=map(int,input().split())
a.append(ai)
b.append(bi)
for j in range(m):
ci,di=map(int,input().split())
c.append(ci)
d.append(di)
for i in range(n):
for j in range(m):
x.append(abs(a... |
s575222764 | p03774 | u397496203 | 1591561643 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 655 | import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)
def main():
N,M = [int(i) for i in input().strip().split()]
students = [[int(i) for i in input().strip().split()] for _ in range(N)]
checkpoints = [[int(i) for i in input().strip().split()] for _ in range(N)]
ans = [0] * N
for ... |
s610335536 | p03774 | u806403461 | 1591499641 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 490 | n, m = map(int, input().split())
student = list()
for x in range(n):
student.append(list(map(int, input().split())))
checkpoint = list()
for y in range(m):
checkpoint.append(list(map(int, input().split())))
tmp = 10**8+1
for x in range(n):
for y in range(m-1, -1, -1):
distance = abs(student[x]... |
s704822388 | p03774 | u344122377 | 1591497288 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 329 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]
cd = [list(map(int, input().split())) for i in range(n)]
for a, b in ab:
cost, idx = 10**18, 0
for i, (c, d) in enumerate(cd):
if cost > abs(a - c) + abs(b - d):
cost = abs(a - c) + abs(b - d)
idx = i + 1
pr... |
s768995201 | p03774 | u730769327 | 1591243617 | Python | PyPy3 (2.4.0) | py | Runtime Error | 166 | 38384 | 344 | n,m=map(int,input().split())
st=[]
for i in range(n):
s_d=list(input())
st.append(s_d)
cp=[]
for i in range(m):
c_d=list(input())
cp.append(c_d)
sc=[]
for i in range(n):
scd=[]
for j in range(m):
scd_d=abs(st[i][0]-cp[j][0])+abs(st[i][1]-cp[j][1])
scd.append(scd_d)
sc.append(min(scd))
for i in ... |
s899360828 | p03774 | u730769327 | 1591243569 | Python | PyPy3 (2.4.0) | py | Runtime Error | 161 | 38256 | 344 | n,m map(int,input().split())
st=[]
for i in range(n):
s_d=list(input())
st.append(s_d)
cp=[]
for i in range(m):
c_d=list(input())
cp.append(c_d)
sc=[]
for i in range(n):
scd=[]
for j in range(m):
scd_d=abs(st[i][0]-cp[j][0])+abs(st[i][1]-cp[j][1])
scd.append(scd_d)
sc.append(min(scd))
for i in ... |
s188687358 | p03774 | u193927973 | 1590890196 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 329 | N, M = map(int, input().split())
P=[]
for i in range(N):
x,y=map(int, input().split())
P.append([x,y])
C=[]
for i in range(M):
a,b=map(int, input().split())
C.append([a,b])
for p in P:
mind=10000000
for j in range(M):
d=abs(p[0]-C[j][0])+abs(p[1]-C[j][1])
if d<mind:
ans=j+1
mind=d
pri... |
s437595001 | p03774 | u007886915 | 1590669054 | Python | Python (3.4.3) | py | Runtime Error | 157 | 13888 | 12275 | # -*- coding: utf-8 -*-
import sys
import fractions
import copy
import bisect
import math
import numpy as np
import itertools
from itertools import combinations_with_replacement
#import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入... |
s790383939 | p03774 | u594956556 | 1590609445 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 402 | N, M = map(int, input().split())
student = [list(map(int, input().split())) for _ in range(N)]
cp = [list(map(int, input().split())) for _ in range(M)]
idou = []
for a, b in student:
idousaki = -1
nearest = 1000000000
for i, x, y in enumerate(cp):
d = abs(x-a) + abs(y-b)
if d < nearest:
nearest = d... |
s318285939 | p03774 | u811436126 | 1590447708 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 373 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(n)]
for a, b in ab:
ans = 10 ** 10
dist = 10 ** 10
for i in range(n):
c, d = cd[i]
temp = abs(a - c) + abs(b - d)
if dist > temp:
... |
s700973707 | p03774 | u811436126 | 1590447612 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 373 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(n)]
for a, b in ab:
ans = 10 ** 10
dist = 10 ** 10
for i in range(n):
c, d = cd[i]
temp = abs(a - c) + abs(b - d)
if dist > temp:
... |
s383039806 | p03774 | u663767599 | 1590379888 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 522 | from typing import Tuple, List
def manhattan_distance(p: Tuple[int, int], q: Tuple[int, int]) -> int:
return abs(p[0] - q[0]) + abs(p[1] - q[1])
N, M = map(int, input().split())
students: List[Tuple[int, int]] = [tuple(map(int, input().split())) for _ in range(N)]
checkpoints: List[Tuple[int, int]] = [tuple(map... |
s571536170 | p03774 | u991567869 | 1589698743 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 358 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(m)]
dist = 10**9
for i, j in ab:
for k in range(n):
dist1 = abs(i - cd[k][0]) + abs(j - cd[k][1])
if dist1 < dist:
dist = dist1
ch ... |
s576577435 | p03774 | u595375942 | 1589583266 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 446 | N, M = map(int, input().split())
ab = []
cd = []
for _ in range(N):
a, b = map(int, input().split())
ab.append([a, b])
for _ in range(N):
c, d = map(int, input().split())
cd.append([c, d])
for a, b in ab:
near = 10**32
for i, n in enumerate(cd):
tmp = abs(a-n[0])+abs(b-n[1])
if ... |
s607187428 | p03774 | u595375942 | 1589583196 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 446 | N, M = map(int, input().split())
ab = []
cd = []
for _ in range(N):
a, b = map(int, input().split())
ab.append([a, b])
for _ in range(N):
c, d = map(int, input().split())
cd.append([c, d])
for a, b in ab:
near = 10**16
for i, n in enumerate(cd):
tmp = abs(a-n[0])+abs(b-n[1])
if ... |
s489649830 | p03774 | u026788530 | 1589384889 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 37 | 3 4
10 10
-10 -10
3 3
1 2
2 3
3 5
3 5 |
s794510417 | p03774 | u494748969 | 1589243682 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3192 | 598 | n, m = list(map(int, input().split()))
a = [0] * n
b = [0] * n
for i in range(n):
a[i], b[i] = list(map(int, input().split()))
c = [0] * m
d = [0] * m
for j in range(m):
c[j], d[j] = list(map(int, input().split()))
for i in range(n):
distance = []
minDistance = 10 ** 8 + 1
checkPoint = 1
for j ... |
s698295018 | p03774 | u276204978 | 1588791506 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 463 | N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
A, B = map(int, input().split())
a.append(A)
b.append(B)
c, d = [], []
for _ in range(N):
C, D = map(int, input().split())
c.append(C)
d.append(D)
for A, B in zip(a, b):
ans = 0
mn = 10**9
for i, (C, D) in en... |
s114044614 | p03774 | u959682820 | 1588571355 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 347 | n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]
cd = [list(map(int, input().split())) for _ in range(m)]
for a, b in ab:
res = 10**8
for i in range(m):
(c, d) = cd[i]
dist = abs(a-c)+abs(b-d)
if dist < res:
ans = i
res = min(... |
s605342644 | p03774 | u733814820 | 1588507502 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 1071 | from a import resolve
import sys
from io import StringIO
import unittest
class TestClass(unittest.TestCase):
def assertIO(self, input, output):
stdout, stdin = sys.stdout, sys.stdin
sys.stdout, sys.stdin = StringIO(), StringIO(input)
resolve()
sys.stdout.seek(0)
out = sys.s... |
s206866968 | p03774 | u444722572 | 1588458710 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 542 | N,M=map(int,input().split())
stand=[list(map(int,input().split())) for _ in range(N)]
point=[list(map(int,input().split())) for _ in range(M)]
new_stand=[None]*N
for i in range(N):
nearest=abs(stand[i][0]-point[0][0])+abs(stand[i][1]-point[i][1])
near_ind=M
for j in range(N):
man=abs(point[j][0]-st... |
s481031905 | p03774 | u444722572 | 1588458359 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 564 | N,M=map(int,input().split())
stand=[list(map(int,input().split())) for _ in range(N)]
point=[list(map(int,input().split())) for _ in range(M)]
new_stand=[None]*N
for i in range(N):
nearest=float("inf")
near_ind=M
for j in range(N):
man=abs(point[j][0]-stand[i][0]) + abs(point[j][1]-stand[i][1])
... |
s357874116 | p03774 | u444722572 | 1588457870 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 564 | N,M=map(int,input().split())
stand=[list(map(int,input().split())) for _ in range(N)]
point=[list(map(int,input().split())) for _ in range(M)]
new_stand=[None]*N
for i in range(N):
nearest=float("inf")
near_ind=M
for j in range(N):
man=abs(point[j][0]-stand[i][0]) + abs(point[j][1]-stand[i][0])
... |
s445834663 | p03774 | u444722572 | 1588457833 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 563 | N,M=map(int,input().split())
stand=[list(map(int,input().split())) for _ in range(N)]
point=[list(map(int,input().split())) for _ in range(M)]
new_stand=[None]*N
for i in range(N):
nearest=float("inf")
near_ind=M
for j in range(N):
man=abs(point[j][0]-stand[i][0]) + abs(point[j][1]-stand[i][0])
... |
s318474583 | p03774 | u444722572 | 1588457544 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 473 | N,M=map(int,input().split())
stand=[list(map(int,input().split())) for _ in range(N)]
point=[list(map(int,input().split())) for _ in range(M)]
new_stand=[None]*N
for i in range(N):
nearest=float("inf")
near_ind=0
for j in range(N):
man=abs(point[j][0]-stand[i][0]) + abs(point[j][1]-stand[i][0])
... |
s701852859 | p03774 | u252964975 | 1587847234 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 506 | def distance(a,b,c,d):
return abs(a-c)+abs(b-d)
N,M=map(int, input().split())
Alist = []
Blist = []
for i in range(N):
a,b=map(int, input().split())
Alist.append(a)
Blist.append(b)
Clist = []
Dlist = []
for i in range(M):
c,d=map(int, input().split())
Clist.append(c)
Dlist.append(d)
for i in range(N):
... |
s510623278 | p03774 | u293198424 | 1587000250 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 39280 | 431 | n,m = map(int,input().split())
student = []
check = []
for i in range(n):
ab = [int(i) for i in input().split()]
student.append(ab)
for j in range(m):
cd = [int(i) for i in input().split()]
check.append(cd)
mn = 10**8
for ax,by in student:
for i in range(m):
dist = abs(ax-check[i][0]) + abs(... |
s685649307 | p03774 | u241159583 | 1587000238 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 301 | N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
cd = [list(map(int, input().split())) for _ in range(M)]
for i in range(N):
d = []
for j in range(M):
d.append(abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - ab[j][1]))
print(d.index(min(d)) + 1) |
s654051963 | p03774 | u803617136 | 1587000202 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 419 | n, m = map(int, input().split())
ss = [list(map(int, input().split())) for _ in range(n)]
p = [list(map(int, input().split())) for _ in range(n)]
INF = 10 ** 8 * 2
for s in ss:
dist = INF
c_point = 0
a, b = s
for i, v in enumerate(p):
c, d = v
manhattan = abs(a - c) + abs(b - d)
... |
s667768120 | p03774 | u241159583 | 1587000011 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 444 | N, M = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(N)]
c = []
d = []
for _ in range(M):
C, D = map(int, input().split())
c.append(C)
d.append(D)
I = []
for a, b in ab:
n = 10 ** 8
I_n = ""
for i in range(M):
if abs(a-c[i]) + abs(b-d[i]) < n:
... |
s509686081 | p03774 | u185896732 | 1586999478 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 766 | import sys
input=sys.stdin.readline
n,m=map(int,input().split())
g=[list(map(int,input().split())) for _ in range(n)]
c=[list(map(int,input().split())) for _ in range(m)]
for i in g:
a,b=i[0],i[1]
dis=10**10
ind=1
for j in range(m):
x,y=c[j][0],c[j][1]
now=abs(a-x)+abs(b-y)
if ... |
s275958336 | p03774 | u683134447 | 1586999349 | Python | PyPy3 (2.4.0) | py | Runtime Error | 176 | 39280 | 416 | n,m = map(int,input().split())
abl = []
for _ in range(n):
a,b = map(int,input().split())
abl.append((a,b))
cdl = []
for _ in range(n):
c,d = map(int,input().split())
cdl.append((c,d))
for a,b in abl:
ans = float("inf")
log = -1
for idx, (c,d) in enumerate(cdl):
tmp = abs(a-c) + ab... |
s672960846 | p03774 | u276115223 | 1586781758 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 479 | # ABC 057: B – Checkpoints
studentPoints = []
checkPoints = []
n, m = map(int, input().split())
for _ in range(n):
studentPoints.append([int(s) for s in input().split()])
for _ in range(m):
checkPoints.append([int(s) for s in input().split()])
for i in range(n):
distances = [abs(studentPoints[i][0] - check... |
s377246099 | p03774 | u276115223 | 1586781171 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 479 | # ABC 057: B – Checkpoints
studentPoints = []
checkPoints = []
n, m = map(int, input().split())
for _ in range(n):
studentPoints.append([int(s) for s in input().split()])
for _ in range(m):
checkPoints.append([int(s) for s in input().split()])
for i in range(n):
distances = [abs(studentPoints[i][0] - check... |
s960734424 | p03774 | u686036872 | 1586498542 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 452 | N, M = map(int, input().split())
A = []
for i in range(N):
a, b = map(int, input().split())
A.append([a, b])
B=[]
for i in range(M):
c, d = map(int, input().split())
C.append([c, d])
for i in range(N):
saitei = float("inf")
ans = 0
for j in range(M):
if abs(A[i][0]-B[j][0]) + abs(... |
s765861334 | p03774 | u686036872 | 1586498489 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 452 | N, M = map(int, input().split())
A = []
for i in range(N):
a, b = map(int, input().split())
A.append([a, b])
C=[]
for i in range(M):
c, d = map(int, input().split())
C.append([c, d])
for i in range(N):
saitei = float("inf")
ans = 0
for j in range(M):
if abs(A[i][0]-B[j][0]) + abs(... |
s380571887 | p03774 | u686036872 | 1586498459 | Python | Python (3.4.3) | py | Runtime Error | 25 | 2940 | 448 | N, M = map(int, input().split())
A = []
for i in range(N):
a, b = map(int, input().split())
A.append([a, b])
C=[]
for i in range(M):
c, d = map(int, input().split())
C.append([c, d])
for i in range(N):
saitei = float("inf")
ans = 0
for j in range(M):
if abs(A[i][0]-B[j][0]) + abs(A[i]... |
s711158937 | p03774 | u686036872 | 1586498411 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 483 | N, M = map(int, input().split())
A = []
for i in range(N):
a, b = map(int, input().split())
A.append([a, b])
C=[]
for i in range(M):
c, d = map(int, input().split())
C.append([c, d])
for i in range(N):
saitei = float("inf")
ans = 0
for j in range(M):
if abs(A[i][0]-B[j][0]) + abs(A[i]... |
s297291448 | p03774 | u686036872 | 1586498060 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 413 | N, M = map(int, input().split())
A = []
for i in range(N):
a, b = map(int, input().split())
A.append([a, b])
print(A)
for i in range(M):
c, d = map(int, input().split())
saitei = float("inf")
for j in range(N):
if abs(A[j][0]-c) + abs(A[j][1]-d) < saitei:
saitei = abs(A[i][0]-c)... |
s684236796 | p03774 | u852790844 | 1586492673 | Python | Python (3.4.3) | py | Runtime Error | 182 | 14896 | 332 | import numpy as np
from scipy.spatial.distance import minkowski
n, m = map(int, input().split())
a = np.array([list(map(int, input().split())) for i in range(n)])
for i in range(m):
b = np.array(list(map(int,input())))
c = np.array([minkowski(i, b , 1) for i in a], dtype=np.int64)
ans = np.argmin(c) + 1
... |
s367134879 | p03774 | u790048565 | 1586019539 | Python | Python (3.4.3) | py | Runtime Error | 22 | 3064 | 489 | N, M = map(int, input().split())
AB = []
for _ in range(N):
a, b = map(int, input().split())
AB.append((a, b))
CD = []
for _ in range(M):
c, d = map(int, input().split())
CD.append((c, d))
check_index = []
for i, ab in enumerate(AB):
min_index = 0
for j, cd in enumerate(CD):
check_dis = distance(ab, c... |
s534606660 | p03774 | u156815136 | 1586001342 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 681 | #import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
r_ = n / m
if (r_ - (n // m)) > 0:
return (n//m) + 1
else:
return (n//m)"""
# Written by NoKnowledgeGG @YlePhan
#import math
#mod = 10**9+7
def main():
n,m = map(int,input().split())
AB = [map(int,input(... |
s815586588 | p03774 | u288430479 | 1585284698 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 310 | n,m = map(int,input().split())
l_n =list(list(map(int,input().split())) for i in range(n))
l_m =list(list(map(int,input().split())) for i in range(m))
for i in range(n):
q = 10**8
for t in range(m):
a,b = l_n[i]
c,d = l_m[t]
v= abs(a-c)+abs(b-d)
if v<q:
q = v
z = t
print(z+1) |
s954667542 | p03774 | u288430479 | 1585284620 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 324 | n,m = map(int,input().split())
l_n =list(list(map(int,input().split())) for i in range(n))
l_m =list(list(map(int,input().split())) for i in range(m))
q = 1000000
for i in range(n):
q = 1000000
for t in range(m):
a,b = l_n[i]
c,d = l_m[t]
v= abs(a-c)+abs(b-d)
if v<q:
q = v
z = t
print(... |
s845167352 | p03774 | u288430479 | 1585283492 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 325 | n,m = map(int,input().split())
l_n =list(list(map(int,input().split())) for i in range(n))
l_m =list(list(map(int,input().split())) for i in range(m))
q = 1000000
for i in range(n):
for t in range(m):
a,b = l_n[i]
c,d = l_m[t]
v= abs(a-c)+abs(b-d)
if v<q:
q = v
z = t
print(z+1)
q = 100... |
s507620054 | p03774 | u288430479 | 1585283443 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 329 | n,m = map(int,input().split())
l_n =list(list(map(int,input().split())) for i in range(n))
l_m =list(list(map(int,input().split())) for i in range(m))
q = 1000000
for i in range(n):
for t in range(m):
a,b = l_n[i]
c,d = l_m[t]
v= abs(a-c)+abs(b-d)
if v<=q:
q = v
z = t
print(z+1)
q = 10... |
s936172611 | p03774 | u288430479 | 1585283329 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 328 | n,m = map(int,input().split())
l_n =list(list(map(int,input().split())) for i in range(n))
l_m =list(list(map(int,input().split())) for i in range(m))
q = 1000000
for i in range(n):
for t in range(m):
a,b = l_n[i]
c,d = l_m[t]
v= abs(a-c)+abs(b-d)
if v<q:
q = v
z = t
print(z+1)
q = 100... |
s498566642 | p03774 | u016323272 | 1585146770 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 376 | N,M = map(int,input().split())
Ls = []
Lp = []
for i in range(N):
a,b = map(int,input().split())
Ls.append(a)
Ls.append(b)
for m in range(M):
c,d = map(int,input().split())
Lp.append(c)
Lp.append(d)
for i in range(N):
dis = []
for m in range(M):
dis.append(abs(Ls[i][0]-Lp[m][0])+... |
s832354212 | p03774 | u016323272 | 1585146361 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 364 | N,M = map(int,input().split())
Ls = []
Lp = []
for i in range(N):
a,b = map(int,input().split())
Ls.append(a)
Ls.append(b)
for m in range(M):
c,d = map(int,input().split())
Lp.append(c)
Lp.append(d)
for i in range(N):
for m in range(M):
dis = list(abs(Ls[i][0]-Lp[m][0])+abs(Ls[i][1]... |
s660875506 | p03774 | u016323272 | 1585069989 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 359 | #ABC057.B
N,M = map(int,input().split())
L1 = []
L2 = []
for i in range(N):
a,b = map(int,input().split())
L1.append([a,b])
for m in range(M):
c,d = map(int,input().split())
L2.append([c,d])
for j in range(N):
L3 = []
for l in range(M):
L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L... |
s888566176 | p03774 | u016323272 | 1585069703 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 356 | #ABC057.B
N,M = int(input().split())
L1 = []
L2 = []
for i in range(N):
a,b = map(int,input().split())
L1.append([a,b])
for m in range(M):
c,d = map(int,input().split())
L2.append([c,d])
for j in range(N):
L3 = []
for l in range(M):
L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l]... |
s736653594 | p03774 | u016323272 | 1585069622 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 352 | #ABC057.B
N,M = int(input().split())
L1 = []
L2 = []
for i in range(N):
a,b = map(int,input().split())
L1.append([a,b])
for m in range(M):
c,d = map(int,input().split())
L2.append([c,d])
L3 = []
for j in range(N):
for l in range(M):
L3.append(abs(L1[j][0]-L2[l][0]) + abs(L1[j][1]-L2[l][1])... |
s803720486 | p03774 | u016323272 | 1585069262 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 353 | #ABC057.B
N,M = int(input().split())
L1 = []
L2 = []
for i in range(N):
a,b = map(int,input().split())
L1.append([a,b])
for m in range(M):
c,d = map(int,input().split())
L2.append([c,d])
L3 = []
for j in range(N):
for l in range(M):
L3.append(abs(L1[j][0]-L2[l][0])+abs(L1[j][1]-L2[l][1]))
... |
s572569210 | p03774 | u992910889 | 1584225402 | Python | PyPy3 (2.4.0) | py | Runtime Error | 186 | 38384 | 644 | # import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product
def resolve():
N,M=map(int,input().split())
A=[list(map(int,input().split())) for i in... |
s445331111 | p03774 | u992910889 | 1584225372 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3188 | 644 | # import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product
def resolve():
N,M=map(int,input().split())
A=[list(map(int,input().split())) for i in... |
s228208131 | p03774 | u463775490 | 1583898742 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 407 | n, m = map(int, input().split())
stu = []
check = []
for i in range(n):
stu.append(list(map(int, input().split())))
for i in range(m):
check.append(list(map(int, input().split())))
for i in stu:
min_dis = 2 * 10 ** 8 + 1
for j, k in enumerate(check):
dis = abs(i[0] - k[0]) + abs(i[1] - k[1])
... |
s593586416 | p03774 | u680851063 | 1583271017 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 374 | n,m = map(int,input().split())
N = [list(map(int, input().split())) for _ in range(n)]
M = [list(map(int, input().split())) for _ in range(m)]
def kyori(X,Y):
return abs(X[0]-Y[0])+abs(X[1]-Y[1])
def near_p(hito):
temp = []
for _ in range(n):
temp.append(kyori(hito,M[_]))
return temp.index(min... |
s770595749 | p03774 | u476435125 | 1582693558 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 499 | N,M=map(int,input().split())
lab=[]
for i in range(N):
lab.append(list(map(int,input().split())))
lcd=[]
for i in range(N):
lcd.append(list(map(int,input().split())))
for i in range(N):
dmin=10**9
ans=1
for j in range(M):
if abs(lab[i][0]-lcd[j][0])+abs(lab[i][1]-lcd[j][1])<dmin:
... |
s121791971 | p03774 | u476435125 | 1582693176 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 383 | N,M=map(int,input().split())
lab=[]
for i in range(N):
lab.append(list(map(int,input().split())))
lcd=[]
for i in range(N):
lcd.append(list(map(int,input().split())))
for i in range(N):
dmin=10**9
for j in range(M):
if abs(lab[i][0]-lcd[j][0])+abs(lab[i][1]-lcd[j][1])<dmin:
dmin=abs... |
s680962023 | p03774 | u225388820 | 1582443041 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 240 | n,m=map(int,input().split())
now=[tuple(map(int,input().split())) for i in range(n)]
p=[tuple(map(int,input().split())) for i in range(n)]
for a in now:
ans=10**10
for c in p:
ans=min(ans,abs(c[0]-a[0])+abs(c[1]-a[1]))
print(ans)
|
s923658512 | p03774 | u225388820 | 1582442935 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 232 | n,m=map(int,input().split())
now=[tuple(map(int,input().split())) for i in range(n)]
p=[tuple(map(int,input().split())) for i in range(n)]
for a,b in now:
ans=10**10
for c,d in p:
ans=min(ans,abs(c-a)+abs(d-b))
print(ans)
|
s071481070 | p03774 | u735008991 | 1582356549 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 226 | N, M = map(int, input().split())
S = [list(input().split()) for _ in range(N)]
C = [list(input().split()) for _ in range(M)]
for a, b in S:
dist = [abs(a-c) + abs(b-d) for c, d in C]
print(dist[dist.index(min(dist))])
|
s978246707 | p03774 | u190086340 | 1582311680 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38640 | 811 | def args():
N, M = map(int, input().split())
ST = []
for _ in range(N):
ST.append(tuple(map(int, input().split())))
CP = []
for _ in range(M):
CP.append(tuple(map(int, input().split())))
# print(N, M)
# print(ST)
# print(CP)
return N, M, ST, CP
def solve(N, M, S... |
s699445867 | p03774 | u368796742 | 1582132762 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 383 | n,m = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
b = [list(map(int,input().split())) for i in range(n)]
ans = []
for i in a:
count = 10**10
check = 0
for j in range(m):
if count > abs(i[0]-b[j][0])+abs(i[1]-b[j][1]):
check = j+1
count = abs(i[0]-b[j][0])+abs(... |
s424234493 | p03774 | u151107315 | 1581981567 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 472 | N, M = map(int, input().split())
stu_li = [list(map(int, input().split())) for i in range(N)]
chk_li = [list(map(int, input().split())) for i in range(M)]
import math
min_dist = math.inf
min_num = M
for i in range(N) :
for j in range(M) :
dist = abs(stu_li[i][0] - chk_li[j][0]) + abs(stu_li[i][1] - chk_li[... |
s727044811 | p03774 | u529630697 | 1581616708 | Python | PyPy3 (2.4.0) | py | Runtime Error | 175 | 38640 | 293 | import numpy as np
N, M = map(int, input().split(' '))
Ns = [list(map(int, input().split())) for i in range(N)]
Ms = [list(map(int, input().split())) for i in range(M)]
print(Ms)
for a, b in Ns:
dists = []
for c, d in Ms:
dists.append(abs(a - c) + abs(b - d))
print(np.argmin(dists) + 1) |
s825082334 | p03774 | u072717685 | 1580682035 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 424 | n, m = map(int,input().split())
students = [None]*n
points = [None]*m
for i in range(n):
students[i] = tuple(map(int,input().split()))
for i in range(m):
points[i] = tuple(map(int,input().split()))
ans = [None]*n
for s in students:
tmp = [None]*m
for p in points:
tmp[p] = abs(students[s][0] - points[p][0])... |
s414677961 | p03774 | u843722521 | 1579922327 | Python | PyPy3 (2.4.0) | py | Runtime Error | 180 | 39664 | 335 | n,m=map(int,input().split())
a=[list(map(int,input().split())) for _ in range(n)]
c=[list(map(int,input().split())) for _ in range(m)]
ans=[[] for _ in range(n)]
for i in range(n):
for j in range(n):
p,q=a[i]
r,s=c[j]
d=abs(p-r)+abs(q-s)
ans[i].append((d,j+1))
ans[i]=sorted(ans[i])
for i in ans:
p... |
s777430374 | p03774 | u729337236 | 1579807779 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 425 | #include <bits/stdc++.h>
using namespace std;
int a[55], b[55];
int main() {
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) cin >> a[i] >> b[i];
for (int i = 0; i < m; i++) {
int c, d; cin >> c >> d;
int t = 1;
for (int j = 1; j <= n; j++)
if (abs(c - a[j]) +... |
s759566867 | p03774 | u344959886 | 1579731362 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 326 | n,m=map(int,input().split())
g=[list(map(int,input().split())) for i in range(n)]
c=[list(map(int,input().split())) for i in range(m)]
for i in g:
tmp=1000
for j in range(m):
t2=abs(i[0]-c[j][0]) + abs(i[1]-c[j][1])
if t2 <tmp:
no=j+1
tmp=t2
print... |
s489182019 | p03774 | u143903328 | 1578185046 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 563 |
m,n = map(int,input().split())#m学生 nチェックポイント
student = []
checkpoint = []
for i in range(m):
student.append(list(map(int,input().split())))
for i in range(n):
checkpoint.append(list(map(int,input().split())))
for i in range(m):
ans = 0 #答えの初期化
tmp = 1000000000
for j in range(n):
if tmp > a... |
s544772130 | p03774 | u143903328 | 1578184962 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 567 |
m,n = map(int,input().split())#m学生 nチェックポイント
student = []
checkpoint = []
for i in range(n):
student.append(list(map(int,input().split())))
for i in range(m):
checkpoint.append(list(map(int,input().split())))
for i in range(m):
ans = 0 #答えの初期化
tmp = 10000000000000
for j in range(n):
if tmp... |
s576559856 | p03774 | u143903328 | 1578182725 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 565 | m,n = map(int,input().split())#m学生 nチェックポイント
student = []
checkpoint = []
for i in range(n):
student.append(list(map(int,input().split())))
for i in range(m):
checkpoint.append(list(map(int,input().split())))
for i in range(m):
ans = 0 #答えの初期化
tmp = 10000000000000
for j in range(m):
if tmp ... |
s321228532 | p03774 | u143903328 | 1578182667 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 567 | m,n = map(int,input().split())#m学生 nチェックポイント
student = []
checkpoint = []
for i in range(n):
student.append(list(map(int,input().split())))
for i in range(m):
checkpoint.append(list(map(int,input().split())))
for i in range(m):
ans = 0 #答えの初期化
tmp = 10000000000000
for j in range(m):
if tmp ... |
s170793492 | p03774 | u063073794 | 1577931157 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 314 | n,m=map(int,input().split())
student=[list(map(int,input().split())) for i in range(n)]
point=[list(map(int,input().split())) for i in range(n)]
for a,b in student:
length=10**10
pn=0
for j in range(m):
c,d=point[j]
if abs(a-c)+abs(b-d)<length:
length=abs(a-c)+abs(b-d)
pn=1+j
print(pn) |
s033904202 | p03774 | u063073794 | 1577930949 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 313 | n,m=map(int,input().split())
student=[list(map(int,input().split())) for i in range(n)]
point=[list(map(int,input().split())) for i in range(n)]
for a,b in student:
length=10**10
pn=0
for j in range(m):
c,d=point[j]
if abs(a-c)+abs(b-d)<length:
length=abs(a-c)+abs(b-d)
pn+=1
print(pn) |
s707128424 | p03774 | u063073794 | 1577564249 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 452 | yandy
n, m = map(int, input().split())
student = []
for i in range(n):
a, b = map(int, input().split())
student.append((a, b))
point = []
for j in range(m):
c, d = map(int, input().split())
point.append((c, d))
for a, b in student:
length = 10 ** 10
pn = 0
for j in range(m):
c, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.