# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
48509 |
2018-05-15T09:03:57 Z |
leehosu01 |
수족관 3 (KOI13_aqua3) |
C++17 |
|
1000 ms |
18196 KB |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll cut[300002],N,K;
ll pro(int loc)
{
ll tot=0,dep=1ll<<54;
for(int i=loc<<1;i<N-2;i+=2)
tot+=(cut[i+2]-cut[i])*(dep=min(dep,cut[i+1]));
dep=1ll<<54;
for(int i=loc-2;i>0;i-=2)
tot+=(cut[i]-cut[i-2])*(dep=min(dep,cut[i-1]));
return tot;
}
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cin>>N;
int i;
ll aA[2];
for(i=0;i<N;i++)
{
cin>>aA[0]>>aA[1];
cut[i]=aA[i&1];
}
cin>>K;
ll fl=0;
for(i=0;i<N;i+=2)fl=max(fl,pro(i));
printf("%lld",fl);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
620 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1068 ms |
7796 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1087 ms |
13064 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1079 ms |
18196 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |