Submission #5327

#TimeUsernameProblemLanguageResultExecution timeMemory
5327baneling100입력숫자 (KOI13_mystery)C++98
100 / 100
0 ms1088 KiB
#include <stdio.h> int n, x[30]; int main(void) { int i, prev, now, point=0; scanf("%d %d",&n,&prev); x[0]=prev; for(i=1 ; i<n ; i++) { scanf("%d",&now); point+=prev; point%=n; while(x[point]) { point++; point%=n; } x[point]=now; prev=now; } printf("%d\n",n); for(i=0 ; i<n ; i++) printf("%d ",x[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...