#include "dreaming.h"
#include <bits/stdc++.h>
using namespace std;
const int nx=1e5+5;
vector<int> nt(nx);
int travelTime(int N, int M, int L, int A[], int B[], int T[]) {
if (N==1) return 0;
if (N==2&&M==1) return T[0];
if (N==2) return L;
for (int i=0; i<M; i++) nt[i]=T[i];
sort(nt.begin(), nt.end());
reverse(nt.begin(), nt.end());
return max(nt[0]+L+nt[1], nt[1]+2*L+nt[2]);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
1116 KB |
Output is correct |
2 |
Correct |
7 ms |
1220 KB |
Output is correct |
3 |
Correct |
7 ms |
1116 KB |
Output is correct |
4 |
Correct |
7 ms |
1116 KB |
Output is correct |
5 |
Correct |
8 ms |
1116 KB |
Output is correct |
6 |
Correct |
7 ms |
1196 KB |
Output is correct |
7 |
Correct |
8 ms |
1116 KB |
Output is correct |
8 |
Correct |
7 ms |
1112 KB |
Output is correct |
9 |
Correct |
7 ms |
1116 KB |
Output is correct |
10 |
Correct |
7 ms |
1112 KB |
Output is correct |
11 |
Correct |
2 ms |
604 KB |
Output is correct |
12 |
Correct |
2 ms |
604 KB |
Output is correct |
13 |
Correct |
2 ms |
688 KB |
Output is correct |
14 |
Correct |
2 ms |
604 KB |
Output is correct |
15 |
Correct |
2 ms |
604 KB |
Output is correct |
16 |
Correct |
2 ms |
604 KB |
Output is correct |
17 |
Correct |
2 ms |
852 KB |
Output is correct |
18 |
Correct |
2 ms |
860 KB |
Output is correct |
19 |
Correct |
2 ms |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
604 KB |
Output is correct |
21 |
Correct |
1 ms |
604 KB |
Output is correct |
22 |
Correct |
3 ms |
604 KB |
Output is correct |
23 |
Correct |
2 ms |
856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
19 ms |
1880 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |