Submission #1243995
Source Code Expand
N, M = map(int, input().split(" ")) student = []; pos = []; for i in range(N) : a, b = map(int, input().split(" ")) student.append((a, b)) for i in range(M) : a, b = map(int, input().split(" ")) pos.append((a,b)) for st in student : ans = -1; score = 100000000; for i in range(M) : tmpscore = abs(st[0] - pos[i][0]) + abs(st[1] - pos[i][1]) if score > tmpscore : score = tmpscore; ans = i; print(ans+1);
Submission Info
Submission Time | |
---|---|
Task | B - Checkpoints |
User | tokoharu |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 446 Byte |
Status | CE |
Compile Error
./Main.cpp:1:1: error: ‘N’ does not name a type N, M = map(int, input().split(" ")) ^ ./Main.cpp:4:1: error: ‘pos’ does not name a type pos = []; ^ ./Main.cpp:5:1: error: expected unqualified-id before ‘for’ for i in range(N) : ^ ./Main.cpp:15:2: error: ‘score’ does not name a type score = 100000000; ^ ./Main.cpp:16:2: error: expected unqualified-id before ‘for’ for i in range(M) : ^ ./Main.cpp:20:4: error: ‘ans’ does not name a type ans = i; ^ ./Main.cpp:21:7: error: expected constructor, destructor, or type conversion before ‘(’ token print(ans+1); ^