func_code_string: #include<iostream>   #include<string>   #include<cstring>   #include<cmath>   #include<algorithm>   #include<queue>   #include<iomanip>   #include<map>   #include<cstdio>   #include<stack>   #include<set>   using namespace std;   #define endl    n    #define IOS ios::sync_with_stdio(false),cin.tie(0), cout.tie(0)   typedef long long ll;   typedef unsigned long long ull;   typedef pair<int, int> pii;   typedef pair<long, long>pll;   const int inf = 0x3f3f3f3f;   const ll lnf = 0x3f3f3f3f3f3f3f3f;   const double pi = acos(-1.0);   int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }   ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }   #define re(i,a,b) for(int i = a;i <= b;i++)   #define rre(i,a) for(int i = 0;i < a;i++)   #define prre(i,a) for(int i = a;i >= 0;i--)   #define pre(i,a) for(int i = a;i > 0;i--)   #define bug system( pause )   const double eps = 1e-6;   const int N = 1e6 + 10;   const int M = 2e6 + 10;   const int mod = 1e9 + 7;      int n, t, x;   map<pii, int>mp;   int ask(int l, int r)   {    if (mp.count(make_pair(l, r)))return mp[make_pair(l, r)];    cout <<  ?   << l <<     << r << endl;    cout.flush();    int sum;    cin >> sum;    int num = r - l + 1 - sum;    mp[make_pair(l, r)] = num;    return num;   }      int query(int l, int r, int k)   {    if (l == r)return l;    int mid = (l + r) >> 1;    int v = ask(l, mid);    if (v < k)return query(mid + 1, r, k - v);    else return query(l, mid, k);   }      void update(int l, int r, int pos)   {    if (mp.count(make_pair(l, r)))mp[make_pair(l, r)]--;    if (l == r)return;    int mid = (l + r) >> 1;    if (pos <= mid)update(l, mid, pos);    if (pos > mid)update(mid + 1, r, pos);   }      int main()   {    cin >> n >> t;    for (int i = 1; i <= t; i++)    {     cin >> x;     int pos = query(1, n, x);     update(1, n, pos);     cout <<  !   << pos << endl;     cout.flush();    }    return 0;   }