malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int main() {     bool c5 = true;     string s;     cin >> s;     int d = s.length();     for (int i = 0; i <= d; i++) {       for (char a =  a ; a <=  z ; a++) {         c5 = true;         s.insert(i, 1, a);         int d1 = s.length();         for (int j = 0; j < d1 / 2; j++) {           if (s[j] != s[d1 - 1 - j]) {             c5 = false;           }         }         if (c5 == true) {           break;         }         s.erase(i, 1);       }       if (c5 == true) {         break;       }     }     if (c5 == true) {       cout << s << endl;     } else       cout <<  NA  << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int n;     cin >> n;     vector<pair<int, int> > j(n);     for (int i = 0; i < n; i++) {       cin >> j[i].first;       j[i].second = i;     }     sort(j.begin(), j.end());     if (n == 1)       cout <<  Exemplary pages. n ;     else if (n == 2) {       if (j[0].first == j[1].first)         cout <<  Exemplary pages. n ;       else if ((j[1].first - j[0].first) % 2 == 0)         cout << (j[1].first - j[0].first) / 2 <<   ml. from cup #               << j[0].second + 1 <<   to cup #  << j[1].second + 1 <<  . n ;       else         cout <<  Unrecoverable configuration. n ;     } else {       if (j[0].first == j[n - 1].first)         cout <<  Exemplary pages. n ;       else if (j[1].first == j[n - 2].first &&                j[0].first + j[n - 1].first == j[1].first * 2)         cout << (j[n - 1].first - j[0].first) / 2 <<   ml. from cup #               << j[0].second + 1 <<   to cup #  << j[n - 1].second + 1 <<  . n ;       else         cout <<  Unrecoverable configuration. n ;     }     return 0;   }
#include <bits/stdc++.h>   using std::cin;   using std::cout;   using std::endl;   using std::ifstream;   using std::max;   using std::min;   using std::ofstream;   using std::string;   int dp[2204][2204];   int vec[21][2];   int x, y, vec_num_n, max_dist_d;   int dfs(int ori_x, int ori_y, int off_x, int off_y) {     if (dp[off_x][off_y] >= 0) {       return dp[off_x][off_y];     }     int cur_x = ori_x + off_x;     int cur_y = ori_y + off_y;     if (cur_x * cur_x + cur_y * cur_y > max_dist_d * max_dist_d) {       return dp[off_x][off_y] = 0;     }     for (int vec_i = 0; vec_i < vec_num_n; ++vec_i) {       int next_x = vec[vec_i][0] + off_x;       int next_y = vec[vec_i][1] + off_y;       if (dfs(ori_x, ori_y, next_x, next_y)) {         return dp[off_x][off_y] = 0;       }     }     return dp[off_x][off_y] = 1;   }   int main() {     cin >> x >> y >> vec_num_n >> max_dist_d;     for (int vec_i = 0; vec_i < vec_num_n; ++vec_i) {       cin >> vec[vec_i][0] >> vec[vec_i][1];     }     memset(dp, -1, sizeof(dp));     if (!dfs(x, y, 0, 0)) {       cout <<  Anton  << endl;     } else {       cout <<  Dasha  << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10;   const int mod = 998244353;   int read() {     int x = 0, f = 1;     char c = getchar();     while (c <  0  || c >  9 ) {       if (c ==  - ) f = -1;       c = getchar();     }     while (c >=  0  && c <=  9 ) x = (x << 1) + (x << 3) + c -  0 , c = getchar();     return x * f;   }   int qpow(int a, int p, int mod) {     int res = 1;     while (p) {       if (p & 1) res = 1ll * res * a % mod;       a = 1ll * a * a % mod;       p >>= 1;     }     return res;   }   int inc(int x, int y, int mo) {     if (y < 0) y += mo;     if (x + y >= mo) x -= mo;     return x + y;   }   const int P = 998244353, gi = 3;   const double pi = acos(-1.0);   int rev[N];   void NTT(int *A, int n, int inv) {     for (int i = 0; i < n; i++)       if (i < rev[i]) swap(A[i], A[rev[i]]);     for (int l = 1; l < n; l <<= 1) {       int tt = qpow(gi, (P - 1) / (l << 1), P);       int temp = (inv == 1 ? tt : qpow(tt, P - 2, P));       for (int i = 0; i < n; i += (l << 1)) {         int omega = 1;         for (int j = 0; j < l; j++, omega = 1ll * omega * temp % P) {           int x = A[i + j], y = 1ll * omega * A[i + j + l] % P;           A[i + j] = inc(x, y, P);           A[i + j + l] = inc(x, -y, P);         }       }     }     int invv = qpow(n, P - 2, P);     if (inv == -1)       for (int i = 0; i < n; i++) A[i] = 1ll * A[i] * invv % P;   }   int NTTinit(int n, int m) {     int ML = 1, bit = 0;     while (ML <= n + m) ML <<= 1, bit++;     for (int i = 0; i < ML; i++)       rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));     return ML;   }   void NTTX(int *a, int n, int *b, int m) {     int ML = NTTinit(n, m);     NTT(a, ML, 1);     NTT(b, ML, 1);     for (int i = 0; i < ML; i++) a[i] = 1ll * a[i] * b[i] % P;     NTT(a, ML, -1);   }   int b[N];   void solve(int l, int r, int *res) {     if (l == r) {       res[0] = 1;       res[1] = b[l];       return;     }     int mid = (l + r) >> 1;     int n = (mid - l + 1), m = (r - mid + 1);     int ML = NTTinit(n, m);     int L[ML], R[ML];     memset(L, 0, sizeof(L));     memset(R, 0, sizeof(R));     solve(l, mid, L);     solve(mid + 1, r, R);     NTTX(L, n, R, m);     for (int i = 0; i <= r - l + 1; i++) res[i] = L[i];   }   int a[N], C[N];   int main() {     int n = read(), k = read();     for (int i = 1; i <= n; i++) a[i] = read();     int Q = read();     while (Q--) {       int op = read();       memset(C, 0, sizeof(C));       if (op == 1) {         int q = read(), ii = read(), d = read();         for (int i = 1; i <= n; i++)           b[i] = (q - (i == ii ? d : a[i]) + mod) % mod;       } else {         int q = read(), l = read(), r = read(), d = read();         for (int i = 1; i <= n; i++)           b[i] = (q - ((i <= r && i >= l) ? (d + a[i]) : a[i]) + mod) % mod;       }       solve(1, n, C);       printf( %d n , C[k]);     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long n, d, m;     cin >> n >> d >> m;     long long ans = 0;     long long a[n];     vector<long long> big, small;     for (long long i = 0; i < n; i++) cin >> a[i];     for (long long i = 0; i < n; i++) {       if (a[i] > m)         big.push_back(a[i]);       else         small.push_back(a[i]);     }     sort(big.rbegin(), big.rend());     sort(small.rbegin(), small.rend());     long long p = big.size(), q = small.size();     for (long long i = 1; i < p; i++) big[i] += big[i - 1];     for (long long i = 1; i < q; i++) small[i] += small[i - 1];     if (q > 0) ans = small[q - 1];     for (long long i = 0; i < p; i++) {       if (i * (d + 1) + 1 <= n) {         ans = max(ans, big[i]);         long long rem = n - (i * (d + 1) + 1);         long long ind = -1;         if (q > 0 and rem > 0) {           ind = max(0LL, min(rem - 1LL, q - 1));           ans = max(ans, big[i] + small[ind]);         }       }     }     cout << ans <<   n ;   }
#include <bits/stdc++.h>   using namespace std;   using ll = long long;   using ld = long double;   using D = double;   using uint = unsigned int;   template <typename T>   using pair2 = pair<T, T>;   using pii = pair<int, int>;   using pli = pair<ll, int>;   using pll = pair<ll, ll>;   mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());   const int MOD = 1000000007;   inline int sum(int a, int b, int mod = MOD) {     a += b;     if (a >= mod) a -= mod;     return a;   }   inline int sub(int a, int b, int mod = MOD) {     a -= b;     if (a < 0) a += mod;     return a;   }   inline int mul(int a, int b, int mod = MOD) { return ((long long)a * b) % mod; }   inline int powmod(int a, int b, int mod = MOD) {     int tmp = a;     int ans = 1;     while (b) {       if (b & 1) ans = mul(ans, tmp, mod);       tmp = mul(tmp, tmp, mod);       b >>= 1;     }     return ans;   }   inline int inv(int a, int mod = MOD) { return powmod(a, mod - 2, mod); }   const int maxn = 5000006;   int sm[maxn];   int ans[maxn];   int t, l, r;   int main() {     scanf( %d%d%d , &t, &l, &r);     for (int i = 1; i < maxn; i++) sm[i] = -1;     for (int i = 2; i < maxn; i++) {       for (int j = i; j < maxn; j += i)         if (sm[j] == -1) {           sm[j] = i;         }     }     ans[1] = 0;     for (int i = 2; i < maxn; i++) {       int d = sm[i];       int g = i / d;       ans[i] = sum(ans[i / d], mul(g, ((ll)d * (d - 1) / 2) % MOD));     }     int ml = 1;     int answer = 0;     for (int i = l; i <= r; i++) {       answer = sum(answer, mul(ml, ans[i]));       ml = mul(ml, t);     }     printf( %d n , answer);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <class T>   void _R(T &x) {     cin >> x;   }   void _R(int &x) { scanf( %d , &x); }   void _R(long long &x) { scanf( %lld , &x); }   void _R(double &x) { scanf( %lf , &x); }   void _R(char &x) { scanf(  %c , &x); }   void _R(char *x) { scanf( %s , x); }   void R() {}   template <class T, class... U>   void R(T &head, U &...tail) {     _R(head);     R(tail...);   }   template <class T>   void _W(const T &x) {     cout << x;   }   void _W(const int &x) { printf( %d , x); }   void _W(const long long &x) { printf( %lld , x); }   void _W(const double &x) { printf( %.16f , x); }   void _W(const char &x) { putchar(x); }   void _W(const char *x) { printf( %s , x); }   template <class T, class U>   void _W(const pair<T, U> &x) {     _W(x.first);     putchar(   );     _W(x.second);   }   template <class T>   void _W(const vector<T> &x) {     for (auto i = x.begin(); i != x.end(); _W(*i++))       if (i != x.cbegin()) putchar(   );   }   void W() {}   template <class T, class... U>   void W(const T &head, const U &...tail) {     _W(head);     putchar(sizeof...(tail) ?     :   n );     W(tail...);   }   int MOD = 1e9 + 7;   void ADD(long long &x, long long v) {     x = (x + v) % MOD;     if (x < 0) x += MOD;   }   const int SIZE = 1e6 + 10;   string s[SIZE];   int row[SIZE], col[SIZE];   int main() {     int ___T;     scanf( %d , &___T);     for (int cs = 1; cs <= ___T; cs++) {       int n, m;       R(n, m);       for (int i = 0; i < (n); ++i) row[i] = 0;       for (int i = 0; i < (m); ++i) col[i] = 0;       for (int i = 0; i < (n); ++i) {         R(s[i]);         for (int j = 0; j < (m); ++j)           if (s[i][j] ==  * ) row[i]++, col[j]++;       }       int an = n + m;       for (int i = 0; i < (n); ++i)         for (int j = 0; j < (m); ++j) {           int me = row[i] + col[j] - (s[i][j] ==  * );           an = min(an, n + m - 1 - me);         }       W(an);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long d1, d2, d3;     cin >> d1 >> d2 >> d3;     long long x1 = d1 + d2 + d3;     long long x2 = d1 + d1 + d2 + d2;     long long x3 = d1 + d1 + d3 + d3;     long long x4 = d2 + d2 + d3 + d3;     x1 = min(x1, min(x2, min(x3, x4)));     cout << x1 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int sz = 501;   const int sz2 = 16;   int n, m;   string a[sz];   bool dp[sz][sz][sz2][sz2];   void solve() {     cin >> n >> m;     for (int i = 0; i < n; i++) cin >> a[i];     long long ans = 0;     for (int i = 0; i < n; i++) {       for (int j = 0; j < m; j++) {         if (i + 1 < n && j + 1 < m) {           int mask = 0;           if (a[i][j] ==  * ) mask += (1 << 0);           if (a[i][j + 1] ==  * ) mask += (1 << 1);           if (a[i + 1][j] ==  * ) mask += (1 << 2);           if (a[i + 1][j + 1] ==  * ) mask += (1 << 3);           dp[i][j][0][mask] = 1;         }       }     }     for (int k = 1; k < sz2; k++) {       for (int i = 0; i < n; i++) {         for (int j = 0; j < m; j++) {           int l = (1 << k);           for (int t = 0; t < sz2; t++) {             dp[i][j][k][t] = 1;             if (((t >> 0) & 1) == 1)               dp[i][j][k][t] &= dp[i][j][k - 1][15];             else               dp[i][j][k][t] &= dp[i][j][k - 1][t];             if (((t >> 1) & 1) == 1 && j + l < m)               dp[i][j][k][t] &= dp[i][j + l][k - 1][15];             else if (j + l < m)               dp[i][j][k][t] &= dp[i][j + l][k - 1][t];             else               dp[i][j][k][t] = 0;             if (((t >> 2) & 1) == 1 && i + l < n)               dp[i][j][k][t] &= dp[i + l][j][k - 1][15];             else if (i + l < n)               dp[i][j][k][t] &= dp[i + l][j][k - 1][t];             else               dp[i][j][k][t] = 0;             if (((t >> 3) & 1) == 1 && i + l < n && j + l < m)               dp[i][j][k][t] &= dp[i + l][j + l][k - 1][15];             else if (i + l < n && j + l < m)               dp[i][j][k][t] &= dp[i + l][j + l][k - 1][t];             else               dp[i][j][k][t] = 0;             if (dp[i][j][k][t]) ans++;           }         }       }     }     cout << ans;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     int q = 1;     for (; q > 0; q--) {       solve();       cout <<   n ;     }   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 4e3 + 7;   const int mod = 1e9 + 7;   const int INF = 1e9 + 7;   const int maxl = 20;   const int SQ = 70;   int n;   int a[maxn], ps[maxn];   int dp[maxn][SQ][SQ];   int32_t main() {     ios_base::sync_with_stdio(false), cin.tie(), cout.tie();     ;     cin >> n;     for (int i = 1; i <= n; i++) cin >> a[i];     for (int i = 1; i <= n; i++) ps[i] = ps[i - 1] + a[i];     for (int i = n - 1; i >= 0; i--) {       for (int j = 0; j < SQ; j++) {         for (int k = 1; k < SQ; k++) {           int l = i;           int r = n - i - j;           if (l >= r) break;           dp[i][j][k] = -INF;           for (int Amove : {k, k + 1}) {             if (r - l >= Amove) {               int p1 = 0, p2 = 0;               for (int Bmove : {Amove, Amove + 1}) {                 if (l + Amove <= r - Bmove)                   p1 = dp[l + Amove][n - l - Amove - r + Bmove][Bmove] +                        ps[l + Amove] - ps[l] - ps[r] + ps[r - Bmove];                 else                   p1 = +INF;                 swap(p1, p2);               }               dp[i][j][k] = max(                   dp[i][j][k],                   (min(p1, p2) == +INF ? ps[l + Amove] - ps[l] : min(p1, p2)));             }           }           dp[i][j][k] = (dp[i][j][k] != -INF ? dp[i][j][k] : 0);         }       }     }     cout << dp[0][0][1] <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAXN = (int)(1e6 + 7);   const long long oo = (long long)(1e18);   const double esp = (double)1e-6;   const long long MOD = (long long)(1e9 + 7);   int n, x, y, fre[MAXN];   vector<int> adj[MAXN];   void dfs(int u, int t) {     if (u == t) return;     fre[u] = 0;     for (int i = 0; i < (int)adj[u].size(); i++) {       int v = adj[u][i];       if (fre[v]) {         dfs(v, t);       }     }   }   int main() {     while (cin >> n >> x >> y) {       for (int i = 1; i <= n; i++) adj[i].clear();       int a, b;       for (int i = 0; i < n - 1; i++) {         cin >> a >> b;         adj[a].push_back(b);         adj[b].push_back(a);       }       long long res = 1LL * n * (n - 1) / 2;       for (int i = 1; i <= n; i++) fre[i] = 1;       dfs(x, y);       long long cnt2 = 0, cnt1 = 0;       for (int i = 1; i <= n; i++) {         if (fre[i]) {           ++cnt1;         }         fre[i] = 1;       }       dfs(y, x);       for (int i = 1; i <= n; i++) {         if (fre[i]) {           ++cnt2;         }         fre[i] = 1;       }       long long z = cnt2 * cnt1;       cout << res + res - z << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int c = 0;     long long t = 0;     string s, s2;     cin >> s >> s2;     int n = s2.size() - s.size();     for (int i = 0; i < n; i++) {       c += s2[i] -  0 ;     }     for (int i = 0; i < s.size(); i++) {       c += s2[i + n] -  0 ;       if (i) c -= s2[i - 1] -  0 ;       if (s[i] ==  0 )         t += c;       else         t += n - c + 1;     }     cout << t;     return 0;   }
#include <bits/stdc++.h>   #pragma GCC target( avx,tune=native )   using namespace std;   bitset<300000013> unprime;   int main() {     if (fopen( FILENAME.in ,  r )) {       freopen( FILENAME.in ,  r , stdin);       freopen( FILENAME.out ,  w , stdout);     }     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long l, r;     cin >> l >> r;     unprime[0] = 1;     unprime[1] = 1;     for (int i = 2; i <= r; i++) {       if (unprime[i]) continue;       if (i < 20000) {         for (int j = i * i; j <= r; j += i) {           unprime[j] = 1;         }       }     }     int answer = (l <= 2 && 2 <= r ? 1 : 0);     int temp = l % 4;     for (int i = l; i <= r; i++) {       if (!unprime[i] && temp == 1) answer++;       temp++;       if (temp == 4) temp = 0;     }     cout << answer << endl;   }
#include <bits/stdc++.h>   using namespace std;   int n;   int main() {     scanf( %d , &n);     if (n == 1) {       puts( white );       cout << 1 <<     << 2 << endl;       return 0;     }     if (n & 1) {       puts( black );       return 0;     }     puts( white );     cout << 1 <<     << 2 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 200005;   long long dp[N][5];   long long DP[N];   int head[N], nex[N * 2], to[N * 2], tot = 0;   int n, k;   long long ans = 0;   void add(int u, int v) {     to[++tot] = v;     nex[tot] = head[u];     head[u] = tot;   }   void dfs(int u, int fa, int d) {     DP[u] = dp[u][d % k] = 1;     for (int i = head[u]; i > 0; i = nex[i]) {       int v = to[i];       if (v == fa) continue;       dfs(v, u, d + 1);       for (int j = 0; j < k; j++) {         for (int l = 0; l < k; l++) {           ans += (k - (j - d + l - d) % k) % k * dp[u][j] * dp[v][l];         }       }       for (int i = 0; i < k; i++) dp[u][i] += dp[v][i];       ans += ((long long)n - DP[v]) * DP[v];       DP[u] += DP[v];     }   }   int main() {     while (~scanf( %d%d , &n, &k)) {       memset(head, 0, sizeof(head));       memset(dp, 0, sizeof(dp));       memset(DP, 0, sizeof(DP));       tot = 0;       for (int i = 1; i < n; i++) {         int u, v;         scanf( %d%d , &u, &v);         add(u, v);         add(v, u);       }       ans = 0;       dfs(1, 0, 0);       printf( %lld n , ans / k);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MOD = 998244353, MAXn = 2e5 + 2;   long long arr[MAXn];   long long qp(long long a, long long e) {     if (e == 0) return 1;     if (e == 1) return a;     if (!(e & 1)) {       a = qp(a, e / 2);       return a * a % MOD;     }     return a * qp(a, e - 1) % MOD;   }   long long r[MAXn];   long long p[MAXn];   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long n, m, A;     cin >> n >> m >> A;     r[0] = p[0] = 1;     for (int i = 1; i <= m; i++) {       long long b;       cin >> b;       p[i] = (p[i - 1] + (r[i - 1] * qp(qp(A, b), MOD - 2) % MOD)) % MOD;       r[i] = (r[i - 1] + (p[i - 1] * qp(A, b) % MOD)) % MOD;     }     cout << (p[m] * qp(A, n) % MOD * qp(qp(2, m), MOD - 2) % MOD);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   namespace SHENZHEBEI {   inline char gc() { return getchar(); }   inline long long read() {     long long x = 0, f = 1;     char ch = gc();     for (; !isdigit(ch); ch = gc())       if (ch ==  - ) f = -1;     for (; isdigit(ch); ch = gc()) x = x * 10 - 48 + ch;     return x * f;   }   inline void write(long long x) {     if (x < 0) putchar( - ), x = -x;     if (x >= 10) write(x / 10);     putchar(x % 10 +  0 );   }   inline char readchar() {     char ch = gc();     for (; isspace(ch); ch = gc())       ;     return ch;   }   inline long long readstr(char *s) {     char ch = gc();     int cur = 0;     for (; isspace(ch); ch = gc())       ;     for (; !isspace(ch); ch = gc()) s[cur++] = ch;     s[cur] =   0 ;     return cur;   }   inline void writeln(long long x) {     write(x);     puts(  );   }   inline double getreal() {     static double lbc;     scanf( %lf , &lbc);     return lbc;   }   }  // namespace SHENZHEBEI   using namespace SHENZHEBEI;   const long long mod = 1e9 + 7, N = 200010;   map<long long, long long> g;   vector<long long> a[1010];   long long ans, n, m, vis[1010], SIZE[1010];   long long id(long long x) {     if (g.find(x) == g.end()) {       long long u = g.size();       g[x] = u;     }     return g[x];   }   void gao(long long x) {     for (; x; x >>= 1) id(x);   }   long long Size(long long x) {     long long L = x, R = x, ans = 0;     for (; L <= n; L = L << 1, R = R << 1 | 1)       ans += ((n) < (R) ? (n) : (R)) - L + 1;     return ans;   }   void dfs(long long x, long long bb) {     vis[x] = 1;     (ans = (ans + (bb * SIZE[x])) % mod);     for (long long i : a[x])       if (!vis[i]) dfs(i, bb);     vis[x] = 0;   }   int main() {     n = read(), m = read();     for (long long i = 1; i <= m; ++i) {       long long x = read(), y = read();       gao(x), gao(y);       a[g[x]].push_back(g[y]);       a[g[y]].push_back(g[x]);     }     gao(1);     for (pair<long long, long long> I : g) {       SIZE[I.second] = Size(I.first);       if (g.count(I.first * 2)) SIZE[I.second] -= Size(I.first * 2);       if (g.count(I.first * 2 + 1)) SIZE[I.second] -= Size(I.first * 2 + 1);       if (I.first > 1)         a[g[I.first / 2]].push_back(g[I.first]),             a[g[I.first]].push_back(g[I.first / 2]);     }     for (long long i = 0; i < g.size(); ++i) dfs(i, SIZE[i]);     writeln(ans);   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long int t;     cin >> (t);     while (t--) {       long long int n, k;       cin >> n >> k;       long long int a[n + 2];       memset(a, -1, sizeof a);       bool ok = false;       for (long long int i = 0; i < n; ++i) {         cin >> a[i];         if (a[i] == k) ok = true;       }       if (n == 1 && ok) {         cout <<  yes               <<   n ;         continue;       }       if (!ok) {         cout <<  no                <<   n ;         continue;       }       ok = false;       for (long long int i = 0; i < n; i++) {         if ((a[i] >= k && a[i + 1] >= k) || (a[i] >= k && a[i + 2] >= k))           ok = true;       }       if (ok)         cout <<  yes               <<   n ;       else         cout <<  no               <<   n ;     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     string s;     cin >> s;     int len = s.length();     for (int i = 0; i < len; i = i + 1) {       if (s[i] !=  a  && s[i] !=  y  && s[i] !=  e  && s[i] !=  i  &&           s[i] !=  o  && s[i] !=  u  && s[i] !=  A  && s[i] !=  Y  &&           s[i] !=  E  && s[i] !=  I  && s[i] !=  O  && s[i] !=  U ) {         if (s[i] >=  A  && s[i] <=  Z ) {           s[i] = s[i] + 32;         }         cout <<  .  << s[i];       }     }     cout << endl;     return 0;   }