akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG

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

  sort(a, a + sizeof(a) / sizeof(a[0]));

  unsigned long long ans = a[0];
  unsigned long long cmp = 1000000000000000000;

  bool flag = true;

  for (int i = 1; i < n; i++)
  {
    if (ans > cmp / a[i])
    {
      cout << "-1" << endl;
      flag = false;
      break;
    }
    else
    {
      ans *= a[i];
    }
  }

  if (flag)
    cout << ans << endl;
}


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

int main()
{
    int n,s=0;
    scanf("%d",&n);
    if(n<=9)  s=n;
    else if(n>9&&n<100)  s=9;
    else if(n>=100&&n<=999) s=9+(n-100)+1;
    else if(n>999&&n<10000)  s=9+900;
    else if(n>=10000&&n<=99999)    s=9+900+(n-10000)+1;
    else s=9+900+90000;
    printf("%d",s);
}


Measured memory_bytes: 256
#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>  

#pragma warning(disable:4996)  
#pragma comment(linker, "/STACK:336777216")  
using namespace std;

#define mp make_pair  
#define all(x) (x).begin(), (x).end()  
#define ldb ldouble

typedef tuple<int, int, int> t3;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <db, db> pdd;

int IT_MAX = 1 << 17;
const ll MOD = 1000000007;
const int INF = 0x3f3f3f3f;
const ll LL_INF = 0x1f3f3f3f3f3f3f3f;
const db PI = acos(-1);
const db ERR = 1e-10;

int main() {
	ll A, B, C;
	scanf("%lld %lld %lld", &A, &B, &C);

	for (int i = 0; i <= 10000; i++) {
		if (A % 2 || B % 2 || C % 2) return !printf("%d\n", i);
		ll a = (B + C) / 2, b = (A + C) / 2, c = (A + B) / 2;
		A = a, B = b, C = c;
	}
	return !printf("-1\n");
}

Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <limits>

int main() {
    int A, B, C, X, Y;
    std::cin >> A >> B >> C >> X >> Y;

    int ret = std::numeric_limits<int>::max();
    const int max_c = 2 * std::max(X, Y);
    for (int c = 0; c <= max_c; ++c) {
        const int c_half = c / 2;
        const int a = std::max(X - c_half, 0);
        const int b = std::max(Y - c_half, 0);
        const int total = A*a + B*b + C*c;

        ret = std::min(ret, total);
    }

    std::cout << ret << std::endl;
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main()
{
	int n, p, t, i;
	while (1)
	{
		p = 0;
		t = 0;
		while (1)
		{
			cin >> n;
			if (n == 0) return 0;
			if (2 <= n && n <= 9)
				p += n;
			else if (n >= 10)
				p += 10;
			else
			{
				t++;
				p++;
			}
			if (cin.get() == '\n')
				break;
		}
		for (i = 0; i < t; i++)
		{
			if (p + 10 <= 21)
				p += 10;
		}
		if (p > 21)
		{
			p = 0;
		}
		cout << p << endl;
	}
}

Measured memory_bytes: 0
#include<iostream>
#include<stdio.h>
using namespace std;
int shunxu[100100];
int main(){
	int n;scanf("%d",&n);
	for(int i=1;i<=n;i++){
		int a;scanf("%d",&a);
		shunxu[a]=i;
	}
	for(int i=1;i<n;i++){
		printf("%d ",shunxu[i]);
	}
	printf("%d\n",shunxu[n]);
	return 0;
}

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

map<string,set<int> > mp;

string random2(){
	string w;
	for(int i = 0 ; i < 100 ; i++)
		w += rand() % 26 + 'a';
	return w;
}

string itos(int n){
	stringstream ss;
	ss << n;
	return ss.str();
}
bool inte(string s){
	return '0' <= s[0] && s[0] <= '9';
}
bool ope(string s){
	return s == "+" || s == "*" || s == "/" || s == "-";
}
bool var(string s){
	return !inte(s) && !ope(s);
}
set<int> val(string s){
	if( inte(s) ) return set<int>{atoi(s.c_str())};
	return mp[s];
}
set<int> operator + (set<int> a,set<int> b){
	set<int> C;
	for( auto A : a ){
		for( auto B : b ){
			C.insert((A+B)%256);
		}
	}
	return C;
}
set<int> operator / (set<int> a,set<int> b){
	set<int> C;
	for( auto A : a ){
		for( auto B : b ){
			C.insert((A/B)%256);
		}
	}
	return C;
}

set<int> operator * (set<int> a,set<int> b){
	set<int> C;
	for( auto A : a ){
		for( auto B : b ){
			C.insert((A*B)%256);
		}
	}
	return C;
}

set<int> operator - (set<int> a,set<int> b){
	set<int> C;
	for( auto A : a ){
		for( auto B : b ){
			C.insert((A-B+256)%256);
		}
	}
	return C;
}



bool calc(vector<string> e){
	stack<string> s;
	for( int i = 0 ; i < e.size() ; i++){
	  if( inte(e[i]) ){
		s.push(e[i]);
	  }
	  if( var(e[i]) ){
		s.push(e[i]);
	  }
	  if( ope(e[i]) ){
		string b = s.top(); s.pop();
		string a = s.top(); s.pop();
		set<int> B = val(b);
		set<int> A = val(a);
		set<int> R;
		if( e[i] == "+" ){
			R = A+B;
		}else if( e[i] == "-" ){
			R = A-B;
		}else if( e[i] == "*" ){
			R = A*B;
		}else if( e[i] == "/" ){
			if( B.count(0) ) return 0;
			R = A/B;
		}
		string name = random2();
		mp[name] = R;
		s.push(name);
	  }
	}
	return 1;
}

int main(){
	int m;
	cin >> m;
	for(int i = 0 ; i < m ; i++){
		string s;
		int x,y;
		cin >> s >> x >> y;
		for(int j = x ; j <= y ; j++) mp[s].insert(j);
	}
	int n;
	cin >> n;
	vector<string> e;
	for(int i = 0 ; i < n ; i++){
		string s;
		cin >> s;
		e.push_back(s);
	}
	
	if( calc(e) ){
		cout << "correct" << endl;
	}else{
		cout << "error" << endl;
	}
}

Measured memory_bytes: 1696
from collections import Counter, deque
# import copy
# from fractions import gcd
# from functools import reduce
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
# import numpy as np
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline

def resolve():
    N=int(input())
    A=list(map(int,input().split()))

    AA=Counter(A)
    ans=0
    for k,v in AA.items():
        if v-k>=0:
            ans+=v-k
        else:
            ans+=v
    print(ans)
resolve()

Measured memory_bytes: 68136
// 2020/07/13 Tazoe

#include <iostream>
using namespace std;

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

	int M = 1;		// 現在の値
	while(M*2<=N){		// Nを超えないならば
		M *= 2;
	}

	cout << M << endl;

	return 0;
}



Measured memory_bytes: 3112
//的場梨沙★担当
//結城晴★副担当
//日野茜★副担当
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string.h>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <stdio.h>


using namespace std;

int main(void) {
    int N,M;
    cin>>N>>M;
    if(N<=M){
        cout<<"unsafe"<<endl;
    }else{
        cout<<"safe"<<endl;
    }
}


Measured memory_bytes: 3636
#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  long long ret = 0;
  while (true) {
    bool flag = false;
    for (int i = 0; i < n; i++) {
      if (a[i] >= n) {
        flag = true;
        long long d = a[i] / n;
        ret += d;
        for (int j = 0; j < n; j++) a[j] += d;
        a[i] -= d * (n + 1);
      }
    }
    if (!flag) break;
  }
  cout << ret << '\n';
  return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<ctime>
#include <utility>

using namespace std;

#define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++)
#define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--)
#define ALL(x) x.begin(),x.end()
#define RALL(x) x.rbegin(),x.rend()
typedef long long int ll;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<bool> vb;

ll a = 0, n = 0, m = 0, k = 0, ans = 0, sum = 0, cnt = 0;
//string s;
//char c;
bool flag;

//----------------------------------------------------------------------

typedef struct {
  ll s;
  ll t;
  ll c;
  bool rec;
}program;

bool cmp(const program& p1, const program& p2) {
  return p1.s < p2.s;
}

pair<ll, ll> ch[40];

int main(void) {
  ll x, y, z, time;
  vector<program> prog;
  program p;
  ll num = 0, temp = 0;

  cin >> n >> a;

  FOR(i, 0, n) {
	cin >> x >> y >> z;
	p = { x, y, z, false };
	prog.push_back(p);
  }

  sort(ALL(prog),cmp);

  while(n > num) {
	time = prog[num].s;
	cnt = 0;
	temp = 0;

	FOR(i, 0, a) {
	  if (ch[i].first < time) {
		ch[i].first = 0;
		ch[i].second = 0;
	  }
	}

	for (ll i = num;i < n && prog[i].s == time;i++) {
	  FOR(j, 0, a) {
		if (ch[j].second == prog[i].c) {
		  ch[j].first = prog[i].t;
		  prog[i].rec = true;
		  cnt++;
		  break;
		}
	  }
	}

	for (ll i = num;i < n && prog[i].s == time;i++) {
	  FOR(j, 0, a) {
		if (ch[j].first < prog[i].s && flag == false) {
		  ch[j].first = prog[i].t;
		  ch[j].second = prog[i].c;
		  prog[i].rec = true;
		  cnt++;
		  break;
		}
	  }
	}
	num += cnt;

	FOR(i, 0, a) {
	  if (ch[i].first != 0) {
		temp++;
	  }
	}

	if (temp > m) {
	  m = temp;
	}
	k++;
	if (k > 1000000) {
	  break;
	}
  }

  cout << m << endl;
  
  return 0;
}

Measured memory_bytes: 6512
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll mod = 1e9 + 7;
#define pival 3.14159265359
#define pll pair<ll,ll>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pqq priority_queue
#define all(a) a.begin(), a.end()
#define sz(a) (ll)(a.size())
#define endl '\n'
ll power(ll x, ll y, ll p)
{ 
    ll res = 1;  
    x = x % p;
    while (y > 0) { 
        if (y & 1) res = (res * x) % p; 
        y = y >> 1;
        x = (x * x) % p;   
    } 
    return res; 
}
const ll L = 2e5 + 5;
ll lef[L];
ll rit[L];
int main()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n, k;
    cin >> n >> k;
    ll cum = 0;
    for (ll i = 1; i <= n + 1; i++) {
    	lef[i] = cum; 
    	cum += i;
    }
    cum = n;
    for (ll i = 1; i <= n + 1; i++) {
    	rit[i] = cum;
    	cum += (n - i);
    }
    ll ans = 0;
    for (ll i = k; i <= n + 1; i++) {
    	ans += (rit[i] - lef[i] + 1);
    }
    cout << ans % mod << endl;
	return 0;
}


Measured memory_bytes: 6736
#include<iostream>
long long K, s,q;
int a[50];
int main() {
	std::cin >> K;
	std::cout << 50 << "\n";
	s = K / 50;
	q = K % 50;
	for (int i = 0; i < 50; i++) {
		if (i < q) {
			std::cout << i + s + 50 - q+1<<" ";
		}
		else if (i == 49) {
			std::cout << i + s - q << "\n";
		}
		else {
			std::cout << i + s - q << " ";
		}
	}
	system("pause");
	return 0;
}

Measured memory_bytes: 504
#include<bits/stdc++.h>
#define rep(i,j,k) for(int i=j;i<=k;i++)
using namespace std;
template<typename T> void read(T &num){
	char c=getchar();T f=1;num=0;
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){num=(num<<3)+(num<<1)+(c^48);c=getchar();}
	num*=f;
}
template<typename T> void qwq(T x){
	if(x>9)qwq(x/10);
	putchar(x%10+'0');
}
template<typename T> void write(T x){
	if(x<0){x=-x;putchar('-');}
	qwq(x);putchar('\n');
}
int ans[20010];int s[5];

