# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1005704 | enzy | Super Dango Maker (JOI22_dango3) | C++17 | 1522 ms | 912 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include<bits/stdc++.h>
using namespace std;
void Solve(int n, int m) {
/*std::vector<int> x(3);
x[0] = 1;
x[1] = 2;
x[2] = 3;
variable_example = Query(x);
for (int i = 0; i < M; i++) {
vector<int> a(N);
for (int j = 0; j < N; j++) {
a[j] = N * i + j + 1;
}
Answer(a);
}*/
vector<int>v[m+1];
for(int i=1;i<=n*m;i++){
int l=1, r=m;
while(l<r){
int mid=(l+r)/2;
vector<int>q;
for(int j=i+1;j<=n*m;j++) q.push_back(j);
for(int j=mid+1;j<=m;j++)
for(int k=0;k<v[j].size();k++) q.push_back(v[j][k]);
int check=Query(q);
if(check>=m-mid) r=mid;
else l=mid+1;
}
v[l].push_back(i);
}
for(int i=1;i<=m;i++) Answer(v[i]);
}
컴파일 시 표준 에러 (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... |