Submission #154768

# Submission time Handle Problem Language Result Execution time Memory
154768 2019-09-24T14:40:52 Z crisente235 올림픽 (KOI13_olympic) C++14
100 / 100
5 ms 504 KB
#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
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
4 Correct 2 ms 360 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 452 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 3 ms 376 KB Output is correct
6 Correct 4 ms 376 KB Output is correct
7 Correct 4 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 504 KB Output is correct
5 Correct 3 ms 504 KB Output is correct
6 Correct 3 ms 376 KB Output is correct
7 Correct 3 ms 376 KB Output is correct
8 Correct 3 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 368 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 3 ms 376 KB Output is correct
5 Correct 4 ms 376 KB Output is correct
6 Correct 3 ms 376 KB Output is correct
7 Correct 4 ms 376 KB Output is correct
8 Correct 4 ms 504 KB Output is correct
9 Correct 4 ms 376 KB Output is correct