Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164798 报数 C++ Compile Error 0 MS 0 KB 396 2026-11-07 15:04:50

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:16: error: 'cnt' was not declared in this scope
             if(cnt>3){
                ^