#include "dreaming.h"
#include<bits/stdc++.h>
using namespace std;
int n,m,l;
int travelTime(int ne,int me,int le,int u[],int ve[],int te[])
{
n=ne;m=me;l=le;
vector<int> v;
for(int x=0;x<m;x++)
v.push_back(te[x]);
for(int x=0;x<n-2*m;x++)
v.push_back(0);
sort(v.begin(),v.end());
int ans=0,s=v.size();
if(s-1>=0)ans=v[s-1];
if(s-2>=0)
ans=v[s-1]+v[s-2]+l;
if(s-3>=0)
ans=max(ans,v[s-2]+v[s-3]+2*l);
return ans;
} //sub5
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
2888 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
2888 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
1456 KB |
Output is correct |
2 |
Correct |
10 ms |
1500 KB |
Output is correct |
3 |
Correct |
7 ms |
1476 KB |
Output is correct |
4 |
Correct |
7 ms |
1476 KB |
Output is correct |
5 |
Correct |
8 ms |
1476 KB |
Output is correct |
6 |
Correct |
8 ms |
1720 KB |
Output is correct |
7 |
Correct |
7 ms |
1492 KB |
Output is correct |
8 |
Correct |
7 ms |
1468 KB |
Output is correct |
9 |
Correct |
7 ms |
1512 KB |
Output is correct |
10 |
Correct |
8 ms |
1520 KB |
Output is correct |
11 |
Correct |
1 ms |
212 KB |
Output is correct |
12 |
Correct |
2 ms |
976 KB |
Output is correct |
13 |
Correct |
2 ms |
976 KB |
Output is correct |
14 |
Correct |
2 ms |
848 KB |
Output is correct |
15 |
Correct |
2 ms |
976 KB |
Output is correct |
16 |
Correct |
2 ms |
976 KB |
Output is correct |
17 |
Correct |
2 ms |
976 KB |
Output is correct |
18 |
Correct |
3 ms |
976 KB |
Output is correct |
19 |
Correct |
2 ms |
940 KB |
Output is correct |
20 |
Correct |
1 ms |
212 KB |
Output is correct |
21 |
Correct |
1 ms |
304 KB |
Output is correct |
22 |
Correct |
1 ms |
340 KB |
Output is correct |
23 |
Correct |
2 ms |
976 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
2888 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |