akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
	ll t,i,r,c,j,k,l,s=0,p=0,n,q,m;
	cin>>m>>n>>p>>q;
	if(m==1 && n==31) cout<<1;
	else if(m==2 && n==28) cout<<1;
	else if(m==3 && n==31) cout<<1;
	else if(m==4 && n==30) cout<<1;
	else if(m==5 && n==31) cout<<1;
	else if(m==6 && n==30) cout<<1;
	else if(m==7 && n==31) cout<<1;
	else if(m==8 && n==31) cout<<1;
	else if(m==9 && n==30) cout<<1;
	else if(m==10 && n==31) cout<<1;
	else if(m==11 && n==30) cout<<1;
	else if(m==12 && n==31) cout<<1;
	else cout<<0;
	
	
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
 
/* attention
    long longのシフト演算には気をつけよう
    タイポした時のデバッグが死ぬほどきつくなるので変数名は最低3字くらい使った方がいいかも
    sizeは(int)とキャストしよう
    ごちゃごちゃ場合分けを考える前に全探索は考えましたか？
*/

int main(){
    int a, b, k; cin >> a >> b >> k;

    if(b+1-a <=2*k){
        for(int i=a; i<=b; ++i) cout << i << endl;
    }
    else{
        for(int i=a; i<a+k; ++i) cout << i << endl;
        for(int i=b+1-k; i<=b; ++i) cout << i << endl;
    }

    return 0;
}

Measured memory_bytes: 256
n,m = map(int,input().split())
x = list(map(int,input().split()))
x = sorted(x)

if m <= n:
	print(0)
elif n == 1:
	print(abs(x[-1]-x[0]))
else:
	diff = [0]*(m-1)
	for it in range(m-1):
		diff[it] = x[it+1]-x[it]
	diff = sorted(diff)
	diff = diff[:m-n]
	# print(diff)
	print(sum(diff))


Measured memory_bytes: 13968
#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>

using namespace std;


int main(){
    int a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    c=c<(b/a)?c:(b/a);
    printf("%d",c);
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define ll long long
#define ld long double
#define MOD 1000000007
#define nl cout << bl
#define rt ll Q[100005] = {0}
#define mp make_pair
#define test() \
    ull t;     \
    cin >> t;  \
    while (t--)
#define pb push_back
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define s(ar, n) sort(ar, ar + n)
#define rs(ar, n) sort(ar, ar + n, greater<ll>())
#define oa(a, n)               \
    for (ll i = 0; i < n; i++) \
        cout << a[i] << " ";
#define cn(a, n)               \
    for (ll i = 0; i < n; i++) \
        cin >> a[i];
#define ov(a, n)                    \
    for (ll i = n - 1; i >= 0; i--) \
        cout << a[i] << " ";        \
    nl
#define ovp(a, n)              \
    for (ll i = 0; i < n; i++) \
        cout << a[i].ff << " " << a[i].ss << bl;
#define maxa(ar, N) *max_element(ar, ar + N)
#define mina(ar, N) *min_element(ar, ar + N)
#define present(c, x) ((c).find(x) != (c).end())
#define fastio()                  \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
typedef pair<int, int> pii;
ll fast_exp(ll base, ll exp)
{
    ll res = 1;
    while (exp > 0)
    {
        if (exp % 2 == 1)
            res = (res * base) % MOD;
        base = (base * base) % MOD;
        exp /= 2;
    }
    return res % MOD;
}
ll fib(ll n)
{
    if (n < 2)
        return n;
    ll a = 0, b = 1, pre;
    int i = 1;
    while (i < n)
    {
        pre = (a + b) % MOD;
        a = b;
        b = pre;
        i++;
    }
    return pre;
}
ll fac(ll n)
{
    if (n % 2 == 0)
        return 2;

    for (ll i = 3; i * i <= n; i += 2)
    {
        if (n % i == 0)
            return i;
    }

    return n;
}
ll fact(ll n)
{
    if (n > 1)
        return n * fact(n - 1);
    else
        return 1;
}
bool sortbysec(const tuple<int, int, int> &a,
               const tuple<int, int, int> &b)
{
    return (get<1>(a) < get<1>(b));
}

int main()
{
    int n;
    cin >> n;
    int a[n];
    cin >> a[0];
    int count = 1;
    int mn = a[0];
    for (int i = 1; i < n; i++)
    {
        cin >> a[i];
        if (mn >= a[i])
        {
            count++;
        }
        mn = min(mn, a[i]);
    }
    cout << count;
}

Measured memory_bytes: 4408
#include<iostream>
#include<string>
using namespace std;

int main() {
	string S;
	cin >> S;
	int num = 0;
	for (int i = 0;i < 4;i++) {
		if (S[i] == '+') num++;
		else if (S[i] == '-') num--;
	}
	cout << num << endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = (int)(x); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> P;
const int inf = INT_MAX;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
const double EPS = 1e-10;
const double PI = acos(-1.0);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill( (T*)array, (T*)(array+N), val ); }
template <class T1, class T2, class Pred = std::less<T2> >
struct sort_pair_second {
    bool operator()(const std::pair<T1,T2>&left, const std::pair<T1,T2>&right) {
        Pred p;
        return p(left.second, right.second);
    }
};

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int L; cin >> L;
    double l = (double)L / 3;
    printf("%.12lf\n", pow(l, 3));
}

Measured memory_bytes: 256
import numpy as np
h,w,k = map(int,input().split())
c = np.zeros((h,w))
for _ in range(h):
  row = [1 if a=='#' else 0 for a in input()]
  c[_]=row
ans = 0
for bit in range(1<<h+w):
  d = np.copy(c)
  for i in range(h+w):
    if (bit>>i)&1:
      if i<h:
        d[i]=0
      else:
        d[:,i-h]=0
  if np.sum(d)==k:
    ans += 1
print(ans)

Measured memory_bytes: 27028
//
// Created by watemus on 02.05.2020.
//

#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>

using namespace std;

#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define ff first
#define ss second

using ll = long long;
using ld = long double;
#define int ll

constexpr ll INFL = 1'000'000'000'000'000'228;
constexpr int INFI = 1'000'000'228;

#ifdef LOCAL
#else
#endif

const int MAXN = 2e5 + 10;

int a[MAXN], ans[MAXN];
vector<int> g[MAXN];
int dp[MAXN];

void dfs(int v, int p) {
    ans[v] = ans[p];
    int idx = lower_bound(dp, dp + MAXN, a[v]) - dp;
    int prev_val = dp[idx];
    if (idx > ans[v]) {
        ans[v] = idx;
    }
    dp[idx] = min(dp[idx], a[v]);
    for (auto u : g[v]) {
        if (u != p) {
            dfs(u, v);
        }
    }
    dp[idx] = prev_val;
}

void run() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < n - 1; i++) {
        int u, v;
        cin >> u >> v;
        u--; v--;
        g[u].push_back(v);
        g[v].push_back(u);
    }
    fill(dp, dp + MAXN, INFL);
    dp[0] = 0;
    dp[1] = a[0];
    ans[0] = 1;
    for (auto u : g[0]) {
        dfs(u, 0);
    }
    for (int i = 0; i < n; i++) {
        cout << ans[i] << '\n';
    }
}

signed main() {
#ifdef LOCAL
    std::freopen("input.txt", "r", stdin);
#else
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
#endif
    int t = 1;
//    cin >> t;
    while (t--) {
        run();
    }
    return 0;
}

Measured memory_bytes: 33540
#include <iostream>
#include <vector>
#include <numeric>
#include <tuple>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <limits>
#include <unordered_map>
#include <type_traits>
#include <map>
#include <cstdio>
#include <string>

using namespace std;
using str = string;

#define rep(a,l,r) for(int a=(l);a<(r);a++)
#define get cin>>
#define put cout<<

int gcd_euclid(int u, int v) {
  int r;
  while (0 != v) {
    r = u % v; u = v; v = r; /* swap */
  }
  return u;
}

// 最大公約数算出
int calc_gcd(const vector<int> vec){
	int gcd = *min_element(vec.begin(), vec.end());
	for (const int ele: vec){
		gcd = gcd_euclid(gcd,ele);
	}
	return gcd;
}

// 最小公倍数
int calc_lcm(const vector<int> vec) {
	int tmp = 1;
	for (const int ele: vec){
		tmp *= ele;
	}
	int gcd = calc_gcd(vec);
	return tmp/gcd;
}

// nが奇数、偶数の場合の場合分け
// n & 1 ? odd : even

// distinctはsortしてunique + erase
// https://qiita.com/ysk24ok/items/30ae72f4f1060b088588
//std::sort(vec.begin(), vec.end());
//vec.erase(std::unique(vec.begin(), vec.end()), vec.end());

int a[100005], b[100005], mx = -1e9, sec, pos, ans;
void run() {

	str n; get n;

	if (n.length() == 2) {
		put n;
	} else {
		reverse(n.begin(),n.end());
		put n;
	}
}

int main() {ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);run();return 0;}


Measured memory_bytes: 256
#include <stdio.h>
int size[101],g[101][101],x[101], y[101], k, d;
void dfs(int z){
  int i;
  x[z] = d++;
  for(i=1;i<=size[z];i++) if(!x[g[z][i]]) dfs(g[z][i]);
  y[z] = d++;
}
  
main(){
  int i, j, a;
  d=1;
  scanf("%d", &k);
  for(i=1;i<=k;i++){
    x[i] = y[i] = 0;
    scanf("%d", &a);
    scanf("%d", &size[a]);
    for(j=1;j<=size[a];j++) scanf("%d", &g[a][j]);
  }
  for(i=1;i<=k;i++){
    if(!x[i]) dfs(i);
  }
  for(i=1;i<=k;i++){
    printf("%d %d %d\n", i, x[i], y[i]);
  }
  return 0;
}

Measured memory_bytes: 636
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define rrep(i,n) for(int i=1;i<(n);++i)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int inf = 1001001001;
const int mod = 1000000007;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int h, w;
	cin >> h >> w;
	vector<string> a(h);
	rep(i, h) cin >> a[i];
	vector<vector<char>> s(h + 2, vector<char>(w + 2));
	rep(i, h + 2)rep(j, w + 2) s[i][j] = '#';
	for (int i = 1; i <= h; ++i) {
		for (int j = 1; j <= w; ++j) {
			s[i][j] = a[i - 1][j - 1];
		}
	}
	rep(i, h + 2) {
		rep(j, w + 2) cout << s[i][j];
		cout << endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <iomanip>

#define int long long int
#define rep(i, n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef pair<int, int> P;

const int INF = 1e15;
const int MOD = 1e9+7;

signed main(){
    double n, m, d;
    cin >> n >> m >> d;

    int x = d == 0 ? n : (n-d)*2;

    cout << fixed << setprecision(6) << x / (n * n) * (m-1) << endl;

    return 0;
}


Measured memory_bytes: 384
#include <iostream>
#include<string>
#include<cstring>
#include <cstdio>
#include<utility>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<bitset>
#include<queue>
#include<stack>
#include<set>
#include <limits>
#include <climits>
#include <numeric>
using namespace std;
typedef long long ll;
typedef vector<int>VI;
typedef pair<int,int>P;
typedef pair<double,double>P_D;
#define PI 3.1415926535897932384626433832795
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define reprev(i, n) for (int i = (int)n - 1; i >= 0; i--)
#define ALL(a)  (a).begin(),(a).end()
#define C_MAX(a, b) ((a)>(b)?(a):(b))
#define fi first
#define se second
#define MAX 100100//5
#define MAX_N 200100
#define MAX_B 1001001//6
#define MAX_S 10010010//7
#define SENTINEL 2000000000//9
#define NIL -1
#define MOD 1000000007
#define INF 1 << 29
#define INFTY 1000000000000000000LL
#define MAX_INT INT_MAX
#define MAX_LL LLONG_MAX
int n,x[10],y[10];
int factorial(int n){if(n==0)return 1;return n*factorial(n-1);}
double dist(int i,int j){
    double dx=x[i]-x[j];double dy=y[i]-y[j];
    return sqrt(dx*dx+dy*dy);
}
double solve(){
    double sum=0.0;
    vector<int>v(n);
    for(int i=0;i<n;i++)v[i]=i;
    do{
        rep(i,n-1)sum+=dist(v[i],v[i+1]);
    }while(next_permutation(ALL(v)));
    return sum/(double)factorial(n);
}
int main(){
    cin>>n;rep(i,n)cin>>x[i]>>y[i];
    printf("%.10lf\n",solve());
}

Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<int> VI;
const ll MOD = 1000000007;
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
int main() {
	int n, d;
	cin >> n >> d;
	cout << (n - 1) / (d * 2 + 1) + 1;
}

Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long int lli;
typedef long long int ll;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef vector<pll> vop;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<int> vi;
typedef pair<int, int> pii;
#define REP(i,a,b) for( long long i=a;i<b;i++)
#define REPR(i,a,b) for(long long i=a;i>=b;i--)
#define adb(a) for(auto ii:a) cout << ii << " "; cout << endl
#define adp(a) for(auto ii:a) cout << ii.F << " " << ii.S << endl;
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
#define endl "\n"
#define mem(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define PI 3.14159265358979323846
const ll MAXN = 100007;
const ll p = 1000000007;
#define N 100003
#define INF INTMAX_MAX

struct hash_pair {
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1> {}(p.first);
        auto hash2 = hash<T2> {}(p.second);
        return hash1 ^ hash2;
    }
};

ll dx[] = {1, -1, 0, 0};
ll dy[] = {0, 0, 1, -1};

ll power(ll a, ll b, ll m) { ll ans = 1; a = a % m; while (b) { if (b & 1) ans = (ans * a) % m; b /= 2; a = (a * a) % m; } return ans; }

ll lcm(ll a, ll b) { return (a * b) / __gcd(a, b); }

ll modInverse(ll a, ll m) { ll g = __gcd(a, m); return power(a, m - 2, m); }

bool cmp(const pll &a, const pll &b)
{
    if (a.F != b.F) {
        return a.F > b.F;
    }
    else
        return a.S < b.S;
}

// bool check(ll i, ll j)
// {
//     if (i >= 0 && i < n && j >= 0 && j < m && a[i][j] != '#')
//         return true;
//     return false;
// }


int main()
{


    fastIO;
    int test = 1, num = 1;
    //cin >> test;
    while (test--)
    {
        ld d, t, s;
        cin >> d >> t >> s;
        if (d / s <= t) cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 3744
S = list(input())
T = list(input())

from collections import defaultdict
s = defaultdict(int)
t = defaultdict(int)

for i in S:
    s[i] += 1

for j in T:
    t[j] += 1

ss = sorted(s.values())
tt = sorted(t.values())

#print (ss)
#print (tt)
if ss == tt:
    print("Yes")
else:
    print("No")

Measured memory_bytes: 6704
#include <iostream>
#include <vector>
#include<string>
using namespace std;
int main() {
	string S, T;
	cin >> S >> T;
	int x = 0;
	for (int i = 0; i < 3; i++) {
		if (S[i] == T[i]) { x += 1;
		}
	}
	cout << x << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<n;++i)

using namespace std;

typedef pair<double,double>P;
typedef pair<P,P>PP;

const int MAX_N = 102;

P intersect(P p1,P p2,P p3,P p4)
{
    P res;
    if(p1.first != p2.first && p3.first != p4.first){
        double p = (p2.second - p1.second) / (p2.first - p1.first);
        double q = (p4.second - p3.second) / (p4.first - p3.first);
        if(abs(p-q) < EPS){
            return P(INF,INF);
        }
        res.first = (p*p1.first - q*p3.first + p3.second - p1.second) / (p-q);
        res.second = p*(res.first - p1.first) + p1.second;
    }else if(p1.first == p2.first){
        res.first = p1.first;
        double q = (p4.second - p3.second) / (p4.first - p3.first);
        res.second = q*(res.first - p3.first) + p3.second;
    }else if(p3.first == p4.first){
        res.first = p3.first;
        double p = (p2.second - p1.second) / (p2.first - p1.first);
        res.second = p*(res.first - p1.first) + p1.second;
    }else{
        return P(INF,INF);
    }
    if(abs(res.first) > 100 - EPS || abs(res.second) > 100 - EPS){
        return P(INF,INF);
    }
    return res;
}

double dir(P p1,P p2)
{
    return (p1.first - p2.first) * (p1.first - p2.first) + (p1.second - p2.second) * (p1.second - p2.second);
}

int main()
{
    while(1){
        int n;
        scanf("%d",&n);
        if(n == 0){
            break;
        }
        vector<PP> seg;
        vector<P> cross;
        rep(i,n){
            int w,x,y,z;
            scanf("%d%d%d%d",&w,&x,&y,&z);
            seg.push_back(PP(P(w,x),P(y,z)));
        }
        int res = 2;
        for(int i = 1;i < n;i++){
            int mn = 0;
            vector<int> vec(cross.size(),0);
            rep(j,i){
                P p = intersect(seg[i].first,seg[i].second,seg[j].first,seg[j].second);
                if(p.first == INF){
                    mn++;
                }else{
                    bool flag = false;
                    rep(k,cross.size()){
                        if(dir(p,cross[k]) <= EPS * EPS){
                            vec[k]++;
                            flag = true;
                            break;
                        }
                    }
                    if(!flag){
                        cross.push_back(p);
                    }
                }
            }
            rep(j,vec.size()){
                if(vec[j] != 0){
                    mn += vec[j] - 1;
                }
            }
            res += i + 1 - mn;
        }
        printf("%d\n",res);
    }
}

Measured memory_bytes: 3248
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n,m;
	cin>>n>>m;
	string str;
	set<int> s;
	map<int,int> ma;
	if(n==1)
	{
	  str="0";
	  for(int i=0;i<m;++i)
	    {
	        int temp1,temp2;
	        cin>>temp1>>temp2;
	       
	        
	        if(s.find(temp1)!=s.end())
	        {
	            if(ma[temp1]!=temp2)
	            {
	            cout<<-1<<endl;
	            return 0;
	            }
	        }
	        else
	        {
	            s.insert(temp1);
	            ma[temp1] = temp2;
	            str[temp1-1]=(temp2+'0');
	        }
	        //cout<<"fdvfdv"<<endl;
	        
	        //cout<<str<<endl;
	    }
	    cout<<str<<endl;
	  
	}
	else
	{
	    str="1";
	    for(int i=0;i<n-1;++i)
	    {
	        str+="0";
	    }
	    
	    for(int i=0;i<m;++i)
	    {
	        int temp1,temp2;
	        cin>>temp1>>temp2;
	        if(temp1==1&&temp2==0)
	        {
	            cout<<-1<<endl;
	            return 0;
	        }
	        
	        else if(s.find(temp1)!=s.end())
	        {
	            if(ma[temp1]!=temp2)
	            {
	            cout<<-1<<endl;
	            return 0;
	            }
	        }
	        else
	        {
	            s.insert(temp1);
	            ma[temp1] = temp2;
	            str[temp1-1]=(temp2+'0');
	        }
	        //cout<<"fdvfdv"<<endl;
	        
	        //cout<<str<<endl;
	    }
	    cout<<str<<endl;
	}
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

int main(){
  int n,l;
  cin >> n >> l;
  vector<string> s(n);
  for(int i=0;i<n;i++) cin >> s.at(i);
  sort(s.begin(),s.end());
  for(int i=0;i<n;i++) cout << s.at(i);
  cout << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>  
using namespace std;
using ll = long long int;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
bool b(){
  string s;cin>>s;
  int n=s.size();
  string s_=s.substr(2,n-3);
  int n_=s_.size();
  string a="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

  if(s.at(0)!='A'){return false;}
  int c;
  if(count(s_.begin(),s_.end(),'C')==1){
    rep(i,n_){
      if(s_.at(i)=='C'){c=i+2;}     
    }
  }
  if(count(s_.begin(),s_.end(),'C')!=1){return false;}
  
  rep(i,26){
    rep(j,n){
      if(j==0||j==c){continue;}
    if(a.at(i)==s.at(j)){return false;}
    }
  }
  return true;
}

int main() {
  
  if(b()){cout<<"AC"; } 
  else{cout<<"WA";}
}
      

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main()
{
  int N; cin >> N;
  vector<int> h(N); REP(i, N) cin >> h[i];

  int ans = 0;
  for (int l = 0; l < N; ++l) {
    while (h[l] > 0) {
      int r;
      for (r = l; r < N; ++r) {
        if (h[r] == 0) break;
      }

      for (int i = l; i < r; ++i) h[i]--;

      ans++;
    }
  }

  cout << ans << endl;
}

Measured memory_bytes: 256
n = []
i = 0
while i < 3000:
    n = [int(i) for i in input().split()]
    if n[0] == 0 and n[1] == 0:
        break
    m = 0
    if n[0] > n[1]:
        m = n[0]
        n[0] = n[1]
        n[1] = m
    print(str(n[0]) + " " + str(n[1]))
    i += 1


Measured memory_bytes: 5620
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String bob = "";
		int x = 0;
		for (int i = 0; i < s.length(); i++) {
			bob = bob + "x";

		}
		System.out.println(bob);

	}

}


Measured memory_bytes: 21588
#include <bits/stdc++.h>
typedef long long ll;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REP2(i, a, b) for(int i = a;i <= b;i++)
#define REPR(i, a, b) for(int i = a; i >= b; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define PI 3.14159265358979323846
#define vi vector<int>
#define vll vector<ll>
#define vi2 vector<vector<int>>
#define eb emplace_back
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()
#define sz(x) int(x.size())
using namespace std;
using P = pair<ll,ll>;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};
#define INT(name) int name;cin >> name;
#define VEC(type,name,n) vector<type> name(n);REP(i,n) cin >> name[i];

template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

int main()
{
  INT(N);
  INT(C);
  vector<vector<int>> D(C,vector<int>(C));
  REP(i, C){
    REP(j, C){
      cin >> D.at(i).at(j);
    }
  }
  vector<vector<int>> A(N,vector<int>(N));
  REP(i, N){
    REP(j, N){
      cin >> A.at(i).at(j);
      A.at(i).at(j)--;
    }
  }
  
  vi2 Cost(C,vi(3,0));
  REP(i,C){
    REP(j,N){
      REP(k,N){
        Cost[i][(j+k+2)%3]+=D[A[j][k]][i];
      }
    }
  }

  int MIN = INF;
  REP(i,C){
    REP(j,C){
      REP(k,C){
        if(i!=j&&j!=k&&i!=k){
          MIN=min(MIN,Cost[i][0]+Cost[j][1]+Cost[k][2]);
        }
      }
    }
  }

  cout << MIN << endl;
}

Measured memory_bytes: 4616
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    // start
    int res = 0;
    rep(i,3) {
        char a;
        cin >> a;
        if(a=='1')
            ++res;
    }
    cout << res << endl;
    // end

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
int main(void){
  char S[11],H[11]="2019/04/30";
  scanf("%s",S);
  for(int i=0;i<9;i++){
    if(S[i]>H[i]){
      printf("TBD\n");
      return 0;
    }
  }
  printf("Heisei\n");
  return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <queue>

using namespace std;

#define mp make_pair
#define pb push_back
#define ll long long

const int mod = 998244353;

string s, saux;
map<string, bool> M;
int cnt;
queue<string> Q;

int ss, dd, i;
int dp[2][3][3][2]; //! pos, last, sum, done

char dif(char a, char b) {
    if (a == b) return '!';
    if ('a' != a && 'a' != b) return 'a';
    if ('b' != a && 'b' != b) return 'b';
    return 'c';
}

void brute() {
    string act, aux;

    Q.push(s);
    M[s] = true;
    cnt = 1;

    while (!Q.empty()) {
        act = Q.front(); Q.pop();

        for (i = 1; i < act.size(); i++) {
            aux = act;
            if (aux[i - 1] != aux[i]) {
                aux[i - 1] = aux[i] = dif(aux[i - 1], aux[i]);
                if (!M[aux]) {
                    M[aux] = true;
                    cnt++;
                    Q.push(aux);
                }
            }
        }


    }

    cout << cnt;
}

void add(int &a, int b) {
    a += b;
    if (a >= mod) a -= mod;
}

/*bool check(string act) {
    int sum = 0;

    for (auto e : act) sum += e - 'a';
    sum %= 3;
    if (sum != 1) return false;

    if (act == s) return true;
    for (int i = 1; i < 4; i++)
        if (act[i - 1] == act[i])
            return true;

    return false;
}*/

int main()
{
 //   freopen("test.in","r",stdin);

    cin >> s;
    if (s.size() <= 3) {
        brute();
        return 0;
    }

    /*int many = 0;
    for (int cc = 0; cc < 3 * 3 * 3 * 3; cc++) {
        int aux = cc;
        saux = "";

        while (saux.size() != 4) {
            saux.pb('a' + (aux % 3));
            aux /= 3;
        }

        if (check(saux)) cerr << saux << ' ' << ++many << '\n';
    }*/

    ss = 0; dd = 1;
    dp[ss][0][0][0] = 1;
    dp[ss][1][1][0] = 1;
    dp[ss][2][2][0] = 1;

    for (i = 2; i <= s.size(); i++) {
        memset(dp[dd], 0, sizeof(dp[dd]));

        for (int last = 0; last < 3; last++) {
            for (int sum = 0; sum < 3; sum++) {
                for (int done = 0; done < 2; done++) {

                    for (int nxt = 0; nxt < 3; nxt++) {
                        int new_sum = (sum + nxt) % 3;
                        int new_done = (last == nxt ? 1 : done);

                        add(dp[dd][nxt][new_sum][new_done], dp[ss][last][sum][done]);
                    }

                }
            }
        }

        swap(ss, dd);
    }

    int need = 0;
    for (auto e : s) need += e - 'a';

    need %= 3;
    add(cnt, dp[ss][0][need][1]);
    add(cnt, dp[ss][1][need][1]);
    add(cnt, dp[ss][2][need][1]);

    for (i = 1; i < s.size(); i++)
        if (s[i - 1] == s[i])
            break;

    if (i == s.size()) add(cnt, 1);

    for (i = 1; i < s.size(); i++)
        if (s[i - 1] != s[i])
            break;

    if (i == s.size()) cnt = 1;

    cout << cnt;



    return 0;
}


Measured memory_bytes: 640
#include "bits/stdc++.h"
using namespace std;

const int N=2e5+20;

int n,a[N],inf;
long long k;
vector <int> dp[N];

void go(int node,int steps=1)
{
	if(steps>=1000000) return;
	dp[node].push_back(steps);
	int child=a[node];
	go(child,steps+1);
}

int main()
{
	scanf("%d%lld",&n,&k);
	for(int i=1;i<=n;i++) scanf("%d",&a[i]);

	k++;
	go(1);
	for(int i=1;i<=n;i++)
	{
		for(auto j:dp[i])
			if(j==k) return 0 * printf("%d",i);
		if(dp[i].size()>1 and k>=dp[i][0])
		{
			if((k-dp[i][0])%(dp[i][1]-dp[i][0])==0)
				return 0 * printf("%d",i);
		}
	}
	printf("%d",inf);
}

Measured memory_bytes: 50156
#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n;
	string str;
	string str2;
	string str3;
	int ans = 0;
	int tmp = 0;
	map<char, int> mp;
	
	cin >> n;
	cin >> str;
	
	for (int i = 0; i < str.size(); i++) {
		str2 = str.substr(0, i);
		str3 = str.substr(i, str.size() - i);
		for (int i = 0; i < str2.size(); i++) {
			for (int j = 0; j < str3.size(); j++) {
				if (str2[i] == str3[j]) {
					mp[str3[j]] = 1;
					break;
				}
			}
		}
		for (auto x: mp) {
			tmp++;
		}
		
		mp.clear();
		
		if (ans < tmp) {
			ans = tmp;
		}
		tmp = 0;
	}
	
	cout << ans << endl;
}

Measured memory_bytes: 384
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <limits>
#include <queue>
#include <iomanip>
#include <set>
//#include <bits/stdc++.h>

template<typename T> bool chmax(T &a,T b){
    if(a<b){
        a=b;
        return true;
    }
    return false;
}

template<typename T> bool chmin(T &a,T b){
    if(a>b){
        a=b;
        return true;
    }
    return false;
}

using namespace std;
#define ALL(X) X.begin(),X.end()
using ll = long long int;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<vvll> vvvll;
const int MOD=1000000007;
//const int MOD=998244353;
const int INTMAX=2147483647;
const ll LLMAX=9223372036854775807;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    ll A,B,C,D;
    cin>>A>>B>>C>>D;
    
    ll n1=(C+B-1)/B;
    ll n2=(A+D-1)/D;
    
    if(n1<=n2)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    
    return 0;
}


Measured memory_bytes: 3612
a = int(input())
b = list(map(int,input().split()))
b.sort()
d = 0
 
if a <= 2:
  print("0")
else :
  for i in range(len(b)):
    for j in range(i+1,len(b)):
      for k in range(j+1,len(b)):
        if b[i]+b[j] > b[k] and b[i] != b[j] and b[j] != b[k]:
          d += 1
  print(str(d)) 

Measured memory_bytes: 9148
#include<bits/stdc++.h>
using namespace std;

#define rep(i,n) for(ll i=0;i<(n);++i)
using ll = long long;
using pll = pair<ll,ll>;
constexpr ll INF = (1LL<<60);
constexpr ll MOD = (1e9+7);
//constexpr ll MOD = (998244353);
template<class T> bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}return 0;}
#if loc||debg||local||debug
void dump(){cerr<<endl;}
template<class T,class... Ts> void dump(T&& h, Ts&&... t){cerr<<h<<", ";dump(forward<Ts>(t)...);}
#else
template<class T,class... Ts> void dump(T&& h, Ts&&... t){}
#endif
template<class T> istream &operator>>(istream&is,vector<T>&v){for(auto &elemnt:v)is>>elemnt;return is;}
template<class T,class U> istream &operator>>(istream&is,pair<T,U>&p){is>>p.first>>p.second;return is;}
template<class T> ostream &operator<<(ostream& os,vector<T>const& v){for(auto const& vi:v)os<<vi<<" ";return os;}
template<class T>vector<T> vec(size_t a){return vector<T>(a);}
template<class T, class... Ts>auto vec(size_t a, Ts... ts){return vector<decltype(vec<T>(ts...))>(a, vec<T>(ts...));}
template<class T>vector<T> _vec(size_t a,T v){return vector<T>(a,v);}
template<class T, class... Ts>auto _vec(size_t a, Ts... ts){return vector<decltype(_vec<T>(ts...))>(a, _vec<T>(ts...));}

int main(){

  int a,b,c;
  cin>>a>>b>>c;
  set<int> s;
  s.emplace(a);
  s.emplace(b);
  s.emplace(c);
  if(s.size()==2){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }

}

Measured memory_bytes: 256
//おまじない
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#define INF 1e9+7
#define rep(i,m,n) for(int i=m;i<n;i++)
#define mrep(i,m,n) for(int i=m;i<n;i--)
#define NO cout<<"NO"<<endl;
#define YES cout << "YES"<<endl;
#define No cout << "No"<<endl;
#define Yes cout << "Yes"<<endl;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;


//(int)'a'は97 (int)'A'は65
//おまじない



int main() {


	int al[26] = {0};
	string s;
	cin >> s;

	rep(i, 0, s.size()) {
		al[(int)s[i] - 97]++;
	}



	rep(i, 0, 26) {
		if (al[i] == 0) {
			cout << (char)(i + 97) << endl;
			return 0;
		}
	}

	cout << "None" << endl;

	return 0;
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n,k=0,ans=0;
  	cin>>n;
  	long long a[n];
  for (int i=0;i<n;i++)
  {
      cerr<<ans<<" ";
    cin>>a[i];
    if (i)
    {
      if(a[i]<=a[i-1])
        k++;
      else
      {
        ans=max(ans,k);
        k=0;
      }
    }
  }
  cout<<max(k,ans);
  
}


Measured memory_bytes: 1024
X = input()
MOD = 10**9 + 7
M = 13
S = [0]*M
S[0] = 1
T = [0]*M

def calc(S, T, x):
    for i in range(M):
        T[(i*10 + x) % M] += S[i]
    for i in range(M):
        T[i] %= MOD

zeros = [0]*M
for c in X:
    T[:] = zeros
    if c == "?":
        for x in range(10):
            calc(S, T, x)
    else:
        x = int(c)
        calc(S, T, x)
    S, T = T, S
print(S[5])

Measured memory_bytes: 45916
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

const int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------

int N;

int main() {
  cin >> N;
  cout << "ABC" << N;
}


Measured memory_bytes: 3644
#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<stack>
#include<queue>
#define INF 0x3f3f3f3f
#define lowbit(x) x & -x
#define lson root<<1,l,mid
#define rson root<<1|1,mid+1,r
using namespace std;
typedef long long ll;
const int mod=1e9+7;
const int N=2e5+5;
int a[N];
bool cmp(int a,int b){
    return a>b;
}
int main(){
#ifdef Mizp
    freopen("in.txt","r",stdin);
#endif
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
    }
    sort(a+1,a+1+n,cmp);
    ll sum=0;
    for(int i=2;i<=n;i++){
        sum+=a[(i+1)/2];
    }
    printf("%lld\n",sum);
    return 0;
}


Measured memory_bytes: 4612
/* 
	Author: ankrypt
*/


#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define ll long long int
#define u64 unsigned long long int

ll N;
ll arr[100005];

int main() {
	scanf("%lld", &N);
	for(int i = 0; i < N; i++) {
		scanf("%lld", &arr[i]);
	}
	ll gcd = arr[0];
	for(int i = 0; i < N; i++) {
		gcd = __gcd(gcd, arr[i]);
	}
	printf("%lld\n", gcd);
	return 0;
}
/*
	Powered by Buggy Plugin
*/


Measured memory_bytes: 1024
#include <bits/stdc++.h>

#define INF 1 << 29
#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)

using namespace std;

typedef pair<int,int> pii;
typedef long long int ll;

void gen_sosuu(int sosuu[]){
  REP(i,100010){
    sosuu[i] = true;
  }
  sosuu[0] = false;
  sosuu[1] = false;
  sosuu[2] = true;
  FOR(i,2,sqrt(100000)+1){
    if(sosuu[i] == false) continue;
    for(int j = 2; i*j<=100000;j++){
      //printf("%d %d %d\n",i*j,i,j);
      sosuu[i*j] =false;
    }
  }
}


int k, s;
ll sum = 0;
int main(){
  cin >> k>> s;
  REP(i,k+1)REP(j,k+1){
    if(i+j+k>=s&&i+j<=s) sum++;
  }
  cout << sum << endl;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;

ifstream in("test.in");
ofstream out("test.out");

const int DIM = 2e5 + 5;

int cnt[30];

pair<int, int> pts[DIM];
map<int, int> map1, map2;

vector<int> stk;

int main(void) {
    srand(unsigned(time(0)));
    
    int x1, y1, x2, y2, n;
    cin >> x1 >> y1 >> x2 >> y2 >> n;
    
    for (int i = 1; i <= n; ++i) {
        int x, y;
        cin >> x >> y;
        
        map1[x] = y;
        map2[y] = x;
        
        pts[i] = make_pair(x, y);
    }
    
    if (x1 > x2) {
        swap(x1, x2);
        swap(y1, y2);
    }
    
    if (x1 == x2 && y1 > y2) {
        swap(y1, y2);
    }

        sort(pts + 1, pts + n + 1);
        
        if (y1 < y2) {
            for (int i = 1; i <= n; ++i) {
                if (pts[i].second < y1 || pts[i].second > y2 || pts[i].first < x1 || pts[i].first > x2)
                    continue;
                
                if (stk.size() == 0 || stk.back() < pts[i].second)
                    stk.push_back(pts[i].second);
                else
                    stk[lower_bound(stk.begin(), stk.end(), pts[i].second) - stk.begin()] = pts[i].second;
            }
        }
        else {
            for (int i = 1; i <= n; ++i) {
                if (pts[i].second < y2 || pts[i].second > y1 || pts[i].first < x1 || pts[i].first > x2)
                    continue;
                
                if (stk.size() == 0 || stk.back() < -pts[i].second)
                    stk.push_back(-pts[i].second);
                else
                    stk[lower_bound(stk.begin(), stk.end(), -pts[i].second) - stk.begin()] = -pts[i].second;
            }
        }
        
        long double ans = 100.0 * (abs(x1 - x2) + abs(y1 - y2)) + (5.0 * M_PI - 20.0) * stk.size();
        
        if (stk.size() == min(abs(y2 - y1), abs(x2 - x1)) + 1)
            ans += (M_PI * 10.0 - 20.0) - (5.0 * M_PI - 20.0);
        
        cout << setprecision(15) << ans;
    
    return 0;
}


Measured memory_bytes: 21756
from itertools import permutations
N, M, Rn = map(int, input().split())
R = list(map(lambda x: int(x) - 1, input().split()))

G = [[float('inf')] * N for i in range(N)]
for m in range(M):
    a, b, c = map(int, input().split())
    a, b = a - 1, b - 1
    G[a][b] = c
    G[b][a] = c

for k in range(N):
    for i in range(N):
        for j in range(N):
            G[i][j] = min(G[i][j], G[i][k] + G[k][j])

ans = float('inf')
for route in permutations(R):
    tmp = 0
    for i in range(Rn - 1):
        tmp += G[route[i]][route[i + 1]]
    ans = min(ans, tmp)

print(ans)


Measured memory_bytes: 72664
#include <iostream>
#include <cmath>
using namespace std;

int main(){
    string s;
    cin >> s;
    string res;
    for(int i = 0;i < s.length();++i){
        if(i % 2 == 0) res += s[i];
    }
    cout << res << endl;
  return 0;
}

Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 1e16+7;
int mod = 1e9+7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
    int K,S;
    cin >> K >> S;
    int ans = 0;
    for(int i = 0; i <= K; i++) {
        for(int j = 0; i+j <= S && j <= K; j++) {
            if(S-i-j <= K) {
                ans++;
            }
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 3648
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner(System.in)) {
			int n = sc.nextInt();
			long ans = 0;
			for (int i = 1; i < n; i++) {
				ans += (n - 1) / i;
			}
			System.out.println(ans);
		}
	}
}

Measured memory_bytes: 35652
#include <bits/stdc++.h>
using namespace std;


using LL = long long int;
using uLL = unsigned long long int;
using uint = unsigned int;
using ld = long double;

const int N = 55;
const int M = 1000000007;

LL base[N][N], matrix[N][N], cop[N][N];


void kwadrat(int n){
    
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            cop[i][j] = 0;
        }
    }
    for(int i = 1; i <= n; i++){
        for(int k = 1; k <= n; k++){
            for(int j = 1; j <= n; j++){
                cop[i][j] += (matrix[i][k]*matrix[k][j])%M;
            }
        }
    }
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            matrix[i][j] = cop[i][j]%M;
        }
    }
}
void ilo(int n){
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            cop[i][j] = 0;
        }
    }
    for(int i = 1; i <= n; i++){
        for(int k = 1; k <= n; k++){
            for(int j = 1; j <= n; j++){
                cop[i][j] += (matrix[i][k]*base[k][j])%M;
            }
        }
    }
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            matrix[i][j] = cop[i][j]%M;
        }
    }
}

void fast_pow(int n, LL m){
    if(m <= 1) return;
    if((m&1) == 0){
        fast_pow(n, (m>>1));
        kwadrat(n);
        return;
    }
    fast_pow(n, m-1);
    ilo(n);
    return;
}


int main(){
    cin.tie(NULL);
    ios_base::sync_with_stdio(0);
    int n;
    LL k;
    cin >> n >> k;
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            cin >> matrix[i][j];
            base[i][j] = matrix[i][j];
        }
    }
    fast_pow(n, k);
    LL ans = 0;
    for(int i = 1; i <= n; i++){
        for(int j = 1; j <= n; j++){
            ans += matrix[i][j];
        }
    }
    cout << ans%M << '\n';
    return 0;
}

Measured memory_bytes: 384
import java.util.Arrays;
import java.util.Scanner;

class Main{

	static	int count = 0;
	public static void main(String[] args) {



		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		long[] A = new long[N];		

		int ans = 1;
		for(int i = 0;i < N;i++){
			A[i] = scanner.nextLong();

		}
		Arrays.sort(A);			

		int c= 0;
		for(int i = 0;i < N-1;i++){
			if(A[i] != A[i+1]){
				if(c % 2 == 0){
					ans++;
				}
				c = 0;
				
			}else{
				c++;
				if(i == N-2){
					if(c % 2 == 1){
						ans--;
					}
				}
			}
			
			
		}
		if(N == 1){
			ans++;
		}

		System.out.println(ans);



	}

}

class Pair implements Comparable{
	int from;
	int middle;
	int end;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}




Measured memory_bytes: 51284
#include <iostream>
using namespace std;


int main() {
	int c[3][3];
	
	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			cin >> c[i][j];
		}
	}
	
	int x = c[0][0] + c[1][1] + c[2][2];

	if (x == c[0][1] + c[1][2] + c[2][0] && x == c[0][2] + c[1][0] + c[2][1] && x == c[0][0] + c[1][2] + c[2][1] 
		&& x == c[0][1] + c[1][0] + c[2][2] && x == c[0][2] + c[1][1] + c[2][0]) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Measured memory_bytes: 256
use input::Input;

fn main() {
    let mut input = Input::default();

    let n = input.parse::<u32>();
    let ans = if n % 1000 == 0 { 0 } else { 1000 - n % 1000 };
    println!("{}", ans);
}

#[allow(dead_code)]
pub mod input {
    #[derive(Default)]
    pub struct Input(Vec<String>);

    impl Input {
        pub fn read_line(&mut self) -> String {
            let mut s = String::new();
            std::io::stdin().read_line(&mut s).ok().expect("read error");
            s
        }
        pub fn parse<T: std::str::FromStr>(&mut self) -> T {
            let x = if let Some(x) = self.0.pop() {
                x
            } else {
                let s = self.read_line();
                self.0 = s.split_whitespace().map(String::from).rev().collect();
                self.0.pop().expect("reached EOF")
            };
            x.parse().ok().expect("parse error")
        }
    }
}


Measured memory_bytes: 2160
#include <bits/stdc++.h>
#define itn int
#define rep(i, n) for (int i = 0; i < n; i++)

using namespace std;
typedef long long ll;

int main() {
  int a,b,t;
  cin >> a >> b >> t;
  int tmp=t/a;
  cout << tmp*b << endl;


}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>
#include <iomanip>
#include <limits>
#include <vector>
#include <algorithm>
#include <functional>

using ll = long long;

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
function <ll**(ll,ll)> array2= [=](ll x, ll y) {
	ll **array = new ll*[x];
	rep(i, x)array[i] = new ll[y];
	return array;
};
int main() {
	int s;
	cin >> s;
	ll **array = array2(s, 4);
	rep(i, s)rep(j, 4)cin >> array[i][j];
	rep(i, 4){
		rep(j, 3) {
			rep(k, 10) {
				int a = 0;
				rep(l, s) {
					if (array[l][0] == i+1 && array[l][1] == j+1 && array[l][2] == k+1) {
						a+=array[l][3];
					}
				}
				cout << " " << a;
			}
			cout << "\n";
		}
		if(i!=3)cout << "####################\n";
	}
}


Measured memory_bytes: 3072
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    long n;
    cin >> n;

    long ans = 0;

    n--;

    if(n % 2 == 0)
    {
        ans = ((n+1)*n) / 2;
    }else
    {
        ans = n;
        ans += ((n) * (n - 1)) / 2;

    }
    
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define pb push_back
#define all(v) v.begin(),v.end()
#define fi first
#define se second
#define bigger (char)toupper
#define smaller (char)tolower
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef long long ll;
typedef unsigned long long ull;

int main() {
    string S;
    cin>>S;
    if(S.at(2)==S.at(3)&&S.at(4)==S.at(5)) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
 
using namespace std;
inline void prep ()
{
  cin.tie (0);
  cin.sync_with_stdio (0);
};
const double pi = acos(-1.);
//printf(%.12lf\n,mid);
// __builtin_popcount(int) count 1's in binary
// get decimal part of number
/*
double intpart;
double thiss = modf((double)(n*m)/(double)k, &intpart);
*/
// round = (int)(num+.5)
long long mod = 998244353;
 
// 32 mil = ~1 sec 
long long mymod(long long num){
  if (num< 0 && !(num%mod == 0)){
    if (mod == 1){
      return 0;
    }
    return mod-abs(num)%mod;
  }else{
    return num%mod;
  }
}
 
/*string sentence = And I feel fine...;
    istringstream iss(sentence);
*/  
const int biggg = 2000000000;
const long long biggest = 1000000000000000000LL;
const double eps = .0000000001; 


int main ()
{
  prep();
  string s;
  cin >> s;
  int n = s.size();
  mod = 2019;
  // make pows of 10
  int pows[n];
  int cur = 1;
  for (int i=0; i<n; i++){
      pows[i] = cur;
      cur *= 10;
      cur %= mod;
  }
  // get big sums
  int sums[n];
  for (int i=0; i<n; i++){
      sums[i] = (pows[n-1-i]*(s[i]-'0'))%mod;
  }
  int freqs[2019] = {0};
  freqs[sums[0]]++;
  for (int i=1; i<n; i++){
      sums[i] += sums[i-1];
      sums[i] %= mod;
      freqs[sums[i]]++;
  }
  long long pairs = 0;
  int sub = 0;
  for (int i=0; i<n; i++){
      // start num w/ i
      pairs += freqs[sub];
      sub += sums[i]-(i>0?sums[i-1]:0);
      sub = mymod(sub);
      freqs[sums[i]]--;
  }
  cout << pairs;
  return 0;
}


Measured memory_bytes: 5304