Submission #332806

# Submission time Handle Problem Language Result Execution time Memory
332806 2020-12-03T12:34:07 Z SPyofgame Coin Collecting (JOI19_ho_t4) C++14
0 / 100
1 ms 364 KB
#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 time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 364 KB Output isn't correct
2 Halted 0 ms 0 KB -