akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;

int main() {
	int n;
	cin >> n;
	vector<P> odd, even;
	rep(i, 100005) {
		odd.push_back(make_pair(0, i));
		even.push_back(make_pair(0, i));
	}
	rep(i, n) {
		if (i % 2 == 0) {
			int v;
			cin >> v;
			odd[v].first++;
		}
		else {
			int v;
			cin >> v;
			even[v].first++;
		}
	}
	sort(odd.begin(), odd.end(), greater<P>());
	sort(even.begin(), even.end(), greater<P>());

	if (odd[0].second != even[0].second) {
		cout << n - odd[0].first - even[0].first << endl;
	}
	else {
		if (odd[0].first + even[1].first > odd[1].first + even[0].first) {
			cout << n - odd[0].first - even[1].first << endl;
		}
		else {
			cout << n - odd[1].first - even[0].first << endl;
		}
	}

}

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

int main( void ) {
    
    char ch;
    cin >> ch;
    
    if( ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' )
        cout << "vowel" << endl;
    else
        cout << "consonant" << endl;
    
    return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>
#define MAXN 200005
#define P 16777216
#define INF 0x3f3f3f3f
#define rint register int
#define LL long long
#define LD long double
using namespace std;

LL k, a, b;

int main()
{
    scanf("%lld%lld%lld", &k, &a, &b);
    LL temp=(k-a+1)/2*(b-a)+a+(k-a+1)%2;
    printf("%lld\n", max(k+1, temp));
    return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#define mod (1e9 + 7)
#define pb push_back
using namespace std;
typedef pair<int,int> pii;

int hako[111111];
int main(){
  int n,q;
  string s;

  cin>>n>>q;
  cin>>s;

  char c=s[0];
  hako[0]=0;
  for(int i=1;i<s.size();i++){
    if(c=='A' && s[i]=='C') hako[i]=hako[i-1]+1;
    else hako[i]=hako[i-1];
    c=s[i];
  }

  int l,r;
  for(int i=0;i<q;i++){
    cin>>l>>r;
    cout<<hako[r-1]-hako[l-1]<<endl;
  }
  
  return 0;
}



Measured memory_bytes: 1408
#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() {
    ll n, a, b;
    cin >> n >> a >> b;
    ll c   = a + b;
    ll ans = a * (n / c);
    ans += min(n % c, a);
    cout << ans << endl;
    return 0;
}

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

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

lint lcm(lint x, lint y) { return x/gcd(x,y)*y; }

lint C(lint n, lint k) {
  if(n == k) { return 1; }
  else if(n < k) { return 0; }
  else if(k == 0) { return 1; }
  else if(k == 1) { return n; }
  else return C(n-1,k-1) + C(n-1,k);
}

lint P(lint n, lint k) {
  if(k == 1) { return n; }
  return (n*(P(n-1,k-1)%1000000007)%1000000007);
}


int main() {
  lint q,h,s,d,n; cin >> q >> h >> s >> d >> n;
  
  lint num, ans=0;
  num = n/2; // number of 2L
  ans += min(num*d,min(num*(2*s),min(num*(4*h),num*(8*q))));
  n -= num*2;

  num = n;
  ans += min(num*s,min(num*(2*h),num*(num*(4*q))));

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


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

template<typename T1,typename T2> void chmin(T1 &a,T2 b){if(a>b)a=b;};
template<typename T1,typename T2> void chmax(T1 &a,T2 b){if(a<b)a=b;};

struct Dice{
  Int s[6];
  void roll(char c){
    Int b;
    if(c == 'E'){
      b = s[0];
      s[0] = s[3];
      s[3] = s[5];
      s[5] = s[2];
      s[2] = b;
    }

    if(c == 'W'){
      b = s[0];
      s[0] = s[2];
      s[2] = s[5];
      s[5] = s[3];
      s[3] = b;
    }

    if(c == 'N'){
      b = s[0];
      s[0] = s[1];
      s[1] = s[5];
      s[5] = s[4];
      s[4] = b;
    }

    if(c == 'S'){
      b = s[0];
      s[0] = s[4];
      s[4] = s[5];
      s[5] = s[1];
      s[1] = b;
    }

    if(c == 'R'){
      b= s[1];
      s[1] = s[2];
      s[2] = s[4];
      s[4] = s[3];
      s[3] = b;
    }
    
    if(c == 'L'){
      b = s[1];
      s[1] = s[3];
      s[3] = s[4];
      s[4] = s[2];
      s[2] = b;
    }
  }
};


vector<Dice> makeDices(Dice d){
  vector<Dice> res;
  for(Int i=0;i<6;i++){
    Dice t(d);
    if(i == 1) t.roll('N');
    if(i == 2) t.roll('S');
    if(i == 3) t.roll('S'), t.roll('S');
    if(i == 4) t.roll('L');
    if(i == 5) t.roll('R');
    for(Int k=0;k<4;k++){
      res.push_back(t);
      t.roll('E');
    }
  }
  return res;
}

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);
  Int n;
  while(cin>>n,n){
    vector<Dice> vs;
    Int sz=0;
    map<string, Int> cm;
    for(Int i=0;i<n;i++){
      vs.emplace_back();
      for(Int j=0;j<6;j++){
	string s;
	cin>>s;
	if(!cm.count(s)) cm[s]=sz++;
	vs[i].s[j]=cm[s];
      }     
    }
    
    if(n==1){
      cout<<0<<endl;
    }else if(n==2){
      auto A = makeDices(vs[0]);
      auto B = makeDices(vs[1]);
      Int ans=1e9;      
      for(auto &a:A){
	for(auto &b:B){
	  Int res=0;
	  for(Int j=0;j<6;j++){
	    map<Int, Int> x;
	    x[a.s[j]]++;
	    x[b.s[j]]++;
	    Int y=0;
	    for(auto p:x) chmax(y,p.second);
	    res+=2-y;
	  }	  
	  chmin(ans,res);
	}
      }      
      cout<<ans<<endl;
    }else if(n==3){
      auto A = makeDices(vs[0]);
      auto B = makeDices(vs[1]);
      auto C = makeDices(vs[2]);
      Int ans=1e9;
      
      for(auto &a:A){
	for(auto &b:B){
	  for(auto &c:C){
	    Int res=0;
	    for(Int j=0;j<6;j++){
	      map<Int, Int> x;
	      x[a.s[j]]++;
	      x[b.s[j]]++;
	      x[c.s[j]]++;
	      Int y=0;
	      for(auto p:x) chmax(y,p.second);
	      res+=3-y;
	    }	  
	    chmin(ans,res);
	  }
	}
      }
      cout<<ans<<endl;
    }else{
      auto A = makeDices(vs[0]);
      auto B = makeDices(vs[1]);
      auto C = makeDices(vs[2]);
      auto D = makeDices(vs[3]);
      Int ans=1e9;      
      for(auto &a:A){
	for(auto &b:B){
	  for(auto &c:C){
	    for(auto &d:D){
	      Int res=0;
	      for(Int j=0;j<6;j++){
		map<Int, Int> x;
		x[a.s[j]]++;
		x[b.s[j]]++;
		x[c.s[j]]++;
		x[d.s[j]]++;
		Int y=0;
		for(auto p:x) chmax(y,p.second);
		res+=4-y;
	      }	  
	      chmin(ans,res);
	    }
	  }
	}
      }
      cout<<ans<<endl;
    }    
  }
}




Measured memory_bytes: 3096
//ABC176_B
#include <stdio.h>
#include <string.h>

int main(){
	char n[200005];
	int len=0;
	int tmp=0;
	
	scanf("%s",n);
//	printf("%s",n);

	//文字列の長さ取得
	len = strlen(n);
//	printf("%d ",len);
	
	//一文字ずつ
	for(int i=0;i<len;i++){
//		printf("%c ",n[i]);
	//文字を整数に
		if(n[i] == '1'){
//		printf("1 ga nyuuryoku \n");
			tmp = tmp + 1;
		}
		if(n[i] == '2'){
			tmp = tmp + 2;
		}
		if(n[i] == '3'){
			tmp = tmp + 3;
		}
		if(n[i] == '4'){
			tmp = tmp + 4;
		}
		if(n[i] == '5'){
			tmp = tmp + 5;
		}
		if(n[i] == '6'){
			tmp = tmp + 6;
		}
		if(n[i] == '7'){
			tmp = tmp + 7;
		}
		if(n[i] == '8'){
			tmp = tmp + 8;
		}
		if(n[i] == '9'){
			tmp = tmp + 9;
		}
	}
	
//	printf("%d",tmp);

	//9の倍数か判断する。9で割って余りが0ならば
	if(tmp % 9 == 0){
		printf("Yes");
	}
	else printf("No");

	return 0;
}


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

using namespace std;

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second

const int maxn = 150;

const int inf = 3 * maxn;

char s[maxn][maxn];
int d[maxn][maxn];
deque<pair2<int>> q;
int n, m;

int main()
{
	scanf("%d%d", &n, &m);
	for (int i = 0; i < n; i++) scanf("%s", s[i]);
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++) d[i][j] = inf;
	}
	d[0][0] = (s[0][0] == '#' ? 1 : 0);
	q.push_back({0, 0});
	while (!q.empty())
	{
		int x, y;
		tie(x, y) = q.front();
		q.pop_front();
		
		if (x + 1 < n && d[x + 1][y] > d[x][y] + (s[x + 1][y] != s[x][y]))
		{
			d[x + 1][y] = d[x][y] + (s[x + 1][y] != s[x][y]);
			if (s[x + 1][y] != s[x][y]) q.push_back({x + 1, y});
			else q.push_front({x + 1, y});
		}
		if (y + 1 < m && d[x][y + 1] > d[x][y] + (s[x][y + 1] != s[x][y]))
		{
			d[x][y + 1] = d[x][y] + (s[x][y + 1] != s[x][y]);
			if (s[x][y + 1] != s[x][y]) q.push_back({x, y + 1});
			else q.push_front({x, y + 1});
		}
	}
	cout << (d[n - 1][m - 1] + 1) / 2 << endl;
    return 0;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
 
int main() {
	char a, b;

	cin >> a >> b;

	string a_str = string(b - '0', a);
	string b_str = string(a - '0', b);

	if ( a_str.compare(b_str) < 0) {
		cout << a_str << endl;
	}	else if ( a_str.compare(b_str) > 0) {
		cout << b_str << endl;
	} else {
		cout << a_str << endl;
	}
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define IFOR(i, m, n) for (ll i = n - 1; i >= m; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define FOREACH(x, a) for (auto&(x) : (a))
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) ll(x.size())

int main() {
  ll n, l;
  cin >> n >> l;
  vector<ll> a;
  ll sum = 0;
  FOR(i, 1, n + 1) {
    a.push_back(i + l - 1);
    sum += i + l - 1;
  }

  ll mini = 1e18, idx;
  REP(i, n) {
    if (abs(a[i]) < mini) {
      idx = i;
      mini = abs(a[i]);
    }
  }
  cout << sum - a[idx] << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip>//setprecision
#include<math.h>
#include <functional>
#include<climits>
using namespace std;
#define ll  long long 
#define rep(i, n)        for(ll i=0; i<(ll)(n); ++i)
#define mod 1000000007
  vector<ll>to[1000005];
   ll dp[2000000];
 int gcd(int a, int b)
{
  if (a%b == 0)
{
return(b);
}
else
{
return(gcd(b,a%b));
}
}
int main(){
  string  b;cin>>b;
    ll a;cin>>a;
    rep(i,a){
    if(b[i]=='1');
    else {
      cout<<b[i];
      return 0;
    }
    }
    cout<<1;
}



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

#define rep(i, n) for(long long i=0;i<(long long)(n);i++)
#define rep2(i, s, n) for(long long i=(s);i<(long long)(n);i++)
#define all(v) v.begin(), v.end()

using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<ll, ll>;

const ll INF = (1LL<<60);

int main(){

    ll n, m; cin >> n >> m;
    vll h(n);
    rep(i, n) cin >> h[i];
    ll a, b;
    vector<bool> c(n, true);
    rep(i, m){
        cin >> a >> b;
        if(h[a-1]>=h[b-1]){
            c[b-1] = false;
        }
        if(h[b-1]>=h[a-1]){
            c[a-1] = false;
        }
    }

    ll cnt = 0;
    rep(i, n) if(c[i]) cnt++;

    cout << cnt << endl;


    return 0;
}

Measured memory_bytes: 4056
/*
    Author: Nguyen Tan Bao
    Status:
    Idea:
*/
 
#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(i,a,b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x
 
using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, int> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;
 
const ll MODBASE = 1000000007LL;
const int MAXN = 110;
const int MAXM = 1000;
const int MAXK = 16;
const int MAXQ = 200010;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    int x;
    cin >> x;
    int res = x / 500 * 1000;
    x %= 500;
    res += x / 5 * 5;
    cout << res;
    return 0;
}


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

using namespace std;

void solve();

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

void solve() {
    string s;
    cin >> s;
    int ans = 0;
    for(int i = 0; i < s.length(); i++) {
        if(s[i] == '1') ans++;
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
const int N=100050;
const int M=2*N;
vector<pair<pair<int,int> ,int> > tmp;
int id[M],per[M];
char s[M];
void BuildSuffixArray(int n)
{
	int i,j;
	for(i=1;i<=n;i++) id[i]=s[i]-'a';
	for(j=0;j<20;j++)
	{
		tmp.clear();
		for(i=1;i<=n;i++) tmp.pb(mp(mp(id[i],id[i+(1<<j)]),i));
		sort(tmp.begin(),tmp.end());
		int cnt=0;
		for(i=0;i<tmp.size();i++)
		{
			id[tmp[i].second]=cnt;
			cnt+=((i+1==tmp.size()) || (tmp[i].first!=tmp[i+1].first));
		}
		if(cnt==n) break;
	}
	for(i=1;i<=n;i++) id[i]++;
	for(i=1;i<=n;i++) per[id[i]]=i;
}
int main()
{
	int n,k;
	scanf("%i %i",&n,&k);
	scanf("%s",s+1);
	int t=n;
	for(int i=n;i>=1;i--) s[++t]=s[i];
	s[++t]='a'+27;
	BuildSuffixArray(t);
	int pos=per[1];
	for(int i=1;i<=t;i++) if(t-per[i]>=n){ pos=per[i];break;}
	int sz=0;
	while(sz<n && s[pos+sz]==s[pos]) sz++;
	//ll mx=(ll)sz*(k-1);
	ll mx=sz;
	for(int i=1;i<k;i++)
	{
		mx=mx*2;
		if(mx>=n) break;
	}
	if(mx>=n)
	{
		for(int i=1;i<=n;i++) printf("%c",s[pos]);
		return 0;
	}
	//int use=sz*(k-1);
	for(int i=1;i<=mx-sz;i++) printf("%c",s[pos]);
	for(int i=0;i<n-mx+sz;i++) printf("%c",s[pos+i]);
	return 0;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
int i,i0,n,m,ans;
int main()
{
    int A,B,K;
    scanf("%d %d",&A,&B);
    if(A>B)swap(A,B);
    if((A+B)%2==0)
    {
        printf("%d\n",(A+B)/2);
    }
    else printf("IMPOSSIBLE\n");
    return 0;
}

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

int main()
{
    ll a,b,c,d;
    cin>>a>>b>>c>>d;
      ll x = a*c;
      ll y = b*c;
      ll z = a*d;
      ll w = b*d;
      ll ans = max(x,max(y,max(z,w)));
      cout<<ans<<endl ;
      return 0; 
}  
  

Measured memory_bytes: 3628
def max(a, b)
  a > b ? a : b
end

S = gets.chomp
T = gets.chomp

S_cod = S.codepoints
T_cod = T.codepoints

S_len = S.length
T_len = T.length

dp = Array.new(S_len + 1){Array.new(T_len + 1, 0)}

S_len.times do |i|
  dpi = dp[i]
  dpi1 = dp[i + 1]
  T_len.times do |j|
    if S_cod[i] == T_cod[j]
      dpi1[j + 1] = dpi[j] + 1
    else
      dpi1[j + 1] = max(dpi1[j], dpi[j + 1])
    end
  end
end

ans = ''
s_i = S_len
t_i = T_len

while s_i > 0 && t_i > 0
  if dp[s_i - 1][t_i] == dp[s_i][t_i]
    s_i -= 1
  elsif dp[s_i][t_i - 1] == dp[s_i][t_i]
    t_i -= 1
  else
    ans += S[s_i - 1]
    s_i -= 1
    t_i -= 1    
  end
end

puts ans.reverse

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

struct P
{
    int x,y,z;

    bool operator<(const P &a)const{
              return z>a.z;
    }

};

vector<int> v;

//bitset<4001000> b;
int a,i,b,n,d,c,m,k;


int o[111113];
int l[111113];
int j[1];
int e;


int dx[10]={2,2,-2,-2,1,1,-1,-1},dy[10]={1,-1,1,-1,2,-2,2,-2};

//int dx[10]={0,1,0,-1,1,1,-1,-1},dy[10]={1,0,-1,0,1,-1,1,-1},dz[10]={0,0,0,0,1,-1};
long long mod=998244353,mod2=1000000009,mod3=2017;
long long x,z,y;
double pi=3.14159265;
//P u[222221];
stack<int> s;
//set<int> s[222][22];
//priority_queue<int> q;

//2147483647
//'1'==49;
//'A'==65;
//'a'==97;
//unordered_
//map<int,int> p;
//list<int> l;

//string r1,r2;
//char r1[33],r2[33];
//deque<int> de;
//srand((int)time(NULL));
bool as(P a,P b)
{
    return a.x<b.x;
}
bool qw(int a,int b)
{
    return a>b;
}

int main()
{
    scanf("%d",&a);
    for(int t=1;t<=a;l[t]=o[t],t++)
        scanf("%d",&o[t]);
    sort(l+1,l+a+1);
    long long k=0;
    if(a%2==0)
    {
        for(int t=a;t>a/2;t--)
            k+=2*l[t];
        k-=l[a/2+1];
        for(int t=1;t<=a/2;t++)
            k-=l[t]*2;
        k+=l[a/2];
        printf("%lld",k);
        return 0;
    }
    for(int t=a;t>a/2;t--)
            k+=2*l[t];
        k-=l[a/2+1];
        k-=l[a/2+2];
        for(int t=1;t<a/2+1;t++)
            k-=l[t]*2;
        //k+=l[a/2];
        //k+=l[a/2-1];
    for(int t=a;t>a/2+1;t--)
            x+=2*l[t];
        //x-=l[a/2+1];
        //x-=l[a/2+2];
        for(int t=1;t<=a/2+1;t++)
            x-=l[t]*2;
        x+=l[a/2+1];
        x+=l[a/2];
    printf("%lld",max(x,k));
}




Measured memory_bytes: 1024
from sys import stdin
def main():
    #入力
    last_res=float("inf")
    readline=stdin.readline
    H,W,K=map(int,readline().split())
    grid=[]
    for i in range(H):
        s=readline().strip()
        grid.append(s)

    for i in range(1<<(H-1)):
        output=[]
        for j in range(H-1):
            if(i>>j)&1:
                output.append(j)
        count=[0]*(len(output)+1)
        res=len(output)

        for b in range(W):
            now=0
            flag=False
            for a in range(H):
                if len(output)>now and  a>output[now]:
                    now+=1
                if grid[a][b]=="1":
                    count[now]+=1
                    if count[now]>K:
                        count=[0]*(len(output)+1)
                        res+=1
                        flag=True
                        break
            if flag:
                now=0
                flag=False
                for a in range(H):
                    if len(output)>now and  a>output[now]:
                        now+=1
                    if grid[a][b]=="1":
                        count[now]+=1
                        if count[now]>K:
                            res+=1
                            flag=True
                            break
                if flag:
                    break
        if flag:
            res=float("inf")
        last_res=min(last_res,res)
    print(last_res)

if __name__=="__main__":
    main()

Measured memory_bytes: 48620
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	n := nextInt()
	k := nextInt()
	q := nextInt()
	qa := map[int]int{}

	for i := 0; i < q; i++ {
		tmp := nextInt()
		qa[tmp]++
	}

	for i := 1; i < n+1; i++ {
		if k-q+qa[i] > 0 {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}

// ---- readfunc
func scanInit() {
	const cap = 64 * 1024
	var buf = make([]byte, cap)
	sc.Buffer(buf, cap)
	sc.Split(bufio.ScanWords)
	return
}
func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func nextStr() string {
	sc.Scan()
	return sc.Text()
}


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

using i64 = int64_t;

int main(){
    int n, k;
    cin >> n >> k;
    for(int i=0;i<n;++i){
        int tmp;
        cin >> tmp;
    }
    cout << (n+k-3)/(k-1) << endl;

    return 0;
}


Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int n = Integer.parseInt(sa[0]);
		Obj[] arr = new Obj[n];
		for (int i = 0; i < n; i++) {
			sa = br.readLine().split(" ");
			Obj o = new Obj();
			o.x = Integer.parseInt(sa[0]);
			o.d = Integer.parseInt(sa[1]);
			arr[i] = o;
		}
		br.close();

		Arrays.parallelSort(arr, (o1, o2) -> o1.x - o2.x);
		long[] dp = new long[n + 1];
		dp[n] = 1;
		SegmentTree st = new SegmentTree(n + 1);
		for (int i = 0; i < n; i++) {
			st.update(i, i + 1);
		}
		st.update(n, n);
		for (int i = n - 1; i >= 0; i--) {
			int xd = arr[i].x + arr[i].d;
			int idx = binarySearch(arr, xd);
			int max = st.query(Math.min(idx, i + 1), idx + 1);
			st.update(i, max);
			dp[i] = dp[i + 1] + dp[max];
			dp[i] %= 998244353;
		}
		System.out.println(dp[0]);
	}

	static class SegmentTree {
		// 親へのアクセス：(n - 1) / 2
		// 子へのアクセス：n * 2 + 1、n * 2 + 2
		int n = 2; // 要素（葉）の数
		int n2; // 全ノード数
		int[] arr;

		/**
		 * 初期化 O(2*N)
		 * @param n 要素（葉）の数 ※2べき
		 */
		public SegmentTree(int x) {
			while (n < x) {
				n <<= 1;
			}
			n2 = n * 2 - 1;
			arr = new int[n2];
		}

		/**
		 * 更新 O(logN)
		 * @param i インデックス（0～n-1）
		 * @param x 更新値
		 */
		void update(int i, int x) {
			i += n - 1; // arr上でのインデックス
			arr[i] = x;
			while (i > 0) {
				i = (i - 1) / 2;
				arr[i] = Math.max(arr[i * 2 + 1], arr[i * 2 + 2]);
			}
		}

		int query(int l, int r) {
			return query(l, r, 0, 0, n);
		}

		/**
		 * 取得 O(logN)
		 * インデックスa以上b未満の区間の最大値、l, rにはノードkに対応する区間
		 * query(a, b, 0, 0, n);
		 */
		int query(int a, int b, int k, int l, int r) {
			if (r <= a || b <= l) return 0; // 交差しない
			if (a <= l && r <= b) return arr[k]; // 完全に含む
			int v1 = query(a, b, k * 2 + 1, l, (l + r) / 2);
			int v2 = query(a, b, k * 2 + 2, (l + r) / 2, r);
			return Math.max(v1, v2);
		}
	}

	static int binarySearch(Obj[] arr, long val) {
		int ng = 0;
		int ok = arr.length;

		while (Math.abs(ok - ng) > 1) {
			int mid = (ok + ng) / 2;
			if (arr[mid].x >= val) {
				ok = mid;
			} else {
				ng = mid;
			}
		}
		return ng;
	}

	static class Obj {
		int x, d;
	}
}


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

string S;
int p = 0;

int A(){
	if( S[p] == 'm' ){
		p++;
		A();
		if( S[p] != 'e' ) throw 2;
		p++;
		A();
		if( S[p] != 'w' ) throw 2;
		p++;
	}
}
int main(){
	cin >> S;
	S += "=";
	try{
		A();
		if( S[p] != '=' ) throw 0;
		cout << "Cat" << endl;
	}catch(int x){
		cout << "Rabbit" << endl;
	}
}

Measured memory_bytes: 1248
#include<bits/stdc++.h>
using namespace std;
int N;
vector<int> dist;
vector<vector<int>> G;
int main(){
    cin >> N;
    dist.assign(N,-1);
    G.resize(N);
    for(int i=0;i<N;i++){
        int id;cin >> id;
        int k;cin >> k;
        for(int j=0;j<k;j++){
            int a;cin >> a;a--;
            G[i].push_back(a);
        }
    }
    queue<int> que;
    que.push(0);
    int d = 0;
    dist[0] = 0;
    while(!que.empty()){
        int now = que.front();
        que.pop();
        for(auto nv:G[now]){
            if(dist[nv]!=-1) continue;
            dist[nv] = dist[now]+1;
            que.push(nv);
        }
    }
    for(int i=0;i<N;i++){
        cout << i+1 << " " << dist[i] << endl;
    }
}


Measured memory_bytes: 3160
import math

def koch(start, end, n, r):
    if n > 0:
        #途中の頂点をa, b, cとする
        a = [(start[0]*2 + end[0]*1) / 3, (start[1]*2 + end[1]*1) / 3]
        c = [(start[0]*1 + end[0]*2) / 3, (start[1]*1 + end[1]*2) / 3]

        x = c[0] - a[0]
        y = c[1] - a[1]

        b = [x * math.cos(math.pi/3) - y * math.sin(math.pi/3) + a[0], x * math.sin(math.pi/3) + y * math.cos(math.pi/3) + a[1]]

        koch(start, a, n-1, r)
        koch(a, b, n-1, r)
        koch(b, c, n-1, r)
        koch(c, end, n-1, r)

    else:
        r.append(start)

n = int(input())

r = []

koch([0, 0], [100, 0], n, r)
r.append([100, 0])

for rr in r:
    print(str(rr[0]) + ' ' + str(rr[1]))


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

using namespace std;
using ll = long long;

int main() {
    long long s;
    cin >> s;
    int i = 1;
    vector<bool> A(1000010,0);
    while (1) {
        if(A.at(s)) {
            cout << i << endl;
            break;
        } else {

            A.at(s) = 1;
            if(s%2) {
                s = 3*s + 1;
            } else {
                s /= 2;
            }
            i++;
        }
    }
    

    return 0;
}

Measured memory_bytes: 3760
def actual(a, b, c, k):
    # 2倍されるのは 1つの数字に限られるので、そいつだけを2倍していけばいい
    max_num = max((a, b, c))
    repetition = (2 ** k - 1)
    
    return a + b + c + (max_num * repetition)

a, b, c = map(int, input().split())
k = int(input())

print(actual(a, b, c, k))


Measured memory_bytes: 9100
#include <stdio.h>
int main(void){
    
    int a,b;

    scanf("%d",&a);
    scanf("%d",&b);
    
    if(a == b){
        puts("a == b");
    }
    else if(a < b){
        puts("a < b");
    }
    else{
        puts("a > b");
    }
    
    return 0;
}



Measured memory_bytes: 2040
from collections import Counter

H,W = map(int,input().split())
S = [input() for i in range(H)]

class UnionFind:
    def __init__(self,N):
        self.parent = [i for i in range(N)]
        self.rank = [0] * N
        self.count = 0
    def root(self,a):
        if self.parent[a] == a:
            return a
        else:
            self.parent[a] = self.root(self.parent[a])
            return self.parent[a]
    def is_same(self,a,b):
        return self.root(a) == self.root(b)
    def unite(self,a,b):
        ra = self.root(a)
        rb = self.root(b)
        if ra == rb: return
        if self.rank[ra] < self.rank[rb]:
            self.parent[ra] = rb
        else:
            self.parent[rb] = ra
            if self.rank[ra] == self.rank[rb]: self.rank[ra] += 1
        self.count += 1

uf = UnionFind(H*W)

for i in range(H):
    for j in range(W):
        if j < W-1 and S[i][j] != S[i][j+1]:
            uf.unite(i*W+j, i*W+j+1)
        if i < H-1 and S[i][j] != S[i+1][j]:
            uf.unite(i*W+j, (i+1)*W+j)
for i in range(H*W):
    uf.root(i)

c1 = Counter()
c2 = Counter()

for i in range(H):
    for j in range(W):
        k = i*W+j
        if S[i][j] == '.':
            c1[uf.root(k)] += 1
        else:
            c2[uf.root(k)] += 1

ans = 0
for k in c1.keys():
    ans += c1[k] * c2[k]
print(ans)

Measured memory_bytes: 22248
#include <cstdio>
#include <queue>
#include <vector>
#include <algorithm>

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

int main( void ){
	int  n;
	char s[11];
	if (!scanf( "%d%s", &n, s ))
		return -1;
	if (n <3200)
		printf("red\n");
	else
		printf( "%s\n", s);
}


Measured memory_bytes: 128
#pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define PI 3.141592
#define LL_INF 9000000000000000000
#define LL_MINF -9000000000000000000
#define INT_INF 2000000000
#define INT_MINF -2000000000
#define all(a) (a).begin(), (a).end()
#define fi first
#define se second
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

int main(){
    int N, M;
    cin >> N >> M;
    vector<pair<ll, ll>> AB(N);
    for(int i = 0; i < N; i++) cin >> AB[i].fi >> AB[i].se;
    vector<pair<ll,ll>> CD(M);
    for(int i = 0; i < M; i++) cin >> CD[i].fi >> CD[i].se;
    for(int i = 0; i < N; i++){
        ll min_l = LL_INF;
        for(int j = 0; j < M; j++){
            min_l = min(min_l, abs(AB[i].fi - CD[j].fi) + abs(AB[i].se - CD[j].se));
        }
        for(int j = 0; j < M; j++){
            if(min_l == abs(AB[i].fi - CD[j].fi) + abs(AB[i].se - CD[j].se)){
                 cout << j + 1 << endl;
                 break;
            }
        }
    }
}


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

using VS = vector<string>;    using LL = long long;
using VI = vector<int>;       using VVI = vector<VI>;
using PII = pair<int, int>;   using PLL = pair<LL, LL>;
using VL = vector<LL>;        using VVL = vector<VL>;

#define ALL(a)  begin((a)),end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define SZ(a) int((a).size())
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define UNIQ(c) (c).erase(unique(ALL((c))), end((c)))
#define FOR(i, s, e) for (int(i) = (s); (i) < (e); (i)++)
#define FORR(i, s, e) for (int(i) = (s); (i) > (e); (i)--)
//#pragma GCC optimize ("-O3") 
#ifdef YANG33
#include "mydebug.hpp"
#else
#define DD(x) 
#endif
const int INF = 1e9;                          const LL LINF = 1e16;
const LL MOD = 1000000007;                    const double PI = acos(-1.0);
int DX[8] = { 0, 0, 1, -1, 1, 1, -1, -1 };    int DY[8] = { 1, -1, 0, 0, 1, -1, 1, -1 };

/* -----  2019/02/24  Problem: ABC 119 D / Link: http://abc119.contest.atcoder.jp/tasks/abc119_d  ----- */
/* ------問題------



-----問題ここまで----- */
/* -----解説等-----



----解説ここまで---- */


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

	LL A, B, Q; cin >> A >> B >> Q;
	VL s(A), t(B);
	FOR(i, 0, A) {
		cin >> s[i];
	}
	FOR(i, 0, B) {
		cin >> t[i];
	}
	SORT(s);
	SORT(t);
	
	auto f = [](LL x, const VL&s, const VL& t) {
		LL sub = LINF;
		auto it = lower_bound(ALL(s), x) - s.begin();
		auto g = [](LL x,const VL&s, const VL&t, int it) {
			LL ans = LINF;
			LL ret = abs(s[it] - x);
			auto it2 = lower_bound(ALL(t), s[it]) - t.begin();
			if (it2 != SZ(t))
				ans = min(ans, ret + abs(s[it] - t[it2]));
			if (it2 != 0) {
				it2--;
				ans = min(ans, ret + abs(s[it] - t[it2]));
			}
			return ans;
		};

		if (it != SZ(s)) {
			sub = min(sub, g(x,s,t,it));
		}
		if (it != 0) {
			it--;
			sub = min(sub, g(x,s,t,it));
		}
		return sub;
	};
	FOR(_, 0, Q) {
		LL x; cin >> x;
		LL ans = min(f(x, s, t), f(x, t, s));
		cout << ans << "\n";
	}


	return 0;
}


Measured memory_bytes: 2944
#include <stdio.h>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX 200001

int main(int argc, char const *argv[])
{
  int n;
  long long ans = 0;
  int A[MAX];
  scanf("%d", &n);

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

  sort(A, A + n, greater<int>());

  // 半分素直に並べて、後の半分は上位の間にぶち込む
  for (int i = 1; i < n; i++)
  {
    ans += A[i / 2];
  }

  printf("%lld\n", ans);

  return 0;
}


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

int main(){
    using namespace std;
    constexpr unsigned long B{30};
    
    // input
    unsigned long N, K;
    cin >> N >> K;
    --K;
    vector P(B, vector<unsigned long>(N));
    vector C(B, vector<long>(N));
    for(auto&& i : P[0]){
        cin >> i;
        --i;
    }
    for(auto&& i : C[0])cin >> i;
    
    // doubling
    for(unsigned long i{1}; i < B; ++i)for(unsigned long j{0}; j < N; ++j)P[i][j] = P[i - 1][P[i - 1][j]];
    for(unsigned long i{1}; i < B; ++i)for(unsigned long j{0}; j < N; ++j)C[i][j] = C[i - 1][j] + C[i - 1][P[i - 1][j]];
    
    // dp
    vector ans(2, vector<long>(N));
    copy(begin(C[0]), end(C[0]), begin(ans[0]));
    fill(begin(ans[1]), end(ans[1]), numeric_limits<long>::min() / 2);
    for(unsigned long i{B}; i--; )if((K >> i) & 1){
        vector tmp(ans);
        for(unsigned long j{0}; j < N; ++j)ans[0][j] = C[i][j] + tmp[0][P[i][j]];
        for(unsigned long j{0}; j < N; ++j)ans[1][j] = max({tmp[0][j], tmp[1][j], C[i][j] + tmp[1][P[i][j]]});
    }else if(K >> i){
        vector tmp(ans);
        for(unsigned long j{0}; j < N; ++j)ans[1][j] = max(tmp[1][j], C[i][j] + tmp[1][P[i][j]]);
    }
    cout << max(*max_element(begin(ans[0]), end(ans[0])), *max_element(begin(ans[1]), end(ans[1]))) << endl;
    return 0;
}

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

int main(){
  int A, B;
  cin >> A >> B;
  
  int max=0;
  if(A>B){
    max += A;
    if(A-1>B){
      max += A-1;
    }else{
      max += B;
    }
  }else{
    max += B;
    if(B-1>A){
      max += B-1;
    }else{
      max += A;
    }
  }
  
  cout << max;
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std ;
int main()
{
string s ;
cin>> s;
while (1)
{
s.pop_back();
    if (s.size()%2==0)
    {
        if(s.substr(0,s.size()/2) == s.substr(s.size()/2))
          {

          cout << s.size();
        break;
        }


    }
}


return 0;
}

Measured memory_bytes: 256
/***
**   AUTHOR::ASHUTOSH MOUDGIL
***/


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define pb push_back
#define mp make_pair
#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define F first
#define S second
#define int long long
//#define ll long long
#define all(x) x.begin(),x.end()
#define rsort(x) sort(all(x)); reverse(all(x));
#define endl '\n'
#define vi vector<int>
#define vlli vector<long long>
#define pii pair<int,int>
#define mod 1000000007
#define LMAX 3e18
#define ULMAX 18446744073709551615
#define deb(x) cout<<#x<<" : "<<x<<endl;
#define PI 3.141592654
#define deb1(x) cout << #x <<"="<< x <<endl;
#define deb2(x,y) cout << #x <<"="<<x<<", "<<#y<<"="<<y <<endl;
#define deb3(x,y,z) cout << #x <<"="<<x<<", "<<#y<<"="<<y <<", "<<#z<<"="<<z<<endl;
#define deb4(x,y,z,a) cout << #x <<"="<<x<<", "<<#y<<"="<<y <<", "<<#z<<"="<<z<< ", "<<#a <<"="<<a << endl;
#define debarr(x) cout << #x<<"::"<<endl;for(int i : x){cout << i <<" ";} cout <<endl;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

inline int add(int a, int b){a = (a+b); if(a>=mod)a-=mod; return a;}
inline int sub(int a, int b){a = a-b; if(a<0)a+=mod; return a;}
inline int mul(int a, int b){a = (a*b)%mod; return a;}
inline int power(int x, int y){ int res = 1,temp = x;while(y > 0){if(y&1) res *= temp;temp *= temp;y /= 2;}return res;}
inline int power(int x,  int y,  int m) {if (y == 0) return 1; int p = power(x, y/2, m) % m; p = (p * p) % m; return (y%2 == 0)? p : (x * p) % m; } 



void mymain() {
    int a;
    cin >> a;
    cout << a + (a*a) + (a*a*a) << endl;
}

signed main(){
IOS;
///freopen("input.txt", "r", stdin);
///freopen("output.txt", "w", stdout);
int t=1;
//cin>>t;
for(int tt=0;tt<t;tt++){
   ///cout << "Case #" << tt+1 <<": ";
   mymain();
}
return 0;
}
/*

*/

Measured memory_bytes: 3636
function main()
    a, b, c = parse.(Int, split(readline()))
    k = parse(Int, readline())
    cnt = 0
    while !(a < b < c)
        if a >= b
            b *= 2
            cnt += 1
        elseif b >= c
            c *= 2
            cnt += 1
        end
    end

    if cnt <= k
        println("Yes")
    else
        println("No")
    end
end

main()

Measured memory_bytes: 169544
class ABSsegtree: # 必要な配列の長さN,単位元ie,関数(2項演算)func,を渡す    
    def __init__(self,N,ie,func):
        self.func=func
        self.getLEN=1 # Length of list
        while self.getLEN<N:
            self.getLEN*=2
        self.getsize=self.getLEN*2 # =len(ST)
        self.getLIN=self.getsize-self.getLEN # internal nodes without ST[0]
        self.ST=[ie]*self.getsize

    def update(self,i,x): # i(0-index)にxをいれる
        i+=self.getLIN
        self.ST[i]=x
        while i>1:
            i//=2
            self.ST[i]=self.func(self.ST[2*i],self.ST[2*i+1])
    
    def get_interval(self,a,b): # [a,b)での最小値を求めたい
        a+=self.getLIN
        b+=self.getLIN
        ret=self.func(self.ST[a],self.ST[b-1])
        while a+1<b: # 階層ごとに見る
            if a%2==1:
                ret=self.func(self.ST[a],ret)
                a+=1
            a//=2
            if b%2==1:
                ret=self.func(self.ST[b-1],ret)
            b//=2
        if a==b:
            pass
        else:
            ret=self.func(ret,self.ST[a])
        return ret
      
import fractions

N=int(input())
A=[int(a) for a in input().split()]

ins=ABSsegtree(N,0,fractions.gcd)
for i,a in enumerate(A):
  ins.update(i,a)
ans=0
for i,a in enumerate(A):
  ins.update(i,0)
  ans=max(ans,ins.get_interval(0,N))
  ins.update(i,a)
print(ans)
  

Measured memory_bytes: 92136
a,v=map(int,input().split())
b,w=map(int,input().split())
t=int(input())
if a<b and v<=w:
    print("NO")
elif(w>v and (a>b or b>a or a==b)):
    print("NO")
else:
    if abs(b-a)<=t*abs(v-w):
        print("YES")
    else:
        print("NO")


Measured memory_bytes: 61844
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<queue>
#include<cmath>
#include<map>
#include<stack>
#define ll long long
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
static const int MAXN = 100000;
static const int MAX = 1000000000;

int main(){
    double r;
    cin >> r;
    cout << r * 2 * M_PI;

    return 0;
}

Measured memory_bytes: 3260
//include
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <map>
#include <sstream>
#include <utility>
//マクロとか
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n) + 1; i++)
#define all(vecto) vecto.begin(), vecto.end()
#define max3(a, b, c) max(a, max(b, c))
#define min3(a, b, c) min(a, min(b, c))
using ll = long long;

//自前の関数たち
//最大公約数
ll GCD(ll a, ll b)
{
    if (b == 0)
        return a;
    else
        return GCD(b, a % b);
}

//最小公倍数
ll LCM(ll a, ll b)
{
    return (a * b) / GCD(a, b);
}

//namespace my
namespace my {
    //配列の最大値or最小値を数値で返す関数
    int max_element(std::vector<int> vec){
        std::sort(vec.begin(), vec.end());
        return vec.at(vec.size() - 1);
    }
    int min_element(std::vector<int> vec){
        std::sort(vec.begin(), vec.end());
        return vec.at(0);
    }
}

//yes,noを出力するやつ
void ans(bool qus)
{
    if (qus == true)
        std::cout << "Yes" << std::endl;
    else
        std::cout << "No" << std::endl;
}

void Ans(bool qust)
{
    if (qust == true)
        std::cout << "YES" << std::endl;
    else
        std::cout << "NO" << std::endl;
}

//std::を省略するやつ
using namespace std;

////////////////////////////////////////////////////////////////////////////////
//スタート


int main(){
    int s;
    cin>>s;
    int h = s / 3600;
    int m = s % 3600 / 60;
    int sec = s % 3600 % 60;
    cout << h << ':' << m << ':' << sec << endl;
}


Measured memory_bytes: 3096
import java.util.Scanner;

public class Main {
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        int d = stdIn.nextInt();
        int eve = 25 - d;
        //int c = stdIn.nextInt();
        //int w = stdIn.nextInt();
        //int n = stdIn.nextInt();
        //int k = stdIn.nextInt();
        //String s = stdIn.next();
        //char c[] = s.toCharArray();
        //boolean heisei = true;
        
        System.out.print("Christmas");
        
        for(int i = 0; i < eve; i++){
            System.out.print(" Eve");
        }
        
        System.out.println();
        //System.out.print();
    }
}


Measured memory_bytes: 21844
n=int(input())
a=[0]*5
for i in range(n):
    s=input()
    if s[0]=='M': a[0]+=1
    elif s[0]=='A': a[1]+=1
    elif s[0]=='R': a[2]+=1
    elif s[0]=='C': a[3]+=1
    elif s[0]=='H': a[4]+=1
res=0
for i in range(3):
    for j in range(i+1,4):
        for k in range(j+1,5):
            res+=a[i]*a[j]*a[k]
print(res)

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

using namespace std;

int main(){
  string s;
  cin >> s;
  if(s=="Sunny"){
    cout << "Cloudy" << endl;
  }
  else if(s=="Cloudy"){
    cout << "Rainy" << endl;
  }
  else{
    cout << "Sunny" << endl;
  }
}

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

public class hello
{
    public static void Main()
    {
        string[] line = Console.ReadLine().Trim().Split(' ');
        var n = int.Parse(line[0]);
        var m = int.Parse(line[1]);
        var a = int.Parse(line[2]);
        var b = int.Parse(line[3]);
        line = Console.ReadLine().Trim().Split(' ');
        var d = Array.ConvertAll(line, int.Parse);


        Console.WriteLine(getAns(d, n, m, a, b));
    }
    static int getAns(int[] d, int n, int m, int a, int b)
    {
        var h0 = new List<int>();
        for (int i = 0; i < n; i++)
            if (d[i] >= a) h0.Add(d[i]);
            else break;
        var h0c = h0.Count();
        if (n - h0c >= m) return h0c;
        var count = 0;
        for (int i = h0c -1; i >= 0; i--)
            if (h0[i] <= b) count++;
            else break;
        return h0c - count;
    }
}



