akhauriyash/Code-Regression huggingface dataset:
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define tr(container, it) \
        for (auto it = container.begin(); it != container.end(); it++)
#define scontains(c, x) ((c).find(x) != (c).end())   //O(log n)
#define contains(c, x) (find((c).begin(),(c).end(),x) != (c).end()) //O(n)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define mll map<ll,ll>
#define intv(x, a, b)((x)>=a && (x)<=b)
#define  rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define  _for(i, end) for (__typeof(end) i = 0; i < (end); i += 1)
#define all(x) (x).begin(),(x).end()
//#define len(array)  (sizeof(array)/sizeof((array)[0]))
#define what_is(x) cerr << #x << " is " << x << endl;
#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define mod(x, m) ((((x) % (m)) + (m)) % (m))
const double PI = 2 * acos(.0);
const int INF = 0x3f3f3f3f;
const ll LLINF = 1000000000000000005LL;;
const ll MOD = (ll) (1e9) + 7;
void _mod(ll &x){x = mod(x, MOD);}
//const ll MOD = (ll) 998244353 ;
const double EPS = 1e-10;

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *) array, (T *) (array + N), val);
}


//#define int ll

class DAnOrdinaryGame {
public:
void solve(std::istream& cin, std::ostream& cout) {
    string s;
    cin >> s;
    if((s[0] == s[s.size()-1]) ^ (s.size()&1))cout << "First\n";
    else cout << "Second\n";

}
};


#undef int
int main() {
	DAnOrdinaryGame solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 512
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define roop(i, a, n) for(int i = (a); i < (n); i++)
using namespace std;
using ll = long long;

int main(){
    int n; cin >> n;
    int h[n];
    rep(i, n) cin >> h[i];

    int dp[n];
    memset(dp, 0, sizeof(dp));
    dp[1] = abs(h[1] - h[0]);
    roop(i, 2, n)
        dp[i] = min(dp[i-1] + abs(h[i] - h[i-1]), dp[i-2] + abs(h[i] - h[i-2]));

    cout << dp[n-1] << endl;
    return 0;
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcountll

#define INF 1e16
#define mod 1000000007

ll mod_pow(ll x,ll n){
  ll res=1;
  while(n>0){
    if(n&1)res=res*x%mod;
    x=x*x%mod;
    n>>=1;
  }
  return res;
}

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

  ll n;
  cin>>n;
  vector<ll> a(n);
  ll sum=0;
  rep(i,n){
    cin>>a[i];
    sum+=a[i];
    sum%=mod;
  }
  sum=sum*sum%mod;
  rep(i,n){
    sum=(sum-(a[i]*a[i]%mod)+mod)%mod;
  }
  sum*=mod_pow(2,mod-2);
  sum%=mod;
  cout<<sum<<endl;

  return 0;
}


Measured memory_bytes: 4748
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in Actual solution is at the top
 */

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}

	static class Task {
		public void solve(int testNumber, InputReader in, PrintWriter out) {
			String A = in.next();
			String B = in.next();
			if(A.charAt(0) == B.charAt(2) && A.charAt(1) == B.charAt(1) && A.charAt(2) == B.charAt(0)) {
				out.println("YES");
			}else{
				out.println("NO");
			}
		}
	}
	
	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

	}
}


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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))

// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;

int main(){
  string s;
  cin>>s;
  cout<<s[0]<<(s.size()-2)<<s.back()<<endl;
  return 0;
}


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

int main(){
    int n;
    int k;
    int i;
    int a;
    int h[100000];
    cin >> n;
    cin >> k;
    a = n;
    for(i = 0;i < n;i++){
        cin >> h[i];
        if(h[i] < k){
            a = a - 1;
        }
    }
    cout << a << endl;
    
    return 0;
}


Measured memory_bytes: 640
using System;

namespace AtCoderBC113B_Palace
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());

            string[] s = Console.ReadLine().Split(' ');
            int T = int.Parse(s[0]) - int.Parse(s[1]);

            string[] hs = Console.ReadLine().Split(' ');

            float[] Temp = new float[N];

            for (int i = 0; i < N; i++)
            {
                Temp[i] = Math.Abs((float)T - 0.006F * int.Parse(hs[i]));
            }

            int index = 0;
            float min = float.MaxValue;

            for(int i = 0; i < N;i++)
            {
                if(Temp[i] < min)
                {
                    min = Temp[i];
                    index = i + 1;
                }
            }

            Console.WriteLine(index.ToString());
        }
    }
}


Measured memory_bytes: 13204
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cmath>
#define rep(i, n) for (int i=0; i<n; i++)
#define ll long long
using namespace std;

vector<int> G;
ll cnt;

void insertionSort(int *A, int N, int G) {
	for (int i = G; i < N; i++) {
		int v = A[i];
		int j = i - G;
		while (j >= 0 && A[j] > v) {
			A[j+G] = A[j];
			j -= G;
			cnt++;
		}
		A[j+G] = v;
	}
}

void shellSort(int *A, int N) {
	for (int h = 1; ; ) {
		if (h > N) break;
		G.push_back(h);
		h = 3 * h + 1;
	}
	
	for (int i = G.size()-1; i >= 0; i--) {
		insertionSort(A, N, G[i]);
	}
}

int main() {
	int N;
	cin >> N;
	int A[N];
	rep(i, N) {
		cin >> A[i];
	}
	cnt = 0;
	shellSort(A, N);

	cout << G.size() << endl;
	for (int i = G.size() - 1; i >= 0; i--) {
		cout << G[i];
		if (i) cout << " ";
	}
	cout << "\n";
	cout << cnt << endl;
	rep(i, N) cout << A[i] << endl;
	return 0;
}


Measured memory_bytes: 7044
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bitset>
using namespace std;
#define INF 1000000007
#define LINF 100000000000000007
#define MOD 1000000007
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define ARDEB(i,X) cout<< #X <<"["<<i<<"]: "<<X[i]<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define ARDEB(i,X) {}
#define END {}
#endif
typedef long long  ll;
typedef pair<int,int> P;
struct edge{int to,cost;};

//�ő����
int ans;


signed main(){

    string s;
    cin>>s;
    if(s=="Sunny")cout<<"Cloudy"<<endl;
    if(s=="Cloudy")cout<<"Rainy"<<endl;
    if(s=="Rainy")cout<<"Sunny"<<endl;

}

Measured memory_bytes: 764
#include <stdio.h>
#define N 100000

int partition(int *,int,int);
void temp(int *,int *);

int main(){
  int i,n,q,A[N];

  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);

  q=partition(A,0,n-1);

  for(i=0;i<q;i++) printf("%d ",A[i]);
  printf("[%d] ",A[q]);
  for(i=q+1;i<n-1;i++) printf("%d ",A[i]);
  printf("%d\n",A[n-1]);

  return 0;
}

int partition(int *A,int p,int r){
  int i,j,x;

  x=A[r];
  i=p-1;

  for(j=p;j<r;j++){
    if(A[j]<=x){
      i++;
      temp(&A[i],&A[j]);
    }
  }
  temp(&A[i+1],&A[r]);

  return i+1;
}

void temp(int *a,int *b){
  int temp;

  temp=*a;
  *a=*b;
  *b=temp;
}

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

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

void solve(void){
  ll x, y; cin >> x >> y;

  rep(x, i) {
    rep(y, j) {
      if (i + j == x && 2 * i + 4 * j == y) {
        cout << "Yes" << endl;
        return;
      }
    }
  } 
  cout << "No" << endl;
}

int main(void) {
  solve();
  return 0;
}

Measured memory_bytes: 3632
#include <stdio.h>

int main(void)
{
    int A, B, C;
    char c;
    
    
    scanf("%d%d%d%c", &A, &B, &C, &c);
    
    if(A-B-C >= 0)
        printf("0\n");
    else
        printf("%d\n", C-(A-B));
    
    
    //system("pause");
    
    return 0;
}

Measured memory_bytes: 128
# -*- coding: utf-8 -*-

A = [0] * 3
for i in range(3):
  A[i] = list(map(int, input().split()))
N = int(input())
b = []
for i in range(N):
  b.append(int(input()))


for b_i in b:
  for i in range(3):
    for j in range(3):
      if A[i][j] == b_i:
        A[i][j] = 0

if A[0][0] == 0 and A[0][1] == 0 and A[0][2] == 0:
  print('Yes')
elif A[1][0] == 0 and A[1][1] == 0 and A[1][2] == 0:
  print('Yes')
elif A[2][0] == 0 and A[2][1] == 0 and A[2][2] == 0:
  print('Yes')
elif A[0][0] == 0 and A[1][0] == 0 and A[2][0] == 0:
  print('Yes')
elif A[0][1] == 0 and A[1][1] == 0 and A[2][1] == 0:
  print('Yes')
elif A[0][2] == 0 and A[1][2] == 0 and A[2][2] == 0:
  print('Yes')
elif A[0][0] == 0 and A[1][1] == 0 and A[2][2] == 0:
  print('Yes')
elif A[0][2] == 0 and A[1][1] == 0 and A[2][0] == 0:
  print('Yes')
else:
  print('No')

Measured memory_bytes: 62292
using System;
namespace Sample{
class Sample
  {
    static void Main(string[] args)
    {
    string[] str =Console.ReadLine().Split(' ');
      int a=int.Parse(str[0]);
      int b=int.Parse(str[1]);
      
      if((a<10)&&(b<10)){
        Console.WriteLine(a*b);
      }else{
        Console.WriteLine(-1);
      }
    
  }
 
}
}


Measured memory_bytes: 13140
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
    public static void main(final String[] args) {
        final FastScanner scanner = new FastScanner(System.in);
        final int n = scanner.nextInt();
        final long[] bars = new long[1001];
        for (int i = 0; i < n; i++) {
            bars[scanner.nextInt()]++;
        }

        for (int i = 1; i < 1001; i++) {
        }

        long answer = 0;
        for (int i = 1; i < 1001; i++) {
            if (bars[i] == 0) {
                continue;
            }

            if (bars[i] >= 3) {
                final long num = bars[i];
                answer += num * (num - 1) * (num - 2) / 6;
            }

            if (bars[i] >= 2) {
                for (int j = i + 1; j < i * 2 && j < 1001; j++) {
                    if (bars[j] == 0) {
                        continue;
                    }

                    final long num = bars[i];
                    answer += num * (num - 1) * bars[j] / 2;
                }
            }

            for (int j = i + 1; j < 1001; j++) {
                if (bars[j] == 0) {
                    continue;
                }

                if (bars[j] >= 2) {
                    final long num = bars[j];
                    answer += bars[i] * num * (num - 1) / 2;
                }

                for (int k = j + 1; k < i + j && k < 1001; k++) {
                    if (bars[k] == 0 || k == i || k == j) {
                        continue;
                    }

                    answer += bars[i] * bars[j] * bars[k];
                }
            }
        }
        System.out.println(answer);
    }

    static class FastScanner {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        FastScanner(final InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
            tokenizer = null;
        }

        String next() {
            if (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }
    }
}


Measured memory_bytes: 24532
/*#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>

#include <boost/rational.hpp>
*/
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
using ll = long long;
using ld = long double;
using pll = pair<ll,ll>;
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define rep3(i, n) for (ll i = 1; i < (ll)(n+1); i++)
#define rep4(i, s, n) for (ll i = (s); i < (ll)(n+1); i++)
#define repr(i,n) for (ll i = (n-1); i>=0;i--)
#define repr3(i,n) for(ll i = (n);i>0;i--)
#define repr4(i,s,n) for(ll i = (n);i>=(s);i--)
#define stlen(s) ll s.size()-1
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
#define cout(n) cout<<std::fixed<<std::setprecision(n)
using Graph = vector<vector<int>>;
using Graphw = vector<vector<pair<ll,ll>>>;
#define INF1  INT_MAX;
#define INF2  LLONG_MAX;
#define PI  3.14159265358979323846;
#define MOD 1000000007;
/*
namespace mp = boost::multiprecision;
// 任意長整数型
using Bint = mp::cpp_int;
// 仮数部長が32の浮動小数点数型
using Real32 = mp::number<mp::cpp_dec_float<32>>;
// 仮数部長が1024の浮動小数点数型
using Real1024 = mp::number<mp::cpp_dec_float<1024>>;
// 有理数型
using Rat = boost::rational<Bint>;
*/
const int mod = 1000000007;



int main(){
int N;
cin>>N;
ll A[N];
vector<ll> list;
map<ll,int> m;

rep(i,N){
    cin>>A[i];
    m[A[i]]++;
    if(m[A[i]]>=2){
        list.push_back(A[i]);
    m[A[i]]=0;
    }
}
sort(allr(list));
if(list.size()<2)cout<<0<<endl;
else cout<<list[0]*list[1]<<endl;

return 0;
}

Measured memory_bytes: 10432
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll lcm(ll a, ll b)
{
    ll g = gcd(a, b);
    return a / g * b;
}


void solve(long long N){
    ll ans = 0;
    if(N % 111 == 0){
        ans = N;
    }else{
        ans = (N / 111 + 1) * 111;
    }

    cout << ans << endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    solve(N);
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<set>
#include<map>
#include<bitset>
#define rep(i,a,b)  for(i=a;i<b;i++)
#define itrep(at)	for(auto it=at.begin();it!=at.end();it++)
#define lli long long int
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define vvll vector<vector<long long int> >
#define sll set<long long int>
#define mll map<long long int,long long int>
#define db double
#define M 1000000007
#define pi 3.1415926535897932384626433832795028841971

#define MAX 100005

using namespace std;
lli min(lli a,lli b){return a<b?a:b;}
lli min(lli a,lli b,lli c){a=min(a,b);a=min(a,c);return a;}
lli max(lli a,lli b){return a>b?a:b;}
lli max(lli a,lli b,lli c){a=max(a,b);a=max(a,c);return a;}
lli dsum(lli n){lli ans=0;while(n){ans+=(n%10);n/=10;}return ans;}

struct pll{
	lli x,y;
};
bool comp(pll a,pll b){
	if(a.x==b.x)	return a.y<b.y;
	else	return a.x<b.x;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);cout.tie(NULL);
	char ch;
	db aa,bb,cc;
	string s1,s2,s3;
    lli i,j,k,t,c,a,b,n,m,sum=0,ans=0,temp;
    cin >> n;
    lli a1[n],b1[n],c1[n];
    rep(i,0,n)	cin >> a1[i] >> b1[i] >> c1[i];
    vector<vector<lli> >dp(n,vector<lli>(3,0));
    dp[0][0]=a1[0];dp[0][1]=b1[0];dp[0][2]=c1[0];
    for(i=1;i<n;i++){
    	dp[i][0]=a1[i]+max(dp[i-1][1],dp[i-1][2]);
    	dp[i][1]=b1[i]+max(dp[i-1][0],dp[i-1][2]);
    	dp[i][2]=c1[i]+max(dp[i-1][1],dp[i-1][0]);
	}
	cout << max(dp[n-1][0],dp[n-1][1],dp[n-1][2]) << endl;
    
    
    return 0;
}

















/* UJJWAL KESHRI */

Measured memory_bytes: 8064
#ifndef call_from_test
#include<bits/stdc++.h>
using namespace std;
#endif
//BEGIN CUT HERE
template<typename T>
struct DiameterForVertex{
  vector<T> vs,dp;
  vector<vector<int> > G;
  DiameterForVertex(int n):dp(n),G(n){}
  DiameterForVertex(vector<T> vs):vs(vs),dp(vs.size()),G(vs.size()){}

  void add_edge(int u,int v){
    G[u].emplace_back(v);
    G[v].emplace_back(u);
  }

  void dfs(int v,int p,int &s){
    if(p<0) dp[v]=T(0);
    dp[v]+=vs[v];
    if(dp[s]<dp[v]) s=v;
    for(int u:G[v]){
      if(u==p) continue;
      dp[u]=dp[v];
      dfs(u,v,s);
    }
  }

  T build(){
    assert(!vs.empty());
    int s=0;
    dfs(s,-1,s);
    dfs(s,-1,s);
    return dp[s];
  }

  T build(vector<T> us){
    assert(us.size()==dp.size());
    vs=us;
    return build();
  }
};
//END CUT HERE
#ifndef call_from_test
struct FastIO{
  FastIO(){
    cin.tie(0);
    ios::sync_with_stdio(0);
  }
}fastio_beet;

//INSERT ABOVE HERE

signed AGC033_C(){
  int n;
  cin>>n;
  vector<int> vs(n,1);
  DiameterForVertex<int> G(vs);
  for(int i=1;i<n;i++){
    int x,y;
    cin>>x>>y;
    x--;y--;
    G.add_edge(x,y);
  }
  int ans=G.build();
  cout<<((ans%3!=2)?"First":"Second")<<endl;
  return 0;
}
/*
  verified on 2019/05/07
  https://atcoder.jp/contests/agc033/tasks/agc033_c
*/

signed ARC097_F(){
  int n;
  cin>>n;
  DiameterForVertex<int> G(n);
  vector<int> deg(n,0);
  for(int i=1;i<n;i++){
    int x,y;
    cin>>x>>y;
    x--;y--;
    G.add_edge(x,y);
    deg[x]++;
    deg[y]++;
  }

  string s;
  cin>>s;

  int cnt=(n-1)*2,num=0;
  queue<int> que;
  vector<int> dead(n,0);
  for(int i=0;i<n;i++){
    num+=(s[i]=='W');
    if((deg[i]==1)&&(s[i]=='B')){
      dead[i]=1;
      que.emplace(i);
    }
  }

  while(!que.empty()){
    int v=que.front();que.pop();
    cnt-=2;
    for(int u:G.G[v]){
      if(dead[u]) continue;
      deg[u]--;
      if(deg[u]==1&&(s[u]=='B')){
        dead[u]=1;
        que.emplace(u);
      }
    }
  }

  if(num<=1){
    cout<<num<<endl;
    return 0;
  }

  vector<int> vs(n,0);
  for(int i=0;i<n;i++){
    if(dead[i]) continue;
    vs[i]=deg[i]+(s[i]=='W');
    vs[i]%=2;
    cnt+=vs[i];
  }

  cout<<cnt-G.build(vs)*2<<endl;
  return 0;
}
/*
  verified on 2019/05/07
  https://atcoder.jp/contests/arc097/tasks/arc097_d
*/

signed main(){
  //AGC033_C();
  ARC097_F();
  return 0;
}
#endif


Measured memory_bytes: 11600
S=[]
p=0;q=10
for i in range(5):
  a=int(input())
  S.append(a)
for i in range(5):
  if S[i]%10==0:
    p=p+S[i]
  else:
    p=p+(S[i]//10+1)*10
    q=min(q,S[i]%10)
print(p-(10-q))

Measured memory_bytes: 3060
#include<stdio.h>
int main(){
	int a,b,c,s=0;

	scanf("%d%d%d",&a,&b,&c);
	if(a>b){
		s=a;
		a=b;
		b=s;
	}
	else if(b>c){
		s=b;
		b=c;
		c=s;
	}

	if(a>b){
		s=a;
		a=b;
		b=s;
	}
	else if(b>c){
		s=b;
		b=c;
		c=s;
	}
	if(a>b){
		s=a;
		a=b;
		b=s;
	}
	else if(b>c){
		s=b;
		b=c;
		c=s;
	}

	printf("%d %d %d\n",a,b,c);

	return 0;
}


Measured memory_bytes: 2108
#include<stdio.h>
#include<algorithm>
#include<functional>
#include<cmath>
using namespace std;
long long  mod = 1000000007;
int main()
{
	int N, A, B;
	scanf("%d%d%d", &N, &A, &B);
	int an1 = A * N;
	int an2 = B;
	if (an1 > an2) {
		printf("%d", an2);
	}
	else {
		printf("%d", an1);
	}
	return 0;
}

Measured memory_bytes: 128
suretsu = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(suretsu[int(input())-1])

Measured memory_bytes: 3060
import java.util.Scanner;

class Main {

    public static void main(String[] args) {
        new Main().compute();
    }

    void compute() {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        long a[] = new long[N];
        long b[] = new long[N];
        long c[] = new long[M];
        long d[] = new long[M];
        for (int i = 0; i < N; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }
        for (int i = 0; i < M; i++) {
            c[i] = sc.nextInt();
            d[i] = sc.nextInt();
        }
        for (int i = 0; i < N; i++) {
            int check = -1;
            long minDistance = 4 * (long) 1000000000 + 1;
            for (int j = 0; j < M; j++) {
                long currentDistance = Math.abs(a[i] - c[j]) + Math.abs(b[i] - d[j]);
                if (minDistance > currentDistance) {
                    minDistance = currentDistance;
                    check = j;
                }
            }
            System.out.println(check + 1);
        }

    }
}


Measured memory_bytes: 24916
/***********************
*  Author: xuziyuan    * 
***********************/

#include <bits/stdc++.h>

#define rt0 return 0
#define rep(i,n) for(int i=0;i<n;i++)
#define repn(i,n) for(int i=1;i<=n;i++)
#define replet(c) for(char c='a';c<='z';c++)
#define LL long long
#define pii pair <int,int>
#define pb push_back
#define fi first
#define se second
#define mpr make_pair
#define sqr(a) ((a)*(a))

using namespace std;

const LL MOD=1e9+7;

LL n,a[200010],ans;
bool vis[200010];

int main()
{
	cin>>n;
	rep(i,n) cin>>a[i];
	sort(a,a+n);
	for(LL pw=(LL)pow(2,34);pw>0;pw/=2)
	{
		for(int i=0,j=n-1;i<j;i++)
		{
			if(vis[i]) continue;
			while(i<j&&(vis[j]||a[i]+a[j]>pw)) j--;
			if(i<j&& !vis[j]&&a[i]+a[j]==pw)
			{
				ans++;
				vis[i]=vis[j]=true;
			}
		}
	}
	cout<<ans<<endl;
	rt0;
}

Measured memory_bytes: 2048
#include <stdio.h>

main(){
  int oturi[3]={1000,500,100};
  int ans[3];
  int a, b, i, temp, sa;

  while(1){
    scanf("%d %d", &a, &b);
    if(a==0 && b==0) break;

    sa=b-a;

    for(i=0;i<3;i++){
      ans[i]=0;
    }

    for(i=0;;i++){
      temp=sa-1000;
      if(temp>=0){
	ans[0]++;
	sa=temp;
      }
      else break;
    }

    for(i=0;;i++){
      temp=sa-500;
      if(temp>=0){
	ans[1]++;
	sa=temp;
      }
      else break;
    }

    for(i=0;;i++){
      temp=sa-100;
      if(temp>=0){
	ans[2]++;
	sa=temp;
      }
      else break;
    }

    printf("%d %d %d\n", ans[2], ans[1], ans[0]);
  }
  return 0;
}

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

int main()
{
    size_t N;
    cin >> N;

    long long x, y;
    vector<long long> a(N);
    vector<long long> b(N);
    for (size_t i = 0; i < N; i++)
    {
        cin >> x >> y;
        a[i] = x + y;
        b[i] = x - y;
    }
    sort(a.begin(), a.end());
    sort(b.begin(), b.end());
    cout << max(a.back() - a.front(), b.back() - b.front()) << endl;
}


Measured memory_bytes: 6424
while True:
    a, op, b = input().split()
    a = int(a)
    b = int(b)
    if op == "?":
        break
    elif op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a // b)



Measured memory_bytes: 5596
n = int(input())
a = [list(map(int, input().split())) for _ in range(n)]

ans = 0
muri = 0
for i in range(n - 1):
	for j in range(i + 1, n):
		equals = []
		max_length = 0
		for k in range(n):
			if k == i or k == j:
				continue
			elif a[i][k] + a[k][j] == a[i][j]:
				max_length = float("inf")
				equals.append(a[i][k] + a[k][j])
			elif a[i][k] + a[k][j] < a[i][j]:
				muri += 1
			if a[i][k] + a[k][j] > max_length:
				max_length = a[i][k] + a[k][j]
		if max_length < a[i][j]:
			muri += 1
		if max_length < 10 ** 10:
			ans += a[i][j]
		elif len(equals) >= 2:
			if a[i][j] != min(equals):
				muri += 1

if n == 2:
	print(a[0][1])
elif muri != 0:
	print(-1)
else:
	print(ans)

Measured memory_bytes: 50012
#include<iostream>
#include<algorithm>
#include<queue>
#include<vector>
using namespace std;
#define int long long
priority_queue<int>q;
int x,y,z,k;
int a[1001],b[1001],c[1001];
bool cmp(int j,int k)
{
    return k<j;
}
signed main()
{
    cin>>x>>y>>z>>k;
    for(int i=1;i<=x;i++)cin>>a[i];
    for(int i=1;i<=y;i++)cin>>b[i];
    for(int i=1;i<=z;i++)cin>>c[i];
    sort(a+1,a+1+x,cmp);
    sort(b+1,b+1+y,cmp);
    sort(c+1,c+1+z,cmp);
    for(int i=1;i<=x;i++)
    {
        for(int j=1;i*j<=k&&j<=y;j++)
        {
            for(int s=1;s*i*j<=k&&s<=z;s++)
            {
            	q.push(a[i]+b[j]+c[s]);
            	//cout<<i<<' '<<j<<' '<<s<<' '<<a[i]+b[j]+c[s]<<endl;
			}
        }
    }
    for(int i=1;i<=k;i++)
    {
    	cout<<q.top()<<endl;
    	q.pop();
	}
    return 0;
}

Measured memory_bytes: 1400
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<cassert>
#include<complex>
using namespace std;

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
typedef pair<int, int>P;
typedef pair<int, bool> sP;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef pair<ll, ll> LP;
typedef vector<ll> vec;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-5;
const ld pi = acos(-1.0);
typedef vector<vector<ll>> mat;
typedef vector<ll> vec;

int mex(vector<int> &v) {
	sort(v.begin(), v.end());
	v.erase(unique(v.begin(), v.end()),v.end());
	rep(i, v.size()) {
		if (i != v[i])return i;
	}
	return v.size();
}

bool used[20][20][20][20];
int win[20][20][20][20];
char mp[20][20];

int dfs(int lx, int ly, int rx, int ry) {
	if (lx > rx || ly > ry)return 0;
	if (used[lx][ly][rx][ry])return win[lx][ly][rx][ry];
	used[lx][ly][rx][ry] = true;
	vector<int> v;
	Rep1(i, lx, rx) {
		Rep1(j, ly, ry) {
			if (mp[i][j] == 'X')continue;
			int x = 0;
			x ^= dfs(lx, ly, i - 1, j - 1);
			x ^= dfs(lx, j + 1, i - 1, ry);
			x ^= dfs(i + 1, ly, rx, j - 1);
			x ^= dfs(i + 1, j + 1, rx, ry);
			v.push_back(x);
		}
	}
	return win[lx][ly][rx][ry] = mex(v);
}
int h, w;
void solve() {
	cin >> h >> w;
	rep(i, h) {
		rep(j, w) {
			cin >> mp[i][j];
		}
	}
	int u = dfs(0, 0, h - 1, w - 1);
	if (u == 0) {
		cout << "Second" << endl;
	}
	else {
		cout << "First" << endl;
	}
}


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	//cout << fixed << setprecision(7);
	//init();
	solve();
	//stop
	return 0;
}




Measured memory_bytes: 3944
#include <iostream>
using namespace std ;
using ll = long long ;


int main(){
    ll n ; cin >> n ;
    ll mn = 10000000000 ;
    ll mx = 0 ;
    for(int i=0;i<n;i++){
        ll a ; cin >> a ;
        if(mn>a) mn = a ;
        if(mx<a) mx = a ;
    }
    cout << mx-mn << endl ;
}


Measured memory_bytes: 256
// C - Christmas Eve

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 2147483647;
// const ll INF = 9223372036854775807;
// const ll MOD = 1e9 + 7;

int h[100000];

int main() {
	int N, K;
	cin >> N >> K;

	for (int i=0; i<N; i++) {
		cin >> h[i];
	}

	sort(h, h+N);

	int ans = INF;

	for (int i=0; i+K-1<N; i++) {
		ans = min(ans, h[i+K-1] - h[i]);
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 4008
#include <stdio.h>

#define LEN 100000

typedef struct {
  char name[11];
  int t;
}P;

P queue[LEN];

int head = 0;
int tail;

void enqueue(P);
P dequeue(void);

int main()
{
  int i, n, q, ncount, elaps = 0;
  P x;
  
  scanf("%d%d",&n,&q);

  for(i = 0; i < n; i++) {
    scanf("%s%d",x.name,&x.t);
    enqueue(x);
  }
  

  ncount = n;
  while(1) {
    x = dequeue();
    if(x.t > q) {
      elaps+= q;
      x.t -= q;
      enqueue(x);
    }
    else {
      elaps += x.t;
      printf("%s %d\n",x.name,elaps);
      ncount--;
      if(ncount == 0) break;
    }
  }
  
  return 0;
}

void enqueue(P x)
{
  queue[tail] = x;
  tail = (tail+1) % LEN;
}

P dequeue(void)
{
  P x;

  x = queue[head];
  head = (head+1) % LEN;
  return x;
}





Measured memory_bytes: 3356
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
def resolve():
    N,M=pin()#NofKen,MofSi
    PY=[[]for i in range(N)]
    
    for m in range(M):
        p,y=pin()
        PY[p-1].append([y,m])
    #print(PY)
    ANS=[]
    for i in range(N):
        PY[i].sort(key=lambda x:x[0])
        for n,py in enumerate(PY[i]):
            py[0]=n+1
            ANS.append([i+1]+py)
    #print(ANS)
    ANS.sort(key=lambda x:x[2])
    
    
    #print(ANS)
    PY=ANS
    for k in range(M):
        x,y,z=PY[k]
        X,Y=str(x),str(y)
        t,s=6-len(X),6-len(Y)
        if t>0:
            X="0"*t+X
        if s>0:
            Y="0"*s+Y
        print(X+Y)

#%%submit!
resolve()

Measured memory_bytes: 83248
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int k = sc.nextInt();
    int x = sc.nextInt();
    int min = -1000000;
    int max = 1000000;
    int black[] = new int[2*k-1];
    for(int i=0;i<2*k-1;i++){
      black[i]=x-k+i+1;
    }
    for(int i=0;i<2*k-1;i++){
      if(black[i]>=min&&black[i]<=max){
        System.out.print(black[i]+" ");
      }
    }    
  }
}

Measured memory_bytes: 21844
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <list> 
#include<algorithm>
#include<cmath>
#include<map>
#include<vector>
#include<string>
#include<fstream>
#include<set>
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define forl(i,a,n) for(int i=a;i<n;i++)
#define rfor(i,n,a) for(int i=n;i>=a;i--)
#define ll long long
#define ull unsigned long long
#define ld long double
#define pb push_back
#define ld long double
#define vi vector<int>
#define vll vector<long long>
#define pi pair<int,int>
#define pll pair<long long,long long>
#define mp make_pair
#define B begin()
#define E end()
#define S size()
#define m9 1000000007
#define endl "\n"
using namespace std;
 
 

 
ll gcd(ll x,ll y)
{
    if(x==0) return y;
    return gcd(y%x,x);
}

ll powmod(ll x, ll y, ll m) 
{ 
    if (y == 0) 
        return 1; 
    ll p = powmod(x, y/2, m) % m; 
    p = (p * p) % m; 
    return (y%2 == 0)? p : (x * p) % m; 
} 

 
ll mul_inv(ll a, ll b) {
    ll b0 = b, t, q;
    ll x0 = 0ll, x1 = 1ll;
    if (b == 1ll) return 1ll;
    while (a > 1ll) {
        q = a / b;
        t = b, b = a % b, a = t;
        t = x0, x0 = x1 - q * x0, x1 = t;
    }
    if (x1 < 0ll) x1 += b0;
    return x1;
}
 
 
#define p0(a) cout << a << " "
#define p1(a) cout << a << endl
#define p2(a, b) cout << a << " " << b << endl
#define p3(a, b, c) cout << a << " " << b << " " << c << endl
#define p4(a, b, c, d) cout << a << " " << b << " " << c << " " << d << endl
#define pin(a) for(auto x:a)cout<<x<<" ";cout<<endl
#define fck(a) cout<<a;exit(0)
#define vvll vector<vector<ll> >
#define A(b) b.begin(),b.end()
#define vpi std::vector<pll>
#include <array>
#include <stack>
#define arr2 array<ll,2>
#define arr3 array<ll,3>
#define varr2 vector<array<ll,2> >
#define varr3 vector<array<ll,3> >
//include<bits/stdc++.h>
 
 
bool fa(vll &x,vll &y){return x[0]<y[0];}
bool fa1(vll &x,vll &y){return x[1]<y[1];}
bool f1(pll &x,pll &y){return x.second>y.second;}
bool f2(pll &x,pll &y){
    return x.first>y.first;
}
 
 
bool f3(ll &x,ll &y){
    return x>y; 
    }


const ll maxn=2e5+2;





int main()
{ fastio;
//freopen("input.txt, "r", stdin); 
//freopen("output.txt", "w", stdout);

ll d,s,t;cin>>d>>s>>t;
if(s*t>=d){
    cout<<"Yes\n";
}
else{
    cout<<"No\n";
}


  







return 0;
}





  







Measured memory_bytes: 3648
import numpy as np
n, x = map(int, input().split())
ans = 1
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    divisors.sort()
    return divisors
def check(n, li):
    for i in li:
        if i != 0:
            if abs(i) % n != 0:
                return False
    return True
li = list(map(int, input().split()))
li.append(x)
li = list(set(li))
li.sort()
start_index = li.index(x)
li = np.array(li)
if start_index == len(li)-1:
    n = li[start_index] - li[start_index - 1]
    n_div = make_divisors(n)
    for i in n_div[::-1]:
        if check(i, li-x) and i > ans:
            ans = i
            break
        
elif start_index == 0:
    n = li[start_index+1] - li[start_index]
    n_div = make_divisors(n)
    for i in n_div[::-1]:
        if check(i, li-x) and i > ans:
            ans = i
            break
else:
    n = li[start_index] - li[start_index - 1]
    n_div = make_divisors(n)
    for i in n_div[::-1]:
        if check(i, li-x) and i > ans:
            ans = i
            break
    n = li[start_index+1] - li[start_index]
    n_div = make_divisors(n)
    
    for i in n_div[::-1]:
        if check(i, li-x) and i > ans:
            ans = i
        if ans > i:
            break

print(ans)


Measured memory_bytes: 23372
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char s[105],t[105];
int main()
{
    scanf("%s",s);
    scanf("%s",t);
    int flag;
    for(int i=0;s[i]!='\0';i++)
    {

        if(t[0]==s[i])
        {
            flag=1;
            int x=i+1;
            for(int j=1;t[j]!='\0';j++)
            {
                if(s[x]=='\0')
                {
                    j--;
                    x=0;
                    continue;
                }
                if(t[j]!=s[x++])
                {
                    flag=0;
                    break;
                }

            }
        }
        if(flag)
                break;
    }
    if(flag==0)
            cout<<"No"<<endl;
        else
            cout<<"Yes"<<endl;
}


Measured memory_bytes: 256
import java.util.*

var n = -1
val bit = Array(26) {Array(500002) {0}}

// 1-indexed
fun sum(alpha:Int, i: Int): Int{
    var res = 0
    var j = i
    while (j > 0) {
        res += bit[alpha][j];
        j -= j and (-j)
    }
    return res
}

fun sum(alpha: Int, i: Int, j: Int): Int {
    return sum(alpha, j) - sum(alpha, i - 1)
}

fun add(alpha: Int, i: Int, value: Int){
    var j = i
    while(j <= n){
        bit[alpha][j] += value
        j += j and (-j)
    }
}

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    n = sc.nextInt()
    val s = sc.next().toCharArray()
    s.forEachIndexed { index, c -> add(c - 'a', index + 1, 1) }
    val q = sc.nextInt()
    repeat(q) {
        val op = sc.nextInt()
        if (op == 1) {
            val i = sc.nextInt()
            val from = s[i - 1] - 'a'
            val to = sc.next()[0] - 'a'
            s[i - 1] = 'a' + to
            add(from, i, -1)
            add(to, i, 1)
        } else {
            val l = sc.nextInt()
            val r = sc.nextInt()
            println((0 until 26).map { if(sum(it, l, r) > 0) 1 else 0 }.sum())
        }
    }
}

Measured memory_bytes: 146292
L, R = map(int, input().split())

if R - L >= 2019:
    res = 0
else:
    res = float("inf")
    L = L % 2019
    R = R % 2019
    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            res = min(res, (i * j) % 2019)
print(res)


Measured memory_bytes: 9180
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

#include <fstream>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <unordered_map>
#include <bitset>
#include <numeric>
#include <unordered_set>
#include <bitset>
#include <limits>
#include <random>
#include <complex>
#include <numeric>
#include <cstdlib>
#include <random>
#include <bits/stdc++.h>


using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
//typedef vector<ll> vec;
//typedef vector<vec> mat;

const ll mod=1000000007ll;
const ll inf=1000000000000000ll;

const ll MAX_N=200010;

ll a,b;

int main(){
  cin>>a>>b;
  if((a*b)%2==1)cout<<"Odd"<<endl;
  else cout<<"Even"<<endl;
  return 0;
}


Measured memory_bytes: 256
#pragma GCC optimize(3)
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/priority_queue.hpp>
#define MAXN 100005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef pair<int,int> P;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef __gnu_pbds::priority_queue<int,greater<int>,pairing_heap_tag> pq;
int n,k,a[MAXN],maxi,g;
int main()
{
    scanf("%d%d",&n,&k);
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        maxi=max(maxi,a[i]);
        g=__gcd(g,a[i]);
    }
    if(k%g==0&&k<=maxi) puts("POSSIBLE"); else puts("IMPOSSIBLE");
    return 0;
}



Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
int parent[200007];
void SET(int n)
{
    for(int i=1;i<=n;i++) parent[i]=i;
}
int Find(int x)
{
    if(parent[x]==x) return x;
    else return parent[x] = Find(parent[x]);
}
void Union(int a, int b)
{
    int u = Find(a); int v = Find(b);
    if(u!=v)
        parent[u]=v;
}
int main()
{
    #ifdef TarekHasan
        freopen("input.txt","r",stdin);
    #endif // TarekHasan

    int n,m; cin >> n >> m;
    SET(n);
    for(int i=0;i<m;i++)
    {
        int a,b; cin >> a >> b;
        Union(a,b);
    }
    for(int i=1;i<=n;i++) Find(i);
    map< int , int > mp;
    for(int i=1;i<=n;i++)
        mp[parent[i]]++;
    int answer = 0;
    for(auto x : mp)
    {
        answer = max(answer,x.second);
    }
    cout << answer << endl;

    return 0;
}


Measured memory_bytes: 13592
#include <iostream>
#include <vector>
#include <algorithm>
using ll = long long;
#define rep(i, n) for(ll i = 0; i < n; i++)
using namespace std;

int main(){
  ll a, b;
  cin >> a >> b;
  a--;
  ll xa, xb;
  if (a < 0) xa = 0;
  else if (a % 2 == 1) xa = (a/2+1) % 2;
  else xa = a + ((a+1)/2 % 2);
  if (b % 2 == 1) xb = (b/2+1) % 2;
  else xb = b + ((b+1)/2 % 2);
  ll ans = 0;
  ll x = 0;
  while(xa || xb){
    if ( (xa & 1) != (xb & 1) ) ans += (1LL<<x);
    xa >>= 1; xb >>= 1;
    x++;
  }
  cout << ans << endl;
  
  return 0;
}

Measured memory_bytes: 3624
// class point	の練習（クラスの高度な実装）
#include <iostream>
#include <vector>
#include <algorithm>

typedef long long llong;
using namespace std;



int main() {
	int n, m;
	llong A[100][100];
	llong b[100];
	llong ans =  0 ;
	cin >> n >> m;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < m; j++) {
			cin >> A[i][j];
		}
	}
	for (int i = 0; i < m; i++)cin >> b[i];

	for (int i = 0; i < n; i++) {
		ans = 0;
		for (int j = 0; j < m; j++)ans += A[i][j] * b[j];
		cout << ans << endl;
	}
	return 0;
}



Measured memory_bytes: 3188
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define ppi pair<int,int>
#define ppl pair<ll,ll>
#define all(x) x.begin(),x.end()
#define ii int,int 
#define mm map<ii>
#define ff first    
#define ss second
#define forn(i,a,b) for(int i=a;i<b;i++)
#define forr(i,a,b) for(int i=a;i>=b;i--)
#define forv(i,m) for(auto i : m)
#define imx INT_MAX
#define imn INT_MIN
#define inf LONG_MAX
#define minf LONG_MIN
#define endl "\n"
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define sze size()
#define rvs reverse 
#define itr iterator 

/*
#define MODM(a,b,md) ((a%md)*(b%md))%md
#define MODA(a,b,md) ((a%md)+(b%md))%md
#define ull unsigned long long int
#define si short int
*/

/*
bool compare(int a,int b) {return a > b;}
bool compare1(ppi a,ppi b) {return a.ff > b.ff;}
bool compare2(ppi a,ppi b) {return a.ss < b.ss;}
ll Npower(ll a,ll b) {ll product = 1; while(b){if(b&1){product = product*a;}a = a*a;b = b>>1;} return product;}
ll power(ll a,ll b,ll md) {ll product = 1; while(b){if(b&1){product = MODM(product,a,md);}a = MODM(a,a,md);b = b>>1;} return product%md;}
ll GCD(ll a,ll b) {return b==0 ? a:GCD(b,a%b);}
ll LCM(ll a,ll b) {return (a/GCD(a,b))*b; }
*/


int main()
{
    fast

    int n,d;

    cin>>n>>d;

    vector<vector<int>> v(n,vector<int>(d));

    forn(i,0,n)
    {
        forn(j,0,d)
        {
            cin>>v[i][j];
        }
    }

    int count = 0;
    forn(i,0,n)
    {
        forn(j,i+1,n)
        {
            ll val = 0;
            forn(k,0,d)
            {
                val += (v[i][k]-v[j][k])*(v[i][k]-v[j][k]);
            }

            if(((ll)sqrt(val))*((ll)sqrt(val)) == val)
            {
                count++;
            }
        }
    }


    cout<<count;

    return 0;
}

Measured memory_bytes: 256
/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂
                   
                   ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ            
 
 */ 
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops"
#include<bits/stdc++.h>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//template <typename T, typename cmp=less<T>> using oset =tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long 
#define mod 1000000007
#define MOD 998244353
#define inf 100000000000000000
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define _it iterator
#define all(_x) _x.begin(),_x.end()
#define f first
#define s second
#define pb push_back
#define ar array
#define ld long double

void mahakal(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	freopen("error.txt","w",stderr);
	#endif
}
ll dx[4]={1,0,-1,0};
ll dy[4]={0,1,0,-1};
// char c[4]={'D' , 'R' , 'U' , 'L'};
const ll maxN=3e5+5;
ll n , k;

void solve(){
  string s ;
  cin>> s; n=s.length();
  if(s[n-1]=='s'){
      cout<<s<<"es"<<endl;
  }
  else{
      cout<<s<<"s"<<endl;
  }
}

int main(){
// 	mahakal();
	fast;
	ll t =1 ;
// 	cin>> t ; 
	while(t--)solve();
// 	cerr << "\ntime taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; 
	return 0;
}


Measured memory_bytes: 3656
#include <iostream>

using namespace std;

int gcd(int a, int b) {
	if (b == 0) return a;
	else return gcd(b, a%b);
}

int main() {
	int N;

	cin >> N;

	int g,monster;
	cin >> g;
	for (int i = 1; i < N; i++) {
		cin >> monster;
		g = gcd(g, monster);
	}

	cout << g << endl;

	return 0;
}

Measured memory_bytes: 384
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <algorithm>
#include <utility>
#include <functional>
#include <fstream>
#define debug(x) cout << #x << " = " << x << endl
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,n) for(int i = 0; i < (n); i++)
#define repr(i,n) for(int i = (n); i > -1; i--)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const double EPS = 1e-9;


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

  int n;
  cin>>n;
  int d[n];
  rep(i,n) cin>>d[i];
  int m;
  cin>>m;
  int t[m];
  rep(i,m) cin>>t[i];
  map<int,int> an;
  map<int,int> setto;
  rep(i,n) an[d[i]]++;
  rep(i,m) setto[t[i]]++;
  bool flag = true;
  rep(i,m) {
    if(an[t[i]] < setto[t[i]]) flag = false;
  }
  if(flag) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }

  return 0;
}


Measured memory_bytes: 20608
from queue import Queue
h, w = map(int, input().split())
MAZE = ['#'*(w+2)]
for _ in range(h):
    MAZE.append("#"+input()+"#")
else:
    MAZE.append('#'*(w+2))

INF = 10**3
directions = [(-1, 0), (0, 1), (1, 0), (0, -1)]


def bfs(init_x, init_y):
    dist = [[INF]*(w+2) for _ in range(h+2)]
    q = Queue()
    q.put((init_x, init_y))
    dist[init_x][init_y] = 0
    MAX = 0
    while not q.empty():
        x, y = q.get()
        for i, j in directions:
            if MAZE[x+i][y+j] == '#':
                continue
            if dist[x+i][y+j] <= dist[x][y]+1:
                continue
            dist[x+i][y+j] = dist[x][y]+1
            q.put((x+i, y+j))
        MAX = max(MAX, dist[x][y])
    return MAX


ans = 0
for i in range(1, h+1):
    for j in range(1, w+1):
        if MAZE[i][j] == '#':
            continue
        ans = max(ans, bfs(i, j))
print(ans)


Measured memory_bytes: 4080
#include <bits/stdc++.h>
#define MOD 100000007
#define PI 3.141592653589793238
#define pb push_back
#define ALL(V) (V).begin(), (V).end()
#define rep(i, a, b) for(int i = (a); i < (b); ++i)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long long int lint;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<int> VI;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;
inline ll gcd(ll a, ll b) { return (a % b == 0 ? b : gcd(b, a % b)); }
inline ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
inline ll char_to_ll(char c) { return (int)(c - '0'); }
inline ll string_to_ll(string s) { return atoi(s.c_str()); }
inline bool is_prime(ll x){ if(x <= 1) return false; for(ll i = 2; sqrt(i) <= x; i++) if(x % i == 0) return false; return true; }

int main(){
    ll N, M;
    cin >> N >> M;
    VL A(N);
    rep(i, 0, N) cin >> A[i];

    ll total = 0;
    rep(i, 0, N) total += A[i];

    ll ok = 0;
    rep(i, 0, N){
        if(A[i] >= total / (4.0 * M)) ok++;
    }

    cout << (ok >= M ? "Yes" : "No") << endl;

    return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>

static int N, M;
static std::map<std::string, int> st;  ///< Represents s and t.
typedef std::pair<std::string, int> pair_si;
static std::vector<pair_si> vec;

bool cmp(const pair_si &left, const pair_si &right) {
    return left.second > right.second;
}

void get_input() {
    std::string s;

    std::cin >> N;

    for (int i = 1; i <= N; ++i) {
        std::cin >> s;

        if (st.find(s) == st.end()) {
            st[s] = 1;
        } else {
            st[s] = st[s] + 1;
        }
    }

    std::cin >> M;

    for (int i = 1; i <= M; ++i) {
        std::cin >> s;

        if (st.find(s) == st.end()) {
            st[s] = -1;
        } else {
            st[s] = st[s] - 1;
        }
    }
}

int main() {
    get_input();

    for (pair_si p: st) {
        vec.push_back(p);
    }

    std::sort(vec.begin(), vec.end(), cmp);
    std::cout << std::max(0, (*vec.begin()).second) << std::endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>

using namespace std;

int main() {
	int n;
	cin >> n;
	int a, b;
	cin >> a >> b;
	int v[n+1] = {};
	int t[5];
	int tt = 10000;
	int m = 0;
	int k = 0;

	for (int i = 0; i < n+1; i++) {
		k = i;
		tt = 10000;
		for (int j = 0; j < 5; j++) {
			t[j] = k / tt;
			k -= tt*t[j];
			tt /= 10;
		}
		m = 0;
		for (int j = 0; j < 5; j++)m += t[j];
		if (a <= m&&m <= b)v[i] = i;
	}


	int ans = 0;
	for (int i = 0; i < n+1; i++)ans += v[i];
	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256