为什么会报错这个啊
查看原帖
为什么会报错这个啊
1378709
Yue_Hao楼主2024/12/28 21:46
#include <bits/stdc++.h>
using namespace std;
bool a[5000010][1000010];
int main(){
	int m, n, k;
	cin >> m >> n >> k;
	char c;
	int s;
	k *= 2;
	while(k--){
		cin >> c >> s;
		if(c == 'R') for(int i = 1; i <= n; i++) a[s][i] = !a[s][i];
		else for(int i = 1; i <= m; i++) a[i][s] = !a[i][s];
	}
	int sum = 0;
	for(int i = 1; i <= m; i++){
		for(int j = 1; j <= n; j++){
			if(a[i][j]) sum++;
		}
	}
	cout << sum;
	return 0;
}

抛出信息: No valid executable file was produced by the compiler ./ccwqSfLW.o: in function __static_initialization_and_destruction_0(int, int)': src:(.text+0x1e0): relocation truncated to fit: R_X86_64_PC32 against .bss' src:(.text+0x1f3): relocation truncated to fit: R_X86_64_PC32 against `.bss' collect2: 错误:ld 返回 1


翻译: 编译器未生成有效的可执行文件 ./ccwqSfLW.o:在函数`__static_initiation_and_destruction_0(int,int)'中: src:(.text+0x1e0):截断重定位以适应:R_X86_64_PC32对“.bss” src:(.text+0x1f3):截断重定位以适应:R_X86_64_PC32对“.bss”(百度翻译)

2024/12/28 21:46
加载中...