#include<iostream>
using namespace std;
#define MAX_NUM 1010
int country[MAX_NUM][4];
int main() {
int num;
int cn;
cin >> num >> cn;
int degree=1;
for (int i = 0; i < num; i++) {
for (int j = 0; j < 4; j++) {
cin>>country[i][j];
}
}
for (int i = 0; i < num; i++) {
if (cn == country[i][0]){
cn = i;
}
}
for (int i = 0; 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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
500 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
508 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Correct |
2 ms |
256 KB |
Output is correct |
4 |
Correct |
2 ms |
252 KB |
Output is correct |
5 |
Correct |
2 ms |
256 KB |
Output is correct |
6 |
Correct |
2 ms |
256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
3 ms |
376 KB |
Output is correct |
2 |
Incorrect |
3 ms |
376 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |