Submission #935096

# Submission time Handle Problem Language Result Execution time Memory
935096 2024-02-28T15:29:23 Z 1075508020060209tc Chameleon's Love (JOI20_chameleon) C++14
0 / 100
1 ms 600 KB
#include "chameleon.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;

int n;
int vis[2010];
int clc(int l,int r,int &a,int &b){
vector<int>vc;
for(int i=l;i<=r;i++){
    if(vis[i]){continue;}
    vc.push_back(i);
}
a=vc.size();b=Query(vc);
}

void Solve(int N) {
n=N;

int tc=n;
while(tc--){
    int l=1;int r=n;
    while(l<r){
        int mi=l+(r-l)/2;
        int a;int b;
        clc(1,mi,a,b);
        if(a!=b){
            r=mi;
        }else{
            l=mi+1;
        }
    }
    l=1;
    int R=r;
    while(l<r){
        int mi=l+(r-l+1)/2;
        int a;int b;
        clc(mi,R,a,b);
        if(a!=b){
            l=mi;
        }else{
            r=mi-1;
        }
    }
    Answer(l,R);
    vis[l]=1;vis[R]=1;
}


}

Compilation message

chameleon.cpp: In function 'int clc(int, int, int&, int&)':
chameleon.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -