# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
206940 |
2020-03-06T00:55:53 Z |
oko |
Dreaming (IOI13_dreaming) |
C++14 |
|
53 ms |
6264 KB |
#include<bits/stdc++.h>
#include "dreaming.h"
using namespace std;
const long long mod=1e9+7;
int n,m,l;
multiset<int>ms;
int travelTime(int N, int M, int L, int A[], int B[], int T[])
{
n=N,m=M,l=L;
for(int i=0;i<m;i++)ms.insert(T[i]);
if(m==0)
{
if(n==1)return 0;
if(n==2)return l;
else return l+l;
}
if(m==1)
{
if(n==2)return l+T[0];
else return l+max(l,T[0]);
}
else
{
int mx=*--ms.end();
ms.erase(--ms.end());
int mxx=*--ms.end();
return max(l,mx)+max(l,mxx);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
6264 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
6264 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
6264 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
21 ms |
2552 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
6264 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
53 ms |
6264 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |