# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
448104 | jhnah917 | Chameleon's Love (JOI20_chameleon) | C++14 | 17 ms | 1376 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];
bool Love[1010][1010];
vector<int> G[1010];
void Init(){
memset(Match, -1, sizeof Match);
memset(Love, 0, sizeof Love);
for(int i=0; i<1010; i++) G[i].clear();
}
} // namespace
namespace subtask3{
bool HasEdge(int u, int v){
return Query({ u, v }) == 1;
}
int Like(int v){
int a = G[v][0], b = G[v][1], c = G[v][2];
if(Query({ v, b, c }) == 1) return a;
if(Query({ v, a, c }) == 1) return b;
return c;
}
void Solve(){
for(int i=1; i<=N; 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... |