QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#86986 | #4218. Hidden Graph | AFewSuns | RE | 127ms | 3980kb | C++14 | 2.9kb | 2023-03-11 15:50:28 | 2023-03-11 15:50:30 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
namespace my_std{
#define ll long long
#define bl bool
ll my_pow(ll a,ll b,ll mod){
ll res=1;
if(!b) return 1;
while(b){
if(b&1) res=(res*a)%mod;
a=(a*a)%mod;
b>>=1;
}
return res;
}
ll qpow(ll a,ll b){
ll res=1;
if(!b) return 1;
while(b){
if(b&1) res*=a;
a*=a;
b>>=1;
}
return res;
}
#define db double
#define pf printf
#define pc putchar
#define fr(i,x,y) for(register ll i=(x);i<=(y);i++)
#define pfr(i,x,y) for(register ll i=(x);i>=(y);i--)
#define go(u) for(ll i=head[u];i;i=e[i].nxt)
#define enter pc('\n')
#define space pc(' ')
#define fir first
#define sec second
#define MP make_pair
#define il inline
#define inf 8e18
#define random(x) rand()*rand()%(x)
#define inv(a,mod) my_pow((a),(mod-2),(mod))
il ll read(){
ll sum=0,f=1;
char ch=0;
while(!isdigit(ch)){
if(ch=='-') f=-1;
ch=getchar();
}
while(isdigit(ch)){
sum=sum*10+(ch^48);
ch=getchar();
}
return sum*f;
}
il void write(ll x){
if(x<0){
x=-x;
pc('-');
}
if(x>9) write(x/10);
pc(x%10+'0');
}
il void writeln(ll x){
write(x);
enter;
}
il void writesp(ll x){
write(x);
space;
}
}
using namespace my_std;
#define fl fflush(stdout)
vector<ll> vec[2020],qry,e[2020];
vector<pair<ll,ll> > ans;
ll n,k=0,d[2020],dd[2020],id[2020],col[2020];
bl ck[2020],pd[2020];
struct node{
ll id,d;
};
il bl operator<(const node &x,const node &y){
return x.d>y.d;
}
void query(){
pf("? %lld ",qry.size());
fr(i,0,(ll)qry.size()-1) writesp(qry[i]);
enter;
fl;
}
priority_queue<node> q;
void solve(ll x){
fr(i,1,x) dd[i]=d[i];
fr(i,1,x) q.push((node){i,dd[i]});
fr(i,1,x) ck[i]=0;
ll cnt=0;
while(!q.empty()){
node u=q.top();
q.pop();
if(ck[u.id]) continue;
ck[u.id]=1;
id[++cnt]=u.id;
fr(i,0,(ll)e[u.id].size()-1){
ll v=e[u.id][i];
if(!ck[v]){
dd[v]--;
q.push((node){v,dd[v]});
}
}
}
k=0;
pfr(i,cnt,1){
ll u=id[i];
col[u]=0;
fr(j,1,k) pd[j]=0;
fr(j,0,(ll)e[u].size()-1) if(col[e[u][j]]) pd[col[e[u][j]]]=1;
pfr(j,k,1) if(!pd[j]) col[u]=j;
if(!col[u]) col[u]=++k;
}
fr(i,1,k) vec[i].clear();
fr(i,1,x) vec[col[i]].push_back(i);
}
int main(){
n=read();
fr(i,1,n){
fr(j,1,k){
fr(l,0,(ll)vec[j].size()-1) ck[vec[j][l]]=0;
while(1){
qry.clear();
fr(l,0,(ll)vec[j].size()-1) if(!ck[vec[j][l]]) qry.push_back(vec[j][l]);
if(qry.empty()) break;
qry.push_back(i);
query();
ll u=read(),v=read();
if(u==-1) break;
ck[u+v-i]=1;
ans.push_back(MP(u,v));
e[u].push_back(v);
e[v].push_back(u);
d[u]++;
d[v]++;
}
}
solve(i);
if(n==2000) assert(k<=2);
}
pf("! %lld\n",(ll)ans.size());
fr(i,0,(ll)ans.size()-1) pf("%lld %lld\n",ans[i].fir,ans[i].sec);
fl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3808kb
input:
3 1 2 2 3 1 3
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 3 1 2 2 3 1 3
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3680kb
input:
10 1 2 -1 -1 1 3 1 4 -1 -1 -1 -1 2 5 4 5 -1 -1 2 6 -1 -1 -1 -1 -1 -1 3 7 -1 -1 -1 -1 -1 -1 3 8 4 8 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 3 9 -1 -1 -1 -1 4 10 3 10 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 1 4 ? 3 2 3 4 ? 2 1 5 ? 4 2 3 4 5 ? 3 3 4 5 ? 2 3 5 ? 4 2 3 4 6 ? 3 3 4 6 ? 2 5 6 ? 2 1 6 ? 4 3 5 6 7 ? 3 5 6 7 ? 3 2 4 7 ? 2 1 7 ? 4 3 4 6 8 ? 3 4 6 8 ? 2 6 8 ? 3 5 7 8 ? 2 1 8 ? 2 2 8 ? 6 1 5 6 7 8 9 ? 2 4 9 ? 3 2 3 9 ? 2 2 9 ? 7 1 5 6 7 8 9 1...
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
5 2 1 3 2 3 1 -1 -1 4 2 4 1 5 1 5 2 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 3 4 ? 2 2 4 ? 2 1 4 ? 2 1 5 ? 2 2 5 ? 3 3 4 5 ! 7 2 1 3 2 3 1 4 2 4 1 5 1 5 2
result:
ok correct
Test #4:
score: 0
Accepted
time: 2ms
memory: 3812kb
input:
3 2 1 -1 -1 1 3
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 2 2 1 1 3
result:
ok correct
Test #5:
score: 0
Accepted
time: 2ms
memory: 3592kb
input:
6 1 2 3 2 3 1 3 4 4 2 -1 -1 2 5 3 5 4 5 -1 -1 -1 -1 -1 -1 3 6 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 3 4 ? 2 2 4 ? 2 1 4 ? 2 2 5 ? 2 3 5 ? 3 1 4 5 ? 2 1 5 ? 3 1 5 6 ? 2 2 6 ? 2 3 6 ? 2 4 6 ! 9 1 2 3 2 3 1 3 4 4 2 2 5 3 5 4 5 3 6
result:
ok correct
Test #6:
score: 0
Accepted
time: 9ms
memory: 3844kb
input:
27 -1 -1 3 1 3 2 -1 -1 -1 -1 3 5 -1 -1 1 5 2 5 -1 -1 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12 4 -1 -1 5 13 6 13 -1 -1 7 13 13 8 -1 -1 -1 -1 -1 -1 14 4 14 3 -1 -1 7 14 -...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 4 1 2 3 5 ? 3 1 3 5 ? 4 1 3 5 6 ? 3 2 4 6 ? 2 2 6 ? 5 1 3 5 6 7 ? 4 1 3 6 7 ? 3 1 6 7 ? 3 2 4 7 ? 5 1 3 5 6 8 ? 4 1 3 6 8 ? 4 2 4 7 8 ? 3 4 7 8 ? 2 7 8 ? 5 1 3 6 8 9 ? 4 1 3 6 9 ? 2 5 9 ? 4 2 4 7 9 ? 3 4 7 9 ? 2 7 9 ? 5 1 2 3 6 10...
result:
ok correct
Test #10:
score: 0
Accepted
time: 2ms
memory: 3840kb
input:
6 -1 -1 2 3 -1 -1 -1 -1 -1 -1 -1 -1 2 5 -1 -1 5 6 -1 -1
output:
? 2 1 2 ? 3 1 2 3 ? 2 1 3 ? 3 1 3 4 ? 2 2 4 ? 4 1 3 4 5 ? 2 2 5 ? 4 1 2 4 6 ? 3 3 5 6 ? 2 3 6 ! 3 2 3 2 5 5 6
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
3 2 1 2 3 3 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 3 2 1 2 3 3 1
result:
ok correct
Test #12:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
3 2 1 -1 -1 3 1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 2 2 1 3 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
5 2 1 2 3 3 1 -1 -1 -1 -1 -1 -1 5 1 -1 -1 2 5 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ? 2 3 4 ? 2 2 4 ? 2 1 4 ? 3 1 4 5 ? 2 4 5 ? 2 2 5 ? 2 3 5 ! 5 2 1 2 3 3 1 5 1 2 5
result:
ok correct
Test #14:
score: 0
Accepted
time: 2ms
memory: 3664kb
input:
3 2 1 -1 -1 -1 -1
output:
? 2 1 2 ? 2 2 3 ? 2 1 3 ! 1 2 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 2ms
memory: 3644kb
input:
5 -1 -1 -1 -1 4 3 -1 -1 2 5 3 5 -1 -1 -1 -1
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 3 1 2 4 ? 4 1 2 3 5 ? 3 1 3 5 ? 2 1 5 ? 2 4 5 ! 3 4 3 2 5 3 5
result:
ok correct
Test #16:
score: 0
Accepted
time: 10ms
memory: 3632kb
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 1 23 -1 -1 8 23 -1 -1 -1 -1...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 6 1 2 3 4 5 6 ? 7 1 2 3 4 5 6 7 ? 8 1 2 3 4 5 6 7 8 ? 9 1 2 3 4 5 6 7 8 9 ? 10 1 2 3 4 5 6 7 8 9 10 ? 9 1 2 3 4 5 6 7 8 10 ? 10 1 2 3 4 5 6 7 8 9 11 ? 9 1 2 3 4 5 6 8 9 11 ? 2 10 11 ? 10 1 2 3 4 5 6 7 8 9 12 ? 9 1 3 4 5 6 7 8 9 12 ? 3 10 1...
result:
ok correct
Test #17:
score: 0
Accepted
time: 12ms
memory: 3708kb
input:
111 -1 -1 -1 -1 -1 -1 -1 -1 2 6 -1 -1 7 4 -1 -1 -1 -1 3 8 -1 -1 -1 -1 -1 -1 -1 -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 13 14 ? 15 1 ...
result:
ok correct
Test #27:
score: 0
Accepted
time: 29ms
memory: 3772kb
input:
679 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 39 40 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 6 1 2 3 4 5 6 ? 7 1 2 3 4 5 6 7 ? 8 1 2 3 4 5 6 7 8 ? 9 1 2 3 4 5 6 7 8 9 ? 10 1 2 3 4 5 6 7 8 9 10 ? 11 1 2 3 4 5 6 7 8 9 10 11 ? 12 1 2 3 4 5 6 7 8 9 10 11 12 ? 13 1 2 3 4 5 6 7 8 9 10 11 12 13 ? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ? 15 1 ...
result:
ok correct
Test #28:
score: 0
Accepted
time: 127ms
memory: 3980kb
input:
1000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 17 27 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 6 1 2 3 4 5 6 ? 7 1 2 3 4 5 6 7 ? 8 1 2 3 4 5 6 7 8 ? 9 1 2 3 4 5 6 7 8 9 ? 10 1 2 3 4 5 6 7 8 9 10 ? 11 1 2 3 4 5 6 7 8 9 10 11 ? 12 1 2 3 4 5 6 7 8 9 10 11 12 ? 13 1 2 3 4 5 6 7 8 9 10 11 12 13 ? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ? 15 1 ...
result:
ok correct
Test #29:
score: 0
Accepted
time: 99ms
memory: 3796kb
input:
1000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 13 14 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 6 22 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1...
output:
? 2 1 2 ? 3 1 2 3 ? 4 1 2 3 4 ? 5 1 2 3 4 5 ? 6 1 2 3 4 5 6 ? 7 1 2 3 4 5 6 7 ? 8 1 2 3 4 5 6 7 8 ? 9 1 2 3 4 5 6 7 8 9 ? 10 1 2 3 4 5 6 7 8 9 10 ? 11 1 2 3 4 5 6 7 8 9 10 11 ? 12 1 2 3 4 5 6 7 8 9 10 11 12 ? 13 1 2 3 4 5 6 7 8 9 10 11 12 13 ? 14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ? 13 1 ...
result:
ok correct
Test #30:
score: -100
Dangerous Syscalls
input:
2000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 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