This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |