# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
32180 | minchurl | Palembang Bridges (APIO15_bridge) | C++11 | 2000 ms | 3460 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<stdio.h>
#include<math.h>
#include<algorithm>
#define MAX_N 100005
#define abs(x) ((x)>0?(x):(-(x)))
#define LL long long
using namespace std;
struct emp{
int x,y;
};
emp arr[MAX_N];
LL N,K;
LL only_arr[2*MAX_N],ans;
LL input(){
LL i,n,S,T,sum=0;
char P[2],Q[2];
n=0;
for(i=0;i<N;i++){
scanf("%s %lld %s %lld",P,&S,Q,&T);
if(P[0]==Q[0]){
sum+=abs(S-T);
}else{
only_arr[2*n+1]=S;only_arr[2*n+2]=T;
arr[++n].x=S;arr[n].y=T;
sum++;
}
}
N=n;
return sum;
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |