func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long N = 50, INF = 0, MOD = 0;   long long n, m, a[N], tmp;   vector<long long> v;   int32_t main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cin >> m >> n;     for (long long i = 0; i < n; i++) {       cout << 1 << endl;       fflush(stdout);       cin >> tmp;       if (tmp == 0 || tmp == -2) return 0;       if (tmp == -1) a[i] = 0;       if (tmp == 1) a[i] = 1;     }     long long l = 0, r = m + 1, cnt = 0;     while (r - l > 2 && cnt + n < 60) {       long long mid = (l + r) / 2;       cout << mid << endl;       fflush(stdout);       cin >> tmp;       if (tmp == 0 || tmp == -2) return 0;       if (a[cnt] == 0) tmp *= -1;       if (tmp == -1) r = mid;       if (tmp == 1) l = mid;       v.push_back(tmp);       cnt = (cnt + 1) % n;     }     cout << r - 1 << endl;     fflush(stdout);     cin >> tmp;     return 0;   }   