Submission #12692

#TimeUsernameProblemLanguageResultExecution timeMemory
12692gs14004입력숫자 (KOI13_mystery)C++98
100 / 100
0 ms1088 KiB
#include <cstdio> #include <cstring> int n,a[35],r[105]; int main(){ scanf("%d",&n); for (int i=0; i<n; i++) { scanf("%d",&a[i]); } int p = 0; for (int i=0; i<n; i++) { while(r[p]) p = (p+1)%n; r[p] = a[i]; p += a[i]; p %= n; } printf("%d\n",n); for (int i=0; i<n; i++) { printf("%d ",r[i]); } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...