# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
951541 | pcc | Super Dango Maker (JOI22_dango3) | C++17 | 1 ms | 600 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "dango3.h"
#include <bits/stdc++.h>
#include <vector>
using namespace std;
namespace {
int variable_example = 1;
const int mxn = 20;
bitset<mxn> vis;
} // namespace
/*
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++) {
std::vector<int> a(N);
for (int j = 0; j < N; j++) {
a[j] = N * i + j + 1;
}
Answer(a);
}
*/
void Solve(int N, int M) {
for(int i = 0;i<(1<<(N*M));i++){
if(__builtin_popcount(i) != N)continue;
vector<int> v;
for(int j = 0;j<N*M;j++){
if(i&(1<<j))v.push_back(j+1);
}
bool flag = true;
for(auto &j:v){
if(vis[j])flag = false;
}
if(!flag)continue;
if(Query(v) >= 1){
for(auto &j:v)vis[j] = true;
Answer(v);
}
}
return;
}
컴파일 시 표준 에러 (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... |