#include <bits/stdc++.h>
#define MOD 998244353
#define mod 1000000007
#define ll long long
#define ull unsigned long long
#define ui unsigned int
#define range(i,a,b) for (int i = a; i <= b; i++)
#define round(i,a,b) for (int i = a; i < b; i++)
using namespace std;
int t,i,j,m,change[MOD][MOD],start[MOD],black[MOD];
int befind = 0,n[MOD];
void withoutDouble();
bool find();
int main()
{
cin >> t;
round(i,0,t)
{
round(m,0,MOD) start[m] = 0;
cin >> n[i];
round(j,0,n[i]) cin >> start[j];
withoutDouble();
}
round(i,0,t)
{
round(j,0,n[i]) cout << change[i][j] << " ";
}
return 0;
}
bool find(int n)
{
int k;
round(k,0,befind)
{
if (n == black[k]) return false;
}
return true;
}
void withoutDouble()
{
int k,l;
sort(start,start + n[i]);
round(k,0,n[i])
{
round(l,i,n[i])
{
if (start[k] == start[l + 1] && !find(k))
{
change[i][l] = start[k];
black[befind++] = l + 1;
}
}
}
}
错误信息:
No valid executable file was produced by the compiler
/tmp/compiler_3m9yfbya/src: 在函数‘bool find(int)’中:
/tmp/compiler_3m9yfbya/src:32:9: 警告:unused variable ‘k’ [-Wunused-variable]
32 | int k;
| ^
/tmp/compiler_3m9yfbya/src: 在函数‘void withoutDouble()’中:
/tmp/compiler_3m9yfbya/src:41:9: 警告:unused variable ‘k’ [-Wunused-variable]
41 | int k,l;
| ^
/tmp/compiler_3m9yfbya/src:41:11: 警告:unused variable ‘l’ [-Wunused-variable]
41 | int k,l;
| ^
./cclGqetq.o: in function `_GLOBAL__sub_I_src':
src:(.text.startup+0x124): relocation truncated to fit: R_X86_64_PC32 against `.bss'
collect2: 错误:ld 返回 1
问题1:为什么内地编译器说:Source file not compiled?
问题2:为什么洛谷编译器报错?