# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036865 | TrendBattles | Factories (JOI14_factories) | C++14 | 3324 ms | 194232 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 "factories.h"
#include <bits/stdc++.h>
using namespace std;
using lli = long long;
const int MAX_N = 1 << 19;
vector <int> graph[MAX_N];
struct Edge {
int u, v, w;
Edge(int _u = 0, int _v = 0, int _w = 0):
u(_u), v(_v), w(_w) {}
int get_other(int x) const {
return x ^ u ^ v;
}
};
Edge edge[MAX_N];
lli pref_w[MAX_N];
int in[MAX_N], depth[MAX_N];
int timeDFS = 0;
int mn_depth[__lg(MAX_N) + 1][MAX_N << 1];
void DFS(int u) {
in[u] = ++timeDFS;
mn_depth[0][in[u]] = u;
for (int id : graph[u]) {
int v = edge[id].get_other(u);
if (in[v]) continue;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |