# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
448142 | jhnah917 | Chameleon's Love (JOI20_chameleon) | C++14 | 94 ms | 1528 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 <bits/stdc++.h>
using namespace std;
namespace {
int N, Match[1010], Color[1010];
bool Love[1010][1010];
vector<int> G[1010], Nodes[2];
void Init(){
memset(Match, -1, sizeof Match);
memset(Color, -1, sizeof Color);
memset(Love, 0, sizeof Love);
for(int i=0; i<1010; i++) G[i].clear();
}
void DFS(int v, int color){
Color[v] = color; Nodes[color].push_back(v);
for(auto i : G[v]) if(Color[i] == -1) DFS(i, color^1);
}
bool HasEdge(vector<int> vec, int now){
vec.push_back(now);
return Query(vec) < vec.size();
}
int Search(const vector<int> &vec, int v){
int l = 0, r = vec.size() - 1;
while(l < r){
int m = l + r >> 1;
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... |