Submission #4581

# Submission time Handle Problem Language Result Execution time Memory
4581 2013-11-06T15:17:07 Z ansol4328 올림픽 (KOI13_olympic) C++
100 / 100
0 ms 1116 KB
#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 time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Correct 0 ms 1116 KB Output is correct
4 Correct 0 ms 1116 KB Output is correct
5 Correct 0 ms 1116 KB Output is correct
6 Correct 0 ms 1116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Correct 0 ms 1116 KB Output is correct
4 Correct 0 ms 1116 KB Output is correct
5 Correct 0 ms 1116 KB Output is correct
6 Correct 0 ms 1116 KB Output is correct
7 Correct 0 ms 1116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Correct 0 ms 1116 KB Output is correct
4 Correct 0 ms 1116 KB Output is correct
5 Correct 0 ms 1116 KB Output is correct
6 Correct 0 ms 1116 KB Output is correct
7 Correct 0 ms 1116 KB Output is correct
8 Correct 0 ms 1116 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1116 KB Output is correct
2 Correct 0 ms 1116 KB Output is correct
3 Correct 0 ms 1116 KB Output is correct
4 Correct 0 ms 1116 KB Output is correct
5 Correct 0 ms 1116 KB Output is correct
6 Correct 0 ms 1116 KB Output is correct
7 Correct 0 ms 1116 KB Output is correct
8 Correct 0 ms 1116 KB Output is correct
9 Correct 0 ms 1116 KB Output is correct