# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
318382 | LifeHappen__ | Capital City (JOI20_capital_city) | C++14 | 770 ms | 50036 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>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/trie_policy.hpp>
#define pb push_back
#define mp make_pair
#define taskname "A"
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef tree <int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
const int maxn = 2e5 + 10;
int n , k;
int c[maxn] , cnt_col[maxn];
vector<int> col_node[maxn];
vector<int> adj[maxn];
int sub[maxn],big[maxn];
int vis[maxn];
int vis1[maxn];
int FindRoot(int u){
function<void(int,int)> dfs = [&](int u , int v){
sub[u] = 1;big[u] = -1;
for(auto c : adj[u]){
if(c != v && vis[c] == 0){
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... |