akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <math.h>
#include <iomanip>
#include <limits>
#include <list>
#include <queue>
#include <tuple>
#include <map>
#include <stack>
#include <set>
using namespace std;
#define MOD (long long int)(1e9+7)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define INF (int)(1123456789)
#define LINF (long long int)(112345678901234567)
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
#define all(v) v.begin(), v.end()

const int N = (int)3e5;

ll mpow(ll a, ll b){
  if(b==0) return 1;
  else if(b%2==0){ll memo = mpow(a,b/2); return memo*memo%MOD;}
  else return mpow(a,b-1) * a % MOD;
}
ll lpow(ll a, ll b){
  if(b==0) return 1;
  else if(b%2==0){ll memo = lpow(a,b/2); return memo*memo;}
  else return lpow(a,b-1) * a;
}
ll gcd(ll a, ll b){
  if(b==0) return a;
  else return gcd(b, a%b);
}
vector<ll> kaijo_memo;
ll kaijo(ll n){
  if(kaijo_memo.size() > n) return kaijo_memo[n];
  if(kaijo_memo.size() == 0) kaijo_memo.push_back(1);
  while(kaijo_memo.size() <= n) kaijo_memo.push_back(kaijo_memo[kaijo_memo.size()-1] * kaijo_memo.size() % MOD);
  return kaijo_memo[n];
}
vector<ll> gyaku_kaijo_memo;
ll gyaku_kaijo(ll n){
  if(gyaku_kaijo_memo.size() > n) return gyaku_kaijo_memo[n];
  if(gyaku_kaijo_memo.size() == 0) gyaku_kaijo_memo.push_back(1);
  while(gyaku_kaijo_memo.size() <= n) gyaku_kaijo_memo.push_back(gyaku_kaijo_memo[gyaku_kaijo_memo.size()-1] * mpow(gyaku_kaijo_memo.size(), MOD-2) % MOD);
  return gyaku_kaijo_memo[n];
}

ll nCr(ll n, ll r){
  if(n == r) return 1;//0個の丸と-1個の棒みたいな時に時に効く？不安.
  if(n < r || r < 0) return 0;
  ll ret = 1;
  ret *= kaijo(n); ret %= MOD;
  ret *= gyaku_kaijo(r); ret %= MOD;
  ret *= gyaku_kaijo(n-r); ret %= MOD;
  return ret;
}


int main(void){
  ll n,a;
  cin>>n>>a;

  ll ans = LINF;
  reps(k, 40){
    ll b=0;
    if(k == 1){
      b = n;
    }else{
      while(lpow(b,k) <= n){
        b++;
      }
      b--;
    }
    //cout<<b<<endl;
    ll memo = lpow(b,k);
    int num = 0;
    while(memo < n){
      num++;
      memo /= b;
      memo *= (b+1);
    }
    //cout<<k<<" "<<b<<" "<<num<<" "<<b*k+num + (k-1)*a<<endl;
    chmin(ans, b*k+num + (k-1)*a);
  }
  cout<<ans<<endl;
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<math.h>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#include<map>
using namespace std;
#define INF 1<<20

struct edge{
	int to;
	int cost;
	edge() {};
	edge(int a, int b) {
		to = a;
		cost = b;
	}
};

struct Node {
	int pos;
	int cost;
	Node() {};
	Node(int a, int b) {
		pos = a;
		cost = b;
	}
	bool operator <(const Node& rhs) const {
		return cost > rhs.cost;
	}
};

void dijkistra(int st, int TO,int V,vector<vector<edge> > graph) {
	priority_queue<Node> q;
	vector<int> d(V);
	for (int i = 0;i < V;i++) {
		d[i] = INF;
	}
	d[st] = 0;
	q.push(Node(st, 0));
	while (!q.empty()) {
		Node s = q.top(); q.pop();
		int pos = s.pos;
		for (int i = 0;i < graph[pos].size();i++) {
			int to = graph[pos][i].to;
			int cost = graph[pos][i].cost;
			if (d[pos] + cost < d[to]) {
				d[to] = d[pos] + cost;
				q.push(Node(to, d[to]));
			}

		}
	}
	cout << d[TO] << endl;
}
int partition(int A[],int p, int r) {
	int x = A[r];
	int i = p - 1;
	for (int j = p;j < r;j++) {
		if (x >= A[j]) {
			i = i + 1;
			swap(A[i], A[j]);
		}
	}
		swap(A[i + 1], A[r]);
		return i + 1;
}
void quicksort(int A[], int p, int r) {
	if (p < r) {
		int q = partition(A, p, r);
		quicksort(A, p, q-1);
		quicksort(A, q + 1, r);
	}
}

int getNumberOfCoin(int C[],int n,int m) {
	int T[50000];
	for (int j = 0;j <= n;j++) {
		T[j] = INF;
	}
	T[0] = 0;
	for (int i = 0;i < m;i++) {
		for (int j = 0;j <= n;j++) {
			if (j - C[i] >=0  ) {
				T[j] = min(T[j], T[j - C[i]] + 1);
			}
		}
	}
	return T[n];
}
int knapsack(int w, int n,int* v,int* ww) {
	int W[101][10001];
		for (int j = 0;j <= w;j++) {
			W[0][j] = 0;
		}
	for (int i = 0;i < n;i++) {
		for (int k = 0;k < n;k++){
			for (int j = 0;j <= w;j++) {
				if (j - ww[k] < 0) {
					W[i + 1][j] = W[i][j];
				}
				if (j - ww[i] >= 0) {
					W[i + 1][j] = max(W[i][j], W[i][j - ww[k]] + v[k]);

				}
			}
		}
	}
	return W[n][w];
}
int fib(int n) {
	vector<int> v(n+1);
	v[0] = 1;
	v[1] = 1;
	for (int i = 2;i < n+1;i++) {
		v[i] = v[i - 2] + v[i - 1];
	}
	return v[n];
}
int isPrime(int x) {
	if (x <= 1) return false;
	if (x>2 && x % 2 == 0) return false;
	for (int i = 2;i <= sqrt(x);i++) {
		if (x%i == 0) {
			return false;
		}
	}
	if (x == 2) return true;
	return true;
}
int Prime(int x) {
	vector<int> prime(x+1,1);
	int num = 2;
	while (num <= sqrt(x)) {
		for (int i = 2;i <= x / num;i++) {
			prime[num*i] = 0;
		}
		num++;
		while (prime[num] == 0)
			num++;
	}
	int count = 0;
	for (int i = 2;i < x + 1;i++) {
		if (prime[i] == 1) count++;
	}
	return count;
}
int main(){
	int n, sum;
	while (cin >> n >> sum) {
		long long  v[10][1001] = { { 0 } };
		v[0][0] = 1;
		for (int i = 0;i <101;i++) {
			for (int k = 1000;k >= i;k--) {
				for (int j = 9;j >= 1;j--) {
					v[j][k] += v[j - 1][k - i];
				}
			}
		}
		if (n == 0 && sum == 0) break;
		else cout << v[n][sum]<< endl;
	}

	}
	

Measured memory_bytes: 1244
#include <iostream>
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <set>
#include <queue>
#include <sstream>
#include <stack>
#include <deque>
#include <memory.h>
#include <cassert>
#include <ctime>
#include <climits>
#include <list>
#include <time.h>
#include <unordered_map>
#include <bitset>
#include <exception>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef unsigned long long ull;
#define pb push_back
#define mp make_pair
#define INPUT "/Users/bekhzodsoliev/Desktop/C++/cp/cp/file.in"
#define OUTPUT "/Users/bekhzodsoliev/Desktop/C++/cp/cp/file.out"
#define lc v << 1
#define rc (v << 1) + 1
#define inf 1e+9
#define linf ll(1e+18)
#define dinf 1e+14

void solve()
{
    int n;
    cin >> n;
    
    int res = 0;
    int k = n;
    while(k > 0)
    {
        res += (k % 10);
        k /= 10;
    }
    
    cout << ((n % res == 0) ? "Yes" : "No");
}

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(0); cout.tie(0);
    //freopen(INPUT, "r", stdin);freopen(OUTPUT, "w", stdout);
    //freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
    int t = 1;
    //cin >> t;
    
    
    while(t--)
    {
        solve();
    }
    
    return 0;
}


Measured memory_bytes: 256
def mycounter(d,i):
    if i in d:
        d[i]+=1
    else:
        d[i]=1
    return d
    
n=int(input())
a=list(map(int,input().split()))
d=dict()
for i in a:
    d=mycounter(d,i)
p=0
for i,j in d.items():
    if i<j:
        p+=j-i
    if i>j:
        p+=j
print(p)

Measured memory_bytes: 17780
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i = 0;i < n; i++)
#define REP(i,n) for(int i = 1;i <= n; i++)
// ----GCC ONLY---- //
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// ----        ---- //
#define ll long long
#define MOD 10000007
#define PB push_back

using namespace std;



int main(){

    int a,b;
    cin >> a >> b;

    int ans = a + b;

    if(ans == 3){
        puts("3");
    }else if(ans == 4){
        puts("2");
    }else{
        puts("1");
    }

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
    if(b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b){
    return a*b/gcd(a, b);
}
int main(){
	int a, b;
	cin >> a >> b; 
	cout << lcm(a,b) << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <set>
using namespace std;
#define mp             make_pair
#define pb             push_back
#define fi             first
#define se             second
#define sz(x)          (int)((x).size())
#define fill(x, y)     memset(x, y, sizeof(y))
#define all(x)         (x).begin(), (x).end()
typedef long long      ll;
typedef pair<int, int> ii;
typedef pair<ii, int>  iii;
typedef vector<int>    vi;
typedef vector<ii>     vii;
typedef vector<iii>    viii;

ll MOD = 1000000007;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int h, w;
  cin >> h >> w;
  ll dp[h][w];
  vector<string> grid;
  string temp;
  for (int i = 0; i < h; i++) {
      cin >> temp;
      grid.pb(temp);
  }
  dp[0][0] = 1;
  for (int i = 0; i < h; i++) {
      for (int j = 0; j < w; j++) {
          if (i == 0 && j == 0) continue;
          if (grid[i][j] == '#') {
              dp[i][j] = 0;
          } else {
              dp[i][j] = 0;
              if (i > 0) dp[i][j] += dp[i-1][j];
              if (j > 0) dp[i][j] += dp[i][j-1];
              dp[i][j] %= MOD;
          }
      }
  }
  cout << dp[h-1][w-1] % MOD << "\n";
  return 0;
}

Measured memory_bytes: 12180
#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;

int h[110000];
int dp[110000];

int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i];
  for (int i = 1; i < n; i++) {
    if (i - 2 < 0)
      dp[i] = dp[i - 1] + abs(h[i] - h[i - 1]);
    else
      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;
}

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

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll;
const int inf = 0x3fffffff; const ll INF = 0x1fffffffffffffff; const double eps=1e-12;
void tostr(ll x,string& res){while(x)res+=('0'+(x%10)),x/=10; reverse(ALL(res)); return;}
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 end



int main(){
   char c; cin>>c;
   c++; cout<<c<<endl;
   return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <utility>
#include <tuple>
#include <cctype>
#include <bitset>
#include <complex>
#include <cmath>
#include <array>
using namespace std;
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3fLL
#define MOD 1000000007
#define mp make_pair
#define mt make_tuple
#define pb push_back
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pint;
typedef pair<ll,ll> pll;
typedef tuple<int,int,int> tint;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<pint> vpint;
int dx[8]={0,0,-1,1,1,1,-1,-1};
int dy[8]={-1,1,0,0,1,-1,1,-1};
const int SIZE=100050;
//ここまでテンプレ
vll V;
void nana(ll N){
	if(N>INF)
		return;
	ll a=N*10+3,b=N*10+5,c=N*10+7;
	V.pb(a);
	V.pb(b);
	V.pb(c);
	nana(a);
	nana(b);
	nana(c);
	return;
}
bool check(ll N){
	string S=to_string(N);
	int ch[11]={};
	for(int i=0;i<S.length();i++)
		ch[S[i]-'0']++;
	if(ch[7] && ch[5] && ch[3])
		return 1;
	else
		return 0;
}
int main(){
	ll N;
	cin>>N;
	nana(0);
	sort(V.begin(),V.end());
	ll ans=0;
	for(ll v:V){
		if(!check(v))
			continue;
		if(v<=N){
			ans++;
		}
	}
	cout<<ans<<endl;
	return 0;
}

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

template<size_t max_N, size_t prime_size>
struct Prime{
    bool sieve[max_N];
    int_fast64_t prime[prime_size];
    size_t counter = 0;
    Prime() : sieve(), prime() {
        for(int_fast64_t i = 0; i < max_N; ++i)
            sieve[i] = true;
        sieve[0] = sieve[1] = false;
        for(int_fast64_t i = 2; i < max_N; ++i){
            if(sieve[i]){
                prime[counter] = i;
                ++counter;
                if(counter > prime_size)break;
            }
            for(int_fast64_t j = i * i; j < max_N; j += i)
                sieve[j] = false;
        }
    }
};

auto p = Prime<1000000, 78498>();

int main(){
    long N, M;
    cin >> N;
    M = N;
    long ans(0);
    vector<long> tapi;
    long i;
    for(i = 1; i * i < N; ++i){
        if(N % i == 0){
            if(p.sieve[i]){
                ++ans;
                while(M % i == 0)M /= i;
            }
            tapi.push_back(i);
            tapi.push_back(N / i);
        }
    }
    if(i * i == N)tapi.push_back(i);
    if(M != 1)++ans;
    cout << ans << " " << tapi.size() - 1 << endl;
    return 0;
}


Measured memory_bytes: 4736
#include <bits/stdc++.h>
using namespace std;
const int MAXn = 50 + 5, INF = 1e9;
int dp[MAXn][MAXn][MAXn], a, b, c, res = INF;

int main() {
	ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
	cin >> a >> b >> c;
	if (a == b && b == c)
		return cout << 0,0;
	for (int i = 0; i < MAXn; i++)
		for (int j = 0; j < MAXn; j++)
			for (int x = 0; x < MAXn; x++)
				dp[i][j][x] = INF;
	dp[a][b][c] = 0;
	for (int i = 1; i < MAXn; i++)
		for (int j = 1; j < MAXn; j++)
			for (int x = 1; x < MAXn; x++) {
				dp[i][j][x] = min(dp[i][j][x], dp[i-1][j-1][x] + 1);
				dp[i][j][x] = min(dp[i][j][x], dp[i][j-1][x-1] + 1);
				dp[i][j][x] = min(dp[i][j][x], dp[i-1][j][x-1] + 1);
				if (i >= 2) {
					dp[i][j][x] = min(dp[i][j][x], dp[i-2][j][x] + 1);
				}
				if (j >= 2) {
					dp[i][j][x] = min(dp[i][j][x], dp[i][j-2][x] + 1);
				}
				if (x >= 2) {
					dp[i][j][x] = min(dp[i][j][x], dp[i][j][x-2] + 1);
				}
				if (i == j && j == x)
					res = min(res, dp[i][j][x]);
			}
	cout << res;
}


Measured memory_bytes: 896
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>

#include <cmath>
#include <climits>
#include <queue>

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;
    vector<int> vec(n);
    for (int i = 0; i < n; ++i) {
        cin >> vec[i];
    }

    vector<int> l(n + 1);
    for (int i = 0; i < n; ++i) {
        l[i + 1] = GCD(l[i], vec[i]);
    }
    vector<int> r(n + 1);
    for (int i = n - 1; i >= 0; --i) {
        r[i] = GCD(r[i + 1], vec[i]);
    }

    int ans = 0;
    for (int i = 0; i < n; ++i) {
        ans = max(ans, GCD(l[i], r[i+1]));
    }

    cout << ans << endl;
}

Measured memory_bytes: 1408
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
//using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define PI 3.141592653589793
#define MOD 1000000007
#define ALL(obj) (obj).begin(),(obj).end()
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 ll INF = 1LL << 56;

//四方向への移動ベクトル
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

struct edge{//グラフに使うヤツ
    ll from,to,cost;
};

typedef vector<vector<edge> > G;
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}

int main(){
    ll n;
    cin >> n;
    ll a[n];
    for (ll i=0;i<n;i++){
        cin >> a[i];
    }
    ll ans=0,x=1;
    for (ll i=0;i<61;i++){
        ll even=0,odd=0;
        for (ll j=0;j<n;j++){
            if (a[j]&(1LL<<i))odd++;
            else even++;
        }
        ll p=(((odd%MOD)*(even%MOD))%MOD)*x;
        ans+=p;
        ans%=MOD;
        x*=2;
        x%=MOD;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 5912
#include "bits/stdc++.h"
using namespace std;
const int MAX = 700000;
const int MOD = 1000000007;

long long  fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
long long COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
/*第二引数で第一引数を割ったときの切り上げの計算*/
long long int maxtime(long long int x, long long int y) {
	return(x + y - 1) / y;

}
/*最大公約数*/
long long int lcm(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}
	long long int s = -1;
	while (s != 0) {
		s = m % n;
		m = n;
		n = s;
	}
	return m;
}
/*最大公倍数*/
long long int gcd(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;
	return m / lcm(m, n) * n;
}
/*逆元計算*/
long long int  modinv(long long a, long long m) {
	long long int b = m, u = 1, v = 0;
	while (b) {
		long long int t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
// index が条件を満たすかどうか
vector<long long int >meguru;
bool isOK(int index, int key) {
	if (meguru[index] <= key) return true;
	else return false;
}
// 汎用的な二分探索のテンプレ
int binary_search(int key) {
	int left = -1; //「index = 0」が条件を満たすこともあるので、初期値は -1
	int right = (int)meguru.size(); // 「index = a.size()-1」が条件を満たさないこともあるので、初期値は a.size()
	/* どんな二分探索でもここの書き方を変えずにできる！ */
	while (right - left > 1) {
		int mid = left + (right - left) / 2;

		if (isOK(mid, key)) left = mid;
		else right = mid;
	}
	/* left は条件を満たす最大の値、right は条件を満たさない最小の値になっている */
	return left;
}
long long modpow(long long a, long long n, long long mod) {
	long long res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}
double PI = 3.141592653589793238;
vector<vector<int>>G(100030);
int main() {
	int n;
	cin >> n;
	string s;
	cin >> s;
	int ans = 0;
	for (int i = 0; i <= 999; i++) {
		string pin = "";
		int a = i;
		for (int j = 0; j < 3; j++) {
			pin = pin + to_string(a % 10);
			a = a / 10;
		}
		int num = 0;
		for (int i = 0; i < s.size(); i++) {
			if (num == 3) {
				break;
			}
			if (s[i] == pin[num]) {
				num++;
			}
		}
		if (num == 3) {
			ans++;
		}
	}
	cout << ans;
}

Measured memory_bytes: 5884
package main

import (
	"fmt"
)

func main() {
	var n int
	fmt.Scan(&n)
	var s string
	fmt.Scan(&s)

	cs := []rune(s)

	var cnt int
	if len(cs) == 1 {
		cnt = 1
	} else {
		var pre rune
		for _, c := range cs {
			if pre != c {
				cnt++
			}
			pre = c
		}
	}

	fmt.Print(cnt)
}


Measured memory_bytes: 1664
#include<stdio.h>
#include<cctype>
int main(void){
    char ch;
    int count[100];
    int i;
    for(i=0; i< 26; i++){
        count[i]=0;
    }
    
    while(scanf("%c", &ch) != EOF){
        if(isupper(ch)) ch = tolower(ch);
        i = ch -'a';
        count[i]++;
        
    }
    for(i=0; i<26; i++){
        printf("%c : %d\n", i+'a', count[i]);
    }
    return 0;
}


Measured memory_bytes: 2736
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <cassert>
#include <exception>
#include <numeric>
using namespace std;
typedef long long ll;
typedef string str;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<char> vc;
typedef vector<str> vs;
typedef vector<Pll> vp;
typedef vector<bool> vb;
#define rep(i, a, n) for (ll i = (a); i < (n); ++i)
#define rrep(i, a, n) for (ll i = (a); i > (n); --i)
#define erep(i, a, n) for (ll i = (a); i <= (n); ++i)
#define rerep(i, a, n) for (ll i = (a); i >= (n); --i)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define sz(x) ((int)x.size())
#define SORT(x) sort(all(x))
#define RSORT(x) sort(all(x),greater<ll>())
#define vec_max(V) *max_element(all(V))
#define vec_min(V) *min_element(all(V))
#define vec_sum(V) accumulate(all(V), 0LL)
#define print(X) cout << (X) << "\n"
#define _ << " " <<
#define Yes print("Yes")
#define No print("No")
static const int INF = 1e+9+7;

int main(){
  ll N,D;
  cin >> N >> D;

  ll tmp = 0;
  ll ans = 0;
  while(true){
    tmp+=2*D+1;
    ans++;
    if(tmp >= N)break;
  }

  print(ans);
    
 return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <math.h>
#include <climits>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <map> 
#include <set>
#include <string>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
const ll MD = 1000000007;

/* sample input

*/



int main()
{
	int n;
	int a[50];
	int absmax = 0;
	int offset = 0;
	int answer;
	vector<pair<int, int>> ansnum;

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

	int pos = 0;
	for (int i = 0; i < n; i++) {
		if (abs(a[i]) > absmax) {
			absmax = abs(a[i]);
			offset = a[i];
			pos = i;
		}
	}
	pair<int, int> tmp;

	for (int i = 0; i < n; i++) {
		if (i != pos) {
			a[i] += offset;
			tmp.first = pos + 1;
			tmp.second = i + 1;
			ansnum.push_back(tmp);
		}
	}
	a[pos] += offset;
	tmp.first = pos + 1;
	tmp.second = pos + 1;
	ansnum.push_back(tmp);
	answer = n;

	if (offset < 0) {
		for (int i = n-1; i >0; i--) {
			if (a[i] < a[i - 1]) {
				a[i - 1] += a[i];
				answer++;
				tmp.first = i + 1;
				tmp.second = i;
				ansnum.push_back(tmp);
			}
		}
	}
	else {
		for (int i = 0; i <n-1; i++) {
			if (a[i] > a[i +1]) {
				a[i +1] += a[i];
				answer++;
				tmp.first = i+ 1;
				tmp.second = i+2;
				ansnum.push_back(tmp);
			}
		}
	}
	cout << answer << endl;
	for (int i = 0; i < answer; i++) {
		cout << ansnum[i].first << " " << ansnum[i].second << endl;
	}

	//cout << endl;
	//for (int i = 0; i < n; i++) {
	//	cout << a[i] << endl;
	//}
	return 0;
}

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

int main()
{
    string o,e;
    cin >> o >> e;

    for(int i = 0; i < o.length() + e.length(); i++){
        if(i % 2 == 0) cout << o[i/2];
        else cout << e[i/2];
    }
    cout << endl;

    return 0;
}

Measured memory_bytes: 256
import java.util.*;
import java.io.*;

public class Main {

	private static void solve(){
		//Implement solution here.
		int n = ni();
		int sum = 0;
		while(true) {
			if(sum >= n) {
				System.out.println(sum);
				return;
			}
			sum += 111;
		}
	}

	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");        
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		solve();
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}

Measured memory_bytes: 21332
#include<stdio.h>
#include<stdlib.h>

int main(void) {
	int x, y,sum=0;
	scanf("%d %d", &x,&y);
	switch (x)
	{
	case 1:
		sum += 300000;
		break;
	case 2:
		sum += 200000;
		break;
	case 3:
		sum += 100000;
		break;
	default:
		sum += 0;
		break;
	}
	switch (y)
	{
	case 1:
		sum += 300000;
		break;
	case 2:
		sum += 200000;
		break;
	case 3:
		sum += 100000;
		break;
	default:
		sum += 0;
		break;
	}
	if (x == 1 && y == 1) {
		sum += 400000;
	}
	printf("%d", sum);

}

Measured memory_bytes: 128
using System;
using System.Collections.Generic;
using System.Linq;

namespace NKI2019A
{
    static class MainClass
    {

        static int[] s;
        static int[] n;

        public static void Main(string[] args)
        {

            s = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);


            Console.WriteLine(Math.Min(s[1], s[2]) + " " + Math.Max(s[1] + s[2] - s[0], 0));

            return;


        }



        public static long Gcd(long a, long b)
        {
            long tmp;
            // a<bにする
            if (a >= b)
            {
                tmp = a;
                a = b;
                b = tmp;
            }

            if (a == 0)
            {
                return b;
            }

            tmp = a;
            a = b % a;
            b = tmp;
            return Gcd(a, b);

        }


        public static IEnumerable<long> PF(long n)
        {
            long i = 2;
            long tmp = n;

            while (i * i <= n) //※1
            {
                if (tmp % i == 0)
                {
                    tmp /= i;
                    yield return i;
                }
                else
                {
                    i++;
                }
            }
            if (tmp != 1) yield return tmp;//最後の素数も返す
        }




    }

}






Measured memory_bytes: 13268
use std::io::{BufRead, BufReader};
use std::collections::HashMap;

fn main(){
    let lines = read::<String>();

    let nk: Vec<i32> =
        lines[0].trim().split(' ').map(|i| i.parse().unwrap()).collect();
    let (_n,k) = (nk[0], nk[1]);

    let aa: Vec<i32> = 
        lines[1].trim().split(' ').map(|i| i.parse().unwrap()).collect();

    let mut balls = HashMap::new();
    for a in aa {
        let count = balls.entry(a).or_insert(0);
        *count += 1;
    }

    let mut vec: Vec<(i32,i32)> = Vec::new();
    for (key,val) in balls {
        vec.push((key,val));
    }
    vec.sort_by(|&(_k1,v1),&(_k2,v2)| v1.cmp(&v2));

    let change = vec.len() as i32 - k;
    if change <= 0{
        println!("{}",0);
    } else {
        println!("{}",
                 vec.iter().take(change as usize).fold(0,|acc,e| acc + e.1));
    }
}

fn read<T>() -> Vec<T>
where
  T: std::str::FromStr,
  T::Err: std::fmt::Debug,
{
    let lines: Vec<T> =
        BufReader::new(std::io::stdin())
        .lines()
        .map(|l| l.unwrap().parse::<T>().unwrap())
        .collect();
    lines
}


Measured memory_bytes: 14324
use proconio::input;

fn main() {
    input! {
        n: usize, m: usize, k: u64,
        a: [u64; n],
        b: [u64; m],
    }
    let mut suma = vec![0; n + 1];
    for i in 1..=n {
        suma[i] = suma[i - 1] + a[i - 1];
    }
    let mut sumb = vec![0; m + 1];
    for i in 1..=m {
        sumb[i] = sumb[i - 1] + b[i - 1];
    }

    let mut ret = 0;
    for i in 0..=n {
        if k < suma[i] {
            continue;
        }
        let rem = k - suma[i];
        let bi = upper_bound(&sumb, rem) - 1;
        if ret < i + bi {
            ret = i + bi;
        }
    }
    println!("{}", ret);
}

fn upper_bound(v: &Vec<u64>, k: u64) -> usize {
    let mut l = 0;
    let mut h = v.len();
    while l < h {
        let m = (l + h) / 2;
        if v[m] <= k {
            l = m + 1;
        } else {
            h = m;
        }
    }
    l
}


Measured memory_bytes: 12468
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int[] A = new int[N];
		int[] B = new int[N];
		int[] C = new int[N - 1];
		for (int i = 0; i < A.length; i++)
			A[i] = scanner.nextInt();
		for (int i = 0; i < B.length; i++)
			B[i] = scanner.nextInt();
		for (int i = 0; i < C.length; i++)
			C[i] = scanner.nextInt();
		int ans = 0;
		for (int i = 0; i < A.length; i++) {
			ans += B[A[i] - 1];
			if (i + 1 < A.length && A[i + 1] - A[i] == 1)
				ans += C[A[i] - 1];
		}
		System.out.println(ans);
		scanner.close();
	}
}


Measured memory_bytes: 23764
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll,ll> P;
using VP = vector<P>; using VVP = vector<VP>;
using VI = vector<int>; using VVI = vector<VI>; using VVVI = vector<VVI>;
const int inf=1e9+7;
const ll INF=1LL<<60;
const ll Mod=1e9+7;



vector<ll> inv,fact,invfact;
void Mod_build(int n=202020){
	fact.resize(n+1);
	inv.resize(n+1);
	invfact.resize(n+1);
	fact[0]=inv[0]=invfact[0]=1;
	inv[1]=1;
	for(ll i=0;i<n;i++){
		fact[i+1]=fact[i]*(i+1)%Mod;
		if(i>0)inv[i+1]=Mod-inv[Mod%(i+1)]*(Mod/(i+1))%Mod;
		invfact[i+1]=invfact[i]*inv[i+1]%Mod;
	}
}
ll perm(int n,int k){
	if(n<0||k<0||k>n)return 0;
	return fact[n]*invfact[n-k]%Mod;
}
ll comb(int n,int k){
	if(n<0||k<0||k>n)return 0;
	return (fact[n]*invfact[n-k]%Mod)*invfact[k]%Mod;
}
ll powMod(ll n,ll k){
	k%=Mod-1;
	if(k<0)k+=Mod-1;
	ll ret=1;
	while(k){
		if(k&1)ret=ret*n%Mod;
		n=n*n%Mod;
		k>>=1;
	}
	return ret;
}


int main(){
  ll i,j;
  ll n,a,b,c;
  cin>>n>>a>>b>>c;
  ll poa[202020],pob[202020];
  poa[0]=1;
  pob[0]=1;
  ll hiv[202020];
  Mod_build();
  hiv[0]=inv[100-c];
  a=a*100*inv[100-c]%Mod;
  b=b*100*inv[100-c]%Mod;
  for(i=1;i<202020;i++){
    poa[i]=poa[i-1]*a%Mod;
    pob[i]=pob[i-1]*b%Mod;
    hiv[i]=hiv[i-1]*inv[100]%Mod;
  }


  ll r=0;

  for(i=n;i<2*n;i++){
    ll y=(poa[n]*pob[i-n]%Mod+poa[i-n]*pob[n]%Mod)*i%Mod;
    y=y*comb(i-1,n-1)%Mod;
    y=y*hiv[i-1]%Mod;
    r+=y;
    r%=Mod;
  }
  cout<<r<<endl;
}

Measured memory_bytes: 9728
#include<stdio.h>
#include<stdlib.h>



int main(void){
	long long int h;
	long long int x;
	long long int y;

	x = 0;
	y = 1;

	scanf("%lld",&h);

	while(h > 1){
		h = h / 2;
		x += y;
		y *= 2;
	}

	printf("%lld\n",x+y);


	return 0;
}



Measured memory_bytes: 128
#include<iostream>
#include<cstdlib>
#include<utility>
#include<tuple>
#include<string>
#include<vector>
#include<numeric>
#include<algorithm>
#include<queue>
#include<cmath>
#include<map>
using namespace std;
using ll = long long int;
const ll mod = 1e9 + 7;

int main() {

	int a1, a2, a3;

	cin >> a1 >> a2 >> a3;

	int sum = a1 + a2 + a3;

	if (sum < 22) cout << "win" << endl;
	else cout << "bust" << endl;
	
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <stack>
#include <limits>
#include <climits>
#include <cassert>
#include <fstream>
#include <cstring>
#include <cmath>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <ciso646>
#include <set>
#include <array>

using namespace std;

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

#define inf 0x3f3f3f3f
#define PB push_back
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define SET(a,c) memset(a,c,sizeof a)
#define CLR(a) memset(a,0,sizeof a)
#define pii pair<int,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define MIN(a,b) (a>b?b:a)
#define MAX(a,b) (a>b?a:b)
#define pi 2*acos(0.0)
#define INFILE() freopen("in0.txt","r",stdin)
#define OUTFILE()freopen("out0.txt","w",stdout)
#define ll long long
#define ull unsigned long long
#define eps 1e-14
#define FST first
#define SEC second
#define SETUP cin.tie(0), ios::sync_with_stdio(false), cout << setprecision(15)

namespace {
	struct input_returnner {
		int N; input_returnner(int N_ = 0) :N(N_) {}
		template<typename T> operator vector<T>() const { vector<T> res(N); for (auto &a : res) cin >> a; return std::move(res); }
		template<typename T> operator T() const { T res; cin >> res; return res; }
		template<typename T> T operator - (T right) { return T(input_returnner()) - right; }
		template<typename T> T operator + (T right) { return T(input_returnner()) + right; }
		template<typename T> T operator * (T right) { return T(input_returnner()) * right; }
		template<typename T> T operator / (T right) { return T(input_returnner()) / right; }
		template<typename T> T operator << (T right) { return T(input_returnner()) << right; }
		template<typename T> T operator >> (T right) { return T(input_returnner()) >> right; }
	};
	template<typename T> input_returnner in() { return in<T>(); }
	input_returnner in() { return input_returnner(); }
	input_returnner in(int N) { return std::move(input_returnner(N)); }
}

void solve();
/// ---template---
signed main(void) {
	SETUP;
	solve();
	return 0;
}

void solve() {
	string S = in();
	string ans = "CODEFESTIVAL2016";
	int cnt = 0;
	REP(i, S.size()) cnt += (S[i] != ans[i]);
	cout << cnt << endl;
}

Measured memory_bytes: 256
import math

A,B,H,M=map(int,input().split())
th=abs((2*math.pi*M/60)-((2*math.pi*H/12) + (M/60)*2*math.pi/12))
ans=math.sqrt(A**2 + B**2 -2*A*B*math.cos(th))
print(ans)

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

int main(){
    int N,M;
    cin >> N >> M;
    int ans = 0;
    vector<int> X(M);
    for(int i = 0;i < M;i++){
        cin >> X[i];
    }
    if(N >= M){
        cout << 0 << endl;
        return 0;
    }
    sort(X.begin(),X.end());
    int length = X[M-1] - X[0];
    vector<int> dif(M-1);
    for(int i = 0;i < M - 1;i++){
        dif[i] = X[i+1] - X[i];
    }
    sort(dif.begin(),dif.end());
    reverse(dif.begin(),dif.end());
    for(int i = 0;i < N-1;i++){
        length = length - dif[i];
    }
    cout << length << endl;
}

Measured memory_bytes: 1024
def cmb(n, r):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % mod

N = pow(10, 5)  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod p)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  # factinv 計算用
mod = pow(10, 9) + 7

for i in range(2, N + 1):
    fact.append((fact[-1] * i) % mod)
    inv.append((-inv[mod % i] * (mod // i)) % mod)
    factinv.append((factinv[-1] * inv[-1]) % mod)

n,k = map(int,input().split())
a = [int(i) for i in input().split()]
a.sort()
if k > 1:
    ans = 0
    for i in range(k-1, n):
        maxs = a[i]
        ncr = cmb(i, k-1)
        #print(maxs, ncr, maxs * ncr)
        ans += maxs * ncr
        ans %= mod
    for i in range(n-k+1):
        mins = a[i]
        ncr = cmb(n-i-1, k-1)
        #print(mins, ncr, mins * ncr)
        ans -= mins * ncr
        ans %= mod
    print(ans)
else:
    print(0)


Measured memory_bytes: 26352
#define NDEBUG
NDEBUG


#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstring>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <memory>
#include <queue>
#include <random>


using namespace std;

template<class T>
using vec = std::vector<T>;


#define FOR(i, n) for (int i = 0; i < (n); ++i)
#define FORA(i, a, n) for (int i = (a); i < (n); ++i)


// TC_REMOVE_BEGIN
/// caide keep
bool __hack = std::ios::sync_with_stdio(false);
/// caide keep
auto __hack1 = cin.tie(nullptr);
// TC_REMOVE_END


// Section with adoption of array and vector algorithms.


//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//
//template <class T> using StdTree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update>;


namespace template_util {
    

    constexpr int bytecount(uint64_t x) {
        return x ? 1 + bytecount(x >> 8) : 0;
    }

    template<int N>
    struct bytetype {
        
    };

    
    /// caide keep
    template<uint64_t N>
    struct minimal_uint : bytetype<bytecount(N)> {
    };
}


template<class T>
T next(istream& in) {
    T ret;
    in >> ret;
    return ret;
}

template<class T>
vector<T> next_vec(istream& in, size_t n) {
  vector<T> ret(n);
  for (size_t i = 0; i < n; ++i) {
    ret[i] = next<T>(in);
  }
  return ret;
}


void solve(istream& in, ostream& out) {
  auto n = next<int>(in);
  auto h = next_vec<int>(in, n);
  vec<int64_t> f(n, numeric_limits<int64_t>::max() / 2);
  f[0] = 0;
  FORA(i, 1, n) {
    FOR(j, 2) {
      if (i - j - 1 >= 0) {
        f[i] = min(f[i], f[i - j - 1] + abs(h[i] - h[i - j - 1]));
      }
    }
  }
  out << f[n-1] << "\n";
}

//#include <fstream>


int main() {
//  ifstream fin("bridges.in");
//  ofstream fout("bridges.out");
    solve(cin, cout);
//  solve(fin, fout);
    return 0;
}



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

int main()
{
    int n;
    cin >> n;
    int a[100001] {-1};
    int b[100001] {-1};
    for(int i = 0; i < n / 2 + 1; i++){
        cin >> a[i] >> b[i];
    }
    if(n % 2 == 1){
        for(int i = n / 2; i >= 0; i--){
            cout << a[i] << " ";
        }
        for(int i = 0; i < n / 2; i++){
            cout << b[i] << " ";
        }
    }
    else{
        for(int i = n / 2 - 1; i >= 0; i--){
            cout << b[i] << " ";
        }
        for(int i = 0; i < n / 2; i++){
            cout << a[i] << " ";
        }
    }
}

Measured memory_bytes: 2944
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#define int long
#define ll long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define IOS cin.tie(0); ios::sync_with_stdio(false)
const int INF = 1e9;
using namespace std;

struct UnionFind{
   vector<int> par;
   UnionFind(int n):par(n,-1){}
   int find(int x){
       if(par[x]<0)return x;
       return par[x]=find(par[x]);
   }
   bool unite(int x,int y){
       x=find(x);
       y=find(y);
       if(x==y)return false;
        par[x]+=par[y];
        par[y]=x;
       return true;
   }

   bool same(int x,int y){
       return find(x)==find(y);
   }
   int size(int x){
       return -par[find(x)];
   }
};

signed main() {
    int N,M; cin >> N >> M;
    vector<int> v(M);
    int A[M],B[M];
    rep(i,M) cin >> A[i] >> B[i];
    reverse(A,A+M); reverse(B,B+M);
    UnionFind UF(N+1);
    v[0]=N*(N-1)/2; 
    rep(i,M-1){
        if(!UF.same(A[i],B[i])) v[i+1]=v[i]-UF.size(A[i])*UF.size(B[i]);
        else v[i+1]=v[i];
        UF.unite(A[i],B[i]);
    }
    reverse(v.begin(),v.end());
    rep(i,M) cout << v[i] << endl;
}

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

using namespace std;
using ll =long long;

#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
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; }
void coY() {cout <<"Yes"<<endl;}
void coN(){cout <<"No"<<endl;}

const ll INF = 1LL << 60;

//Write From this Line

const int mod = 1e9+7;
int main()
{
	string s , t ;
	cin>> s >> t ;
	cout << t << s << endl;

}



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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

S=input()

print(S[:-8])


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

int n;
long long int s[401], f[401][401];

int main()
{
    cin >> n;
    for (int i = 1; i <= n; i++)
    {
        cin >> s[i];
        s[i] += s[i - 1];
    }
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; i + j <= n; j++)
        {
            int l = j, r = i + j;
            f[l][r] = 1ll << 60;
            for (int k = l; k < r; k++)
            {
                f[l][r] = min(f[l][r], f[l][k] + f[k + 1][r]);
            }
            f[l][r] += s[r] - s[l - 1];
        }
    }
    cout << f[1][n] << endl;
    return 0;
}

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

#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 ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;


int main() {
    int A,B,C; cin >> A >> B >> C;
    if(A==B) cout << C << endl;
    if(B==C) cout << A << endl;
    if(C==A) cout << B << endl;
    return 0;
}

Measured memory_bytes: 3532
#define LOCAL
#include <bits/stdc++.h>
 
using namespace std;
 
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) {
    return '"' + s + '"';
}
string to_string(const char* s) {
    return to_string((string) s);
}
string to_string(bool b) {
    return (b ? "true" : "false");
}
string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}
template <size_t N>
string to_string(bitset<N> v) {
    string res = "";
    for (size_t i = 0; i < N; i++) {
        res += static_cast<char>('0' + v[i]);
    }
    return res;
}
template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for (const auto &x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
//Auther: Arin Roday
#define vec vector
#define i64 long long
#define endl '\n'
#define sz(x) (x).size()
#define times(n) for(int i = 0; i < (n); ++i)
#define bits(x) __builtin_popcount(x)
 
void solve(){
    int a, b;
    cin >> a >> b;
    int ans = (a + b - 1)/b;
    cout << ans << endl;
}
 
int main(){
    solve();
}

Measured memory_bytes: 256
use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let mut s: Vec<char> = read::<String>().chars().collect();
    let mut t: Vec<char> = read::<String>().chars().collect();
    let mut ans = "Yes";
    s.sort();
    t.sort_by(|x, y| y.cmp(x));

    if s < t {
        ans = "Yes";
    } else {
        ans = "No";
    }

    println!("{}", ans);
}


Measured memory_bytes: 4352
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <climits>
using namespace std;
typedef long long int ll;

int s[110];

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n; cin >> n;
	int a,b,c; cin >> a >> b >> c;
	vector<int> v(n);
	for(int i=0;i<n;i++){
		cin >> v[i];
	}
	sort(v.begin(),v.end());
	reverse(v.begin(),v.end());
	for(int i=0;i<n;i++){
		s[i+1]=s[i]+v[i];
	}
	int ans=0;
	for(int i=0;i<n;i++){
		ans=max(ans,(c+s[i])/(a+i*b));
	}
	cout << ans << endl;
}


Measured memory_bytes: 3152
#include <bits/stdc++.h>
 
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define mp  make_pair
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define mp make_pair
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
ll INF = 1e6;

void solve()
{
    ll n, sum=0;
    cin>>n;
    for(ll i=1;i<=n;i++)
    {
        if(i%3==0 || i%5==0);
        else
            sum+=i;
    }
    cout<<sum;
}

 
int main()
{
    SPEED;
    ll t = 1;
    //cin>>t;
    while(t--) solve();
   return 0;
}


Measured memory_bytes: 3652
// ABC 100 A: happy birthday
#include <iostream>
#include <algorithm>

int main() {
    bool flag = true;
    int cake_num_1, cake_num_2; std::cin >> cake_num_1 >> cake_num_2;
    if (cake_num_1 < cake_num_2) {
        int tmp = cake_num_1;
        cake_num_1 = cake_num_2;
        cake_num_2 = tmp;
    }
    if (cake_num_1 > 16/2) {
        flag = false;
    }
    std::cout << (flag ? "Yay!" : ":(") << "\n"; 

}

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

int main() {
  
  int N;
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  
  int ans = 0;
  for (int i = 0; i < N; i++){
    while (i+1 <= N && A[i] == A[i+1]) i++;

    if (A[i] > A[i+1]) {
      while (i+1 <= N && A[i] >= A[i+1]) i++;
    } else {
      while (i+1 <= N && A[i] <= A[i+1]) i++;
    }
    ans++;
  }
  cout << ans << endl;   
}

Measured memory_bytes: 768
#include<bits/stdc++.h>
using namespace std;
int main()
{ int n;
  string s1,s2;
  cin>>n;
  cin>>s1>>s2;
  for(int i=0;i<n;i++)
  {
    cout<<s1[i]<<s2[i];
  }
  cout<<endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
typedef long long ll;
vector<ll> vec;
ll n, p, ans;
int main(void){
    // Your code here!
    cin >> n >> p;
    ans = 1;
    for (ll i = 2; i * i * i <= p; i++){
        bool so = true;
        for (ll j = 2; j <= sqrt(i); j++){
            if (i % j == 0) so = false;
        }
        if (so) vec.push_back(i);
    }
    for (ll i = 0; i < vec.size(); i++){
        ll yy = p, cou = 0;
        while(yy % vec[i] == 0){
            yy /= vec[i];
            cou++;
        }
        ans *= pow(vec[i], cou / n);
    }
    if (n > 2) cout << ans << endl;
    else if (n == 1) cout << p << endl;
    else {
        ll tt = 1;
        for (ll i = 2; i <= sqrt(p); i++){
            if (p % (i * i) == 0) tt = i;
        }
        cout << tt << endl;
    }
}


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

int main(){
  int x, y;
  cin >> x >> y;
  if(y%2 == 1){
    cout << "No" << endl;
    return 0;
  }
  if(x*2 <= y && y <= x*4){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
}


Measured memory_bytes: 3628