# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
661202 | 2022-11-24T21:52:36 Z | ktkerem | Colors (BOI20_colors) | C++17 | 1 ms | 208 KB |
/*#pragma GCC target ("avx2") #pragma GCC optimize ("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize ("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")/**/ #include<bits/stdc++.h> /**/ //typedef int ll; typedef long long ll; typedef unsigned long long ull; typedef std::string str; /*typedef __int128 vll; typedef unsigned __int128 uvll;*/ #define llll std::pair<ll , ll> #define pb push_back #define pf push_front #define halo cout << "hello\n" #define fi first #define sec second #define all(a) a.begin() , a.end() const ll limit = 1e14 + 7; const ll ous = 1e5 + 7; const ll dx[4] = {-1 , 0 , 1 , 0} , dy[4] = {0,1,0,-1}; ll n , m;std::vector<ll> ar; void solve(){ std::cin >> n; ll rv = 0; std::cout << "? " << 1 << std::endl; ll x;std::cin >> x; ll ls = 1; for(ll i = n-1;0<=i;i--){ if(rv == 0){ ls += i; } else{ ls -= i; } std::cout << "? " << ls << std::endl; rv ^= 1; std::cin >> x; if(x == 0){ std::cout << "= " << i + 1 << std::endl; return; } } return;/**/ } signed main(){ ll t=1; //std::cin >> t; ll o = 1; while(t--){ //cout << "Case " << o++ << ":\n"; solve(); } return 0; }/**/
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | OK (5 queries) |
2 | Correct | 0 ms | 208 KB | OK (6 queries) |
3 | Correct | 0 ms | 208 KB | OK (10 queries) |
4 | Incorrect | 1 ms | 208 KB | Hair color 14 was used multiple times |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | OK (5 queries) |
2 | Correct | 0 ms | 208 KB | OK (6 queries) |
3 | Correct | 0 ms | 208 KB | OK (10 queries) |
4 | Incorrect | 1 ms | 208 KB | Hair color 14 was used multiple times |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | OK (5 queries) |
2 | Correct | 0 ms | 208 KB | OK (6 queries) |
3 | Correct | 0 ms | 208 KB | OK (10 queries) |
4 | Incorrect | 1 ms | 208 KB | Hair color 14 was used multiple times |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | OK (5 queries) |
2 | Correct | 0 ms | 208 KB | OK (6 queries) |
3 | Correct | 0 ms | 208 KB | OK (10 queries) |
4 | Incorrect | 1 ms | 208 KB | Hair color 14 was used multiple times |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | OK (5 queries) |
2 | Correct | 0 ms | 208 KB | OK (6 queries) |
3 | Correct | 0 ms | 208 KB | OK (10 queries) |
4 | Incorrect | 1 ms | 208 KB | Hair color 14 was used multiple times |
5 | Halted | 0 ms | 0 KB | - |