Submission #4581

#TimeUsernameProblemLanguageResultExecution timeMemory
4581ansol4328올림픽 (KOI13_olympic)C++98
100 / 100
0 ms1116 KiB
#include<stdio.h> int n, find, m[1002][7]; int main() { int i, num, cnt=1; scanf("%d %d",&n,&find); for(i=1 ; i<=n ; i++) { scanf("%d %d %d %d",&m[i][1],&m[i][2],&m[i][3],&m[i][4]); if(m[i][1]==find) num=i; } for(i=1 ; i<=n ; i++) { if(m[i][2]>m[num][2]) cnt++; if(m[i][2]==m[num][2] && m[i][3]>m[num][3]) cnt++; if(m[i][2]==m[num][2] && m[i][3]==m[num][3] && m[i][4]>m[num][4]) cnt++; } printf("%d",cnt); 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...