# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
580833 | JovanB | Coin Collecting (JOI19_ho_t4) | C++17 | 63 ms | 8120 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;
using ll = long long;
using ld = long double;
const int N = 200000;
ll a[N+5][2], b[N+5][2];
int main(){
ios_base::sync_with_stdio(false), cin.tie(0);
cout.precision(10);
cout << fixed;
int n;
cin >> n;
ll res = 0;
for(int i=1; i<=2*n; i++){
int x, y;
cin >> x >> y;
if(x < 1){
res += 1 - x;
x = 1;
}
if(x > n){
res += x - n;
x = n;
}
if(y < 1){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |