第七届蓝桥杯抽签问题,编译显示error: ld returned 1 exit status错误
2018-11-21 22:26
736 查看
#include <stdio.h>
#define N 6
#define M 5
#define BUF 1024
void f(int a[], int k, int m, char b[])
{
int i,j;
if(k==N){
b[M] = 0;
if(m==0) printf("%s\n",b);
return;
}
for(i=0; i<=a[k]; i++){
for(j=0; j<i; j++) b[M-m+j] = k+'A';
f(a,k+1,m-j,b); //填空位置
}
}
int main()
{
int a
= {4,2,2,1,1,3};
char b[BUF];
f(a,0,M,b);
return 0;
}
相关文章推荐
- 使用gcc编译时错误提示: ld returned 1 exit status问题
- QT4 编译错误 error: collect2: ld returned 1 exit status
- QT4 编译错误 error: collect2: ld returned 1 exit status
- centos7.1 QT5编译出现:cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- QT4 编译错误 error: collect2: ld returned 1 exit status
- Qt中的:error: collect2: ld returned 1 exit status 错误问题
- centos7.1 QT5编译出现:cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- Ubuntu15.04 QT5编译出现cannot find -lGL 和 collect2:error:ld returned 1 exit status 错误
- Linux gcc编译提示:undefined reference to `sqrtf' collect2: error: ld returned 1 exit status
- redis编译安装:make 的新错误--collect2: ld returned 1 exit status
- xp系统Arduino编译时,出现collect2.exe: error: ld returned 5 exit status的解决方案
- 【Qt】编译时collect2.exe:-1: error: error: ld returned 1 exit status
- 关于qt :: error: collect2: ld returned 1 exit status的错误
- Android开发-编译ICS时遇到collect2: ld returned 1 exit status错误解决方案
- Qt Creator 的 error: collect2: ld returned 1 exit status 问题
- Arduino上“Collect2.exe: error: ld returned 5 exit status”错误的解决方法
- Qt Creator 的 error: collect2: ld returned 1 exit status 问题
- linux下Qt问题cannot find -lGL collect2: error: ld returned 1 exit status
- Eclipse CDT 代码首次编译通过,第二次编译提示error: ld returned 1 exit status
- 关于Qt交叉编译过程中出现的collect2: ld returned 1 exit status问题的解决方案