Submission #5744

# Submission time Handle Problem Language Result Execution time Memory
5744 2014-05-15T12:10:49 Z hana5505 입력숫자 (KOI13_mystery) C++
100 / 100
0 ms 1088 KB
#include<stdio.h>
int NUM[101];
int ar[101];
int ans[101];
int main(){
    int i, token, N;
    int count = 0, from = 0, value;
 
    scanf("%d", &N);
 
    for (i = 0; i < N; i++){
        scanf("%d", &token);
        NUM[i] = token;
        ar[i] = token;
    }
    printf("%d\n", N);
    for (i = 0; i < N; i++){
        ans[from] = ar[i];
        if (i == N - 1) break;
        from = (from + ar[i]) % N;
        while (ans[from]!=0) from = (from + 1) % N;
    }
    for (i = 0; i < N; i++) printf("%d ", ans[i]);
    return(0);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Correct 0 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Correct 0 ms 1088 KB Output is correct
8 Correct 0 ms 1088 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1088 KB Output is correct
2 Correct 0 ms 1088 KB Output is correct
3 Correct 0 ms 1088 KB Output is correct
4 Correct 0 ms 1088 KB Output is correct
5 Correct 0 ms 1088 KB Output is correct
6 Correct 0 ms 1088 KB Output is correct
7 Correct 0 ms 1088 KB Output is correct
8 Correct 0 ms 1088 KB Output is correct
9 Correct 0 ms 1088 KB Output is correct
10 Correct 0 ms 1088 KB Output is correct