Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133413 刘益梵 18排列骨头 C++ Compile Error 0 MS 0 KB 5200 2025-10-18 17:00:14

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; } #include<bits/stdc++.h> using namespace std; int a[100]; //0:没有取出,1:已经取出 int main(){ int cnt=0,i=1,ss=0; //取出的个数;位置;数数 while(cnt<15){ if(a[i]==0){//没有取出来的位置报数 ss++; if(ss==9){//如果这个位置刚好数到9 a[i]=1;//被取出 cnt++;//取出的次数+1 ss=0; } } i++;//每次循环 ,位置往后移动 if(i>30) i=1;//超过最大位置,从新从第一个开始 } //最后遍历一遍,看看任然为0的元素,说明没有被取出 for(int j=1;j<=30;j++){ if(a[j]==0){ cout<<j<<" "; } } return 0; }


Run Info:

Main.cc:28:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:29:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:53:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:54:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:78:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:79:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:103:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:104:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:128:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:129:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:153:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:154:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^
Main.cc: At global scope:
Main.cc:178:10: error: redefinition of 'int a [100]'
 int a[100]; //0:没有取出,1:已经取出 
          ^
Main.cc:3:5: note: 'int a [100]' previously declared here
 int a[100]; //0:没有取出,1:已经取出 
     ^
Main.cc: In function 'int main()':
Main.cc:179:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:4:5: note: 'int main()' previously defined here
 int main(){
     ^