QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#141013#5156. Going in CirclesAs3b_team_f_masrWA 49ms3748kbC++14961b2023-08-17 06:37:242023-08-17 06:37:27

Judging History

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

  • [2023-08-17 06:37:27]
  • 评测
  • 测评结果:WA
  • 用时:49ms
  • 内存:3748kb
  • [2023-08-17 06:37:24]
  • 提交

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 26ms
memory: 3740kb

input:

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

output:

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

result:

ok Queries used; 15103.

Test #2:

score: 0
Accepted
time: 31ms
memory: 3736kb

input:

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

output:

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

result:

ok Queries used; 14514.

Test #3:

score: 0
Accepted
time: 33ms
memory: 3624kb

input:

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

output:

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

result:

ok Queries used; 15026.

Test #4:

score: 0
Accepted
time: 33ms
memory: 3640kb

input:

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

output:

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

result:

ok Queries used; 12234.

Test #5:

score: 0
Accepted
time: 49ms
memory: 3748kb

input:

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

output:

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

result:

ok Queries used; 12305.

Test #6:

score: 0
Accepted
time: 46ms
memory: 3624kb

input:

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

output:

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

result:

ok Queries used; 12281.

Test #7:

score: 0
Accepted
time: 25ms
memory: 3688kb

input:

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

output:

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

result:

ok Queries used; 14951.

Test #8:

score: 0
Accepted
time: 19ms
memory: 3660kb

input:

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

output:

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

result:

ok Queries used; 14526.

Test #9:

score: 0
Accepted
time: 24ms
memory: 3636kb

input:

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

output:

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

result:

ok Queries used; 15091.

Test #10:

score: 0
Accepted
time: 14ms
memory: 3696kb

input:

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

output:

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

result:

ok Queries used; 12339.

Test #11:

score: 0
Accepted
time: 16ms
memory: 3656kb

input:

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

output:

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

result:

ok Queries used; 12266.

Test #12:

score: 0
Accepted
time: 22ms
memory: 3664kb

input:

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

output:

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

result:

ok Queries used; 12344.

Test #13:

score: -100
Wrong Answer
time: 1ms
memory: 3628kb

input:

0
0
0
0
1
0
1
1
0
0
1
0
0
1
0
1
0
0
1

output:

? right
? right
? right
? flip
? right
? flip
? right
? flip
? right
? flip
? right
? right
? right
? flip
? right
? flip
? right
? flip
! 6

result:

wrong answer Wrong answer: incorrect guess 6 (ans: 49). Queries used: 18