# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
859112 | Hanksburger | Super Dango Maker (JOI22_dango3) | C++17 | 2141 ms | 860 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;
vector<int> v[30], tmp;
void Solve(int n, int m)
{
for (int i=1; i<=n*m; i++)
{
int l=1, r=m;
while (l<r)
{
int mid=(l+r)/2, ind=0;
tmp.clear();
for (int j=1; j<=n*m; j++)
{
if (ind<v[mid].size() && v[mid][ind]==j)
ind++;
else if (j!=i)
tmp.push_back(j);
}
if (Query(tmp)==m-1)
r=mid;
else
l=mid+1;
}
v[l].push_back(i);
}
for (int i=1; i<=m; i++)
Answer(v[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... |