# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5421 | gs12006 | Divide and conquer (IZhO14_divide) | C++98 | 160 ms | 8824 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>
using namespace std;
long long int g[110000],l[110000],e[110000];
struct gw
{
long long int x,e,w;
}a[220000];
bool cmp(gw x,gw y)
{
if (x.e-l[x.x]==y.e-l[y.x]) return x.x<y.x;
return x.e-l[x.x]<y.e-l[y.x];
}
int main()
{
long long int n,i,se=0,ge=0,mini=1<<30,gmax=0;
gw tgw;
scanf("%lld",&n);
for (i=0;i<n;i++)
{
scanf("%lld %lld %lld",&l[i+1],&g[i+1],&e[i+1]);
g[i+1]+=ge;
ge=g[i+1];
e[i+1]+=se;
se=e[i+1];
tgw.e=e[i];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |