| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1171121 | SmuggingSpun | 카멜레온의 사랑 (JOI20_chameleon) | C++20 | 12 ms | 436 KiB |
#include "chameleon.h"
#include<bits/stdc++.h>
using namespace std;
void Solve(int n){
vector<int>p(1, 1);
for(int i = 2, pre_ans = 1; i <= (n << 1); i++){
p.emplace_back(i);
if(Query(p) == pre_ans){
p.pop_back();
int low = 0, high = int(p.size()) - 2, pos = high + 1;
while(low <= high){
int mid = (low + high) >> 1;
vector<int>pp;
for(int j = 0; j <= mid; j++){
pp.emplace_back(p[j]);
}
pp.emplace_back(i);
if(Query(pp) == pp.size()){
low = mid + 1;
}
else{
high = (pos = mid) - 1;
}
}
Answer(p[pos], i);
}
else{
pre_ans++;
}
}
}| # | 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... | ||||
