답안 #4484

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4484 2013-10-11T06:09:03 Z ansol4328 입력숫자 (KOI13_mystery) C++
100 / 100
0 ms 1088 KB
#include<stdio.h>

int n, m[32];
int check[32];
int in[32];

int main()
{
    int i, cnt, from;
    scanf("%d",&n);
    for(i=0 ; i<n ; i++)
    {
        scanf("%d",&m[i]);
    }
    cnt=1;
    from=0;
    in[from]=m[0];
    check[from]=1;
    for(i=1 ; i<n ; i++)
    {
        from+=in[from];
        from%=n;
        while(check[from]!=0)
        {
            from++;
            from%=n;
        }
        in[from]=m[i];
        check[from]=1;
    }
    printf("%d\n",n);
    for(i=0 ; i<n ; i++)
    {
        printf("%d ",in[i]);
    }
    return 0;
}
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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
# 결과 실행 시간 메모리 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