QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#860025 | #9678. 网友小 Z 的树 | lfxxx | Compile Error | / | / | C++17 | 528b | 2025-01-18 09:33:52 | 2025-01-18 09:33:53 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
mt19937 rd(chrono::system_clock::now().time_since_epoch().count());
constexpr int N = 1e6 + 5;
int p[N], fa[N];
int main(){
freopen("in.txt", "w", stdout);
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T = 100, n = 100;
cout << "0 " << T << '\n';
while (T--) {
cout << n << '\n';
iota(p, p + 1 + n, 0);
shuffle(p + 1, p + 1 + n, rd);
for (int i = 2; i <= n; ++i) {
cout << p[i] << ' ' << p[rd() % (i - 1) + 1] << '\n';
}
}
return 0;
}
詳細信息
answer.code: In function ‘int main()’: answer.code:7:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | freopen("in.txt", "w", stdout); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ /usr/bin/ld: /tmp/ccycJFC5.o: in function `main': answer.code:(.text.startup+0x0): multiple definition of `main'; /tmp/ccpPAign.o:implementer.cpp:(.text.startup+0x0): first defined here /usr/bin/ld: /tmp/ccpPAign.o: in function `main': implementer.cpp:(.text.startup+0x3e7): undefined reference to `find_diameter(int, int)' collect2: error: ld returned 1 exit status