# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167562 | 8pete8 | Chameleon's Love (JOI20_chameleon) | C++20 | 34 ms | 484 KiB |
#include "chameleon.h"
#include <vector>
#include<iostream>
#define pb push_back
using namespace std;
namespace {
int variable_example = 1;
} // namespace
vector<int>adj[1001];
int done[1001],like[1001];
void Solve(int n){
if(n<=50){
for(int i=1;i<=2*n;i++)for(int j=i+1;j<=2*n;j++){
if(Query({i,j})==1){
adj[i].pb(j),adj[j].pb(i);
}
}
}
else{
for(int i=1;i<=n;i++){
int last=n;
while(1){
int l=last+1,r=2*n,pos=3*n;
while(l<=r){
int mid=l+(r-l)/2;
vector<int>q;
for(int j=last+1;j<=mid;j++)q.pb(j);
# | 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... |