Submission #154758

#TimeUsernameProblemLanguageResultExecution timeMemory
154758crisente235올림픽 (KOI13_olympic)C++14
0 / 100
3 ms376 KiB
#include<iostream> using namespace std; #define MAX_NUM 1001 int medal[MAX_NUM][4]; int main() { int num; int cu; cin >> num >> cu; for (int i = 1; i <= num; i++) { for (int j = 1; j <4; j++) { cin >> medal[i][j]; } if (medal[i][0] == cu) { cu == i; } } int cnt = 1; for (int i = 1; i <= num; i++) { if (medal[i][1] > medal[cu][1]) { cnt++; } else if (medal[i][1] == medal[cu][1] && medal[i][1] > medal[cu][1]) { cnt++; } else if (medal[i][1] == medal[cu][1] && medal[i][1] == medal[cu][1] && medal[i][1] > medal[cu][1]) { cnt++; } } cout << cnt; return 0; }

Compilation message (stderr)

olympic.cpp: In function 'int main()':
olympic.cpp:20:7: warning: statement has no effect [-Wunused-value]
    cu == i;
    ~~~^~~~
#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...