#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
void Solve(int N, int M)
{
vector<vector<int>> ans(M);
for(int j = 0;j < N*M;++j)
{
int l = 0,r = M-1;
while(l < r)
{
int m = (l+r)/2;
vector<int> que;
for(int u = m+1;u < M;++u)
{
for(int j = 0;j < ans[u].size();++j)
{
que.push_back(ans[u][j]);
}
}
for(int u = j+1;u < N*M;++u)
que.push_back(u+1);
if(Query(que) >= M-m-1)
{
r = m;
}
else
l = m+1;
}
ans[l].push_back(j+1);
}
for(int j = 0;j < M;++j)
{
Answer(ans[j]);
}
}
# | 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... |