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 country[MAX_NUM][4];
int main() {
int num;
int cn;
cin >> num >> cn;
int degree=1;
for (int i = 1; i <= num; i++) {
for (int j = 0; j < 4; j++) {
cin>>country[i][j];
}
}
for (int i = 1; i <= num; i++) {
if (cn == country[i][0]){
cn = i;
}
}
for (int i = 1; i <= num; i++) {
if (country[i][1] > country[cn][1]) {
degree++;
}
else if (country[i][1] == country[cn][1] && country[i][2] > country[cn][2]) {
degree++;
}
else if (country[i][1] == country[cn][1] && country[i][2] == country[cn][2] && country[i][3] > country[cn][3]) {
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... |