# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
140586 | khrbuddy03 | 두 로봇 (KOI18_robot) | C++14 | 395 ms | 25592 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 <bits/stdc++.h>
using namespace std;
const int inf = 1e5 + 9;
vector<pair<int, int>> tree[inf];
map<pair<int, int>, int> m;
int dist[inf];
int par[inf];
bool vis[inf];
void dfss(int here, int len) {
dist[here] = len;
for (auto i : tree[here]) {
int there = i.first;
int nlen = len + i.second;
if (dist[there] == -1) dfss(there, nlen);
}
}
void dfsm(int here) {
vis[here] = true;
for (auto i : tree[here]) {
if (vis[i.first]) continue;
dfsm(i.first);
par[i.first] = here;
}
}
int main() {
# | 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... |