malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   const int mod = 998244353;   vector<int> *mapo;   long long Montgomery(long long a, long long b) {     long long ans = 1;     a = a % mod;     while (b > 0) {       if (b & 1) ans = ans * a % mod;       b >>= 1;       a = a * a % mod;     }     return ans;   }   bool inQueue[size_t(3e5 + 10)];   int status[size_t(3e5 + 10)];   long long dfs_detect_possibility(int, int);   int main() {     int t;     scanf( %d , &t);     for (int i = 0; i < t; ++i) {       int n, m;       scanf( %d%d , &n, &m);       fill(inQueue, inQueue + n + 2, false);       fill(status, status + n + 2, -1);       vector<int> links[n + 1];       mapo = links;       for (int j = 0; j < m; ++j) {         int t1, t2;         scanf( %d%d , &t1, &t2);         links[t1].push_back(t2);         links[t2].push_back(t1);       }       long long ans = 1;       for (int j = 1; j <= n; j++) {         if (inQueue[j]) continue;         ans = ans * dfs_detect_possibility(n, j) % mod;       }       cout << ans << endl;     }     return 0;   }   long long dfs_detect_possibility(int n, int st) {     int same = 1;     status[st] = 1;     queue<int> q;     q.push(st);     inQueue[st] = true;     long long dans = 1;     int cnt = 1;     while (!q.empty()) {       int poi = q.front();       q.pop();       for (int &i : mapo[poi]) {         if (status[i] == status[poi]) {           return 0;         } else if (status[i] == -1) {           cnt++;           if (status[poi] == 1)             status[i] = 0;           else {             status[i] = 1;             same++;           }           q.push(i);           inQueue[i] = true;         }       }     }     dans = Montgomery(2, same) + Montgomery(2, cnt - same);     return dans % mod;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int x, y, x1, y1, a, b, c, d, e;     cin >> x >> y >> x1 >> y1;     a = x1 - x;     b = y1 - y;     {       if (a < 0) {         c = (-1) * a;       } else         c = a;     }     {       if (b < 0) {         d = (-1) * b;       } else         d = b;     }     e = max(d, c);     cout << e;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int infint = 1e9;   const long long inf = 1e18;   const int MOD = (int)1e9 + 7;   const int MAXN = (int)3e5 + 7;   const int LOG = 17;   int a[MAXN], n, IL[MAXN], IR[MAXN], Lp, Rp, ans, L, R;   pair<int, int> G, seg[LOG][2 * MAXN];   pair<int, int> operator*(const pair<int, int> &a, pair<int, int> b) {     return {min(a.first, b.first), max(a.second, b.second)};   }   void update(int BASE, int idx, int x, int y) {     for (seg[BASE][idx += 3 * n] = {x, y}; idx > 1; idx >>= 1)       seg[BASE][idx >> 1] = seg[BASE][idx] * seg[BASE][idx ^ 1];   }   pair<int, int> get(int BASE, int l, int r) {     pair<int, int> res = {3 * n, 0};     for (l += 3 * n, r += 3 * n; l < r; l >>= 1, r >>= 1) {       if (l & 1) res = res * seg[BASE][l++];       if (r & 1) res = res * seg[BASE][--r];     }     return res;   }   int main() {     scanf( %d , &n);     for (int i = 0; i < n; i++) scanf( %d , &a[i]);     for (int i = n; i < 3 * n; i++) a[i] = a[i % n];     for (int i = 0; i < LOG; i++)       for (int j = 0; j < MAXN; j++) seg[i][j] = {3 * n, 0};     for (int i = 0; i < 3 * n; i++) {       update(0, i, max(0, i - a[i]), min(i + a[i], 3 * n - 1));       IL[i] = max(0, i - a[i]), IR[i] = min(i + a[i], 3 * n - 1);     }     for (int i = 1; i < LOG; i++) {       for (int j = 0; j < 3 * n; j++) {         G = get(i - 1, IL[j], IR[j] + 1);         Lp = G.first, Rp = G.second;         IL[j] = Lp, IR[j] = Rp;         update(i, j, Lp, Rp);       }     }     if (n == 1) return cout << 0, 0;     for (int j = n; j < 2 * n; j++) {       ans = 0, L = j, R = j;       for (int lg = 16; lg >= 0; lg--) {         G = get(lg, L, R + 1);         if (G.second - G.first + 1 < n) {           ans += (1 << lg);           Lp = G.first, Rp = G.second;           L = Lp, R = Rp;         }       }       printf( %d  , ans + 1);     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int a, b, n;     double res, t = 1e99;     cin >> a >> b >> n;     int x, y, v;     int i;     for (i = 0; i < n; i++) {       cin >> x >> y >> v;       res = hypot(x - a + 0., y - b + 0.) / v;       t = min(t, res);     }     printf( %.10f n , t);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   /* * * *   * * *    * * * */   #define mp make_pair   typedef long long ll;   typedef long double ld;   typedef pair<int, int> pii;   /* * * *   * * *    * * * */   /* *    *    * Too many mind, no mind.    *    * */   bool can(int med, int k, vector <int> &a) {    int n = a.size();    vector <int> pre(n), mn(n);    for (int i = 0; i < n; ++i) pre[i] = a[i] < med ? -1 : 1;    mn[0] = pre[0];    for (int i = 1; i < k; ++i) {     pre[i] += pre[i - 1];     mn[i] = min(pre[i], mn[i - 1]);    }    if (pre[k - 1] > 0) return 1;    for (int i = k; i < n; ++i) {     pre[i] += pre[i - 1];     mn[i] = min(pre[i], mn[i - 1]);     if (mn[i - k] <= pre[i] - 1 || pre[i] > 0) return 1;    }    return 0;   }   int main(){    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);    //freopen( input.txt ,  r , stdin);    //freopen( output.txt ,  w , stdout);    int n, k; cin >> n >> k;    vector <int> a(n);    for (int i = 0; i < n; ++i) cin >> a[i];    int lo = 1, hi = n;    while (lo < hi) {     int mid = lo + (hi - lo + 1) / 2;     if (can(mid, k, a)) lo = mid;     else hi = mid - 1;    }    cout << lo <<   n ;    return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 22;   int cache[1 << N];   int next_element[1 << N];   int already_done(const vector<int>& adj);   int memo(int set, const vector<int>& adj);   int main() {     int n, m;     cin >> n >> m;     vector<int> adj(n);     for (int i = 0; i < m; i++) {       int u, v;       cin >> u >> v;       u--;       v--;       adj[u] |= 1 << v;       adj[v] |= 1 << u;     }     for (int i = 0; i < n; i++) adj[i] |= 1 << i;     if (already_done(adj)) {       cout <<  0 n ;       return 0;     }     cout << memo(0, adj) <<   n ;     int set = 0;     while (cache[set]) {       cout << next_element[set] + 1 <<    ;       int n = next_element[set];       set = set | (1 << n) | adj[n];     }   }   int already_done(const vector<int>& adj) {     int all = (1 << adj.size()) - 1;     for (int i = 0; i < adj.size(); i++)       if (adj[i] != all) {         return false;       }     return true;   }   int memo(int set, const vector<int>& adj) {     if (cache[set]) return cache[set];     int& ret = cache[set] = adj.size();     if (set == (1 << adj.size()) - 1) return ret = 0;     for (int i = 0; i < adj.size(); i++)       if ((set & (1 << i)) && (set | adj[i]) != set || set == 0) {         int next_set = set | (1 << i) | adj[i];         int now = 1 + memo(next_set, adj);         if (now < ret) {           ret = now;           next_element[set] = i;         }       }     return ret;   }
#include <bits/stdc++.h>   const long long MOD = 1e9 + 7;   const long long MAXN = 35000 + 1;   using namespace std;   long long readInt() {     bool minus1 = false;     long long result = 0;     char ch;     ch = getchar();     while (true) {       if (ch ==  - ) break;       if (ch >=  0  && ch <=  9 ) break;       ch = getchar();     }     if (ch ==  - )       minus1 = true;     else       result = ch -  0 ;     while (true) {       ch = getchar();       if (ch <  0  || ch >  9 ) break;       result = result * 10 + (ch -  0 );     }     if (minus1)       return -result;     else       return result;   }   int a[MAXN];   int maps[MAXN];   int last[MAXN];   int dp[55][MAXN];   int kek[MAXN];   int n, k;   vector<int> t[MAXN << 2];   void build(int v = 1, int tl = 1, int tr = n) {     if (tl == tr) {       t[v].push_back(last[tl]);       return;     }     int tm = tl + tr >> 1;     build(v + v, tl, tm);     build(v + v + 1, tm + 1, tr);     t[v].resize(tr - tl + 1);     merge(t[v + v].begin(), t[v + v].end(), t[v + v + 1].begin(),           t[v + v + 1].end(), t[v].begin());   }   int get(int l, int r, int v = 1, int tl = 1, int tr = n) {     if (l > r) return 0;     if (l <= tl && tr <= r)       return t[v].end() - upper_bound(t[v].begin(), t[v].end(), r);     if (tl > r || tr < l) return 0;     int tm = tl + tr >> 1;     return get(l, r, v + v, tl, tm) + get(l, r, v + v + 1, tm + 1, tr);   }   map<int, int> q[MAXN];   void go(int v, int l, int r, int optl, int optr) {     if (l > r) return;     int mid = (l + r) >> 1;     int opt = mid;     dp[v][mid] = 0;     int cst = get(min(mid, optr) + 1, mid);     for (int i = min(mid, optr); i >= min(optl, l); i--) {       if (last[i] > mid) cst++;       int tmp = cst + dp[v - 1][i - 1];       if (dp[v][mid] < tmp) {         dp[v][mid] = tmp;         opt = i;       }     }     go(v, l, mid - 1, optl, opt);     go(v, mid + 1, r, opt, optr);   }   int tmp = 0;   int main() {     n = readInt(), k = readInt();     for (int i = 1; i <= n; i++) {       a[i] = readInt();     }     for (int i = n; i >= 1; i--) {       if (maps[a[i]]) {         last[i] = maps[a[i]];       } else {         last[i] = n + 1;       }       maps[a[i]] = i;     }     build();     for (int i = 1; i <= n; i++) {       dp[1][i] = get(1, i);     }     for (int i = 2; i <= k; i++) {       go(i, 1, n, 1, n);     }     cout << dp[k][n];     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MOD = 1e9 + 7;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int t;     cin >> t;     while (t--) {       int n;       cin >> n;       for (int i = 0; i < n; i++) {         cout <<  1  ;       }       cout << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n;   char s[256];   int vis[8];   int main() {     while (~scanf( %d , &n)) {       scanf( %s , s);       int len = strlen(s);       if (n % 4) {         printf( === n );         continue;       }       for (int i = 0; i < n; i++) {         if (s[i] ==  A )           vis[0]++;         else if (s[i] ==  C )           vis[1]++;         else if (s[i] ==  G )           vis[2]++;         else if (s[i] ==  T )           vis[3]++;       }       int ave = n / 4;       for (int i = 0; i < 4; i++) {         if (vis[i] > ave) {           printf( === n );           return 0;         }       }       for (int i = 0; i < len; i++) {         if (s[i] ==  ? ) {           if (vis[0] < ave) {             printf( A );             vis[0]++;             continue;           } else if (vis[1] < ave) {             printf( C );             vis[1]++;             continue;           } else if (vis[2] < ave) {             printf( G );             vis[2]++;             continue;           } else if (vis[3] < ave) {             printf( T );             vis[3]++;             continue;           }         } else           printf( %c , s[i]);       }       printf(  n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     double n;     cin >> n;     while (n--) {       double ele;       cin >> ele;       if (ele < 4 && ele > 0)         cout <<  N n ;       else {         double a = (ele + sqrt((ele * ele) - (4 * ele))) / 2;         double b = (ele - sqrt((ele * ele) - (4 * ele))) / 2;         double res = max(a, b);         cout << setprecision(19) <<  Y               <<     << ele - res <<     << res << endl;       }     }   }
/* THINK ALOUD !! */   #include <bits/stdc++.h>      using namespace std;   using ll=long long int;   using lld=long double;      #define mp make_pair   #define pb push_back   #define accu accumulate      #define vi vector<int>   #define vb vector<bool>   #define vc vector<char>   #define vd vector<double>   #define vlld vector<long double>   #define vll vector<long long int>      #define vvi vector<vector<int>>   #define vvb vector<vector<bool>>   #define vvc vector<vector<char>>   #define vvd vector<vector<double>>   #define vvlld vector<vector<long double>>   #define vvll vector<vector<long long int>>      #define pll pair<ll, ll>   #define pii pair<int, int>   #define pci pair<char, int>   #define pic pair<int, char>   #define pls pair<ll, string>   #define psl pair<string, ll>   #define pis pair<int, string>   #define psi paid<string, int>   #define fast std::ios_base::sync_with_stdio(0);std::cin.tie(0);std::cout.tie(0);      #define INF (int)1e9 // for INT_MAX which still allows for INF + INF   #define rep(i, a, n) for (ll i = a; i < n; i++)   #define per(i, a, n) for (ll i = n-1; i >= a; i--)   #define repp(i, a, n, p) for (ll i = a; i < n; i += p)   #define all(c) (c).begin(), (c).end()   #define lla(c) (c).rbegin(), (c).rend()   #define print_arr(arr, n) for (int i = 0; i < n; i++) std::cout << arr[i] <<    ; std::cout <<   n ;   #define mod 1000000007   #define primeSize 2000000      void solve() {       int n; cin >> n;       int q; cin >> q;       string s;       cin >> s;          vvi hash(n + 1, vi(27, 0));       for (int i = 0; i < n; i++) {           hash[i][s[i] -  a ] ++;           if (i != 0) {               for (int j = 0; j < 27; j++) {                   hash[i][j] += hash[i - 1][j];               }           }       }          while (q --) {           int l, r; cin >> l >> r;           l --, r --;              ll ans = 0;           for (ll i = 0; i < 27; i++) {               ll one = 0;               if (l > 0) one = hash[r][i] - hash[l - 1][i];               else one = hash[r][i];               ans += (one) * (i + 1);           }           cout << ans <<   n ;       }      }      int main() {       fast;       int t = 1;       while (t--)           solve();   }
#include <bits/stdc++.h>   using namespace std;   inline long long read() {     long long w = 0, x = 0;     char c = getchar();     while (!isdigit(c)) w |= c ==  - , c = getchar();     while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();     return w ? -x : x;   }   namespace star {   const long long maxn = 1005, maxm = 2e5 + 10, delta = 3e8 + 10,                   INF = 0x3f3f3f3f3f3f3f3f;   long long ecnt = 1, n, head[maxn], to[maxm], nxt[maxm], v[maxm], S, T, ans;   inline void addedge(long long a, long long b, long long val) {     to[++ecnt] = b, nxt[ecnt] = head[a], head[a] = ecnt, v[ecnt] = val;     to[++ecnt] = a, nxt[ecnt] = head[b], head[b] = ecnt, v[ecnt] = 0;   }   long long dep[maxn];   inline bool bfs() {     memset(dep, -1, sizeof dep);     queue<long long> q;     dep[S] = 0;     q.push(S);     while (!q.empty()) {       long long x = q.front();       q.pop();       for (long long i = head[x]; i; i = nxt[i]) {         long long u = to[i];         if (v[i] and dep[u] == -1) dep[u] = dep[x] + 1, q.push(u);       }     }     return dep[T] != -1;   }   long long dfs(long long x, long long flow) {     if (x == T) return flow;     long long w = 0, used = 0;     for (long long i = head[x]; i; i = nxt[i]) {       long long u = to[i];       if (v[i] and dep[u] == dep[x] + 1) {         w = dfs(u, min(v[i], flow - used));         used += w;         v[i] -= w, v[i ^ 1] += w;         if (used == flow) return flow;       }     }     if (!used) dep[x] = -1;     return used;   }   inline void work() {     n = read();     S = n * 2 + 1, T = n * 2 + 2;     for (long long i = 1; i <= n; i++) {       long long x = read();       while (x--) {         long long u = read();         addedge(i, n + u, INF);       }     }     for (long long tmp, i = 1; i <= n; i++)       addedge(S, i, tmp = delta - read()), ans += tmp;     for (long long i = 1; i <= n; i++) addedge(i + n, T, delta);     while (bfs()) ans -= dfs(S, INF);     printf( %lld n , min(0LL, -ans));   }   }  // namespace star   signed main() {     star::work();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     string s;     cin >> s;     long long m = 0, cost = 0;     ;     int a, b;     priority_queue<pair<int, int> > q;     for (int i = 0; i < s.size(); i++) {       m--;       if (s[i] ==  ( ) m += 2;       if (s[i] ==  ? ) {         s[i] =  ) ;         cin >> a >> b;         q.push(make_pair(b - a, i));         cost += b;       }       if (m < 0) {         if (q.empty()) break;         pair<int, int> x = q.top();         q.pop();         s[x.second] =  ( ;         cost -= x.first;         m += 2;       }     }     if (m != 0) {       cout << -1;       return 0;     }     cout << cost << endl << s;   }
#include <bits/stdc++.h>   using namespace std;   int32_t main() {     vector<int> a;     vector<string> size = { S ,  M ,  L ,  XL ,  XXL };     int i;     int n = 5;     for (i = 0; i < 5; i++) {       int x;       cin >> x;       a.push_back(x);     }     int q;     cin >> q;     while (q--) {       int k = 0;       string inp;       cin >> inp;       if (inp ==  S ) k = 0;       if (inp ==  M ) k = 1;       if (inp ==  L ) k = 2;       if (inp ==  XL ) k = 3;       if (inp ==  XXL ) k = 4;       int shirt = 0;       int p = 0;       while (shirt == 0) {         if (k + p < n && a[k + p] != 0) {           shirt = 1;           a[k + p]--;           cout << size[k + p] << endl;           break;         } else if (k - p >= 0 && a[k - p] != 0) {           shirt = 1;           a[k - p]--;           cout << size[k - p] << endl;           break;         }         p++;       }     }   }
#include <bits/stdc++.h>   using namespace std;   template <class c>   struct rge {     c b, e;   };   template <class c>   rge<c> range(c i, c j) {     return rge<c>{i, j};   }   template <class c>   auto dud(c* x) -> decltype(cerr << *x, 0);   template <class c>   char dud(...);   struct debug {     template <class c>     debug& operator<<(const c&) {       return *this;     }   };   using ll = long long;   using ld = long double;   constexpr int nax = 305;   constexpr int infty = 1000 * 1000 * 1000 + 5;   constexpr int mod = 1000 * 1000 * 1000 + 7;   int n;   vector<vector<int>> wynik;   int jest[nax][nax];   int main() {     scanf( %d , &n);     int i;     for (i = n; i >= 5; i -= 2) {       vector<int> cyk;       for (int j = 1; j < i - 1; j++) {         cyk.push_back(j);       }       const int s = (int)cyk.size();       for (int j = 0; j < s; j++) {         const int k = (j + 1) % s;         if (j == 0) {           wynik.emplace_back();           wynik.back().push_back(i);           wynik.back().push_back(cyk[j]);           wynik.back().push_back(i - 1);           wynik.emplace_back();           wynik.back().push_back(i);           wynik.back().push_back(cyk[k]);           wynik.back().push_back(i - 1);         } else {           wynik.emplace_back();           wynik.back().push_back(i);           wynik.back().push_back(cyk[j]);           wynik.back().push_back(i - 1);           wynik.back().push_back(cyk[k]);         }       }     }     assert(i < 5);     if (i == 4) {       for (int i = 1; i <= 4; i++) {         wynik.emplace_back();         for (int j = 1; j <= 4; j++) {           if (i != j) {             wynik.back().push_back(j);           }         }       }     } else if (i == 3) {       wynik.emplace_back();       wynik.back().push_back(1);       wynik.back().push_back(2);       wynik.back().push_back(3);       wynik.emplace_back();       wynik.back().push_back(1);       wynik.back().push_back(2);       wynik.back().push_back(3);     } else {       assert(false);     }     printf( %d n , (int)wynik.size());     for (const auto& p : wynik) {       const int s = (int)p.size();       assert(s == 3 or s == 4);       printf( %d , s);       for (int i = 0; i < s; i++) {         assert(1 <= p[i] and p[i] <= n);         printf(  %d , p[i]);         jest[p[i]][p[(i + 1) % s]]++;       }       printf(  n );     }     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= n; j++) {         if (i != j) {           assert(jest[i][j] + jest[j][i] == 2);         }       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int x, sum1 = 0, Min = 0, sum = 0;     cin >> x;     int p;     vector<int> v;     for (int j = 0; j < x; j++) {       cin >> p;       sum += p;       v.push_back(p);     }     sort(v.begin(), v.end());     int s = v.size();     sum1 = 0;     for (int i = s - 1; i >= 0; i--) {       sum = sum - v[i];       sum1 = sum1 + v[i];       ++Min;       if (sum1 > sum) break;     }     cout << Min;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   char gc() {     static char buf[100000], *p1 = buf, *p2 = buf;     return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)                ? EOF                : *p1++;   }   long long read() {     char ch = getchar();     long long x = 0;     int op = 1;     for (; !isdigit(ch); ch = getchar())       if (ch ==  - ) op = -1;     for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch -  0 ;     return x * op;   }   long long n, t, a[200005], b[200005], x[200005], tg[200005];   int main() {     n = read(), t = read();     for (int i = (1); i <= (n); i++) a[i] = read();     for (int i = (1); i <= (n); i++) {       x[i] = read();       if (x[i] < i) return puts( No ), 0;     }     for (int i = (1); i <= (n); i++) b[i] = a[i] + t;     for (int i = (1); i <= (n); i++)       if (x[i] > i) tg[i]++, tg[x[i]]--;     for (int i = (1); i <= (n); i++) {       tg[i] += tg[i - 1];       b[i] = max(b[i], b[i - 1] + 1);       if (tg[i]) b[i] = max(b[i], a[i + 1] + t);     }     for (int i = (1); i <= (n); i++)       if (x[i] + 1 <= n)         if (b[x[i]] - a[x[i] + 1] >= t) return puts( No ), 0;     puts( Yes );     for (int i = (1); i <= (n); i++) cout << b[i] <<    ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   map<int, int> frontc;   map<int, int> backc;   int main() {     int n, ans, a, b, x, i, x1;     cin >> n;     ans = n;     for (i = 0; i < n; i++) {       cin >> a >> b;       if (a != b) backc[b]++;       frontc[a]++;     }     map<int, int>::iterator it;     for (it = frontc.begin(); it != frontc.end(); it++) {       x = it->first;       a = frontc[x];       b = backc[x];       if (a >= (n + 1) / 2) {         cout << 0 << endl;         return 0;       }       if (a + b >= (n + 1) / 2)         if ((n + 1) / 2 - a < ans) ans = (n + 1) / 2 - a;     }     if (ans != n) {       cout << ans << endl;       return 0;     }     for (it = backc.begin(); it != backc.end(); it++) {       x = it->first;       b = backc[x];       if (b >= (n + 1) / 2) {         cout << (n + 1) / 2 << endl;         return 0;       }     }     if (ans == n) {       cout << -1 << endl;       return 0;     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 100001;   void print(vector<int>& vec) {     printf( ?  );     for (int i : vec) printf( %d  , i);     printf(  n );     fflush(stdout);   }   int main() {     int n, k;     scanf( %d%d , &n, &k);     vector<int> tmp;     for (int i = 1; i <= k + 1; i++) {       vector<int> vec;       for (int j = 1; j <= k + 1; j++)         if (i != j) vec.push_back(j);       print(vec);       int a, b;       scanf( %d%d , &a, &b);       tmp.push_back(b);     }     int maxi = tmp[0], cnt = 1;     for (int i = 1; i < tmp.size(); i++)       if (tmp[i] > maxi)         maxi = tmp[i], cnt = 1;       else if (tmp[i] == maxi)         cnt++;     printf( ! %d , cnt);     fflush(stdout);     return 0;   }