QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#648046 | #7281. How to Avoid Disqualification in 75 Easy Steps | chenxinyang2006# | 10 | 1ms | 3884kb | C++20 | 1.9kb | 2024-10-17 16:46:50 | 2024-10-17 16:46:51 |
Judging History
answer
#include <bits/stdc++.h>
#include "avoid.h"
#define rep(i,j,k) for(int i=(j);i<=(k);i++)
#define per(i,j,k) for(int i=(j);i>=(k);i--)
#define uint unsigned int
#define ll long long
#define ull unsigned long long
#define db double
#define ldb long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define mkp make_pair
#define eb emplace_back
#define SZ(S) (int)S.size()
//#define mod 998244353
//#define mod 1000000007
#define inf 0x3f3f3f3f
#define linf 0x3f3f3f3f3f3f3f3f
using namespace std;
template <class T>
void chkmax(T &x,T y){
if(x < y) x = y;
}
template <class T>
void chkmin(T &x,T y){
if(x > y) x = y;
}
inline int popcnt(int x){
return __builtin_popcount(x);
}
inline int ctz(int x){
return __builtin_ctz(x);
}
/*ll power(ll p,int k = mod - 2){
ll ans = 1;
while(k){
if(k % 2 == 1) ans = ans * p % mod;
p = p * p % mod;
k /= 2;
}
return ans;
}*/
//#include "sample_grader.cpp"
const int n = 1000,m = 9;
int tag[1005];
void output(){
vector <int> P;
rep(i,1,n) if(tag[i]) P.eb(i);
send(P);
}
vector <int> res;
int pick(){
assert(!res.empty());
int ret = res.back();
res.pop_back();
return ret;
}
int exs[2][10],_val[10][10],diff[10];
pii scout(int R,int H){
rep(p,0,9){
rep(i,1,n) tag[i] = ((i >> p) & 1);
output();
rep(i,1,n) tag[i] ^= 1;
output();
}
res = wait();
reverse(res.begin(),res.end());
int q = -1;
rep(p,0,9){
exs[1][p] = pick();
exs[0][p] = pick();
diff[p] = exs[0][p] & exs[1][p];
if(diff[p]) q = p;
}
int v1 = 0,v2 = 0;
rep(p,0,9){
if(!exs[0][p]){
v1 += 1 << p;
v2 += 1 << p;
}
}
if(q == -1) return mkp(v1,v2);
rep(p,0,9){
rep(i,1,n) tag[i] = ((i >> p) & 1) & ((i >> q) & 1);
output();
}
res = wait();
reverse(res.begin(),res.end());
rep(p,0,9){
int temp = pick();
if(!diff[p]) continue;
if(temp) v1 += 1 << p;
else v2 += 1 << p;
}
return mkp(v1,v2);
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
input:
output:
result:
wrong answer Not correct
Subtask #2:
score: 0
Wrong Answer
Test #11:
score: 0
Wrong Answer
time: 1ms
memory: 3640kb
input:
\x14
output:
result:
wrong answer Not correct
Subtask #3:
score: 10
Accepted
Test #66:
score: 10
Accepted
time: 1ms
memory: 3680kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #67:
score: 10
Accepted
time: 1ms
memory: 3844kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #68:
score: 10
Accepted
time: 1ms
memory: 3612kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #69:
score: 10
Accepted
time: 1ms
memory: 3680kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #70:
score: 10
Accepted
time: 1ms
memory: 3604kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #71:
score: 10
Accepted
time: 0ms
memory: 3876kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #72:
score: 10
Accepted
time: 1ms
memory: 3844kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #73:
score: 10
Accepted
time: 1ms
memory: 3648kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #74:
score: 10
Accepted
time: 0ms
memory: 3588kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #75:
score: 10
Accepted
time: 1ms
memory: 3840kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #76:
score: 10
Accepted
time: 0ms
memory: 3644kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #77:
score: 10
Accepted
time: 1ms
memory: 3844kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #78:
score: 10
Accepted
time: 0ms
memory: 3580kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #79:
score: 10
Accepted
time: 0ms
memory: 3636kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #80:
score: 10
Accepted
time: 0ms
memory: 3532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #81:
score: 10
Accepted
time: 1ms
memory: 3680kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #82:
score: 10
Accepted
time: 1ms
memory: 3808kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #83:
score: 10
Accepted
time: 1ms
memory: 3528kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #84:
score: 10
Accepted
time: 0ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #85:
score: 10
Accepted
time: 0ms
memory: 3620kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #86:
score: 10
Accepted
time: 1ms
memory: 3648kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #87:
score: 10
Accepted
time: 1ms
memory: 3580kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #88:
score: 10
Accepted
time: 1ms
memory: 3644kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #89:
score: 10
Accepted
time: 1ms
memory: 3880kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #90:
score: 10
Accepted
time: 1ms
memory: 3676kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #91:
score: 10
Accepted
time: 1ms
memory: 3884kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #92:
score: 10
Accepted
time: 0ms
memory: 3580kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #93:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #94:
score: 10
Accepted
time: 1ms
memory: 3872kb
input:
\x1e
output:
result:
ok Correct: 20 robot(s) used, 1 hour(s) passed
Test #95:
score: 10
Accepted
time: 1ms
memory: 3532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #96:
score: 10
Accepted
time: 1ms
memory: 3532kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #97:
score: 10
Accepted
time: 1ms
memory: 3804kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #98:
score: 10
Accepted
time: 1ms
memory: 3588kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #99:
score: 10
Accepted
time: 1ms
memory: 3652kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #100:
score: 10
Accepted
time: 1ms
memory: 3808kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #101:
score: 10
Accepted
time: 1ms
memory: 3632kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #102:
score: 10
Accepted
time: 1ms
memory: 3808kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #103:
score: 10
Accepted
time: 1ms
memory: 3644kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #104:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #105:
score: 10
Accepted
time: 0ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #106:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #107:
score: 10
Accepted
time: 1ms
memory: 3880kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #108:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #109:
score: 10
Accepted
time: 1ms
memory: 3676kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #110:
score: 10
Accepted
time: 1ms
memory: 3652kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #111:
score: 10
Accepted
time: 1ms
memory: 3628kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #112:
score: 10
Accepted
time: 1ms
memory: 3880kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #113:
score: 10
Accepted
time: 1ms
memory: 3876kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #114:
score: 10
Accepted
time: 0ms
memory: 3588kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #115:
score: 10
Accepted
time: 0ms
memory: 3840kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #116:
score: 10
Accepted
time: 1ms
memory: 3576kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #117:
score: 10
Accepted
time: 1ms
memory: 3640kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #118:
score: 10
Accepted
time: 1ms
memory: 3580kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Test #119:
score: 10
Accepted
time: 1ms
memory: 3536kb
input:
\x1e
output:
result:
ok Correct: 30 robot(s) used, 2 hour(s) passed
Subtask #4:
score: 0
Wrong Answer
Test #120:
score: 0
Wrong Answer
time: 1ms
memory: 3620kb
input:
K
output:
result:
wrong answer Not correct