# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
135525 | E869120 | Two Transportations (JOI19_transportations) | C++14 | 1934 ms | 60928 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "Azer.h"
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <map>
using namespace std;
int NA, distA[2009];
vector<pair<int, int>> XA[2009];
map<pair<int, int>, int> ForcedA;
void pushesA(int pos, int val) {
// 最初の 11 ビットは頂点、次の 20 ビットはコスト
for (int i = 0; i < 11; i++) SendA((bool)((pos / (1 << i)) % 2));
for (int i = 0; i < 20; i++) SendA((bool)((val / (1 << i)) % 2));
}
void InitA(int N, int A, std::vector<int> U, std::vector<int> V, std::vector<int> C) {
NA = N;
for (int i = 0; i < U.size(); i++) {
XA[U[i]].push_back(make_pair(V[i], C[i]));
XA[V[i]].push_back(make_pair(U[i], C[i]));
}
for (int i = 0; i < N; i++) distA[i] = (1 << 20) - 1;
distA[0] = 0; ForcedA[make_pair(0, 0)] = 1;
pushesA(0, 0);
for (int i = 0; i < XA[0].size(); i++) distA[XA[0][i].first] = XA[0][i].second;
}
Compilation message (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |