# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
990736 | snpmrnhlol | Super Dango Maker (JOI22_dango3) | C++17 | 403 ms | 600 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 400;
const int M = 25;
bool vis[N*M];
vector <int> ans;
void Solve(int n, int m){
vector <int> v;
vector <int> bucket[n];
for(int j = 0;j < n;j++){
v.clear();
for(int i = 0;i < n*m;i++){
if(vis[i])v.push_back(i + 1);
}
for(int i = 0;i < n*m;i++){
if(vis[i])continue;
v.push_back(i + 1);
if(Query(v) > 0){
v.pop_back();
bucket[j].push_back(i);
vis[i] = 1;
}
if(bucket[j].size() >= m)break;
}
}
for(int i = 0;i < m;i++){
ans.clear();
for(int j = 0;j < n;j++){
ans.push_back(bucket[j].back() + 1);
bucket[j].pop_back();
}
Answer(ans);
}
}
/**
3 2
3 3 1 2 1 2
**/
Compilation message (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... |