罗非鱼Requiem @ 2021-08-19 20:52:38
以下是代码(C++):
#include <bits/stdc++.h>
using namespace std;
int a_n[10000][10000];
int main() {
int n, q;
cin >> n >> q;
for(int i=0;i<q;i++) {
int a1, a2, a3, a4;
cin >> a1 >> a2 >> a3;
if(a1==1) {
cin >> a4;
if(a4==0)
a_n[a2][a3] = -1;
else
a_n[a2][a3] = a4;
}
else
cout << a_n[a2][a3] << endl;
}
return 0;
}
by 罗非鱼Requiem @ 2021-08-20 17:13:44
谢谢各位大佬
by 罗非鱼Requiem @ 2021-08-20 17:17:07
@littlewave
我开了1e5,但是:
No valid executable file was produced by the compiler
/usr/bin/ld: ./ccHFfFRr.o: in function _GLOBAL__sub_I_a_n': src:(.text.startup+0x1d7): relocation truncated to fit: R_X86_64_PC32 against
.bss'
/usr/bin/ld: src:(.text.startup+0x1f1): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1
by 罗非鱼Requiem @ 2021-08-20 17:17:58
@kkksc0100_juruo 谢谢
by 罗非鱼Requiem @ 2021-08-20 17:18:21
@littlewave 谢谢
by 罗非鱼Requiem @ 2021-08-20 17:49:38
@littlewave 的确如此,超了是MEL