malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int n, m, q;   vector<int> colors[100013];   unordered_map<int, vector<int> > adj[100013];   unordered_map<int, int> p[100013];   unordered_map<int, int> h[100013];   pair<int, int> visited[100013];   unordered_map<int, int> precalc[100013];   int BIG = 200;   int findSet(int x, int c) {     return p[x][c] == x ? x : p[x][c] = findSet(p[x][c], c);   }   void mergeSet(int a, int b, int c) {     int r1 = findSet(a, c), r2 = findSet(b, c);     if (r1 != r2) {       if (h[r1][c] < h[r2][c])         p[r1][c] = r2;       else if (h[r1][c] > h[r2][c])         p[r2][c] = r1;       else         p[r1][c] = r2, h[r2][c] += 1;     }   }   bool sameSet(int a, int b, int c) { return findSet(a, c) == findSet(b, c); }   void dfs(int x, int c, int start) {     visited[x] = make_pair(start + 1, c);     precalc[start][x] += 1;     for (int i = 0; i < adj[x][c].size(); i++)       if (visited[adj[x][c][i]] != make_pair(start + 1, c))         dfs(adj[x][c][i], c, start);   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 0; i < m; i++) {       int a, b, c;       scanf( %d%d%d , &a, &b, &c);       a -= 1;       b -= 1;       if (!p[a].count(c)) p[a][c] = a, h[a][c] = 0, colors[a].push_back(c);       if (!p[b].count(c)) p[b][c] = b, h[b][c] = 0, colors[b].push_back(c);       mergeSet(a, b, c);       adj[a][c].push_back(b);       adj[b][c].push_back(a);     }     for (int i = 0; i < n; i++)       if (colors[i].size() >= BIG)         for (int j = 0; j < colors[i].size(); j++) dfs(i, colors[i][j], i);     scanf( %d , &q);     for (int i = 0; i < q; i++) {       int u, v;       scanf( %d%d , &u, &v);       u -= 1;       v -= 1;       if (colors[u].size() >= BIG)         printf( %d n , precalc[u][v]);       else if (colors[v].size() >= BIG)         printf( %d n , precalc[v][u]);       else {         int ans = 0;         if (colors[u].size() < colors[v].size()) {           for (int i = 0; i < colors[u].size(); i++)             if (p[v].count(colors[u][i]) && sameSet(u, v, colors[u][i])) ans += 1;         } else           for (int i = 0; i < colors[v].size(); i++)             if (p[u].count(colors[v][i]) && sameSet(u, v, colors[v][i])) ans += 1;         printf( %d n , ans);       }     }     return 0;   }
#include <bits/stdc++.h>   #pragma GCC optimize( Ofast,no-stack-protector,unroll-loops )   #pragma GCC target( sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native )   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long t;     cin >> t;     while (t--) {       long long n;       cin >> n;       long long a[n];       for (long long i = 0; i < n; i++) {         cin >> a[i];       }       long long b[n];       for (long long i = 0; i < n; i++) {         if (i % 2) {           if (a[i] >= 0)             b[i] = a[i];           else             b[i] = -a[i];         } else {           if (a[i] <= 0)             b[i] = a[i];           else             b[i] = -a[i];         }         cout << b[i] <<    ;       }       cout <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   int main() {     int n, i, j;     int a[110][110];     long long ans[150];     while (scanf( %d , &n) != EOF) {       for (i = 1; i <= n; i++)         for (j = 1; j <= n; j++) scanf( %d , &a[i][j]);       memset(ans, 0, sizeof(ans));       for (i = 1; i <= n; i++) {         for (j = 1; j <= n; j++) {           if (i == j) continue;           if (a[i][j] == -1) continue;           ans[i] = ans[i] | a[i][j];         }       }       for (i = 1; i <= n; i++)         if (i == 1)           printf( %I64d , ans[i]);         else           printf(  %I64d , ans[i]);       printf(  n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n, a, i, sum = 0, k, l = 10000000000;     cin >> n;     for (i = 1; i <= n; i++) {       cin >> a;       sum += a;       if (a % 2) l = min(l, a);     }     if (sum % 2 == 1) sum -= l;     cout << sum << endl;   }
#include <bits/stdc++.h>   using namespace std;   long long q, t;   bool f(long long x) {     for (long long i = 2; i * i <= x; i++)       if (x % i == 0) return false;     return true;   }   int main() {     ios::sync_with_stdio(false);     cin >> q;     while (q--) {       long long ans = 0;       cin >> t;       {         if (t == 2) {           cout << -1 << endl;           continue;         }         if (t == 9) {           cout << 1 << endl;           continue;         }         if (t % 2 == 1) {           t -= 9;           if (t < 4) {             cout << -1 << endl;             continue;           } else             ans++;         }         if (t % 4 == 0)           cout << t / 4 + ans << endl;         else if (t % 4 == 2)           cout << t / 4 + ans << endl;         else if (t % 6 == 0)           cout << t / 6 + ans << endl;         else if (t % 6 == 4)           cout << t / 6 + 1 + ans << endl;         else           cout << 1 << endl;       }     }     return 0;   }
#include <bits/stdc++.h>   const int maxn = 200005;   int v[maxn], fa[maxn], ans[maxn], num[maxn];   int n, m;   int findset(int x) {     if (fa[x] != x) {       fa[x] = findset(fa[x]);     }     return fa[x];   }   void _union(int x, int y) {     int p = findset(x);     int q = findset(y);     if (p != q) {       fa[p] = q;     }   }   int main() {     int a, x, y;     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %d , &v[i]);       num[i] = v[i];       fa[i] = i;     }     fa[n + 1] = n + 1;     scanf( %d , &m);     while (m--) {       scanf( %d , &a);       if (a == 1) {         scanf( %d%d , &x, &y);         while (y > 0) {           x = findset(x);           if (x == n + 1) break;           if (num[x] > y) {             ans[x] += y;             num[x] -= y;             y = 0;           } else {             y -= num[x];             ans[x] = v[x];             num[x] = 0;             _union(x, x + 1);           }         }       } else if (a == 2) {         scanf( %d , &x);         printf( %d n , ans[x]);       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     string s;     cin >> s;     bool f = 0;     long last = -1, c = 0;     long ans = 0;     for (register int i = 0; i < s.length(); i++) {       if (s[i] ==  F ) {         if (last == -1) {           last = i;         } else {           last = max(i - c, (last == 0) ? 0 : last + 1);         }         ans = max(ans, last);         c++;       }     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long n, ara[100005], i, j, k, ind, mx, sum, ans, ans1;   int main() {     cin >> n;     for (i = 0; i < n; i++) {       cin >> ara[i];     }     for (i = 0; i < n; i++) {       if (ara[i] >= k) {         k = ara[i];         ind = i;       }     }     for (i = 0; i < n; i++) {       if (i != ind) {         sum += ara[i];       }     }     if (k >= sum)       ans = k - sum + 1;     else       ans = sum - k + 1;     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   signed main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     string s, t;     cin >> s >> t;     int64_t n = s.size();     int64_t m = t.size();     vector<vector<int64_t>> dp(n + 1, vector<int64_t>(n + 1, 0));     dp[0] = vector<int64_t>(n + 1, 1);     for (int64_t i = 1; i <= n; i++) {       for (int64_t j = 0; j < n; j++) {         if (j < n && (j >= m || (t[j] == s[i - 1]))) {           dp[i][j] += dp[i - 1][j + 1];         }         if (j + i <= n && (j + i - 1 >= m || t[j + i - 1] == s[i - 1])) {           dp[i][j] += dp[i - 1][j];         }         dp[i][j] %= 998244353;       }     }     int64_t res = 0;     for (int64_t i = m; i <= n; i++) {       res = (res + dp[i][0]) % 998244353;     }     cout << res <<   n ;   }
#include <bits/stdc++.h>   using namespace std;   bool isprime(unsigned long long n) {     if (n <= 1) return false;     if (n <= 3) return true;     if (n % 2 == 0 || n % 3 == 0) return false;     for (unsigned long long i = 5; i * i <= n; i = i + 6)       if (n % i == 0 || n % (i + 2) == 0) return false;     return true;   }   long long int gcd(long long int a, long long int b) {     if (b == 0)       return a;     else       return gcd(b, a % b);   }   long long int exp(long long int value, long long int power) {     long long int result = 1;     while (power > 0) {       if (power & 1LL) {         result *= value;         result %= 1000000007;       }       value *= value;       value %= 1000000007;       power /= 2LL;     }     return result;   }   long long int lcm(long long n1, long long n2) {     long long max = (n1 > n2) ? n1 : n2;     do {       if (max % n1 == 0 && max % n2 == 0) {         return max;       } else         ++max;     } while (true);   }   int isprime(long long n) {     if (n <= 3) return 1;     if (n % 2 == 0 || n % 3 == 0) return 0;     for (long long i = 5; i * i <= n; i += 6) {       if (n % i == 0 || n % (i + 2) == 0) return 0;     }     return 1;   }   long long a[100005];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(NULL);     cout.tie(NULL);     long long int f, cnt, len, p, q, r, t, i, j, k, l, n, m, x, y, z, b, c, s;     cin >> n;     n -= 10;     x = 0;     if (n == 1) x = 4;     if (n == 2) x = 4;     if (n == 3) x = 4;     if (n == 4) x = 4;     if (n == 5) x = 4;     if (n == 6) x = 4;     if (n == 7) x = 4;     if (n == 8) x = 4;     if (n == 9) x = 4;     if (n == 10) x = 15;     if (n == 11) x = 4;     cout << x;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   map<string, int> m;   int main() {     int n, ans = 0;     string str;     scanf( %d , &n);     for (int i = 0; i < n; i++) {       cin >> str;       m[str]++;       ans = max(ans, m[str]);     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m;   struct pos {     long long x, y;     bool operator<(const pos &p) const {       if (x != p.x) return x < p.x;       return y < p.y;     }   } A[200005], stk[200005];   bool check(pos a, pos b, pos c) {     return (c.y - a.y) * (b.x - c.x) <= (b.y - c.y) * (c.x - a.x);   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       long long x, y;       scanf( %lld%lld , &x, &y);       y -= x * x, A[i] = (pos){x, y};     }     sort(A + 1, A + n + 1);     int cnt = 0;     for (int i = 1; i <= n; i++) {       if (i != n && A[i].x == A[i + 1].x) continue;       while (cnt > 1 && check(stk[cnt - 1], A[i], stk[cnt])) cnt--;       stk[++cnt] = A[i];     }     printf( %d n , cnt - 1);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   struct fast_ios {     fast_ios() {       cin.tie(0);       ios::sync_with_stdio(false);       cout << fixed << setprecision(20);     };   } fast_ios_;   template <typename T>   istream &operator>>(istream &is, vector<T> &v) {     for (auto &x : v) is >> x;     return is;   }   template <typename T>   ostream &operator<<(ostream &os, vector<T> &v) {     for (long long i = 0; i < v.size(); i++) {       cout << v[i];       if (i != v.size() - 1) cout << endl;     };     return os;   }   template <typename T1, typename T2>   ostream &operator<<(ostream &os, pair<T1, T2> p) {     cout <<  (  << p.first <<  ,  << p.second <<  ) ;     return os;   }   template <typename T>   void Out(T x) {     cout << x << endl;   }   template <typename T1, typename T2>   void chOut(bool f, T1 y, T2 n) {     if (f)       Out(y);     else       Out(n);   }   using vec = vector<long long>;   using mat = vector<vec>;   using Pii = pair<long long, long long>;   using v_bool = vector<bool>;   using v_Pii = vector<Pii>;   long long dx[4] = {1, 0, -1, 0};   long long dy[4] = {0, 1, 0, -1};   const long long mod = 1000000007;   void imp() {     Out( Not unique );     exit(0);   }   signed main() {     long long n, m;     cin >> n >> m;     vector<string> s(n);     cin >> s;     queue<Pii> que;     long long S = 0;     for (long long i = (0); i < (n); i++)       for (long long j = (0); j < (m); j++)         if (s[i][j] ==  . ) {           S++;           long long cnt = 0;           for (long long k = (0); k < (4); k++) {             long long x = i + dx[k], y = j + dy[k];             if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] ==  . ) cnt++;           }           if (cnt == 1) que.push(Pii(i, j));         }     while (!que.empty()) {       long long i = que.front().first, j = que.front().second;       que.pop();       if (s[i][j] !=  . ) continue;       long long k0 = -1;       for (long long k = (0); k < (4); k++) {         long long x = i + dx[k], y = j + dy[k];         if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] ==  . ) {           k0 = k;           break;         }       }       if (k0 == -1) imp();       long long i2 = i + dx[k0], j2 = j + dy[k0];       if (k0 == 0)         s[i][j] =  ^ , s[i2][j2] =  v ;       else if (k0 == 1)         s[i][j] =  < , s[i2][j2] =  > ;       else if (k0 == 2)         s[i][j] =  v , s[i2][j2] =  ^ ;       else if (k0 == 3)         s[i][j] =  > , s[i2][j2] =  < ;       S -= 2;       for (long long k = (0); k < (4); k++) {         long long i3 = i2 + dx[k], j3 = j2 + dy[k];         if (i3 >= 0 && i3 < n && j3 >= 0 && j3 < m && s[i3][j3] ==  . ) {           long long cnt = 0;           for (long long k3 = (0); k3 < (4); k3++) {             long long x = i3 + dx[k3], y = j3 + dy[k3];             if (x >= 0 && x < n && y >= 0 && y < m && s[x][y] ==  . ) cnt++;           }           if (cnt == 1) que.push(Pii(i3, j3));         }       }     }     if (S != 0)       imp();     else       Out(s);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int b[101];   int main() {     int n, x;     cin >> n >> x;     int a[n + 1];     for (int i = 1; i <= n; i++) {       cin >> a[i];       b[a[i]]++;     }     int t = 0;     for (int i = 0; i < x; i++) {       if (b[i] == 0) {         t++;       }     }     if (b[x] == 1) t++;     cout << t;   }
#include <bits/stdc++.h>   using namespace std;   int n, m, t;   int data[105][3];   bitset<50> mark;   set<pair<long long, long long> > ss;   struct Node {     pair<long long, long long> g;     void reset() { g.first = g.second = 0; }     void set(int x) {       if (x < 50)         g.first |= 1ll << x;       else         g.second |= 1ll << (x - 50);     }     void reset(int x) {       if (x < 50)         g.first &= (-1ll) ^ (1ll << x);       else         g.second |= (-1ll) ^ (1ll << (x - 50));     }     bool test(int x) {       if (x < 50)         return (g.first & (1ll << x));       else         return (g.second & (1ll << (x - 50)));     }     int key;     friend bool operator<(const Node &a, const Node &b) { return a.key > b.key; }   } tmp;   priority_queue<Node> que;   int main() {     scanf( %d%d%d , &n, &m, &t);     for (int i = 0; i < m; i++)       scanf( %d%d%d , &data[i][0], &data[i][1], &data[i][2]);     tmp.reset();     tmp.key = 0;     que.push(tmp);     int ans, tt = 0;     while (t--) {       if (que.empty()) {         ans = -1;         break;       }       tmp = que.top();       que.pop();       ans = tmp.key;       mark.reset();       for (int i = 0; i < m; i++)         if (tmp.test(i)) {           mark.set(data[i][0]), mark.set(data[i][1] + n);         }       for (int i = 0; i < m; i++)         if (!mark.test(data[i][0]) && !mark.test(data[i][1] + n)) {           tmp.set(i);           tmp.key += data[i][2];           if (ss.find(tmp.g) == ss.end()) {             ss.insert(tmp.g);             que.push(tmp);           }           tmp.key -= data[i][2];           tmp.reset(i);         }     }     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 200005;   const int z = N * 32;   int n, a[N], f[N], rt;   int pool[z], tp, cnt, ch[z][2];   long long ans;   int fa(int x) {     if (x == f[x]) return x;     return f[x] = fa(f[x]);   }   void uni(int x, int y) {     x = fa(x), y = fa(y);     if (x == y) return;     f[x] = y;   }   int newnode() {     if (!tp) return ++cnt;     return pool[tp--];   }   void ins(int v) {     int no = rt, x;     for (register int i = 30; i >= 0; --i) {       if (v & (1 << i))         x = 1;       else         x = 0;       if (!ch[no][x]) ch[no][x] = newnode();       no = ch[no][x];     }   }   void clr(int x) {     if (ch[x][0]) clr(ch[x][0]);     if (ch[x][1]) clr(ch[x][1]);     pool[++tp] = x;     ch[x][0] = ch[x][1] = 0;   }   int find_min(int v) {     int no = rt, ans = 0, x;     for (register int i = 30; i >= 0; --i) {       if (v & (1 << i))         x = 1;       else         x = 0;       if (!ch[no][x])         ans = ans * 2 + 1, no = ch[no][x ^ 1];       else         ans = ans * 2, no = ch[no][x];     }     return ans;   }   void solve(vector<int> x, int d) {     int s = x.size();     if (s <= 1) return;     if (d == -1) {       int no = x[0];       for (register int i = 1; i < s; ++i) {         uni(no, x[i]);         no = x[i];       }       return;     }     vector<int> l, r;     int no;     for (register int i = 0; i < s; ++i) {       no = x[i];       if (a[no] & (1 << d))         l.push_back(no);       else         r.push_back(no);     }     solve(l, d - 1);     solve(r, d - 1);     int sl = l.size(), sr = r.size();     if (sl == 0 || sr == 0) return;     int q = (1 << d) - 1;     rt = newnode();     for (register int i = 0; i < sl; ++i) {       no = l[i];       ins(a[no] & q);     }     int f = a[l[0]] ^ a[r[0]];     for (register int i = 0; i < sr; ++i) {       no = r[i];       f = min(f, find_min(a[no] & q));     }     uni(l[0], r[0]);     clr(rt);     ans += f + (1 << d);   }   int main() {     scanf( %d , &n);     vector<int> c;     for (register int i = 1; i <= n; ++i) {       scanf( %d , &a[i]);       c.push_back(i);     }     solve(c, 29);     printf( %lld , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int k, l;   int main() {     int i, n;     scanf( %d , &n);     getchar();     char ch[1000];     scanf( %s , ch);     for (i = 0; i < n; ++i) {       if (ch[i] ==  0 )         k++;       else         l++;     }     if (n % 2 == 1 || k != l) {       printf( 1 n%s n , ch);       return 0;     }     cout << 2 << endl;     for (i = 0; i < n; ++i) {       printf( %c , ch[i]);       if (ch[i] ==  0 )         k--;       else         l--;       if (k == 0 || l == 0) break;     }     i++;     cout <<    ;     for (int j = i; j < n; ++j) printf( %c , ch[j]);     cout << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long n, m, A[300005], fix[300005], fix1[300005], B[300005], C[300005];   long long BITree[900005], BITree1[900005];   long long getSum(long long index) {     long long sum = 0;     index = index + 1;     while (index > 0) {       sum += BITree[index];       index -= index & (-index);     }     return sum;   }   void updateBIT(long long index, long long val) {     index = index + 1;     while (index <= n + 10) {       BITree[index] += val;       index += index & (-index);     }   }   long long getSum1(long long index) {     long long sum = 0;     index = index + 1;     while (index > 0) {       sum += BITree1[index];       index -= index & (-index);     }     return sum;   }   void updateBIT1(long long index, long long val) {     index = index + 1;     while (index <= m + 10) {       BITree1[index] += val;       index += index & (-index);     }   }   int main() {     cin >> n >> m;     for (long long i = 1; i <= m; i++) {       cin >> A[i];       if (fix[A[i]] == 0) updateBIT(A[i], 1);       fix[A[i]] = 1;       if (C[A[i]] != 0) {         C[A[i]] = max(C[A[i]], A[i] - fix1[A[i]] - 1 + 1);         C[A[i]] = max(C[A[i]], getSum1(i - 1) - getSum1(fix1[A[i]]) + 1);         updateBIT1(fix1[A[i]], -1);         updateBIT1(i, 1);       } else {         C[A[i]] = A[i] + getSum(n) - getSum(A[i]);         updateBIT1(i, 1);       }       fix1[A[i]] = i;     }     for (long long i = n; i >= 1; i--) {       B[i] = B[i + 1] + fix[i];     }     for (long long i = 1; i <= n; i++) {       if (fix[i] == 0) {         cout << i <<     << i + B[i];       } else {         cout << 1 <<     << max(C[i], getSum1(m) - getSum1(fix1[i]) + 1);       }       cout << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   const int inv = numeric_limits<int>::max();   const int minv = numeric_limits<int>::min();   const int max_n = 500010;   int n;   int a[max_n];   int b[max_n] = {0};   int main() {     scanf( %d , &n);     for (int i = 0; i < n; ++i) scanf( %d , &a[i]);     int c = 0;     for (int i = n - 2; i >= 0; --i) {       if (i > 0 and a[i - 1] != a[i] and a[i] != a[i + 1])         ++c;       else {         b[i + 1] = c;         c = 0;       }     }     int res = 0;     for (int i = 1; i <= n - 2; ++i)       if (b[i] > 0) {         res = max(res, (b[i] + 1) / 2);         if (b[i] & 1)           for (int j = i; j < i + b[i]; ++j) a[j] = a[i - 1];         else {           for (int j = i; j < i + b[i] / 2; ++j) a[j] = a[i - 1];           for (int j = i + b[i] / 2; j < i + b[i]; ++j) a[j] = a[i + b[i]];         }       }     printf( %d n , res);     for (int i = 0; i < n; ++i) printf( %d  , a[i]);     printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   struct edge {     long long from, to, w;     edge(int from, int to, long long w) : from(from), to(to), w(w) {}     bool operator<(const edge& e) const { return ((w > e.w)); }   };   void O_o() {     ios::sync_with_stdio(0);     ios_base::sync_with_stdio(0);     cin.tie(0), cout.tie(0);   }   bool valid(long long i, long long j, long long n, long long m) {     return (i >= 0 && i < n && j >= 0 && j < m);   }   long long n, k, a, b;   vector<long long> vec;   bool ok(long long x) {     long long cnt = 999999999;     multimap<int, pair<int, int> > mm;     for (int i = x; i < n + 1; i++) {       cnt = x - vec[i] + vec[i - x];       if (cnt <= k) {         b = i, a = i - x + 1;         return 1;       }     }     return 0;   }   int main() {     O_o();     cin >> n >> k;     int arr[n + 5];     vec.push_back(0);     for (int i = 1; i <= int(n); i++) {       cin >> arr[i];       vec.push_back(arr[i] + vec.back());     }     long long second = 0, e = 1e9, ans = 2e9 + 7, x = 0, y = 0, i = 65;     while (second < e) {       long long mid = (second + e) >> 1;       if (ok(mid)) {         second = mid + 1;       } else         e = mid - 1;     }     second -= 3;     while (ok(second)) ++second;     second--;     ok(second);     cout << second << endl;     for (int i = 1; i <= int(n); i++) {       if (i >= a && i <= b)         cout <<  1  ;       else         cout << arr[i] <<    ;     }     cout << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long n;     cin >> n;     if (n % 7 == 0)       cout << 2 * n / 7 <<     << 2 * n / 7;     else {       if (n % 7 == 1)         cout << 2 * (n / 7) <<     << 2 * (n / 7) + 1;       else if (n % 7 < 6)         cout << 2 * (n / 7) <<     << 2 * (n / 7) + 2;       else         cout << 2 * (n / 7) + 1 <<     << 2 * (n / 7) + 2;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long mod = (long long)(1e13) + 7LL;   long long osn = 137LL;   long long getHash(string &s) {     long long res = 0LL, curr = osn;     for (int i = 0; i < s.size(); i++) {       if (s[i] >= 65 && s[i] <= 90) s[i] += 32;       if (s[i] ==  o ) s[i] =  0 ;       if (s[i] ==  l  || s[i] ==  i ) s[i] =  1 ;       res += curr * (long long)(s[i]);       curr *= osn;     }     return res;   }   int main() {     string s, t;     long long s_hash;     cin >> s;     s_hash = getHash(s);     int n;     cin >> n;     for (int i = 0; i < n; i++) {       cin >> t;       if (getHash(t) == s_hash) {         cout <<  No ;         return 0;       }     }     cout <<  Yes ;     return 0;   }