Submission #4550

# Submission time Handle Problem Language Result Execution time Memory
4550 2013-10-27T14:48:24 Z ansol4328 올림픽 (KOI13_olympic) C++
100 / 100
0 ms 1108 KB
#include<stdio.h>

int n, m;
int a[1002][5];

int main()
{
    int i, k, cnt=1;
    scanf("%d %d",&n,&m);
    for(i=1 ; i<=n ; i++)
    {
        scanf("%d",&k);
        scanf("%d %d %d",&a[k][1],&a[k][2],&a[k][3]);
    }
    for(i=1 ; i<=n ; i++)
    {
        if(a[m][1]<a[i][1]) cnt++;
        if(a[m][1]==a[i][1] && a[m][2]<a[i][2]) cnt++;
        if(a[m][1]==a[i][1] && a[m][2]==a[i][2] && a[m][3]<a[i][3]) cnt++;
    }
    printf("%d",cnt);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
3 Correct 0 ms 1108 KB Output is correct
4 Correct 0 ms 1108 KB Output is correct
5 Correct 0 ms 1108 KB Output is correct
6 Correct 0 ms 1108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
3 Correct 0 ms 1108 KB Output is correct
4 Correct 0 ms 1108 KB Output is correct
5 Correct 0 ms 1108 KB Output is correct
6 Correct 0 ms 1108 KB Output is correct
7 Correct 0 ms 1108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
3 Correct 0 ms 1108 KB Output is correct
4 Correct 0 ms 1108 KB Output is correct
5 Correct 0 ms 1108 KB Output is correct
6 Correct 0 ms 1108 KB Output is correct
7 Correct 0 ms 1108 KB Output is correct
8 Correct 0 ms 1108 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1108 KB Output is correct
2 Correct 0 ms 1108 KB Output is correct
3 Correct 0 ms 1108 KB Output is correct
4 Correct 0 ms 1108 KB Output is correct
5 Correct 0 ms 1108 KB Output is correct
6 Correct 0 ms 1108 KB Output is correct
7 Correct 0 ms 1108 KB Output is correct
8 Correct 0 ms 1108 KB Output is correct
9 Correct 0 ms 1108 KB Output is correct