Measured memory_bytes: 18260
import std.stdio, std.conv, std.string, std.algorithm, std.array;


void main()
{
  long n, x;
  readf("%d %d\n", &n, &x);
  long[] ms;
  foreach (i; 0..n) {
    ms ~= readln.strip.to!long;
  }

  ms = ms.sort().array;
  foreach (m; ms) {
    x -= m;
  }

  writeln(n + x/ms[0]);
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define full(a) a.begin(),a.end()
#define rfull(a) a.rbegin(),a.rend()

using namespace std;
const double pi=acos(-1.0);
const double pii=2*pi;
const double eps=1e-6;
const long long MOD=1e9+7;

long long pow_mod(long long a, long long b, long long mod){
    long long ans=1;
    a%=mod;
    while(b>0){
        if(b&1){
            ans*=a;
            ans%=mod;
        }
        b=b>>1;
        a=(a*a)%mod;
    }
    return ans;
}

long long ncr(long long n, long long r, vector<long long>& f){
    if(n<0 || r<0 || n<r) return 0ll;
    return (f[n]*pow_mod((f[r]*f[n-r])%MOD,MOD-2,MOD))%MOD;
}

void solve(){
    long long s;
    cin>>s;
    if(s<3){
        cout<<0<<"\n";
        return;
    }
    vector<long long> fct(s+100,1);
    for(int i=2;i<fct.size();i++) fct[i]=(fct[i-1]*i)%MOD;
    long long ans=1;
    for(long long k=2;s-3*k>=0;k++){
        ans=(ans+ncr(s-2*k-1,k-1,fct))%MOD;
    }
    cout<<ans<<"\n";
}

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(NULL);
    std::cout.tie(NULL);

    solve();
    return 0;
}

Measured memory_bytes: 3656
# 最近点対を分割統治法で求める
from math import sqrt
n = int(input())
ps = [list(map(float, input().strip().split())) for i in range(n)]
# print(ps)
# Q: なぜ、最初にx座標についてソートされている必要があるのか？
# A: 二つの区間が統合されるとき、dには2つの区間における最小２点間距離が入っており、
#    統合された区間における最小値は、それ以下を探索するようになっている。
#    この時、各区間A:[i, i+m), B:[i+m, n)での最小値は、
#    [Aの任意の点]と[Bの任意の点]の距離は、境界(i+m-1とi+m)を除いてこの最小値以上であるという前提が成り立つ。
#    そのため、統合された区間において探索するのはabs(dx - x) <= dのみを探索すれば良い。
#    仮にxでソートされていない場合、上の前提が成り立たないため、統合しても結局全ての点で
#    距離を計算しなくてはいけない。
ps.sort()
# print(ps)
INF = 10**9

# cp_rec - 再帰用関数
# 入力: 配列と区間
# 出力: 距離と区間内の要素をY座標でソートした配列
def cp_rec(ps, i, n):
    if n <= 1:
        return INF, [ps[i]]
    m = int(n/2)
    x = ps[i+m][0] # 半分に分割した境界のX座標
    # 配列を半分に分割して計算
    d1, qs1 = cp_rec(ps, i, m)
    d2, qs2 = cp_rec(ps, i+m, n-m)
    d = min(d1, d2)
    # Y座標が小さい順にmergeする
    qs = [None]*n
    s = t = idx = 0
    while s < m and t < n-m:
        if qs1[s][1] < qs2[t][1]:
            qs[idx] = qs1[s]; s += 1
        else:
            qs[idx] = qs2[t]; t += 1
        idx += 1
    while s < m:
        qs[idx] = qs1[s]; s += 1
        idx += 1
    while t < n-m:
        qs[idx] = qs2[t]; t += 1
        idx += 1
    # 境界のX座標x(=ps[i+m][0])から距離がd以下のものについて距離を計算していく
    # bは境界のX座標から距離d以下のものを集めたものが、Y座標の昇順に入っている。
    b = []
    for i in range(n):
        ax, ay = q = qs[i]
        if abs(ax - x) >= d:
            continue
        # Y座標について、qs[i]から距離がd以下のj(<i)について計算していく
        for j in range(len(b)-1, -1, -1):
            dx = ax - b[j][0]
            dy = ay - b[j][1]
            # このループは, ayとb[j][1]が近い順に取り出していいるため、
            # 一度 dy >= 0となれば、あとは探索する必要はない。
            if dy >= d: break
            d = min(d, sqrt(dx**2 + dy**2))
        b.append(q)
    # dは、区間[i, i+n)における最小区間距離を指している。
    # qsは[i, i+n)でY座標についてソートされている。
    return d, qs

# ps: ソートした二次元座標のlist
def closest_pair(ps):
    n = len(ps)
    return cp_rec(ps, 0, n)[0]

print("{:.09f}".format(closest_pair(ps)))


Measured memory_bytes: 23752
import std;
import core.bitop;

ulong MAX = 100_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "x", long, "g");
alias PQueue(T, alias less = "a>b") = BinaryHeap!(Array!T, less);

void main()
{
    auto s = sread();
    auto t = sread();
    sort!"a<b"(cast(ubyte[]) s);
    sort!"a>b"(cast(ubyte[]) t);
    // s.writeln();
    // t.writeln();
    if (s < t)
        writeln("Yes");
    else
        writeln("No");
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}


Measured memory_bytes: 3628
n = int(input())
a = list(map(int,input().split()))

sm = sum(a)
sn = a[0]
ar = sm - a[0]
ans = abs(sn - ar)

for i in range(1,len(a)-1):
    sn += a[i]
    ar -= a[i]
    ans = min(ans,abs(sn-ar))

print(ans)

Measured memory_bytes: 24812
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(t) t.begin(), t.end()
#define inrange(i, a, b) (((i)>= min((a), (b))) && ((i) <= max((a), (b))))
typedef vector<ll> vi;
#define fi first
#define se second
const ll inf = 9e18;
const ll mod = 1e9 + 7;

void print(ll a[], ll n){for(ll i=0;i<n;i++){cout<<a[i]<<" ";}cout<<"\n";}
ll power(ll x, ll y, ll M = inf){
    ll ans = 1;
    x %= M;
    while(y){
        if(y&1)
            ans = (x * ans) % M;

        x = (x * x) % M;
        y >>= 1;
    }
    return ans;
}
ll modInverse(ll n) {return power(n, mod-2, mod);}
inline ll mul(ll a, ll b){ return (a * b) % mod; }
inline ll sub(ll a, ll b){ ll c = a - b; if(c < 0) c += mod; return c; }
inline ll add(ll a, ll b){ ll c = a + b; if(c > mod) c -= mod; return c; }
inline ll divi(ll a, ll b){ return mul(a, modInverse(b)); }

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

	ll n, k;
	cin>>n>>k;
	ll a[n];
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	ll dp[n+2];
	dp[0]  = 0;
	for(ll i=1;i<n;i++){
		dp[i] = INT_MAX;
		for(int j=1;j<=min(k, i);j++){
			dp[i] = min(dp[i-j] + abs(a[i-j] - a[i]), dp[i]);
		}
	}
	cout<<dp[n-1]<<"\n";
	return 0;
}




Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
    ll t,n,m,i,j,k=0,f,x,y,q,a,b,c,d;

    cin>>k;

    string s;

    cin>>s;

    if(s.size()<=k){

        cout<<s<<endl;
    }
    else{

        for(i=0;i<k;i++){

            cout<<s[i];
        }
        cout<<"..."<<endl;
    }

}




