有没有大神帮我看看这个编译失败啥意思
  • 板块灌水区
  • 楼主liuergou
  • 当前回复8
  • 已保存回复8
  • 发布时间2023/10/4 10:54
  • 上次更新2023/11/2 15:54:38
查看原帖
有没有大神帮我看看这个编译失败啥意思
722656
liuergou楼主2023/10/4 10:54

半成品代码

#include <bits/stdc++.h>
using namespace std;
int n,m;
struct card{
    int c,d; 
}a[1000010];
int way=-1;
card ji;
struct player{
    int id,cur;
    card c[100010];
    int box[6][20];
}p[1000010];
void give(){
    for(int i=1;i<=n;i++){
        p[i].id=i;
        for(int j=1;j<=7;j++){
            p[i].c[++p[i].cur]=a[m--];
        }
    }
    return;
}
void plus(int pl,card x){
    for(int i=1;i<=5;i++){
        if(i==x.c||x.c==5)p[pl].box[i][15]++;
        if(x.d==11){
            p[pl].box[i][11]++;
        }
        for(int j=1;j<=14;j++){
            if((i==5&&j<13)||(i<5&&j>12)||(j==12))continue;
            if(x.c==5){
                if((j!=14&&j!=11)||(j==14&&x.d==14))p[pl].box[i][j]++;
            }
            else if(x.d>9){
                if(j==11)continue;
                else if(i==x.c||j==x.d){
                    p[pl].box[i][j]++;
                }
            }
            else if(x.c==i||j==x.d){
                p[pl].box[i][j]++;
            }
        }
    }
    return;
}
int get(int pl,card x){
    int ans=0;
    
    
    return ans;
}
void rod(int pl,card x){
    if(x.d==11){
        return;
    }
    
}
int main(){
    cin >> n >> m;
    for(int i=1;i<=m;i++){
        cin >> a[i].c >> a[i].d;
    }
    give();
    int cur=0;
    card last=a[m];
    m--;
    while(m){
        rod(cur%n,last);
        
        
        
        cur++;
    }
    return 0;
}

报错信息

 valid executable file was produced by the compiler
./ccp37Yxo.o: in function `__static_initialization_and_destruction_0(int, int)':
src:(.text+0x4fe): relocation truncated to fit: R_X86_64_32 against `.bss'
src:(.text+0x50d): relocation truncated to fit: R_X86_64_32 against `.bss'
collect2: 错误:ld 返回 1
2023/10/4 10:54
加载中...