No valid executable file was produced by the compiler
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: 错误:ld 返回 1
代码:
#include <bits/stdc++.h>
using namespace std;
const int N=1e6+10;
int n,k,a[N][N],ans,x,y;
int vis[N][N];
int main(){
memset(vis,0,sizeof(vis));
cin>>n>>k;
for(int i=1;i<=k;i++){
cin>>x>>y;
vis[x][y]=1;
for(int i=1;i<=n;i++){
if(vis[x][i]!=1){
vis[x][i]=1;
ans++;
}
}
for(int i=1;i<=n;i++){
if(vis[i][y]!=1){
vis[i][y]=1;
ans++;
}
}
}
cout<<ans<<endl;
return 0;
}