# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
551888 | Antekb | Super Dango Maker (JOI22_dango3) | C++17 | 446 ms | 712 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
namespace{
}
void Solve(int N, int M) {
vector<int> V(N*M);
for(int i=0; i<N*M; i++){
V[i]=i+1;
}
for(int j=0; j<M; j++){
shuffle(V.begin(), V.end(), rng);
vector<int> V2;
int l=1, r=V.size();
while(l<r){
int m=(l+r)>>1;
V2=V;
V2.resize(m);
if(Query(V2))r=m;
else l=m+1;
}
V2.clear();
vector<int> V3;
while(V.size()>l){
V3.push_back(V.back());
V.pop_back();
}
while(V.size()){
int x=V.back();
V.pop_back();
//cerr<<V.size()<<"a\n";
for(int i:V2)V.push_back(i);
//cerr<<V.size()<<"a\n";
int b=Query(V);
//cerr<<V.size()<<"a\n";
for(int i:V2)V.pop_back();
//cerr<<V.size()<<"a\n";
if(!b)V2.push_back(x);
else V3.push_back(x);
}
assert(V2.size()==N);
Answer(V2);
V=V3;
}
}
컴파일 시 표준 에러 (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... |