akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;


typedef long long ll;


int main()
{
ll h,t,i;
cin>>h>>t;
ll a[t],sum=0;
for(i=0; i<t; i++){
    cin>>a[i];
    sum=sum+a[i];
}
if(sum>=h){
    cout<<"Yes"<<endl;
}
else{
    cout<<"No"<<endl;
}




    return 0;
}


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

// alias templates
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;

// alias declaration
using ll = long long;
using str = string;

using vll = V<ll>;
using vvll = V<vll>;
using vs = V<str>;

// loops
#define FOR(i, a, b)  for (ll i = (a); i <= (ll)(b); i++) // [a,b]
#define rFOR(i, a, b) for (ll i = (b); i >= (ll)(a); i--) // [b,a]
#define REP(i, a) FOR((i), 0, (ll)(a)-1) // [0,a-1]

// for debug
#define dbg(a) cerr << "  " << (#a) << ": " << (a) << "\n";

// procon common constants
const ll MOD_BIG = 1e9 + 7;

int main(void){
    ll summ = 0;
    ll n;
    cin >> n;
    vll d(n);
    ll tmp;

    REP(i,n){
        cin >> tmp;
        d[i] = tmp;
    }

    REP(i,n){
        FOR(j,i+1,n-1){
            summ += d[i]*d[j];
        }
    }
    cout << summ << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<queue>
#include<bitset>
#include<complex>
using namespace std;
template<typename __T>
inline void read(__T &x)
{
    x=0;
    int f=1;char c=getchar();
    while(!isdigit(c)){if(c=='-')	f=-1;c=getchar();}
    while(isdigit(c))	{x=x*10+c-'0';c=getchar();}
    x*=f;
}
int n,m;
int fa[100005];
int d[100005];
int getfa(int x)
{
	if(fa[x]==x)	return x;
	int gg=fa[x];
	fa[x]=getfa(fa[x]);
	d[x]+=d[gg];
	return fa[x];
}
int unio(int a,int b,int dd)
{
	int x=getfa(a);
	int y=getfa(b);
	if(x==y)	return d[b]-d[a]==dd;
	fa[x]=y;
	d[x]=d[b]-d[a]-dd;
	return 1;
}
int main()
{
	read(n);
	read(m);
	for(int i=1;i<=n;i++)
		fa[i]=i;
	int a,b,c;
	while(m--)
	{
		read(a);
		read(b);
		read(c);
		int gg=unio(a,b,c);
	//	for(int i=1;i<=n;i++)	cout<<"G"<<i<<' '<<fa[i]<<" "<<d[i]<<endl;
		if(gg==0)
		{
			printf("No\n");
			return 0;
		}
	}
	printf("Yes\n");
	return 0;
}

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

/* snippet: useful macros and functions */
#define ARC(i, a, b) for(Int i = (a); i < (b); ++i)
#define RC(i, n) ARC(i, 0, n)
#define ARCH(i, a, b) for(Int i = (a) - 1; i >= (b); --i)
#define RCH(i, n) ARCH(i, n, 0)
template<class T> T ant(const T &a, const T &b){ return a > b ? a : b; }
template<class T> T ont(const T &a, const T &b){ return a < b ? a : b; }
template<class T> T rng(const T &a, const T &b){ return a < b ? b - a : a - b; }
template<class T> void th(T &a, const T &b, T (*f)(const T &, const T &)){ a = f(a, b); }
#define anth(a, b) th(a, b, ant)
#define onth(a, b) th(a, b, ont)

/* snippet: modint library */
template<class T, int MOD>
class Modint{
	T val;
public:
	Modint(T val = 0) : val(val % MOD) {}
	operator T(){ return val; }
	Modint &operator+=(const Modint &a){ val += a.val; if(val >= MOD) val -= MOD; return *this; }
	Modint &operator-=(const Modint &a){ val -= a.val; if(val < 0) val += MOD; return *this; }
	Modint &operator*=(const Modint &a){ val = val * a.val % MOD; return *this; }
	void inverse(){T x[2]={MOD,val},a[2]={0,1};int i;for(i=0;x[!i];i^=1){a[i]-=x[i]/x[!i]*a[!i];x[i]=x[i]%x[!i];}if(!i)a[i]+= MOD;val=a[i];}
	Modint &operator/=(Modint a){ a.inverse(); return *this *= a; }
	friend Modint modpow(Modint a, int n){ Modint ret(1); while(n){ if(n & 1) ret *= a; a *= a; n >>= 1; } return ret; }
	friend Modint operator+(Modint a, const Modint &b){ return a += b; }
	friend Modint operator-(Modint a, const Modint &b){ return a -= b; }
	friend Modint operator*(Modint a, const Modint &b){ return a *= b; }
	friend Modint operator/(Modint a, const Modint &b){ return a /= b; }
	friend std::ostream &operator<<(std::ostream &os, const Modint &a){ return os << a.val; }
};

/* snippet: using declarations */
using Int = long long;
using std::cout;
using std::cin;
using std::endl;
using Mint = Modint<long long, 1000000007>;

Int n, k;
Mint ans;

int main(){
	cin >> n >> k;
	for(Int i = k; i <= n + 1; ++i){
		ans += Mint((2 * n - i + 1) * i / 2);
		ans -= Mint((i - 1) * i / 2);
		ans += Mint(1);
	}
	cout << ans << endl;
}


Measured memory_bytes: 3636
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int x;
		
			for(int i=1; true; i++){
				x = sc.nextInt();
				if(x == 0) break;
				System.out.println("Case " + i + ":" + " " + x);
			}
			sc.close();
	}
}


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

// TYPEDEF
// ----------------------------------------
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> Pair;
typedef vector<ll> vll;
typedef vector<vector<ll>> Graph;
typedef vector<string> vs;
typedef vector<pair<ll, ll>> Pll;
typedef queue<ll> qll;

// REPEAT
// ----------------------------------------
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define REPA(i,a) for(ll i=0;i<(ll)(a.size());i++);
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
#define COUT(a) cout << (a) << endl;
#define ENDL(a) cout << endl;
#define COUTA(i,a) for(ll i=0;i<(ll)(a.size());i++) {cout << (a)[i] << " ";} cout << endl;

// UTIL
// ----------------------------------------
#define pb push_back
#define paired make_pair
#define ALL(a) (a).begin(),(a).end()
#define SORT(a) sort((a).begin(),(a).end())
#define RSORT(a) sort((a).rbegin(), (a).rend())

// DEBUG
// ----------------------------------------
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif

template <typename T>
void debugV(const vector<T> v) {
#ifdef _DEBUG
  rep(i, v.size()) {
    cout << i << ":" << v[i] << " ";
  }
  cout << endl;
#else
  (void)v;
#endif
}

// BIT FLAG
// ----------------------------------------
const unsigned int BIT_FLAG_0 = (1 << 0); // 0000 0000 0000 0001
const unsigned int BIT_FLAG_1 = (1 << 1); // 0000 0000 0000 0010
const unsigned int BIT_FLAG_2 = (1 << 2); // 0000 0000 0000 0100
const unsigned int BIT_FLAG_3 = (1 << 3); // 0000 0000 0000 1000
const unsigned int BIT_FLAG_4 = (1 << 4); // 0000 0000 0001 0000
const unsigned int BIT_FLAG_5 = (1 << 5); // 0000 0000 0010 0000
const unsigned int BIT_FLAG_6 = (1 << 6); // 0000 0000 0100 0000
const unsigned int BIT_FLAG_7 = (1 << 7); // 0000 0000 1000 0000
const unsigned int BIT_FLAG_8 = (1 << 8); // 0000 0001 0000 0000
const unsigned int BIT_FLAG_9 = (1 << 9); // 0000 0010 0000 0000
const unsigned int BIT_FLAG_10 = (1 << 10); // 0000 0100 0000 0000
const unsigned int BIT_FLAG_11 = (1 << 11); // 0000 1000 0000 0000

// CONST
// ----------------------------------------
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI=3.14159265358979323846; // or M_PI
constexpr int MOD = 1000000007;


void Main() {
  ll a, b;
  cin >> a >> b;
  ll ans = a - b - b;
  COUT(max(ll(0), ans));
}

int main()
{
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
}

/*

3 2
*/


Measured memory_bytes: 3608
music_num = int(input())
music_list = []

for i in range(music_num):
    music_list.append(input().split(' '))

sleep_timing_music = input()
flag = False
sleep_time = 0

for j in music_list:
    if flag == True:
        sleep_time += int(j[1])
        
    if j[0] == sleep_timing_music:
        flag = True

print(sleep_time)

Measured memory_bytes: 3060
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
using namespace std;

int main() {
    int A,B,C;
    cin >> A>>B>>C;

    cout << (((B / A) < C) ? (B / A) : C) << "\n";

}

Measured memory_bytes: 256
/* - - - - - - - - - - - - - - -
	User : 		VanishD
	problem :
	Points : 	
- - - - - - - - - - - - - - - */
# include <bits/stdc++.h>
# define 	ll 		long long
using namespace std;
const int inf = 0x3f3f3f3f, INF = 0x7fffffff;
const ll  infll = 0x3f3f3f3f3f3f3f3fll, INFll = 0x7fffffffffffffffll;
int read(){
	int tmp = 0, fh = 1; char ch = getchar();
	while (ch < '0' || ch > '9'){ if (ch == '-') fh = -1; ch = getchar(); }
	while (ch >= '0' && ch <= '9'){ tmp = tmp * 10 + ch - '0'; ch = getchar(); }
	return tmp * fh;
}
int n, k;
ll ans;
int main(){
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);
	n = read(), k = read();
	int num = n / k;
	ans = 1ll * num * num * num; 
	if (k % 2 == 0){
		int num = (n + (k / 2)) / k;
		ans = ans + 1ll * num * num * num;
	}
	printf("%lld\n", ans);
	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(){
  int flg=1,i,n,array[100],box,count=0;
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&array[i]);
 
  while( flg != 0){
    flg=0;
    for(i=n-1;i>0;i--){
      if(array[i] < array[i-1]){
	box = array[i];
	array[i] = array[i-1];
	array[i-1] = box;
	flg=1;
	count++;
      }
    }
  }
  for(i=0;i<n;i++){
    printf("%d",array[i]);
    if( i == n-1) printf("\n");
    else printf(" ");
  }
  printf("%d\n",count);
  return 0;
}

Measured memory_bytes: 604
#include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <stack>
#include <string>
#include <vector>
 
using namespace std;
typedef long long ll;
using gra = vector<vector<ll>>;
using gram = vector<unordered_map<ll,ll>>;
 
typedef unsigned long long ull;
 
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; }
 
template <class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template <class T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
template <class T> T dup(T a, T b) { return (a + b - 1) / b; }
template <class T> T modpow(T x, T p, T m) { T a=1; while(p){ if(p%2)a =a*x%m; x = x+x%m; p/=2; } return a; }
// template <class T> void prim(T a) { for(ll i=0;i<a.size();++i) { cout << a[i]; } cout << "\n"; }
 
#define mod 1000000007LL
#define INF 10000000000000000LL
 
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
#define rrep(i, n) for (int i = (n - 1); i >= 0; --i)
#define rrep1(i, n) for (int i = n; i > 0; --i)
 
#define pri(x) cout << (x) << "\n"
#define pri2(x, y) cout << (x) << " " << (y) << "\n"
#define pri3(x, y, z) cout << (x) << " " << (y) << " " << (z) << "\n"
//#define modpow(x, p, m) { ll a=1; while(p){ if(p%2)a =a*x%m; x = x+x%m; p/=2; } return a; }
 
#define m0(h) memset(h, 0, sizeof(h))
#define m1(h) memset(h, 1, sizeof(h))
#define m(h, n) memset(h, (n), sizeof(h))
#define all(n) (n).begin(),(n).end()
#define bit(n) (1LL << (n))
#define pb push_back
 
//#ifdef LOCAL
//
//#define dpri(...) fprintf(stderr, __VA_ARGS__)
//#define pria(g) rep(i,g.size()){ cout << i << "{"; rep(j,g[i].size()) cout << g[i][j] << " "; cout << "}" << "\n"; }
//#else
//#define dpri(...) 42
//#define pria(g) 42
//#endif
 
 
 
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  // ---------------------
  // コーディング開始
  // ---------------------
  ll n;
  string s;
  cin >> n >> s;
  ll ans =0;
  rep(i,1000){
    // 作れるかどうかみる
    string ss = to_string(i);
    if(ss.length()==1) ss = "00"+ ss;
    if(ss.length()==2) ss = "0" + ss;
    int ct = 0;
    rep(j,n){
      if(s[j]==ss[ct]){
        ct++;
      }
    }
    if(ct > 2){
      ans ++;
    }
  }
  pri(ans);
  return 0;
}


Measured memory_bytes: 512
#include <stdio.h>

int main(){
    int i, j, k;
    int n, x, s;
    
    while(scanf("%d %d", &n, &x), n > 0){
        s = 0;
        
        for(i = 1; i <= n; ++i){
            for(j = i + 1; j <= n; ++j){
                for(k = j + 1; k <= n; ++k){
                    if(i + j + k == x){
                        ++s;
                    }
                }
            }
        }
        
        printf("%d\n", s);
    }
    
    return 0;
}

Measured memory_bytes: 1844
#include<stdio.h>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<vector>
#include<utility>
#include<stack>
#include<algorithm>
#include<string>
#include<string.h>
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll,ll> ii;

const int N = 1e6;
int prf[N + 5];

int main(){
    ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n; cin >> n;
    while(n--){
        int a, b; cin >> a >> b;
        prf[a] += 1;
        prf[b + 1] -= 1;
    }
    int ans = 0;
    for(int i = 1; i <= N; ++i){
        prf[i] += prf[i - 1];
        if(prf[i] > 0)ans++;
    }

    cout << ans << endl;
}

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

int main(){
  int n;
  cin >> n;
  int cnt=1;
  vector<pair<int,int>> d;
  for(int i=0;i<n;i++){
      int a,b;
      cin >> a >> b;
      d.push_back(make_pair(a+b,a-b));
  }
  sort(d.begin(),d.end());
  int cur = 0;
  for(int i=1;i<n;i++){
      if(d[cur].first<=d[i].second){
          cnt++;
          cur = i;
      }
  }
  cout << cnt << endl;
}


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

int main () {
    int N;
    cin >> N;
    vector<int> vec(N);
    for (int i=0; i<N; i++) {
        cin >> vec.at(i);
    }
    int Alice=0;
    int Bob=0;
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    for (int i=0; i<N; i++) {
        if (i%2==0) {
            Alice+=vec.at(i);
        }
        else {
            Bob+=vec.at(i);
        }
    }
    cout << Alice-Bob << endl;
}
            
    

        
    


Measured memory_bytes: 3584
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
  cin>>a>>b>>c;
  int t;
  t=a;
  a=b;
  b=t;
  t=a;
  a=c;
  c=t;
  cout<<a<<" "<<b<<" "<<c;
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
   int n;
   cin >> n;
    vector<int>vect;  
    int k;
    cin >> k;
    for(int i=0;i<n;i++)
    {
        int x;
        cin >> x ;
        vect.push_back(x);
    }
    int ans = 0;
    sort(vect.begin(),vect.end());
    for(int i=0;i<k;i++)
    {
        ans+=vect[i];
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3632
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using static System.Console;
using static System.Math;
using static MyIO;
using static MyUtil;

public class E
{
	public static void Main() => (new Solver()).Solve();
}

public class Solver
{
	public void Solve()
	{
		long N = GetLong();
		long P = GetLong();
		var S = GetString();

		var num = S.Select(x => (long)(x - '0')).ToArray();
		WriteLine((P == 2 || P == 5) ? solve1(N, P, num) : solve2(N, P, num));
	}

	private long solve1(long N, long P, long[] num)
	{
		long cnt = 0;
		for(long i = N - 1; i >= 0; i--)
		{
			if(num[i] % P == 0)
				cnt += i + 1;
		}
		return cnt;
	}

	private long solve2(long N, long P, long[] num)
	{
		long cnt = 0;
		var dict = new Dictionary<long, long>();
		dict[0] = 1;
		long r = 0;
		long pow = 1;
		for(long i = N - 1; i >= 0; i--)
		{
			r = (num[i] * pow + r) % P;
			pow = (pow * 10) % P;
	
			long c = 0;
			dict.TryGetValue(r, out c);
			cnt += c;
			dict[r] = c + 1;
		}
		return cnt;
	}
}

public static class MyIO
{
	private static string[] args = null;
	private static int num = -1;
	private static int used = -1;

	private static string getArg()
	{
		if(used == num)
		{
			args = Console.ReadLine().Split(' ');
			num = args.Length;
			used = 0;
		}
		return args[used++];
	}

	public static int GetInt() => int.Parse(getArg());
	public static long GetLong() => long.Parse(getArg());
	public static double GetDouble() => double.Parse(getArg());
	public static decimal GetDecimal() => decimal.Parse(getArg());
	public static string GetString() => getArg();
	public static char GetChar() => getArg()[0];
	public static int[] GetInts(long N) => Enumerable.Range(0, (int)N).Select(_ => GetInt()).ToArray();
	public static long[] GetLongs(long N) => Enumerable.Range(0, (int)N).Select(_ => GetLong()).ToArray();
	public static double[] GetDoubles(long N) => Enumerable.Range(0, (int)N).Select(_ => GetDouble()).ToArray();
	public static decimal[] GetDecimals(long N) => Enumerable.Range(0, (int)N).Select(_ => GetDecimal()).ToArray();
	public static string[] GetStrings(long N) => Enumerable.Range(0, (int)N).Select(_ => GetString()).ToArray();
}

public static class MyUtil
{
	public static void chmax<T>(ref T x, T y) where T : IComparable<T>
	{
		if(x.CompareTo(y) < 0)
			x = y;
	}

	public static void chmin<T>(ref T x, T y) where T : IComparable<T>
	{
		if(x.CompareTo(y) > 0)
			x = y;
	}

	public static void swap<T>(ref T x, ref T y)
	{
		T tmp = x;
		x = y;
		y = tmp;
	}
}

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

using namespace std;
typedef long long int ll;
typedef pair<int, int> ii;
#define DEBUG freopen("in.txt", "r", stdin);

struct fastio {
    fastio() {
        ios::sync_with_stdio(false);
        cout << setprecision(10) << fixed;
        cin.tie(0);
    }
};

fastio _fast_io;

int x, a, b;
int main() {
    cin >> x >> a >> b;
    int da = abs(x - a);
    int db = abs(x - b);
    if (da > db)
        cout << "B" << endl;
    else
        cout << "A" << endl;
    return 0;
}


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

constexpr int inf = 0x3f3f3f3f;
constexpr ll linf = 0x3f3f3f3f3f3f3f3fLL;

int v, e;
vector<int> g[100];
bool visited[100];
bool loop[100];

bool dfs(int now)
{
    if (loop[now]) return true;
    if (visited[now]) return false;

    visited[now] = loop[now] = true;
    for (auto &nxt: g[now]) {
        if (dfs(nxt)) return true;
    }
    loop[now] = false;
    return false;
}

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

    cin >> v >> e;
    for (int i = 0; i < e; i++) {
        int s, t; cin >> s >> t;
        g[s].emplace_back(t);
    }
    bool ans = false;
    for (int i = 0; i < v; i++) ans |= dfs(i);
    cout << ans << endl;
    return 0;
}



Measured memory_bytes: 3240
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
#define idfc ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr)
//:/
#define pb emplace_back
#define mp make_pair
#define nt _ll128
#define ld long double
long double PI =3.14159265358979323846;
using ll = long long;



const ll modo=1e9+7;
const ll inf=1e17;
const ll ms=(2e6)+5;


ll ar[ms];
ll cost[ms];
ll br[ms];


int main()
{

    int n,m;
    cin>>n>>m;
    priority_queue<int> q;
    int e;

    while(n--)
    {
        cin>>e;
        q.push(e);
    }

    while(m--)
    {
        e=q.top();
        q.pop();
        q.push(e/2);
    }
    ll ans=0;
    while(!q.empty())
    {
        ans+=q.top();
        q.pop();
    }
    cout<<ans;


    return 0;
}

Measured memory_bytes: 3908
using System;
using System.Linq;

namespace ABC103_C
{
    class Program
    {
        static void Main(string[] args)
        {
            var N = int.Parse(Console.ReadLine());
            var a = Console.ReadLine().Split().Select(long.Parse).ToArray();

            Console.WriteLine(a.Sum() - a.Count());
        }
    }
}


Measured memory_bytes: 13396
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define mp make_pair
#define pb(x) push_back(x)
#define vll vector<long long>
#define pll pair<long long, long long>
#define mll map<long long, long long>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define gcd __gcd
#define clr(x) memset(x, 0, sizeof(x))
#define mod 1000000007LL
#define mod2 998244353LL
#define INF 1e18
 

typedef long long ll;
typedef long double ld;
typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> o_tree;


void solve()
{
    string s;
    cin>>s;
    ll i,j;
    string res=s;
    ll n=s.length();
    if(s[n-1]=='s')
    {
        res+="es";
    }
    else{
        res+="s";
    }
    cout<<res<<"\n";
}


int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);


if (fopen("input.txt","r" ))
  {
     freopen("input.txt", "r", stdin);
     freopen("output.txt", "w", stdout);
  }
cout<<setprecision(20);


ll t=1;


// cin>>t;


while(t--)
{
solve();
} 


return 0;
}

Measured memory_bytes: 3660
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 1005
const ll INF = 1ll << 60;

struct VERTEX {
    ll score;

    vector<int> nextVerxNum;
    vector<ll> weiht;
};


int n, m;
VERTEX vertexs[MAX];

int main() {
    cin >> n >> m;
    for(int i = 0; i < n; i++) vertexs[i].score = INF;
    for(int i = 0; i < m; i++) {
        int a, b, c;
        cin >> a >> b >> c;
        vertexs[a - 1].nextVerxNum.push_back(b - 1);
        vertexs[a - 1].weiht.push_back(-c);
    }

    vertexs[0].score = 0;

    bool inf = false;
    for(int i = 0; i < n - 1; i++) {
        for(int j = 0; j < n; j++) {
            for(signed k = 0; k < vertexs[j].nextVerxNum.size(); k++) {
                if(vertexs[j].score == INF) continue;
                if(vertexs[vertexs[j].nextVerxNum[k]].score > vertexs[j].score + vertexs[j].weiht[k]) {
                    vertexs[vertexs[j].nextVerxNum[k]].score = vertexs[j].score + vertexs[j].weiht[k];
                }
            }
        }
    }
    ll ans1 = vertexs[n - 1].score;

    for(int j = 0; j < n; j++) {
        for(signed k = 0; k < vertexs[j].nextVerxNum.size(); k++) {
            if(vertexs[j].score == INF) continue;
            if(vertexs[vertexs[j].nextVerxNum[k]].score > vertexs[j].score + vertexs[j].weiht[k]) {
                vertexs[vertexs[j].nextVerxNum[k]].score = vertexs[j].score + vertexs[j].weiht[k];
            }
        }
    }
    ll ans2 = vertexs[n - 1].score;

    if(ans1 != ans2) inf = true;
    if(inf) cout << "inf\n";
    else cout << -vertexs[n - 1].score << "\n";

    return 0;
}


Measured memory_bytes: 384
#include <iostream>
#include <math.h>
#include <numeric>
#include <vector>
#include <map>
#include <algorithm>
#include <set>
#include <queue>
#include <tuple>
#include <functional>
#include <cstring>

#define PI 3.14159265359
#define INF 1e9
#define LINF 1e18
#define IMOD 1000000007 
#define irep(i,n) for(int  i = 0; i < n; i++)
#define irep2(i,a,n) for(int i = a; i <= n; i++)
#define lrep(i,n) for(long long  i = 0; i < n; i++)
#define lrep2(i,a,n) for(long long i = a; i <= n; i++)

typedef long long ll;
typedef std::vector<char> v_char;
typedef std::vector<int> v_int;
typedef std::vector<std::vector<int> > v2_int;
typedef std::vector<ll> v_ll;
typedef std::vector<std::vector<ll> > v2_ll;
typedef std::vector<std::string> v_string;
typedef std::vector<std::vector<std::string> > v2_string;
typedef std::vector<bool> v_bool;
typedef std::vector<std::vector<bool> > v2_bool;
typedef std::pair<ll, ll> pll;
typedef std::pair<int, int> pii;

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

using namespace std;

ll g(ll n, ll x)
{
    if(n == 0) { return 0; }

    ll i = n / x;

    return i + g(i, x);
}

ll g2(ll n, ll x)
{
    if(n % 2) { 
        return 0;
    } else {
        ll i = n / 2;
        return 2 / x + g(i, x);
    }
}

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

    //cout << min(g2(n, 2), g2(n, 5));
    cout << g2(n, 5);
    return 0;
}
/** atcodr **/


Measured memory_bytes: 256
def cross_product(ax, ay, bx, by)
  ax * by - ay * bx
end

while line = gets
  xa, ya, xb, yb, xc, yc, xd, yd = line.chomp.split(',').map(&:to_f)
  s1 = cross_product(xb - xa, yb - ya, xc - xa, yc - ya)
  s2 = cross_product(xc - xb, yc - yb, xd - xb, yd - yb)
  s3 = cross_product(xd - xc, yd - yc, xa - xc, ya - yc)
  s4 = cross_product(xa - xd, ya - yd, xb - xd, yb - yd)
  puts (s1 > 0 && s2 > 0 && s3 > 0 && s4 > 0 || s1 < 0 && s2 < 0 && s3 < 0 && s4 < 0) ? :YES : :NO
end

Measured memory_bytes: 8600
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>

using namespace std;

typedef long long LL;
typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define Fst first
#define Snd second
#define PB(a) push_back(a)
#define MP(a , b) make_pair((a) , (b))
#define M3P(a , b , c) make_pair(make_pair((a) , (b)) , (c))
#define M4P(a , b , c , d) make_pair(make_pair((a) , (b)) , make_pair((c) , (d)))
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)

int N;
int A[100010];

int main(){
	scanf("%d" , &N);
	repp(i,0,N){
		scanf("%d" , A + i);
	}
	sort(A,A+N);
	int ans = 0;
	LL s = 0;
	repp(i,0,N){
		if((LL)A[i] <= s * 2){
			++ans;
		} else {
			ans = 1;
		}
		s += A[i];
	}
	printf("%d\n" , ans);
	return 0;
}


Measured memory_bytes: 512
function Main(input){
    input = input.split('\n');
    array = input[1].split(" ");
    array= array.map(Number);

    var nakayoshi = 0;
    for (var index = 0; index < array.length; index++) {
        if(array[index] == array[array[index]-1]){
        }
        else if(array[index] < array[array[index]-1] ){
            if(array[array[index]-1] == index+1){
                nakayoshi = nakayoshi+1;
            }
        }else{}
    }
    console.log('%d',nakayoshi);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8")); 

Measured memory_bytes: 16716
/**
 * Author: PraveenKumarRana
**/

#include<bits/stdc++.h>
#include <initializer_list>
#define ll long long int
#define mod 1000000007
using namespace std;

void solve(){
    int n; cin>>n;
    vector<int> h(n);
    for(int& x: h) cin>>x;
    vector<int> dp(n,1e9+5);
    dp[0]=0;
    for(int i=0; i<n; ++i){
        int p=i;
        for(int j=p+1; j<p+3; j++){
            if(j<n){
                dp[j]=min(dp[j],dp[i]+abs(h[i]-h[j]));
            }
        }
    }
    cout<<dp[n-1]<<"\n";
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}



Measured memory_bytes: 1024
import java.util.*;
public class Main {
	static Scanner sc = new Scanner(System.in);
	static int n, m;
	static int[] taro, hanako;
	static int[][]ans;
	public static void main(String[] args) {
		while(read()){
			solve();
		}
	}
	
	static boolean read(){
		n = sc.nextInt();
		if(n == 0)return false;
		m = sc.nextInt();
		taro = new int[n];
		hanako = new int[m];
		for(int i = 0; i < taro.length; i++){
			taro[i] = sc.nextInt();
		}
		for(int i = 0; i < hanako.length; i++){
			hanako[i] = sc.nextInt();
		}
		return true;
	}
	
	static void solve(){
		boolean f = false;
		int sum = 200;
		int[] res = new int[2];
		for(int i = 0; i < taro.length; i++){
			int t = taro[i];
			for(int j = 0; j < hanako.length; j++){
				int h = hanako[j];
				hanako[j] = t;
				taro[i] = h;
				int taroSum = 0, hanakoSum = 0;
				for(int k = 0; k < taro.length; k++){
					taroSum += taro[k];
				}
				for(int k = 0; k < hanako.length; k++){
					hanakoSum += hanako[k];
				}
				if(taroSum == hanakoSum){
					f = true;
					if(sum > t + h){
						res[0] = t;
						res[1] = h;
						sum = t+h;
					}
				}
				hanako[j] = h;
			}
			taro[i] = t;
		}
		if(f){
			System.out.println(res[0] + " " + res[1]);
		}else{
			System.out.println(-1);
		}
	}
}

Measured memory_bytes: 12000
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n, m = MAP()

if m >= 2 * n:
    r = m - 2 * n
    l = r // 4
    print(n + l)
else:
    print(m // 2)


Measured memory_bytes: 5276
#include <bits/stdc++.h>
using namespace std;
long long n, a, b;
int main() {
	cin >> n >> a >> b;
	for (long long i = 1; i < n; i++) 
	{
		long long A, B, lasta = a, lastb = b;
		cin >> A >> B;
// 		int tmp1,tmp2;
// 		int k;
// 		cout<<tmp1<<' '<<tmp2<<' '<<k<<endl;
		b = B * ((b + B - 1) / B);
		a = (b / B) * A;
		assert(b >= lastb);	
		if (a < lasta)
			a = A * ((lasta + A - 1) / A), b = (a / A) * B;
		assert(a >= lasta && b >= lastb);
	}
	cout << a + b << endl;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>   
#define rep(i, n) for(long long int i = 0; i < n; i++)
#define _rep(i, m, n) for(long long int i = m; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll mod = 1000000007;
//const int dx[4] = {1, 0, -1, 0};
//const int dy[4] = {0, 1, 0, -1};
     
ll gcd(ll A, ll B){
    if(B == 0)return A;
    return gcd(B, A % B);
}
ll lcm(ll A, ll B){
    return A * B / gcd(A, B);
}
template <typename T>
T pow(T a, ll n, T e = 1) {
    T ret = e;
    while (n) {
        if (n & 1) ret *= a;
        a *= a;
        n >>= 1;
    }
    return ret;
}
 
template <int mod>
struct ModInt {
    int x;
    ModInt() : x(0) {}
    ModInt(long long x_) {
        if ((x = x_ % mod + mod) >= mod) x -= mod;
    }
    ModInt& operator+=(ModInt rhs) {
        if ((x += rhs.x) >= mod) x -= mod;
        return *this;
    }
    ModInt& operator-=(ModInt rhs) {
        if ((x -= rhs.x) < 0) x += mod;
        return *this;
    }
    ModInt& operator*=(ModInt rhs) {
        x = (unsigned long long)x * rhs.x % mod;
        return *this;
    }
    ModInt& operator/=(ModInt rhs) {
        x = (unsigned long long)x * rhs.inv().x % mod;
        return *this;
    }
 
    ModInt operator-() const { return -x < 0 ? mod - x : -x; }
    ModInt operator+(ModInt rhs) const { return ModInt(*this) += rhs; }
    ModInt operator-(ModInt rhs) const { return ModInt(*this) -= rhs; }
    ModInt operator*(ModInt rhs) const { return ModInt(*this) *= rhs; }
    ModInt operator/(ModInt rhs) const { return ModInt(*this) /= rhs; }
    bool operator==(ModInt rhs) const { return x == rhs.x; }
    bool operator!=(ModInt rhs) const { return x != rhs.x; }
    ModInt inv() const { return pow(*this, mod - 2); }
 
    friend ostream& operator<<(ostream& s, ModInt<mod> a) {
        s << a.x;
        return s;
    }
    friend istream& operator>>(istream& s, ModInt<mod>& a) {
        s >> a.x;
        return s;
    }
};
 
using mint = ModInt<1000000007>;
using Graph = vector<vector<int>>;
Graph G;
/*------------------------------------------------------------------*/

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

    int n; cin >> n;
    vector<double> x(n), y(n);
    rep(i, n) cin >> x[i] >> y[i];
    vector<int> p(n);
    rep(i, n) p[i] = i;
    int kaijou = 1;
    _rep(i, 1, n + 1) kaijou *= i;
    double dist = 0;
    do{
        rep(i, n - 1) dist += sqrt((x[p[i + 1]] - x[p[i]]) * (x[p[i + 1]] - x[p[i]]) + (y[p[i + 1]] - y[p[i]]) * (y[p[i + 1]] - y[p[i]]));
    }while(next_permutation(p.begin(), p.end()));
    cout << setprecision(15) << dist / kaijou << endl;
}

Measured memory_bytes: 3824
n = gets.strip.split.map{|n| n.to_i}
a = n[0]
b = n[1]
k = n[2]

if b-a <= 2*k - 1
  for i in a..b
    puts i
  end
else  b-a <= 2*k - 1
  for i in a..a+k-1
    puts i
  end
  for j in b-k+1..b
    puts j
  end
end


Measured memory_bytes: 1788
#include <iostream>
#include <algorithm>
#include <functional>
#include<vector>
using namespace std;


int main() {
	int N;
	cin >> N;
	vector<int> vec(N+2);
	vec.at(0) = 0;
	vec.at(N + 1) = 0;
	for (int u = 1; u <= N; u++) {
		cin >> vec.at(u);
	}

	int sum = 0;

	for (int o = 0; o <= N; o++) {
		sum += abs(vec.at(o) - vec.at(o + 1));
	}

	for (int i = 1; i <=N; i++) {
		int Y = sum;
			Y -= (abs(vec.at(i) - vec.at(i - 1)) + abs(vec.at(i + 1) - vec.at(i)) - abs(vec.at(i - 1) - vec.at(i + 1)));
			cout << Y << endl;
	}

	return 0;
}

Measured memory_bytes: 1664
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n;
	cin>>n;
	double a,max=0;
	double sum=0;
	for(int i=0;i<n;i++)
	{
		cin>>a;
		sum+=a;
		if(a>max)
		max=a;
	}
	sum-=max/2;
	cout<<sum;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
 long long int n,k,a,b;
 cin >> n >> a >> b;
 k=(n/(a+b))*a;
 n%=(a+b);
 k+=min(a,n);
 cout << k;
 return 0;
}

Measured memory_bytes: 256
function main(input) {
  var n = parseInt(input,10);
  var result = "";
  const abcs = "abcdefghijklmnopqrstuvwxyz";
  while (0 < n) {
    var m = n % 26;
    if (m === 0) {
      m = 26;
    }
    result = abcs.substr(m - 1, 1) + result;
    n = (n - m) / 26;
  }
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 29348
#include"bits/stdc++.h"

using namespace std; 

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
typedef priority_queue<LL> PQ_DESC;
typedef priority_queue<LL, VL, greater<LL>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;
typedef priority_queue<VL> PQ_DESC_VL;
typedef priority_queue<VL, vector<VL>, greater<VL>> PQ_ASC_VL;
typedef priority_queue<PLL> PQ_DESC_PLL;
typedef priority_queue<PLL, vector<PLL>, greater<PLL>> PQ_ASC_PLL;

#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define SORT_ASC(c) sort(ALL(c))
//#define SORT_DESC(c) sort(ALL(c), greater<typeof(*((c).begin()))>())
#define SORT_DESC(c) sort((c).rbegin(),(c).rend())
#define REV(c) reverse((c).begin(), (c).end())
#define SIZE(a) int((a).size())

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

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int LARGE_INT = 1e9+100;
const int INF = 2e9+100;
const LL INF_LL = (LL)INF*(LL)INF;
const int MOD = 1e9+7;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;


// 素因数分解
set<LL> prime_factor(LL n) {
  set<LL> primeFactor;
  for(LL i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      primeFactor.insert(i);
      n /= i;
    }
  }
  if(n != 1) primeFactor.insert(n);
  return primeFactor;
}


void Main()
{
    LL n;cin>>n;
    VL a(n);
    REP(i,n){
        cin>>a[i];
    }

    bool pairwise = true;
    set<LL> pf = prime_factor(a[n-1]);
    for(int i=n-2; i>=0; i--){
        set<LL> p = prime_factor(a[i]);
        for(auto x : p){
            if(pf.count(x) != 0){
                pairwise = false;
                break;
            }
            pf.insert(x);
        }
    }

    if(pairwise){
        cout<<"pairwise coprime"<<endl;
        return;
    }

   // bool setwise  = true;
    LL now = a[0];
    FOR(i,1,n){
        /*
        if(gcd(a[i],now) != 1){
            setwise  = false;
            dump(i)
            dump(now)
            break;
        }
        */
        now = gcd(a[i],now);
    }
    if(now == 1){
        cout<<"setwise coprime"<<endl;
    }
    else{
        cout<<"not coprime"<<endl;
    }

    
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
    return 0;
}

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

using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }

#ifdef LOCAL
#define show(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl
#else
#define show(x) true
#endif

template <class T, class U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
    return os << "P(" << p.first << ", " << p.second << ")";
}

template <class T> ostream& operator<<(ostream& os, const V<T>& v) {
    os << "[";
    for (auto d : v) os << d << ", ";
    return os << "]";
}

template <uint MD> struct ModInt {
    using M = ModInt;
    const static M G;
    uint v;
    ModInt(ll _v = 0) { set_v(_v % MD + MD); }
    M& set_v(uint _v) {
        v = (_v < MD) ? _v : _v - MD;
        return *this;
    }
    explicit operator bool() const { return v != 0; }
    M operator-() const { return M() - *this; }
    M operator+(const M& r) const { return M().set_v(v + r.v); }
    M operator-(const M& r) const { return M().set_v(v + MD - r.v); }
    M operator*(const M& r) const { return M().set_v(ull(v) * r.v % MD); }
    M operator/(const M& r) const { return *this * r.inv(); }
    M& operator+=(const M& r) { return *this = *this + r; }
    M& operator-=(const M& r) { return *this = *this - r; }
    M& operator*=(const M& r) { return *this = *this * r; }
    M& operator/=(const M& r) { return *this = *this / r; }
    bool operator==(const M& r) const { return v == r.v; }
    M pow(ll n) const {
        M x = *this, r = 1;
        while (n) {
            if (n & 1) r *= x;
            x *= x;
            n >>= 1;
        }
        return r;
    }
    M inv() const { return pow(MD - 2); }
    friend ostream& operator<<(ostream& os, const M& r) { return os << r.v; }
};
using Mint = ModInt<998244353>;
template<> const Mint Mint::G = Mint(3);

const int OFF = 91000;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    int n;
    cin >> n;
    V<Mint> dp(2 * OFF), ndp(2 * OFF);
    V<Mint> dp2(2 * OFF), ndp2(2 * OFF);
    dp[OFF] = dp2[OFF] = 1;
    for (int i = 0; i < n; i++) {
        int a;
        cin >> a;
        for (int j = -OFF + 330; j < OFF - 330; j++) {
            ndp[j + OFF] = dp[j - a + OFF] + Mint(2) * dp[j + a + OFF];
            ndp2[j + OFF] = dp2[j - a + OFF] + dp2[j + a + OFF];
        }
        swap(dp, ndp);
        swap(dp2, ndp2);
    }

    Mint ans = Mint(3).pow(n);
    for (int j = 0; j < OFF; j++) {
/*        if (dp[OFF + j]) {
            show(j);
            show(dp[OFF + j]);
        }*/
        ans -= Mint(3) * dp[OFF + j];
    }
    ans += Mint(3) * dp2[OFF];

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3072
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		final Scanner sc = new Scanner(System.in);
		
		final int N = sc.nextInt();
		final int M = sc.nextInt();
		
		int[] count = new int[N];
		Arrays.fill(count, 1);
		
		boolean[] DP = new boolean[N];
		DP[0] = true;
		
		for(int i = 0; i < M; i++){
			final int x = sc.nextInt() - 1;
			final int y = sc.nextInt() - 1;
			
			if(DP[x]){
				if(count[x] >= 2){
					DP[x] = true;
				}else{
					DP[x] = false;
				}
				
				DP[y] = true;
			}
			count[x] -= 1;
			count[y] += 1;
			
			//System.out.println(Arrays.toString(DP));
		}
		
		int answer = 0;
		for(int i = 0; i < N; i++){
			if(DP[i]){ answer++; }
		}
		//System.out.println(Arrays.toString(DP));
		System.out.println(answer);
	}

	public static class Scanner implements Closeable {
		private BufferedReader br;
		private StringTokenizer tok;

		public Scanner(InputStream is) throws IOException {
			br = new BufferedReader(new InputStreamReader(is));
		}	

		private void getLine() throws IOException {
			while (!hasNext()) {
				tok = new StringTokenizer(br.readLine());
			}
		}

		private boolean hasNext() {
			return tok != null && tok.hasMoreTokens();
		}

		public String next() throws IOException {
			getLine();
			return tok.nextToken();
		}

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

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public void close() throws IOException {
			br.close();
		}
	}
}

