# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154758 | crisente235 | 올림픽 (KOI13_olympic) | C++14 | 3 ms | 376 KiB |
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<iostream>
using namespace std;
#define MAX_NUM 1001
int medal[MAX_NUM][4];
int main() {
int num;
int cu;
cin >> num >> cu;
for (int i = 1; i <= num; i++) {
for (int j = 1; j <4; j++) {
cin >> medal[i][j];
}
if (medal[i][0] == cu) {
cu == i;
}
}
int cnt = 1;
for (int i = 1; i <= num; i++) {
if (medal[i][1] > medal[cu][1]) {
cnt++;
}
else if (medal[i][1] == medal[cu][1] && medal[i][1] > medal[cu][1]) {
cnt++;
}
else if (medal[i][1] == medal[cu][1] && medal[i][1] == medal[cu][1] && medal[i][1] > medal[cu][1]) {
cnt++;
}
}
cout << cnt;
return 0;
}
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |