malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   long long int seg[800005], lazy[800005];   void push(long long int v) {     if (lazy[v] == 0) return;     seg[2 * v] |= lazy[v];     seg[2 * v + 1] |= lazy[v];     lazy[2 * v] = lazy[v];     lazy[2 * v + 1] = lazy[v];     lazy[v] = 0;     return;   }   void update(long long int v, long long int tl, long long int tr,               long long int l, long long int r, long long int val) {     if (tl > r || tr < l) return;     push(v);     if (tl == l && tr == r) {       lazy[v] = val;       seg[v] = val;       return;     } else if (tl >= l && tr <= r) {       lazy[v] = val;       seg[v] |= val;       return;     }     long long int tm = (tl + tr) / 2;     update(2 * v, tl, tm, l, r, val);     update(2 * v + 1, tm + 1, tr, l, r, val);     seg[v] = (seg[2 * v] & seg[2 * v + 1]);     return;   }   long long int query(long long int v, long long int tl, long long int tr,                       long long int l, long long int r) {     if (tl > r || tr < l) return (1LL << 40) - 1;     push(v);     if (tl >= l && tr <= r) {       return seg[v];     }     long long int tm = (tl + tr) / 2;     return (query(2 * v, tl, tm, l, r) & query(2 * v + 1, tm + 1, tr, l, r));   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int tests = 1;     while (tests--) {       long long int i, j, n, m;       cin >> n >> m;       vector<long long int> l(m), r(m), q(m);       vector<vector<long long int>> cnt(n + 2, vector<long long int>(31, 0));       for (long long int i = 0; i <= m - 1; i++) {         cin >> l[i] >> r[i] >> q[i];         for (long long int j = 0; j <= 30; j++) {           if (q[i] & (1 << j)) cnt[l[i]][j]++, cnt[r[i] + 1][j]--;         }       }       for (long long int i = 1; i <= n; i++) {         for (long long int j = 0; j <= 30; j++) cnt[i][j] += cnt[i - 1][j];       }       for (long long int i = 1; i <= n; i++) {         long long int val = 0;         for (long long int j = 0; j <= 30; j++) {           if (cnt[i][j] > 0) val |= (1 << j);         }         update(1, 1, n, i, i, val);       }       bool check = true;       for (long long int i = 0; i <= m - 1; i++) {         long long int val = query(1, 1, n, l[i], r[i]);         if (val != q[i]) {           check = false;           break;         }       }       if (!check) {         cout <<  NO ;         return 0;       }       cout <<  YES             <<   n ;       for (long long int i = 1; i <= n; i++) {         cout << query(1, 1, n, i, i) <<    ;       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   using ll = long long;   const int nax = 107;   int n, m;   char wcz[nax][nax];   int oj[nax];   int fin(int v) {     if (oj[v] != v) oj[v] = fin(oj[v]);     return oj[v];   }   void uni(int v, int u) { oj[fin(v)] = fin(u); }   int main() {     scanf( %d%d , &n, &m);     for (int i = 1; i <= n; i++) scanf( %s , wcz[i] + 1);     for (int i = 1; i <= n + m; i++) oj[i] = i;     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= m; j++) {         if (wcz[i][j] ==  # ) uni(i, n + j);       }     }     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= m; j++) {         if (wcz[i][j] ==  .  && fin(i) == fin(n + j)) {           printf( No n );           return 0;         }       }     }     printf( Yes n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long N = 2e5 + 5;   long long n, m;   long long a[N], ans[N];   set<long long> active;   int32_t main() {     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     ;     cin >> n;     for (long long i = 1; i <= n; i++) {       cin >> a[i];       active.insert(i);     }     cin >> m;     while (m--) {       long long type;       cin >> type;       if (type == 1) {         long long p, x;         cin >> p >> x;         auto it = active.lower_bound(p);         if (it != active.end()) {           long long idx = *it;           ans[idx] += x;           long long diff = 0;           while (idx <= n && ans[idx] >= a[idx]) {             diff = ans[idx] - a[idx];             ans[idx + 1] += diff;             ans[idx] = a[idx];             active.erase(idx);             idx++;           }         }       } else {         long long k;         cin >> k;         cout << ans[k] <<   n ;       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int max_n = 22, inf = 1111111111;   int n, m, dp[1 << max_n], a[max_n][max_n], nmask[max_n][max_n],       res[max_n][max_n];   string s[max_n];   bool get_bit(int x, int poz) { return (bool)(x & (1 << poz)); }   int main() {     cin >> n >> m;     for (int i = 0; i < n; ++i) {       cin >> s[i];     }     for (int i = 0; i < n; ++i) {       for (int j = 0; j < m; ++j) {         cin >> a[i][j];       }     }     for (int poz = 0; poz < n; ++poz) {       for (int i = 0; i < m; ++i) {         int mx = 0;         for (int j = 0; j < n; ++j) {           if (s[poz][i] == s[j][i]) {             res[poz][i] += a[j][i];             mx = max(mx, a[j][i]);             nmask[poz][i] |= (1 << j);           }         }         res[poz][i] -= mx;       }     }     dp[0] = 0;     for (int mask = 1; mask < (1 << n); ++mask) {       int poz;       for (int i = 0; i < n; ++i) {         if (get_bit(mask, i)) {           poz = i;         }       }       dp[mask] = inf;       for (int i = 0; i < m; ++i) {         dp[mask] = min(dp[mask], a[poz][i] + dp[mask ^ (1 << poz)]);         dp[mask] = min(dp[mask], res[poz][i] + dp[mask ^ (mask & nmask[poz][i])]);       }     }     cout << dp[(1 << n) - 1] << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1100;   int n, a[maxn], ans, t;   void go(int lim) {     int ret = 0;     for (int i = 1; i <= n; i++)       ret +=           min(abs(a[i] - lim), min(abs(a[i] - (lim + 1)), abs(a[i] - (lim - 1))));     if (ret < ans) ans = ret, t = lim;   }   int main() {     scanf( %d , &n);     ans = INT_MAX;     for (int i = 1; i <= n; i++) scanf( %d , a + i);     for (int i = 1; i <= 100; i++) go(i);     printf( %d %d n , t, ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long arr[500005];   long long brr[500005];   long long total[500005];   int n, r;   bool fnc(long long mid, long long k) {     for (int i = 1; i <= n; i++) brr[i] = 0;     long long d = 0;     for (int i = 1; i <= n; i++) {       d += brr[i];       if (total[i] + d < mid) {         long long x = (mid - (total[i] + d));         d += x;         int j = min(i + 2 * r + 1, n + 1);         brr[j] -= x;         k -= x;         if (k < 0) return 0;       }     }     return 1;   }   int main() {     long long k;     scanf( %d %d %I64d , &n, &r, &k);     for (int i = 1; i <= n; i++) scanf( %I64d , &arr[i]);     for (int i = 1; i <= n; i++) {       if (r == 0) {         brr[i] += arr[i];         brr[i + 1] -= arr[i];       } else {         int j = max(i - r, 1);         brr[j] += arr[i];         j = min(i + r + 1, n + 1);         brr[j] -= arr[i];       }     }     long long d = 0;     for (int i = 1; i <= n; i++) {       d += brr[i];       total[i] = d;     }     long long mn = total[1];     for (int i = 2; i <= n; i++) mn = min(total[i], mn);     long long l = 0, h = 4000000000000000000;     long long ans = mn;     while (l <= h) {       long long mid = (l + h) / 2;       bool flag = fnc(mid, k);       if (flag) {         ans = mid;         l = mid + 1;       } else         h = mid - 1;     }     cout << ans << endl;   }
#include <bits/stdc++.h>   using namespace std;   const int INF = 2123456789;   int a, b, c;   int n, m, k;   int x, y;   string s;   int start[500];   int target[500];   vector<pair<int, int> > ops;   int calendar[] = {0, 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};   int search(int base, int val) {     for (int i = base; i <= n; i++)       if (start[i] == val) return i;   }   int rotate(int s, int e) {     int rotations = 0;     if (s == e) return 0;     for (int i = s; i < e; i++) {       rotations++;       ops.push_back(make_pair(i, i + 1));       int tmp = start[i];       start[i] = start[i + 1];       start[i + 1] = tmp;     }     for (int i = e - 1; i > s; i--) {       rotations++;       ops.push_back(make_pair(i - 1, i));       int tmp = start[i - 1];       start[i - 1] = start[i];       start[i] = tmp;     }     return rotations;   }   int main() {     cin >> n;     int ans = 0;     for (int i = 1; i <= n; i++) cin >> target[i];     for (int i = 1; i <= n; i++) cin >> start[i];     for (int i = 1; i <= n; i++) {       int pos = search(i, target[i]);       ans += rotate(i, pos);     }     cout << ans << endl;     for (int i = 0; i < ops.size(); i++)       cout << ops[i].first <<     << ops[i].second << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(0);     cin.tie(0);     long long int m, b, i, x, curr, ma = 0, tot, j;     cin >> m >> b;     for (i = 0; i <= b; i++) {       x = m * (b - i);       tot = 0;       for (j = i; j >= 0; j--) {         curr = x * (x + 1);         curr /= 2;         curr += (x + 1) * j;         tot += curr;       }       ma = max(tot, ma);     }     cout << ma;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   class ST {    private:     vector<long long> st;     int n;     int left(int p) { return p << 1; }     int right(int p) { return left(p) + 1; }     int query(int p, int L, int R, int i) {       if (L > i) return 0;       if (R <= i) return st[p];       return query(left(p), L, (L + R) >> 1, i) +              query(right(p), ((L + R) >> 1) + 1, R, i);     }     int update(int p, int L, int R, int idx) {       if (L > idx || R < idx) return st[p];       if (L == R) {         return ++st[p];       }       return st[p] = update(left(p), L, (L + R) >> 1, idx) +                      update(right(p), ((L + R) >> 1) + 1, R, idx);     }       public:     ST(int _n) {       n = _n;       st.assign(4 * n, 0);     }     int query(int i) {       int ret = query(1, 0, n - 1, i);       update(i);       return ret;     }     void update(int idx) { update(1, 0, n - 1, idx); }   };   int main() {     int n;     map<long long, long long> mp;     long long ans = 0;     scanf( %I64d , &n);     vector<long long> vec(n), vec2(n);     for (long long i = 0; i < n; i++) scanf( %I64d , &vec[i]), vec2[i] = vec[i];     ST st(n);     sort(vec2.begin(), vec2.end());     for (long long i = 0; i < n; i++) mp[vec2[i]] = i;     for (long long i = 0; i < n - 1; i++) {       long long q = st.query(mp[vec[i]]);       ans += (i - q) * (mp[vec[i]] - q);     }     printf( %I64d , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int t;     cin >> t;     while (t--) {       int n, x, y, b;       cin >> n >> x >> y;       b = n;       int t = y - x, i, k;       for (i = n - 1; i >= 1; i--) {         if (t % i == 0) break;       }       n = n - (i - 1) - 2;       k = t / i;       int c = x / k;       c = min(c, n);       n = n - c;       if (x - c * k == 0) c--;       i = 0;       while (i < b) {         cout << (x - c * k) + i * k <<    ;         i++;       }       cout << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   const int N = 200005;   int main() {     ios_base ::sync_with_stdio(0);     cin.tie(0), cout.tie(0);     int T;     cin >> T;     while (T--) {       long long n, k;       cin >> n >> k;       long long res = 0;       while (n > 0) {         res += n % k;         n -= n % k;         if (n == 0) break;         res++;         n /= k;       }       cout << res <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n;     string str;     cin >> n;     cin >> str;     int len = n - 11;     int coun = 0, cou = 0;     for (int j = 0; j < len + 1; j++) {       if (str[j] ==  8 ) coun = 1, cou++;       ;     }     if (cou > len / 2)       cout <<  YES ;     else       cout <<  NO ;     return 0;   }
#include <bits/stdc++.h>   #pragma comment(linker,  /STACK:268435456 )   using namespace std;   template <typename T>   T sqr(const T &x) {     return x * x;   }   template <typename T>   T my_abs(const T &x) {     return x < 0 ? -x : x;   }   const int INF = (int)1e9;   const long long LINF = (long long)6e18;   const long long INF64 = LINF;   const long long INFLL = LINF;   const long double EPS = 1e-8;   const long double PI = 3.1415926535897932384626433832795;   const long double ME = 1e-5;   const long long MOD = (int)1e9 + 7;   const long long MOD2 = (int)1e9 + 21;   const int dx[] = {-1, 0, 1, 0};   const int dy[] = {0, 1, 0, -1};   const int SQN = 400;   const int LOGN = 20;   const int N = (int)1e5 + 10;   const int M = (int)1e5 + 10;   map<string, int> hosts;   map<string, int> paths;   map<int, set<int>> nums;   string oh[N];   char buf[100];   pair<vector<int>, int> a[N];   void solve() {     int n;     scanf( %d n , &n);     int idx_host = 0, idx_path = 0;     for (int i = 0; i < int(n); ++i) {       scanf( %s n , buf);       string s = string(buf);       string h =   ;       int cnt = 0;       int pos = 0;       while (pos < int(s.size())) {         if (s[pos] ==  / ) {           cnt++;         }         if (cnt == 3) {           break;         }         h.push_back(s[pos++]);       }       string p =   ;       while (pos < int(s.size())) {         p.push_back(s[pos++]);       }       if (!hosts.count(h)) {         oh[idx_host] = h;         hosts[h] = idx_host++;       }       if (!paths.count(p)) {         paths[p] = idx_path++;       }       nums[hosts[h]].insert(paths[p]);     }     int idx = 0;     for (auto it = nums.begin(); it != nums.end(); ++it) {       a[idx].first.resize(int(it->second.size()));       a[idx].second = it->first;       int pos = 0;       for (auto i = it->second.begin(); i != it->second.end(); ++i) {         a[idx].first[pos++] = *i;       }       idx++;     }     sort(a, a + idx);     vector<vector<int>> ans;     ans.push_back(vector<int>());     for (int i = 1; i < int(idx); ++i) {       bool ok = true;       if (int(a[i].first.size()) != int(a[i - 1].first.size())) {         ok = false;       } else {         for (int j = 0; j < int(int(a[i].first.size())); ++j) {           if (a[i].first[j] != a[i - 1].first[j]) {             ok = false;             break;           }         }       }       if (ok) {         if (int(ans.back().size()) == 0) {           ans.back().push_back(a[i - 1].second);         }         ans.back().push_back(a[i].second);       } else {         if (int(ans.back().size()) != 0) {           ans.push_back(vector<int>());         }       }     }     if (int(ans.back().size()) == 0) {       ans.pop_back();     }     printf( %d n , ans.size());     for (int i = 0; i < int(int(ans.size())); ++i) {       for (int j = 0; j < int(int(ans[i].size())); ++j) {         printf( %s  , oh[ans[i][j]].c_str());       }       printf(  n );     }   }   int main() {     srand((unsigned int)time(NULL));     cout << setprecision(10) << fixed;     solve();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 1e5 + 5;   int n, k, par[N], siz[N];   bool inv[N];   multiset<int> S;   struct dist {     int val, id;   };   dist tab[N];   bool cmp(dist x, dist y) { return x.val < y.val; }   int Find(int x) {     if (par[x] != x) par[x] = Find(par[x]);     return par[x];   }   void Union(int x, int y) {     x = Find(x);     y = Find(y);     par[x] = y;     S.erase(S.find(siz[x]));     S.erase(S.find(siz[y]));     siz[y] += siz[x];     S.insert(siz[y]);   }   int main() {     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       scanf( %d , &tab[i].val);       tab[i].id = i;     }     sort(tab + 1, tab + n + 1, cmp);     int ans = 0, ile = 0;     multiset<int>::iterator low, high;     for (int i = 1; i <= n; i++) {       int x = tab[i].id;       inv[x] = 1;       S.insert(1);       siz[x] = 1;       par[x] = x;       if (inv[x - 1]) Union(x - 1, x);       if (inv[x + 1]) Union(x + 1, x);       low = S.begin();       high = S.end();       high--;       if (*high == *low) {         if (ile < S.size()) {           ile = S.size();           ans = tab[i].val + 1;         }       }     }     printf( %d , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 11;   const int B = 1 << 10;   long long dp[B][B][N];   bool can[N][N];   vector<int> v[N + 1];   int countBits(int n) {     int res = 0;     while (n) {       res += n % 2;       n >>= 1;     }     return res;   }   bool bit(int n, int pos) { return n & (1 << pos); }   int rev(int n, int pos) { return n ^ (1 << pos); }   int main() {     int n, m, k, b, ans = 0;     cin >> n >> m >> k;     for (int i = 0; i < m; i++) {       int v, u;       cin >> v >> u;       v--, u--;       can[v][u] = can[u][v] = 1;     }     b = 1 << n;     for (int i = 0; i < b; i++) v[countBits(i)].push_back(i);     for (int i = 0; i < n; i++)       for (int j = 0; j < n; j++)         if (can[i][j]) {           int add = 0;           add |= 1 << i;           add |= 1 << j;           dp[add][add][2] = 2;         }     for (int i = 2; i < n; i++)       for (int j = 0; j < v[i].size(); j++) {         int mask = v[i][j];         for (int l = 0; l < b; l++) {           int now = dp[mask][l][i];           if (now == 0) continue;           now /= countBits(l);           vector<int> from, to;           for (int x = 0; x < n; x++)             if (bit(mask, x))               from.push_back(x);             else               to.push_back(x);           for (int f = 0; f < from.size(); f++)             for (int t = 0; t < to.size(); t++) {               int v = from[f], u = to[t];               if (!can[v][u]) continue;               if (bit(l, v))                 dp[mask ^ (1 << u)][rev(rev(l, v), u)][i + 1] += now;               else                 dp[mask ^ (1 << u)][rev(l, u)][i + 1] += now;             }         }       }     for (int i = 0; i < v[k].size(); i++) ans += dp[b - 1][v[k][i]][n] / k;     cout << ans;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAX_PRIMES = 15;   vector<int> primes;   vector<int> num[(1 << MAX_PRIMES) + 5];   bool used[(1 << MAX_PRIMES) + 5];   vector<int> BFS(int sz, int k) {     queue<int> fila;     vector<int> ans;     fila.push((1 << sz) - 1);     used[(1 << sz) - 1] = true;     while (!fila.empty() && ans.size() < k) {       int mask = fila.front();       fila.pop();       for (int i = 0; i < (int)num[mask].size() && ans.size() < k; i++) {         ans.push_back(num[mask][i]);       }       for (int i = 0; i < sz; i++) {         int nmask = mask & (~(1 << i));         int bit = (mask >> i) & 1;         if (bit && !used[nmask]) {           used[nmask] = true;           fila.push(nmask);         }       }     }     return ans;   }   int main(void) {     int k;     int maxi;     vector<int> ans;     scanf(  %d , &k);     maxi = 2 * k * k;     for (int i = 2;; i++) {       bool good = true;       for (int j = 0; j < (int)primes.size(); j++) {         if (i % primes[j] == 0) {           good = false;           break;         }       }       if (good) {         int val = 1;         while (1LL * val * i <= maxi) {           num[1 << primes.size()].push_back(val * i);           val *= i;         }         for (int mask = 1; mask < 1 << primes.size(); mask++) {           int nmask = (1 << primes.size()) | mask;           for (int j = 0; j < num[mask].size(); j++) {             for (int p = 0; p < num[1 << primes.size()].size(); p++) {               if (1LL * num[mask][j] * num[1 << primes.size()][p] > maxi) break;               num[nmask].push_back(num[mask][j] * num[1 << primes.size()][p]);             }           }         }         primes.push_back(i);         int counter = 0;         for (int mask = 1; mask < 1 << primes.size(); mask++) {           counter += num[mask].size();         }         if (counter >= k) {           ans = BFS(primes.size(), k);           break;         }       }     }     for (int i = 0; i < (int)ans.size(); i++) {       if (i != 0) {         printf(   );       }       printf( %d , ans[i]);     }     printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long double pi = acos(-1.0);   long long gcd(long long a, long long b) {     if (b == 0) return a;     return gcd(b, a % b);   }   bool checkprime(long long n) {     long long i = 2;     while (i * i <= n) {       if (n % i == 0) return 0;       i++;     }     return 1;   }   long long fact(long long n) {     if (n == 0) return 1;     return n * fact(n - 1);   }   long long sod(long long n) {     long long sum = 0;     while (n) {       sum += n % 10;       n /= 10;     }     return sum;   }   vector<long long> v;   long long bs(long long low, long long high, long long val) {     long long mid = (low + high) / 2;     if (low == high) return high;     if (v[mid] >= val)       return bs(low, mid, val);     else       return bs(mid + 1, high, val);   }   void lucky(long long n, long long cur, long long ct4, long long ct7,              long long val) {     if (n == cur) {       if (ct4 == ct7) {         v.push_back(val);       }       return;     }     lucky(n, cur + 1, ct4 + 1, ct7, val * 10 + 4);     lucky(n, cur + 1, ct4, ct7 + 1, val * 10 + 7);   }   long long bs(long long a[], long long low, long long high, long long val) {     long long mid = (low + high) / 2;     if (low > high) return -1;     if (a[mid] > val)       return bs(a, low, mid - 1, val);     else if (a[mid] < val)       return bs(a, mid + 1, high, val);     else       return mid;   }   void DJ() {     long long a, b;     cin >> a >> b;     if (b - a < 2)       cout << -1;     else if (b - a == 2 && a % 2)       cout << -1;     else {       a += a % 2;       cout << a <<     << a + 1 <<     << a + 2;     }   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     long long t = 1;     while (t--) DJ();     return 0;   }
#include <bits/stdc++.h>   using i64 = int64_t;   using u64 = uint64_t;   using u32 = uint32_t;   int main() {     std::ios::sync_with_stdio(false);     std::cin.tie(nullptr);     int n;     i64 k;     std::cin >> n >> k;     std::vector<int> a(n);     for (int i = 0; i < n; i++) {       std::cin >> a[i];       k += a[i];     }     i64 ans = 1;     i64 x = 0;     for (int i = 0; i < n; i++) {       x += a[i];     }     std::vector<std::pair<int, int>> c;     for (int i = 0; i < n; i++) {       int last = 0;       for (int j = 1; j <= a[i];) {         int v = (a[i] + j - 1) / j;         if (last != 0) {           c.emplace_back(j, v - last);         }         if (v == 1) {           break;         }         last = v;         j = (a[i] - 1) / (v - 1) + 1;       }     }     int last = 1;     std::sort(c.begin(), c.end());     for (auto [v, d] : c) {       if (last <= k / x) {         ans = std::max(ans, k / x);       }       x += d;       last = v;     }     if (last <= k / x) {       ans = std::max(ans, k / x);     }     std::cout << ans <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   string s;   int main() {     cin >> s;     int n = s.size();     bool flag = 1;     for (int i = 1; i < n; i++)       if (!(s[i] >=  A  && s[i] <=  Z )) flag = 0;     if (flag) {       for (int i = 0; i < n; i++)         if ( a  <= s[i] && s[i] <=  z )           cout << (char)(s[i] +  A  -  a );         else           cout << (char)(s[i] +  a  -  A );       cout << endl;     } else       cout << s << endl;     return 0;   }