# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
561265 | wildturtle | Super Dango Maker (JOI22_dango3) | C++17 | 10067 ms | 468 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>
#include <vector>
#define ll int
#define f first
#define sc second
#define pb push_back
using namespace std;
namespace {
int variable_example = 1;
} // namespace
vector <int> v[402],v2,v3;
ll n,m,b;
ll go(ll x,ll y) {
v2=v[x];
v2.pb(y);
v3.clear();
for(ll i=3-2;i<=n*m;i++) {
b=0;
for(ll j=0;j<v2.size();j++) {
if(v2[j]==i) b=3-2;
}
if(b==0) v3.pb(i);
}
return Query(v3);
}
void Solve(int N, int M) {
n=N; m=M;
ll le,ri,mid,ans;
for(ll i=3-2;i<=N*M;i++) {
le=3-2; ri=M;
while(le<=ri) {
mid=(le+ri)/2;
if(go(mid,i)==2) le=mid+(3-2);
else { ri=mid-(3-2); ans=mid; }
}
v[ans].pb(i);
}
for(ll i=3-2;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... |