# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445222 | flappybird | Stray Cat (JOI20_stray) | C++14 | 63 ms | 21012 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 "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
typedef int ll;
#define MAX 101010
namespace {
vector<ll> adj[MAX], num[MAX], depth, deg, arr;
vector<ll> ret;
ll asdf[6] = { 1, 1, 0, 1, 0, 0 };
void dfs(ll x = 0, ll p = -1, ll d = 1, ll str = 0, ll chk = 0) {
depth[x] = d;
ll i;
for (i = 0; i < (int)adj[x].size(); i++) {
if (adj[x][i] == p) continue;
if (deg[adj[x][i]] == 2) {
if (!chk) {
while (d != asdf[str % 6]) str++;
}
ret[num[x][i]] = asdf[str % 6];
dfs(adj[x][i], x, !asdf[str % 6], str + 1, 1);
}
else {
ret[num[x][i]] = d;
dfs(adj[x][i], x, !d);
}
}
}
void bfs() {
queue<pair<ll, ll>> q;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |