# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
104319 | ihdignite | Coin Collecting (JOI19_ho_t4) | C++14 | 3 ms | 512 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int mxN=1e5;
int n, c[mxN][2];
ll a1;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for(int i=0, x, y; i<2*n; ++i) {
cin >> x >> y;
if(x<1) {
a1+=1-x;
x=1;
}
if(x>n) {
a1+=x-n;
x=n;
}
if(y<1) {
a1+=1-y;
y=1;
}
if(y>2) {
a1+=y-2;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |