Submission #332806

#TimeUsernameProblemLanguageResultExecution timeMemory
332806SPyofgameCoin Collecting (JOI19_ho_t4)C++14
0 / 100
1 ms364 KiB
#include <algorithm> #include <iostream> #include <iomanip> #include <vector> #include <cmath> #include <set> using namespace std; int main() { int n; cin >> n; int m = 2; int res = 0; for (int q = n << 1; q-->0; ) { int x, y; cin >> x >> y; int dx = (x < 1) ? 1 - x : (x > n) ? x - n : 0; int dy = (y < 1) ? 1 - y : (y > m) ? y - m : 0; res += dx + dy; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...