QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#466197 | #5029. 在路上 | james1BadCreeper | Compile Error | / | / | C++17 | 835b | 2024-07-07 16:53:23 | 2024-07-07 16:53:24 |
Judging History
answer
#include "soul.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
mt19937 rng(time(0));
int n;
int tot;
struct Node {
int x;
bool operator< (const Node a) const {
if (x == tot) return 1;
if (a.x == tot) return 0;
return ask(tot, x, a.x) == x;
}
} a[N];
int centroid(int id, int N, int m) {
n = N;
if (id == 1) return ask(1, 2, 3);
if (id == 3 || id == 5) {
int u = 1, v = 2;
for (int i = 3; i <= n; ++i) {
int w = ask(u, v, i);
if (v == w) v = i;
else if (u == w) u = i;
}
for (int i = 1; i <= n; ++i) a[i].x = i;
nth_element(a + 1, a + (n + 1) / 2, a + n + 1);
return a[(n + 1) / 2].x;
}
assert(0);
return -1;
}
详细
implementer.cpp: In function ‘int main()’: implementer.cpp:60:14: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 60 | fread(Interactor::rbuf,1,50000000,stdin); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ answer.code:1:10: fatal error: soul.h: No such file or directory 1 | #include "soul.h" | ^~~~~~~~ compilation terminated.