Measured memory_bytes: 3624
n, k = map(int, input().split())
x = list(map(int, input().split()))

ans = 10**9

for i in range(n - k + 1):
    if x[i] < 0:
        if x[i + k - 1] < 0:
            ref = -x[i]
        else:
            ref = min(x[i]*-2 + x[i + k - 1], -x[i] + x[i + k - 1]*2)
    else:
        ref = x[i + k - 1]
    ans = min(ans, ref)

print(ans)

Measured memory_bytes: 20332
#include <stdio.h>

int main()
{
	int n;
	int i,j,k,l;
	int ans;
	while(scanf("%d",&n) != EOF){
		ans = 0;
		for(i = 0; i < 10; i++){
			for(j = 0; j < 10; j++){
				for(k = 0; k < 10; k++){
					for(l = 0; l < 10; l++){
						if(i + j + k + l == n)ans++;
					}
				}
			}
		}
		printf("%d\n",ans);
	}
	return 0;
}

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


// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3") 
// #pragma GCC optimization ("unroll-loops")
 
#define ll  long long int
#define all(v) v.begin(),v.end()
#define pb push_back
#define S second
#define F first
#define die() return 0;
 
#define MD          1000000007
#define M           100011

long long  md=MD;
int f(string s,int l){
	int i;
	if(l==0)return 1;
	map<string,int> m1,m2;
	for(i=0;i+l<=s.size();++i){
		string ss=s.substr(i,l);
		// cerr<<ss<<"\n";
		if(m1.find(ss)==m1.end())m1[ss]=i;
		m1[ss]=min(m1[ss],i);
		m2[ss]=max(m2[ss],i);
	}
	for(auto x:m1){
		if(x.S+l<=m2[x.F])return 1;
	}
	return 0;

}

int solve(){
	int n,i,j,k,m;
	cin>>n;
	string s;
	cin>>s;
	int x=0,p=n;
	for(;p>=1;p/=2){
		while(x+p<=n&&f(s,x+p))x+=p;
	}
	// f(s,5);
	cout<<x<<"\n";

	return 0;
}


int main(){

 
     
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t,i;

    t=1;
    // cin>>t;

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



    

}



Measured memory_bytes: 6828