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;
int gold[1001];
int sliver[1001];
int bronze[1001];
int main() {
int num;
int cn;
int key = 0;
int degree = 1;
cin >> num >> cn;
for (int i = 1; i <= num; i++) {
cin >> key;
cin >> gold[key]>>sliver[key]>>bronze[key];
}
for (int i = 1; i <= num; i++) {
if (gold[i] > gold[cn]) {
degree++;
}
else if (gold[i] ==gold[cn] && sliver[i] > sliver[cn]) {
degree++;
}
else if (gold[i] == gold[cn] && sliver[i] == sliver[cn] && bronze[i] > bronze[cn]) {
degree++;
}
}
cout << degree;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |