# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
881049 | epicci23 | Povjerenstvo (COI22_povjerenstvo) | C++17 | 317 ms | 64988 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;
#define pb push_back
#define endl "\n"
#define int long long
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
/* stuff you should look for
* int overflow, array bounds
* special cases (n=1?)
* do smth instead of nothing and stay organized
* WRITE STUFF DOWN
* DON'T GET STUCK ON ONE APPROACH
* SIMPLIFY THE PROBLEM
* READ THE STATEMENT CAREFULLY
!!! if there is an specified/interesting smth(i.e. constraint) in the statement,
then you must be careful about that
*/
const int N = 5e5 + 5;
vector<int> v[N],cur[2],vis(N,0);
void dfs(int c,int col){
cur[col].pb(c);
vis[c]=1;
for(int x:v[c]){
if(vis[x]) continue;
dfs(x,!col);
}
# | 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... |