# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
414840 | amoo_safar | City (JOI17_city) | C++17 | 520 ms | 43072 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 "Encoder.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 33e4;
const int bl = 100;
const int sd = 58;
int mk[N];
mt19937 rng(sd);
vector<int> V;
vector<int> G[N];
int st[N], fn[N], T = 0;
void DFS(int u, int p){
st[u] = T ++;
shuffle(G[u].begin(), G[u].end(), rng);
bool fl = false;
for(auto adj : G[u])
if((adj != p) && ((int) G[adj].size() == 1))
fl = true;
if(fl){
for(auto adj : G[u]){
if(adj != p && G[adj].size() == 1){
st[adj] = T;
fn[adj] = T + 1;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |