malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int mod = 1e9 + 7;   vector<long long> num;   long long gcd(long long x, long long y) {     if (y > x) return gcd(y, x);     return x % y ? gcd(y, x % y) : y;   }   int a[3];   vector<vector<int> > grid;   vector<vector<int> > dist;   void bfs(int x, vector<bool>& vis) {     int n = vis.size();     queue<int> q;     q.push(a[x]);     vis[a[x]] = 1;     dist[a[x]][x] = 0;     int step = 1;     while (q.size()) {       int t = q.size();       while (t--) {         int tmp = q.front();         q.pop();         for (int i = 0; i < grid[tmp].size(); i++) {           int next = grid[tmp][i];           if (!vis[next]) {             dist[next][x] = step;             vis[next] = 1;             q.push(next);           }         }       }       step++;     }     return;   }   long long shu[63];   int find(long long x) {     for (int i = 0; i < 63; i++) {       if (shu[i] >= x) return i;     }     return 63;   }   long long zhuan(string s) {     int n = s.size();     long long ans = 0;     for (int i = 0; i < n; i++) {       ans = ans * 2 + (long long)(s[i] -  0 );     }     return ans;   }   int main() {     int n;     cin >> n;     while (n--) {       long long t;       cin >> t;       t--;       long long pos = t % 3;       t = t / 3;       long long sum = 1;       int cnt = 1;       while (sum <= t) {         t -= sum;         sum *= 4;         cnt += 2;       }       string ans =   ;       if (pos == 0)         ans +=  1 ;       else {         if (pos == 1)           ans +=  10 ;         else           ans +=  11 ;       }       string str[12] = { 00 ,  01 ,  10 ,  11 ,  00 ,  10 ,                          11 ,  01 ,  00 ,  11 ,  01 ,  10 };       while (ans.size() < cnt) {         ans.insert((pos == 0 ? 1 : 2), str[pos * 4 + t % 4]);         t /= 4;       }       cout << zhuan(ans) << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   bool query = 0;   struct line {     long long m, b;     mutable function<const line*()> succ;     bool operator<(const line rhs) const {       if (!query) return (m < rhs.m);       const line* s = succ();       return s ? (b - s->b) < (rhs.m * (s->m - m)) : 0;     }   };   struct hull : multiset<line> {     bool bad(iterator y) {       auto z = next(y);       if (y == begin()) {         if (z == end()) return 0;         return (y->m == z->m) && (y->b <= z->b);       }       auto x = prev(y);       if (z == end()) return (y->m == x->m) && (y->b <= x->b);       return (1.0) * (x->b - y->b) * (z->m - y->m) >=              (1.0) * (y->b - z->b) * (y->m - x->m);     }     void add(long long m, long long b) {       auto it = insert({m, b});       it->succ = [=] { return (next(it) == end()) ? 0 : &*next(it); };       if (bad(it)) {         erase(it);         return;       }       while (next(it) != end() && bad(next(it))) erase(next(it));       while (it != begin() && bad(prev(it))) erase(prev(it));     }     long long eval(long long x) {       query = 1;       line l = *lower_bound({x, 0});       query = 0;       return (l.m * x + l.b);     }   };   hull h;   int N;   int A[200005];   long long SumA[200005];   long long SumAi[200005];   long long Solve() {     for (int i = 1; i <= N; i++) {       SumA[i] = SumA[i - 1] + A[i];       SumAi[i] = SumAi[i - 1] + (1LL * A[i] * i);     }     long long Ans = -9e18;     for (int i = 1; i <= N; i++) {       h.add(-i, -SumA[i - 1]);       Ans = max(Ans, h.eval(-A[i]) - 1LL * A[i] * i + SumA[i - 1] + SumAi[N]);     }     h.clear();     for (int i = N; i; i--) {       h.add(i, -SumA[i]);       Ans = max(Ans, h.eval(A[i]) - 1LL * A[i] * i + SumA[i] + SumAi[N]);     }     return Ans;   }   int main() {     scanf( %d , &N);     for (int i = 1; i <= N; i++) scanf( %d , &A[i]);     printf( %I64d n , Solve());   }
#include <bits/stdc++.h>   using namespace std;   int triangle(long long n) {     if (n == 1)       return 1;     else       return n + triangle(n - 1);   }   int heart(long long a) {     if (a == 1)       return 1;     else       return (6 * (a - 1)) + heart(a - 1);   }   int balls(long long a) {     if (a == 1)       return 1;     else       return heart(a) + (triangle(a - 1) * 6);   }   int main() {     long long a, b;     cin >> a;     b = balls(a);     cout << b;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m;   set<int> nx[1000100];   vector<pair<int, int> > nw;   int a[1000100];   vector<pair<int, int> > ans;   set<pair<int, int> > order;   set<pair<int, int> > lst;   int main() {     ios_base ::sync_with_stdio(0);     cin.tie();     cout.tie();     srand(23095);     cin >> n >> m;     for (int i = 0; i < m; i++) {       int x, y;       cin >> x >> y;       x--;       y--;       nx[x].insert(y);       nx[y].insert(x);       a[x]++;       a[y]++;     }     for (int i = 0; i < n; i++) {       a[i] = (a[i] / 2) + (a[i] % 2);       order.insert(make_pair(a[i], i));     }     while (!order.empty()) {       int v = order.begin()->second;       order.erase(order.begin());       nw.clear();       for (auto u : nx[v]) {         nw.push_back(make_pair(a[u], u));       }       sort(nw.rbegin(), nw.rend());       for (int j = 0; a[v] > 0; j++) {         a[v]--;         if (a[nw[j].second] > 0) {           order.erase(make_pair(a[nw[j].second], nw[j].second));         }         a[nw[j].second]--;         if (a[nw[j].second] > 0) {           order.insert(make_pair(a[nw[j].second], nw[j].second));         }         ans.push_back(make_pair(v, nw[j].second));         nx[v].erase(nw[j].second);         nx[nw[j].second].erase(v);       }     }     cout << ans.size() <<   n ;     for (auto i : ans) {       cout << i.first + 1 <<     << i.second + 1 <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long a[201010];   int main() {     long long n, m, k;     while (~scanf( %lld%lld%lld , &n, &m, &k)) {       memset(a, 0, sizeof(a));       long long i, j, ans = 0, sum = k;       for (i = 1; i <= n; i++) scanf( %lld , &a[i]);       for (i = n; i >= 1; i--) {         if (a[i] > k) continue;         if (a[i] <= sum) {           sum -= a[i];           ans++;         } else {           m--;           if (m <= 0) break;           sum = k;           i++;         }       }       printf( %lld n , ans);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long gcd(long long a, long long b) {     if (b == 0) return a;     return gcd(b, a % b);   }   long long power(long long a, long long b) {     if (b == 1) return a;     if (b == 0) return 1;     long long ans = power(a, b / 2);     ans = (ans * ans);     if (b & 1) ans = (ans * a);     return ans;   }   void solve() {     long long n, k;     cin >> n >> k;     if (n == 1) {       cout << 0 <<   n ;       return;     }     if (k == 1) {       cout << n - 1 <<   n ;       return;     }     long long x = 1;     long long cnt = 0;     while (x < k && n - x >= 0) {       cnt++;       x *= 2;     }     n -= x;     cnt += (n + k - 1) / k;     cout << cnt <<   n ;   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long tt = 1;     cin >> tt;     while (tt--) {       solve();     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long int gcd(long long int a, long long int b) {     if (a == 0) {       return b;     }     if (b == 0) {       return a;     }     return gcd(b, a % b);   }   long long int power(long long int x, long long int n) {     long long ans = 1;     while (n > 0) {       if (n & 1) ans = (ans * x) % 1000000007;       x = (x * x) % 1000000007;       n /= 2;     }     if (x == 0) ans = 0;     return ans;   }   long long int getsum(int g, int a[], int n, int x) {     long long int i = n - 1, tmp = 0, k = g, count = 0;     while (i >= 0) {       while (k != 0 && i >= 0) {         tmp += max((long long)0, (a[i] - count));         i--;         k--;       }       count++;       k = g;     }     return tmp;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int t = 1;     while (t--) {       int n, m, i;       cin >> n >> m;       int a[n];       for (i = 0; i < n; i++) cin >> a[i];       sort(a, a + n);       int lo = 1, hi = n, mid;       while (lo < hi) {         mid = lo + (hi - lo) / 2;         long long int tmp = getsum(mid, a, n, m);         if (tmp < m) {           lo = mid + 1;         } else {           hi = mid;         }       }       if (getsum(lo, a, n, m) >= m) {         cout << lo;       } else {         cout << -1;       }     }   }
#include <bits/stdc++.h>   using namespace std;   template <typename... Args>   void trace(Args... args) {}   template <typename... Args>   void recInit(Args... args) {}   template <typename... Args>   void recEnd(Args... args) {}   struct node {     long long sum, lp, rp, L, R, sz;   } tree[4 * 200020], np;   node merge(node l, node r) {     node id;     id.sz = l.sz + r.sz;     id.L = l.L;     id.R = r.R;     if (l.lp == l.sz) {       id.lp = l.sz + (l.R <= r.L) * r.lp;     } else {       id.lp = l.lp;     }     if (r.rp == r.sz) {       id.rp = r.sz + (l.R <= r.L) * l.rp;     } else {       id.rp = r.rp;     }     id.sum = l.sum + r.sum;     if (l.R <= r.L) {       id.sum += l.rp * r.lp;     }     return id;   }   void build(int id, int l, int r, long long* a) {     if (l == r) {       tree[id] = node({1, 1, 1, a[l], a[l], 1});       return;     }     int m = (l + r) / 2;     build(id * 2, l, m, a);     build(id * 2 + 1, m + 1, r, a);     tree[id] = merge(tree[id * 2], tree[id * 2 + 1]);   }   void update(int id, int l, int r, int x, long long y) {     if (r < x || x < l) return;     if (l == r) {       tree[id] = node({1, 1, 1, y, y, 1});       return;     }     int m = (l + r) / 2;     update(id * 2, l, m, x, y);     update(id * 2 + 1, m + 1, r, x, y);     tree[id] = merge(tree[id * 2], tree[id * 2 + 1]);   }   node query(int id, int l, int r, int lq, int rq) {     if (lq > rq || r < lq || rq < l) return np;     if (lq <= l && r <= rq) return tree[id];     int m = (l + r) / 2;     return merge(query(id * 2, l, m, lq, rq),                  query(id * 2 + 1, m + 1, r, lq, rq));   }   long long t = 1, n, q, ans, a[200020];   int main() {     np = node({0, 0, 0, -10000000000LL, 10000000000LL, 0});   st:     ans = 0;     scanf( %lld %lld , &n, &q);     for (int i = 1; i <= n; i++) {       scanf( %lld , &a[i]);     }     build(1, 1, n, a);     while (q--) {       long long t, x, y;       scanf( %lld %lld %lld , &t, &x, &y);       if (t == 1) {         a[x] = y;         update(1, 1, n, x, y);       } else if (t == 2) {         printf( %lld n , query(1, 1, n, x, y).sum);       } else         assert(false);     }     if (--t) goto st;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <typename T>   inline void read(T &x) {     int f = 0, c = getchar();     x = 0;     while (!isdigit(c)) f |= c == 45, c = getchar();     while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();     if (f) x = -x;   }   template <typename T, typename... Args>   inline void read(T &x, Args &...args) {     read(x);     read(args...);   }   const int maxn = 2e5 + 50;   int fa[maxn], bj[maxn], n, m, ans;   struct node {     int x, y, z;   } e[maxn];   bool cmp(node a, node b) { return a.z > b.z; }   inline int find(int x) {     if (fa[x] == x) return x;     return fa[x] = find(fa[x]);   }   signed main() {     read(n, m);     for (int i = 1; i <= n; i++) fa[i] = i;     for (int i = 1; i <= m; i++) read(e[i].x, e[i].y, e[i].z);     stable_sort(e + 1, e + 1 + m, cmp);     for (int i = 1; i <= m; i++) {       int f1 = find(e[i].x), f2 = find(e[i].y);       if (f1 == f2) {         if (bj[f1] == 0)           bj[f1] = 1, ans += e[i].z;         else           continue;       } else {         if (bj[f1] + bj[f2] == 0) fa[f1] = f2, ans += e[i].z;         if (bj[f1] == 1 && bj[f2] == 0) fa[f2] = f1, ans += e[i].z;         if (bj[f1] == 0 && bj[f2] == 1) fa[f1] = f2, ans += e[i].z;       }     }     cout << ans;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   char mat[55][55];   int n;   int A[] = {-1, 0, 1, 0};   int B[] = {0, 1, 0, -1};   vector<pair<int, int> > ilha1, ilha2;   void flood_fill(int i, int j, bool prima) {     if (i < 0 or j < 0 or i >= n or j >= n or mat[i][j] !=  0 ) return;     mat[i][j] =  1 ;     if (prima)       ilha1.push_back({i, j});     else       ilha2.push_back({i, j});     for (int k = 0; k < 4; k++) {       flood_fill(i + A[k], j + B[k], prima);     }   }   int main() {     pair<int, int> p1, p2;     scanf( %d , &n);     scanf( %d%d%d%d , &p1.first, &p1.second, &p2.first, &p2.second);     p1.first--;     p1.second--;     p2.first--;     p2.second--;     for (int i = 0; i < n; i++) {       for (int j = 0; j < n; j++) {         scanf(  %c , &mat[i][j]);       }     }     flood_fill(p1.first, p1.second, true);     if (mat[p2.first][p2.second] ==  1 ) {       puts( 0 );       return 0;     }     flood_fill(p2.first, p2.second, false);     int ans = INT_MAX;     for (int i = 0; i < (int)ilha1.size(); i++) {       for (int j = 0; j < (int)ilha2.size(); j++) {         int a = abs(ilha1[i].first - ilha2[j].first);         int b = abs(ilha1[i].second - ilha2[j].second);         ans = min(ans, a * a + b * b);       }     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   inline void PAUSE() {     char tmp;     cin >> tmp;   }   char s[102];   int main() {     int n, k;     int f = 0;     scanf( %d %d , &n, &k);     if (n == k) f = 1;     cin >> s;     if (n >= 2 * k)       for (int i = k - 1; i >= 1; i--) {         cout <<  LEFT  << endl;       }     else       for (int i = k + 1; i <= n; i++) {         cout <<  RIGHT  << endl;         f = 1;       }     if (f == 0)       for (int i = 1; i <= n; i++) {         cout <<  PRINT   << s[i - 1] << endl;         if (i != n) cout <<  RIGHT  << endl;       }     else       for (int i = n; i >= 1; i--) {         cout <<  PRINT   << s[i - 1] << endl;         if (i != 1) cout <<  LEFT  << endl;       }     PAUSE();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   inline int read() {     int x = 0, f = 1, c = getchar();     while (c < 48) c ==  -  && (f = -1), c = getchar();     while (c > 47) x = x * 10 + c -  0 , c = getchar();     return x * f;   }   const int MAXN = 100005;   std::vector<long long> adj;   long long n, ans;   inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }   inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }   int main(int argc, char const *argv[]) {     n = read();     for (int i = 1; i <= n; ++i) adj.push_back(read());     sort(adj.rbegin(), adj.rend());     long long mx[5] = {1, *adj.begin(), 1, 1, 1};     ans = 0;     if (adj.size() > 1) mx[2] = adj[1];     if (adj.size() > 2) mx[3] = adj[2];     for (long long i : adj)       if (i % 2 != mx[1] % 2) mx[4] = max(mx[4], i);     for (int i = 1; i <= 4; ++i)       for (long long x : adj) ans = max(ans, lcm(mx[i], x));     printf( %lld n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2E5 + 10;   long long jc[15];   int main() {     jc[0] = 1;     for (int i = 1; i <= 14; ++i) jc[i] = jc[i - 1] * i;     int n, m;     cin >> n >> m;     int z = max(n - 13, 1);     long long ad = 0, p = jc[n - z + 1];     while (m--) {       int k;       cin >> k;       if (k == 1) {         int l, r;         cin >> l >> r;         if (r < z)           cout << (l + r) * 1ll * (r - l + 1) / 2 << endl;         else {           long long ans = (z - 1) * (r - max(l, z) + 1), da = ad;           if (l < z) ans += (l + z - 1) * 1ll * (z - l) / 2;           bool b[15] = {0};           for (int i = z; i <= r; ++i) {             long long t = da / jc[n - i];             int j = 1;             da -= t * jc[n - i];             for (; t || b[j]; ++j)               if (!b[j]) --t;             b[j] = 1;             if (i >= l) ans += j;           }           cout << ans << endl;         }       } else {         int t;         cin >> t;         ad = (ad + t) % p;       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long Q;   long long sum[105];   multiset<long long> s;   int main() {     cin.tie(0);     ios_base::sync_with_stdio(0);     cin >> Q;     while (Q--) {       char op;       long long f;       cin >> op >> f;       if (op ==  + ) {         long long i = 0;         while ((1 << (i + 1)) <= f) i++;         sum[i] += f;         s.insert(f);       } else {         long long i = 0;         while ((1 << (i + 1)) <= f) i++;         sum[i] -= f;         s.erase(s.find(f));       }       long long t = s.size();       long long k = 0;       long long ant = 0;       for (long long i = 0; i <= 30; i++) {         ant += sum[i];         auto it = s.lower_bound((1 << i));         if (it == s.end()) continue;         if ((1 << (i + 1)) <= *it) continue;         if (*it > 2 * (ant - sum[i])) k++;       }       cout << t - k <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int b[205];   int a[205];   int main() {     int n, m, k;     int x;     scanf( %d%d%d , &n, &m, &k);     for (int i = 1; i <= k; i++) {       scanf( %d , &x);       a[i] = x;     }     int sum = 0;     int mm = m;     while (n--) {       mm = m;       while (mm--) {         scanf( %d , &x);         int sb;         for (int j = 1; j <= k; j++) {           if (x == a[j]) {             sb = j;           }         }         sum += sb;         b[1] = a[sb];         int count = 2;         for (int j = 1; j <= k; j++) {           if (j != sb) {             b[count++] = a[j];           }         }         for (int j = 1; j <= k; j++) {           a[j] = b[j];         }       }     }     cout << sum << endl;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     char dir;     cin >> dir;     string m;     cin >> m;     string kboard =  qwertyuiopasdfghjkl;zxcvbnm,./ ;     if (dir ==  R ) {       for (int i = 0; i < m.length(); i++) {         int index = kboard.find(m[i]);         cout << kboard[index - 1];       }       cout << endl;     } else {       for (int i = 0; i < m.length(); i++) {         int index = kboard.find(m[i]);         cout << kboard[index + 1];       }       cout << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int mod = 998244353;   const int N = 1e5 + 5;   vector<int> g[N];   vector<pair<int, int> > ans;   int maxx;   void dfs(int x, int fa, int t) {     int siz = g[x].size();     int tmp = t;     ans.push_back(make_pair(x, t));     for (int i = 0; i <= siz - 1; i++) {       int v = g[x][i];       if (v == fa) continue;       if (t == maxx) t = maxx - siz, ans.push_back(make_pair(x, t));       dfs(v, x, ++t);       ans.push_back(make_pair(x, t));     }     if (t >= tmp && x - 1) ans.push_back(make_pair(x, tmp - 1));   }   int main() {     int n, x, y;     scanf( %d , &n);     for (int i = 1; i <= n - 1; i++) {       scanf( %d%d , &x, &y);       g[x].push_back(y);       g[y].push_back(x);     }     for (int i = 1; i <= n; i++) maxx = max(maxx, (int)g[i].size());     dfs(1, 1, 0);     int num = (int)ans.size();     printf( %d n , num);     for (int i = 0; i <= num - 1; i++) {       printf( %d %d n , ans[i].first, ans[i].second);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <class T>   inline void chkmax(T &x, T y) {     if (x < y) x = y;   }   template <class T>   inline void chkmin(T &x, T y) {     if (x > y) x = y;   }   int q, n, f, inv[100100], fac[100100], p[6];   void Euclid(int a, int b, int &x, int &y) {     if (!a)       x = 0, y = 1;     else {       int q = b / a, r = b % a;       Euclid(r, a, y, x);       x -= q * y;     }   }   int cal(int n, int m) {     if (m > n) return 0;     return 1ll * fac[n - 1] * inv[m - 1] % 1000000007 * inv[n - m] % 1000000007;   }   int main() {     fac[0] = 1;     for (int i = 1; i < 100100; i++) fac[i] = 1ll * fac[i - 1] * i % 1000000007;     int x, y;     Euclid(fac[100100 - 1], 1000000007, x, y);     inv[100100 - 1] = x;     for (int i = 100100 - 1; i > 0; i--)       inv[i - 1] = 1ll * inv[i] * i % 1000000007;     scanf( %d , &q);     while (q--) {       scanf( %d %d , &n, &f);       x = 0, y = n;       for (int i = 2; i <= sqrt(y); i++) {         if (y % i) continue;         p[x++] = i;         while (y % i == 0) y /= i;       }       if (y > 1) p[x++] = y;       y = 0;       for (int i = 0; i < (1 << x); i++) {         int tmp = n, cnt = 0;         for (int j = 0; j < x; j++)           if (i & (1 << j)) cnt++, tmp /= p[j];         if (cnt & 1)           y = (y - cal(tmp, f) + 1000000007) % 1000000007;         else           y = (y + cal(tmp, f)) % 1000000007;       }       printf( %d n , y);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios::sync_with_stdio(false);     int n;     cin >> n;     set<int> v;     int a;     for (int i = 0; i < n; ++i) {       cin >> a;       v.insert(a);     }     v.erase(0);     cout << v.size();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long rr[] = {0, 1, 1, 1, 0, -1, -1, -1};   long long cc[] = {1, 1, 0, -1, -1, -1, 0, 1};   const long long mod = 1e9 + 7;   const long long N = 300050;   long long m, fact[N];   void pre() {     fact[0] = 1;     for (long long i = 1; i < N; i++) {       fact[i] = (fact[i - 1] * i) % m;     }   }   signed main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     ;     long long test = 1;     while (test--) {       long long n;       cin >> n >> m;       pre();       long long ans = 0;       for (long long i = 1; i <= n; i++) {         long long x = fact[n - i + 1] * (n - i + 1) % m;         x = (x * fact[i]) % m;         ans = (ans + x) % m;       }       cout << ans <<   n ;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int tab[300000];   vector<int> numbers;   int main() {     int n;     cin >> n;     numbers.resize(n + 10);     vector<int> unused;     for (int i = 1; i <= n; i++) {       cin >> numbers[i];       if (numbers[i] > n || numbers[i] < 1) {         unused.push_back(i);       } else if (tab[numbers[i]] == 0) {         tab[numbers[i]] = i;       } else {         unused.push_back(i);       }     }     for (int i = 1; i <= n; i++) {       if (tab[i] == 0) {         tab[i] = unused.back();         unused.pop_back();       }     }     for (int i = 1; i <= n; i++) {       numbers[tab[i]] = i;     }     for (int i = 1; i <= n; i++) {       cout << numbers[i] <<    ;     }   }