Submission #1049632

# Submission time Handle Problem Language Result Execution time Memory
1049632 2024-08-09T02:55:38 Z 8pete8 Colors (BOI20_colors) C++17
43 / 100
1 ms 596 KB
#include<iostream>
#include<stack>
#include<map>
#include<vector>
#include<string>
#include<cassert>
#include<unordered_map>
#include <queue>
#include <cstdint>
#include<cstring>
#include<limits.h>
#include<cmath>
#include<set>
#include<algorithm>
#include <iomanip>
#include<numeric>
#include<bitset>
using namespace std;
#define ll long long
#define f first
#define s second
#define pii pair<int,int>
#define ppii pair<int,pii>
#define vi vector<int>
#define pb push_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define F(n) for(int i=0;i<n;i++)
#define lb lower_bound
#define ub upper_bound
#define fastio ios::sync_with_stdio(false);cin.tie(NULL);
#pragma GCC optimize ("03,unroll-lopps")
#define int long long
using namespace std;
const int mod=998244353,mxn=2e5+5,inf=1e18,minf=-1e18,lg=25;
int n,m,k,x,q,t;
map<int,int>here;
int current=-1,C=0,cnt=0;
int ans=inf,atleast=0;
int test(int x){
    if(current==-1)return 0;
    if(abs(current-x)>=C)return 1;
    return 0;
}
int ask(int x){
    cout<<"? "<<x<<endl;
    cnt++;
    cout.flush();
    here[x]=1;
    int a;
    cin>>a;
    //a=test(x);
    if(current!=-1){
        if(a)ans=min(ans,abs(current-x));
        else atleast=max(atleast,abs(current-x));
    }
    current=x;
    return a;
}
int ask2(int x){
    if(abs(x-current)<=atleast)return 0;
    if(abs(x-current)>=ans)return 1;
    cout<<"? "<<x<<endl;
    cnt++;
    cout.flush();
    here[x]=1;
    int a;
    cin>>a;
    //a=test(x);
    if(current!=-1){
        if(a)ans=min(ans,abs(current-x));
        else atleast=max(atleast,abs(current-x));
    }
    current=x;
    return a;
}
void answer(int x){
    cout<<"= "<<x<<endl;
    cout.flush();
    return;
}
int mid(int l,int r){return l+(r-l)/2;}
int cur=0;
void solve(){
    //so scuff TT
    cin>>n;
    cnt=0;
    here.clear();
    current=-1;
    ans=inf,atleast=0;
    srand(time(NULL));
    int l1=1,r1=mid(1,n),l2=r1+1,r2=n;
    bool huh=1,side=1;
    while(r1-l1>1&&r2-l2>1){
        if(abs((r1-l1)-(r2-l2))>1)assert(0);
        int mid1=mid(l1,r1),mid2=mid(l2,r2);
        int x,lc=0;
        if(r1-l1==r2-l2){
            int lol=rand()%2;//i swear if this works TT
            if(lol)lc=1;
        }
        if(r1-l1>r2-l2||lc){
            ask(mid1);
            x=ask2(mid2);
            side=1;
        }
        else{
            ask(mid2);
            x=ask2(mid1);
            side=0;
        }
        if(x)l1=mid1+1,r2=mid2-1,huh=1;
        else r1=mid1-1,l2=mid2+1,huh=0;
    }
    vector<int>v;
    int left=r1-l1+1+(!side),right=r2-l2+1+side;
    if(abs(right-left)>=2){
        //switch side 
        if(right>left)ask(r2);
        else ask(l1);
        side^=1;
        huh=1;
    }
    for(int j=l1;j<=r1;j++)v.pb(j);
    for(int j=l2;j<=r2;j++)v.pb(j);
    for(int i=0;i<10;i++){
        int furthest=-1;
        int closest=-1;
        if(huh){
            for(auto j:v)if(!here[j]&&(furthest==-1||abs(current-j)>abs(current-furthest)))furthest=j;
        }
        if(!huh){
            if(side){
                for(int j=r1;j>=l1;j--)if(!here[j]){
                    closest=j;
                    break;
                }
            }
            else{
                for(int j=l2;j<=r2;j++)if(!here[j]){
                    closest=j;
                    break;
                }
            }
            side^=1;
        }
        if(furthest==-1&&closest==-1)break;
        if(furthest!=-1)ask(furthest);
        else ask(closest);
    }
    int check=1;
    if(ans==inf)return void(answer(n));
    //if(ans-atleast>2)assert(0);
    if(ans-atleast==1)return void(answer(ans));
    for(int i=ans-1;i>atleast;i--){
        if(current-i>=1&&!here[current-i])ask(current-i);
        else if(current+i<=n&&!here[current+i])ask(current+i);
        else{
            while(check+i<=n){
                if(here[check]==0&&here[check+i]==0){
                    ask(check);
                    ask(check+i);
                    break;
                }
                check++;
            }
        }
        if(ans==i)break;
    }
    answer(ans);
}
int32_t main(){
    fastio
    //cin>>t;
    t=1;
    while(t--)solve();
}
/*
keep range l1,r1  and l2,r2
we can then qry mid=mid(l1,r1) to mid2=mid(l2,r2)
then move to (mid+1,r1) and (l2,mid2-1)
or (l1,mid-1) and (mid2+1,r2)
until length if range1 or 2 ==1
abs(length1-length2) should always be <=1

problems->this will skip some range
skip odd/even range


ex.
{a,b} , {c,d,e}+current
2 : 4

a,b : current,c,d,e

C>=(current-(b+1))

*/

Compilation message

Colors.cpp:32:40: warning: bad option '-funroll-lopps' to pragma 'optimize' [-Wpragmas]
   32 | #pragma GCC optimize ("03,unroll-lopps")
      |                                        ^
Colors.cpp:40:15: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   40 | int test(int x){
      |               ^
Colors.cpp:45:14: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   45 | int ask(int x){
      |              ^
Colors.cpp:60:15: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   60 | int ask2(int x){
      |               ^
Colors.cpp:77:18: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   77 | void answer(int x){
      |                  ^
Colors.cpp:82:20: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   82 | int mid(int l,int r){return l+(r-l)/2;}
      |                    ^
Colors.cpp:84:12: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
   84 | void solve(){
      |            ^
Colors.cpp:172:14: warning: bad option '-funroll-lopps' to attribute 'optimize' [-Wattributes]
  172 | int32_t main(){
      |              ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB OK (5 queries)
2 Correct 0 ms 344 KB OK (11 queries)
3 Correct 0 ms 344 KB OK (6 queries)
4 Correct 1 ms 344 KB OK (9 queries)
5 Correct 0 ms 344 KB OK (9 queries)
6 Correct 0 ms 344 KB OK (11 queries)
7 Correct 0 ms 344 KB OK (11 queries)
8 Correct 0 ms 344 KB OK (10 queries)
9 Correct 0 ms 504 KB OK (10 queries)
10 Correct 0 ms 344 KB OK (7 queries)
11 Correct 0 ms 344 KB OK (6 queries)
12 Correct 0 ms 344 KB OK (8 queries)
13 Correct 0 ms 344 KB OK (12 queries)
14 Correct 0 ms 344 KB OK (10 queries)
15 Correct 0 ms 344 KB OK (11 queries)
16 Correct 0 ms 344 KB OK (11 queries)
17 Correct 0 ms 344 KB OK (9 queries)
18 Correct 0 ms 344 KB OK (7 queries)
19 Correct 0 ms 344 KB OK (9 queries)
20 Correct 0 ms 344 KB OK (10 queries)
21 Correct 0 ms 344 KB OK (11 queries)
22 Correct 0 ms 344 KB OK (2 queries)
23 Correct 0 ms 344 KB OK (2 queries)
24 Correct 0 ms 344 KB OK (3 queries)
25 Correct 0 ms 344 KB OK (3 queries)
26 Correct 1 ms 344 KB OK (3 queries)
27 Correct 0 ms 344 KB OK (4 queries)
28 Correct 0 ms 344 KB OK (4 queries)
29 Correct 0 ms 344 KB OK (4 queries)
30 Correct 0 ms 344 KB OK (4 queries)
31 Correct 1 ms 596 KB OK (5 queries)
32 Correct 0 ms 340 KB OK (5 queries)
33 Correct 0 ms 344 KB OK (5 queries)
34 Correct 0 ms 344 KB OK (5 queries)
35 Correct 0 ms 344 KB OK (5 queries)
36 Correct 0 ms 344 KB OK (4 queries)
37 Correct 0 ms 344 KB OK (4 queries)
38 Correct 0 ms 344 KB OK (4 queries)
39 Correct 0 ms 344 KB OK (4 queries)
40 Correct 0 ms 344 KB OK (4 queries)
41 Correct 0 ms 344 KB OK (4 queries)
42 Correct 0 ms 344 KB OK (4 queries)
43 Correct 0 ms 344 KB OK (4 queries)
44 Correct 0 ms 344 KB OK (4 queries)
45 Correct 0 ms 344 KB OK (5 queries)
46 Correct 0 ms 344 KB OK (5 queries)
47 Correct 0 ms 344 KB OK (5 queries)
48 Correct 0 ms 344 KB OK (5 queries)
49 Correct 0 ms 344 KB OK (5 queries)
50 Correct 0 ms 344 KB OK (5 queries)
51 Correct 0 ms 344 KB OK (5 queries)
52 Correct 0 ms 344 KB OK (5 queries)
53 Correct 0 ms 344 KB OK (6 queries)
54 Correct 0 ms 344 KB OK (6 queries)
55 Correct 0 ms 344 KB OK (5 queries)
56 Correct 0 ms 344 KB OK (5 queries)
57 Correct 0 ms 344 KB OK (7 queries)
58 Correct 0 ms 344 KB OK (7 queries)
59 Correct 0 ms 344 KB OK (9 queries)
60 Correct 0 ms 344 KB OK (9 queries)
61 Correct 0 ms 344 KB OK (11 queries)
62 Correct 0 ms 344 KB OK (10 queries)
63 Correct 0 ms 344 KB OK (11 queries)
64 Correct 0 ms 344 KB OK (10 queries)
65 Correct 0 ms 344 KB OK (11 queries)
66 Correct 0 ms 344 KB OK (10 queries)
67 Correct 1 ms 344 KB OK (11 queries)
68 Correct 0 ms 344 KB OK (10 queries)
69 Correct 1 ms 344 KB OK (10 queries)
70 Correct 1 ms 344 KB OK (10 queries)
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB OK (5 queries)
2 Correct 0 ms 344 KB OK (11 queries)
3 Correct 0 ms 344 KB OK (6 queries)
4 Correct 1 ms 344 KB OK (9 queries)
5 Correct 0 ms 344 KB OK (9 queries)
6 Correct 0 ms 344 KB OK (11 queries)
7 Correct 0 ms 344 KB OK (11 queries)
8 Correct 0 ms 344 KB OK (10 queries)
9 Correct 0 ms 504 KB OK (10 queries)
10 Correct 0 ms 344 KB OK (7 queries)
11 Correct 0 ms 344 KB OK (6 queries)
12 Correct 0 ms 344 KB OK (8 queries)
13 Correct 0 ms 344 KB OK (12 queries)
14 Correct 0 ms 344 KB OK (10 queries)
15 Correct 0 ms 344 KB OK (11 queries)
16 Correct 0 ms 344 KB OK (11 queries)
17 Correct 0 ms 344 KB OK (9 queries)
18 Correct 0 ms 344 KB OK (7 queries)
19 Correct 0 ms 344 KB OK (9 queries)
20 Correct 0 ms 344 KB OK (10 queries)
21 Correct 0 ms 344 KB OK (11 queries)
22 Correct 0 ms 344 KB OK (2 queries)
23 Correct 0 ms 344 KB OK (2 queries)
24 Correct 0 ms 344 KB OK (3 queries)
25 Correct 0 ms 344 KB OK (3 queries)
26 Correct 1 ms 344 KB OK (3 queries)
27 Correct 0 ms 344 KB OK (4 queries)
28 Correct 0 ms 344 KB OK (4 queries)
29 Correct 0 ms 344 KB OK (4 queries)
30 Correct 0 ms 344 KB OK (4 queries)
31 Correct 1 ms 596 KB OK (5 queries)
32 Correct 0 ms 340 KB OK (5 queries)
33 Correct 0 ms 344 KB OK (5 queries)
34 Correct 0 ms 344 KB OK (5 queries)
35 Correct 0 ms 344 KB OK (5 queries)
36 Correct 0 ms 344 KB OK (4 queries)
37 Correct 0 ms 344 KB OK (4 queries)
38 Correct 0 ms 344 KB OK (4 queries)
39 Correct 0 ms 344 KB OK (4 queries)
40 Correct 0 ms 344 KB OK (4 queries)
41 Correct 0 ms 344 KB OK (4 queries)
42 Correct 0 ms 344 KB OK (4 queries)
43 Correct 0 ms 344 KB OK (4 queries)
44 Correct 0 ms 344 KB OK (4 queries)
45 Correct 0 ms 344 KB OK (5 queries)
46 Correct 0 ms 344 KB OK (5 queries)
47 Correct 0 ms 344 KB OK (5 queries)
48 Correct 0 ms 344 KB OK (5 queries)
49 Correct 0 ms 344 KB OK (5 queries)
50 Correct 0 ms 344 KB OK (5 queries)
51 Correct 0 ms 344 KB OK (5 queries)
52 Correct 0 ms 344 KB OK (5 queries)
53 Correct 0 ms 344 KB OK (6 queries)
54 Correct 0 ms 344 KB OK (6 queries)
55 Correct 0 ms 344 KB OK (5 queries)
56 Correct 0 ms 344 KB OK (5 queries)
57 Correct 0 ms 344 KB OK (7 queries)
58 Correct 0 ms 344 KB OK (7 queries)
59 Correct 0 ms 344 KB OK (9 queries)
60 Correct 0 ms 344 KB OK (9 queries)
61 Correct 0 ms 344 KB OK (11 queries)
62 Correct 0 ms 344 KB OK (10 queries)
63 Correct 0 ms 344 KB OK (11 queries)
64 Correct 0 ms 344 KB OK (10 queries)
65 Correct 0 ms 344 KB OK (11 queries)
66 Correct 0 ms 344 KB OK (10 queries)
67 Correct 1 ms 344 KB OK (11 queries)
68 Correct 0 ms 344 KB OK (10 queries)
69 Correct 1 ms 344 KB OK (10 queries)
70 Correct 1 ms 344 KB OK (10 queries)
71 Correct 0 ms 344 KB OK (13 queries)
72 Correct 0 ms 344 KB OK (13 queries)
73 Correct 0 ms 344 KB OK (13 queries)
74 Correct 0 ms 344 KB OK (13 queries)
75 Correct 0 ms 344 KB OK (13 queries)
76 Correct 0 ms 344 KB OK (13 queries)
77 Correct 0 ms 344 KB OK (13 queries)
78 Correct 1 ms 344 KB OK (13 queries)
79 Correct 0 ms 344 KB OK (13 queries)
80 Correct 0 ms 344 KB OK (13 queries)
81 Correct 0 ms 344 KB OK (11 queries)
82 Correct 0 ms 344 KB OK (12 queries)
83 Correct 0 ms 344 KB OK (13 queries)
84 Correct 0 ms 340 KB OK (11 queries)
85 Correct 0 ms 344 KB OK (12 queries)
86 Correct 0 ms 344 KB OK (11 queries)
87 Correct 0 ms 344 KB OK (11 queries)
88 Correct 0 ms 344 KB OK (9 queries)
89 Correct 0 ms 344 KB OK (13 queries)
90 Correct 0 ms 344 KB OK (11 queries)
91 Correct 0 ms 344 KB OK (10 queries)
92 Correct 0 ms 344 KB OK (11 queries)
93 Correct 0 ms 344 KB OK (11 queries)
94 Correct 0 ms 452 KB OK (12 queries)
95 Correct 0 ms 344 KB OK (13 queries)
96 Correct 0 ms 344 KB OK (12 queries)
97 Correct 0 ms 344 KB OK (11 queries)
98 Correct 0 ms 344 KB OK (9 queries)
99 Correct 0 ms 344 KB OK (12 queries)
100 Correct 0 ms 344 KB OK (12 queries)
101 Correct 0 ms 344 KB OK (13 queries)
102 Correct 0 ms 344 KB OK (11 queries)
103 Correct 0 ms 344 KB OK (11 queries)
104 Correct 0 ms 344 KB OK (12 queries)
105 Correct 0 ms 344 KB OK (13 queries)
106 Correct 0 ms 344 KB OK (12 queries)
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB OK (5 queries)
2 Correct 0 ms 344 KB OK (11 queries)
3 Correct 0 ms 344 KB OK (6 queries)
4 Correct 1 ms 344 KB OK (9 queries)
5 Correct 0 ms 344 KB OK (9 queries)
6 Correct 0 ms 344 KB OK (11 queries)
7 Correct 0 ms 344 KB OK (11 queries)
8 Correct 0 ms 344 KB OK (10 queries)
9 Correct 0 ms 504 KB OK (10 queries)
10 Correct 0 ms 344 KB OK (7 queries)
11 Correct 0 ms 344 KB OK (6 queries)
12 Correct 0 ms 344 KB OK (8 queries)
13 Correct 0 ms 344 KB OK (12 queries)
14 Correct 0 ms 344 KB OK (10 queries)
15 Correct 0 ms 344 KB OK (11 queries)
16 Correct 0 ms 344 KB OK (11 queries)
17 Correct 0 ms 344 KB OK (9 queries)
18 Correct 0 ms 344 KB OK (7 queries)
19 Correct 0 ms 344 KB OK (9 queries)
20 Correct 0 ms 344 KB OK (10 queries)
21 Correct 0 ms 344 KB OK (11 queries)
22 Correct 0 ms 344 KB OK (2 queries)
23 Correct 0 ms 344 KB OK (2 queries)
24 Correct 0 ms 344 KB OK (3 queries)
25 Correct 0 ms 344 KB OK (3 queries)
26 Correct 1 ms 344 KB OK (3 queries)
27 Correct 0 ms 344 KB OK (4 queries)
28 Correct 0 ms 344 KB OK (4 queries)
29 Correct 0 ms 344 KB OK (4 queries)
30 Correct 0 ms 344 KB OK (4 queries)
31 Correct 1 ms 596 KB OK (5 queries)
32 Correct 0 ms 340 KB OK (5 queries)
33 Correct 0 ms 344 KB OK (5 queries)
34 Correct 0 ms 344 KB OK (5 queries)
35 Correct 0 ms 344 KB OK (5 queries)
36 Correct 0 ms 344 KB OK (4 queries)
37 Correct 0 ms 344 KB OK (4 queries)
38 Correct 0 ms 344 KB OK (4 queries)
39 Correct 0 ms 344 KB OK (4 queries)
40 Correct 0 ms 344 KB OK (4 queries)
41 Correct 0 ms 344 KB OK (4 queries)
42 Correct 0 ms 344 KB OK (4 queries)
43 Correct 0 ms 344 KB OK (4 queries)
44 Correct 0 ms 344 KB OK (4 queries)
45 Correct 0 ms 344 KB OK (5 queries)
46 Correct 0 ms 344 KB OK (5 queries)
47 Correct 0 ms 344 KB OK (5 queries)
48 Correct 0 ms 344 KB OK (5 queries)
49 Correct 0 ms 344 KB OK (5 queries)
50 Correct 0 ms 344 KB OK (5 queries)
51 Correct 0 ms 344 KB OK (5 queries)
52 Correct 0 ms 344 KB OK (5 queries)
53 Correct 0 ms 344 KB OK (6 queries)
54 Correct 0 ms 344 KB OK (6 queries)
55 Correct 0 ms 344 KB OK (5 queries)
56 Correct 0 ms 344 KB OK (5 queries)
57 Correct 0 ms 344 KB OK (7 queries)
58 Correct 0 ms 344 KB OK (7 queries)
59 Correct 0 ms 344 KB OK (9 queries)
60 Correct 0 ms 344 KB OK (9 queries)
61 Correct 0 ms 344 KB OK (11 queries)
62 Correct 0 ms 344 KB OK (10 queries)
63 Correct 0 ms 344 KB OK (11 queries)
64 Correct 0 ms 344 KB OK (10 queries)
65 Correct 0 ms 344 KB OK (11 queries)
66 Correct 0 ms 344 KB OK (10 queries)
67 Correct 1 ms 344 KB OK (11 queries)
68 Correct 0 ms 344 KB OK (10 queries)
69 Correct 1 ms 344 KB OK (10 queries)
70 Correct 1 ms 344 KB OK (10 queries)
71 Correct 0 ms 344 KB OK (13 queries)
72 Correct 0 ms 344 KB OK (13 queries)
73 Correct 0 ms 344 KB OK (13 queries)
74 Correct 0 ms 344 KB OK (13 queries)
75 Correct 0 ms 344 KB OK (13 queries)
76 Correct 0 ms 344 KB OK (13 queries)
77 Correct 0 ms 344 KB OK (13 queries)
78 Correct 1 ms 344 KB OK (13 queries)
79 Correct 0 ms 344 KB OK (13 queries)
80 Correct 0 ms 344 KB OK (13 queries)
81 Correct 0 ms 344 KB OK (11 queries)
82 Correct 0 ms 344 KB OK (12 queries)
83 Correct 0 ms 344 KB OK (13 queries)
84 Correct 0 ms 340 KB OK (11 queries)
85 Correct 0 ms 344 KB OK (12 queries)
86 Correct 0 ms 344 KB OK (11 queries)
87 Correct 0 ms 344 KB OK (11 queries)
88 Correct 0 ms 344 KB OK (9 queries)
89 Correct 0 ms 344 KB OK (13 queries)
90 Correct 0 ms 344 KB OK (11 queries)
91 Correct 0 ms 344 KB OK (10 queries)
92 Correct 0 ms 344 KB OK (11 queries)
93 Correct 0 ms 344 KB OK (11 queries)
94 Correct 0 ms 452 KB OK (12 queries)
95 Correct 0 ms 344 KB OK (13 queries)
96 Correct 0 ms 344 KB OK (12 queries)
97 Correct 0 ms 344 KB OK (11 queries)
98 Correct 0 ms 344 KB OK (9 queries)
99 Correct 0 ms 344 KB OK (12 queries)
100 Correct 0 ms 344 KB OK (12 queries)
101 Correct 0 ms 344 KB OK (13 queries)
102 Correct 0 ms 344 KB OK (11 queries)
103 Correct 0 ms 344 KB OK (11 queries)
104 Correct 0 ms 344 KB OK (12 queries)
105 Correct 0 ms 344 KB OK (13 queries)
106 Correct 0 ms 344 KB OK (12 queries)
107 Correct 0 ms 344 KB OK (19 queries)
108 Correct 0 ms 344 KB OK (19 queries)
109 Correct 0 ms 344 KB OK (19 queries)
110 Correct 0 ms 344 KB OK (19 queries)
111 Correct 0 ms 344 KB OK (19 queries)
112 Correct 0 ms 344 KB OK (19 queries)
113 Correct 1 ms 344 KB OK (19 queries)
114 Correct 0 ms 344 KB OK (19 queries)
115 Correct 0 ms 344 KB OK (19 queries)
116 Correct 0 ms 344 KB OK (19 queries)
117 Correct 0 ms 344 KB OK (19 queries)
118 Correct 0 ms 344 KB OK (19 queries)
119 Correct 0 ms 344 KB OK (18 queries)
120 Correct 0 ms 344 KB OK (19 queries)
121 Correct 0 ms 344 KB OK (18 queries)
122 Correct 0 ms 344 KB OK (19 queries)
123 Correct 0 ms 344 KB OK (12 queries)
124 Correct 1 ms 344 KB OK (19 queries)
125 Correct 0 ms 344 KB OK (17 queries)
126 Correct 0 ms 344 KB OK (19 queries)
127 Correct 0 ms 344 KB OK (19 queries)
128 Correct 0 ms 344 KB OK (19 queries)
129 Correct 0 ms 344 KB OK (19 queries)
130 Correct 0 ms 344 KB OK (17 queries)
131 Correct 0 ms 344 KB OK (19 queries)
132 Correct 0 ms 344 KB OK (13 queries)
133 Correct 0 ms 344 KB OK (19 queries)
134 Correct 0 ms 344 KB OK (15 queries)
135 Correct 0 ms 344 KB OK (16 queries)
136 Correct 0 ms 344 KB OK (17 queries)
137 Correct 0 ms 344 KB OK (16 queries)
138 Correct 0 ms 344 KB OK (16 queries)
139 Correct 0 ms 344 KB OK (18 queries)
140 Correct 0 ms 344 KB OK (16 queries)
141 Correct 0 ms 344 KB OK (19 queries)
142 Correct 0 ms 344 KB OK (18 queries)
143 Correct 0 ms 344 KB OK (15 queries)
144 Correct 0 ms 344 KB OK (13 queries)
145 Correct 1 ms 344 KB OK (17 queries)
146 Correct 0 ms 344 KB OK (14 queries)
147 Correct 0 ms 344 KB OK (16 queries)
148 Correct 0 ms 344 KB OK (15 queries)
149 Correct 1 ms 344 KB OK (20 queries)
150 Correct 0 ms 344 KB OK (15 queries)
151 Correct 1 ms 344 KB OK (16 queries)
152 Correct 0 ms 344 KB OK (18 queries)
153 Correct 0 ms 344 KB OK (13 queries)
154 Correct 0 ms 344 KB OK (15 queries)
155 Correct 0 ms 344 KB OK (19 queries)
156 Correct 0 ms 344 KB OK (19 queries)
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB OK (5 queries)
2 Correct 0 ms 344 KB OK (11 queries)
3 Correct 0 ms 344 KB OK (6 queries)
4 Correct 1 ms 344 KB OK (9 queries)
5 Correct 0 ms 344 KB OK (9 queries)
6 Correct 0 ms 344 KB OK (11 queries)
7 Correct 0 ms 344 KB OK (11 queries)
8 Correct 0 ms 344 KB OK (10 queries)
9 Correct 0 ms 504 KB OK (10 queries)
10 Correct 0 ms 344 KB OK (7 queries)
11 Correct 0 ms 344 KB OK (6 queries)
12 Correct 0 ms 344 KB OK (8 queries)
13 Correct 0 ms 344 KB OK (12 queries)
14 Correct 0 ms 344 KB OK (10 queries)
15 Correct 0 ms 344 KB OK (11 queries)
16 Correct 0 ms 344 KB OK (11 queries)
17 Correct 0 ms 344 KB OK (9 queries)
18 Correct 0 ms 344 KB OK (7 queries)
19 Correct 0 ms 344 KB OK (9 queries)
20 Correct 0 ms 344 KB OK (10 queries)
21 Correct 0 ms 344 KB OK (11 queries)
22 Correct 0 ms 344 KB OK (2 queries)
23 Correct 0 ms 344 KB OK (2 queries)
24 Correct 0 ms 344 KB OK (3 queries)
25 Correct 0 ms 344 KB OK (3 queries)
26 Correct 1 ms 344 KB OK (3 queries)
27 Correct 0 ms 344 KB OK (4 queries)
28 Correct 0 ms 344 KB OK (4 queries)
29 Correct 0 ms 344 KB OK (4 queries)
30 Correct 0 ms 344 KB OK (4 queries)
31 Correct 1 ms 596 KB OK (5 queries)
32 Correct 0 ms 340 KB OK (5 queries)
33 Correct 0 ms 344 KB OK (5 queries)
34 Correct 0 ms 344 KB OK (5 queries)
35 Correct 0 ms 344 KB OK (5 queries)
36 Correct 0 ms 344 KB OK (4 queries)
37 Correct 0 ms 344 KB OK (4 queries)
38 Correct 0 ms 344 KB OK (4 queries)
39 Correct 0 ms 344 KB OK (4 queries)
40 Correct 0 ms 344 KB OK (4 queries)
41 Correct 0 ms 344 KB OK (4 queries)
42 Correct 0 ms 344 KB OK (4 queries)
43 Correct 0 ms 344 KB OK (4 queries)
44 Correct 0 ms 344 KB OK (4 queries)
45 Correct 0 ms 344 KB OK (5 queries)
46 Correct 0 ms 344 KB OK (5 queries)
47 Correct 0 ms 344 KB OK (5 queries)
48 Correct 0 ms 344 KB OK (5 queries)
49 Correct 0 ms 344 KB OK (5 queries)
50 Correct 0 ms 344 KB OK (5 queries)
51 Correct 0 ms 344 KB OK (5 queries)
52 Correct 0 ms 344 KB OK (5 queries)
53 Correct 0 ms 344 KB OK (6 queries)
54 Correct 0 ms 344 KB OK (6 queries)
55 Correct 0 ms 344 KB OK (5 queries)
56 Correct 0 ms 344 KB OK (5 queries)
57 Correct 0 ms 344 KB OK (7 queries)
58 Correct 0 ms 344 KB OK (7 queries)
59 Correct 0 ms 344 KB OK (9 queries)
60 Correct 0 ms 344 KB OK (9 queries)
61 Correct 0 ms 344 KB OK (11 queries)
62 Correct 0 ms 344 KB OK (10 queries)
63 Correct 0 ms 344 KB OK (11 queries)
64 Correct 0 ms 344 KB OK (10 queries)
65 Correct 0 ms 344 KB OK (11 queries)
66 Correct 0 ms 344 KB OK (10 queries)
67 Correct 1 ms 344 KB OK (11 queries)
68 Correct 0 ms 344 KB OK (10 queries)
69 Correct 1 ms 344 KB OK (10 queries)
70 Correct 1 ms 344 KB OK (10 queries)
71 Correct 0 ms 344 KB OK (13 queries)
72 Correct 0 ms 344 KB OK (13 queries)
73 Correct 0 ms 344 KB OK (13 queries)
74 Correct 0 ms 344 KB OK (13 queries)
75 Correct 0 ms 344 KB OK (13 queries)
76 Correct 0 ms 344 KB OK (13 queries)
77 Correct 0 ms 344 KB OK (13 queries)
78 Correct 1 ms 344 KB OK (13 queries)
79 Correct 0 ms 344 KB OK (13 queries)
80 Correct 0 ms 344 KB OK (13 queries)
81 Correct 0 ms 344 KB OK (11 queries)
82 Correct 0 ms 344 KB OK (12 queries)
83 Correct 0 ms 344 KB OK (13 queries)
84 Correct 0 ms 340 KB OK (11 queries)
85 Correct 0 ms 344 KB OK (12 queries)
86 Correct 0 ms 344 KB OK (11 queries)
87 Correct 0 ms 344 KB OK (11 queries)
88 Correct 0 ms 344 KB OK (9 queries)
89 Correct 0 ms 344 KB OK (13 queries)
90 Correct 0 ms 344 KB OK (11 queries)
91 Correct 0 ms 344 KB OK (10 queries)
92 Correct 0 ms 344 KB OK (11 queries)
93 Correct 0 ms 344 KB OK (11 queries)
94 Correct 0 ms 452 KB OK (12 queries)
95 Correct 0 ms 344 KB OK (13 queries)
96 Correct 0 ms 344 KB OK (12 queries)
97 Correct 0 ms 344 KB OK (11 queries)
98 Correct 0 ms 344 KB OK (9 queries)
99 Correct 0 ms 344 KB OK (12 queries)
100 Correct 0 ms 344 KB OK (12 queries)
101 Correct 0 ms 344 KB OK (13 queries)
102 Correct 0 ms 344 KB OK (11 queries)
103 Correct 0 ms 344 KB OK (11 queries)
104 Correct 0 ms 344 KB OK (12 queries)
105 Correct 0 ms 344 KB OK (13 queries)
106 Correct 0 ms 344 KB OK (12 queries)
107 Correct 0 ms 344 KB OK (19 queries)
108 Correct 0 ms 344 KB OK (19 queries)
109 Correct 0 ms 344 KB OK (19 queries)
110 Correct 0 ms 344 KB OK (19 queries)
111 Correct 0 ms 344 KB OK (19 queries)
112 Correct 0 ms 344 KB OK (19 queries)
113 Correct 1 ms 344 KB OK (19 queries)
114 Correct 0 ms 344 KB OK (19 queries)
115 Correct 0 ms 344 KB OK (19 queries)
116 Correct 0 ms 344 KB OK (19 queries)
117 Correct 0 ms 344 KB OK (19 queries)
118 Correct 0 ms 344 KB OK (19 queries)
119 Correct 0 ms 344 KB OK (18 queries)
120 Correct 0 ms 344 KB OK (19 queries)
121 Correct 0 ms 344 KB OK (18 queries)
122 Correct 0 ms 344 KB OK (19 queries)
123 Correct 0 ms 344 KB OK (12 queries)
124 Correct 1 ms 344 KB OK (19 queries)
125 Correct 0 ms 344 KB OK (17 queries)
126 Correct 0 ms 344 KB OK (19 queries)
127 Correct 0 ms 344 KB OK (19 queries)
128 Correct 0 ms 344 KB OK (19 queries)
129 Correct 0 ms 344 KB OK (19 queries)
130 Correct 0 ms 344 KB OK (17 queries)
131 Correct 0 ms 344 KB OK (19 queries)
132 Correct 0 ms 344 KB OK (13 queries)
133 Correct 0 ms 344 KB OK (19 queries)
134 Correct 0 ms 344 KB OK (15 queries)
135 Correct 0 ms 344 KB OK (16 queries)
136 Correct 0 ms 344 KB OK (17 queries)
137 Correct 0 ms 344 KB OK (16 queries)
138 Correct 0 ms 344 KB OK (16 queries)
139 Correct 0 ms 344 KB OK (18 queries)
140 Correct 0 ms 344 KB OK (16 queries)
141 Correct 0 ms 344 KB OK (19 queries)
142 Correct 0 ms 344 KB OK (18 queries)
143 Correct 0 ms 344 KB OK (15 queries)
144 Correct 0 ms 344 KB OK (13 queries)
145 Correct 1 ms 344 KB OK (17 queries)
146 Correct 0 ms 344 KB OK (14 queries)
147 Correct 0 ms 344 KB OK (16 queries)
148 Correct 0 ms 344 KB OK (15 queries)
149 Correct 1 ms 344 KB OK (20 queries)
150 Correct 0 ms 344 KB OK (15 queries)
151 Correct 1 ms 344 KB OK (16 queries)
152 Correct 0 ms 344 KB OK (18 queries)
153 Correct 0 ms 344 KB OK (13 queries)
154 Correct 0 ms 344 KB OK (15 queries)
155 Correct 0 ms 344 KB OK (19 queries)
156 Correct 0 ms 344 KB OK (19 queries)
157 Correct 1 ms 344 KB OK (59 queries)
158 Correct 0 ms 344 KB OK (59 queries)
159 Correct 0 ms 344 KB OK (59 queries)
160 Correct 0 ms 344 KB OK (59 queries)
161 Correct 0 ms 344 KB OK (59 queries)
162 Correct 0 ms 344 KB OK (59 queries)
163 Correct 1 ms 344 KB OK (59 queries)
164 Correct 0 ms 344 KB OK (59 queries)
165 Correct 0 ms 344 KB OK (32 queries)
166 Correct 1 ms 344 KB OK (59 queries)
167 Correct 1 ms 344 KB OK (58 queries)
168 Correct 0 ms 344 KB OK (59 queries)
169 Correct 0 ms 344 KB OK (32 queries)
170 Correct 0 ms 344 KB OK (59 queries)
171 Correct 0 ms 344 KB OK (57 queries)
172 Correct 1 ms 344 KB OK (58 queries)
173 Correct 0 ms 344 KB OK (33 queries)
174 Correct 0 ms 344 KB OK (58 queries)
175 Correct 1 ms 344 KB OK (57 queries)
176 Incorrect 1 ms 344 KB Wrong guess
177 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB OK (5 queries)
2 Correct 0 ms 344 KB OK (11 queries)
3 Correct 0 ms 344 KB OK (6 queries)
4 Correct 1 ms 344 KB OK (9 queries)
5 Correct 0 ms 344 KB OK (9 queries)
6 Correct 0 ms 344 KB OK (11 queries)
7 Correct 0 ms 344 KB OK (11 queries)
8 Correct 0 ms 344 KB OK (10 queries)
9 Correct 0 ms 504 KB OK (10 queries)
10 Correct 0 ms 344 KB OK (7 queries)
11 Correct 0 ms 344 KB OK (6 queries)
12 Correct 0 ms 344 KB OK (8 queries)
13 Correct 0 ms 344 KB OK (12 queries)
14 Correct 0 ms 344 KB OK (10 queries)
15 Correct 0 ms 344 KB OK (11 queries)
16 Correct 0 ms 344 KB OK (11 queries)
17 Correct 0 ms 344 KB OK (9 queries)
18 Correct 0 ms 344 KB OK (7 queries)
19 Correct 0 ms 344 KB OK (9 queries)
20 Correct 0 ms 344 KB OK (10 queries)
21 Correct 0 ms 344 KB OK (11 queries)
22 Correct 0 ms 344 KB OK (2 queries)
23 Correct 0 ms 344 KB OK (2 queries)
24 Correct 0 ms 344 KB OK (3 queries)
25 Correct 0 ms 344 KB OK (3 queries)
26 Correct 1 ms 344 KB OK (3 queries)
27 Correct 0 ms 344 KB OK (4 queries)
28 Correct 0 ms 344 KB OK (4 queries)
29 Correct 0 ms 344 KB OK (4 queries)
30 Correct 0 ms 344 KB OK (4 queries)
31 Correct 1 ms 596 KB OK (5 queries)
32 Correct 0 ms 340 KB OK (5 queries)
33 Correct 0 ms 344 KB OK (5 queries)
34 Correct 0 ms 344 KB OK (5 queries)
35 Correct 0 ms 344 KB OK (5 queries)
36 Correct 0 ms 344 KB OK (4 queries)
37 Correct 0 ms 344 KB OK (4 queries)
38 Correct 0 ms 344 KB OK (4 queries)
39 Correct 0 ms 344 KB OK (4 queries)
40 Correct 0 ms 344 KB OK (4 queries)
41 Correct 0 ms 344 KB OK (4 queries)
42 Correct 0 ms 344 KB OK (4 queries)
43 Correct 0 ms 344 KB OK (4 queries)
44 Correct 0 ms 344 KB OK (4 queries)
45 Correct 0 ms 344 KB OK (5 queries)
46 Correct 0 ms 344 KB OK (5 queries)
47 Correct 0 ms 344 KB OK (5 queries)
48 Correct 0 ms 344 KB OK (5 queries)
49 Correct 0 ms 344 KB OK (5 queries)
50 Correct 0 ms 344 KB OK (5 queries)
51 Correct 0 ms 344 KB OK (5 queries)
52 Correct 0 ms 344 KB OK (5 queries)
53 Correct 0 ms 344 KB OK (6 queries)
54 Correct 0 ms 344 KB OK (6 queries)
55 Correct 0 ms 344 KB OK (5 queries)
56 Correct 0 ms 344 KB OK (5 queries)
57 Correct 0 ms 344 KB OK (7 queries)
58 Correct 0 ms 344 KB OK (7 queries)
59 Correct 0 ms 344 KB OK (9 queries)
60 Correct 0 ms 344 KB OK (9 queries)
61 Correct 0 ms 344 KB OK (11 queries)
62 Correct 0 ms 344 KB OK (10 queries)
63 Correct 0 ms 344 KB OK (11 queries)
64 Correct 0 ms 344 KB OK (10 queries)
65 Correct 0 ms 344 KB OK (11 queries)
66 Correct 0 ms 344 KB OK (10 queries)
67 Correct 1 ms 344 KB OK (11 queries)
68 Correct 0 ms 344 KB OK (10 queries)
69 Correct 1 ms 344 KB OK (10 queries)
70 Correct 1 ms 344 KB OK (10 queries)
71 Correct 0 ms 344 KB OK (13 queries)
72 Correct 0 ms 344 KB OK (13 queries)
73 Correct 0 ms 344 KB OK (13 queries)
74 Correct 0 ms 344 KB OK (13 queries)
75 Correct 0 ms 344 KB OK (13 queries)
76 Correct 0 ms 344 KB OK (13 queries)
77 Correct 0 ms 344 KB OK (13 queries)
78 Correct 1 ms 344 KB OK (13 queries)
79 Correct 0 ms 344 KB OK (13 queries)
80 Correct 0 ms 344 KB OK (13 queries)
81 Correct 0 ms 344 KB OK (11 queries)
82 Correct 0 ms 344 KB OK (12 queries)
83 Correct 0 ms 344 KB OK (13 queries)
84 Correct 0 ms 340 KB OK (11 queries)
85 Correct 0 ms 344 KB OK (12 queries)
86 Correct 0 ms 344 KB OK (11 queries)
87 Correct 0 ms 344 KB OK (11 queries)
88 Correct 0 ms 344 KB OK (9 queries)
89 Correct 0 ms 344 KB OK (13 queries)
90 Correct 0 ms 344 KB OK (11 queries)
91 Correct 0 ms 344 KB OK (10 queries)
92 Correct 0 ms 344 KB OK (11 queries)
93 Correct 0 ms 344 KB OK (11 queries)
94 Correct 0 ms 452 KB OK (12 queries)
95 Correct 0 ms 344 KB OK (13 queries)
96 Correct 0 ms 344 KB OK (12 queries)
97 Correct 0 ms 344 KB OK (11 queries)
98 Correct 0 ms 344 KB OK (9 queries)
99 Correct 0 ms 344 KB OK (12 queries)
100 Correct 0 ms 344 KB OK (12 queries)
101 Correct 0 ms 344 KB OK (13 queries)
102 Correct 0 ms 344 KB OK (11 queries)
103 Correct 0 ms 344 KB OK (11 queries)
104 Correct 0 ms 344 KB OK (12 queries)
105 Correct 0 ms 344 KB OK (13 queries)
106 Correct 0 ms 344 KB OK (12 queries)
107 Correct 0 ms 344 KB OK (19 queries)
108 Correct 0 ms 344 KB OK (19 queries)
109 Correct 0 ms 344 KB OK (19 queries)
110 Correct 0 ms 344 KB OK (19 queries)
111 Correct 0 ms 344 KB OK (19 queries)
112 Correct 0 ms 344 KB OK (19 queries)
113 Correct 1 ms 344 KB OK (19 queries)
114 Correct 0 ms 344 KB OK (19 queries)
115 Correct 0 ms 344 KB OK (19 queries)
116 Correct 0 ms 344 KB OK (19 queries)
117 Correct 0 ms 344 KB OK (19 queries)
118 Correct 0 ms 344 KB OK (19 queries)
119 Correct 0 ms 344 KB OK (18 queries)
120 Correct 0 ms 344 KB OK (19 queries)
121 Correct 0 ms 344 KB OK (18 queries)
122 Correct 0 ms 344 KB OK (19 queries)
123 Correct 0 ms 344 KB OK (12 queries)
124 Correct 1 ms 344 KB OK (19 queries)
125 Correct 0 ms 344 KB OK (17 queries)
126 Correct 0 ms 344 KB OK (19 queries)
127 Correct 0 ms 344 KB OK (19 queries)
128 Correct 0 ms 344 KB OK (19 queries)
129 Correct 0 ms 344 KB OK (19 queries)
130 Correct 0 ms 344 KB OK (17 queries)
131 Correct 0 ms 344 KB OK (19 queries)
132 Correct 0 ms 344 KB OK (13 queries)
133 Correct 0 ms 344 KB OK (19 queries)
134 Correct 0 ms 344 KB OK (15 queries)
135 Correct 0 ms 344 KB OK (16 queries)
136 Correct 0 ms 344 KB OK (17 queries)
137 Correct 0 ms 344 KB OK (16 queries)
138 Correct 0 ms 344 KB OK (16 queries)
139 Correct 0 ms 344 KB OK (18 queries)
140 Correct 0 ms 344 KB OK (16 queries)
141 Correct 0 ms 344 KB OK (19 queries)
142 Correct 0 ms 344 KB OK (18 queries)
143 Correct 0 ms 344 KB OK (15 queries)
144 Correct 0 ms 344 KB OK (13 queries)
145 Correct 1 ms 344 KB OK (17 queries)
146 Correct 0 ms 344 KB OK (14 queries)
147 Correct 0 ms 344 KB OK (16 queries)
148 Correct 0 ms 344 KB OK (15 queries)
149 Correct 1 ms 344 KB OK (20 queries)
150 Correct 0 ms 344 KB OK (15 queries)
151 Correct 1 ms 344 KB OK (16 queries)
152 Correct 0 ms 344 KB OK (18 queries)
153 Correct 0 ms 344 KB OK (13 queries)
154 Correct 0 ms 344 KB OK (15 queries)
155 Correct 0 ms 344 KB OK (19 queries)
156 Correct 0 ms 344 KB OK (19 queries)
157 Correct 1 ms 344 KB OK (59 queries)
158 Correct 0 ms 344 KB OK (59 queries)
159 Correct 0 ms 344 KB OK (59 queries)
160 Correct 0 ms 344 KB OK (59 queries)
161 Correct 0 ms 344 KB OK (59 queries)
162 Correct 0 ms 344 KB OK (59 queries)
163 Correct 1 ms 344 KB OK (59 queries)
164 Correct 0 ms 344 KB OK (59 queries)
165 Correct 0 ms 344 KB OK (32 queries)
166 Correct 1 ms 344 KB OK (59 queries)
167 Correct 1 ms 344 KB OK (58 queries)
168 Correct 0 ms 344 KB OK (59 queries)
169 Correct 0 ms 344 KB OK (32 queries)
170 Correct 0 ms 344 KB OK (59 queries)
171 Correct 0 ms 344 KB OK (57 queries)
172 Correct 1 ms 344 KB OK (58 queries)
173 Correct 0 ms 344 KB OK (33 queries)
174 Correct 0 ms 344 KB OK (58 queries)
175 Correct 1 ms 344 KB OK (57 queries)
176 Incorrect 1 ms 344 KB Wrong guess
177 Halted 0 ms 0 KB -