int main(){
	int n;read(n);
	if(n==3){cout<<"2 5 63"<<endl;return 0;}
	int t=n/8;int l=0;
	s[1]=2;s[2]=3;s[3]=4;s[4]=6;
	rep(i,1,t){
		rep(j,1,4){ans[++l]=s[j];s[j]+=6;}
		rep(j,1,4){ans[++l]=s[j];s[j]+=6;}
	}
	
	if(n%8==1){ans[++l]=s[4];}
	else if(n%8==2){ans[++l]=s[1];ans[++l]=s[3];}
	else if(n%8==3){ans[++l]=s[1];ans[++l]=s[3];ans[++l]=s[4];}
	else if(n%8==4){ans[++l]=s[1];ans[++l]=s[2];ans[++l]=s[3];ans[++l]=s[2]+6;}
	else if(n%8==5){
		ans[++l]=s[1];ans[++l]=s[2];ans[++l]=s[3];ans[++l]=s[4];ans[++l]=s[2]+6;
	}else if(n%8==6){
		rep(j,1,3){ans[++l]=s[j];s[j]+=6;}
		rep(j,1,3)ans[++l]=s[j];
	}else if(n%8==7){
		rep(j,1,4){ans[++l]=s[j];s[j]+=6;}
		rep(j,1,3)ans[++l]=s[j];
	}
	rep(i,1,n){qwq(ans[i]);putchar((i==n)?'\n':' ');}
	return 0;
}

Measured memory_bytes: 384
n, m = list(map(int, input().split()))
ans = 1
mod = 10**9+7
if n==m:
    for i in range(1, n+1):
        ans *= i
        ans %= mod
    print((ans**2*2)%mod)
elif abs(n-m)==1:
    for i in range(1, n+1):
        ans *= i
        ans %= mod
    for i in range(1, m+1):
        ans *= i
        ans %= mod
    print(ans)
else:
    print(0)


Measured memory_bytes: 3064
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cstdio>

using namespace std;

int main()
{

	int n;
	int ts = 0;
	int hs = 0;
	char taro[100+1] = {};
	char hana[100+1] = {};;
	scanf("%d", &n);
	while (n)
	{
		scanf("%s %s", taro, hana);
		int tlen = strlen(taro);
		int hlen = strlen(hana);
		int len = tlen < hlen ? hlen : tlen;
		// s1 > s2 ??§??£?????????s1 < s2 ??§?????????
		int cmp = strncmp(taro, hana, len);
		if (cmp > 0)
		{
			ts += 3;
		}
		else if (cmp < 0)
		{
			hs += 3;
		}
		else
		{
			ts++;
			hs++;
		}
		n--;
	}
	cout << ts << " " << hs << endl;
	return 0;
	
}

Measured memory_bytes: 1216
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np

def main():
	N = int(input())
	A = list(map(int, input().split(" ")))
	
	ans = max(A) - min(A)
	
	print(ans)
	
if __name__ == "__main__":
	main()


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

#define  MAX 5000

typedef unsigned long long int ULLI;

int main()
{
	char s[MAX], * rp, * gp;
	int n;
	int r, g, b, i, j, k;
	ULLI all, count=0;

	r = g = b =0;

	scanf("%d", &n);
	scanf("%s", s);

	for (int i = 0; i < n; i++) {
		if (s[i] == 'R')
			r++;
		else if (s[i] == 'G')
			g++;
		else
			b++;
	}

	for (i = 0; i < n - 2; i++) {
		for (j = i + 1; j < n; j++) {
			k = 2 * j - i;
			if (k<n && s[i]!=s[j] && s[j]!=s[k] && s[i]!=s[k] && (j-i)==(k-j))
				count++;
		}
	}


	all = (ULLI)r * g * b - count;

	printf("%llu\n", all);

	return 0;
}

Measured memory_bytes: 1736
#include <iostream>

#define endl '\n'
#define desync                        \
    ios_base::sync_with_stdio(false); \
    cout.tie(NULL);                   \
    cin.tie(NULL)

using namespace std;

int main()
{

    int n, ans;

    cin >> n;

    ans = n%1000;

    if(ans != 0){
        cout << 1000-ans << endl;
        return 0;
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 3628
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;

public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    int N = scanner.nextInt();
    int A[] = new int[N];
    for(int i = 0;i < N;i++){
      A[i] = scanner.nextInt();
    }
    String answer = "APPROVED";
    for(int i = 0;i < N;i++){
      int a = A[i];
      if(a % 2 == 0){
        if(!(a % 3 == 0 || a % 5 == 0)){
          answer = "DENIED";
          break;
        }
      }
    }
    System.out.println(answer);
  }
}


Measured memory_bytes: 23764
/**
 *	@file: A.cpp
 *	@author: Huy Le
 *	@created: 08/02/2020 19:13:59
**/


#include<bits/stdc++.h>
using namespace std;

//***---***---***---***---***---***---BEGIN USELESS CODE---***---***---***---***---***---***//

#define ll long long
#define ld long double
const char newl = '\n';

template<class T> void read(vector<T>& vt);
template<class T>
void read(T& args) { cin >> args; }
template<class A, class... B >
void read(A& argc, B&... argv) {
	read(argc);
	read(argv...);
}
template<class T>
void read(vector<T>& vt) {
	for(auto &a : vt)
		read(a);
}

string to_string(bool bo) { return (bo ? "true" : "false"); }
string to_string(char c) { return string(1, c); }
string to_string(const char* str) { return string(str);}
string to_string(string str) { return str; }
template<class T>
string to_string(T vt) {
	bool ft = 1;
	string res;
	for(auto &a : vt) {
		if(!ft)
			res += ' ';
		ft = 0;
		res += to_string(a);
	}
	return res;
}
string to_string(vector<bool> vt) {
	string res;
	bool ft = 1;
	for(int i = 0; i < (int)vt.size(); ++i) {
		if(!ft)
			res += ' ';
		ft = 0;
		res += char('0' + vt[i]);
	}
	return res;
}

template<class T>
void write(T args) { cout << to_string(args); }
template<class A, class... B>
void write(const A argc, const B... argv) {
	write(argc);
	write(argv...);
}

void print() { write(newl); }
template<class A, class... B>
void print(const A argc, const B... argv) {
	write(argc);
	if(sizeof...(argv))
		write(' ');
	print(argv...);
}

void DEBUGLOCAL() { cerr << ")" << newl; }
template<class A, class... B> 
void DEBUGLOCAL(A argc, B... argv) {
	cerr << to_string(argc);
	if(sizeof...(argv))
		cerr << ", ";
	DEBUGLOCAL(argv...);
}
#ifdef _DEBUG
#define dbg(...) cerr << "LINE(" << __LINE__ << ") [" << __FUNCTION__ << "] -> (" << #__VA_ARGS__ << "): (",DEBUGLOCAL(__VA_ARGS__)
#else
#define dbg(...) 0
#endif

//***---***---***---***---***---***---END USELESS CODE---***---***---***---***---***---***//

int ts;
int n;

void solve() {
	read(n);
	print(n >= 30 ? "Yes" : "No");
}

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

	//read(ts);
	//while(ts--)
		solve();
}


Measured memory_bytes: 3612
#include <bits/stdc++.h>
#define ll long long  int
#define N 1000
#define f(i, a, b) for (ll i = (ll)a; i <= (ll)b; i++)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--)
#define po pop_back
#define pb push_back
#define lb lower_bound
#define fi first
#define se second
#define debug(x) cout << #x << " = " << x << endl
#define ub upper_bound
#define ibs ios_base::sync_with_stdio(false)
#define cti cin.tie(0)
#define all(x) x.begin(), x.end()
#define PI 3.14159265
#define cot cout.tie(0)
using namespace std;
/**
        * @author :: Sawlani
        *
        */

int main()
{
     ll a,b,c;
     cin >> a >> b >> c;


     ll p1=4*a*b;
     ll p2=c-a-b;

     if(p2<0)
     {
         cout <<  "No" << endl;
         return 0;
     }

     p2*=(c-a-b);  

      if(p1<p2)
         cout <<  "Yes";
    else
    {
        cout << "No";
    }
    
}

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

int main(){
  int N, K;
  cin >> N >> K;
  vector<int> p(N);
  for(int i = 0; i < N; i++){
    cin >> p.at(i);
  }
  sort(p.begin(), p.end());
  int result = 0;
  for(int i = 0; i < K; i++){
    result += p.at(i);
  }
  cout << result << endl;
}

Measured memory_bytes: 3620
//
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#include<iostream>
#include<iomanip>
#include<cmath>

using namespace std;

int main(){
    for(double a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;){
        double x=(c*e-f*b)/(a*e-d*b);
        double y;
        if(e){
            y=(f-d*x)/e;
        }else{
            y=(c-a*x)/b;
        }
        if(fabs(x)<1e-4){
            x=0;
        }
        if(fabs(y)<1e-4){
            y=0;
        }
        cout<<fixed<<setprecision(3)<<x<<' '<<y<<endl;
    }
    return 0;
}

Measured memory_bytes: 3276
#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 ll long long

typedef tree< pair<int,int>, null_type, less< pair<int,int> >, rb_tree_tag, tree_order_statistics_node_update>Order_Set;

Order_Set X;

const int mxn = 1e7+100;
const int Mod = 1e9+7;

int arr[mxn], qs[mxn];
int bitOn[55];
map<int,int>Mp, cnt, op;
vector< pair<int, pair<int,int> > >Pi, Ans;
vector<int>G[mxn];
set<int>seet[mxn];

int main()
{
     ios::sync_with_stdio(false);

     int a, b;
     cin>>a>>b;
     cout<<(a^b)<<endl;
     return 0;
}




Measured memory_bytes: 704768
#include<stdio.h>
int main(){
  long long n,a,b,c,d,e,m,i;
  scanf("%ld",&n);
  scanf("%ld",&a);
  scanf("%ld",&b);
  scanf("%ld",&c);
  scanf("%ld",&d);
  scanf("%ld",&e);
  if(n<=a&&n<=b&&n<=c&&n<=d&&n<=e){
    printf("%ld\n",5);
    return 0;
  }
  m=a;
  if(m>b)m=b;
  if(m>c)m=c;
  if(m>d)m=d;
  if(m>e)m=e;
  i=n/m;
  if(n%m!=0)i++;
  printf("%ld\n",i+4);
  return 0;
}

Measured memory_bytes: 128
import numpy as np
N = int(input())
T_k = list(map(int,input().split()))
M = int(input())

Total_time_ord = sum(T_k)           
subtraction = 0
drink_time = Total_time_ord
d_list = np.array([])

for i in range(M):
    
    PX = list(map(int,input().split()))
    P = PX[0]
    X = PX[1]
    drink_cos = drink_time + X - T_k[P-1]
    d_list = np.append(d_list,drink_cos)
    drink_cos = Total_time_ord

for i in range(M):
    print("{}".format(int(d_list[i])))

Measured memory_bytes: 12408
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
#define PL pair<ll,ll>
#define ALL(v) (v).begin(), (v).end()

void solve(){
	ll n,ans=0;
	cin>>n;
	string s;
	map<string,ll> mp;
	for(ll i=0;i<n;i++){
		cin>>s;
		sort(s.begin(),s.end());
		mp[s]++;
	}
	for(auto x:mp){
		ans+=((x.second*(x.second-1))/2);
	}
	cout<<ans;
}
int main(){ 
    int t;
    //cin>>t;
    t=1;
    while(t--){solve();}
    return 0;
}

Measured memory_bytes: 11136
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (n); i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin())  // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define REVERSE(x) reverse(ALL(x))
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
constexpr int INF = 0x3f3f3f3f;
constexpr ll INFL = 0x3f3f3f3f3f3f3f3f;
constexpr double PI = 3.141592653589793238462643383279;

signed main() {
  string N;
  cin >> N;
  rep(i, N.size()) {
    if (N[i] == '7') {
      COUT("Yes");
      return 0;
    }
  }
  COUT("No");
  return 0;
}

Measured memory_bytes: 3620
#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int a, b,c[100000],i=0;
	char op;
	for (; 1;){
		cin >> a >> op >> b;
		if (op == '+'){
			c[i] = a + b;
		}
		else if (op == '-'){
			c[i] = a- b;
		}
		else if (op == '*'){
			c[i] = a* b;
		}
		else if (op == '/'){
			c[i] = a/ b;
		}
		else break;
		i++;
	}
	for (int n = 0; n < i; n++){
		cout << c[n] << endl;
	}


	
	return 0;
}



Measured memory_bytes: 3120
package main

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

var sc = bufio.NewScanner(os.Stdin)

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	a := nextLine()
	b := nextLine()
	if (a == "1" && b == "2") || (a == "2" && b == "1") {
		fmt.Println("3")
	} else if (a == "2" && b == "3") || (a == "3" && b == "2") {
		fmt.Println("1")
	} else {
		fmt.Println("2")
	}
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
int main() {
  int a,b,c;
  string s="No";
  cin >> a >> b >> c;
  if (a+b==c) s="Yes";
  if (a+c==b) s="Yes";
  if (b+c==a) s="Yes";
  cout << s << endl;
  return 0;
}

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

using namespace std;





int main(){


	string s; cin >> s;


	if(s == "Sunny"){
		cout << "Cloudy" << endl;
	}else if(s == "Rainy"){
		cout << "Sunny" << endl;
	}else{
		cout << "Rainy" << endl;
	}



	return 0;
}

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

int main() 
{
	int n;
	scanf("%d", &n);
	n = n % 10;
	switch (n) {
		case 2:
		case 4:
		case 5:
		case 7:
		case 9:
			printf("hon");
			break;
		case 0:
		case 1:
		case 6:
		case 8:
			printf("pon");
			break;
		case 3:
			printf("bon");
	}
	printf("\n");
	return 0;
}


Measured memory_bytes: 1652
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb push_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef multiset<ll> S;
typedef priority_queue<ll> PQ;
typedef priority_queue<P,vector<P>,greater<P>> SPQ;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())outp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size()){rep(j,v[i].size()){if(j)cout<<' ';cout<<v[i][j];}cout<<'\n';}}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}
int main(){
    ll n;cin>>n;
    vector<double> x(n);
    vector<double> y(n);
    vector<double> r(n);
    rep(i,n)cin>>x[i]>>y[i];
    double ok=500000,ng=0;
    while(ok-ng>0.00000001){
        vector<double> xx=x,yy=y;
        double md=(ok+ng)/2;
        rep(i,n)r[i]=md;
        rep(c1,n)rep(c2,n){
            double dist_x = x[c1] - x[c2];
            dist_x*=dist_x;
            double dist_y = y[c1] - y[c2];
            dist_y*=dist_y;
            double dist = sqrt(dist_x+dist_y);
            if(!(dist <= (r[c1] + r[c2]) && dist >= fabs(r[c1]-r[c2])))continue;
            double a = (x[c2]-x[c1]);
            double b = (y[c2]-y[c1]);
            double c = (x[c1] * x[c1] + y[c1] * y[c1] - r[c1] * r[c1] - (x[c2] * x[c2] + y[c2] * y[c2] - r[c2] * r[c2]))/2;
            double d = a*x[c1]+b*y[c1]+c;
            double tmp=sqrt((a*a+b*b)*r[c1]*r[c1]-d*d);
            xx.pb((-a*d+b*tmp)/(a*a+b*b)+x[c1]);
            xx.pb((-a*d-b*tmp)/(a*a+b*b)+x[c1]);
            yy.pb((-b*d-a*tmp)/(a*a+b*b)+y[c1]);
            yy.pb((-b*d+a*tmp)/(a*a+b*b)+y[c1]);
        }
        bool able=false;
        rep(i,xx.size()){
            ll num=0;
            double X=xx[i],Y=yy[i];
            rep(j,n){
                double dist_x = x[j] - X;
                dist_x*=dist_x;
                double dist_y = y[j] - Y;
                dist_y*=dist_y;
                double dist = sqrt(dist_x+dist_y);
                if(dist-0.0000001<=r[j])num++;
            }
            if(num==n){
                able=true;
                break;
            }
        }
        if(able)ok=md;
        else ng=md;
    }
    cout<<fixed<<setprecision(10);
    out(ok);
}



Measured memory_bytes: 452
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		//List<String> list=new ArrayList<String>(Arrays.asList(s.split("")));
		//List<Integer> list=new ArrayList<Integer>();
		//int[] array = new int[n];
		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();
		int d = sc.nextInt();
		while(true) {
			c=c-b;
			if(c<1) {
				System.out.println("Yes");
				break;
			}
			a=a-d;
			if(a<1) {
				System.out.println("No");
				break;
			}
		}
	}
}

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


void solve(long long H){
  long long count = 1;
  long long acc = 1;
  while(H > 1) {
    count *= 2;
    acc += count;
    H /= 2;
  }

  cout << acc << endl;
}

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long H;
  scanf("%lld",&H);
    solve(H);
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <limits>
#include <random>
#include <complex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
typedef long long ll;

int main() {

	int A,B,C,D;
	cin >> A >> B >> C >> D;

	cout << min(A, B) + min(C, D) << endl;

	return 0;
}

Measured memory_bytes: 256
use proconio::{input, fastout};
use proconio::marker::{Chars};
use proconio::marker::Usize1;
use std::cmp::*;

macro_rules! debug {
      ($($a:expr),*) => {
          eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

#[fastout]
fn main() {
    input!{
        a: usize,
        b: usize,
    }
    if a+b >= 10 {
        println!("error");
    } else {
        println!("{}", a+b);
    }
}


Measured memory_bytes: 2136
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,a,b) for(int i=(a); i<(b); i++)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
typedef long long ll;
typedef pair<int, int> pii;
int main(){
    ll h,w; int n; cin >> h >> w >> n;
    vector<int> a(n), b(n);
    rep(i,n) {
        cin >> a[i] >> b[i];
        a[i]--; b[i]--;
    }
    map<pii, int> mp;
    vector<ll> num(10);
    rep(i,n){
        rep(j,3){
            rep(k,3){
                if(0 <= a[i]-j && a[i]-j < h-2 && 0 <= b[i]-k && b[i]-k < w-2) mp[make_pair(a[i]-j, b[i]-k)]++;
            }
        }
    }
    for(auto P : mp) num[P.second]++;
    ll sum = accumulate(ALL(num), 0LL);
    num[0] = (h-2LL)*(w-2LL) - sum;
    rep(i,10) cout << num[i] << endl;
}

Measured memory_bytes: 57216
#include<stdio.h>
char f;
char *s[2] = {"No", "Yes"};
char c[4];
int main(){
  c[0]=getchar();
  c[1]=getchar();
  c[2]=getchar();
  c[3]=getchar();
  f = c[1]==c[2] && (c[0]==c[1] || c[2]==c[3]);
  puts(s[f]);
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
#define rep(i,k,n)     for (ll i = k; i < n; ++i)
#define repr(i,k,n)    for (ll i = k; i >= n; --i)
#define repp(p,a)      for (p=a.begin();p!=a.end();++p)
#define all(a)         a.begin(),a.end()
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define reppn(p,a,n)    for (p=a.begin();(p+n)!=a.end();++p)
#define F              first
#define S              second
#define ll             long long
#define hell           1000000007
#define god            LLONG_MAX
#define lb             lower_bound
#define ub             upper_bound
#define pb             push_back
#define ct             continue
#define endl           '\n'
#define setprecision(n) sp(n)
#define srt(a)         sort(all(a))
#define srtd(a)        sort(a.rbegin(),a.rend())
#define sz(a)          ll((a).size())
#define sum(a)         accumulate(all(a),(ll) 0)
#define pdt(a)         accumulate(all(a),double(1),multiplies<double> ())
#define dotpdt(a,b)    inner_product(all(a),b.begin(),0)
#define mkp(a,b)       make_pair(a,b)
#define REP(x,s)       for (auto x : s)
using namespace std;
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ll t=1;
  //cin>>t;
  while(t--)
  {
      ll n,k;
      cin>>n>>k;
      map< ll,vector<string> >m;
      map< ll,vector<string> > :: iterator p;
      rep(i,0,k)
      {
        ll a;
        string b;
        cin>>a>>b;
        m[a].pb(b);
      }
      ll c=0,in=0;
      repp(p,m)
      {
        ll y=0;
        rep(i,0,p->S.size())
        {
          if ((p->S)[i] =="AC")
          {
            in+=y;
            c++;
            break;
          }
          else
          {
            y++;
          }
        }
      }
      cout<<c<<" "<<in;
  }


 return 0;
}


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

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

typedef long long ll;
const ll MOD = 1e9 + 7;
const int MAX_N = 100000;

int main() {
  int N, d[MAX_N];
  std::cin >> N;
  rep(i,N) std::cin >> d[i];
  std::sort(d, d + N);

  int ans = 0;
  for(int K = d[N / 2 - 1] + 1; K < d[N / 2] + 1; ++K) {
    if(K > d[N / 2 - 1]) ++ans;
  }

  std::cout << ans << std::endl;
}


Measured memory_bytes: 640
// link:https://atcoder.jp/contests/dp/tasks/dp_i
// [prajwal1721]
// g++ -Wall -Wextra -Wshadow filename.cpp
// ./a.out >input <output
/*comments: good one didn't get watch YT errichto 
*/



#include<bits/stdc++.h>
using namespace std; 
#define mod 1000000007
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b))
#define bits(x) __builtin_popcountll(x)
#define vi              vector<int>
#define vl              vector<ll>
#define all(v)          v.begin(),v.end()
#define UNIQUE(X)       (X).erase(unique(all(X)),(X).end())



typedef long long int ll;
void solve()
{
    ll n,t,m;cin>>n;
    double f;
    double dp[n+2]={0};
    dp[0]=1;
    for(int ii=0;ii<n;ii++){cin>>f;
        for (int i=ii+1;i>=0;i--)
        {
            dp[i]=(i==0?0:dp[i-1]*f)+(1-f)*(dp[i]);
        }
    }
    double ans=0;
    for(int i=0;i<=n;i++)
    {
        t=n-i;
        // cout<<dp[i]<<" ";
        if(i>t)ans+=dp[i];
    }
    printf("%0.10lf\n",ans);
}


int main()
{ 
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    // ll t;cin>>t;
    // cout<<t<<"Hi test complete\n";
    // while(t--)
        {
            solve();
        }


    return 0;
}

Measured memory_bytes: 3720
# _*_ coding: utf-8_*_
import sys

is_ingroup = False

input = sys.stdin.readline()

num = input.split(' ')
x = int(num[0])
y = int(num[1])

group = [[1,3,5,7,8,10,12],[4,6,9,11],[2]]

for i in range(len(group)):
	if x in group[i] and y in group[i]:
		is_ingroup = True

if is_ingroup:
	print('Yes')
else:
	print('No')

Measured memory_bytes: 3064
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>

#define rep(i, a, b) for ( int i = (a); i < (b); i++ )
#define per(i, a, b) for ( int i = (b)-1; i >= (a); i--)
#define pb push_back
#define bg begin()
#define en end()


using namespace std;

typedef long long ll;

//n!に含まれる素数pの数
ll g1(ll n, ll p) {
  if ( n==0 ) return 0;
  return n/p + g1(n/p, p);
}

//n!! に含まれる素数pの数
ll g2(ll n, ll p) {
  if ( n%2==1 ) return g1(n, p) - g2(n-1, p);
  
  ll res = 0;
  if ( p==2 ) res += n/2;
  return res + g1(n/2, p);
}

int main(void) {
  ll N;
  scanf("%lld", &N);
  
  ll ans = min(g2(N, 2), g2(N, 5));
  printf("%lld\n", ans);

    return 0;
}



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

#define loop(i,n) for(int i = 0;i < int(n);i++)
#define rloop(i,n) for(int i = int(n);i >= 0;i--)
#define range(i,a,b) for(int i = int(a);i <= int(b);i++)
#define SZ(c) int(c.size())
#define ALL(c) c.begin(), c.end()
#define RALL(c) c.rbegin(), c.rend()
#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define sfi1(v) scanf("%d",&v)
#define sfi2(v1,v2) scanf("%d %d",&v1,&v2)
#define sfi3(v1,v2,v3) scanf("%d %d %d",&v1,&v2,&v3)
#define sfll1(v) scanf("%I64d",&v);
#define sfll2(v1,v2) scanf("%I64d %I64d",&v1,&v2)
#define sfll3(v1,v2,v3) scanf("%I64d %I64d %I64d",&v1,&v2,&v3)
#define endl '\n'

typedef vector<int> vi;
typedef vector<pair<int,int> > vii;
typedef long long ll;
typedef pair<int, int> pii;

const int N  = 2e5 + 5;
ll ans;
int n;

ll f(ll x){
    return x * (x+1) / 2;
}

int main()
{

#ifndef ONLINE_JUDGE
	//freopen("in.in", "r", stdin);
	//freopen("out.in", "w", stdout);
#endif
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

    int a , b;
    cin >> n;
    range(i,1,n)ans += f(i);
    loop(i,n-1){
        cin >> a >> b;
        int mn = min(a,b);
        int mx = max(a,b);
        ll cur = 1LL * mn * (n - mx + 1);
        ans -= cur;
    }

    cout << ans << endl;





    return 0;
}


Measured memory_bytes: 3648
#include <bits/stdc++.h>
using namespace std; 
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)

int main(){
  long int a,b,c; cin>>a>>b>>c;
  long int gedoku = a+b;
  long int yummy = b+c;
  long int r;
  if(gedoku>=c){
    r = yummy;
  }else{
    r = b + gedoku + 1;
  }
  cout << r << "\n";
}

Measured memory_bytes: 256
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll mod=1e9+7;
int N,K;
int fin[55][55],v[55][55],a[55][55];
void mult1(){
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++)a[i][j]=0;
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      for(int h=0;h<N;h++){
        a[i][j]+=fin[i][h]*fin[h][j];
        a[i][j]%=mod;
      }
    }
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++)fin[i][j]=a[i][j];
  }
}
void mult(){
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++)a[i][j]=0;
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
      for(int h=0;h<N;h++){
        a[i][j]+=fin[i][h]*v[h][j];
        a[i][j]%=mod;
      }
    }
  }
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++)fin[i][j]=a[i][j];
  }
}
void pot(int k){
  if(k<=1)return;
  pot(k/2);
  if(k%2){
    mult1();
    mult();
  }else mult1();
}
signed main(){
		ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
		//freopen("input.txt","r",stdin);
		//freopen("output.txt","w",stdout);
		cin>>N>>K;
		for(int i=0;i<N;i++){
      for(int j=0;j<N;j++){
        cin>>v[i][j];
        fin[i][j]=v[i][j];
      }
		}
		pot(K);

		int t=0;
		for(int i=0;i<N;i++){
      for(int j=0;j<N;j++)t+=fin[i][j];
		}
    cout<<t%mod;
    return 0;
}

Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(),(x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<int, int>;
#define debug(var) cerr << "[" << #var << "] " << var << endl
#define chmin(x, y) x = min(x, y)
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};


int main(){
    string s;
    cin >> s;
    int a = s[5] - '0';
    int b = s[6] - '0';
    string ans = "TBD";
    if (a==0 && b<=4) ans = "Heisei";
    
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, std.bitmanip;

void main() {
    auto s = readln.split.map!(to!int);
    auto N = s[0];
    auto M = s[1];
    Tuple!(int, int)[] A;
    foreach (i; 0..N) {
        s = readln.split.map!(to!int);
        A ~= tuple(s[0], s[1]);
    }

    int solve() {
        auto B = A.dup;
        Tuple!(int, int)[] C;
        B.sort!"a[0] == b[0] ? a[1] > b[1] : a[0] < b[0]";
        
        int left = 1;
        foreach (b; B) {
            if (b[0] == 0) {
                C ~= b;
            } else if (b[0] >= left) {
                left += 1;
            } else {
                C ~= b;
            }
        }

        int right = M;
        C.sort!"a[1] > b[1]";
        foreach (c; C) {
            if (right < left) {
                break;
            }
            if (c[1] <= right) {
                right -= 1;
            }
        }

        return (left - 1) + (M - right);
    }

    int ans = solve;
    foreach (i; 0..N) {
        A[i] = tuple(M - A[i][1] + 1, M - A[i][0] + 1);
    }
    ans = max(ans, solve);

    writeln(N - ans);
}


Measured memory_bytes: 12412
#include <stdio.h>
int main(void){
  int N;
  int i;
  int s=0;
  int a[100];
  scanf("%d",&N);
  for(i=0;i<N;i++){
    scanf("%d",&a[i]);
  }
  for(i=0;i<N;i++){
    if(((i+1)%2==1)&&(a[i]%2==1)){
      s=s+1;
    }
  }
  printf("%d",s);
  return 0;
}

Measured memory_bytes: 1736
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)
const ll MAX_N=2e5;
ll N,c[MAX_N];
vector<ll> G[MAX_N];
ll tsz[MAX_N],tszadd;
ll ans[MAX_N];
ll cntp(ll n){
	return n+n*(n-1)/2;
}
void dfs(ll v,ll p){
	ll tszb=tsz[c[v]]+tszadd;
	for(auto e:G[v]){
		if(e!=p){
			ll tmp=tsz[c[v]]+tszadd;
			dfs(e,v);
			ans[c[v]]-=cntp(tsz[c[v]]+tszadd-tmp);
		}
	}
	tszadd++;
	tsz[c[v]]=tszb-tszadd;
}
int main(){
	cin.tie(0);
	cin.sync_with_stdio(false);
	cin>>N;
	REP(i,N)cin>>c[i];
	REP(i,N)c[i]--;
	REP(i,N-1){
		ll a,b;
		cin>>a>>b;
		a--;
		b--;
		G[a].push_back(b);
		G[b].push_back(a);
	}
	REP(i,N){
		ans[i]=cntp(N);
	}
	dfs(0,-1);
	REP(k,N){
		ans[k]-=cntp(tsz[k]+tszadd);
	}
	REP(k,N){
		cout<<ans[k]<<endl;
	}
}


Measured memory_bytes: 34872
package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	scanInit()

	n := nextStr()

	a := int(n[0] - '0')
	b := int(n[1] - '0')
	c := int(n[2] - '0')
	d := int(n[3] - '0')

	calc(a, b, c, d, "+++")
	calc(a, b, c, d, "++-")
	calc(a, b, c, d, "+-+")
	calc(a, b, c, d, "+--")
	calc(a, b, c, d, "-++")
	calc(a, b, c, d, "-+-")
	calc(a, b, c, d, "--+")
	calc(a, b, c, d, "---")

}
func calc(a int, b int, c int, d int, s string) {
	ans := a
	if s[0] == '+' {
		ans += b
	} else {
		ans -= b
	}
	if s[1] == '+' {
		ans += c
	} else {
		ans -= c
	}
	if s[2] == '+' {
		ans += d
	} else {
		ans -= d
	}
	if ans == 7 {
		fmt.Printf("%d%c%d%c%d%c%d=7", a, s[0], b, s[1], c, s[2], d)
		os.Exit(0)
	}
}

// ---- readfunc
func scanInit() {
	const cap = 200 * 1024 // Default=64
	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: 1780
#include <iostream>
using namespace std;

int main()
{
  int n;
  cin >> n;
  if(n>0 && n<101)
  {
    int candy=0;
    for(int i = 1; i<=n; i++)
    {
      candy += i;
    }
    cout << candy<< endl;
  }
  return 0;
}

Measured memory_bytes: 3620
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        sc.close();

        // 主処理
        boolean judge = s.contains("AC");
        String result = judge ? "Yes" : "No";

        // 出力
        System.out.println(result);
    }
}


Measured memory_bytes: 23252
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <queue>
#include <map>
#include <numeric>
#include <unordered_map>
#include <iomanip>
#include <functional>
#include <bitset>
#include <complex>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define all(x) (x).begin(),(x).end()

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

typedef long long ll;

using namespace std;


int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  string a,b;
  cin>>a>>b;
  rep(i,a.size())
  {
    int f=1;
    rep(j,a.size())
    {
      if(a[j]!=b[(i+j)%((int)a.size())])f=0;
    }
    if(f){cout<<"Yes"<<endl;return 0;}
  }
  cout<<"No"<<endl;
  return 0;

}


Measured memory_bytes: 256
#include <stdio.h>

#define H 500001

int maxHeapify(int*,int);
int n;

int main(){

  int i,A[H];

  scanf("%d",&n);
  for(i=1; i<=n; i++)
    scanf("%d",&A[i]);

  for(i=n/2; i>=1; i--){
    maxHeapify(A,i);
  }

  for(i=1; i<=n; i++){
    printf(" %d",A[i]);
  }
  printf("\n");

  return 0;
}

int maxHeapify(int *A,int i){

  int l,r,largest,temp;

  l = 2*i;
  r = 2*i+1;

  if(l <= n && A[l] > A[i]){
    largest = l;
  }else largest = i;

  if(r <= n && A[r] > A[largest]){
    largest = r;
  }

  if(largest != i){ 
    temp = A[i];
    A[i] = A[largest];
    A[largest] = temp;
  
  maxHeapify(A,largest);
  }
}

Measured memory_bytes: 2552
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(i64 (i) = (s);(i) < (e);(i)++)
#define all(x) x.begin(),x.end()



template<const std::size_t N>
struct bfps: public std::bitset<N> {
  using size_type = std::size_t;
  size_type len;

  void recalc() {
    this->len = 0;
    for(i64 j = N; j --> 0;) {
      if((*this)[j]) {
        this->len = j + 1;
        return;
      }
    }
  }

  bfps() : std::bitset<N>() { this->len = 0; }
  //bfps(const std::uint_fast64_t x) : std::bitset<N>(x) { recalc(); }
  bfps(const std::bitset<N>& b) : std::bitset<N>(b) { recalc(); }
  size_type size() const { return this->len; }


  static bfps mod(bfps a, const bfps& b) {
    assert(b.size() > 0);
    for(i64 i = a.size() - b.size() + 1; i --> 0;) {
      if(a[i + b.size() - 1]) {
        a ^= (b << i);
      }
    }
    a.recalc();
    return a;
  }

  static bfps div(bfps a, const bfps& b) {
    assert(b.size() > 0);
    bfps d;
    for(i64 i = a.size() - b.size() + 1; i --> 0;) {
      if(a[i + b.size() - 1]) {
        a ^= (b << i);

        bfps e;
        e[i] = 1;
        d ^= e;
      }
    }
    d.recalc();
    return d;
  }

  static bfps gcd(bfps a, bfps b) {
    while(b.any()) {
      auto m = mod(a, b);
      a = b;
      b = m;
    }
    return a;
  }

  bool operator<(const bfps& b) const {
    bool OK = false;
    for(i64 i = N; i --> 0; ) {
      if((*this)[i] != b[i]) {
        if(b[i]) {
          OK = true;
        }
        break;
      }
    }
    return OK;
  }
  bool operator<=(const bfps& b) const {
    bool OK = true;
    for(i64 i = N; i --> 0; ) {
      if((*this)[i] != b[i]) {
        if((*this)[i]) {
          OK = false;
        }
        break;
      }
    }
    return OK;
  }
};

const int BN = 4000;
using bits = bfps<BN>;

int main() {
  i64 N;
  cin >> N;
  bits X;
  cin >> X;
  X.recalc();

  vector<bits> A(N);
  rep(i,0,N) {
    cin >> A[i];
    A[i].recalc();
  }
  auto G = A[0];
  for(i64 i = 1; i < N; i++) {
    G = bits::gcd(G, A[i]);
  }
  i64 ans = 0;
  const i64 MOD = 998244353;
  if(X.size() - G.size() + 1 >= 0) {
    vector<i64> Bs(X.size() - G.size() + 1, 1);
    for(i64 i = 1; i < X.size() - G.size() + 1; i++) {
      Bs[i] = (Bs[i - 1] * 2) % MOD;
    } 
    bits now;
    for(i64 i = X.size() - G.size() + 1; i --> 0;) {
      if(X[i + G.size() - 1]) {
        ans = (ans + Bs[i]) % MOD;
      }
      if(now[i + G.size() - 1] != X[i + G.size() - 1]) {
        now ^= (G << i);
      }
    }
    if(now <= X) ans = (ans + 1) % MOD;
  }
  cout << ans << endl;
}


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

int main(){
  int n, m, k, a, i, l, count = 0;
  cin >> n >> m;
  int foods[m+1] = {};
  for(i = 0; i < n; i++){
    cin >> k;
    for(l = 0; l < k; l++){
      cin >> a;
      foods[a]++;
    }
  }
  for(i = 0; i <= m; i++){
    if(foods[i] == n) count++;
  }
  cout << count << endl;
  return 0;
}


Measured memory_bytes: 256