Submission #154760

# Submission time Handle Problem Language Result Execution time Memory
154760 2019-09-24T14:17:14 Z crisente235 올림픽 (KOI13_olympic) C++14
0 / 100
3 ms 376 KB
#include<iostream>
 
using namespace std;
 
#define MAX_NUM 1002
 
int country[MAX_NUM][4];
 
int main() {
	int num;
	int cn;
	cin >> num >> cn;
	int key = 0;
	int degree=1;
	for (int i = 1; i <= num; i++) {
		for (int j = 1; j < 4; j++) {
			cin >> key;
			cin >> country[key][j];
		}
	}

	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
1 Incorrect 2 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 376 KB Output isn't correct
2 Halted 0 ms 0 KB -