# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101992 | brcode | Coin Collecting (JOI19_ho_t4) | C++14 | 302 ms | 5028 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 <iostream>
using namespace std;
int r[2];
long long ans;
int c[100100][2];
int main(){
int n;
cin>>n;
for(int i=0;i<n*2;i++){
int x,y;
cin>>x>>y;
if(x<1){
ans+=(1-x);
x= 1;
}
if(x>n){
ans+=(x-n);
x=n;
}
if(y<1){
ans+=1-y;
y=1;
}
if(y>2){
ans+=y-2;
y=2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |