# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
704907 | piOOE | Super Dango Maker (JOI22_dango3) | C++17 | 68 ms | 540 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(228);
void Solve(int n, int m) {
const int N = n * m;
vector<int> ord(N);
iota(ord.begin(), ord.end(), 1);
shuffle(ord.begin(), ord.end(), rnd);
set<int> st;
while (!ord.empty()) {
for (int x: ord) {
st.insert(x);
if (Query(vector(st.begin(), st.end())) == 1) {
vector<int> stick{x};
vector<int> consider(st.begin(), st.end());
consider.erase(find(consider.begin(), consider.end(), x));
set<int> save;
for (int y: consider) {
st.erase(y);
if (stick.size() < n && Query(vector(st.begin(), st.end())) == 0) {
stick.push_back(y);
st.insert(y);
} else {
save.insert(y);
}
}
Answer(stick);
vector<int> nxt;
for (int z : ord) {
if (!st.count(z)) {
nxt.push_back(z);
}
}
swap(ord, nxt);
shuffle(ord.begin(), ord.end(), rnd);
}
}
}
}
컴파일 시 표준 에러 (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... |