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

Tests(0/5):


Code:

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