Submission #4830

#TimeUsernameProblemLanguageResultExecution timeMemory
4830gs13068입력숫자 (KOI13_mystery)C++98
100 / 100
0 ms1088 KiB
#include<cstdio> int a[30]; int main() { int i,n,t,p=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&t); while(a[p])p=(p+1)%n; a[p]=t; p=(p+t)%n; } printf("%d\n",n); for(i=0;i<n;i++)printf("%d ",a[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...