malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int Scan();   int n, m, w, num;   double aver, cur[105];   vector<pair<int, double> > res[105];   double place(double V, int i) {     double D = aver - cur[num];     double L = min(D, V);     res[num].push_back(make_pair(i, L));     cur[num] += L;     if (fabs(cur[num] - aver) <= 1e-6) num++;     return fabs(V - L);   }   int main() {     scanf( %d%d%d , &n, &w, &m);     aver = (double)w * n / m;     num = 1;     memset(cur, 0, sizeof cur);     for (int i = 1; i <= n; ++i) {       double now = place(w, i);       if (now > 1e-6) now = place(now, i);     }     if (num != m + 1)       puts( NO );     else {       puts( YES );       for (int i = 1; i <= m; ++i) {         for (int j = 0; j < res[i].size(); ++j) {           printf( %d %.6lf , res[i][j].first, res[i][j].second);           j == res[i].size() - 1 ? puts(  ) : putchar(   );         }       }     }   }   int Scan() {     int res = 0, ch, flag = 0;     if ((ch = getchar()) ==  - )       flag = 1;     else if (ch >=  0  && ch <=  9 )       res = ch -  0 ;     while ((ch = getchar()) >=  0  && ch <=  9 ) res = res * 10 + ch -  0 ;     return flag ? -res : res;   }
#include <bits/stdc++.h>   using namespace std;   void solve() {     long long int n, m;     cin >> n;     long long int ans = ((n % 10) - 1) * 10;     m = 1;     while (n > 0) {       ans += (m);       m++;       n /= 10;     }     cout << ans <<   n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     long long int t;     cin >> t;     while (t--) {       solve();     }   }
#include <bits/stdc++.h>   using namespace std;   struct sans {     long long int t1;     long long int b1;   };   bool func(sans s1, sans s2) { return s1.t1 < s2.t1; }   long long int qw[2 * 100000 + 1];   pair<long long int, long long int> s1[2 * 100000 + 1];   int main() {     long long int t, n, i, j;     string s1, s2;     cin >> t;     while (t--) {       cin >> s1;       long long int flag = 0, flag1 = 0;       n = s1.length();       s2 =   ;       s2 = s2 + s1[0];       for (i = 1; i <= n - 1; i++) {         long long int j;         long long int flag = 0;         for (j = 0; j <= s2.length() - 1; j++) {           if (s1[i] == s2[j]) {             flag = 1;             break;           }         }         if (flag == 1) {           if (s1[i - 1] == s2[j + 1] || s1[i - 1] == s2[j - 1]) {             continue;           } else {             flag1 = 1;             cout <<  NO  << endl;             break;           }         } else {           long long int j;           for (j = 0; j <= s2.length() - 1; j++) {             if (s1[i - 1] == s2[j]) {               break;             }           }           if (j == 0) {             s2 = s1[i] + s2;           } else if (j == s2.length() - 1) {             s2 = s2 + s1[i];           } else {             flag1 = 1;             cout <<  NO  << endl;             break;           }         }       }       if (flag1 == 0) {         cout <<  YES  << endl;         long long int a1[27];         for (long long int i = 0; i <= 27; i++) a1[i] = 0;         ;         for (long long int j = 0; j < s2.length(); j++) {           a1[s2[j] -  a ] = 1;         }         for (long long int i = 0; i < 26; i++) {           if (a1[i] == 0) {             long long int qw = i +  a ;             char x = qw;             s2 = s2 + x;           }         }         cout << s2 << endl;       }     }   }
#include <bits/stdc++.h>      using namespace std;      #define int long long   #define double long double   #define FOR(i, n) for (signed i = 0; i < n; ++i)   #define ALL(x) x.begin(), x.end()   #define RALL(x) x.rbegin(), x.rend()   #define VI vector<int>   #define VII vector<VI>   #define PII pair<int, int>   #define PPII pair<int, PII>   #define make(type, x) type x; cin >> x   #define makev(x, n) VI x(n); FOR(I, n) cin >> x[I]   #define repeat(n) for(int J = n; J; --J)      #define M7 1000000007LL   #define M9 1000000009LL   #define MFFT 998244353LL   #define INF 2000000000000000000LL      void solveForSet() {       make(int, n);       map<int, VI> indices;       VI a;       for (int i = 0; i < n; ++i) {           make(int, t);           indices[t].push_back(i + 1);           a.push_back(t);       }       VI answers;       for (const auto &x: indices.rbegin()->second) {           answers.push_back(x);       }       sort(ALL(a));       VI pref(n + 1);       for (int i = 0; i < n; ++i) {           pref[i + 1] = pref[i] + a[i];       }       for (int i = n - 1; i > 0; --i) {           while (a[i - 1] == a[i])               --i;           if (i > 0 && pref[i] < a[i]) {               break;           }           for (const auto &x: indices[a[i - 1]]) {               answers.push_back(x);           }       }       sort(ALL(answers));       cout << answers.size() <<   n ;       for (const auto &x: answers) {           cout << x <<    ;       }       cout <<   n ;   }      void solve() {       make(int, t);       while (t--) {           solveForSet();       }   }      signed main(signed argc, char **argv) {       ios_base::sync_with_stdio(false);       cin.tie(nullptr);       if (argc > 1 && (string) argv[1] ==  local ) {           freopen( input.txt ,  r , stdin);           freopen( output.txt ,  w , stdout);           solve();           while (cin.peek() != EOF) {               if (isspace(cin.peek()))                   cin.get();               else {                   cout <<   n ;                   solve();               }           }       } else {           solve();       }   }
#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int n;     cin >> n;     vector<long long> a, b;     for (int i = 0; i < n; i++) {       long long temp;       cin >> temp;       long long p = sqrt(temp);       if (p * p == temp)         a.push_back(temp);       else         b.push_back(temp);     }     if (a.size() > b.size()) {       int rem = a.size() - n / 2;       for (int i = 0; i < a.size(); i++) {         if (a[i] == 0)           a[i] = 2;         else           a[i] = 1;       }       sort(a.begin(), a.end());       long long c = 0;       for (int i = 0; i < a.size(); i++) {         if (rem == 0) break;         c += a[i];         rem--;       }       cout << c <<   n ;     } else if (b.size() > a.size()) {       int rem = b.size() - n / 2;       for (int i = 0; i < b.size(); i++) {         long long p = sqrt(b[i]);         b[i] = min(abs(p * p - b[i]), abs((p + 1) * (p + 1) - b[i]));       }       sort(b.begin(), b.end());       long long c = 0;       for (int i = 0; i < b.size(); i++) {         if (rem == 0) break;         c += b[i];         rem--;       }       cout << c <<   n ;     } else       cout <<  0 n ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2000 + 10;   const double PI = acos(0.0) * 2;   const double eps = 1e-10;   const double STD = 0.999459;   const int dx[4][2] = {0, 1, 1, 0, 0, -1, -1, 0};   const double One = 0.8;   int n;   char s[N];   double a[N][N], b[N][N], coef[10][10];   bool vi[N][N];   pair<int, int> q[N * N];   template <class T>   T sqr(T x) {     return x * x;   }   void GausscianBlur() {     for (int i = (1); i <= (n); i++)       for (int j = (1); j <= (n); j++) {         b[i][j] = 0.0;         for (int i1 = (i - 3); i1 <= (i + 3); i1++)           if (i1 > 0 && i1 <= n)             for (int j1 = (j - 3); j1 <= (j + 3); j1++)               if (j1 > 0 && j1 <= n) {                 b[i][j] += a[i1][j1] * coef[abs(i - i1)][abs(j - j1)];               }       }     memcpy(a, b, sizeof b);   }   void OutputGraph() {     freopen( output.txt ,  w , stdout);     for (int i = (1); i <= (n); i++) {       for (int j = (1); j <= (n); j++)         if (a[i][j] > One)           printf( 1 );         else           printf( 0 );       cout << endl;     }   }   int CntCircle, CntSquare;   void solve(int x0, int y0) {     int head = 1, tail = 1, xmin = x0, xmax = x0, ymin = y0, ymax = y0;     q[1] = make_pair(x0, y0);     vi[x0][y0] = 1;     while (head <= tail) {       int x = q[head].first, y = q[head].second;       head++;       xmin = min(xmin, x);       xmax = max(xmax, x);       ymin = min(ymin, y);       ymax = max(ymax, y);       for (int d = (0); d <= (3); d++) {         int x1 = x + dx[d][0], y1 = y + dx[d][1];         if (x1 < 1 || y1 < 1 || x1 > n || y1 > n || vi[x1][y1] || a[x1][y1] < One)           continue;         q[++tail] = make_pair(x1, y1);         vi[x1][y1] = 1;       }     }     if (tail < 150) return;     double cx = (xmin + xmax) / 2.0, cy = (ymin + ymax) / 2.0, r = 0.0;     for (int i = (1); i <= (tail); i++)       r = max(r, sqrt(sqr(cx - q[i].first) + sqr(cy - q[i].second)));     double P = tail / r / r;     if (P < 2.5)       CntSquare++;     else       CntCircle++;   }   int main() {     for (int i = (0); i <= (9); i++)       for (int j = (0); j <= (9); j++)         coef[i][j] = exp(-0.5 * (sqr(i) + sqr(j))) / 2 / PI / STD;     cin >> n;     for (int i = (1); i <= (n); i++)       for (int j = (1); j <= (n); j++) {         char ch;         do {           ch = getchar();         } while (ch !=  0  && ch !=  1 );         a[i][j] = (ch ==  1 ) ? 1.0 : 0.0;       }     for (int _ = (1); _ <= (1); _++) GausscianBlur();     for (int i = (1); i <= (n); i++)       for (int j = (1); j <= (n); j++)         if (!vi[i][j] && a[i][j] > One - eps) solve(i, j);     cout << CntCircle <<     << CntSquare << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int a[55];   long long int C[55][55];   double dp[55][55][55];   void precompute(int N) {     for (int i = 0; i <= N; ++i) C[i][0] = 1;     for (int i = 1; i <= N; ++i)       for (int j = 1; j <= i; ++j) C[i][j] = C[i - 1][j] + C[i - 1][j - 1];   }   double func(int n, int m, int q) {     if (dp[n][m][q] >= 0.0) return dp[n][m][q];     dp[n][m][q] = 0;     for (int t = 0; t <= n; t++) {       dp[n][m][q] += (pow(1.0 / m, t) * pow(1.0 - 1.0 / m, n - t) * C[n][t] *                       func(n - t, m - 1, max(q, (t + (a[m] - 1)) / a[m])));     }     return dp[n][m][q];   }   int main() {     int j, k, i, n, m;     cin >> n >> m;     precompute(n);     for (i = 1; i <= m; i++) cin >> a[i];     for (int i = 0; i <= n; ++i)       for (int j = 0; j <= m; ++j)         for (int k = 0; k <= n; ++k) dp[i][j][k] = -1;     for (j = 0; j <= m; j++) {       for (k = 0; k <= n; k++) dp[0][j][k] = k;     }     for (i = 1; i <= n; i++)       for (k = 0; k <= n; k++) dp[i][0][k] = 0;     printf( %.15lf n , func(n, m, 0));   }
#include <bits/stdc++.h>   using namespace std;   int r1, c1, r2, c2;   int rook(int r1, int c1, int r2, int c2) {     if (r1 == r2 || c1 == c2) {       return 1;     } else {       return 2;     }   }   int bishop(int r1, int c1, int r2, int c2) {     if ((r1 + c1) % 2 == 0 && (r2 + c2) % 2 != 0) return 0;     if ((r1 + c1) % 2 != 0 && (r2 + c2) % 2 == 0) return 0;     if (abs(r1 - r2) == abs(c1 - c2))       return 1;     else       return 2;   }   int king(int r1, int c1, int r2, int c2) {     return (max(abs(r1 - r2), abs(c1 - c2)));   }   int main() {     ios::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     cin >> r1 >> c1 >> r2 >> c2;     cout << rook(r1, c1, r2, c2) <<    ;     cout << bishop(r1, c1, r2, c2) <<    ;     cout << king(r1, c1, r2, c2) <<    ;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 10;   const double eps = 1e-9;   const int inf = 1e9;   long long a[N];   long long dis[N];   int n, m;   vector<pair<int, long long> > adj[N];   void dij() {     set<pair<long long, int> > q;     for (int i = 1; i <= n; i++) {       dis[i] = a[i];       q.insert({dis[i], i});     }     while (q.size()) {       int u = q.begin()->second;       q.erase(q.begin());       for (auto i : adj[u]) {         long long ww = i.second;         int v = i.first;         if (dis[v] > dis[u] + ww) {           q.erase({dis[v], v});           dis[v] = dis[u] + ww;           q.insert({dis[v], v});         }       }     }   }   int main() {     scanf( %d%d , &n, &m);     for (int i = 0; i < m; i++) {       int u, v;       long long w;       scanf( %d%d%lld , &u, &v, &w);       w *= 2;       adj[u].push_back({v, w});       adj[v].push_back({u, w});     }     for (int i = 1; i <= n; i++) scanf( %lld , a + i);     dij();     for (int i = 1; i <= n; i++) printf( %lld  , dis[i]);   }
#include <bits/stdc++.h>   using namespace std;   int gcd(int a, int b) { return a ? gcd(b % a, a) : b; }   int main() {     string s;     cin >> s;     int a[26] = {0};     for (int i = 0; i < s.length(); i++) a[s[i] -  a ]++;     string ans = s;     for (int i = 0; i < s.length(); i++) ans[i] =  # ;     for (int i = 1; i < s.length(); i++) {       if (ans[i] !=  # ) continue;       int m = 0;       for (int j = 1; j < 26; j++)         if (a[j] > a[m]) m = j;       for (int j = 0; j < s.length(); j++)         if (ans[j] !=  #  && gcd(i + 1, j + 1) != 1) m = ans[j] -  a ;       for (int j = 0; j < s.length(); j++)         if (ans[j] ==  #  && gcd(i + 1, j + 1) != 1)           if (a[m] > 0) {             ans[j] = char(m +  a );             a[m]--;           } else {             cout <<  NO ;             return 0;           }     }     for (int j = 0; j < 26; j++)       if (a[j]) ans[0] = char(j +  a );     cout <<  YES n  + ans;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     string a, b;     cin >> a >> b;     int k = 0;     string star =  * ;     for (int i = 0; i < 12; i++) star = star + star;     a = star + a + star;     int res = 3000;     for (int i = 0; i < a.size(); i++) {       int u = 0;       for (int j = 0; j < b.size(); j++)         if (a[i + j] != b[j]) u++;       res = min(res, u);     }     cout << res << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m, a, b;   bool x[101];   bool y[101];   int main() {     scanf( %d%d , &n, &m);     memset(x, false, sizeof x);     memset(y, false, sizeof y);     scanf( %d , &b);     for (int i = 0; i < b; i++) {       scanf( %d , &a);       x[a] = 1;     }     scanf( %d , &b);     for (int i = 0; i < b; i++) {       scanf( %d , &a);       y[a] = 1;     }     for (int i = 0; i < n * m * 100; i++) {       a = i % n;       b = i % m;       x[a] |= y[b];       y[b] |= x[a];     }     for (int i = 0; i < n; i++)       if (!x[i]) {         puts( No );         return 0;       }     for (int i = 0; i < m; i++)       if (!y[i]) {         puts( No );         return 0;       }     puts( Yes );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   template <typename T>   void rd(T &t) {     t = 0;     int f = 1;     char p = getchar();     while (p < 48 || p > 57) {       if (p == 45) f = -1;       p = getchar();     }     do {       (t *= 10) += p - 48;       p = getchar();     } while (p > 47 && p < 58);     t *= f;   }   long long m;   int a[999], d[999], vis[999];   long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }   void dfs(int u) {     vis[u] = true;     ++m;     if (!vis[a[u]]) dfs(a[u]);   }   int main() {     int n, i;     long long ans = 1;     rd(n);     for (i = 1; i <= n; ++i) {       rd(a[i]);       ++d[a[i]];     }     for (i = 1; i <= n; ++i)       if (d[i] != 1) {         puts( -1 );         return 0;       }     for (i = 1; i <= n; ++i)       if (!vis[i]) {         m = 0;         dfs(i);         if (m % 2 == 0) m /= 2;         ans = ans / gcd(m, ans) * m;       }     printf( %lld n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAX_N = 48 + 10;   vector<int> adj[MAX_N];   vector<int> ziro;   bool mark[MAX_N];   int ans[MAX_N][3];   int poi = 0;   vector<int> dfs(int v) {     vector<int> ret;     ret.push_back(v);     mark[v] = 1;     for (auto i : adj[v])       if (!mark[i]) {         vector<int> vec = dfs(i);         while (vec.size()) {           ret.push_back(vec.back());           vec.pop_back();         }       }     return ret;   }   int main() {     int n, m;     cin >> n >> m;     for (int i = 0; i < m; i++) {       int a, b;       cin >> a >> b;       a--, b--;       adj[a].push_back(b);       adj[b].push_back(a);     }     for (int i = 0; i < n; i++)       if (adj[i].empty()) ziro.push_back(i);     for (int i = 0; i < n; i++)       if (!mark[i]) {         vector<int> vec = dfs(i);         if (vec.size() > 3) {           cout << -1;           return 0;         } else if (vec.size() == 3) {           for (int j = 0; j < 3; j++) ans[poi][j] = vec[j];           poi++;         } else if (vec.size() == 2) {           if (ziro.empty()) {             cout << -1;             return 0;           }           for (int j = 0; j < 2; j++) ans[poi][j] = vec[j];           ans[poi][2] = ziro.back();           ziro.pop_back();           poi++;         }       }     if (ziro.size() % 3 != 0) {       cout << -1;       return 0;     }     while (ziro.size()) {       for (int i = 0; i < 3; i++) {         ans[poi][i] = ziro.back();         ziro.pop_back();       }       poi++;     }     for (int i = 0; i < poi; i++) {       for (int j = 0; j < 3; j++) cout << ans[i][j] + 1 <<    ;       cout <<   n ;     }   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1000010;   int ro[maxn];   int up(int u) { return (ro[u] == u) ? u : ro[u] = up(ro[u]); }   int me[maxn];   vector<int> no[maxn];   vector<pair<int, int> > q;   int o[maxn];   queue<int> s[2];   int main() {     int n, m, t, k;     scanf( %d%d , &n, &m);     memset(o, 0, sizeof(o));     memset(me, 0, sizeof(me));     for (int x = 0; x < n * m; x++) {       no[x].clear();       scanf( %d , &me[x]);       ro[x] = x;     }     for (int x = 0; x < n; x++) {       q.clear();       for (int y = 0; y < m; y++) {         q.push_back(make_pair(me[x * m + y], y));       }       sort((q).begin(), (q).end());       for (int y = 1; y < m; y++)         if (q[y].first != q[y - 1].first) {           no[x * m + q[y - 1].second].push_back(x * m + q[y].second);           o[x * m + q[y].second]++;         } else {           ro[up(x * m + q[y - 1].second)] = up(x * m + q[y].second);         }     }     for (int x = 0; x < m; x++) {       q.clear();       for (int y = 0; y < n; y++) {         q.push_back(make_pair(me[y * m + x], y));       }       sort((q).begin(), (q).end());       for (int y = 1; y < n; y++)         if (q[y].first != q[y - 1].first) {           no[q[y - 1].second * m + x].push_back(q[y].second * m + x);           o[q[y].second * m + x]++;         } else {           ro[up(q[y - 1].second * m + x)] = up(q[y].second * m + x);         }     }     int tem;     int len;     for (int x = 0; x < n * m; x++)       if (x != up(x)) {         tem = o[x];         o[up(x)] += tem;         o[x] -= tem;         len = no[x].size();         for (int y = 0; y < len; y++) no[up(x)].push_back(up(no[x][y]));         vector<int>().swap(no[x]);       } else {         len = no[x].size();         for (int y = 0; y < len; y++) no[x][y] = up(no[x][y]);       }     while (!s[0].empty()) s[0].pop();     while (!s[1].empty()) s[1].pop();     for (int x = 0; x < n * m; x++)       if (x == ro[x] && o[x] == 0) {         s[0].push(x);       }     t = 0;     int f = 0;     memset(me, 0, sizeof(me));     while (!s[f].empty()) {       t++;       while (!s[f].empty()) {         k = s[f].front();         s[f].pop();         me[k] = t;         len = no[k].size();         for (int x = 0; x < len; x++) {           o[no[k][x]]--;           if (o[no[k][x]] == 0) s[f ^ 1].push(no[k][x]);         }       }       f ^= 1;     }     for (int x = 0; x < n; x++) {       for (int y = 0; y < m; y++) printf( %d  , me[up(x * m + y)]);       putchar(  n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long n, x, y, m, ans, f[5000], q[5000];   pair<int, int> t[200000];   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cin >> n;     cout << n <<    ;     for (int i = 1; i < n; i++) {       cout << i <<    ;     }   }
#include <bits/stdc++.h>   using namespace std;   inline int read() {     int x = 0, f = 1;     char ch;     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (ch >=  0  && ch <=  9 ) {       x = x * 10 + ch -  0 ;       ch = getchar();     }     return f * x;   }   inline char readch() {     char ch = getchar();     while (ch ==     || ch ==   n ) ch = getchar();     return ch;   }   inline string readstr() {     char ch = getchar();     string ans =   ;     while (ch ==     || ch ==   n ) ch = getchar();     while (ch !=     && ch !=   n ) {       ans += ch;       ch = getchar();     }     return ans;   }   const int MAXN = 100;   int n;   vector<int> V = {0}, K = {0}, X = {0};   int dp[MAXN][MAXN][MAXN][3];   inline int calc(int x, int y, int z, int pos) {     int ans = pos - (x + y + z + 1);     for (int i = 1; i <= x; i++)       if (V[i] >= pos) ans++;     for (int i = 1; i <= y; i++)       if (K[i] >= pos) ans++;     for (int i = 1; i <= z; i++)       if (X[i] >= pos) ans++;     return ans;   }   signed main() {     memset(dp, 0x3f3f3f3f, sizeof(dp));     n = read();     for (int i = 1; i <= n; i++) {       char tmp = readch();       if (tmp ==  V )         V.push_back(i);       else if (tmp ==  K )         K.push_back(i);       else         X.push_back(i);     }     dp[0][0][0][0] = dp[0][0][0][1] = 0;     for (int i = 0; i < V.size(); i++) {       for (int j = 0; j < K.size(); j++) {         for (int k = 0; k < X.size(); k++) {           if (i != 0)             dp[i][j][k][1] =                 min(dp[i][j][k][1], min(dp[i - 1][j][k][0], dp[i - 1][j][k][1]) +                                         calc(i - 1, j, k, V[i]));           if (k != 0)             dp[i][j][k][0] =                 min(dp[i][j][k][0], min(dp[i][j][k - 1][0], dp[i][j][k - 1][1]) +                                         calc(i, j, k - 1, X[k]));           if (j != 0)             dp[i][j][k][0] =                 min(dp[i][j][k][0], dp[i][j - 1][k][0] + calc(i, j - 1, k, K[j]));         }       }     }     cout << min(dp[V.size() - 1][K.size() - 1][X.size() - 1][0],                 dp[V.size() - 1][K.size() - 1][X.size() - 1][1])          << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int X1[500010], Y1[500010], X2[500010], Y2[500010];   int main() {     int n, i;     scanf( %d , &n);     for (i = 1; i <= n; i++) scanf( %d %d %d %d , &X1[i], &Y1[i], &X2[i], &Y2[i]);     printf( YES n );     for (i = 1; i <= n; i++) {       if (X1[i] % 2 == 0) {         if (Y1[i] % 2 == 0)           printf( 1 n );         else           printf( 2 n );       } else {         if (Y1[i] % 2 == 0)           printf( 3 n );         else           printf( 4 n );       }     }     return 0;   }