이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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 |
|---|
| 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... |