| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140756 | 谭思宸 | 环形密码 | C++ | Output Limit Exceeded | 31 MS | 272 KB | 584 | 2025-12-20 12:10:49 |
#include<iostream> using namespace std; int main(){ int a[31]={0}; int n,m; cin>>n>>m; for(int i=1;i<=n;i++) cin>>a[i]; int cnt=0; int i=0; int pos=1; while(cnt<n){ if(a[pos]!=0){ i++; if(i==m){ cnt++; m=a[pos]; cout<<a[pos]<<" "; a[pos]=0; i=0; } } pos++; if(pos==n+1){ pos=1; } cout<<endl; } return 0; }