Submission #4484

#TimeUsernameProblemLanguageResultExecution timeMemory
4484ansol4328입력숫자 (KOI13_mystery)C++98
100 / 100
0 ms1088 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...