QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#86940 | #4218. Hidden Graph | ExplodingKonjac | RE | 13ms | 3632kb | C++17 | 5.6kb | 2023-03-11 15:09:50 | 2023-03-11 15:13:49 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
//#define OPENIOBUF
namespace FastIO
{
class FastIOBase
{
protected:
#ifdef OPENIOBUF
static const int BUFSIZE=1<<22;
char buf[BUFSIZE+1];
int buf_p=0;
#endif
FILE *target;
public:
#ifdef OPENIOBUF
virtual void flush()=0;
#endif
FastIOBase(FILE *f): target(f){}
~FastIOBase()=default;
};
class FastOutput: public FastIOBase
{
#ifdef OPENIOBUF
public:
inline void flush()
{ fwrite(buf,1,buf_p,target),buf_p=0; }
#endif
protected:
inline void __putc(char x)
{
#ifdef OPENIOBUF
if(buf[buf_p++]=x,buf_p==BUFSIZE)flush();
#else
putc(x,target);
#endif
}
template<typename T>
inline void __write(T x)
{
static char stk[64],*top;top=stk;
if(x<0) return __putc('-'),__write(-x);
do *(top++)=x%10,x/=10; while(x);
for(;top!=stk;__putc(*(--top)+'0'));
}
public:
FastOutput(FILE *f=stdout): FastIOBase(f){}
#ifdef OPENIOBUF
inline void setTarget(FILE *f) { this->flush(),target=f; }
~FastOutput(){ flush(); }
#else
inline void setTarget(FILE *f) { target=f; }
#endif
template<typename ...T>
inline void writesp(const T &...x)
{ initializer_list<int>{(this->operator<<(x),__putc(' '),0)...}; }
template<typename ...T>
inline void writeln(const T &...x)
{ initializer_list<int>{(this->operator<<(x),__putc('\n'),0)...}; }
inline FastOutput &operator <<(char x)
{ return __putc(x),*this; }
inline FastOutput &operator <<(const char *s)
{ for(;*s;__putc(*(s++)));return *this; }
inline FastOutput &operator <<(const string &s)
{ return (*this)<<s.c_str(); }
template<typename T,typename=typename enable_if<is_integral<T>::value>::type>
inline FastOutput &operator <<(const T &x)
{ return __write(x),*this; }
}qout;
class FastInput: public FastIOBase
{
#ifdef OPENIOBUF
public:
inline void flush()
{ buf[fread(buf,1,BUFSIZE,target)]='\0',buf_p=0; }
#endif
protected:
inline char __getc()
{
#ifdef OPENIOBUF
if(buf_p==BUFSIZE) flush();
return buf[buf_p++];
#else
return getc(target);
#endif
}
public:
#ifdef OPENIOBUF
FastInput(FILE *f=stdin): FastIOBase(f){ buf_p=BUFSIZE; }
inline void setTarget(FILE *f) { this->flush(),target=f; }
#else
FastInput(FILE *f=stdin): FastIOBase(f){}
inline void setTarget(FILE *f) { target=f; }
#endif
inline char getchar() { return __getc(); }
template<typename ...T>
inline void read(T &...x)
{ initializer_list<int>{(this->operator>>(x),0)...}; }
inline FastInput &operator >>(char &x)
{ while(isspace(x=__getc()));return *this; }
template<typename T,typename=typename enable_if<is_integral<T>::value>::type>
inline FastInput &operator >>(T &x)
{
static char ch,sym;x=sym=0;
while(isspace(ch=__getc()));
if(ch=='-') sym=1,ch=__getc();
for(;isdigit(ch);x=(x<<1)+(x<<3)+(ch^48),ch=__getc());
return sym?x=-x:x,*this;
}
inline FastInput &operator >>(char *s)
{
while(isspace(*s=__getc()));
for(;!isspace(*s) && *s && ~*s;*(++s)=__getc());
return *s='\0',*this;
}
inline FastInput &operator >>(string &s)
{
char str_buf[(1<<8)+1],*p=str_buf;
char *const buf_end=str_buf+(1<<8);
while(isspace(*p=__getc()));
for(s.clear(),p++;;p=str_buf)
{
for(;p!=buf_end && !isspace(*p=__getc()) && *p && ~*p;p++);
*p='\0',s.append(str_buf);
if(p!=buf_end) break;
}
return *this;
}
}qin;
} // namespace FastIO
using namespace FastIO;
using LL=long long;
using LD=long double;
using UI=unsigned int;
using ULL=unsigned long long;
#ifndef DADALZY
#define FILEIO(file) freopen(file".in","r",stdin),freopen(file".out","w",stdout)
#else
#define FILEIO(file)
#endif
int n,m,k,hd,tl,deg[2005],col[2005],q[2005];
bool vis[2005];
vector<int> p[2005],g[2005],_g[2005];
mt19937 mt_rnd(19260817);//chrono::system_clock::now().time_since_epoch().count());
inline pair<int,int> ask(const vector<int> &p)
{
int u,v;
qout<<"? "<<p.size()<<' ';
for(auto &i: p) qout<<i<<' ';
qout<<'\n',fflush(stdout);
#ifdef DADALZY
set<int> s;
vector<pair<int,int>> vec;
for(auto &u: p) s.insert(u);
for(auto &u: p) for(auto &v: _g[u])
{
if(!s.count(v)) continue;
if(u>v) continue;
vec.emplace_back(u,v);
}
if(vec.empty()) u=v=-1;
else tie(u,v)=vec[mt_rnd()%vec.size()];
return qout<<u<<' '<<v<<'\n',make_pair(u,v);
#else
return qin>>u>>v,make_pair(u,v);
#endif
}
inline void answer(const vector<pair<int,int>> &e)
{
qout<<"! "<<e.size()<<'\n';
for(auto &[u,v]: e) qout<<u<<' '<<v<<'\n';
fflush(stdout);
}
int main()
{
qin>>n;
#ifdef DADALZY
qin>>m;
for(int i=1,u,v;i<=m;i++)
{
qin>>u>>v;
_g[u].push_back(v);
_g[v].push_back(u);
}
#endif
k=1,p[1].push_back(1);
for(int x=2;x<=n;x++)
{
for(int j=1;j<=k;j++)
{
vector<int> now(move(p[j]));
now.push_back(x);
while(now.size()>1)
{
auto [u,v]=ask(now);
if(u==-1 && v==-1) break;
assert(u==x || v==x);
g[u].push_back(v);
g[v].push_back(u);
now.erase(find(now.begin(),now.end(),u+v-x));
}
}
hd=1,tl=0;
for(int i=1;i<=x;i++)
deg[i]=g[i].size(),vis[i]=false;
k=1+*max_element(deg+1,deg+x+1);
for(int i=1;i<=x;i++)
if(deg[i]<k) q[++tl]=i,vis[i]=true;
while(hd<=tl)
{
int u=q[hd++];
for(auto &v: g[u])
{
if((--deg[v])>=k) continue;
if(vis[v]) continue;
q[++tl]=v,vis[v]=true;
}
}
while(tl)
{
int u=q[tl--];
vector<bool> vis(k+1);
vis[u]=false,col[u]=1;
for(auto &v: g[u]) if(!vis[v]) vis[col[v]]=true;
while(vis[col[u]]) col[u]++;
p[col[u]].push_back(u);
}
}
vector<pair<int,int>> ans;
for(int u=1;u<=n;u++)
for(auto &v: g[u])
if(u<v) ans.emplace_back(u,v);
answer(ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3476kb
input:
3 1 2 2 3 1 3
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 3 1 2 1 3 2 3
result:
ok correct
Test #2:
score: 0
Accepted
time: 3ms
memory: 3476kb
input:
10 1 2 -1 -1 1 3 -1 -1 1 4 4 5 2 5 -1 -1 -1 -1 2 6 -1 -1 -1 -1 3 7 -1 -1 -1 -1 3 8 4 8 -1 -1 -1 -1 3 9 -1 -1 -1 -1 3 10 4 10 -1 -1 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 3 3 2 4 ? 2 1 4 ? 4 4 3 2 5 ? 3 3 2 5 ? 2 3 5 ? 2 1 5 ? 4 4 3 2 6 ? 3 4 3 6 ? 3 5 1 6 ? 4 4 3 2 7 ? 3 4 2 7 ? 4 6 5 1 7 ? 4 4 3 2 8 ? 3 4 2 8 ? 2 2 8 ? 5 7 6 5 1 8 ? 4 4 3 2 9 ? 3 4 2 9 ? 6 8 7 6 5 1 9 ? 4 4 3 2 10 ? 3 4 2 10 ? 2 2 10 ? 7 9 8 7 6 5 ...
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
5 2 1 3 2 3 1 4 2 -1 -1 4 1 5 2 -1 -1 5 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 2 4 ? 2 3 4 ? 2 1 4 ? 2 2 5 ? 3 4 3 5 ? 2 1 5 ! 7 1 2 1 3 1 4 1 5 2 3 2 4 2 5
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 3532kb
input:
3 2 1 -1 -1 1 3
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 2 1 2 1 3
result:
ok correct
Test #5:
score: 0
Accepted
time: 3ms
memory: 3588kb
input:
6 1 2 3 2 3 1 4 2 3 4 -1 -1 2 5 3 5 4 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 7 9 8 6 3 2 1 10 ? 2 4 10 ? 2 5 10 ...
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 3500kb
input:
25 -1 -1 -1 -1 -1 -1 5 4 5 2 -1 -1 6 4 -1 -1 -1 -1 7 3 -1 -1 5 7 -1 -1 4 8 2 8 -1 -1 5 8 -1 -1 -1 -1 9 4 2 9 -1 -1 -1 -1 9 8 -1 -1 10 3 -1 -1 -1 -1 -1 -1 2 11 -1 -1 10 11 9 11 -1 -1 -1 -1 12 4 -1 -1 6 12 -1 -1 -1 -1 -1 -1 5 13 6 13 -1 -1 13 8 7 13 -1 -1 14 3 14 13 14 4 -1 -1 5 14 -1 -1 7 14 -1 -1 -1...
output:
? 2 1 2 ? 3 2 1 3 ? 4 3 2 1 4 ? 5 4 3 2 1 5 ? 4 3 2 1 5 ? 3 3 1 5 ? 5 4 3 2 1 6 ? 4 3 2 1 6 ? 2 5 6 ? 5 4 3 2 1 7 ? 4 4 2 1 7 ? 3 6 5 7 ? 2 6 7 ? 5 4 3 2 1 8 ? 4 3 2 1 8 ? 3 3 1 8 ? 3 6 5 8 ? 2 6 8 ? 2 7 8 ? 5 4 3 2 1 9 ? 4 3 2 1 9 ? 3 3 1 9 ? 3 6 5 9 ? 3 8 7 9 ? 2 7 9 ? 5 4...
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3488kb
input:
6 -1 -1 2 3 -1 -1 -1 -1 -1 -1 2 5 -1 -1 -1 -1 -1 -1 5 6 -1 -1
output:
? 2 1 2 ? 3 2 1 3 ? 2 1 3 ? 3 2 1 4 ? 2 3 4 ? 4 4 2 1 5 ? 3 4 1 5 ? 2 3 5 ? 4 4 2 1 6 ? 3 5 3 6 ? 2 3 6 ! 3 2 3 2 5 5 6
result:
ok correct
Test #11:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
3 2 1 2 3 3 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 3 1 2 1 3 2 3
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
3 2 1 -1 -1 3 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 2 1 2 1 3
result:
ok correct
Test #13:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
5 2 1 2 3 3 1 -1 -1 -1 -1 -1 -1 2 5 -1 -1 -1 -1 5 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 2 4 ? 2 3 4 ? 2 1 4 ? 3 4 2 5 ? 2 4 5 ? 2 3 5 ? 2 1 5 ! 5 1 2 1 3 1 5 2 3 2 5
result:
ok correct
Test #14:
score: 0
Accepted
time: 1ms
memory: 3512kb
input:
3 2 1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 1 1 2
result:
ok correct
Test #15:
score: 0
Accepted
time: 3ms
memory: 3532kb
input:
5 -1 -1 -1 -1 4 3 -1 -1 2 5 3 5 -1 -1 -1 -1
output:
? 2 1 2 ? 3 2 1 3 ? 4 3 2 1 4 ? 3 2 1 4 ? 4 3 2 1 5 ? 3 3 1 5 ? 2 1 5 ? 2 4 5 ! 3 2 5 3 4 3 5
result:
ok correct
Test #16:
score: 0
Accepted
time: 4ms
memory: 3568kb
input:
93 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 10 9 -1 -1 7 11 -1 -1 -1 -1 2 12 -1 -1 -1 -1 5 13 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 15 12 -1 -1 6 16 8 16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 19 18 -1 -1 11 19 -1 -1 -1 -1 20 16 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 8 23 1 23 -1 -1 -1 -1 -1 -1...
output:
? 2 1 2 ? 3 2 1 3 ? 4 3 2 1 4 ? 5 4 3 2 1 5 ? 6 5 4 3 2 1 6 ? 7 6 5 4 3 2 1 7 ? 8 7 6 5 4 3 2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 5 4 2 1 11 ? 7 10 8 5 4 2 ...
result:
ok correct
Test #20:
score: 0
Accepted
time: 13ms
memory: 3576kb
input:
73 -1 -1 1 3 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 5 7 6 7 -1 -1 -1 -1 -1 -1 3 8 -1 -1 1 9 9 8 -1 -1 -1 -1 4 10 1 10 -1 -1 3 10 9 10 -1 -1 4 11 -1 -1 -1 -1 -1 -1 -1 -1 12 9 12 3 -1 -1 12 10 13 6 -1 -1 13 11 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 15 8 -1 -1 -1 -1 -1 -1 1 16 16 14 -1 -1 3 16 -1 -1 10 16 -1...
output:
? 2 1 2 ? 3 2 1 3 ? 2 2 3 ? 3 2 1 4 ? 2 3 4 ? 4 4 2 1 5 ? 2 3 5 ? 5 5 4 2 1 6 ? 2 3 6 ? 6 6 5 4 2 1 7 ? 5 6 4 2 1 7 ? 4 4 2 1 7 ? 2 3 7 ? 6 6 5 4 2 1 8 ? 3 7 3 8 ? 2 7 8 ? 7 8 6 5 4 2 1 9 ? 6 8 6 5 4 2 9 ? 5 6 5 4 2 9 ? 3 7 3 9 ? 7 8 6 5 4 2 1 10 ? 6 8 6 5 2 1 10 ? 5 8 6 5 2 10...
result:
ok correct
Test #21:
score: 0
Accepted
time: 1ms
memory: 3508kb
input:
77 -1 -1 3 2 -1 -1 2 4 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 6 -1 -1 -1 -1 3 7 -1 -1 -1 -1 3 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 11 -1 -1 -1 -1 -1 -1 -1 -1 8 13 -1 -1 -1 -1 2 14 14 8 14 7 -1 -1 -1 -1 2 15 15 8 -1 -1 3 15 -1 -1 16 1 16 8 2 16 -1 -1 -1 -1 16 15 7 17 2 17 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
output:
? 2 1 2 ? 3 2 1 3 ? 2 1 3 ? 3 2 1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