# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
549083 | LucaDantas | Railway Trip (JOI17_railway_trip) | C++17 | 1319 ms | 524288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
constexpr int maxn = 1e5+10;
int a[maxn], l[maxn][2], r[maxn][2], dist[2][maxn], mark[maxn], seen[maxn], cnt;
vector<int> pos[maxn];
int d(int x, int y, int k) {
// se x==y ele retorna -1 e é pra retornar isso mesmo
if(x > y) swap(x, y);
return lower_bound(pos[k].begin(), pos[k].end(), y) - lower_bound(pos[k].begin(), pos[k].end(), x) - 1;
}
vector<int> reached[2][maxn];
void dijkstra(int s, int k) {
++cnt;
dist[k][s] = 0;
seen[s] = cnt;
priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> q;
q.push({0, s});
while(q.size()) {
int u = q.top().second; q.pop();
if(mark[u] == cnt) continue;
mark[u] = cnt;
reached[k][a[u]].push_back(u);
int d = dist[k][u];
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |