# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
205557 | ArshiaDadras | Amusement Park (JOI17_amusement_park) | C++14 | 39 ms | 4860 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.
/* In the name of Allah */
#include<bits/stdc++.h>
#include<Joi.h>
using namespace std;
const int N = 1e4 + 5;
vector<int> adj[N], V;
bool mark[N];
void dfs(int u) {
sort(adj[u].begin(), adj[u].end());
mark[u] = true, V.push_back(u);
for (auto v: adj[u])
if (!mark[v])
dfs(v);
}
void Joi(int n, int m, int a[], int b[], long long x, int t) {
for (int u = 0; u < n; u++)
adj[u].clear();
for (int i = 0; i < m; i++) {
adj[a[i]].push_back(b[i]);
adj[b[i]].push_back(a[i]);
}
V.clear(), memset(mark, false, sizeof mark), dfs(0);
for (int i = 0; i < n; i++)
MessageBoard(V[i], i < 60? x >> i & 1: 0);
}
# | 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... |