# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
998415 | efishel | Super Dango Maker (JOI22_dango3) | C++17 | 427 ms | 604 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.
//Logan/Dango
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
void Solve(int N, int M){
int valios[N*M+5],c=1,d;
vector<int>r,rs[M];
for(int i=1;i<=N*M;i++)
valios[i]=0;
for(int i=0;i<N;i++,c++){
vector<int>valio=r;
d=0;
for(int j=1;j<=N*M;j++){
if(valios[j]==0){
valio.push_back(j);
if(N<=valio.size())if(Query(valio)){
rs[d].push_back(j);
valios[j]=c;
valio.pop_back();
d++;
}
}
}
for(int j=1;j<=N*M;j++)
if(valios[j]==c)
r.push_back(j);
c++;
}
for(int i=0;i<M;i++)Answer(rs[i]);
}
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... |