Submission #11674464
Source Code Expand
n,m=[int(i) for i in input().split()] students=[] for i in range(n): students.append([int(i) for i in input().split()]) check=[] for i in range(m): check.append([int(i) for i in input().split()]) ans=[] for i in students: x,y=i move=None minhat=1000000000 for j in range(m): x2,y2=check[j] manhat=abs(x-x2)+abs(y-y2) if manhat<minhat: minhat=manhat move=j ans.append(move+1) for i in range(len(ans)): print(ans[i])
Submission Info
Submission Time | |
---|---|
Task | B - Checkpoints |
User | funassshi |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 533 Byte |
Status | AC |
Exec Time | 19 ms |
Memory | 3064 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | sample_01.txt, sample_02.txt, sample_03.txt, subtask_1_1.txt, subtask_1_2.txt, subtask_1_3.txt, subtask_1_4.txt, subtask_1_5.txt, subtask_1_6.txt, subtask_1_7.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample_01.txt | AC | 17 ms | 3064 KB |
sample_02.txt | AC | 17 ms | 3064 KB |
sample_03.txt | AC | 17 ms | 3064 KB |
subtask_1_1.txt | AC | 18 ms | 3064 KB |
subtask_1_2.txt | AC | 18 ms | 3064 KB |
subtask_1_3.txt | AC | 17 ms | 3064 KB |
subtask_1_4.txt | AC | 17 ms | 3064 KB |
subtask_1_5.txt | AC | 18 ms | 3064 KB |
subtask_1_6.txt | AC | 17 ms | 3064 KB |
subtask_1_7.txt | AC | 19 ms | 3064 KB |