QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#141012#5156. Going in CirclesAs3b_team_f_masrWA 34ms3684kbC++14961b2023-08-17 06:32:542023-08-17 06:32:57

Judging History

你现在查看的是最新测评结果

  • [2023-08-17 06:32:57]
  • 评测
  • 测评结果:WA
  • 用时:34ms
  • 内存:3684kb
  • [2023-08-17 06:32:54]
  • 提交

answer

#include <bits/stdc++.h>

typedef long double ld;
typedef long long ll;
using namespace std;
int di[] = {1, 0, -1, 0, 0, 1, -1, 1};
int dj[] = {0, 1, 0, -1, -1, 0, 1, -1};
const ll oo = 1e18, MOD = 1e9 + 7;
const int N = 1e6 + 5, M = 30005;
//#define endl '\n'

vector<int>v;
int main()
{
    srand(time(0));
    for(int i=0;i<20000;i++) v.push_back(rand()%2);
    vector<int>tmp;
    int idx=0;
    while(1){
        int n;
        cin>>n;
        tmp.push_back(n);
        if(n!=v[idx++]) {cout<<"? flip"<<endl;cout.flush();cin>>n;}

        if(tmp.size()%3==0&&tmp.size()>=9){
            bool no=0;
            for(int i=tmp.size()/3,j=0;i<tmp.size();i++,j++){
                if(tmp[i]!=v[j]){
                    no=1;
                    break;
                }
            }
            if(!no) return !(cout<<"! "<<tmp.size()/3);
        }
        cout<<"? right"<<endl;
        cout.flush();
    }
	return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 34ms
memory: 3684kb

input:

0
1
1
0
0
1
1
0
0
1
1
0
1
1
0
1
0
1
1
0
0
1
0
0
1
1
1
0
1
0
1
0
1
0
1
1
0
0
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
0
1
0
0
0
1
0
1
0
0
1
0
0
1
0
1
1
0
0
1
0
0
0
1
1
0
0
1
1
0
0
1
1
0
1
1
0
1
0
1
0
0
1
0
1
1
0
1
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
0
1
1
0
1
0
0
1
1
0
0
0
1
0
0
1
0
1
0
1
0
0
0
1
0
1
0
1
1
0
1
...

output:

? flip
? right
? right
? right
? flip
? right
? flip
? right
? flip
? right
? right
? right
? right
? flip
? right
? flip
? right
? right
? right
? right
? right
? flip
? right
? flip
? right
? right
? flip
? right
? flip
? right
? flip
? right
? flip
? right
? right
? flip
? right
? flip
? right
? ...

result:

wrong answer Wrong answer: correct guess, but used too many queries. Queries used: 22492 (6992 too many)