Measured memory_bytes: 20720
import string

line = raw_input()
# line = "haiku,atcoder,enjoy"
haiku = line.split(",")

len1 = len(haiku[0])
len2 = len(haiku[1])
len2 = len(haiku[2])

print(haiku[0] + " " + haiku[1] + " " + haiku[2])

Measured memory_bytes: 2696
"""#################################################################
【ABC114】
B_754
#################################################################"""

#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
min = 99999999
for i in range(len(S)-2):
    val = int(S[i:i+3])
    if abs(753-val) < min:
        min = abs(753 - val)
print(min)

Measured memory_bytes: 3064
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define SORT(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
int main()
{
	int n;
	int a,b,c;
	cin >> n;
	if(n==2)
	{
		cin >> a >> b;
		int g=__gcd(a,b);
		for(int i=1;i<=g/2;i++)
		{
			if(g%i==0)cout << i << endl;
		}
		cout << g << endl;
		return 0;
	}
	if(n==3)
	{
		cin >> a >> b >> c;
		int g=__gcd(a,b);
		int h=__gcd(g,c);
		for(int i=1;i<=h/2;i++)
		{
			if(h%i==0)cout << i << endl;
		}
		cout << h << endl;
		return 0;
	}
	return 0;
}

Measured memory_bytes: 1160
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int T = sc.nextInt();
    int[]c = new int[n];
    int[]t = new int[n];
    ArrayList<Integer>ans  = new ArrayList<>();
    
    for(int i=0; i<n; i++) {
    	c[i] = sc.nextInt();
    	t[i] = sc.nextInt();
    }
    for(int i=0; i<n; i++) {
    	if(t[i] <= T) {
    		ans.add(c[i]);
      		}
    	}
    Collections.sort(ans);
    if(ans.size() == 0) {
    	System.out.println("TLE");
    }else {
    	System.out.println(ans.get(0));
    		}
}
}

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

int main() {
  int n,min_count;
  cin >> n;
  min_count=30;

  for(int i=0; i<n; i++){
    int a,count;
    cin >> a;
    count=0;

    while(a%2==0){
      a=a/2;
      count++;
    }
    min_count = min(count,min_count);
  }
  cout << min_count << endl;
}



Measured memory_bytes: 256
/*****************************************************

*****************************************************/

#include<bits/stdc++.h>
#define MAX 9223372036854775807
#define endl "\n"
#define ll long long
#define int long long
#define pb push_back
#define pf push_front
#define ppf pop_front
#define mp make_pair
#define ip pair<int, int>

#define loop(i,n) for(int i=0;i<n;i++)
#define fast ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL)
using namespace std;

const ll MOD = 1e9+7;
const ll SZ = 107;
const ll N = 2e5+7;
const ll inf = 1e17;

int pwr(int x, int y)
{
    ll r = 1LL;
    while(y)
    {
        if(y&1)
            r = (r * x) % MOD;
        y >>= 1;
        x = (x * x) % MOD;
    }
    return r % MOD;
}

int inv(int x)
{
    return pow(x, MOD-2);
}

void solve()
{
    int n, x; cin>>n>>x;
    int l[n+2];
    for(int i=1;i<=n;i++) cin>>l[i];

    int d[n+1];
    d[0] = 0;
    int ans = 1;
    for(int i=1;i<=n;i++)
    {
        d[i] = d[i-1]+l[i];
        if(d[i]<=x)
            ans++;
        else
            break;
    }
    cout<<ans;
}

signed main()
{

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

/*****************************


****************************/

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<string.h>
using namespace std;
#define pb push_back
#define all(v) v. begin(),v. end()
#define  rep(i,n,v) for(i=n;i<v;i++)
#define per(i,n,v) for(i=n;i>v;i--)
#define ff first 
#define ss second 
#define pp pair<ll,ll>
#define ll  long long
#define endl '\n'
void solve()
{
  ll n, a,m=0,b=1, c,k=0, i, j,l=1e9+7;
  string s, r, y;
  cin>>s;
//  cout<<s[0];
sort(s.begin(),s. end());
char e='a';
rep(j,0,26) {
  k=0;
   rep(i,0,s.length())
   {
     if(s[i]==e) {k=1;break;}
   }
   if(!k) {
   cout<<e;return;}
   e++;
   }
   cout<<"None";
}
int main()
{
 ios_base::sync_with_stdio(false);
  cin. tie(0);cout. tie(0);
    ll t=1;
   //cin>>t;
    while(t--)
    {
      solve();
    }
    return 0;
}

Measured memory_bytes: 3768
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ll long long int
const int INF = 2147483647;

using namespace std;

int main()
{
  string s;
  cin >> s;
  int n = s.length();
  int ans = n;
  int ansrev = n;
  REP(i, n)
  {
    if (s[i] == '1')
    {
      ans = min(ans, max(i, n - i - 1));
    }
  }
  REP(i, n)
  {
    if (s[i] == '0')
    {
      ansrev = min(ansrev, max(i, n - i - 1));
    }
  }
  cout << max(ans, ansrev) << endl;
}


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

int main() {
  ll n;
  cin >> n;
  string ans;
  while(n != 0) {
    n--;
    ans += 'a'+n % 26;
    n /= 26;
  }
  reverse(ans.begin(), ans.end());
  
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3628