# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
942529 | makrav | Super Dango Maker (JOI22_dango3) | C++17 | 1159 ms | 992 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
vector<int> sol(int n, int m, vector<int> nums) {
random_shuffle(all(nums));
vector<int> used(n * m, 0), ans;
for (int i = 0; i < n * m; i++) {
if (ans.size() == n) return ans;
vector<int> lol;
used[i] = 1;
for (int j = 0; j < n * m; j++) {
if (!used[j]) lol.push_back(nums[j]);
}
int A = Query(lol);
if (A != m - 1) {
used[i] = 0;
continue;
}
ans.push_back(nums[i]);
}
return ans;
}
void Solve(int N, int M) {
vector<int> used(N * M, 0);
for (int j = 0; j < M; j++) {
vector<int> curost;
for (int i = 0; i < N * M; i++) {
if (!used[i]) curost.push_back(i + 1);
}
vector<int> answ = sol(N, M - j, curost);
Answer(answ);
for (int j = 0; j < answ.size(); j++) used[answ[j] - 1] = 1;
}
}
컴파일 시 표준 에러 (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... |