malteklaes/cpp-code-code_search_net-style huggingface dataset:
#include <bits/stdc++.h>   using namespace std;   char s[500010];   int n, m, ver[500010], hor[500010];   bool b;   void calc(int i, int j, int k) {     if (!b) return;     int x = (k < 3) ? 1 : 2;     if (j % 2) x = 3 - x;     if (hor[i] == 0)       hor[i] = x;     else if (hor[i] != x) {       b = false;       return;     }     x = (k == 1 || k == 4) ? 1 : 2;     if (i % 2) x = 3 - x;     if (ver[j] == 0)       ver[j] = x;     else if (ver[j] != x) {       b = false;       return;     }   }   int main() {     scanf( %d%d , &n, &m);     memset(ver, 0, sizeof(ver));     memset(hor, 0, sizeof(hor));     b = true;     for (int i = 0; i < n; i++) {       scanf( %s , s);       for (int j = 0; j < m; j++)         if (s[j] !=  . ) calc(i, j, s[j] -  0 );     }     if (!b)       printf( 0 n );     else {       int ans = 1;       for (int i = 0; i < n; i++)         if (hor[i] == 0) ans = ans * 2 % 1000003;       for (int i = 0; i < m; i++)         if (ver[i] == 0) ans = ans * 2 % 1000003;       printf( %d n , ans);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   #pragma optimize( -O3 )   int cnt;   int t[1200005];   int lazy[1200005];   long long int ans[300005];   void push(int v, int tl, int tr) {     int tm = (tl + tr) / 2;     if (lazy[v] == 2) {       t[v * 2] = tm - tl + 1;       t[2 * v + 1] = tr - tm;       lazy[2 * v] = 2;       lazy[2 * v + 1] = 2;       lazy[v] = 0;     } else if (lazy[v] == 3) {       t[2 * v] = 0;       t[2 * v + 1] = 0;       lazy[2 * v] = 3;       lazy[2 * v + 1] = 3;       lazy[v] = 0;     } else if (lazy[v]) {       t[2 * v] = (tm - tl + 1) - t[2 * v];       t[2 * v + 1] = (tr - tm) - t[2 * v + 1];       lazy[2 * v] ^= 1;       lazy[2 * v + 1] ^= 1;       lazy[v] = 0;     }   }   void update(int v, int tl, int tr, int l, int r, int type) {     if (l > r) return;     if (l == tl && tr == r) {       push(v, tl, tr);       if (type == 1) {         t[v] = (tr - tl + 1);         lazy[v] = 2;       } else if (type == 2) {         t[v] = 0;         lazy[v] = 3;       } else if (type == 3) {         t[v] = (tr - tl + 1) - t[v];         lazy[v] ^= 1;       }     } else {       push(v, tl, tr);       int tm = (tl + tr) / 2;       update(v * 2, tl, tm, l, min(r, tm), type);       update(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r, type);       t[v] = (t[v * 2] + t[v * 2 + 1]);     }   }   int first(int v, int tl, int tr) {     if (tl == tr) {       return tl;     }     int tm = (tl + tr) / 2;     push(v, tl, tr);     if (t[v * 2] != (tm - tl + 1)) {       return first(v * 2, tl, tm);     } else {       return first(v * 2 + 1, tm + 1, tr);     }   }   void solve() {     ios::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     int n;     cin >> n;     vector<pair<int, pair<long long int, long long int>>> v;     set<long long int> se;     for (int i = 0; i < n; i++) {       long long int t, l, r;       cin >> t >> l >> r;       v.push_back({t, {l, r}});       se.insert(l);       se.insert(r + 1);     }     se.insert(1);     map<long long int, int> m;     int pt = 0;     for (auto u : se) {       m[u] = pt;       ans[pt] = u;       pt++;     };     for (auto u : v) {       cnt++;       int ti = u.first;       int l = m[u.second.first];       int r = m[u.second.second + 1] - 1;       ;       update(1, 0, 200001, l, r, ti);       int val = first(1, 0, 200001);       cout << ans[val] <<   n ;     }   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int t = 1;     while (t--) {       solve();     }   }
#include <bits/stdc++.h>   using namespace std;   #pragma warning(disable : 4996)   #pragma comment(linker,  /STACK:256000000 )   FILE *stream;   const int INF = 1e9 + 7;   const long long INFL = (long long)1e18 + 1;   const int SIZE = 2e5 + 10;   const int TSIZE = 1e3 + 10;   const long double eps = 0.000001;   const long long MOD = 1e9 + 7;   char POW(char a, char b) {     if (b == 0) return 1;     char cur = POW(a, b / 2);     if (b % 2 == 0)       return cur * cur;     else       return cur * cur * a;   }   long long gcd(long long &x, long long &y, long long a, long long b) {     if (a == 0) {       y = 1;       x = 0;       return abs(b);     }     long long x1 = 0, y1 = 0;     long long d = gcd(x1, y1, b % a, a);     x = y1 - (b / a) * x1;     y = x1;     return d;   }   long long gcd(long long a, long long b) {     if (a == 0) {       return abs(b);     }     long long d = gcd(b % a, a);     return d;   }   bool cmp(pair<int, int> a, pair<int, int> b) {     return (long long)a.first * b.second > (long long)a.second * b.first;   }   void accept() {     int n;     long double ans = INFL;     cin >> n;     vector<pair<long long, long long> > c(n + 2);     for (long long i = 0; i < n; i++) {       cin >> c[i].first >> c[i].second;       if (i < 2) {         c[n + i] = c[i];       }     }     for (int i = 1; i <= n + 1; i++) {       long long x = c[i].first, y = c[i].second;       long long xl = c[i - 1].first, yl = c[i - 1].second;       long long xr = c[i + 1].first, yr = c[i + 1].second;       long long a = yr - yl;       long long b = xl - xr;       long long z = xl * (yl - yr) + yl * (xr - xl);       long double cans = (a * x + b * y + z) / sqrt(a * a + b * b) / 2;       if (cans < 0) cans *= -1;       if (i == 1) ans = cans;       if (cans < ans) ans = abs(a * x + b * y + z) / sqrt(a * a + b * b) / 2;     }     cout << fixed << setprecision(10) << ans;   }   void solution() {     long long t = 1;     for (long long i = 0; i < t; i++) {       accept();     }     return;   }   void test() {     cout <<  100000 n ;     for (int k = 0; k < 100000 - 1; k++) {       cout << k + 1 <<    ;     }     cout <<  100000 n ;   }   int main() {     srand(time(0));     solution();     return 0;   }
#include<bits/stdc++.h>   using namespace std;   typedef long long ll;   const int maxn=200010;   int a[maxn],f[maxn];   int main(){       ios::sync_with_stdio(false);       cin.tie(nullptr);       int t,n;       cin>>t;       while(t--){           memset(f,0,sizeof(f));           cin>>n;           for(int i=0;i<n;i++)cin>>a[i];           sort(a,a+n);           f[a[0]]=1;           for(int i=1;i<n;i++){               for(int j=1;j*j<=a[i];j++){                   if(a[i]%j)continue;                   f[a[i]]=max({f[a[i]],f[j]+1,f[a[i]/j]+1});               }           }           int ans=0;           for(int i=1;i<=200000;i++)ans=max(ans,f[i]);           cout<<n-ans<<  n ;                  }       return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, x, m, a[100005] = {};     cin >> n;     m = n;     while (n--) {       cin >> x;       a[x] = 1;       while (a[m]) {         cout << m <<    ;         m--;       }       cout << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int main() {     int n, m;     cin >> n >> m;     int i, a, v, max, min, min1;     cin >> a;     max = min = a;     for (i = 1; i < n; i++) {       cin >> v;       if (v > max) max = v;       if (v < min) min = v;     }     cin >> a;     min1 = a;     for (i = 1; i < m; i++) {       cin >> v;       if (v < min1) min1 = v;     }     if ((2 * min < max) && (min1 > max)) {       cout << max;       return 0;     }     if ((2 * min) < min1 && min1 > max) {       cout << (2 * min);       return 0;     }     cout <<  -1 ;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   string dp_func(string str) {     if (str.size() & 1) return str;     string gf, my;     for (int i = 0; i < str.size() / 2; i++) my += str[i];     for (int i = str.size() / 2; str[i]; i++) gf += str[i];     string pts = dp_func(gf);     string rts = dp_func(my);     if (pts > rts) swap(pts, rts);     return pts + rts;   }   int main() {     string str, str2;     cin >> str >> str2;     str = dp_func(str);     str2 = dp_func(str2);     if (str == str2)       printf( YES n );     else       cout <<  NO n ;   }
#include <bits/stdc++.h>   using namespace std;   inline int read() {     int x = 0, f = 1;     char c = getchar();     while (c <  0  || c >  9 ) c = getchar();     while (c <=  9  && c >=  0 ) x = x * 10 + c -  0 , c = getchar();     return x * f;   }   const int maxn = 500007 * 30;   int rt = 0;   struct Segtree {     int tot;     int ls[maxn], rs[maxn], tag[maxn], sum[maxn];     void pushdown(int x, int l, int r) {       int mid = l + r >> 1;       if (l != r) {         if (!ls[x]) ls[x] = ++tot;         if (!rs[x]) rs[x] = ++tot;         sum[ls[x]] = (mid - l + 1) * tag[x];         sum[rs[x]] = (r - mid) * tag[x];         tag[ls[x]] = tag[x];         tag[rs[x]] = tag[x];       }       tag[x] = -1;     }     void modify(int &x, int l, int r, int L, int R, int w) {       if (!x) x = ++tot;       if (l >= L && r <= R) {         sum[x] = (r - l + 1) * w;         tag[x] = w;         return;       }       if (tag[x] >= 0) pushdown(x, l, r);       int mid = l + r >> 1;       if (L <= mid) modify(ls[x], l, mid, L, R, w);       if (R > mid) modify(rs[x], mid + 1, r, L, R, w);       sum[x] = sum[ls[x]] + sum[rs[x]];     }   } t;   int main() {     int n = read();     int m = read();     memset(t.tag, -1, sizeof t.tag);     for (int type, l, r, i = 1; i <= m; ++i) {       l = read(), r = read(), type = read();       if (type == 1)         t.modify(rt, 1, n, l, r, 1);       else         t.modify(rt, 1, n, l, r, 0);       printf( %d n , n - t.sum[1]);     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int n, m;   int a[1010][1010];   bool got[1010][1010];   bool ok(int x) {     memset(got, 0, sizeof(got));     for (int j = 0; j < m; j++) {       vector<int> vt;       for (int i = 0; i < n; i++)         if (a[i][j] >= x) vt.push_back(i);       for (int o = 0; o < vt.size(); o++)         for (int p = o + 1; p < vt.size(); p++)           if (got[vt[o]][vt[p]])             return true;           else             got[vt[o]][vt[p]] = true;     }     return false;   }   int t[1000010];   int main() {     int cnt = 0;     scanf( %d%d , &n, &m);     for (int i = 0; i < n; i++)       for (int j = 0; j < m; j++) {         scanf( %d , &a[i][j]);         t[cnt++] = a[i][j];       }     sort(t, t + n * m);     int l = 0, r = unique(t, t + n * m) - t - 1;     while (l < r) {       int m = (l + r + 1) >> 1;       if (ok(t[m]))         l = m;       else         r = m - 1;     }     printf( %d n , t[l]);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const long long OO = (long long)5e3 + 555;   void ndr() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }   int divi(long long N) {     int cnt(0);     for (long long i = 1; i <= sqrt(N); i++) {       if (N % i == 0) {         if (N / i == i)           cnt++;         else           cnt += 2;       }     }     return cnt;   }   bool cp(int x, int y) { return x > y; }   unsigned long long numberOfSetBits(long long i) {     i = i - ((i >> 1) & 0x55555555);     i = (i & 0x33333333) + ((i >> 2) & 0x33333333);     return (((i + (i >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;   }   bool Taxi(string X) {     for (long long i = (long long)1; i < (long long)X.size(); i++) {       if (X[i] != X[i - 1]) return false;     }     return true;   }   bool Pizza(string X) {     for (long long i = (long long)1; i < (long long)X.size(); i++) {       if (X[i] >= X[i - 1]) return false;     }     return true;   }   signed main() {     ndr();     vector<multimap<int, string>> Phone_Numbers(3);     multimap<int, string>::iterator it, it1;     int Friends;     cin >> Friends;     while (Friends--) {       int N;       cin >> N;       string S;       cin >> S;       int taxi = 0, pizza = 0, girl = 0;       while (N--) {         string s;         cin >> s;         for (long long i = (long long)0; i < (long long)s.size(); i++)           if (s[i] ==  - ) {             s.erase(s.begin() + i);             i--;           }         if (Taxi(s))           taxi++;         else if (Pizza(s))           pizza++;         else           girl++;       }       Phone_Numbers[0].insert({taxi, S});       Phone_Numbers[1].insert({pizza, S});       Phone_Numbers[2].insert({girl, S});     }     for (long long i = (long long)0; i < (long long)3; i++) {       if (i == 0)         cout <<  If you want to call a taxi, you should call: ;       else if (i == 1)         cout <<  If you want to order a pizza, you should call: ;       else         cout <<  If you want to go to a cafe with a wonderful girl, you should                    call: ;       it1 = Phone_Numbers[i].end();       --it1;       for (it = Phone_Numbers[i].lower_bound(it1->first);; it++) {         if (it == it1) {           cout <<     << it->second <<  .  << endl;           break;         } else           cout <<     << it->second <<  , ;       }     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   const int MAX_N = 5e3 + 10;   const int MOD = 1e9 + 7;   int n;   char s[MAX_N];   int dp[26][MAX_N];   int sum[MAX_N];   int cb[MAX_N][MAX_N];   int main() {     int i, l, j;     scanf( %d , &n);     scanf( %s , s + 1);     cb[0][0] = 1;     for (i = 1; i <= n; i++) {       cb[i][0] = 1;       for (j = 1; j <= i; j++) {         cb[i][j] = cb[i - 1][j - 1] + cb[i - 1][j];         if (cb[i][j] >= MOD) cb[i][j] -= MOD;       }     }     s[i] =  # ;     for (i = 1; i <= n; i++) {       if (s[i] == s[i - 1]) continue;       if (!dp[s[i] -  a ][1]) {         dp[s[i] -  a ][1] = 1;         sum[1]++;       }       for (l = 2; l <= n; l++) {         sum[l] -= dp[s[i] -  a ][l];         if (sum[l] < 0) sum[l] += MOD;         dp[s[i] -  a ][l] = sum[l - 1] - dp[s[i] -  a ][l - 1];         if (dp[s[i] -  a ][l] < 0) dp[s[i] -  a ][l] += MOD;         sum[l] += dp[s[i] -  a ][l];         if (sum[l] >= MOD) sum[l] -= MOD;       }     }     int ans = 0;     for (i = 1; i <= n; i++) {       ans += (long long)((long long)sum[i] * (long long)cb[n - 1][i - 1]) % MOD;       if (ans >= MOD) ans -= MOD;     }     printf( %d n , ans);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   string simplify(string s) {     string a;     for (int i = 0; i < s.length(); i++) {       if (isalpha(s[i])) {         s[i] = tolower(s[i]);         a.push_back(s[i]);       }     }     return a;   }   int main() {     ios::sync_with_stdio(0);     cin.tie(NULL);     string s1, s2, s3;     cin >> s1 >> s2 >> s3;     s1 = simplify(s1);     s2 = simplify(s2);     s3 = simplify(s3);     int x = s1.length(), y = s2.length(), z = s3.length();     int n;     cin >> n;     for (int i = 0; i < n; i++) {       string s;       cin >> s;       s = simplify(s);       if (s.length() == x + y + z &&           (s == s1 + s2 + s3 || s == s1 + s3 + s2 || s == s2 + s1 + s3 ||            s == s2 + s3 + s1 || s == s3 + s1 + s2 || s == s3 + s2 + s1))         cout <<  ACC n ;       else         cout <<  WA n ;     }   }
#include <bits/stdc++.h>   using namespace std;   int i, x, y;   int main() {     cin >> x >> y;     i = 1;     while (1 != 0) {       if (i % 2 == 1) {         if (x >= 2 && y >= 2) {           x -= 2;           y -= 2;           i++;         } else if (y >= 12 && x >= 1) {           y -= 12;           x -= 1;           i++;         } else if (y >= 22) {           y -= 22;           i++;         } else {           cout <<  Hanako ;           return 0;         }       }       if (i % 2 == 0) {         if (y >= 22) {           y -= 22;           i++;         } else if (y >= 12 && x >= 1) {           y -= 12;           x -= 1;           i++;         } else if (y >= 2 && x >= 2) {           y -= 2;           x -= 2;           i++;         } else {           cout <<  Ciel ;           return 0;         }       }     }   }
#include <bits/stdc++.h>   using namespace std;   int n, q;   int arr[123456];   int prW[123556];   int leNM[123456];   int main() {     cin >> n >> q;     n--;     int a, b;     cin >> a;     for (int i = 1; i <= (n); ++i) {       cin >> b;       arr[i] = abs(a - b);       a = b;     }     vector<pair<int, int> > stack;     for (int i = 1; i <= (n); ++i) {       pair<int, int> elt = make_pair(arr[i], -i);       while (!stack.empty() && elt > stack.back()) {         prW[-stack.back().second] = i;         stack.pop_back();       }       stack.push_back(elt);     }     while (!stack.empty()) {       prW[-stack.back().second] = n + 1;       stack.pop_back();     }     stack.clear();     for (int i = n; i >= (1); --i) {       pair<int, int> elt = make_pair(arr[i], -i);       while (!stack.empty() && elt > stack.back()) {         leNM[-stack.back().second] = i;         stack.pop_back();       }       stack.push_back(elt);     }     while (!stack.empty()) {       leNM[-stack.back().second] = 0;       stack.pop_back();     }     int l, r;     long long ans, cur;     long long modl, modp;     for (int x = 0; x < (q); ++x) {       cin >> l >> r;       --r;       ans = 0;       for (int i = l; i <= (r); ++i) {         cur = arr[i];         if (leNM[i] < l)           modl = i - l + 1;         else           modl = i - leNM[i];         if (prW[i] > r)           modp = r - i + 1;         else           modp = prW[i] - i;         cur *= modl;         cur *= modp;         ans += cur;       }       cout << ans << endl;     }   }
#include <bits/stdc++.h>   using namespace std;   int n, k;   string s1, s2;   vector<pair<string, string> > ans;   map<string, int> u;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> s1 >> s2;       map<string, int>::iterator it = u.find(s1);       if (it == u.end()) {         u[s1] = k, u[s2] = k;         ans.push_back(make_pair(s1, s2));         k++;       } else {         u[s2] = it->second;         ans[it->second].second = s2;       }     }     cout << ans.size() << endl;     for (size_t i = 0; i < ans.size(); i++) {       cout << ans[i].first <<     << ans[i].second << endl;     }     return 0;   }
#include <bits/stdc++.h>   using namespace std;   int nr, K, mod, ans[33], v[70];   long long N;   struct matrix {     int a[33][33];     matrix() { memset(a, 0, sizeof(a)); }     matrix(bool type) {       memset(a, 0, sizeof(a));       if (type == 1)         for (int i = 0; i <= K; i++) a[i][i] = 1;     }   } dp[70][33], pref[33], suf[33];   matrix operator*(matrix a, matrix b) {     matrix c;     for (int i = 0; i <= K; i++)       for (int j = 0; j <= K; j++) {         c.a[i][j] = 0;         for (int k = 0; k <= K; k++)           c.a[i][j] = ((long long)c.a[i][j] + 1LL * a.a[i][k] * b.a[k][j]) % mod;       }     return c;   }   void Prod(matrix a) {     int old[33];     for (int i = 0; i <= K; i++) old[i] = ans[i];     for (int i = 0; i <= K; i++) {       ans[i] = 0;       for (int j = 0; j <= K; j++)         ans[i] = ((long long)ans[i] + 1LL * old[j] * a.a[j][i]) % mod;     }   }   void Finish() {     int sum = 0;     for (int i = 0; i <= K; i++) sum = ((long long)sum + ans[i]) % mod;     printf( %d n , sum);   }   int main() {     scanf( %I64d %d , &N, &K), mod = 1e9 + 7;     long long aux = N;     while (aux) v[nr++] = aux % K, aux /= K;     for (int i = 0; i < K; i++) {       for (int j = 0; j <= K; j++)         if (j != i) dp[0][i].a[j][j] = 1;       for (int j = 0; j <= K; j++) dp[0][i].a[j][i] = 1;     }     for (int i = 1; i < nr; i++) {       pref[0] = dp[i - 1][0];       for (int j = 1; j < K; j++) pref[j] = pref[j - 1] * dp[i - 1][j];       suf[K] = matrix(1);       for (int j = K - 1; j >= 0; j--) suf[j] = dp[i - 1][j] * suf[j + 1];       dp[i][0] = suf[0];       for (int j = 1; j < K; j++) dp[i][j] = suf[j] * pref[j - 1];     }     ans[K] = 1;     int curr = 0;     for (int i = nr - 1; i >= 0; i--)       while (v[i]--) Prod(dp[i][curr]), curr = (curr + 1) % K;     Finish();     return 0;   }
#include <bits/stdc++.h>   using namespace std;   long long a[200000];   map<long long, bool> mm;   int main() {     int n, t, k, d;     cin >> n >> t >> k >> d;     int res0 = 0, res1 = 0, sum0 = 0, sum1 = 0;     while (sum0 < n) res0 += t, sum0 += k;     for (int i = 1; i <= 10000; i++) {       if (i % t == 0) sum1 += k, res1 = i;       if (sum1 >= n) break;       if (i % (d + t) == 0) sum1 += k, res1 = i;       if (sum1 >= n) break;     }     if (res1 < res0)       cout <<  YES n ;     else       cout <<  NO n ;   }
#include <bits/stdc++.h>   using namespace std;   const long long N = 1e6 + 10, mod = 1e9 + 7;   long long ans = 1, t, n, a, b, f[N];   int main() {     scanf( %lld , &n);     f[0] = f[1] = 1;     for (long long i = 2; i <= n; i++)       f[i] = (f[i - 1] + f[i - 2] * (i - 1) % mod) % mod;     for (long long i = 1; i <= n; i++) {       long long x;       scanf( %lld , &x);       if (x == 1)         a++;       else         b++;     }     for (long long i = n; i >= n - b + 1; i--) ans = (ans * i) % mod;     printf( %lld n , ans * f[a] % mod);     return 0;   }
#include <bits/stdc++.h>   using namespace std;   string s, t;   bool B1[1000001];   bool B2[1000001];   vector<int> R;   int main() {     int n;     getline(cin, s);     getline(cin, t);     int i = 0;     bool b = true;     while (i < t.size()) {       if (t[i] != s[i]) b = false;       B1[i] = b;       i++;     }     i = 0;     b = true;     while (i < t.size()) {       if (t[t.size() - i - 1] != s[s.size() - i - 1]) b = false;       B2[s.size() - i - 1] = b;       i++;     }     for (int i = 0; i < s.size() + 1; i++) {       bool b1 = true, b2 = true;       if (i > 0) b1 = B1[i - 1];       if (i + 1 < s.size()) b2 = B2[i + 1];       if (b1 && b2) R.push_back(i);     }     cout << R.size() << endl;     for (int i = 0; i < R.size(); i++) cout << R[i] + 1 <<    ;     cin >> n;   }
#include <bits/stdc++.h>   using namespace std;   char s[1000001];   int main() {     int n, v = 0;     cin >> n;     sprintf(s,  %X , n);     for (int i = 0; i < strlen(s); i++) {       if (s[i] ==  0  || s[i] ==  4  || s[i] ==  6  || s[i] ==  9  ||           s[i] ==  A  || s[i] ==  D )         v++;       else if (s[i] ==  8  || s[i] ==  B )         v += 2;     }     cout << v << endl;     return 0;   }
#include <bits/stdc++.h>   using namespace std;   unordered_map<int, int> errors;   void get_codes(unordered_map<int, int>& quantity, int cnt, int inc) {     for (int i = 0; i < cnt; i++) {       int code;       cin >> code;       quantity[code] += inc;     }   }   int main() {     ios_base::sync_with_stdio(0);     int bugs;     cin >> bugs;     get_codes(errors, bugs, 1);     get_codes(errors, bugs - 1, -3);     for (auto it = errors.begin(); it != errors.end(); ++it) {       if ((it->second) % 2 != 0) {         cout << (it->first) <<   n ;         (it->second) -= 1;       }     }     get_codes(errors, bugs - 2, 2);     for (auto it = errors.begin(); it != errors.end(); ++it)       if ((it->second) != 0) cout << (it->first) <<   n ;   }