#include <stdio.h>
#include <algorithm>
struct data{
int num, h, t;
bool operator <(const data &r) const {
if(t==r.t) return h<r.t;
return t<r.t;
}
} honey[100010];
int main() {
int n, i;
scanf("%d", &n);
for(i=0;i<n;i++) {
scanf("%d", &honey[i].h);
honey[i].num=i+1;
}
for(i=0;i<n;i++) {
scanf("%d", &honey[i].t);
}
std::sort(honey, honey+n);
printf("%d %d\n", honey[0].num, honey[1].num);
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
4 |
Correct |
0 ms |
2256 KB |
Output is correct |
5 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
3 |
Correct |
0 ms |
2256 KB |
Output is correct |
4 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
7 |
Runtime error |
5 ms |
2256 KB |
SIGSEGV Segmentation fault |
8 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
2256 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
41 ms |
2256 KB |
Output isn't correct |
2 |
Incorrect |
34 ms |
2256 KB |
Output isn't correct |
3 |
Incorrect |
36 ms |
2256 KB |
Output isn't correct |
4 |
Incorrect |
20 ms |
2256 KB |
Output isn't correct |
5 |
Incorrect |
32 ms |
2256 KB |
Output isn't correct |
6 |
Incorrect |
13 ms |
2256 KB |
Output isn't correct |
7 |
Incorrect |
38 ms |
2256 KB |
Output isn't correct |
8 |
Execution timed out |
1000 ms |
2252 KB |
Program timed out |
9 |
Runtime error |
88 ms |
2256 KB |
SIGSEGV Segmentation fault |
10 |
Incorrect |
19 ms |
2256 KB |
Output isn't correct |
11 |
Incorrect |
17 ms |
2256 KB |
Output isn't correct |
12 |
Incorrect |
20 ms |
2256 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
45 ms |
2256 KB |
Output isn't correct |
2 |
Correct |
37 ms |
2256 KB |
Output is correct |
3 |
Correct |
45 ms |
2256 KB |
Output is correct |
4 |
Incorrect |
35 ms |
2256 KB |
Output isn't correct |
5 |
Runtime error |
52 ms |
2256 KB |
SIGSEGV Segmentation fault |
6 |
Incorrect |
38 ms |
2256 KB |
Output isn't correct |
7 |
Incorrect |
37 ms |
2256 KB |
Output isn't correct |
8 |
Incorrect |
29 ms |
2256 KB |
Output isn't correct |
9 |
Correct |
4 ms |
2256 KB |
Output is correct |
10 |
Incorrect |
38 ms |
2256 KB |
Output isn't correct |
11 |
Correct |
40 ms |
2256 KB |
Output is correct |
12 |
Incorrect |
28 ms |
2256 KB |
Output isn't correct |
13 |
Correct |
25 ms |
2256 KB |
Output is correct |
14 |
Incorrect |
47 ms |
2256 KB |
Output isn't correct |
15 |
Correct |
36 ms |
2256 KB |
Output is correct |
16 |
Execution timed out |
1000 ms |
2252 KB |
Program timed out |
17 |
Execution timed out |
1000 ms |
2252 KB |
Program timed out |