# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
935089 | 2024-02-28T15:17:45 Z | 1075508020060209tc | Chameleon's Love (JOI20_chameleon) | C++14 | 1 ms | 352 KB |
#include "chameleon.h" #include <vector> #include<bits/stdc++.h> using namespace std; int n; int ok(int l,int mi){ if(mi==n+n+1){return 1;} vector<int>vc; for(int i=l;i<=mi;i++){ vc.push_back(i); } if(Query(vc)<vc.size()){return 1;} return 0; } void Solve(int N) { n=N; vector<int>ans(N*2+1); for(int i=1;i<=N*2;i++){ int l=i;int r=N*2+1; while(l<r){ int mi=l+(r-l)/2; if(ok(i,mi)){ r=mi; }else{ l=mi+1; } } ans[i]=l; } for(int i=1;i<=n*2;i++){ if(ans[i]<=n*2){ Answer(i,ans[i]); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 352 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 344 KB | Wrong Answer [6] |
2 | Halted | 0 ms | 0 KB | - |