QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#130306 | #1146. Rail | Alinxester | Compile Error | / | / | C++14 | 1.3kb | 2023-07-23 20:15:02 | 2023-07-23 20:15:04 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-07-23 20:15:04]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-07-23 20:15:02]
- 提交
answer
#include<bits/stdc++.h>
#include "rail.h"
#define int long long
#define rep(i,x,y) for (int i = (x); i <= (y); ++i)
#define drep(i,x,y) for (int i = (x); i >= (y); --i)
#define go(i,u) for (int i = head[u]; i; i = edge[i].next)
using namespace std;
const int N = 5e3 + 2;
int a[N], dist[N], p[N], vis[N];
inline bool dist_cmp (int x, int y) {
return dist[x] < dist[y]; }
set<int> s;
#define solve(x,d,opt) vis[x] = 1, stype[x] = opt, location[x] = first + d
void findLocation (int n, int first, int location[], int stype[]) {
rep (i, 1, n - 1) a[i] = i, dist[i] = getDistance(0, i);
sort(a + 1, a + n, dist_cmp);
solve(a[0], 0, 1);
int l = a[0], r = a[1];
if (n < 2) return;
solve(a[1], dist[r], 2);
/*rep (i, 0, n - 1) if (!vis[a[i]]) {
int pos = (dist[a[i]] - getDistance(r, a[i]) + dist[r]) >> 1;
if (s.find(pos) != s.end()) {
p[a[i]] = (pos << 1) - dist[a[i]];
if (p[a[i]] > 0) solve(a[i], p[a[i]], 1);
}
else {
solve(a[i], p[a[i]], 2);
s.insert(dist[a[i]]), r = a[i];
}
}
s.clear();
s.insert(0);
rep (i, 0, n - 1) if (!vis[a[i]]) {
int pos = (p[a[i]] - getDistance(l, a[i]) - p[l]) >> 1;
if (s.find(pos) != s.end()) solve(a[i], (pos << 1) - p[a[i]], 2);
else {
solve(a[i], p[a[i]], 1);
s.insert(p[a[i]]), l = a[i];
}
}*/
}
詳細信息
/usr/bin/ld: /tmp/ccA7qECf.o: in function `main': implementer.cpp:(.text.startup+0x67): undefined reference to `findLocation' collect2: error: ld returned 1 exit status