malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     scanf( %d , &n);     int* x = new int[2 * n];     int odd = 0;     int even = n;     int len = n - 1;     for (int len = n - 1, i = 1; len > 0; len--, i++)       if (i % 2 == 1) {         x[odd] = i;         x[odd + len] = i;         odd++;       } else {         x[even] = i;         x[even + len] = i;         even++;       }     x[2 * n - 1] = n;     if (n % 2 == 0)       x[even] = n;     else       x[odd] = n;     int s = 0;     for (int i = 0; i < 2 * n; i++) printf( %d  , x[i]);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   bool issorted(long long int *arr, int n) {     int flag = 0;     for (int i = 1; i < n; i++) {       if (arr[i - 1] > arr[i]) {         flag = 1;         break;       }     }     if (flag == 0) return true;     flag = 0;     for (int i = n - 2; i >= 0; i--) {       if (arr[i + 1] > arr[i]) {         flag = 1;         break;       }     }     if (flag == 0) return true;     return false;   }   int main(void) {     int n;     cin >> n;     long long int arr[n];     for (int i = 0; i < n; i++) {       cin >> arr[i];     }     long long int flag = 0;     for (int i = 1; i < n; i++) {       if (arr[i] != arr[i - 1]) {         flag = 1;         break;       }     }     if (flag == 0 || n <= 2)       cout <<  -1  << endl;     else if (n == 3 && arr[0] == arr[2])       cout <<  -1  << endl;     else {       flag = 0;       for (int i = 1; i < n; i++) {         if (arr[i] != arr[i - 1]) {           long long int swap = arr[i];           arr[i] = arr[i - 1];           arr[i - 1] = swap;           if (!issorted(arr, n)) {             cout << i + 1 <<     << i << endl;             break;           } else {             swap = arr[i];             arr[i] = arr[i - 1];             arr[i - 1] = swap;           }         }       }     }   }
#include <bits/stdc++.h>   using namespace std;   int MDA[10000010];   int MDB[10000010];   int main() {     long long a, b, m;     int i;     cin >> a >> b >> m;     for (i = 0; i < (min(m, a + 1)); i++) {       MDA[i] = (i * 1000000000) % m;     }     for (i = 0; i < (min(m, b + 1)); i++) {       MDB[(i) % m] = 1;     }     int ans = 2, mov;     for (i = 0; i < (min(m, a + 1)); i++) {       if (MDB[(m - MDA[i]) % m] == 0) {         ans = 1;         mov = i;         break;       }     }     cout << ans;     if (ans == 1) {       cout <<    ;       char str[100];       sprintf(str,  %ld , mov);       string s = str;       while (s.size() != 9) s =  0  + s;       cout << s;     }     cout << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 100010;   int num[maxn];   map<int, int> mp;   int sum[maxn];   int main() {     int n, i, j, k;     cin >> n;     for (i = 1; i <= n; i++) cin >> num[i], sum[i] = sum[i - 1] + num[i];     int s = 0;     long long ans = 0;     for (i = 1; i < n; i++) {       int tmp = sum[n] - sum[i];       if (sum[i] == 2 * tmp) {         ans += mp[tmp];       }       mp[sum[i]]++;     }     printf( %I64d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long int MOD = 1e9 + 7;   int a[100001], n, num, siz = 0, sq;   int main() {     cin >> n;     for (int i = 0; i < n; i++) cin >> a[i];     vector<int> kill(n, 1);     stack<int> s;     s.push(0);     kill[0] = 1000000000;     for (int i = 1; i < n; i++) {       while (!s.empty() && a[i] > a[s.top()]) {         kill[i] = max(kill[s.top()] + 1, kill[i]);         s.pop();       }       s.push(i);     }     num = 0;     for (int i = 0; i < n; i++)       if (kill[i] < 1000000000) num = max(num, kill[i]);     cout << num;   }
#include <bits/stdc++.h>   using namespace std;   const long long mod = 1e9 + 7;   int t, n, m, sum;   int fa[1000010], sz[1000010];   vector<int> vec[1000010];   int find(int x) {     if (x == fa[x])       return x;     else       return fa[x] = find(fa[x]);   }   int main() {     ios_base::sync_with_stdio(false);     t = 1;     while (t--) {       cin >> n >> m;       for (int i = 1; i <= m; ++i) {         vec[i].clear();         sz[i] = 0;         fa[n + i] = n + i;       }       for (int i = 1; i <= n; ++i) {         int x;         cin >> x;         sz[x + n]++;         vec[x + n].push_back(i);         fa[i] = x + n;       }       sum = 0;       for (int i = 2; i <= n; ++i) {         if (find(i) == find(i - 1)) {           sum++;         }       }       cout << n - sum - 1 <<   n ;       for (int i = 1; i <= m - 1; ++i) {         int x, y;         cin >> x >> y;         int fx = find(x + n), fy = find(y + n);         if (sz[fx] < sz[fy]) {           for (int j = 0; j < vec[fx].size(); ++j) {             if ((vec[fx][j] > 1 && find(vec[fx][j] - 1) == fy)) sum++;             if ((vec[fx][j] < n && find(vec[fx][j] + 1) == fy)) sum++;             vec[fy].push_back(vec[fx][j]);             sz[fy]++;           }           sz[fx] = 0;           fa[fx] = fy;         } else {           for (int j = 0; j < vec[fy].size(); ++j) {             if ((vec[fy][j] > 1 && find(vec[fy][j] - 1) == fx)) sum++;             if ((vec[fy][j] < n && find(vec[fy][j] + 1) == fx)) sum++;             vec[fx].push_back(vec[fy][j]);             sz[fx]++;           }           sz[fy] = 0;           fa[fy] = fx;         }         cout << n - sum - 1 <<   n ;       }     }     return 0;   }
#include <bits/stdc++.h>   using std ::vector;   template <typename Tp>   Tp Max(const Tp &a, const Tp &b) {     return a > b ? a : b;   }   template <typename Tp>   Tp Min(const Tp &a, const Tp &b) {     return a < b ? a : b;   }   template <typename Tp>   Tp Abs(const Tp &a) {     return a > 0 ? a : -a;   }   template <typename Tp>   void Read(Tp &x) {     Tp in = 0, f = 1;     char ch = getchar();     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) f = -1;       ch = getchar();     }     while (ch >=  0  && ch <=  9 ) {       in = in * 10 + ch -  0 ;       ch = getchar();     }     x = in * f;   }   const int SN = 200000 + 10;   vector<int> G[SN];   int a[SN], b[SN], c[SN], min[SN], n;   int res0[SN], res1[SN];   long long ans;   void pre(int u, int fa) {     for (auto v : G[u])       if (v != fa) min[v] = Min(min[v], min[u]);     for (auto v : G[u])       if (v != fa) pre(v, u);   }   void Dfs(int u, int fa) {     if (b[u] != c[u])       if (b[u] == 0)         res0[u]++;       else         res1[u]++;     for (auto v : G[u])       if (v != fa) Dfs(v, u), res1[u] += res1[v], res0[u] += res0[v];     int K = Min(res0[u], res1[u]);     ans += 2LL * K * min[u];     res0[u] -= K, res1[u] -= K;   }   int main(int argc, const char *argv[]) {     Read(n);     for (int i = 1; i <= n; i++)       Read(a[i]), Read(b[i]), Read(c[i]), min[i] = a[i];     int u, v;     for (int i = 1; i < n; i++) {       Read(u), Read(v);       G[u].push_back(v);       G[v].push_back(u);     }     u = 0, v = 0;     for (int i = 1; i <= n; i++) {       if (b[i] == 0) u++;       if (c[i] == 0) v++;     }     if (u != v) {       printf( -1 n );       return 0;     }     pre(1, 0);     Dfs(1, 0);     printf( %lld n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1000010;   const int s = 1000000;   int n;   int b[maxn];   int p[maxn];   int c[maxn];   vector<int> ans;   int main() {     scanf( %d , &n);     int t;     for (int i = 0; i < n; ++i) {       scanf( %d , &t);       b[t] = 1;       p[i] = t;     }     int l = 1;     for (int i = 0; i < n; ++i) {       if (c[p[i]] == 0) {         if (b[s - p[i] + 1] == 0) {           ans.push_back(s - p[i] + 1);           b[s - p[i] + 1] = 1;         } else {           while (b[l] || b[s - l + 1]) {             l++;           }           ans.push_back(l);           b[l] = 1;           ans.push_back(s - l + 1);           b[s - l + 1] = 1;           c[s - p[i] + 1] = 1;         }       }     }     printf( %ld n , ans.size());     for (int i = 0; i < ans.size(); ++i) {       if (i) printf(   );       printf( %d , ans[i]);     }     printf(  n );     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int inf = 1e9;   const int MOD = 1e9 + 7;   const int N = 0;   string s;   long long solve(string s) {     int n = s.length();     long long ans = 1988;     for (auto i = (n - 1); i >= (4); i--) {       long long mul = 1, add = 0;       for (auto j = (i); j < (n); j++) {         mul = 10 * mul;         add = 10 * add + s[j] -  0 ;       }       long long nx = max(mul + ans - add, 0LL) / mul;       ans = nx * mul + add;     }     return ans;   }   int main() {     int test;     cin >> test;     while (test--) {       cin >> s;       cout << solve(s) <<   n ;     }   }
#include <bits/stdc++.h>   using namespace std;   string name[105], body[105];   int n;   string s;   int d[105];   map<string, int> macro_id;   int add(string& s, int& ptr);   void go(int k);   int un(string& s, int& ptr) {     if (s[ptr] ==  ( ) {       ptr++;       int r = add(s, ptr);       if (r & 2) r ^= 2;       if (r & 4) r ^= 4;       ptr++;       return r;     }     string id =   ;     while (ptr < s.size() && (isalpha(s[ptr]) || isdigit(s[ptr]))) {       id += s[ptr++];     }     if (macro_id.count(id)) {       int k = macro_id[id];       go(k);       return d[k];     } else {       return 0;     }   }   int mul(string& s, int& ptr) {     int ret = un(s, ptr);     int cnt = 1;     char last_op =  * ;     bool f = true;     while (ptr < s.size() && (s[ptr] ==  *  || s[ptr] ==  / )) {       if (f && (ret & 2)) {         ret |= 1;       }       f = false;       last_op = s[ptr];       ptr++;       int next = un(s, ptr);       if (next & 4) ret |= 4;       if (next & 1) ret |= 1;       if (next & 2) ret |= 1;       if (last_op ==  /  && (next & 4)) ret |= 1;       cnt++;     }     if (cnt > 1) ret |= 4;     return ret;   }   int add(string& s, int& ptr) {     int ret = mul(s, ptr);     int cnt = 1;     char last_op =  + ;     while (ptr < s.size() && (s[ptr] ==  +  || s[ptr] ==  - )) {       last_op = s[ptr];       ptr++;       int next = mul(s, ptr);       if (next & 2) ret |= 2;       if (next & 1) ret |= 1;       if (last_op ==  -  && (next & 2)) ret |= 1;       cnt++;     }     if (cnt > 1) {       if (ret & 4) ret ^= 4;       ret |= 2;     }     return ret;   }   void go(int k) {     if (d[k] != -1) {       return;     }     string str = body[k];     int ptr = 0;     int code = add(str, ptr);     d[k] = code;   }   int main() {     scanf( %d n , &n);     for (int i = 0; i < int(n); i++) {       getline(cin, s);       while (s[0] ==    ) s.erase(0, 1);       s.erase(0, 1);       while (s[0] ==    ) s.erase(0, 1);       s.erase(0, 7);       while (s[0] ==    ) s.erase(0, 1);       int p = s.find(   );       name[i] = s.substr(0, p);       s.erase(0, p + 1);       for (int j = 0; j < int(s.size()); j++) {         if (s[j] !=    ) {           body[i] += s[j];         }       }       macro_id[name[i]] = i;     }     getline(cin, s);     for (int j = 0; j < int(s.size()); j++) {       if (s[j] !=    ) {         body[n] += s[j];       }     }     for (int i = 0; i < int(n + 1); i++) {       d[i] = -1;     }     go(n);     if (d[n] & 1) {       printf( Suspicious n );     } else {       printf( OK n );     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int NMAX = 200005;   int n;   char str[NMAX];   int in, allin;   int main() {     ios_base ::sync_with_stdio(false);     cin.tie(NULL);     cin >> n;     cin >> str;     for (int i = 0; i < n; ++i)       if (str[i] ==  A )         ++allin;       else if (str[i] ==  I )         ++in;     if (!in)       cout << allin <<   n ;     else       cout << (in == 1 ? 1 : 0) <<   n ;     return 0;   }
#include <bits/stdc++.h>   int a, b, n;   long long ans;   int chk[10000010];   int np, pri[10000010];   int lis[10000010], mon[10000010];   void go(int now, int poi) {     lis[now] = 1;     for (int i = poi; i < np; ++i) {       long long t = (long long)now * pri[i];       if (t > n) break;       go(t, i + 1);     }   }   void solve() {     for (int i = 2; i * i <= n; ++i)       if (chk[i] == 0)         for (int j = i * i; j <= n; j += i) chk[j] = 1;     for (int i = 2; i <= n; ++i)       if (chk[i] == 0) {         pri[np] = i;         ++np;       }     go(1, 0);     for (int i = n, j = -1; i >= 1; --i) {       if (lis[i] == 1) {         lis[i] = j;         j = i;       }     }     for (int i = 1; i != -1; i = lis[i]) {       for (int j = 1;; ++j) {         int t = j * j * i;         if (j * j * i > n) break;         mon[t] = i;       }     }   }   int main(void) {     scanf( %d%d , &a, &n);     b = a + n - 1;     n = b;     solve();     for (int i = a; i <= b; ++i) ans += mon[i];     printf( %I64d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int N = 3009;   int box[N], kk;   struct node {     int t, next;   } e[N << 1];   int n;   void add(int s, int t) {     e[kk].t = t, e[kk].next = box[s];     box[s] = kk++;   }   int tot;   void pre_dfs(int r, int fa) {     for (int i = box[r]; i + 1; i = e[i].next)       if (e[i].t != fa) {         pre_dfs(e[i].t, r);         tot += i & 1;       }   }   int cut;   void dfs(int r, int fa, int now) {     cut = max(now, cut);     for (int i = box[r]; i + 1; i = e[i].next)       if (e[i].t != fa) {         if (i & 1)           dfs(e[i].t, r, now + 1);         else           dfs(e[i].t, r, max(now - 1, 0));       }   }   int main() {     memset(box, -1, sizeof(box));     cin >> n;     for (int i = 1; i < n; i++) {       int s, t;       cin >> s >> t;       add(s, t);       add(t, s);     }     int ans = N;     for (int i = 1; i <= n; i++) {       tot = 0;       pre_dfs(i, i);       cut = 0;       dfs(i, i, 0);       ans = min(tot - cut, ans);     }     cout << ans << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1e3 + 5;   int a[maxn], n, x;   int main() {     int k;     cin >> k;     while (k--) {       cin >> n >> x;       int sum = 0;       bool f = 1, f1 = 0;       for (int i = 1; i <= n; i++) {         cin >> a[i];         sum += a[i];         if (a[i] != x) f = 0;         if (a[i] == x) f1 = 1;       }       if (f == 1)         cout << 0 << endl;       else if (sum == n * x || f1 == 1)         cout << 1 << endl;       else         cout << 2 << endl;     }     return 0;   }
#include<bits/stdc++.h>      typedef long long ll;   typedef long double ld;   using namespace std;   mt19937_64 mrand(chrono::steady_clock::now().time_since_epoch().count());   #define ii for(int i=1;i<=n;++i)   #define ji for(int j=1;j<=n;++j)   #define jj for(int j=1;j<=m;++j)   #define ij for(int i=1;i<=m;++i)   #define all(x) x.begin(),x.end()   #define al(x) x+1,x+1+n   #define asd cout<< ok <<endl;   #define vi vector<int>   #define vvi vector<vector<int>>   #define vl vector<ll>   #define vii vector<pair<int,int>>   #define pc(x) __builtin_popcount(x)   #define pb push_back      vector<int> a[200005];   vector<pair<int,int>> r[200005];   int cnt[200005];   inline int read() {       char c=getchar();int x=0,f=1;       while(c< 0 ||c> 9 ) {if(c== - ) f=-1;c=getchar();}       while(c>= 0 &&c<= 9 )x=x*10+c- 0 ,c=getchar();       return x*f;   }   int main() {       int t = read();       while(t--) {           int n = read();           int sz = 0;           for(int i=1;i<=n;++i) a[i].clear();           vector<int> aa;           for(int i=1;i<=n;++i) {               int x = read();               sz += x;               while(x--) {                   int y = read();                   a[i].push_back(y);                   aa.push_back(y);               }           }           sort(aa.begin(), aa.end());           aa.resize(unique(aa.begin(), aa.end()) - aa.begin());           auto f = [&](int x) {               return lower_bound(aa.begin(), aa.end(), x) - aa.begin() + 1;           };           for(int i=1;i<=n;++i) {               for(int &j:a[i]) j=f(j);               sort(all(a[i]));           }           int sq = pow(sz, 0.4), ok = 0;           for(int i=1;i<=n;++i) {               if(a[i].size() > sq) {                   for(int j:a[i]) cnt[j]++;                   for(int j=1;j<=n;++j) {                       if(i==j) continue;                       int cnt2=0;                       for(int k:a[j]) cnt2+=cnt[k];                       if(cnt2>1) {                           printf( %d %d n , i, j);                           ok=1;                           break;                       }                   }                   for(int j:a[i]) cnt[j]--;               } else {                   for(int j=0;j<a[i].size();++j) {                       for(int k=j+1;k<a[i].size();++k) {                           r[a[i][j]].push_back({a[i][k], i});                       }                   }               }               if(ok) break;           }           if(!ok) {               for(int i=1;i<=aa.size();++i) {                   sort(all(r[i]));                   for(int j=1;j<r[i].size();++j) {                       if(r[i][j].first == r[i][j-1].first) {                           ok = 1;                           printf( %d %d n , r[i][j].second, r[i][j-1].second);                           break;                       }                   }                   if(ok) break;               }           }           for(int i=1;i<=aa.size();++i) r[i].clear();           if(!ok) puts( -1 );       }   }
#include <bits/stdc++.h>   using namespace std;   const int maxn = 1010;   int c1, c2;   char str[maxn];   int main() {     scanf( %s , str);     int len = int(strlen(str));     for (int i = 0; i < len; i++) {       int t = str[i] -  0 ;       if (t == 0) {         if (!c1) {           puts( 1 1 );         } else           puts( 3 1 );         c1 ^= 1;       } else {         if (!c2) {           puts( 4 3 );         } else           puts( 4 1 );         c2 ^= 1;       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long labs(long long a) { return a < 0 ? (-a) : a; }   long long max(long long a, long long b) { return a > b ? a : b; }   long long min(long long a, long long b) { return a < b ? a : b; }   const int MAXN = 1005;   const int UNDEF = -1;   const int IMPOS = INT_MAX - 2;   char f[MAXN][MAXN];   int dph[MAXN], dpv[MAXN];   int n, m;   int RecV(int i);   int RecH(int j) {     if (dph[j] != UNDEF) return dph[j];     dph[j] = IMPOS;     for (int i = 0; i < n; i++) {       if (f[i][j] ==  # ) {         dph[j] = min(dph[j], RecV(i) + 1);       }     }     return dph[j];   }   int RecV(int i) {     if (dpv[i] != UNDEF) return dpv[i];     dpv[i] = IMPOS;     for (int j = 0; j < m; j++) {       if (f[i][j] ==  # ) {         dpv[i] = min(dpv[i], RecH(j) + 1);       }     }     return dpv[i];   }   int main() {     cin >> n >> m;     fill(dph, dph + MAXN, UNDEF);     fill(dpv, dpv + MAXN, UNDEF);     for (int(i) = 0; (i) < (n); (i)++) {       cin >> f[i];     }     dpv[n - 1] = 0;     int res = RecV(0);     if (res == IMPOS) {       res = -1;     }     cout << res << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long a[503400], b[477574], c[534567], d, e, i, j, r, m, y, k, l, n, s, z,       x, t, tt;   string p[3456], q, qq;   map<long long, long long> zz;   int main() {     cin >> n >> m;     for (i = 1; i <= n; i++) cin >> p[i];     cin >> x;     q = p[x];     a[x] = 1;     t = q.size();     for (i = 1; i < m; i++) {       cin >> y;       a[y] = 1;       if (p[y].size() != t) {         cout <<  No ;         return 0;       }       for (j = 0; j < t; j++) {         if (q[j] ==  ? ) continue;         if (p[y][j] != q[j]) q[j] =  ? ;       }     }     for (i = 1; i <= n; i++) {       if (a[i] == 1) continue;       if (p[i].size() != t) continue;       x = 0;       for (j = 0; j < t; j++) {         if (q[j] ==  ? ) continue;         if (q[j] != p[i][j]) x = 1;       }       if (x == 0) {         cout <<  No ;         return 0;       }     }     cout <<  Yes  << endl << q;   }
#include <iostream>   #include <algorithm>   #include <vector>   using namespace std;   typedef vector<int> vi;   int n,a[300010],res[300010],gtm[300010];   vi  L,R,rm;   void solve() {    cin >> n;    for (int i = 0; i < n; i++) cin >> a[i];    L.assign(n,0); R.assign(n,0);    rm.assign(n + 1, 0);    L[0] = 0;     for (int i = 1; i < n; i++) {     if (a[i] > a[i - 1]) L[i] = i;     else {      int j = L[i - 1];      while (j > 0 && a[j - 1] >= a[i]) j = L[j - 1];      L[i] = j;     }    }    R[n - 1] = n - 1;    for (int i = n - 2; i >= 0; i--) {     if (a[i] > a[i + 1]) R[i] = i;     else {      int j = R[i + 1];      while (j < n - 1 && a[j + 1] >= a[i]) j = R[j + 1];      R[i] = j;     }    }    for (int i = 0; i < n; i++) {     int x = R[i] - L[i] + 1;     rm[a[i]] = max(rm[a[i]], x);    }        gtm[1] = rm[1];    for (int i = 2; i <= n; i++) {     gtm[i] = min(gtm[i - 1], rm[i]);    }       for (int i = n; i >= 1; i--) {     int k = n - i + 1;     res[k] = (gtm[i] >= k);    }    for (int i = 1; i <= n; i++) cout << res[i];    cout << endl;   }   int main()   {    int t; cin >> t;    while(t--) solve();   // system( pause );       return 0;   }
#include <bits/stdc++.h>   using namespace std;   bool need[8000010], rem[8000010];   int n, k, b[8000010], sum[8000010], minl = (int)1e9, out;   vector<int> ans;   int main() {     scanf( %d%d , &k, &n);     for (int i = 1; i <= k; i++) scanf( %d , &sum[i]), sum[i] += sum[i - 1];     for (int i = 1; i <= n; i++) scanf( %d , &b[i]), minl = min(b[i], minl);     for (int i = 1; i <= k; i++) ans.push_back(minl - sum[i]);     for (int i = 0; i < ans.size(); i++) {       for (int j = 1; j <= n; j++) need[b[j] + 4000000] = 1;       int x = ans[i], tot = 0;       if (rem[x] == 1) continue;       rem[x] = 1;       for (int j = 1; j <= k; j++) {         tot += need[x + sum[j] + 4000000];         need[x + sum[j] + 4000000] = 0;       }       if (tot == n) out++;     }     cout << out << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int k, t = 0, tt = 0, j = -1;   int kk;   int main() {     cin >> k >> kk;     if (k == 5) {       cout <<  >...v  << endl;       cout <<  v.<..  << endl;       cout <<  ..^..  << endl;       cout <<  >....  << endl;       cout <<  ..^.<  << endl;       cout << 1 <<     << 1;     } else if (k == 3) {       cout <<  >vv  << endl;       cout <<  ^<.  << endl;       cout <<  ^.<  << endl;       cout << 1 <<     << 3;     } else {       for (int j = 0; j < 100; j++) {         if (j == 0) {           for (int i = 0; i < 50; i++) {             cout <<  > ;           }           for (int i = 50; i < 74; i++) {             cout <<  > ;             cout <<  . ;           }           cout <<  > ;           cout <<  v ;         } else if (j == 99) {           cout <<  ^ ;           cout <<  . ;           cout <<  . ;           cout <<  < ;           for (int i = 0; i < 23; i++) {             cout <<  . ;             cout <<  < ;           }           for (int i = 50; i < 100; i++) {             cout <<  < ;           }         } else if (j % 2 == 1) {           cout <<  ^ ;           cout <<  v ;           cout <<  . ;           cout <<  < ;           for (int i = 0; i < 23; i++) {             cout <<  . ;             cout <<  < ;           }           for (int i = 50; i < 100; i++) {             cout <<  < ;           }         } else if (j % 2 == 0) {           cout <<  ^ ;           for (int i = 1; i < 50; i++) {             cout <<  > ;           }           for (int i = 50; i < 74; i++) {             cout <<  . ;             cout <<  > ;           }           cout <<  . ;           cout <<  v ;         }         cout << endl;       }       cout << 1 <<     << 1;     }   }
#include <bits/stdc++.h>   using namespace std;   signed long long int a, b;   long long int a1, b1, y, s;   int main() {     cin >> a >> b >> s;     if (a >= 0)       a1 = a;     else       a1 = 0 - a;     if (b >= 0)       b1 = b;     else       b1 = 0 - b;     y = a1 + b1;     if (y - s == 0 || (y - s) % 2 == 0) {       if (s >= y)         cout <<  Yes ;       else         cout <<  No ;     } else       cout <<  No ;   }