# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
568712 | joelau | Super Dango Maker (JOI22_dango3) | C++17 | 2131 ms | 600 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> lst[30],v;
void Solve(int N, int M) {
for (int i = 0; i < N*M; ++i) v.push_back(i+1);
while (!v.empty()) {
int x = v.back(); v.pop_back();
int low = 0, high = M;
while (high - low > 1) {
int mid = (low+high)/2;
int n = 0;
for (int i = 0; i < mid; ++i) {
n += lst[i].size();
for (int j = 0; j < lst[i].size(); ++j) v.push_back(lst[i][j]);
}
int q = Query(v);
if (q == mid-1) high = mid;
else low = mid;
for (int i = 0; i < n; ++i) v.pop_back();
}
lst[low].push_back(x);
}
for (int i = 0; i < M; ++i) Answer(lst[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... |