Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
165018 王垚植 杀人游戏 C++ Time Limit Exceeded 1000 MS 264 KB 674 2026-11-08 17:31:48

Tests(0/5):


Code:

#include <bits/stdc++.h> using namespace std; int a[110]={} ; int main(){ int n,m; cin>>n>>m; int cur=1; for(int i=1;i<n;++i){ for(int j=1;j<m;++j){ cur++; if(cur>n){ cur-=n; } while(a[cur]==0){ cur++; if(cur>n){ cur-=n; } } a[cur]=0; cout<<cur<<' '; while(a[cur]==0){ cur++; if(cur>n){ cur-=n; } } } } return 0; }