| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 76656 | 周梓易 | 杀人游戏 | C++ | Runtime Error | 0 MS | 268 KB | 338 | 2024-06-02 16:24:14 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; int die[n+1]={0}; int sr=0; int ren=0,bao=0; while(sr!=n-1){ ren++; if(ren>n){ ren+1; } if(die[ren]==0){ bao++; if(bao==m){ cout<<ren<<" "; die[ren]=1; bao=0; sr++; } } } return 0; }
Runtime Error:Segmentation fault