akhauriyash/Code-Regression huggingface dataset:
#include <cstdio>
#include <iostream>
#include <functional>
#include <algorithm>
#include <vector>
#include <limits>
#include <numeric>
#include <type_traits>
#include <queue>
#include <math.h>
#include <queue>
#include <map>

using namespace std;

#define INF (1ll<<60)
#define INFint (1<<30)
#define MOD 1000000007
#define BOUND 27182818284

typedef long long ll;
typedef long long int lli;
// typedef pair<ll,ll> P;

#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)

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

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

// gcd
template<typename T>
T gcd(T a, T b){
    if(a==0)
        return b;
    return gcd(b%a,a);
}

int findGCD(int arr[], int n){
    int result = arr[0];
    for (int i=1; i < n; i++)
        result = gcd(arr[i], result);
    return result;
}

template<typename T>
T lcm( T m, T n ){
    // 引数に0がある場合は0を返す
    if ( ( 0 == m ) || ( 0 == n ) )
        return 0;
    return ((m/gcd(m, n)) * n); // lcm = m * n / gcd(m,n)
}

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


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

// v.front() = -BOUND;
// v.back() = BOUND;

//struct edge{
//    int cost, to;
//
//    edge(int in_cost, int in_to){
//        cost=in_cost;
//        to=in_to;
//    }
//    bool operator<(const edge &a) const
//    {
//        return cost > a.cost;
//    }
//};
vector<int>G[10010];
vector<int>c(10010,0);
int num[10010];
bool used[10010];
int now_c=0;
int dfs(int s){
    if(used[s]){
        return 0;
    }else{
        used[s]=true;
    }

    num[s]=c[now_c];
    now_c++;

    for(int i=0; i<G[s].size(); i++){
        dfs(G[s][i]);
    }
    return 0;
}


int main() {
    int N; cin >> N;
    vector<int>a(N);
    rep(i,N){
        cin >> a[i];
    }

    lli x=0LL;

    for(int i=0; i<N; i++){
        if(i==0){
            lli sum=0ll;
            for(auto b: a){
                sum+=b;
            }

            for(int j=1; j<N; j+=2){
                sum-=2*a[j];
            }
            x=sum;
            cout << x << " ";
        }   else{
            x=2*a[i-1]-x;
            cout << x << " ";
        }
    }

    return 0;
}

Measured memory_bytes: 2048
#pragma gcc optimize("Ofast")

#include "bits/stdc++.h"
using namespace std;
typedef int64_t lld;
typedef pair<int,int> pii;
typedef pair<lld,lld> pll;
typedef pair<int,pll> pip;
typedef pair<pll,int> ppi;
typedef pair<lld,pll> plp;
typedef pair<pll,lld> ppl;
typedef pair<pll,pll> ppp;
template<typename T>
using maxHeap = priority_queue<T,vector<T>,less<T>>;
template<typename T>
using minHeap = priority_queue<T,vector<T>,greater<T>>;
#define ff first
#define ss second
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define endl '\n'
#define jizz cin.tie(0);cout.tie(0);ios::sync_with_stdio(0);
inline void input(int &_x) {
    _x = 0;
    int _tmp = 1; char _tc = getchar();
    while((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
    if(_tc == '-') _tc = getchar(), _tmp = -1;
    while(_tc >= '0' && _tc <= '9') _x = _x*10+(_tc-48), _tc = getchar();
    _x *= _tmp;
}
inline void output(int _x) {
    char _buff[20]; int _f = 0;
    if(_x == 0)putchar('0');
    while(_x > 0)
    {
        _buff[_f++] = _x%10+'0';
        _x /= 10;
    }
    for(_f-=1; _f >= 0; _f--)
        putchar(_buff[_f]);
    putchar('\n');
}
template<typename Iter>
ostream& _out(ostream &s, Iter b, Iter e) {
    s<<"[";
    for ( auto it=b; it!=e; it++ ) s<<(it==b?"":" ")<<*it;
    s<<"]";
    return s;
}
template<class T1,class T2>
ostream& operator<<(ostream& out, pair<T1,T2> p) {
    return out << '(' << p.first << ", " << p.second << ')';
}
template<typename T>
ostream& operator <<( ostream &s, const vector<T> &c ) {
     return _out(s,c.begin(),c.end());
 }
#ifdef erd1
    #define pprint(x) cerr<<__PRETTY_FUNCTION__<<":"<<__LINE__<<" - "<<(#x)<<"="<<(x)<<endl
#else
    #define pprint(x)
#endif

// code starts here
vector<vector<int>> G;
vector<int> nb[2];
vector<bool> proc;
queue<int> Q;
signed main(){
    int n, m;
    cin >> n >> m;
    string s;
    cin >> s;
    G.resize(n); nb[0].resize(n); nb[1].resize(n); proc.resize(n);
    for(int i = 0; i < m; i++){
        int a, b;
        cin >> a >> b;a--;b--;
        G[a].pb(b);
        G[b].pb(a);
        nb[s[a]=='A'][b]++;
        nb[s[b]=='A'][a]++;
    }
    for(int i = 0; i < n; i++)
        if(!nb[0][i] || !nb[1][i])Q.push(i);
    while(!Q.empty()){
        int x = Q.front();
        Q.pop();
        if(proc[x])continue;
        proc[x] = true;
        for(auto i: G[x])
            if(!proc[i] && !(--nb[s[x]=='A'][i]))Q.push(i);
    }
    for(auto i: proc)if(!i)return cout << "Yes" << endl, 0;
    cout << "No" << endl;
}


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

#define ll long long
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;


int main() {
    int N;
    cin >> N;
    int A;
    A = N;
    
    int sum = 0;
    while(N>0){
        sum += N % 10;
        N /= 10;
    }
    
    if(A%sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    
}


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

int main(){
  int n,p,t1,t2,a=0,b=0;
  cin>>n;
  set<int> st;
  vector<int> v(n);
  
  rep(i,n) st.insert(i+1);
  rep(i,n){
    cin>>p;
    t1=1;
    for(int j=i;j<n-1;j++) t1*=(n-j-1);
    t2=distance(st.begin(),lower_bound(ALL(st),p));
    st.erase(p);
    a+=t1*t2;
  }
  rep(i,n) st.insert(i+1);
  rep(i,n){
    cin>>p;
    t1=1;
    for(int j=i;j<n-1;j++) t1*=(n-j-1);
    t2=distance(st.begin(),lower_bound(ALL(st),p));
    st.erase(p);
    b+=t1*t2;
  }
  int ans=abs(a-b);
  cout<<ans<<endl;
  return 0;
}

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

int main(){
    using namespace std;
    size_t V, E;
    cin >> V >> E;
    vector<size_t> low(V, V + 1), depth(V);
    vector<vector<pair<size_t, size_t>>> edge(V);
    for(size_t i = 0, s, t; i < E; ++i){
        cin >> s >> t;
        edge[s].emplace_back(t, s);
        edge[t].emplace_back(s, t);
    }
    for(auto& i : edge)sort(i.begin(), i.end());
    [rec = [&low, &depth, &edge](auto f, auto now, auto prev, auto& t) -> long{
        depth[now] = ++t;
        for(const auto i : edge[now])if(i.first != prev){
            if(depth[i.first] == 0)low[now] = min(low[now], low[f(f, i.first, now, t)]);
            low[now] = min(low[now], depth[i.first]);
        }
        return now;
    }](auto root){auto t = 0;rec(rec, root, root, t);}(0UL);
    vector<pair<size_t, size_t>> ans;
    for(const auto& i : edge)for(const auto& j : i)if(low[j.first] > depth[j.second])ans.emplace_back(min(j.first, j.second), max(j.first, j.second));
    sort(ans.begin(), ans.end());
    for(const auto& i : ans)cout << i.first << " " << i.second << endl;
}


Measured memory_bytes: 6336
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
int main(){
  int n;
  cin>>n;
  vector<tuple<string,int,int>> a;
  for(int i=1;i<=n;i++){
    string s;
    int p;
    cin>>s>>p;
    p=-p;
    a.emplace_back(s,p,i);
  }
  sort(a.begin(),a.end());
  for(int i=0;i<n;i++){
    cout<<get<2>(a[i])<<endl;
  }

}

Measured memory_bytes: 256
function HW(){
   var arr=[];
   for(var i=1;i<150;i++){
      for(var j=i+1;j<=150;j++){
         arr.push([i,j,i*i+j*j]);
      }
   }
   arr.sort(function(a,b){
      if(a[2]==b[2])return a[0]-b[0];
      else return a[2]-b[2];
   });
   return arr;
}
var Rectangles=HW();
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
while(true){
   var hw=Arr.shift().split(" ").map(Number);
   var h=hw[0];
   var w=hw[1];
   if(h==0 && w==0)break;
   var num=h*h+w*w;
   for(var i=0;i<Rectangles.length;i++){
      if(Rectangles[i][0]==h &&Rectangles[i][1]==w)break;
   }
   console.log(Rectangles[i+1][0]+" "+Rectangles[i+1][1]);
}

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

typedef long long ll;

string s1, s2, s3;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> s1 >> s2 >> s3;
    cout << 'A' << s2[0] << 'C' << endl;

    return 0;
}



Measured memory_bytes: 3648
n,m=map(int,input().split())
mod=10**9+7
def combination(n, r):
    a = 1
    b = 1
    for i in range(r):
        a *= (n - i)
        b *= (i + 1)
    return a // b
def get_prime_dic(n):
    dic = {}
 
    i = 2
    while i * i <= n:
        while n % i == 0:
            n //= i
            if i in dic:
                dic[i] += 1
            else:
                dic[i] = 1
        i += 1
 
    if n > 1:
        dic[n] = 1
    return dic
d=get_prime_dic(m)
ans=1
for i,j in d.items():
    ans*=combination(n-1+j, j)
    ans%=mod


print(ans)

Measured memory_bytes: 38512
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

//============================================================
var sc = bufio.NewScanner(os.Stdin)

func setScSplit() { sc.Split(bufio.ScanWords) }

func readStr() string {
	sc.Scan()

	return sc.Text()
}

func readInt() int {
	i, _ := strconv.Atoi(readStr())

	return i
}

func readFloat() float64 {
	f, _ := strconv.ParseFloat(readStr(), 64)

	return f
}

//=============================================================

func main() {
	setScSplit()

	N := readInt()
	Y := readInt()
	Z := Y / 1000
	x := -1
	y := -1
	z := -1

	for i := 0; i <= N; i++ {
		den := Z - 5*N + 4*i

		if a := den / 5; den%5 == 0 {
			if b := N - a - i; a >= 0 && b >= 0 {
				x, y, z = a, b, i
				break
			}
		}
	}

	fmt.Println(x, y, z)
}

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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> l(m), r(m), def(n);
  int left, right, count;

  for (int i=0; i<m; i++) {
    cin >> l.at(i) >> r.at(i);
  }
  
  left=l.at(0); right=r.at(0);
  if (m==1) {
    count=right-left+1;
  }
  else {
    for (int i=1; i<m; i++) {
      if (r.at(i)<=right) {
        right=r.at(i);
      }
      if (l.at(i)>=left) {
        left=l.at(i);
      }
    }
    if (left<=right) {
      count=right-left+1;
    }
    else {
      count=0;
    }
  }

  cout << count << endl;
}


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


int main (){
	std::ios::sync_with_stdio(false);
    std::cin.tie(0);std::cout.tie(0);
    string str;int k;cin>>str>>k;
    int len=str.length(),SZ,SZ1;
    set<string>s;
    for(int i=0;i<len;i++){
        string tmp;
        tmp+=str[i];
        s.insert(tmp);
        SZ=s.size();
        if(SZ>k) s.erase(--s.end());
        for(int j=i+1;j<i+k+1&&j<len;j++){
            tmp+=str[j];
            s.insert(tmp);
            SZ1=s.size();
            if(SZ1>k) s.erase(--s.end());
        }
    }
    set<string>::reverse_iterator it=s.rbegin();
    cout<<*it<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define int long
#define ll long long
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
int gcd(int a,int b){return b ? gcd(b,a%b) : a;}
int lcm(int a,int b){return a/gcd(a,b)*b;}

main() {
    int N; cin >> N; 
    int cnt=0; ll sum=0;
    int A[N];
    rep(i,N){
        int a; cin >> a;
        if(a<0) {a*=-1; cnt++;}
        A[i]=a;
        sum+=A[i];
    }
    sort(A,A+N);
    if(cnt%2!=0)cout << sum-A[0]*2 << endl;
    else cout << sum << endl;


    return 0;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
const int INF = 1001001001;

int c[10][1005];
int main() {
	int h, w, k; cin >> h >>w >> k;
	vector<string>s(h);
	REP(i, h)cin >> s[i];
	int ans = INF;
	REP(div, 1 << (h - 1)) {
		int g = 0;
		vector<int>id(h);
		REP(i, h) {
			id[i] = g;
			if (div >> i & 1)++g;
		}
		g++;
		REP(i, g)REP(j, w)c[i][j] = 0;
		REP(i, h)REP(j, w)c[id[i]][j] += (s[i][j] - '0');
		int num = g - 1;
		vector<int>now(g,0);
		bool ok = true;
		REP(j, w) {
			REP(i, g) {
				now[i] += c[i][j];
			}
			REP(i, g) {
				if (now[i] > k) {
					num++;
					now = vector<int>(g,0);
					REP(l, g) {
						now[l] += c[l][j];
					}
					REP(l, g) {
						if (now[l] > k) {
							ok = false;
						}
					}
				}
			}
		}
		if (ok) {
			ans = min(ans, num);
		}
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
#![allow(unused_imports)]

//input
use proconio::input;
use proconio::marker::{Bytes, Chars};
//use std::io::Read;

//collections
//use std::collections::BTreeMap;
//use std::collections::BTreeSet;
//use std::collections::HashMap;
//use std::collections::HashSet;
//use std::collections::VecDeque;
//use std::collections::BinaryHeap;

//use std::cmp::*;

fn main() {
    input! {
        mut a: i64,
        b: i64,
        mut c: i64,
        d: i64,
    }

    for i in 0.. {
        if i % 2 != 0 {
            a -= d;
        } else {
            c -= b;
        }
        if a <= 0 || c <= 0 {
            if a <= 0 {
                println!("No");
                return;
            }
            if c <= 0 {
                println!("Yes");
                return;
            }
        }
    }
}


Measured memory_bytes: 2160
n = int(input())
dat_d = list(map(int, input().split()))
dat_d.sort()
if n % 2 == 1:
    print(-1)
else:
    #print(n//2)
    #print(n//2-1)
    #print(dat_d)
    res = dat_d[n//2] - dat_d[n//2 - 1]
    print(res)

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

int main()
{
  ll n, k;cin>>n>>k;
  int l[n];
  rep(i, n){
    cin >> l[i];
  }
  sort(l, l+n, greater<int>());
  int ans=0;
  rep(i,k) {
    ans += l[i];
  }
  cout << ans << endl;
  return 0;
}

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

int main() {
    ll N, M;
    cin >> N >> M;
    ll res = 0;
    res = min(N, M/2);
    N -= res; M -= res * 2;
    res += M / 4;
    cout << res << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define ln(a) cout << (a) << endl
#define debug(a, n) rep(hoge, n) printf("%lld%c", a[hoge], hoge == (n) - 1? '\n' : ' ');
#define all(a) (a).begin(), (a).end()
#define pb push_back
#define INF 1e9
#define LINF 1e18
#define MOD 1000000007
#define EPS 0.00000001

using namespace std;
using ll = long long;
using P = pair<int, int>;
using LP = pair<ll, ll>;

signed main() {
    int n;
    cin >> n;
    int mn = INT_MAX;
    int ans = 0;
    rep(i, n) {
        int p;
        cin >> p;
        if(mn > p) {
            ans++;
            mn = p;
        }
    }
    ln(ans);
}


Measured memory_bytes: 256
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Program
{
    interface Output
    {
        void Write(object str);
        void WriteLine(object str);
    }

    interface Input
    {
        int NextInt();
        string NextString();
    }

    class Console_ : Input, Output
    {
        Queue<string> param = new Queue<string>();
        int Input.NextInt()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return int.Parse(param.Dequeue());
        }
        string Input.NextString()
        {
            if (param.Count == 0)
            {
                foreach (var item in Console.ReadLine().Split(' '))
                {
                    param.Enqueue(item);
                }
            }
            return param.Dequeue();
        }
        void Output.Write(object str)
        {
            System.Console.Write(str.ToString());
        }
        void Output.WriteLine(object str)
        {
            System.Console.WriteLine(str.ToString());
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            new Solver(new Console_(), new Console_()).Run();
        }
    }

    class Debug_ : Input
    {
        int i = 0;
        int Input.NextInt()
        {
            return (int)data[i++];
        }
        string Input.NextString()
        {
            return (string)data[i++];
        }
        object[] data =
        {
            "abcdefghijklmnopqrstuvwxyz",
            "abcdefghijklmnopqrstuavwxyz",
            "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"
        };
    }

    class Solver
    {
        Input input;
        Output output;
        public Solver(Input input, Output output)
        {
            this.input = input;
            this.output = output;
        }

        public void Run()
        {
            var A = input.NextInt();
            var B = input.NextInt();
            var C = input.NextInt();
            if (A > B)
            {
                var tmp = A;
                A = B;
                B = tmp;
            }
            output.WriteLine(A <= C && B >= C ? "Yes" : "No");
        }
    }
}


Measured memory_bytes: 13268
void main(){
	if( match(readln().chomp(), "7") ){
		writeln("Yes");
	}else{
		writeln("No");
	}
}

import std.stdio, std.conv, std.algorithm, std.numeric, std.string, std.math, std.regex;

// 1要素のみの入力
T _scan(T= int)(){
	return to!(T)( readln().chomp() );
}

// 1行に同一型の複数入力
T[] _scanln(T = int)(){
	T[] ln;
	foreach(string elm; readln().chomp().split()){
		ln ~= elm.to!T();
	}
	return ln;
}


Measured memory_bytes: 3676
#include <iostream>
using namespace std;
int main(){
    double w;
    while(cin>>w){
        if(w<=48)cout<<"light fly"<<endl;
        else if(w<=51)cout<<"fly"<<endl;
        else if(w<=54)cout<<"bantam"<<endl;
        else if(w<=57)cout<<"feather"<<endl;
        else if(w<=60)cout<<"light"<<endl;
        else if(w<=64)cout<<"light welter"<<endl;
        else if(w<=69)cout<<"welter"<<endl;
        else if(w<=75)cout<<"light middle"<<endl;
        else if(w<=81)cout<<"middle"<<endl;
        else if(w<=91)cout<<"light heavy"<<endl;
        else cout<<"heavy"<<endl;
    }
}

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

int main() {
	int n, k;
	cin >> n >> k;
	int p[n];
	for (int i = 0; i < n; i++) {
		cin >> p[i];
	}

	for (int i = n; i > 0; i--) {
		for (int j = 1; j < i; j ++) {
			if (p[j - 1] > p[j]) {
				int tmp = p[j];
				p[j] = p[j - 1];
				p[j - 1] = tmp;
			}
		}
	}

	int tal = 0;

	for (int i = 0; i < k; i++) {
		tal = tal + p[i];
	}

	cout << tal << endl;

	return 0;
}

Measured memory_bytes: 3620
import java.util.*;

import static java.lang.System.*;

class Main {
    public static Scanner sc = new Scanner(in);
    public static Random rand=new Random();

    public List<Integer> getPrimeList(int max){
		LinkedList<Integer> primes=new LinkedList<Integer>();
		PLoop:for(int i=2;i<max;i++){
			for(int prime:primes){
				if(i%prime==0){
					continue PLoop;
				}
				if( prime*prime>i){
					break;
				}
			}
			primes.add(i);
		}
		return primes;
	}

    public void run() {
    	Set<Integer> primes=new HashSet<Integer>(getPrimeList(1000000));

        Test:while(true){
            int a=sc.nextInt(),d=sc.nextInt(),n=sc.nextInt();
            if(a==0 && d==0)return;

            while(true){
	            if(primes.contains(a)){
	            	n--;
	            	if(n==0){
	            		ln(a);
	            		continue Test;
	            	}
	            }
	            a+=d;
            }
        }
    }
    public static void main(String[] args) {
        new Main().run();
    }

    public int[] nextIntArray(int n){
        int[] res=new int[n];
        for(int i=0;i<n;i++){
            res[i]=sc.nextInt();
        }
        return res;
    }
    public static void pr(Object o) {
        out.print(o);
    }
    public static void ln(Object o) {
        out.println(o);
    }
    public static void ln() {
        out.println();
    }
}

Measured memory_bytes: 58264
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n, m;
int main()
{
	scanf("%lld%lld", &n, &m);
	if (n > m) swap(n, m);
	if (n == 1)
	{
		if (m == 1) printf("1\n");
		else printf("%lld\n", m-2);
		return 0;
	}
	printf("%lld\n", n*m-2*(m+n)+4);

}

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

typedef long long ll;
#define all(x) (x).begin(), (x).end()  // sortなどの引数を省略
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define max3(x, y, z) max(x, max(y, z))
#define min3(x, y, z) min(x, min(y, z))

#ifdef _MSC_FULL_VER  //デバッグ出力
#define dout cout
#define debug() if (true)
#define check(x) std::cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) std::cout << "☆" << x << endl
#else
#define dout \
  if (false) cout
#define debug() if (false)
#define check(x) \
  if (false) cout << "★" << #x << "の値:" << (x) << endl
#define pass(x) \
  if (false) cout << "☆" << x << endl
#endif

using namespace std;
int main() {
  int a,b,c,d;
  cin >> a >> b >> c;
  int mae = 0;int ato = 0;
  rep(i, b) {
    cin >> d;
    if (d < c) {
      mae++;
    } else {
      ato++;
    }
  }
  cout << min(mae,ato);
}
/*
//よく使うやつ
int N;
cin >> N;
vector<int> list(N);
rep(i,N) {
  cin >> list[i];
}
//配列(スタックとしても使える)
vector<int> list;
list.at(i)
vector<vector<int>> list(10, vector<int>(10));
//ソート クイックだからO(NlogN)
sort(all(list));
sort(all(list), greater<int>());

//配列の内容表示
dout << "====listの内容====\n";
for (int edp = 0; edp < N; edp++) dout << list[edp] << endl;
dout << "====ここまで====\n";


//配列の最小最大(Nは要素数)
*min_element(all(c))
*max_element(all(c))

//a[0]からa[N]を逆順にする(計算量はO(N))
reverse(all(a));
//listの末尾に要素を追加
list.push_back(10);
//listの末尾から要素を削除
list.pop_back();
//空ですか？
list.empty()



//キュー(待ち行列)
//定義
queue<int> a;
//追加
a.push(x);
//取る
a.pop();
//チェック
a.front()
//サイズ
a.size()
//空ですか
a.empty()



//優先度付きキュー※全部計算量がO(NlogN)あるので注意
// int 型の要素を持ち、最も小さい値を取り出す形の priority_queue を定義
priority_queue<int, vector<int>, greater<int>> Q1;
// double 型の要素を持ち、最も大きい値を取り出す形の priority_queueを定義
priority_queue<double, vector<double>, less<double>> Q2;
//追加
a.push(x);
//取る
a.pop();
//一番小さいの教えて下さい
a.top()
//サイズ
a.size()
//空ですか
a.empty()



//部分文字列
//添字3から5文字
s.substr(3,5)
//添字3から全部
s.substr(3)

//入れ替え
swap(a,b);



// int 型の番地に string 型の変数を記録する場合（2^31 要素の string型配列と同じような感じ）
map<int, string> mp;
for (auto itr =mp.begin(); itr != mp.end(); itr++) {
    //順番にマップを眺める。itr->firstでキー、itr->secondがバリュー
}

//ソート済みのaの中で初めてx以上になるインデックスを返す
lower_bound(all(a), x) - a

//next_permutation
do {
    //ここにパーテーションがくる
  } while (next_permutation(s.begin(), s.end()));

*/


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

int main() {
  int X, N;
  cin >> X >> N;
  if(N == 0)
  {
    cout << X << endl;
    return 0;
  }

  vector<int> p(N);
  rep(i, N) cin >> p.at(i);

  vector<int> tmp(102);
  rep(i, 102)
  {
    tmp.at(i) = abs(X - i); 
  }
  rep(i, N)
  {
    tmp.at(p.at(i)) = 99999;
  }
  sort(tmp.begin(), tmp.end());
  
  bool flag = false;
  int num = X - tmp.at(0);
  rep(i, N)
  {
    if(p.at(i) == num)
    {
      flag = true;
      break;
    }
  }
  if (flag == false)
  {
    cout << num << endl;
    return 0;
  }

  num = X + tmp.at(0);
  cout << num << endl;  
    
  return 0;
}

Measured memory_bytes: 3636
#include <stdio.h>

int main(){

  int n,m,t,g,i;
  g=0;
  while(1){
  scanf("%d",&n);
  if(n==0)break;
  m=n/4;
  for(i=0;i<m;i++){
    scanf("%d",&t);
    g += t;
  }
  printf("%d\n",g);
  g=0;
  }
  return 0;
}

Measured memory_bytes: 596
n = int(input())
la = list(map(int, input().split()))
sa = sum(la)
l_cnt = [0]*100001
for i in la:
  l_cnt[i] += 1
q = int(input())
for i in range(q):
  b, c = map(int, input().split())
  sa += (c-b)*l_cnt[b]
  print(sa)  
  l_cnt[c] += l_cnt[b]
  l_cnt[b] = 0

Measured memory_bytes: 20884
#include <iostream>
using namespace std;
int prize(int n) {
  if (n == 1)
    return 300000;
  else if (n == 2)
    return 200000;
  else if (n == 3)
    return 100000;
  else
    return 0;
}

int main(void) {
  int x, y;
  cin >> x >> y;
  int ans = 0;
  if (x == y && x == 1) {
    ans = 400000;
  }
  ans += prize(x);
  ans += prize(y);
  cout << ans << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<algorithm>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout<<fixed;
    cout<<setprecision(9);
    long long int n,i,j,k,r=0,g=0,b=0,ans=0;
    string s;
    cin>>n>>s;
    for(i=0; i<n; i++)
    {
       if(s[i]=='R')
       {
           r++;
       }
       else if(s[i]=='G')
       {
           g++;
       }
       else
       {
           b++;
           
       }
   } 
   k=r*g*b;
   for(i=0; i<n; i++)
   {
       for(j=1; i+2*j<n; j++)
       {
           if(s[i]!=s[i+j] && s[i+2*j]!=s[i] && s[i+2*j]!=s[i+j])
           {
               k = k-1;
           }
       }
   }
    cout<<k;

}

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

using namespace std;
long long x[110],v[110],dp[100010][110];
int main(){

  int n,w;
  cin>>n>>w;

  memset(dp,1000000,sizeof(dp));

  for(int i=1;i<=n;i++){
    cin>>x[i]>>v[i];
  }

  for(int j=0;j<=n;j++){
    dp[0][j]=0;
  }
  //get value true with the given sum

  for(int i=1;i<100010;i++){
    for(int j=1;j<=n;j++){
      dp[i][j]=dp[i][j-1];
      if(i>=v[j] && (dp[i-v[j]][j-1] + x[j])<= w){
        dp[i][j]=min(dp[i][j],dp[i-v[j]][j-1] + x[j]);
      }
    }
  }

  for(int i=100000;i>=0;i--){
    for(int j=1;j<=n;j++){
      if(dp[i][j]<=w)
        {cout<<i;
          return 0;
        }
    }
  }


   return 0;
}

Measured memory_bytes: 86144
import java.io.*;
import java.util.StringTokenizer;

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

    static class T {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n  = in.nextInt(), k = in.nextInt();
            final int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();
            }
            final long[] prefSum = new long[n];
            final long[] posSum = new long[n];
            for (int i = 0; i < n; i++) {
                if (i == 0) {
                    prefSum[i] = arr[i];
                    if (arr[i] > 0)
                        posSum[i] = arr[i];
                } else {
                    prefSum[i] = prefSum[i - 1] + arr[i];
                    posSum[i] = posSum[i - 1] + (arr[i] > 0 ? arr[i] : 0);
                }
            }

            long ans = 0;
            for (int i = 0; i < n; i++) {
                int j = i + k - 1;
                if (j >= n) break;
                long as = rangeSum(0, i - 1, posSum) + rangeSum(j + 1, n - 1, posSum);
                as = Math.max(as, as + rangeSum(i, j, prefSum));
                ans = Math.max(ans, as);
            }
            out.println(ans);

        }

        private long rangeSum(int i, int j, long[] posSum) {
            if (j < i) return 0;
            if (i == 0) return posSum[j];
            return posSum[j] - posSum[i - 1];
        }
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

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

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

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

    }
}



Measured memory_bytes: 30664
#include <cstdio>
#include <algorithm>
using namespace std;
int a[51],n,k,i,sum=0;
int main()
{
	scanf("%d%d",&n,&k);
	for(i=1;i<=n;i++)
		scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	for(i=0;i<k;i++)
		sum+=a[n-i];
	printf("%d",sum);
	return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;

public class Main {
	static String ban[];
	static int ban2[];
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		ban = sc.next().split("");
		ban2= new int[ban.length];

		int sum = 0;
		boolean flag = true;
		int left = 1;
		int right = ban.length-2;
		while(flag){
			String colorL = handan(0);
			String colorR = handan(ban.length-1);
			//System.out.println("left;"+left);
			//System.out.println("right;"+right);
			for(int i = left;left < ban.length;left++){
				/*if(!colorL.equals(handan(left))){
					sum++;
					for(int j = 0;j < left;j++){
						ban2[j]++;
					}
					break;
				}
				if(left == ban.length-1){
					flag = false;
					System.out.println(sum);
					return;
				}*/
				if(!colorL.equals(handan(left))){
					break;
				}
			}

			for(int i = right;right >= 0;right--){
				if(!colorR.equals(handan(right))){
					break;
				}
			}

			int R = ban.length-1-right;
			int L = left;
			if(L >ban.length-1){
				flag = false;
				break;
			}else if(L < R){
				sum++;
				for(int j = 0;j < left;j++){
					ban2[j]++;
				}
			}else{
				sum++;
				for(int j = right;j >=0;j--){
					ban2[j]++;
				}
			}
		}

		System.out.println(sum);
	}

	static String handan(int a){
		if(ban2[a]%2 == 0){
			return ban[a];
		}else{
			if(ban[a].equals("B")){
				return "W";
			}else{
				return "B";
			}
		}
	}
}

Measured memory_bytes: 20788
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define ALL(v) v.begin(),v.end()
#define INF 1e9
typedef long long ll;
using namespace std;


int reverse(int a){
    int rev=0,num;
    while(a!=0){
        num = a % 10;
        rev = rev * 10 + num;
        a /= 10;
    }
    return rev;
}

int main() {
    int a,b,count=0; cin >> a >> b;
    for(int i = a; i <= b; i++){
        if(i==reverse(i)){
            count += 1;
        }
    }
    cout << count << endl;
    return 0;
}

Measured memory_bytes: 256
N,M = map(int,input().split())
counter = 0
inpu_ = list(map(int,input().split()))
sum_p = sum(inpu_)
for i in inpu_:
    if i >= sum_p/(4*M): 
        counter += 1

if counter >= M:
    print("Yes")
else:
    print("No")

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

#define TYPE(c)   remove_reference_t<decltype(c)>
#define REP(i, n) for(TYPE(n) i = 0; i < n; i++)
#define FOR(v, c) for(TYPE(c.begin()) v = c.begin(); v != c.end(); v++)
#define ALL(c)    c.begin(), c.end()
#define SORT(c)   sort(ALL(c))
#define RSORT(c)  sort(ALL(c), greater<TYPE(c)::value_type>())
#define UNIQUE(c) c.erase(unique(ALL(c)), c.end())

using namespace std;
using ll = long long;

constexpr int MOD  = (int)1e9 + 7;
constexpr int INF  = (int)1e9 + 1;
constexpr ll  LINF = (ll)1e18 + 1;
template<typename T> constexpr bool chmax(T& a, const T& b)
{ if(a < b) { a = b; return true; } else { return false; } }
template<typename T> constexpr bool chmin(T& a, const T& b)
{ if(b < a) { a = b; return true; } else { return false; } }
template<typename S, typename T> ostream& operator<<(ostream &os, const pair<S, T>& p)
{ return os << "(" << p.first << "," << p.second << ")"; }
ostream& operator<<(ostream &os, const string& s)
{ FOR(v, s) os << *v; return os; }
template<typename T> auto operator<<(ostream& os, const T& t)
    -> typename conditional<true, ostream&, decltype(*t.begin())>::type
{ os << "["; FOR(v, t) { if(v != t.begin()) os << ","; os << *v; } os << "]"; return os; }

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

    string S;
    std::cin >> S;
    auto sub = S.substr(2, S.size() - 3);
    int upcnt = 0;
    REP(i, S.size()) {
        if(S[i] < 'a') {
            upcnt++;
        }
    }

    map<char, int> map;
    REP(i, sub.size()) {
        map[sub[i]]++;
    }

    if(S[0] == 'A' && map['C'] == 1 && upcnt == 2) {
        std::cout << "AC" << std::endl;
    }
    else {
        std::cout << "WA" << std::endl;
    }

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (n); i++)
#define prtd(var, i) cout << fixed << setprecision(i) << var << endl;
#define ll long long
using namespace std;
#define INF 100000

int main(){
    string s;
    cin >> s;
    int n = s.length();
    int ans = INF;
    for(int i = 0; i < n-2; i++){
        stringstream ss;
        ss << s[i] << s[i+1] << s[i+2];
        int tmp;
        ss >> tmp;
        ans = min(ans, abs(tmp - 753));
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
N = int(input())
a = list(map(int, input().split()))
dic = {}
for elem in a:
    if elem not in dic:
        dic[elem] = 1
    else:
        dic[elem] += 1

ans = 0
for k in dic.keys():
    if dic[k] > k:
        ans += dic[k] - k
    elif dic[k] < k:
        ans += dic[k]

print(ans)


Measured memory_bytes: 17780
#include <iostream>
using namespace std;
int main() {
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    if(a + b > c + d) {
        cout << "Left" << endl;
    } 
    else if(a + b == c + d) {
        cout << "Balanced" << endl;
    } else {
        cout << "Right" << endl;
    }
}

Measured memory_bytes: 256
import java.util.Scanner;

/**
 * Main
 */
public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int X = sc.nextInt();
        int Y = sc.nextInt();
        int flag = 0; // 0なら組み合わせ存在せず

        for(int i=0; i <= X; i++){
            if(Y == 2*(X-i)+4*i){
                flag = 1;
                break;
            }
        }
        if(flag == 1){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}

Measured memory_bytes: 27084
#include <bits/stdc++.h>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/range/algorithm/sort.hpp>

using namespace std;
using boost::sort;
using boost::adaptors::reversed;

int main() {
    long x, k, d;
    cin >> x >> k >> d;
    long ans;
    if (x < 0) {
        long n = - x / d;
        if (n > k) {
            ans = x + k * d;
        } else if ((k - n) % 2 == 0) {
            ans = x + n * d;
        } else {
            ans = x + (n + 1) * d;
        }
    } else {
        long n = x / d;
        if (n > k) {
            ans = x - k * d;
        } else if ((k - n) % 2 == 0) {
            ans = x - n * d;
        } else {
            ans = x - (n + 1) * d;
        }
    }
    cout << abs(ans) << endl;
}


Measured memory_bytes: 3668
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
const ld EPS = 1e-10;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

template<typename T>
struct Max_Flow{
    struct edge{
        int to; T cap; int rev;
        edge(int to, T cap, int rev) : to(to), cap(cap), rev(rev) {}
    };

    vector<vector<edge>> es;
    vector<bool> used;
    const T INF_T;

    Max_Flow(int n) : INF_T(numeric_limits<T>::max()){
        es.resize(n), used.resize(n);
    }

    void add_edge(int from, int to, T cap, bool directed = true){
        es[from].eb(to, cap, sz(es[to]));
        es[to].eb(from, directed? 0 : cap, sz(es[from])-1);
    }

    T dfs(int now, int t, T flow){
        if(now == t) return flow;
        used[now] = true;
        for(auto &e: es[now]){
            if(!used[e.to] && e.cap > 0){
                T f = dfs(e.to, t, min(flow, e.cap));
                if(f > 0){
                    e.cap -= f;
                    es[e.to][e.rev].cap += f;
                    return f;
                }
            }
        }
        return 0;
    }

    T max_flow(int s, int t){
        T flow = 0;
        for(;;){
            fill(all(used), false);
            T f = dfs(s, t, INF_T);
            if(f == 0) return flow;
            flow += f;
        }
    }
};

int main(){
    int X, Y, E;
    cin >> X >> Y >> E;
    Max_Flow<int> G(X+Y+2);
    int s = X+Y, t = X+Y+1;
    rep(i, X) G.add_edge(s, i, 1);
    rep(i, Y) G.add_edge(X+i, t, 1);
    rep(i, E){
        int u, v; cin >> u >> v;
        G.add_edge(u, X+v, 1);
    }
    cout << G.max_flow(s, t) << endl;
}


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

#define ll long long
#define limit 100002
struct edge{
	int to;
  	int cost;
};

vector<edge> arr[limit];
ll depth[limit];
void dfs(int v,int p,ll dist)
{
  depth[v]=dist;
  
  for(auto x:arr[v])
  {
    	if(x.to==p)
        {
         	continue; 
        }
    	else
        {
         	dfs(x.to,v,dist+x.cost); 
        }
  }
  
}
int main()
{
 	 
  
  int n;
  cin>>n;
  
  for(int i=0;i<n-1;i++)
  {
    
    int a,b,c;
    cin>>a>>b>>c;
    a--;b--;
    
    arr[a].push_back({b,c});
    arr[b].push_back({a,c});
    
  }
  int q,k;
  cin>>q>>k;
  k--;
  dfs(k,-1,0);
  for(int i=0;i<q;i++)
  {
    
    int x,y;
    cin>>x>>y;
    x--,y--;
    
    cout<<depth[x]+depth[y]<<endl;
    
  }
  
}


Measured memory_bytes: 12800
#include <iostream>
#include <cmath>
#include <cstring>
#include <string>

using namespace std;

#define MAXN 100005

int h[MAXN], dp[MAXN];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	int n;
	cin >> n;
	for(int i = 1; i <= n; i++) {
		cin >> h[i];
	}
	dp[2] = abs(h[2] - h[1]);
	for(int i = 3; i <= n; i++) {
		dp[i] = min(dp[i - 1] + abs(h[i] - h[i - 1]), dp[i - 2] + abs(h[i] - h[i - 2]));
	}
	cout << dp[n] << '\n';
	
	return 0;
}

Measured memory_bytes: 4436
def f(x):
    if x % 4 == 0:
        return x
    elif x % 4 == 1:
        return x ^ (x-1)
    elif x % 4 == 2:
        return x ^ (x-1) ^ (x-2)
    else:
        return 0
A, B = map(int, input().split(" "))
string = ""
i = 0
a = f(A-1)
b = f(B)
print(a^b)

Measured memory_bytes: 3064
#include <stdio.h>

int main(int argc, const char * argv[])
{
    int i, n, money = 100000;
    
    scanf("%d", &n);
    for (i = 0; i < n; i++) {
        money *= 1.05;
        if (money % 1000)
            money = money + (1000 - (money % 1000));
    }
    
    printf("%d\n", money);
    
    return 0;
}

Measured memory_bytes: 592
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 2e5 + 10;
const int INF = 1e9 + 7;
ll dp[maxn];
int c[maxn];
int w[maxn];
int main() {
	int n, m;
	while (cin >> n >> m) {
		memset(dp, 0, sizeof(dp));
		for (int i = 1; i <= n; i++)
			scanf("%d%d", &w[i], &c[i]);
		for (int i = 1; i <= n; i++) {
			for (int j = m; j >= w[i]; j--) {
				dp[j] = max(dp[j], dp[j - w[i]] + c[i]);
			}
		}
		printf("%lld\n", dp[m]);
	}
}

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

int main() {
    int n;
    cin >> n;
    const ll mod = 1e9+7;
    vector<int> count(n+1, 0);
    
    for(int i = 2; i < n+1; i++) {
        int tmp = i;
        for(int j = 2; j < i+1; j++) {
            while(tmp%j == 0) {
                count[j]++;
                tmp/=j;
            }
        }
    }
    
    ll ans = 1;
    rep(i, 2, n+1) {
        ans *= (count[i]+1);
        ans %= mod;
    }
    cout << ans%mod << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long 
#define pb push_back
#define fi first
#define se second
using namespace std;

ll dp[1000005]={0};


int main(){
    ll n;
    cin>>n;
    ll a[n];
    for(int i=0;i<=n;i++)dp[i]=-1;
    for(int i=0;i<n;i++)cin>>a[i];
    dp[0]=0;
    dp[1]=abs(a[0]-a[1]);
    for(int i=2;i<n;i++){
        dp[i]=min(abs(a[i]-a[i-1])+dp[i-1],abs(a[i]-a[i-2])+dp[i-2]);
    }
    cout<<dp[n-1];
}

Measured memory_bytes: 5088
#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <vector>
#include <set>

using namespace std;
using ll = long long ;

int main() {
  string s;
  int ans =0 ;
  cin >> s;
  if(s[0]=='1') ans++;
  if(s[1]=='1') ans++;
  if(s[2]=='1') ans++;
  cout << ans << endl;
return 0 ;
}


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

using namespace std;

int main(){
	string s;
	cin >> s;

	bool a = false, b = false;

	for(int i=0;i<3;++i){
		if(s[i] == 'A'){
			a = true;
		}
		else{
			b = true;
		}
	}

	cout << (a and b ? "Yes" : "No" ) << '\n';

	return 0;
}

Measured memory_bytes: 256
import java.util.*; 

class Main{
public static void main(String[] args){
	Scanner sc=new Scanner(System.in);
        int k=sc.nextInt();
       
		String s="1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51";
		String[] a=s.split(",");
    

    	System.out.println(a[k-1]);
    }
}

Measured memory_bytes: 21844
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rrep(i, n) for(ll i = n-1; i > 0; i--)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize("Ofast")
using namespace std;
typedef int64_t ll;
typedef long double ld;
const ll INF=(1LL<<60);
const ld pi=acosl((ld)1);
const ll mod = 1000000007;
const int dx[4]={0,1,0,-1};
const int dy[4]={1,0,-1,0};
const int ddx[8]={1,0,-1,-1,-1,0,1,1};
const int ddy[8]={1,1,1,0,-1,-1,-1,0};


template<class T>
T gcd(T a,T b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(a%b,b);
}

bool solve(){
  string s,t;cin>>s>>t;
  
  vector<char>mp(26,'.');
  rep(i,s.size()){
    if(mp[s[i]-'a']=='.')mp[s[i]-'a']=t[i];
    if(mp[s[i]-'a']!=t[i]){
      cout<<"No"<<endl;
      return false;
    }
  }
  vector<char>mp2(26,'.');
  rep(i,t.size()){
    if(mp2[t[i]-'a']=='.')mp2[t[i]-'a']=s[i];
    if(mp2[t[i]-'a']!=s[i]){
      cout<<"No"<<endl;
      return false;
    }
  }

  
  cout<<"Yes"<<endl;
  return false;
}


signed main(){
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout<<fixed;
	cout<<setprecision(30);
	return solve();
}


Measured memory_bytes: 916
#include <bits/stdc++.h>
#define REP(i,s,e) for(int i=(s); i<(e);i++)
#define rep(i,n) REP(i,0,n)
#define rep1(i,n) REP(i,1,n)
#define repe(i,n) for(auto &&i:n)
#define all(v) (v).begin(),(v).end()
#define decimal fixed<<setprecision(20)
#define fastcin() cin.tie(0);ios::sync_with_stdio(false)
using namespace std;
using LL = long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = 1e9;
const LL LLINF = 1e16;

template<int mod>
struct ModInt {
    int x;

    ModInt() : x(0) {}
    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}

    ModInt &operator+=(const ModInt &p) {
        if((x += p.x) >= mod) x -= mod;
        return *this;
    }
    ModInt &operator-=(const ModInt &p) {
        if((x += mod - p.x) >= mod) x -= mod;
        return *this;
    }
    ModInt &operator*=(const ModInt &p) {
        x = (int)(1LL * x * p.x % mod);
        return *this;
    }
    ModInt &operator/=(const ModInt &p) {
        *this *= p.inverse();
        return *this;
    }

    ModInt operator-() const { return ModInt(-x); }
    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }
    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }
    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }
    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }

    bool operator==(const ModInt &p) const { return x == p.x; }
    bool operator!=(const ModInt &p) const { return x != p.x; }

    ModInt inverse() const{
        int a = x, b = mod, u = 1, v = 0, t;
        while(b > 0) {
            t = a / b;
            a -= t * b;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        return ModInt(u);
    }

    ModInt pow(int e){
        long long a = 1, p = x;
        while(e > 0) {
            if(e%2 == 0) {p = (p*p) % mod; e /= 2;}
            else {a = (a*p) % mod; e--;}
        }
        return ModInt(a);
    }

    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {
        return os << p.x;
    }
    friend istream &operator>>(istream &is, ModInt<mod> &a) {
        long long x;
        is >> x;
        a = ModInt<mod>(x);
        return (is);
    }
};

const int mod = 1e9 + 7;
using modint = ModInt<mod>;


int main(){
    int n, m;
    cin >> n >> m;
    set<int> a;
    rep(i, m){
        int x;
        cin >> x;
        a.insert(x);
    }
    vector<modint> dp(n+2, 0);
    dp[0] = 1;
    rep(i, n){
        if(a.find(i+1) == a.end()) dp[i+1] += dp[i];
        if(a.find(i+2) == a.end()) dp[i+2] += dp[i];
    }
    cout << dp[n] << endl;

}

Measured memory_bytes: 5376
// 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
// ぜったいあきらめない
#if defined(DAIJOBU)
#include "/home/ichigo/includes.hpp"
#include "/home/ichigo/debug.hpp"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long lint;
typedef vector<lint> vlint;
typedef vector<vlint> vvlint;
typedef pair<lint, lint> plint;
typedef double ld;

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



int main() {
    ios::sync_with_stdio(false);
	cin.tie(0);
	
	int n;
	cin >> n;
	if(n % 2)cout << 2 * n;
	else cout << n;
	return 0;
}



Measured memory_bytes: 256