malteklaes/cpp-code-code_search_net-style huggingface dataset:
#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, cnt = 0;       cin >> n;       string s[n];       long long int h1[10] = {}, h2[10] = {};       for (int i = 0; i < n; i++) {         cin >> s[i];         h1[s[i][3] -  0 ]++;       }       for (int i = 0; i < n - 1; i++) {         for (int j = i + 1; j < n; j++) {           if (s[i].compare(s[j]) == 0) {             int k;             cnt++;             for (k = 0; k < 10; k++) {               if (h1[k] == 0) {                 break;               }             }             h1[s[i][3] -  0 ]--;             h1[k]++;             s[i][3] = k +  0 ;           }         }       }       cout << cnt << endl;       for (int i = 0; i < n; i++) {         cout << s[i] << endl;       }     }     return 0;   }
#include<cstdio>   #include<iostream>   #include<cmath>   #include<cstring>   #include<vector>   #include<algorithm>   #define fs(i,x,y) for(int i=(x),_=(y);i<=_;++i)   #define fn(i,x,y) for(int i=(x),_=(y);i>=_;--i)   #define tor(i,v,x) for(int i=head[x],v=to[i];i;i=nxt[i],v=to[i])   #define Li inline   #define R register int   #define ls(x) ch[x][0]   #define rs(x) ch[x][1]   #define mpi(x,y) make_pair(x,y)   #define pi pair<int,int>   //#define int ll    using namespace std;   typedef long long ll;   template<typename T>   void read(T &x){    x=0;char ch=getchar();bool f=0;    while(ch< 0 ||ch> 9 ){     if(ch== - )f=1;     ch=getchar();    }    while(ch>= 0 &&ch<= 9 )x=(x<<1)+(x<<3)+ch- 0 ,ch=getchar();    x=f?-x:x;   }      const int N=3005;   const int inf=1e9+7;   int n,m;   int dp[N][N];   int a[N];      signed main(){    int T;read(T);while(T--){     read(n);fs(i,1,n)read(a[i]);     fs(i,2,n){      int cnt=0;      fs(j,2,n)dp[i][j]=inf;      fn(j,i-1,1){       if(j+a[j]<i)continue;       dp[i][j+a[j]]=min(dp[i][j+a[j]],dp[j][i-1]+cnt);++cnt;      }      fs(j,i+1,n)dp[i][j]=min(dp[i][j],dp[i][j-1]);     }     printf( %d n ,dp[n][n]);    }    return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 6e4;   long long vis[N];   long long ans[N];   vector<long long> adj[N];   void dfs(long long i, long long pa) {     if (vis[i] == 1)       return;     else {       vis[i] = 1;       ans[i] = pa;       for (vector<long long>::iterator itr = adj[i].begin(); itr != adj[i].end();            itr++) {         if (vis[*itr] != 1) dfs(*itr, i);       }     }   }   int main() {     long long n, r1, r2;     cin >> n >> r1 >> r2;     long long arr[n + 1];     adj[0].push_back(9999);     for (long long i = 1; i <= n; i++) {       long long x;       if (i == r1) {         arr[i] = -1;       } else {         cin >> x;         arr[i] = x;         adj[i].push_back(x);         adj[x].push_back(i);       }     }     dfs(r2, -1);     ans[r2] = -1;     for (long long j = 1; j <= n; j++) {       if (ans[j] != -1) cout << ans[j] <<    ;     }   }
#include <bits/stdc++.h>   using namespace std;   struct Node {     int a, b, id;   } p[100005];   bool mark[100005];   bool cmp1(const Node &p1, const Node &p2) {     if (p1.b != p2.b)       return p1.b > p2.b;     else       return p1.a < p2.a;   }   bool cmp2(const Node &p1, const Node &p2) {     if (p1.a != p2.a)       return p1.a > p2.a;     else       return p1.b > p2.b;   }   int main() {     int n, p1, k;     cin >> n >> p1 >> k;     for (int i = 0; i < n; i++) {       scanf( %d%d , &p[i].a, &p[i].b);       p[i].id = i + 1;     }     sort(p, p + n, cmp1);     sort(p, p + n - p1 + k, cmp2);     for (int i = 0; i < k; i++) mark[p[i].id] = true;     sort(p, p + n - p1 + k, cmp1);     p1 -= k;     for (int i = 0; i < n; i++) {       if (k && mark[p[i].id])         --k;       else if (!k && p1) {         mark[p[i].id] = true;         --p1;       }     }     for (int i = 1; i <= n; i++)       if (mark[i]) printf( %d  , i);     printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   void __print(int x) { cerr << x; }   void __print(long x) { cerr << x; }   void __print(long long x) { cerr << x; }   void __print(float x) { cerr << x; }   void __print(double x) { cerr << x; }   void __print(long double x) { cerr << x; }   void __print(char x) { cerr <<      << x <<     ; }   void __print(const char *x) { cerr <<     << x <<    ; }   void __print(const string &x) { cerr <<     << x <<    ; }   void __print(bool x) { cerr << (x ?  true  :  false ); }   template <typename T, typename V>   void __print(const pair<T, V> &x) {     cerr <<  { ;     __print(x.first);     cerr <<  , ;     __print(x.second);     cerr <<  } ;   }   template <typename T>   void __print(const T &x) {     int f = 0;     cerr <<  { ;     for (auto &i : x) cerr << (f++ ?  ,  :   ), __print(i);     cerr <<  } ;   }   void _print() { cerr <<  ] n ; }   template <typename T, typename... V>   void _print(T t, V... v) {     __print(t);     if (sizeof...(v)) cerr <<  ,  ;     _print(v...);   }   const long long inf = 9223372036854775807;   const long long mod = 1000000007;   const double pi = acos(-1);   long long n = 0;   long long m = 0;   long long k = 0;   long long check(long long value) {     long long ans = 0;     for (int i = 1; i < n + 1; i++) {       ans += min((value) / i, m);     }     return ans;   }   bool ifExist(long long val) {     for (int i = 1; i < n + 1; i++) {       if (val % i == 0 && val / i >= 1 && val / i <= m) {         return true;       }     }     return false;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(0);     cin >> n >> m >> k;     long long l = 1, r = n * m;     long long mid = 1;     while (l < r) {       mid = (r + l) / 2;       long long val = check(mid);       if (val >= k) {         r = mid;       } else {         l = mid + 1;       }     }     cout << l;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long int expo(long long int base, long long int exponent,                      long long int mod) {     long long int ans = 1;     while (exponent != 0) {       if (exponent & 1) ans = (1LL * ans * base) % mod;       base = (1LL * base * base) % mod;       exponent >>= 1;     }     return ans % mod;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     int TESTS = 1;     while (TESTS--) {       long long int x, n;       cin >> x >> n;       long long int sx = sqrt(x) + 10;       map<long long int, long long int> ma;       for (long long int i = 2; i <= sx; i++) {         while (x % i == 0) {           x = x / i;           ma[i]++;         }       }       if (x != 1) ma[x]++;       vector<long long int> v;       for (auto i : ma) v.push_back(i.first);       long long int ans = 1;       for (auto i : v) {         long long int p = i;         long long int e = 0;         long long int nn = n;         for (long long int j = 1; true; j++) {           e += nn / p;           e = e % (1000000007 - 1);           nn = nn / p;           if (nn == 0) break;         }         long long int tmp = expo(i, e % (1000000007 - 1), 1000000007);         ans = (ans * tmp) % 1000000007;       }       cout << ans;     }     return 0;   }
// Problem: C. Minimum Ties   // Contest: Codeforces - Educational Codeforces Round 104 (Rated for Div. 2)   // URL: https://codeforces.com/contest/1487/problem/C   // Memory Limit: 256 MB   // Time Limit: 1000 ms   //    // Powered by CP Editor (https://cpeditor.org)      //Weakness disgust me   #include bits/stdc++.h                      #define fill(a)  memset(a, 0, sizeof (a))   #define fast ios_base::sync_with_stdio(false); cin.tie(NULL);   #define rep(i,n) for(int i=0;i<n;i++)   typedef long long ll;   #define int ll   const ll MOD = 1e9 + 7;   using namespace std;   void solve()   {      ll n;    cin>>n;    ll res[n][n];    memset(res,0,sizeof(res));        for(int i=1;i<=((n-1)/2);i++)    {     for(int j=0;j<n;j++)     {      res[(j+i)%n][j]=-1;      res[j][(j+i)%n]=1;     }    }        for(int i=0;i<n;i++)    {     for(int j=i+1;j<n;j++)     {      cout<<res[i][j]<<   ;     }         }           }   signed main()   {        fast;       int t=1;       cin>>t;       while( t-- )       {             solve();           cout<<  n ;       }         }
#include <bits/stdc++.h>   using namespace std;   const long long MOD = 1e9 + 7;   const double err = 1e-12;   const double PI = 3.141592653589793;   const int N = 2e5 + 5;   int n;   vector<int> V;   bool chk(int val) {     auto it = upper_bound((V).begin(), (V).end(), val);     for (; it != V.end(); it++) {       int aj = *it, ai = *it + val;       while (ai <= V.back()) {         auto tmp = lower_bound((V).begin(), (V).end(), ai);         if (tmp != V.end() && (*tmp) % aj >= val) return true;         ai += aj;       }     }     return false;   }   void solve() {     cin >> n;     V = vector<int>(n);     for (int i = 0; i < n; i++) cin >> V[i];     sort((V).begin(), (V).end());     V.erase(unique((V).begin(), (V).end()), V.end());     int l = 1, r = 1e6, ans = 0;     while (l <= r) {       int m = (l + r) / 2;       if (chk(m)) {         ans = m;         l = m + 1;       } else         r = m - 1;     }     cout << ans <<   n ;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int t = 1;     while (t--) solve();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m;   int main() {     scanf( %d%d , &n, &m);     long long dp[m + 2];     int now = 0;     int c, sum = 0;     for (int i = 0; i < m; i++) {       scanf( %d , &c);       sum += c;       dp[i] = sum;     }     dp[0] = -2147483647;     long long ans = -2147483647;     long long mm[m + 2];     for (int i = m - 1; i >= 0; i--) {       if (i == m - 1)         mm[i] = dp[i];       else         mm[i] = max(dp[i], mm[i + 1]);     }     for (int i = 1; i < n; i++) {       sum = 0;       now = 1 - now;       for (int j = 0; j < m; j++) {         scanf( %d , &c);         sum += c;         dp[j] = sum;       }       for (int j = 0; j < m; j++) {         if (i % 2 == 1) {           if (j < m - 1) {             dp[j] += mm[j + 1];           } else if (j == m - 1) {             dp[j] = -2147483647;           }         } else {           if (j == 0)             dp[j] = -2147483647;           else {             dp[j] += mm[j - 1];           }         }         if (i == n - 1) {           ans = max(ans, dp[j]);         }       }       if (i % 2 == 0) {         for (int j = m - 1; j >= 0; j--) {           if (j == m - 1)             mm[j] = dp[j];           else             mm[j] = max(dp[j], mm[j + 1]);         }       } else {         for (int j = 0; j < m; j++) {           if (j == 0)             mm[j] = dp[j];           else             mm[j] = max(dp[j], mm[j - 1]);         }       }     }     printf( %I64d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   void solve() {     int n;     cin >> n;     vector<int> v(n);     for (auto &first : v) cin >> first;     int z = 0;     for (auto first : v)       if (first == 0) z++;     if (z <= 1) {       cout <<  0 n ;       return;     }     vector<pair<int, int> > cnt(n, make_pair(0, 0));     int u = 0;     for (int i = 0; i < n; ++i) {       if (v[i] == 0)         u++;       else {         cnt[v[i] - 1].first = max(cnt[v[i] - 1].first, min(u, z / 2));       }       if (u > z - z / 2) {         break;       }     }     u = 0;     for (int i = 0; i < n; ++i) {       if (v[n - i - 1] == 0)         u++;       else {         cnt[v[n - i - 1] - 1].second =             max(cnt[v[n - i - 1] - 1].second, min(u, z / 2));       }       if (u > z - z / 2) {         break;       }     }     sort(cnt.begin(), cnt.end(), greater<pair<int, int> >());     int ans = 0;     multiset<int> rb;     int ptr = 0;     for (int i = z / 2; i > 0; i--) {       while (ptr < cnt.size() && cnt[ptr].first == i) {         rb.insert(cnt[ptr].second);         ptr++;       }       if (rb.size()) {         rb.erase(rb.begin());         ans++;       }     }     while (ptr < cnt.size()) {       rb.insert(cnt[ptr].second);       ptr++;     }     for (int i = 1; i <= z / 2; ++i) {       while (rb.size()) {         auto it = rb.begin();         auto val = (*it);         if (val < i)           rb.erase(it);         else           break;       }       if (rb.size()) {         rb.erase(rb.begin());         ans++;       }     }     cout << min(ans, z / 2) <<   n ;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     int t;     cin >> t;     for (int i = 0; i < t; ++i) solve();   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n;     cin >> n;     long long int x;     x = n % 4;     if (n == 0)       cout <<  1 ;     else if (x == 0)       cout <<  6 ;     else if (x == 1)       cout <<  8 ;     else if (x == 2)       cout <<  4 ;     else if (x == 3)       cout <<  2 ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   vector<int> grav[2050];   int n;   int m, k;   int mark[2050];   bool bad[2050];   int sz[2050];   void dfs(int v, int color) {     mark[v] = color;     for (int i = 0; i < (int)grav[v].size(); i++) {       int u = grav[v][i];       if (mark[u] == 0) dfs(u, color);     }   }   int main() {     int u, v;     cin >> n;     cin >> m;     for (int i = 0; i < (int)(m); i++) {       cin >> u >> v;       --u;       --v;       grav[u].push_back(v);       grav[v].push_back(u);     }     int color = 1;     for (int i = 0; i < (int)(n); i++) {       if (mark[i] == 0) dfs(i, color++);       sz[mark[i]]++;     }     cin >> k;     for (int i = 0; i < (int)(k); i++) {       cin >> u >> v;       --u;       --v;       if (mark[u] == mark[v]) bad[mark[u]] = true;     }     int mx = 0;     for (int c = 1; c < color; ++c) {       if (!bad[c] && (mx == 0 || sz[c] > sz[mx])) mx = c;     }     cout << sz[mx] << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   void solve();   int arr[200005];   int count1[200005];   int count2[200005];   int main() {     int n;     cin >> n;     for (int i = 0; i < n; i++) {       cin >> arr[i];     }     long long sum1 = 0;     long long sum2 = 0;     int cnt1 = 0;     int cnt2 = 0;     int j = 0;     for (int i = n - 1; i >= 0; i--) {       if (arr[i] == 0) {         cnt1++;       }       count1[i] = cnt1;     }     for (int i = 0; i < n; i++) {       if (arr[i] == 1) {         cnt2++;       }       count2[i] = cnt2;     }     for (int i = 0; i < n; i++) {       if (arr[i] == 1) sum2 += count1[i];     }     for (int i = 0; i < n; i++) {       if (arr[i] == 0) sum1 += count2[i];     }     if (sum1 >= sum2)       cout << sum2 << endl;     else       cout << sum1 << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2000 * 2000 + 1;   int n, m, mark[N], mx, rep;   string s;   vector<int> adj[N];   bool circle(int v) {     mark[v] = 1;     for (int i = 0; i < adj[v].size(); i++) {       int u = adj[v][i];       if (mark[u] == 1 || (!mark[u] && circle(u))) return true;     }     mark[v] = 2;     return false;   }   int dfs(int v) {     int res = 1;     for (int i = 0; i < adj[v].size(); i++) {       int u = adj[v][i], t = dfs(u);       res = max(res, t + 1);       if (t > mx)         mx = t, rep = false;       else if (t == mx)         rep = true;     }     return res;   }   int main() {     ios_base::sync_with_stdio(false);     cin >> n >> m;     for (int i = 0; i < n; i++) {       string t;       cin >> t;       s += t;     }     n *= m;     for (int i = 0; i < n; i++)       if (s[i] ==  ^ )         adj[i - m].push_back(i);       else if (s[i] ==  < )         adj[i - 1].push_back(i);       else if (s[i] ==  > )         adj[i + 1].push_back(i);       else if (s[i] ==  v )         adj[i + m].push_back(i);     for (int i = 0; i < n; i++)       if (circle(i)) {         cout << -1 <<   n ;         return 0;       }     fill(mark, mark + n, 0);     for (int i = 0; i < n; i++)       if (s[i] ==  # ) dfs(i);     cout << max(0, 2 * mx - !rep) <<   n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 300005;   int a[maxn];   int n, m, ma, mi;   int sum[2000005], ans[2000005];   bool ok(int mid) {     int ans = 0, i;     for (i = mid; i <= ma; i += mid) {       ans += sum[i + m] - sum[i - 1];     }     if (ans == n) return true;     return false;   }   int main() {     int i, j;     scanf( %d %d , &n, &m);     ma = 1, mi = 1000006;     for (i = 0; i < n; i++) {       scanf( %d , &a[i]);       mi = min(mi, a[i]);       ma = max(ma, a[i]);       sum[a[i]]++;     }     if (m >= mi) {       printf( %d n , mi);       return 0;     }     for (i = 1; i <= ma + m; i++) {       sum[i] += sum[i - 1];     }     for (i = mi; i > m; i--) {       if (ok(i)) break;     }     printf( %d n , i);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int t;     cin >> t;     while (t--) {       int n;       cin >> n;       vector<int> arr(4 * n, 0);       for (int i = 0; i < 4 * n; i++) {         cin >> arr[i];       }       sort(arr.begin(), arr.end());       int f = 1, i = 0, j = 4 * n - 1, area = arr[i] * arr[j];       while (i < j) {         if ((arr[i + 1] != arr[i]) || (arr[j - 1] != arr[j]) ||             (arr[i] * arr[j] != area)) {           f = 0;           break;         }         i += 2;         j -= 2;       }       if (f) {         cout <<  YES n ;       } else {         cout <<  NO n ;       }     }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     long long int n, x, y, i;     cin >> n >> x >> y;     for (i = 1; (i + n - 1) <= y; i++) {       if (((i * i) + (n - 1)) >= x) {         cout << i << endl;         n--;         while (n--) cout << 1 << endl;         return 0;       }     }     cout <<  -1  << endl;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, dd, q;     cin >> n >> dd >> q;     int arr[200001];     for (int i = 0; i < 200001; i++) {       arr[i] = 0;     }     for (int h = 0; h < n; h++) {       int t1, t2;       cin >> t1 >> t2;       arr[t1]++;       arr[t2 + 1]--;     }     int count = 0;     for (int k = 0; k < 200001; k++) {       count += arr[k];       arr[k] = count;     }     count = 0;     int ans[200001];     for (int k = 0; k <= 200000; k++) {       if (arr[k] >= dd) {         count++;       }       ans[k] = count;     }     for (int kk = 0; kk < q; kk++) {       int r1, r2;       cin >> r1 >> r2;       cout << ans[r2] - ans[r1 - 1] << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {       int t;       cin >> t;       while(t--){           int n;           cin >> n;           vector<int> arr(n,0);           for(int i = 0; i < n; i++){               cin >> arr[i];           }           vector<int> str;           str.push_back(arr[0]);           cout << str[0] << endl;           for(int i = 1; i < n; i++){               vector<int> temp;               if(arr[i] == 1){                   for(int i = 0; i < str.size(); i++){                       temp.push_back(str[i]);                   }                   // temp = str;                   temp.push_back(1);               }               else{                   for(int j = str.size() - 1; j >= 0; j--){                       if(str[j] == arr[i] - 1){                           for(int k = 0; k < j; k++){                               temp.push_back(str[k]);                           }                           temp.push_back(arr[i]);                           break;                       }                   }               }               str = {};               for(int i = 0; i < temp.size(); i++){                   str.push_back(temp[i]);               }               for(int i = 0; i < str.size(); i++){                   cout << str[i];                   if(i != str.size() - 1)                       cout <<  . ;               }               cout << endl;           }       }   }
#include <bits/stdc++.h>   using namespace std;   int a;   char c[100009];   unsigned int dp[200009] = {1};   int main() {     scanf( %d%s , &a, c);     for (int i = a; i >= 1; i--) {       c[i] = c[i - 1];     }     if (a & 1) {       cout << 0;     } else {       int e = a >> 1;       int q = 0;       for (int i = 1; i <= a; i++) {         if (c[i] ==  ? ) {           for (int j = (i >> 1); j >= i - e && j > 0; j--) {             dp[j] += dp[j - 1];           }         } else {           q++;         }       }       unsigned int ans = dp[e];       for (int i = 1; i <= e - q; i++) {         ans *= 25;       }       cout << ans;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     while (scanf( %d , &n) == 1) {       int ara[n + 4], diftab[n + 4];       ara[0] = 0;       for (int i = 1; i <= n; i++) {         scanf( %d , &ara[i]);         diftab[i - 1] = ara[i] - ara[i - 1];       }       int ansara[n + 1], index = 0;       for (int i = 1; i <= n; i++) {         bool paisi = true;         for (int j = 0; j < n; j++) {           if (diftab[j] != diftab[j % i]) {             paisi = false;             break;           }         }         if (paisi) ansara[index++] = i;       }       printf( %d n , index);       for (int i = 0; index > i; i++) printf( %d  , ansara[i]);       printf(  n );     }   }
#include <bits/stdc++.h>   using namespace std;   map<int, int> uf;   map<int, vector<int> > contents;   map<int, int> val;   void make(int a) {     if (uf.find(a) == uf.end()) {       uf[a] = a;       contents[a].push_back(a);       val[a] = 0;     }   }   int main() {     cin.sync_with_stdio(0);     cin.tie(0);     int q;     cin >> q;     int last = 0;     for (int i = 0; i < q; i++) {       int t;       cin >> t;       if (t == 1) {         int l, r, x;         cin >> l >> r >> x;         l ^= last;         r ^= last;         x ^= last;         if (l > r) swap(l, r);         r++;         make(l);         make(r);         if (uf[l] == uf[r]) continue;         int v = val[l] ^ val[r] ^ x;         l = uf[l];         r = uf[r];         if (contents[l].size() > contents[r].size()) {           swap(l, r);         }         for (int a : contents[l]) {           uf[a] = r;           val[a] ^= v;           contents[r].push_back(a);         }         contents.erase(l);       } else {         int l, r;         cin >> l >> r;         l ^= last;         r ^= last;         if (l > r) swap(l, r);         r++;         make(l);         make(r);         if (uf[l] != uf[r]) {           cout << -1 <<   n ;           last = 1;         } else {           cout << (val[l] ^ val[r]) <<   n ;           last = val[l] ^ val[r];         }       }     }   }
#include <bits/stdc++.h>   using namespace std;   using ll = long long;   int main() {     int t;     cin >> t;     while (t--) {       string s;       cin >> s;       vector<int> counts;       int current_count = 0;       for (char c : s) {         if (c ==  1 ) {           current_count += 1;         } else if (current_count != 0) {           counts.emplace_back(current_count);           current_count = 0;         }       }       if (current_count != 0) {         counts.emplace_back(current_count);       }       sort(counts.begin(), counts.end());       int n = counts.size();       int score = 0;       for (int i = 1 - (n % 2); i < n; i += 2) {         score += counts[i];       }       cout << score <<   n ;     }     return 0;   }