# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
727414 | model_code | Passport (JOI23_passport) | C++17 | 531 ms | 49224 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
FULL-SCORE SOLUTION OF "PASSPORT"
- The way of implementation is a bit different from official review
- It does not create graph explicitly
- It uses Dijkstra's algorithm instead of BFS, but the time complexity does not change in this implementation
- Time Complexity: O(N log N)
*/
#include <queue>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
class state {
public:
int pos, cost;
state() : pos(-1), cost(0) {}
state(int pos_, int cost_) : pos(pos_), cost(cost_) {}
bool operator<(const state& s) const {
return cost > s.cost;
}
};
vector<int> solve(int N, int Q, const vector<int>& L, const vector<int>& R, const vector<int>& X) {
const int INF = 1012345678;
// step #1. do segment-tree-like precalculation
int sz = 1;
while (sz < N) {
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |