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

#define lli long long
#define FOR(i,a,b) for (lli i=(a);i<(b);i++)
#define REP(i,n) for (lli i=0;i<(n);i++)
#define rep(i,n) for (lli i=0;i<(n);i++)

#define INF INT_MAX/3
#define PB push_back
#define pb push_back
#define all(a) (a).begin(),(a),end()
#define pll pair<lli,lli>

int main(){
  lli n,input;
  lli S[14]={0},H[14]={0},C[14]={0},D[14]={0};
  char m;

  cin>>n;
  rep(i,n){
    cin>>m>>input;
    if(m=='S')
      S[input]=1;
    else if(m=='H')
      H[input]=1;
    else if(m=='C')
      C[input]=1;
    else if(m=='D')
      D[input]=1;
    else{
      cout<<"error"<<endl;
      break;
    }
  }
  FOR(i,1,14){
    if(S[i]==0)cout<<"S "<<i<<endl;
  }
  FOR(i,1,14){
    if(H[i]==0)cout<<"H "<<i<<endl;
  }
  FOR(i,1,14){
    if(C[i]==0)cout<<"C "<<i<<endl;
  }
  FOR(i,1,14){
    if(D[i]==0)cout<<"D "<<i<<endl;
  }
  
  return 0;
}

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

int main(){
	cin.tie(0);
   	ios::sync_with_stdio(false);
	ll A,B,C,K;
	cin>>A>>B>>C>>K;
	ll ans = 0;
	if(K>A){
		K-=A;
		ans += A;
	}else{
		ans += K;
		goto fin;
	}
	if(K>B){
		K -=B;
	}else{
		goto fin;
	}
	ans -= K;
	
	fin:
	cout<<ans<<"\n";
	return 0;
}


Measured memory_bytes: 3652
#include <bits/stdc++.h>
#include <numeric>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define reps(i,s,n) for (int i = s; i < n; ++i)
#define rep1(i,n) for (int i = 1; i <= n; ++i)
#define per(i,n) for (int i = n - 1; i >= 0; --i)
#define per1(i,n) for (int i = n; i >= 1; --i)
#define all(c) begin(c),end(c)
template<typename T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> inline T intceil(T a, T b) { return (a + (b - 1)) / b; }
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
const long long MOD = 1e9+7;
#define precout() cout << std::fixed << std::setprecision(20);
const string alphabet = "abcdefghijklmnopqrstuvwxyz";
const int dy[4] = { 0, 1, 0, -1 };
const int dx[4] = { 1, 0, -1, 0 };
// if(nextY >= 0 && nextY < H && nextX >= 0 && nextX < W)
static const long double pi = acos(-1.0);
typedef complex<ld> cd;

ll A,B,C,D;
map <ll,ll> dp;

ll dfs(ll N) {
    if(N == 0) return 0;
    if(N == 1) return D;
    if(dp.find(N) != dp.end()) return dp[N];

    ll ans = 1e18;

    if(ans / D >= N) chmin(ans, N * D);

    reps(i, -4, 5) {
        ll x = N + i;
        if(abs(i) < 5 && x % 5 == 0) {
            chmin(ans, dfs(x / 5) + C + abs(i) * D);
        }
        if(abs(i) < 3 && x % 3 == 0) {
            chmin(ans, dfs(x / 3) + B + abs(i) * D);
        }
        if(abs(i) < 2 && x % 2 == 0) {
            chmin(ans, dfs(x / 2) + A + abs(i) * D);
        }
    }

    return dp[N] = ans;
}

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

    int T; cin >> T;
    vector<ll> ans;
    rep(i, T) {
        dp.clear();
        ll N; cin >> N;
        cin >> A >> B >> C >> D;
        ans.push_back(dfs(N));
    }

    for(auto&a:ans) {
        cout << a << endl;
    }
    return 0;
}


Measured memory_bytes: 4456
A = list(map(int, list(input())))

ans = 0
from itertools import *
N = len(A)-1
for p in product([0,1],repeat=N):
    now = A[0]
    for i in range(N):
        if p[i] == 0:
            now = now*10+A[i+1]
        else:
            ans += now
            now = A[i+1]
    ans += now
print(ans)

Measured memory_bytes: 3060
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
using namespace std;

#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, m, n) for(int i = (int)(m); i < (int)(n); ++i)


int main()
{
    double a, b, x;
    cin >> a >> b >> x;

    double ans;
    if(2*x > a*a*b){
        ans = atan(2*(b*a*a-x)/(a*a*a));
        cout << setprecision(8) << ans*180/M_PI << endl;
    }else{
        // x = a*a*b-x;
        // ans = atan(2*(b*a*a-x)/(a*a*a));
        // cout << setprecision(8) << 90-ans*180/M_PI << endl;
        ans = atan(b*a*b/(2*x));
        cout << setprecision(8) << ans*180/M_PI << endl;
    }

    return 0;
}

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

int main() {
  int n, a;
  cin >> n;
  map<int, int> m;
  int tourist = 0;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (3200 <= a)
      tourist++;
    else
      m[a / 400]++;
  }
  cout << (m.size() ? m.size() : 1) << " " << m.size() + tourist << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;

int main(){
	string X; cin >> X;
	int s = 0, ans = 0;
	for(int i=0; i<X.size(); i++){
		if(X[i] == 'S') s++;
		else if(s == 0) ans++;
		else s--;
	}
	cout << 2*ans << endl;
	return 0;
}

Measured memory_bytes: 640
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    int A, B, K;
    cin >> A >> B >> K;

    vector<int> count(1,0);
    for(int i=1; i<=(A>B?B:A); i++){
        if(A%i==0&&B%i==0){
            count.push_back(i);
        }
    }

    sort(count.begin(), count.end(), greater<int>());

    cout << count.at(K-1) << endl;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main() {
   int N;

   scanf("%d", &N);

   if(N % 10 % 10 == 7 || N / 10 % 10 == 7 || N / 100 % 10 == 7) {
      printf("Yes\n");
   }else {
      printf("No\n");
   }
   return 0;

}


Measured memory_bytes: 1656
#include <iostream>
#include <cstdio>

using namespace std;

int main()
{
    int i,j,k;
    while(scanf("%d%d",&i,&j)!=EOF)
    {
        k=i+j;
        if (i%3==0||j%3==0||k%3==0)
            printf("Possible\n");
        else
            printf("Impossible\n");
    }
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
#define clr(a,x) memset(a,x,sizeof(a))
#define SZ(x) ((int)(x).size())
#define lson rt<<1
#define rson rt<<1|1
#define pb push_back
#define fi first
#define se second
#define what_is(x) cerr<<#x<<" "<<x<<endl;
typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> vi;
template <typename T>
inline void _read(T& x){
    cin>>x;
}
void R(){}
template <typename T,typename... U>
void R(T&head,U&... tail){
    _read(head);
    R(tail...);
}

template <typename T>
inline void _write(const T& x){
    cout<<x<<' ';
}
void W(){cout<<endl;}
template <typename T,typename... U>
void W(const T&head,const U&... tail){
    _write(head);
    W(tail...);
}

void go();
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    go();
    return 0;
}
/****************ackun*********************/
const int MAXN=25;
int b[MAXN];
void go(){
    int n,m,c;
    R(n,m,c);
    rep(i,1,m){
        R(b[i]);
    }
    int ans=0;
    rep(i,1,n){
        int now=0;
        rep(j,1,m){
            int x;
            R(x);
            now+=x*b[j];
        }
        now+=c;
        if(now>0){
            ans++;
        }
    }
    W(ans);
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
using namespace std;

int main(){
    int n,z,w;
    cin >> n >> z >> w;
    vector<int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];
    if(n == 1) cout << abs(a[0] - w) << endl;
    else cout << max(abs(a[n-1] - w), abs(a[n-2] - a[n-1])) << endl;
}

Measured memory_bytes: 256
s = input()
count = 0

for i in range(len(s)):
  if i % 2 == 0 and s[i] == "L":
    count += 1
    break
  elif i % 2 == 1 and s[i] == "R":
    count += 1
    break
    
print("Yes" if count == 0 else "No")

Measured memory_bytes: 2940
import Data.Bits
import Data.List
import Control.Monad
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as VM
import Data.Array
import Data.Array.MArray
import Data.Array.ST
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Lazy.Char8 as B
import Debug.Trace


main :: IO ()
main = do
  [a,b,c] <- map read.words <$> getLine :: IO [Int]
  print $ max 0 $ b+c-a

Measured memory_bytes: 508
#include <stdio.h>
#define X 36
 
typedef struct{
  char mark;
  int value;
  int order;
}trump;
 
int main()
{
  int N,i,minj,flag=1,j;
  trump C1[X],C2[X],temp;
 
  scanf("%d",&N);

  if(N>=1 && N<=36){
    for(i=0;i<=N-1;i++){
      while(1){
	scanf("%c",&C1[i].mark);
	if(C1[i].mark!='D' && C1[i].mark!='C' && C1[i].mark!='S' && C1[i].mark!='H'){
	  continue;
	}
	scanf("%d",&C1[i].value);
	break;
      }
      C1[i].order=i+1;
      C2[i]=C1[i];
    }
 
    for(i=0;i<=N-1;i++){
      for(j=N-1;j>=i+1;j--){
	if(C1[j].value < C1[j-1].value){
	  temp=C1[j];
	  C1[j]=C1[j-1];
	  C1[j-1]=temp;
	}
      }
    }
 
    for(i=0;i<N-1;i++){
      printf("%c%d ",C1[i].mark,C1[i].value);
    }
 
    printf("%c%d\n",C1[N-1].mark,C1[N-1].value);
 
    for(i=0;i<=N-1;i++){
      if(C1[i].value==C1[i-1].value && C1[i].order-C1[i-1].order<0){
	flag=0;
      }
    }
 
    if(flag==1){
      printf("Stable\n");
    }
    else{
      printf("Not stable\n");
    }
 
    flag=1;
 
    for(i=0;i<=N-1;i++){
      minj=i;
 
      for(j=i;j<=N-1;j++){
	if(C2[j].value < C2[minj].value){
	  minj=j;
	}
      }
      temp=C2[i];
      C2[i]=C2[minj];
      C2[minj]=temp;
    }
 
    for(i=0;i<N-1;i++){
      printf("%c%d ",C2[i].mark,C2[i].value);
    }
 
    printf("%c%d\n",C2[N-1].mark,C2[N-1].value);
 
    for(i=1;i<N;i++){
      if(C2[i].value==C2[i-1].value && C2[i].order-C2[i-1].order<0){
	flag=0;
      }
    }
 
    if(flag==1){
      printf("Stable\n");
    }
    else{
      printf("Not stable\n");
    }
  }

  return 0;
}

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

using namespace std;

#ifdef WIN32
	#define I64 "%I64d"
#else
	#define I64 "%lld"
#endif

typedef long long ll;

#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(s) s.begin(), s.end()
#define sz(s) (int(s.size()))
#define fname "a"
#define MAXN 200002

int X;
int n, k;
int r[MAXN];
int t[MAXN], a[MAXN];
vector <int> g[MAXN];

set < pair<int, int> > s;
vector <int> v;
int ans[MAXN];

int c[MAXN];

inline int getp(int v) {
	return c[v] == v ? v : c[v] = getp(c[v]);
}

inline void merge(int v1, int v2) {
	v1 = getp(v1);
	v2 = getp(v2);
	if (rand() & 1)
		c[v1] = v2;
	else
		c[v2] = v1;
}


int main()
{
	srand(time(0));
	#ifdef LOCAL
	freopen(fname".in", "r", stdin);
	freopen(fname".out", "w", stdout);
	#endif

	scanf("%d", &X);
	scanf("%d", &k);
	for (int i = 1; i <= k; ++i)
		scanf("%d", &r[i]);
	r[++k] = 2000000000;
	scanf("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", &t[i], &a[i]);
		int pos = upper_bound(r, r + k + 1, t[i]) - 1 - r;
		g[pos].pb(i);
		c[i] = i;
		s.insert({a[i], i});
	}

	int cur = 0;
	for (int i = 0; i < k; ++i) {
		if (i) {
			int timer = r[i] - r[i - 1];
			if (i & 1) {
				cur -= timer;
				v.clear();
				while(sz(s)) {
					pair <int, int> t = *s.begin();
					if (t.f + cur > 0) break;
					s.erase(s.begin());
					v.pb(t.s);
				}
				if (sz(v) > 0) {
					for (int j = 1; j < sz(v); ++j) {
						merge(v[j - 1], v[j]);
					}
					s.insert({-cur, getp(v[0])});
					a[getp(v[0])] = -cur;
				}
			} else {
				cur += timer;
				v.clear();
				while(sz(s)) {
					auto it = --s.end();
					pair <int, int> t = *it;
					if (t.f + cur < X) break;
					s.erase(it);
					v.pb(t.s);
				}
				if (sz(v) > 0) {
					for (int j = 1; j < sz(v); ++j) {
						merge(v[j - 1], v[j]);
					}
					s.insert({X - cur, getp(v[0])});
					a[getp(v[0])] = X - cur;
				}
			}
		}
/*		cout << "after reaching " << r[i] << endl;
		for (const auto& t : s) {
			cout << t.f + cur << ' ' << t.s << endl;
		}
		cout << endl;*/
		for (int j = 0; j < sz(g[i]); ++j) {
			int ind = g[i][j];
			int now = a[getp(ind)] + cur;
			int dif = t[ind] - r[i];
			if (i % 2 == 0) {
				ans[ind] = max(0, now - dif);
			} else {
				ans[ind] = min(X, now + dif);
			}
		}
		int ind = 5;
		int now = a[getp(ind)] + cur;
	}

	for (int i = 0; i < n; ++i)
		printf("%d\n", ans[i]);

	return 0;
}


Measured memory_bytes: 15612
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Code author: Saurabh Singhal
Code copy karne vaale tera muh kaala
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/

#include<bits/stdc++.h>
#define mp(a,b) make_pair(a,b)
#define pb push_back
#define ppb pop_back

using namespace std;
typedef long long int ll;
typedef vector<int> vi_t;
typedef vector<ll> vll_t;
int t=1;
vll_t a,b;
int  main(){
	// #ifndef ONLINE_JUDGE
 //    // for getting input from input.txt
 //    freopen("input.txt", "r", stdin);
 //    // for writing output to output.txt
 //    freopen("output.txt", "w", stdout);
	// #endif
    int h,w;
    cin>>h>>w;
    char grid[h][w];
    for(int i=0;i<h;i++){
    	for(int j=0;j<w;j++){
    		cin>>grid[i][j];
    	}
    }
    unordered_map<int,bool>row,column;
    for(int i=0;i<h;i++){
    	row[i]=false;
    }
    for(int i=0;i<w;i++){
    	column[i]=false;
    }
    for(int i=0;i<h;i++){
    	int count=0;
    	for(int j=0;j<w;j++){
    		if(grid[i][j]=='#'){
    			count++;
    			break;
    		}
    	}
    	if(count==0){
    		row[i]=true;
    		//cout<<"i="<<i<<endl;
    	}
    }
    for(int i=0;i<w;i++){
    	int count=0;
    	for(int j=0;j<h;j++){
    		if(grid[j][i]=='#'){
    			count++;
    			break;
    		}
    	}
    	if(count==0){
    		column[i]=true;
    		//cout<<"j="<<i<<endl;
    	}
    }
    for(int i=0;i<h;i++){
    	bool flag=false;
    	for(int j=0;j<w;j++){
    		if(!row[i]&&!column[j]){
    			cout<<grid[i][j];
    			flag=true;
    		}
    	}
    	if(flag){
    		cout<<endl;
    	}
    }
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <bitset>
#include <functional>
#include <queue>
#include <utility>
#include <map>
using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define dump(x)  cerr << #x << " = " << (x) << endl;
typedef long long LL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<string, PII> PSI;
typedef pair<vector<int>, vector<int>> PVV;
const int INF = 1 << 29;	// 十分大きい値にする, INT_MAX にしないのはオーバーフロー対策

const int MAX_N = 1e+5, MAX_M = 1e+5;
const int MOD = 1000000007;

void solve()
{
	const LL MAX_N = 2e+5;
	LL N;
	PLL tmp;
	LL current_time;
	bool flag = true;

	// 昇順ソート
	priority_queue<PLL, vector<PLL>, function<bool(PLL, PLL)>> que([](PLL a, PLL b) {return a.second > b.second; });

	cin >> N;
	FOR(i, 0, N) {
		cin >> tmp.first;
		cin >> tmp.second;
		que.push(tmp);
	}

	current_time = 0;
	FOR(i, 0, N) {
		tmp = que.top();
		que.pop();

		current_time += tmp.first;
		if (current_time > tmp.second) {
			flag = false;
			break;
		}
	}

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

int main(void)
{
	solve();

	return 0;
}


Measured memory_bytes: 6128
using System;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.IO.Pipes;
using System.Runtime.InteropServices;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            int a;
            a = int.Parse(Console.ReadLine());
            Console.WriteLine("{0}{1}","ABC",a);
        }

    }
}


Measured memory_bytes: 27436
N = int( input())
H = list( map( int, input().split()))
dp = [0]*N
dp[1] = abs(H[1]-H[0])
for i in range(2,N):
    dp[i] = min( dp[i-1]+abs(H[i]-H[i-1]), dp[i-2] + abs(H[i]-H[i-2]) )
print(dp[-1])


Measured memory_bytes: 13928
#include <math.h>

#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>

#define rep(inc, bgn, end) for (int inc = bgn; inc < end; ++inc)
#define repe(inc, bgn, end) for (int inc = bgn; inc <= end; ++inc)

using ll = long long;
using namespace std;

int main() {
    int k;
    cin >> k;

    if (k % 2 == 0 || k % 5 == 0) {
        cout << -1;
        return 0;
    }

    int cnt    = 1;
    ll num     = 7;
    bool isEnd = false;
    while (true) {
        if (num < k) {
        } else {
            num %= k;
            if (num == 0) {
                cout << cnt;
                return 0;
            }
        }
        // 後処理
        cnt++;
        num = num * 10 + 7;
    }
    return 0;
}


Measured memory_bytes: 3608
#include<bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define int long long
using namespace std;
static const int inf =1ll<<60;
typedef pair<int,int> pii;

string s;
string ans;

signed main(){
    cin>>s;
    for(int i=0;i<s.size();++i){
        if(s[i]=='B'){
            if(ans.empty())continue;
            ans.erase(--ans.end());
        }
        else ans+=s[i];
    }
    cout<<ans<<endl;
}



Measured memory_bytes: 256
//ITP1_2_A
#include<bits/stdc++.h>
using namespace std;
int main(void){
  int a = 0;
  int b = 0;
while(cin >> a >> b){
if(a == b)
cout << "a" << " == " << "b" << "\n" ;
if(a < b)
cout << "a" << " < " << "b" << "\n";
if(a > b)
cout << "a" << " > " << "b" << "\n";


}


    return 0;
}


Measured memory_bytes: 3064
import java.io.*;

public class Main{
  public static void main(String[] args) throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] line = br.readLine().split(" ");
    int[] nums = new int[3];
    for(int i=0; i<3; i++)
      nums[i] = Integer.parseInt(line[i]);
    System.out.println(Math.max(nums[2]-(nums[0]-nums[1]), 0));
  }
}


Measured memory_bytes: 21072
import numpy as np

N,M=map(int,input().split())

A=[list(map(int,list(input().replace('.','0').replace('#','1')))) for _ in range(N)]
B=[list(map(int,list(input().replace('.','0').replace('#','1')))) for _ in range(M)]

A,B=map(np.array,(A,B))

for i in range(N-M+1):
  for j in range(N-M+1):
    if (A[i:i+M,j:j+M] == B).all():
      print('Yes')
      exit()

print('No')

Measured memory_bytes: 27088
###==================================================
### import
#import bisect
#from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

N = iIn()
A = iInLH()

A.sort(reverse=True)

ans = 0
for i in range(1, N):
    ans += A[i//2]

print(ans)

Measured memory_bytes: 93712
#include<bits/stdc++.h>
using namespace std ;
#define IOS         ios_base::sync_with_stdio(false);   cin.tie(NULL);
#define FOR(i,n)     for(ll i=0;i<n;i++)
#define REP(i,k,n)  for(ll i=k;i<n;i++)
#define nl         "\n"
#define BUFFER         cin.ignore(numeric_limits<streamsize>::max(),'\n');
#define SORT        sort(a,a+n);
#define mod         1000000007
#define pb          push_back
typedef long long ll;
bool d(const pair<int,int> &a, 
                   const pair<int,int> &b) 
{ 
       return a.second>b.second; 
} 
int main()
{
    ll t;
    cin>>t;
    cout<<t*t<<nl;
return 0;
}


Measured memory_bytes: 256
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int []array=new int[n];
		int goukei_a=0,goukei_b=0;
		for (int i = 0; i < n; i++) {
			array[i]=scan.nextInt();
			goukei_a+=array[i];
		}
		for(int i=0;i<n;i++){
			goukei_b+=array[i];
			goukei_a-=array[i];
			array[i]=goukei_a-goukei_b;
			if(array[i]<0){
				array[i]=-1*array[i];
			}

		}
		Arrays.sort(array);
		System.out.println(array[0]);

	}

}

Measured memory_bytes: 23892
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools


import queue
from collections import deque


parent_data = []

def union(ind):
    global parent_data
    if parent_data[ind] != ind:
        parent_data[ind] = union(parent_data[ind])
    return parent_data[ind]


def main():
    node_num, edge_num = map(int, input().split())
    cost_data = list(map(int, input().split()))
    data = [list(map(int, input().split())) for i in range(edge_num)]

    global parent_data
    parent_data = [i for i in range(node_num)]

    for i in range(edge_num):
        a, b = data[i]
        parent_a = union(a)
        parent_b = union(b)
        parent_data[min(parent_a, parent_b)] = max(parent_a, parent_b)

    parent_count = defaultdict(int)
    cost_heap = defaultdict(list)
    for i in range(node_num):
        parent_i = union(i)
        parent_count[parent_i] += 1
        heapq.heappush(cost_heap[parent_i], (cost_data[i], parent_i))

    parent_count = list(sorted(parent_count.items(), key=lambda x:-x[1]))

    ans = 0
    ori_ind, ori_count = parent_count[0]

    for i in range(len(parent_count) - 1):
        now_ind, now_count = parent_count[i + 1]
        if len(cost_heap[ori_ind]) == 0:
            print('Impossible')
            sys.exit()
        ori_cost, o_ind = heapq.heappop(cost_heap[ori_ind])
        now_cost, n_ind = heapq.heappop(cost_heap[now_ind])
        ans += ori_cost + now_cost

        if len(cost_heap[n_ind]) > 0:
            a, b = heapq.heappop(cost_heap[n_ind])
            heapq.heappush(cost_heap[ori_ind], (a, b))
        if len(cost_heap[o_ind]) > 0 and o_ind != ori_ind:
            a, b = heapq.heappop(cost_heap[o_ind])
            heapq.heappush(cost_heap[ori_ind], (a, b))

    print(ans)



if __name__ == '__main__':
    main()


Measured memory_bytes: 132324
#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
using namespace std;

#define N  100005

void solve()
{
	int n;
	cin>>n;
	set<int> s;
	rep(i,0,n){
		int x;
		cin>>x;
		s.insert(x);
	}	
	if(s.size()==n)
		cout<<"YES";
	else
		cout<<"NO";
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int TESTS=1;
//	cin>>TESTS;
	while(TESTS--)
	{
		solve();
	}
	return 0;
}

Measured memory_bytes: 9600
// -*- coding:utf-8-unix -*-

use std::cmp;
use proconio::input;
// ABC086C - Traveling
// https://atcoder.jp/contests/abs/fasks/arc089_a

fn main() {
/*     input! {
        n: usize,
        mut plan: [(i32, i32, i32); n],  // Vec<(i32, i32, i32)>
    }
 */
    input! {
        n: usize,
        m: usize,
        x: usize,
        cs: [(u32,[usize;m]);n],
    }

    let mut result = u32::max_value();
    for i in 0..(1 << n) { //nの買う買わない全パターンを回す。
        let mut c = 0;
        let mut tot_a = vec![0;m];
        for (j,ca) in cs.iter().enumerate(){
            if (i >> j) & 1 == 1 {
                c += ca.0;
                for (k, a) in ca.1.iter().enumerate(){
                    tot_a[k] += a;
                }
            }
        }
        if tot_a.iter().all(|y| *y >= x ) {
            result = cmp::min(result, c);
        }
    }
    if result == u32::max_value() {
        println!("-1");
    } else {
        println!("{}",result);
    }
}


Measured memory_bytes: 2196
// Matching
// Problem link : https://atcoder.jp/contests/dp/tasks/dp_o
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <unordered_map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <deque>
#include <bitset>
#include <climits>
#include <cstdio>
#include <list>
#include <iomanip>
using namespace std;

#define ll long long int
#define mp make_pair
#define pb push_back
#define fi first
#define si second
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL);
#define F(a,n) for(int i=0;i<n;i++){cin>>a[i];}
#define F1(a,n) for(int i=1;i<=n;i++){cin>>a[i];}
#define P(a,n) for(int i=0;i<n;i++){cout<<a[i]<<' ';}cout<<endl;
#define P1(a,n) for(int i=1;i<=n;i++){cout<<a[i]<<' ';}cout<<endl;
#define NF(a,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++){cin>>a[i][j];}}
#define NF1(a,n,m) for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){cin>>a[i][j];}}
#define PNF(a,n,m) for(int i=0;i<n;i++){for(int j=0;j<m;j++){cout<<a[i][j]<<' ';}cout<<endl;}cout<<endl;
#define PNF1(a,n,m) for(int i=1;i<=n;i++){for(int j=1;j<=m;j++){cout<<a[i][j]<<' ';}cout<<endl;}cout<<endl;
#define AS 200001
#define mod 1000000007
ll n;
ll comp[ 25 ][ 25 ];
ll dp[ 25 ][ (1<<21) ];

ll Solve(ll i, ll womens){
	// Base case
	if(i == n){
		return womens == 0;
	}
	if(dp[i][womens] != -1)
		return dp[i][womens];
	// recursive case
	ll ans = 0;
	for(ll w = 0 ; w < n ; w ++){
		bool available = womens&(1<<w);
		if(available and comp[i][w]){
			ans = (ans + Solve(i+1,womens&(~(1<<w))))%mod;
		}
	}
	return dp[i][womens] = ans;
}

int main(){
	fastIO
	cin>>n;
	NF(comp,n,n);
	memset(dp,-1,sizeof dp);
	cout<<Solve(0,(1<<n)-1)<<endl;

	return 0;
}


Measured memory_bytes: 409856
#include <iostream>

using namespace std;

int main()
{
    ios_base::sync_with_stdio(0);
    for (int i = 0; i < 5; ++i)
    {
        int x;
        cin >> x;
        if (x == 0)
        {
            cout << i + 1;
            return 0;
        }
    }
}


Measured memory_bytes: 3644
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <tuple>
#include <cmath>
#include <iomanip>
#include <map>
#include <cstring> //memset(dp,0,sizeof(dp))
#include <functional>
#include <cctype>
#include <locale>
#define ll long long
#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(),(a).end()
using namespace std;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
typedef pair<int,int> P;
typedef pair<long long,long long> Pll;
#define fout(num) cout << fixed << setprecision(20) << (num) << endl
//s[i]=tolower(s[i]); islower(s[i]); cout << tolower(s[i])はバグ
//vector<vector<ll>> dp(n,vector<ll>(n))
//exist x map o setconst ll MOD = 1e9+7;return fac[n]*(finv[k]*finv[n-k] % MOD) % MOD;

signed main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int h,w,k; cin >> h >> w >> k;
    char c[h][w];
    int ans=0;
    rep(i,h)rep(j,w) cin >> c[i][j];
    rep(i,1<<h){
        rep(j,1<<w){
            char res[h][w];
            rep(a,h)rep(b,w)res[a][b]=c[a][b];
            rep(a,h){
                if(i&(1<<a)){
                    rep(b,w)res[a][b]='A';
                }
            }
            rep(a,w){
                if(j&(1<<a)){
                    rep(b,h)res[b][a]='A';
                }
            }
            int cnt=0;
            rep(a,h)rep(b,w)if(res[a][b]=='#')cnt++;
            if(cnt==k)ans++;
        }
    }
    cout << ans << endl;
}



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

int main() {
  int n;
  cin >> n;
  vector<int> s(n);
  int sum = 0;
  int flag = 1;
  for (int i = 0; i < n; i++) {
    cin >> s.at(i);
    sum += s.at(i);
    if (s.at(i) % 10 != 0) flag = 0;
  }
  if (flag) {
    cout << 0;
    return 0;
  }

  sort(s.begin(), s.end());

  for (int i = 0; i < n; i++) {
    if (sum % 10 == 0) {
      if (s.at(i) % 10 == 0) {
        continue;
      } else {
        sum -= s.at(i);
      }
    } else {
      break;
    }
  }

  cout << sum;
}


Measured memory_bytes: 256
import math
def resolve():
    A,B,H,M = map(int,input().split())

    mins = H*60 + M

    degHo = mins / (12*60) * 360
    degMi = M / 60 * 360

    
    diff = abs(degHo - degMi)

    diff = min(diff,360-diff)

    ans = math.pow(A,2) + math.pow(B,2) - 2*A*B*math.cos(math.radians(diff))
    print(math.sqrt(ans))



resolve()

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

int main(){
  char b;
  cin>>b;
  if(b=='A')cout<<'T'<<endl;
  if(b=='G')cout<<'C'<<endl;
  if(b=='C')cout<<'G'<<endl;
  if(b=='T')cout<<'A'<<endl;
  
}

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

using namespace std;

int main()
{
    stack<int>stk;

    int n;

    cin>>n;
    stk.push(n);

    cin>>n;

    stk.push(n);

        int k=stk.top();
        k=k*2;
        stk.pop();
        int m=stk.top();

        cout<<k-m<<endl;

}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define pr printf
#define sc scanf
#define pb push_back

using namespace std;

typedef long long ll;
typedef pair<int, int> ii;
typedef long double ld;
int n;
map<string, int> ma; 
int main () {
    cin >> n;
    ll resp = 0LL;
    for(int i = 0; i < n; i++) {
        string s;
        cin >> s;
        sort(s.begin(), s.end());
        if(ma.count(s)) {
            resp += ma[s];
            ma[s]++;
        } else {
            ma[s] = 1;
        }
    }
    pr("%lld\n", resp);
    return 0;
}


Measured memory_bytes: 11192
#include <stdio.h>

int main(void){
  char s[4];
  scanf("%s", s);
  if(s[0] == s[1]){
    int count = 0;
    if(s[0] == s[2]) count ++;
    if(s[0] == s[3]) count ++;
    if(count == 0 && s[2] == s[3]){
      printf("Yes");
    }else{
      printf("No");
    }
  }else{
    int count1 = 0;
    int count2 = 0;
    if(s[0] == s[2]) count1 ++;
    if(s[0] == s[3]) count1 ++;
    if(s[1] == s[2]) count2 ++;
    if(s[1] == s[3]) count2 ++;
    if(count1 == 1 && count2 == 1){
      printf("Yes");
    }else{
      printf("No");
    }
  }
  return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
#include<queue>
#include<stack>
#include<climits>
#include<set>
#include<utility>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD=1e9+7;

int main(){

	char s[101];
	int n, ans=1e9, k;
	cin >> s;
	n=strlen(s);
	for(int i=0; i<26; i++){
		int c=0;
		for(int j=0; j<n; j++){
			for(k=0; j+k<n; k++){
				if(s[j+k]-'a'==i){
					c=max(c, k);
					break;
				}
			}
			if(j+k==n){
				c=max(c, k);
			}
		}
		ans=min(ans, c);
	}
	cout << ans << endl;

	return 0;
}


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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
 ll gcd(ll a,ll b){
 if(b == 0) return a;
 return gcd(b,a%b);
 }

//最小公倍数
 ll lcm(ll a,ll b){
 ll g = gcd(a,b);
 return a / g * b; // Be careful not to overflow  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

#define INF 1LL<<60



  int main(){
    string S;
    cin >> S;
    string target = "CODEFESTIVAL2016";
    int cnt;
    REP(i, S.size()){
      if(S.at(i) != target.at(i)) cnt++;
    }
    print(cnt);
  }


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

using namespace std;

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

    string s;
    cin >> s;
    stack<char> st;

    for (char c : s) {
        if (st.empty())
            st.push(c);
        else if (st.top() == c)
            st.push(c);
        else
            st.pop();
    }

    cout << s.size() - st.size() << "\n";

    return 0;
}

Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;

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

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

int main() {
  string S;
  cin >> S;
  string T;
  cin >> T;

  int N = S.size();

  vector<vector<int>> S_alph(26);
  vector<vector<int>> T_alph(26);

  rep(i, N) {
    S_alph[S[i] - 'a'].pb(i);
    T_alph[T[i] - 'a'].pb(i);
  }

  vector<bool> S_watched(26, false);
  rep(i, N) {
    if (S_watched[S[i] - 'a'] == true) {
      continue;
    }

    S_watched[S[i] - 'a'] = true;
    bool accord = true;
    if (S_alph[S[i] - 'a'].size() != T_alph[T[i] - 'a'].size()) {
      accord = false;
    } else {
      rep(j, S_alph[S[i] - 'a'].size()) {
        if (S_alph[S[i] - 'a'][j] != T_alph[T[i] - 'a'][j]) {
          accord = false;
        }
      }
    }
    if (accord == false) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}

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

const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

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

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

vector<pair<int,int>> prime_factorization(int N) {
    vector<pair<int,int>> res;
    for(ll i = 2; i * i <= N; i++) {
        if(N % i == 0) {
            ll ex = 0;
            while(N % i == 0) {
                ex++;
                N /= i;
            }
            res.push_back(make_pair(i,ex));
        }
    }
    if(N != 1) res.push_back(make_pair(N,1));
    return res;
}

int main() {
    COMinit();
    int N,M; cin >> N >> M;
    vector<pair<int,int>> res = prime_factorization(M);
    ll ans = 1;
    for(auto prime:res) {
        //cout << prime.first << " " << prime.second << endl;
        //cout << COM(prime.second+N-1,prime.second) << endl;
        ans *= COM(prime.second+N-1,prime.second);
        ans %= MOD;
    }
    cout << ans << endl;
}

Measured memory_bytes: 12160
(n,m),*l=[list(map(int,s.split()))for s in open(0)];d=[0]*2+[9e99]*n
for i in range(n*2):
 for a,b,c in l:
  if d[b]>d[a]-c:d[b]=[d[a]-c,-9e99][i>n]
 if i==n:x=d[n]
print([-x,'inf'][d[n]!=x])

Measured memory_bytes: 42972
q=int(input())
import math
import numpy as np
def is_prime(n):
    if n==1:return False
    for k in range(2,int(math.sqrt(n))+1):
        if n%k==0:
            return False
    return True
def is_is_prime(n):
    an=0
    if is_prime((n+1)//2)==True:
        if is_prime(n)==True:
            an=1
    return an
ko=[]
for i in range(1,10**5,2):
    ko.append(is_is_prime(i))

koko=np.cumsum(ko)

for i in range(q):
    l,r=map(int,input().split()) 
    if l==1:
        ans=koko[(r-1)//2]-koko[(l-1)//2]
    else:
        ans=koko[((r-1)//2)]-koko[((l-1)//2)-1]
    print(ans)
    
    
    

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

int main()
{
    int a,b,c,x,y;
    x = 0;
    y = 0;
    cin >> a >> b >> c;
    for (x=a; x<= b; x++)
    {
        if (c % x == 0)
        {
            y++;
        }
    }
    cout << y << endl;
    return 0;
}


Measured memory_bytes: 3080
#include <iostream>
#include <bits/stdc++.h>
#include <vector>
#include <utility>
#include <string>
#include <math.h>
#include <algorithm>
#include <cstring>
#include <cctype>

typedef long long int ll;
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素


using namespace std;

int main() {
   
   int N,K;
   cin >> N >> K;
   vector <int> A;
   int p;
   REP(i,N){
      cin >> p;
      A.PB(p);
   }
   sort(ALL(A));

   p=0;
   REP(i,K){
      p+=A[i];
   }
   cout << p << endl;

}

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

using namespace std;

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

#define each(i,a) for (auto&& i : a)
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define chmin(x,v) x = min(x, v)
#define chmax(x,v) x = max(x, v)

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    each(x,vec) is >> x;
    return is;
}
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
    rep(i,vec.size()) {
        if (i) os << " ";
        os << vec[i];
    }
    return os;
}
template<typename T>
ostream& operator<<(ostream& os, const vector< vector<T> >& vec) {
    rep(i,vec.size()) {
        if (i) os << endl;
        os << vec[i];
    }
    return os;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll s, c; cin >> s >> c;
    ll ans = min(s, c/2);
    c -= ans*2;
    ans += c/4;
    cout << ans << endl;
}


Measured memory_bytes: 256
n, k = map(int, input().split())
s = 0
for i in range(k, n+2):
  min_sum = i*(i-1)//2
  max_sum = n*(n+1)//2 - (n-i)*(n-i+1)//2
  s += (max_sum - min_sum + 1) % 1000000007

print(s% 1000000007)

Measured memory_bytes: 9176
import java.util.Arrays;
import java.util.Scanner;

class Main{
	static final long MOD = 1000000007;

	static int H, W, K;
	static long[][] dp = new long[110][10];
	static int ans = 0;
	static int n = 0;


	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);			//文字の入力
		int n = sc.nextInt();

		if(n == 25){
			System.out.println("Christmas");
		}else if(n == 24){
			System.out.println("Christmas Eve");

		}else if(n ==23){
			System.out.println("Christmas Eve Eve");

		}else{
			System.out.println("Christmas Eve Eve Eve");

		}
			
				
	}

}







class Pair implements Comparable{
	int from;		//p
	int end;		//y
	int num;
	int bango;
	@Override
	public int compareTo(Object other) {
		Pair otherpair = (Pair)other;

		return end - otherpair.end;
	}
}


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

// Function Macros:
#define rep(i, n) for(int(i) = 0; (i) < (n); (i)++)
#define all(v) (v).begin(), (v).end()
#define setpre(n) cout << fixed << setprecision(n)

// Type / Class / Struct Definitions:
using namespace std;

using ll = long long;
using ull = unsigned long long;

// Constants:
const int INF = (1ll << 30) - 1;  // approx 1.07e9
const ll INFLL = 1ll << 60;       // approx 1.15e18
const int MOD = 1e9 + 7;          // 998244353
const long double EPS = 1.0e-14;

// Global Variables:

// Prototype Declarations:
int gcd(int, int);
template <class T>
inline bool chmin(T&, T);
template <class T>
inline bool chmax(T&, T);

// ================ Main Loop ================
int main() {
    ll n;
    cin >> n;
    n--;
    string s;
    while(1) {
        s += (n % 26 + 'a');
        if(n < 26) break;
        n /= 26;
        n--;
    }
    for(int i = s.size() - 1; i >= 0; i--) {
        cout << s[i];
    }
    cout << endl;
    return 0;
}
// ===========================================

// Functions:
int gcd(int a, int b) {
    return b ? gcd(b, a % b) : a;
}

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

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


Measured memory_bytes: 3628
#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 all(n) begin(n), end(n)
struct cww
{
    cww()
    {
        ios::sync_with_stdio(false);
        cin.tie(0);
    }
} star;
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<char> vchar;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef unsigned long long ull;

int main()
{
    ll N, K, sum = 0;
    cin >> N >> K;
    vll H(N);
    rep(i, N)
    {
        cin >> H[i];
    }
    sort(all(H));
    rep(i, N - K)
    {
        sum += H[i];
    }
    cout << sum;
    return 0;
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define MAX 100005
#define ll long long
#define upperlimit 1000100
#define INF 1e18
#define eps 1e-8
#define endl '\n'
#define pcc pair<char,char>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++)
#define MOD 1000000007
#define slld(t) scanf("%lld",&t)
#define sd(t) scanf("%d",&t)
#define pd(t) printf("%d\n",t)
#define plld(t) printf("%lld\n",t)
#define mp(a,b) make_pair(a,b)
#define FF first
#define SS second
#define pb(x) push_back(x)
#define vi vector<int>
#define clr(a) memset(a,0,sizeof(a))
#define debug(a) printf("check%d\n",a)
#define csl ios::sync_with_stdio(false);cin.tie(0);
#define fi(a,b,c) for(int i=a;i<b;i=i+c)
#define fj(a,b,c) for(int j=a;j<b;j+=c)
using namespace std;
 
ll gcd(ll n1,ll n2) {
	if(n1%n2==0)return n2;
	return gcd(n2,n1%n2);
}
ll powmod(ll base,ll exponent) {
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%MOD;
		base=(base*base)%MOD;
		exponent/=2;
	}
	return ans;
}
ll max(ll a,ll b,ll c) {
	return max(a,max(b,c));
}
int max(int a,int b,int c) {
	return max(a,max(b,c));
}

int main()
{
	int n;
	sd(n);
	vi dp,a;
	for(int i=0;i<n;i++){
		int ai;
		sd(ai);
		a.pb(ai);
		if(i==0){
			dp.pb(0);
		}else if(i==1){
			dp.pb(abs(a[1]-a[0]));
		}else{
			dp.pb(min(dp[i-1]+abs(a[i]-a[i-1]), dp[i-2]+abs(a[i]-a[i-2])));
		}
	}
	pd(dp[n-1]);
}

Measured memory_bytes: 1276
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <complex>

#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

#include <stdexcept>

using namespace std;

// type alias
using ll = long long;
using ull = unsigned long long;
using comp = complex<double>;

const ll MOD = 1000000007LL;
const double PI = 3.14159265358979323846;

//conversion
//------------------------------------------
inline int toint(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class t> inline string tostring(t x) { ostringstream sout; sout << x; return sout.str(); }

//debug
#define DUMP(x)  cerr << #x << " = " << (x) << endl
#define DEBUG(x) cerr << #x << " = " << (x) << " (l" << __line__ << ")" << " " << __file__ << endl

// functions and classes
using Edge = pair<ll, ll>;

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

	ll N, K;
	cin >> N >> K;

	ll zero_count = 0;
	vector<ll> pas, nas;
	pas.reserve(N);
	nas.reserve(N);
	ll a;
	for (ll i = 0; i < N; ++i)
	{
		cin >> a;
		if (a > 0LL){
			pas.emplace_back(a);
		}
		else if (a < 0LL) {
			nas.emplace_back(-a);
		}
		else{
			++zero_count;
		}
	}
	sort(pas.begin(), pas.end());
	sort(nas.begin(), nas.end());

	ll low = 0LL;
	ll high = 1000000000000000000LL;
	ll mid = (low + high) / 2LL;
	ll val;
	if (K <= pas.size() * nas.size()) {
		K = pas.size() * nas.size() + 1 - K;

		while(high - low > 1) {
			ll res = 0;
			for (ll i = 0; i < pas.size(); ++i){
				res += distance(nas.begin(), upper_bound(nas.begin(), nas.end(), mid / pas[i]));
			}

			if (K <= res) {
				high = mid;
			}
			else {
				low = mid;
			}
			mid = (low + high) / 2LL;
		}

		val = - high;
	}
	else if (K <= pas.size() * nas.size() + zero_count * (zero_count - 1LL) / 2LL + zero_count * (pas.size() + nas.size()) )
	{
		val = 0;
	}
	else {
		K -= pas.size() * nas.size() + zero_count * (zero_count - 1LL) / 2LL + zero_count * (pas.size() + nas.size());

		while (high - low > 1) {
			ll res = 0;
			for (auto iter = pas.begin(); iter != pas.end(); ++iter) {
				res += distance(pas.begin(), upper_bound(pas.begin(), iter, mid / *iter));
			}
			for (auto iter = nas.begin(); iter != nas.end(); ++iter) {
				res += distance(nas.begin(), upper_bound(nas.begin(), iter, mid / *iter));
			}

			if (K <= res) {
				high = mid;
			}
			else {
				low = mid;
			}
			mid = (low + high) / 2LL;
		}

		val = high;
	}
	cout << val << endl;;

	return 0;
}


Measured memory_bytes: 1664
//Polygon.java
import java.util.Scanner;
class Main
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int l[]=new int[n];
		for(int i=0; i<n; i++){
            l[i]=sc.nextInt();
        }
        int sum=0;
        int ans=0;
        int max=l[0];
        for(int i=0; i<n; i++){
                if(l[i]>max){
                    max=l[i];
                }
        }  
        
        for(int i=0; i<n; i++){
            ans+=l[i];
        }
        sum=ans-max;
        //System.out.println(ans);
        //System.out.println(sum);
        if(sum>max){
            System.out.println("Yes");
        }
        else{
            System.out.println("No");
        }
        sc.close();
    }
}

Measured memory_bytes: 22996
#include <stdio.h>
#include <string.h>

int main(){
    int n,m;scanf("%d %d",&n,&m);
    int a[30]={0};
    int ans=0;
    for(int i=0;i<n;i++){
        int k;
        scanf("%d",&k);
        for(int j=0;j<k;j++){
            int l;
            scanf("%d",&l);
            a[l-1]+=1;
        }   
    }   
    for(int i=0;i<m;i++){
        ans+=(a[i]==n)?1:0;
    }   
    printf("%d",ans);
    return 0;
}   


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> pi;
typedef pair<ll, ll> pll;
#define fi first
#define se second
#define pb push_back
#define ppb pop_back

int main() {
  ll ans[10010]={};
  for (ll i=1;i<=100;++i) {
    for (ll j=1;j<=100;++j) {
      for (ll k=1;k<=100;++k) {
        ll m = (i+j)*(i+j)+(i+k)*(i+k)+(j+k)*(j+k);
        if (m<=20000) ++ans[m/2];
      }
    }
  }
  ll n;
  cin >> n;
  for (ll i=1;i<=n;++i) {
    cout << ans[i] << endl;
  }
  return 0;
}

Measured memory_bytes: 3644