# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
212780 | Alexa2001 | Chameleon's Love (JOI20_chameleon) | C++17 | 54 ms | 512 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 "chameleon.h"
#include <vector>
#include <bits/stdc++.h>
using namespace std;
namespace
{
vector<int> bad[2000];
int n;
int color[2000];
}
void dfs(int node, int C = 1)
{
color[node] = C;
for(auto it : bad[node])
if(!color[it])
dfs(it, 3 - C);
}
static void color_nodes()
{
memset(color, 0, sizeof(color));
int i;
for(i=1; i<=2*n; ++i)
if(!color[i])
dfs(i);
}
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... |