# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5396 | gs12117 | Divide and conquer (IZhO14_divide) | C++98 | 68 ms | 6952 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<algorithm>
int n;
int x[100100];
int gold[100100];
long long int gsum[100100];
int eng[100100];
long long int esum[100100];
struct data{
long long int gtot;
long long int etot;
bool operator<(const data &r)const{
return etot<r.etot||(etot==r.etot&>ot<r.gtot);
}
};
data points[200100];
long long int ans;
int main(){
int i;
long long int ming;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%d%d",&x[i],&gold[i],&eng[i]);
gsum[i+1]=gold[i]+gsum[i];
esum[i+1]=eng[i]+esum[i];
}
for(i=0;i<n;i++){
points[i*2].gtot=gsum[i];
points[i*2].etot=esum[i]-x[i];
points[i*2+1].gtot=gsum[i+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... |