P1076编译错误
  • 板块题目总版
  • 楼主adminh
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/7/16 20:21
  • 上次更新2024/7/16 21:31:11
查看原帖
P1076编译错误
1249836
adminh楼主2024/7/16 20:21
#include<bits/stdc++.h>
using namespace std;
const int mod=20123;
struct s{
    int x,y;
}a[1000005][1000005];
int n,m,k;
int sum=0;
int main(){
    cin>>n>>m;
    for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++)
    cin>>a[i][j].x>>a[i][j].y;
    cin>>k;
    for(int i=1;i<=n;i++){
        sum+=a[i][k].y%mod;
        int l=a[i][k].y;
        int p=k;
        while(l){
            if(p==0)p=n;
            if(a[i][p].x==1)l--;
            if(!l)break;
            p--;
        }
        k=p;
    }
    cout<<sum%mod;
    return 0;
}

评测显示:

No valid executable file was produced by the compiler
./cccNLYDY.o: in function `_GLOBAL__sub_I_src':
src:(.text.startup+0x1a7): relocation truncated to fit: R_X86_64_PC32 against `.bss'
src:(.text.startup+0x1c1): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1

求助!

2024/7/16 20:21
加载中...