QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#525201 | #9162. COVID tests | ANIG | 0 | 4529ms | 3860kb | C++14 | 678b | 2024-08-20 14:32:21 | 2024-08-20 14:32:21 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N=1005;
int n,t,rs[N];
double k;
int gets(int l,int r){
cout<<"Q ";
for(int i=1;i<l;i++)cout<<0;
for(int i=l;i<=r;i++)cout<<1;
for(int i=r+1;i<=n;i++)cout<<0;
cout<<endl;
int x;
cin>>x;
return x;
}
void solve(int l,int r){
if(l==r){
rs[l]=1;
return;
}
int mid=l+r>>1;
if(gets(l,mid)){
if(gets(mid+1,r))solve(mid+1,r);
solve(l,mid);
}else solve(mid+1,r);
}
void find_positive(){
memset(rs,0,sizeof(rs));
solve(1,n);
cout<<"A ";
for(int i=1;i<=n;i++)cout<<rs[i];
cout<<endl;
}
signed main(){
cin>>n>>k>>t;
while(t--)find_positive();
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3860kb
input:
1000 0.789673 1 P P P P P P P P P W
output:
Q 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
points 0.0 0.0 translate:wrong
Subtask #2:
score: 0
Wrong Answer
Test #18:
score: 0
Wrong Answer
time: 4529ms
memory: 3784kb
input:
1000 0.001 300 N N N N N N N N N W
output:
Q 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
result:
points 0.0 0.0 translate:wrong