QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#141010#5156. Going in CirclesAs3b_team_f_masrWA 43ms3632kbC++14925b2023-08-17 06:31:032023-08-17 06:31:05

Judging History

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

  • [2023-08-17 06:31:05]
  • 评测
  • 测评结果:WA
  • 用时:43ms
  • 内存:3632kb
  • [2023-08-17 06:31:03]
  • 提交

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<11000;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;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;
    }
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 43ms
memory: 3632kb

input:

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

output:

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

result:

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