Submission #154768

#TimeUsernameProblemLanguageResultExecution timeMemory
154768crisente235올림픽 (KOI13_olympic)C++14
100 / 100
5 ms504 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...