akhauriyash/Code-Regression huggingface dataset:
#include<stdio.h>
int main()
{
	int n,x,t;
	int a;
	scanf("%d %d %d",&n,&x,&t);
	a=n/x;
	if(n%x!=0){
		a=a+1;
	}
	printf("%d\n",a*t);
	return 0;
}

Measured memory_bytes: 1692
#ifdef LOCAL
#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstring>
#else
#include <bits/stdc++.h>
#endif
using namespace std ;

typedef long long ll ;
#define rep(i , n ) for ( int i =0; i < n ; i++)
#define _sort(arg) sort(begin(arg), end(arg))
#define MOD 1000000007
#define pb push_back
#define DEBUG(x) cout << #x << ": " << x << endl;

/*
__attribute__((constructor))
void initial()
{
	cin.tie(NULL);
	ios::sync_with_stdio(false);
}
*/

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

	int A, B;
	
	cin >> A >> B;

	cout << ((A * 3+ B) >> 1) << endl;
	
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
string grade(int m,int f,int r){
    if(m==-1||f ==-1)return "F";
    else if(m+f >= 80)return "A";
    else if(m+f>=65) return "B";
    else if(m+f>=50) return "C";
    else if(m+f>= 30 && r>= 50)return "C";
    else if(m+f>= 30) return "D";
    else return "F";
}
int main() {
    int a,b,c;
    while(1){
        cin >> a >> b >> c;
        if(a==-1&&b==-1&&c==-1) break;
        cout << grade(a,b,c) << endl;
        
    }
    
}


Measured memory_bytes: 3100
//#include<cstdio>
//#include<cassert>
//#include<iostream>
//#include<cstring>
//#include<algorithm>
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define MAX ((int)1e9 + 5)
#define MAXL ((ll)3e18 + 7)
#define MAX_X ((ll)1e5 + 2)
#define pi (2.0*acos(0))
#define M ((int)1e6 + 7)
#define MOD ((int)1e9 + 7)
#define NN ((int)3e6 + 7)
#define N ((int)1e5 + 5)
#define eps (0)
#define fastio ios_base::sync_with_stdio(false),cin.tie(NULL)
#define logn 29
#define endl "\n"
#define mp make_pair
#define BUCK 105
#define RIG ((idx<<1)|1)
#define LEF (idx<<1)
//#define int ll


using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;

/*fast io
ios_base::sync_with_stdio(false);
cin.tie(NULL);
*/




typedef tree < int,  null_type,  less < int >,  rb_tree_tag,  tree_order_statistics_node_update > o_set;
/// o_set s;
/// s.order_of_key(k) : Number of items strictly smaller than k .
/// *(s.find_by_order(k)) : K-th element in a set (counting from zero).

ll arr[N] , brr[N];


int main()
{
    fastio;
    int n ;
    cin>>n;
    for(int i = 1 ; i<=n ; i++){
        cin>>arr[i]>>brr[i];
    }
    ll ans = 0;
    for(int i = n ; i>0 ; i--){
        arr[i] += ans;
        ll tmp = (arr[i]+brr[i]-1)/brr[i];
        tmp *= brr[i];
        ans += tmp-arr[i];
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 1792
#pragma once
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <numeric>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1000000007;
const int MAX_V = 201;
int now = 0;
int deco[1000];

void Sequence() {
	string s;
	cin >> s;
	int si = s.size();
	int count = 0;
	char bef = s[0];
	for (size_t i = 1; i < si; i++)
	{
		if (bef != s[i]) count++;
		bef = s[i];
	}
	cout << count << endl;
}
int main() {
	Sequence();
	return 0;
}



Measured memory_bytes: 512
#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
int sz[10010], mp[5];
char s[10010][22];
int main(){
    int n;
    while(cin>>n){
        ll ans=0;
        for(int i=0; i<n; ++i){
            scanf("%s",s[i]);
            sz[i]=strlen(s[i]);
            if(s[i][0]=='B'){
                if(s[i][sz[i]-1]=='A'){
                    ++mp[2];
                }
                else{
                    ++mp[0];
                }
            }
            else{
                if(s[i][sz[i]-1]=='A'){
                    ++mp[1];
                }
            }
            for(int j=0; j+1<sz[i]; ++j){
                if(s[i][j]=='A'&&s[i][j+1]=='B'){
                    ++ans;
                }
            }
        }
        int tmp=max(mp[0], mp[1]);
        if(tmp==0){
            ans+=max(mp[2]-1, 0);
        }
        else{
            ans+=min(mp[0], mp[1])+mp[2];
        }
        cout<<ans<<endl;
    }
  return 0;
}




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

using namespace std;
#define taskname "A"
#define pb  push_back
#define mp  make_pair
#ifndef LOCAL
#define cerr if(0)cout
#endif

typedef long double ld;
typedef long long ll;
typedef pair<int,int> ii;
const int maxn = 505;
const int maxm = 1e4 + 5;

struct edge{
    int u , v , c;
    edge(){};
    edge(int u , int v , int c):u(u) , v(v) , c(c){};
}e[maxm * 2];
int nEdge = 0;
const int inf = 1e9;

vector<int> adj[maxn];
void add(int u , int v , int c){
    adj[u].pb(nEdge * 2);
    adj[v].pb(nEdge * 2 + 1);
    e[nEdge * 2] = edge(u,v,c);
    e[nEdge * 2 + 1] = edge(v,u,c);
    ++nEdge;
}
int lv[maxn] , s , t , n , m;

void BFS(){
    queue<int> q;
    fill_n(lv,maxn,-1);
    q.push(t);
    lv[t] = 0;
    while(!q.empty()){
        int u = q.front();q.pop();
//        cout << u << endl;
        for(int c : adj[u]){
            if(e[c ^ 1].c != 0 && lv[e[c].v] == -1){
                q.push(e[c].v);
//                cout << 2 << " " << e[c].v << endl;
                lv[e[c].v] = lv[u] + 1;
            }
        }
        if(lv[s] != -1)return;
    }

}
int DFS(int u , int In){
    if(u == t)return In;
    int Out = 0;
    for(int c : adj[u]){
        if(e[c].c != 0 && lv[e[c].v] == lv[u] - 1){
            int w = DFS(e[c].v , min(In , e[c].c));
            In -= w;
            Out += w;
            e[c].c -= w;
            e[c ^ 1].c += w;
        }
        if(In == 0)return Out;
    }
    return Out;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    if(fopen(taskname".INP","r")){
        freopen(taskname".INP", "r",stdin);
        freopen(taskname".OUT", "w",stdout);
    }
    cin >> m >> n;
    for(int i = 1 ; i <= m ; ++i){
        string s;cin >> s;
        for(int j = 1 ; j <= n ; ++j){
            if(s[j - 1] == 'S')add(0 , i , inf) , add(0 , j + m, inf);
            else if(s[j - 1] == 'T')add(i,n+m+1,inf) , add(j+m,n+m+1,inf);
            else if(s[j - 1] == 'o')add(i,j+m,1);
        }
    }
    s = 0;t = n + m + 1;
    int res = 0 , cnt = 0;
    while(BFS() , lv[s] != -1){
        res += DFS(s , inf);
    }
    if(res < inf)cout << res;
    else cout << -1;
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(a>0)
  {
  	cout<<"Positive"<<endl;
  	return 0;
  }
  else
  if(b>=0)
  {
  	cout<<"Zero"<<endl;
  	return 0;
  }
 else 
 if((a&1)^(b&1))
 {
 	cout<<"Positive"<<endl;
	 return 0;
 }
  else 
  cout<<"Negative"<<endl;
   return 0;
}

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

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

	a = toupper(a.at(0));
	b = toupper(b.at(0));
	c = toupper(c.at(0));

	cout << a << b << c << endl;
}

Measured memory_bytes: 256
/* while(!cin.eof()) */
 
#include<bits/stdc++.h>
using namespace std; 
#define int long long 
#define mod (int)(1e9+7)
#define MAXI (int)(1e15+100)
#define N 200005




// Driver code to test above functions
int32_t main()
{
   
     
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);

    int n;
    cin >> n;
    int a[n];
    int ans = 0;
    for(int i=0;i<n;i++)
        cin >> a[i];
    for(int i=0;i<n;i++)
    {
        for(int j=i+1;j<n;j++)
        {
            ans += a[i]*a[j];
        }
    }
    cout << ans;

    return 0;
    
} 

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

void fnInput(int &rnLodSiz, int &rnTrkSiz, vector<int> &rvnLod)
{
  cin >> rnLodSiz >> rnTrkSiz;

  rvnLod.resize(rnLodSiz);
  for (int i = 0; i < rnLodSiz; i++)
    cin >> rvnLod[i];
}

int fnSimuAlloc(const vector<int> &cnrvnLod, int nTrkSiz, int nLimLod)
{
  int nCurLod;
  int nTrkCnt = 0;

  for (int i = 0; i < cnrvnLod.size();    )
  {
    if (cnrvnLod[i] > nLimLod)  return 0;

    nTrkCnt++;
    nCurLod = 0;
    while (i < cnrvnLod.size())
    {
      nCurLod += cnrvnLod[i];
      if (nCurLod > nLimLod)  break;

      i++;
    }
  }
  return (nTrkCnt <= nTrkSiz);
}

void fnAlloc(const vector<int> &cnrvnLod, int nTrkSiz, int &rnMinLod)
{
  const int cnnMinLod = 0;
  const int cnnMaxLod = 1000000000;

  int nLow  = cnnMinLod;
  int nHigh = cnnMaxLod;
  rnMinLod  = cnnMaxLod;

  while (nLow < nHigh)
  {
    int nLimLod = (nLow + nHigh) / 2;
    if (fnSimuAlloc(cnrvnLod, nTrkSiz, nLimLod))
    {
      rnMinLod = min(rnMinLod, nLimLod);
      nHigh = nLimLod;
    }
    else
      nLow = nLimLod + 1;
  }
}

void fnReSult(int nMinLod)
{
  cout << nMinLod << endl;
}

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

  int nLodSiz, nTrkSiz;
  vector<int> vnLod;
  int nMinLod = 0;

  fnInput(nLodSiz, nTrkSiz, vnLod);
  fnAlloc(vnLod, nTrkSiz, nMinLod);
  fnReSult(nMinLod);

  return 0;
}

Measured memory_bytes: 1524
# YouTube
def main():
    n = int(input())
    s = input()
    dp = [[0] * (n + 1) for _ in range(n + 1)]
    for i, c in enumerate(s):
        for j in range(n):
            if c == s[j]:
                dp[i + 1][j + 1] = dp[i][j] + 1
    ans = 0
    for i in range(n):
        for j in range(i+1,n+1):
            tmp=min(dp[i][j],j-i)
            ans=max(tmp,ans)
    print(ans)

main()


Measured memory_bytes: 230792
from collections import Counter


def GCD(a: int, b: int) -> int:
    return a if b == 0 else GCD(b, a % b)


n = int(input())
a = list(map(int, input().split()))

m = max(a)
is_prime = [True] * (m + 1)
cnt_a = [0] * (m + 1)
for i in range(n):
    cnt_a[a[i]] += 1

is_pairwise_coprime = True
for i in range(2, m // 2 + 1):
    if is_prime[i]:
        cnt = cnt_a[i]
        for j in range(2, m // i + 1):
            cnt += cnt_a[i * j]
            is_prime[i * j] = False
        if cnt > 1:
            is_pairwise_coprime = False
            break

gcd_all = a[0]
for i in range(1, n):
    gcd_all = GCD(gcd_all, a[i])
is_setwise_coprime = gcd_all == 1

if is_pairwise_coprime:
    print('pairwise coprime')
elif is_setwise_coprime:
    print('setwise coprime')
else:
    print('not coprime')


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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
using P = pair<ll, ll>;
using V = vector<ll>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep1(i, n) for(ll i=1;i<=(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define INF 1000000000

ll dp[100001][4] = { { 0 } };

void solve_abc104() {
	string S;
	ll ans = 0;

	cin >> S;

	dp[0][0] = 1;
	rep(i, S.size()) {
		rep(j, 4) {
			if (S[i] == '?') {
				dp[i + 1][j] += 3 * dp[i][j];
			}
			else {
				dp[i + 1][j] += dp[i][j];
			}
			dp[i + 1][j] %= MOD;
		}

		if (S[i] == 'A' || S[i] == '?') {
			dp[i + 1][1] += dp[i][0];
		}
		
		if (S[i] == 'B' || S[i] == '?') {
			dp[i + 1][2] += dp[i][1];
		}
		
		if (S[i] == 'C' || S[i] == '?') {
			dp[i + 1][3] += dp[i][2];
		}

		rep(j, 4) {
			dp[i + 1][j] %= MOD;
		}
	}

	ans = dp[S.size()][3];

	cout << ans << "\n";
}

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

	solve_abc104();

	return 0;
}

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

using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define MIN(a,b) ((a)>(b)? (b): (a))
#define MAX(a,b) ((a)<(b)? (b): (a))

const long long INF = 1LL << 60;
typedef unsigned long long ll;
const long long MOD = 1000000000 + 7;

int main() {
    int n, m;
    cin >> n >> m;
    int k;
    vector<int> mask(n, 0);
    rep(i, m) {
        cin >> k;
        rep(j, k) {
            int tmp;
            cin >> tmp;
            mask[i] |=(1<<tmp-1);
        }
    }
    vector<int> p(n);
    rep(i, m) {
        cin >> p[i];
    }
    int out = 0;
    for (int bit = 0; bit < (1 << n); ++bit) {
        bool flag = true;
        rep(i, m) {
            int tmp = bit & mask[i];
            if (__builtin_popcount(tmp)%2!=p[i]) {
                flag = false;
                break;
            }
        }
        if (flag) {
            out++;
        }
    }
    cout << out << endl;
    return 0;
}

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

int H;
int W; 

char M[10][10];
int X[10][10];

int N;

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

    cin >> H >> W;

    for (int i = 0; i < H; ++i) {
        cin >> M[i];
    }

    N = 0;
    for (int i = 0; i < H; ++i) {
        for (int j = 0; j < W; ++j) {
            if (M[i][j] == '#') {
                N++;
            }
        }
    }

    memset(X, 0, sizeof(X));
    X[0][0] = 1;

    bool b;

    while (true) {
        b = false;

        for (int i = 0; i < H; ++i) {
            for (int j = 0; j < W; ++j) {
                if (i > 0 && M[i-1][j] == '#') {
                    if (X[i-1][j] + 1 > X[i][j]) {
                        X[i][j] = max(X[i][j], X[i-1][j]+1);
                        b = true;
                    }
                }

                if (j > 0 && M[i][j-1] == '#') {
                    if (X[i][j-1] + 1 > X[i][j]) {
                        X[i][j] = max(X[i][j], X[i][j-1]+1);
                        b = true;
                    }
                }
            }
        }

        if (!b) {
            break;
        }
    }

    if (X[H-1][W-1] == N) {
        cout << "Possible" << endl;
    } else {
        cout << "Impossible" << endl;
    }

    return 0;
}


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

using namespace std;

int main() {
    int a, b, c, d;
    scanf("%d %d %d %d", &a, &b, &c, &d);
    if (a + b > c + d)
            puts("Left");
    else if (a + b < c + d)
            puts("Right");
    else
            puts("Balanced");
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<math.h>
using namespace std;
#define N (1000000000+7)
#define INF 1e16
typedef long long ll;
typedef pair<ll,ll> P;

ll dp[200010];
ll mostright[200010];

int main(void){
    ll n;
    cin>>n;
    vector<ll>in(n),c;
    for(ll i=0;i<n;i++){
        cin>>in[i];
    }
    for(ll i=0;i<n;){
        ll j=i;
        while(true){
            if(i==n)break;
            if(in[j]==in[i])i++;
            else break;
        }
        c.push_back(in[j]);
    }
    for(ll i=0;i<200010;i++)mostright[i]=-1;
    dp[0]=0;
    dp[1]=1;
    mostright[c[0]]=1;
    for(ll i=1;i<(ll)c.size();i++){
        dp[i+1]=dp[i];
        if(mostright[c[i]]!=-1)dp[i+1]=(dp[i+1]+dp[mostright[c[i]]])%N;
        mostright[c[i]]=i+1;
        //cout<<i+1<<" "<<dp[i+1]<<endl;
    } 
    cout<<dp[(ll)c.size()]<<endl;
    return 0;
}


Measured memory_bytes: 6640
#include<cstdio>
#include<string>
#include<cstring>
#include<utility>
#include<cmath>
#include<map>
#include<queue>
#include<set>
#include<algorithm>
#include<vector>
#include<iostream>
#define ll long long
#define pii pair<int,int>
#define mp make_pair
#define fi first
#define se second
#define inf 0x7fffffff
using namespace std;
int dp[2][110],a[2][110];
int main()
{
	int i,j,k,n,m,x,y;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[0][i]);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[1][i]);
	}
	for(i=0;i<2;i++)
	{
		for(j=0;j<n;j++)
		{
			if(i>0)
			{
				dp[i][j]=max(dp[i][j],dp[i-1][j]);
			}
			if(j>0)
			{
				dp[i][j]=max(dp[i][j],dp[i][j-1]);
			}
			dp[i][j]+=a[i][j];
		}
	}
	printf("%d",dp[1][n-1]);
	return 0;
}

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

long	GCM(long A, long B) {
	while (0!=B) {
		A %=B;
		swap(A, B);
	}
	return A;
}

int	main() {
	long A, B;
	cin >>A >>B;
	long C=GCM(A, B);
	long CC=sqrt(C);
	long i=2;
	vector<long> AA(0);
	AA.push_back(1);
	while (i<=CC) {
		if (0==C%i) {
			AA.push_back(i);
			C /=i;
		} else {
			i++;
		}
	}
	if (1!=C)
		AA.push_back(C);
	sort(AA.begin(), AA.end());
	AA.erase(unique(AA.begin(), AA.end()), AA.end());
	cout <<AA.size() <<endl;
	return 0;
};


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<string>
#include<stdio.h>
#include<stdlib.h>
#include<float.h>
#include<tuple>
#include<string.h>
#include<iomanip>
#include<stack>
#include<queue>

using namespace std;
#define ll long long
#define rep(i,n) for(ll i=0;i<n;i++)
#define ALLOF(c) (c).begin(), (c).end()
#define Pa pair<ll,ll>
const ll mod=10e9+7;
const ll INF=10e12;
const ll inf=-1;
ll ABS(ll a){return max(a,-a);}

int main(void){
    string S;
    cin>>S;
    ll ans=S.size();
    rep(i,S.size()-1){
        if(S.at(i)==S.at(i+1)){
            ans--;
            i+=2;
        }
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 640
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    count = 0
    for a in range(1,n+1):
        for b in range(a+1,n+1):
            for c in range(b+1, n+1):
                if a + b + c == x:
                    count += 1
    print(count)

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

int main()
{
    string s;
    cin >> s;
    int m = (s[5] - '0') * 10 + s[6] - '0';
    int d = (s[8] - '0') * 10 + s[9] - '0';

    if(m > 4){
        cout << "TBD" ;
    }else{
        cout << "Heisei";
    }
}

Measured memory_bytes: 256
import sys


n,a,b=map(int,input().split())
if(b<a):print(0)
elif(b==a):print(1)
else:
    if(n==1):print(0)
    elif(n==2):print(1)
    else:
        num=((n-1)*b+a)-((n-1)*a+b)+1
        print(num)

Measured memory_bytes: 3064
from collections import deque
INF = float('INF')

while(1):
  w, h = map(int, input().split())
  if(w == 0 and h == 0):
    break
  wall = list() #偶数行が縦の壁、奇数行が横の壁
  for i in range(h*2-1):
    wall.append(list(map(int, input().split())))
  dist = [[INF] * w for _ in range(h)]
  dist[0][0] = 1
  q = deque([(0, 0)])
  while q:
    x, y = q.popleft()
    if(y >= 1): #左
      if(dist[x][y-1] == INF):
        if(wall[x*2][y-1] == 0):
          dist[x][y-1] = dist[x][y] + 1
          q.append((x, y-1))
    if(y <= w-2): #右
      if(dist[x][y+1] == INF):
        if(wall[x*2][y] == 0):
          dist[x][y+1] = dist[x][y] + 1
          q.append((x, y+1))
    if(x >= 1): #上
      if(dist[x-1][y] == INF):
        if(wall[2*x-1][y] == 0):
          dist[x-1][y] = dist[x][y] + 1
          q.append((x-1, y))
    if(x <= h-2): #下
      if(dist[x+1][y] == INF):
        if(wall[2*x+1][y] == 0):
          dist[x+1][y] = dist[x][y] + 1
          q.append((x+1, y))
    
  if(dist[h-1][w-1] == INF):
    print(0)
  else:
    print(dist[h-1][w-1])


Measured memory_bytes: 6044
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
typedef long long ll;

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

const long long INF = 1LL << 60;

int main(){
  int y, m, d;
  char c1, c2;
  cin >> y >> c1 >> m >> c2 >> d;

  cout << (m < 5 ? "Heisei" : "TBD") << endl;

  return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include<iostream>
#include<map>
#include<algorithm>
#include<vector>
#include <cmath>
#include <iomanip>
#include <regex>
#include <queue>
#include <set>
using namespace std;
using ll = long long;
using Lf = long double;
using plong = pair<ll,ll>;


const long MOD = 1000000007;
int main(){
    ll H,W;
    cin>>H>>W;
    ll a[H][W];
    ll odd=0;
    for(ll i=0;i<H;i++){
        for(ll j=0;j<W;j++){
            cin>>a[i][j];
            if(a[i][j]%2==1)odd++;
        }
    }
    ll x=0,y=0;
    bool back=false;
    vector<plong> pre,post;
    while(true){
        if(a[x][y]%2==1){
            if(!back&&y<W-1){
                pre.push_back({x,y});
                y++;
                post.push_back({x,y});
                a[x][y]++;
            }else if(back&&y>0){
                pre.push_back({x,y});
                y--;
                post.push_back({x,y});
                a[x][y]++;
            }else if(x==H-1){
                break;

            }else if(back&&y==0){
                back = false;
                pre.push_back({x,y});
                x++;
                post.push_back({x,y});
                a[x][y]++;
            }else{
                back = true;
                pre.push_back({x,y});
                x++;
                post.push_back({x,y});
                a[x][y]++;
            }
        }else{
            if(!back&&y<W-1){
                y++;
            }else if(back&&y>0){
                y--;
            }else if(back&&y==0){
                back = !back;
                x++;
            }else{
                back = !back;
                x++;
            }
        }
        if((x==H&&y==0)||(x==H&&y==W-1)){
            break;
        }
    }
    
    cout<<post.size()<<endl;
    for(ll i=0;i<post.size();i++){
        cout<<pre[i].first+1<<" "<<pre[i].second+1<<" "<<post[i].first+1<<" "<<post[i].second+1<<"\n";
    }
}

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

int sx, tx, sy, ty, x, y;
int main()
{
	int i;
	cin >> sx >> sy >> tx >> ty;
	x = tx - sx;
	y = ty - sy;
	for (i = 0; i < y; i++) printf("U");
	for (i = 0; i < x; i++) printf("R");
	for (i = 0; i < y; i++) printf("D");
	for (i = 0; i < x; i++) printf("L");
	printf("LU");
	for (i = 0; i < y; i++) printf("U");
	for (i = 0; i < x; i++) printf("R");
	printf("RDRD");
	for (i = 0; i < y; i++) printf("D");
	for (i = 0; i < x; i++) printf("L");
	printf("LU");
    return 0;
}


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

int main(){
  int D, N;
  cin >> D >> N;
  int num = 1;
  for(int i = 0; i < D; i++){
    num *= 100;
  }
  if(N == 100) cout << num * (N + 1) << endl;
  else cout << num * N << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A;
  int a,b,c,d;
  cin >> A;
  a = A/1000;
  b = (A-a*1000)/100;
  c = (A- a*1000 - b*100)/10;
  d = A - a*1000 - b*100 - c*10;
 
  if(a==b && b==c && c==d){
    cout << "Yes" <<endl;
  }
  else if(a==b && b==c && a!=d){
    cout <<"Yes" <<endl;
  }
  else if(c==b && d==c && a!=b){
    cout <<"Yes" <<endl;
  }
  else cout<< "No" << endl;
  } 


Measured memory_bytes: 256
from collections import deque
k=int(input())
d=deque([1,2,3,4,5,6,7,8,9])
num=[1,2,3,4,5,6,7,8,9]
while d:
  now=d.popleft()
  hitoketa=now%10
  for i in [-1,0,1]:
    if 0<=hitoketa+i<=9:
      nxt=now*10+hitoketa+i
      if nxt<=3234566667:
        #print(nxt)
        num.append(nxt)
        d.append(nxt)
num.sort()
print(num[k-1])


Measured memory_bytes: 13956
#include <iostream>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;

int main() {
    double hei, wei;
    int num;
    char c1, c2;

    while (cin >> num) {
        cin >> c1 >> wei >> c2 >> hei;
        if (wei / hei / hei >= 25) {
            cout << num << endl;
        }
    }
}

Measured memory_bytes: 3136
#define task "test"

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair <int, int> ii;
typedef pair <ll, ll> pll;

#define pb push_back
#define mp make_pair
#define X first
#define Y second

const ll LINF = 1E18;
const int INF = 1E9;
const int MOD = 1E9 + 7;
const int N = 2E5 + 5;

int t = 1;

int n, m, nump[N], pa[N];
bool avail[N];
vector <int> A[N];
set <ii> S[N];

void Input()
{
    cin >> n >> m;
    for (int i = 1; i <= n + m - 1; i++) {
        int u, v;
        scanf("%d%d", &u, &v);
        A[u].pb(v);
        nump[v]++;
    }
}

void Prepare()
{
    /*for (int u = 1; u <= n; u++) {
        for (int v : A[u]) S[u].insert({nump[v], v});
    }*/
}

void DFS(int u, int p)
{
    pa[u] = p;
    avail[u] = 0;

    for (int v : A[u]) if (v != p) {
        nump[v]--;
    }
    for (int v : A[u]) if (v != p && avail[v] && !nump[v]) DFS(v, u);
}

void Solve()
{
    int root = 0;
    for (int i = 1; i <= n; i++) if (!nump[i]) root = i;
    memset(avail, 1, sizeof(avail));
    DFS(root, 0);

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

int main()
{
    if (fopen(task ".inp","r")){
        freopen(task ".inp","r",stdin);
        freopen(task ".out","w",stdout);
    }
    // cin >> t;
    while (t--) {
        Input();
        Prepare();
        Solve();
    }
}



Measured memory_bytes: 23680
#include <bits/stdc++.h>
using namespace std;
 
#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v).begin(), (v).end()
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)
#define DEBUG
#define int long long
#define INF 1e9
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T> ostream& operator << (ostream &s, set<T> P)
{ EACH(it, P) { s << "<" << *it << "> "; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }
template<class T>void show(vector<T>v){for (int i = 0; i < v.size(); i++){cerr<<v[i]<<" ";}cerr<<"\n";}
typedef long long ll;
char t[200010];
int d[200010];
int n,q;
string s;
bool left(int p){
    for (int i = 0; i < q; i++)
    {
        if(s[p]-'A'==t[i]-'A'){
            p+=d[i];
            if(p<0) return true;
            if(p>=n) return false; 
        }
    }
    return false;
}
bool right(int p){
    for (int i = 0; i < q; i++)
    {
        if(s[p]-'A'==t[i]-'A'){
            p+=d[i];
            if(p>=n) return true;
            if(p<0) return false; 
        }
    }
    return false;
}


signed main(){
    
    cin >> n >> q;
    cin >> s;
    for (int i = 0; i < q; i++)
    {
        cin >> t[i];
        char x;
        cin >> x;
        if(x=='L') d[i]=-1;
        else d[i]=1;
    }
    int ret=n;
    int l=-1,r=n;
    while(r-l > 1){
        int mid=l+(r-l)/2;
        if(left(mid)) l=mid;
        else r=mid;
    }
    ret-=l;
    l=-1,r=n;
    while(r-l > 1){
        int mid=l+(r-l)/2;
        if(right(mid)) r=mid;
        else l=mid;
    }
    ret-=n-l;
    cout<<ret<<endl;
    return 0;
}

Measured memory_bytes: 2308
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <cassert>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define chmax(a,b) (a<(b)?(a=b,1):0)
#define chmin(a,b) (a>(b)?(a=b,1):0)
#define valid(y,x,h,w) (0<=y&&y<h&&0<=x&&x<w)
const int INF = 1<<29;
const double EPS = 1e-8;
const double PI = acos(-1);
typedef pair<int,int> pii;
typedef long long ll;

char a[50][50];
int dp[50][50][4][1<<11];
int bitMap[4][1<<11][4];
bool canGet[4][1<<11][4];
vector<pii> needCells[4];

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

int h,w,K;

int solve(int y, int x, int k, int S){
  int &r = dp[y][x][k][S];
  if (r != -1) return r;
  int res = -INF;
  if (y==h-1&&x==w-1) res = 0;
  REP(d,4) {
    int nk = k+(d>=2);
    if (nk>K) continue;
    int ny = y+dy[d];
    int nx = x+dx[d];
    if (!valid(ny,nx,h,w)) continue;
    if (a[ny][nx] == '#') continue;
    int score = canGet[k][S][d]&&isdigit(a[ny][nx]) ? a[ny][nx]-'0' : 0;
    chmax(res, solve(ny,nx,nk,bitMap[k][S][d]) + score);
  }
  // cout << y << " " << x << " " << k << " ";
  // REP(i,needCells[k].size()) {
  //   if (S>>i&1) {
  //     pii p = needCells[k][i];
  //     cout << "(" << p.first << "," << p.second << ")";
  //   }
  // }
  // cout << " " << res << endl;
  return r = res;
}

int main() {
  REP(k,4) {
    for (int y=-3; y<=3; ++y) {
      for (int x=-3; x<=3; ++x) {
        if ((y||x) && -min(y,0)-min(x,0) <= 3-k && max(0,y)+max(0,x) <= k)
          needCells[k].push_back(pii(y,x));
      }
    }
  }
  REP(k,4) {
    int n = needCells[k].size();
    REP(S,1<<n) {
      REP(d,4) {
        int nk = k+(d>=2);
        if (nk == 4) continue;
        int T = 0;
        REP(i,n) {
          if (S>>i&1) {
            pii p = needCells[k][i];
            p.first -= dy[d];
            p.second -= dx[d];
            REP(j,needCells[nk].size()) {
              if (needCells[nk][j] == p) {
                T |= 1 << j;
              }
            }
          }
        }
        REP(j,needCells[nk].size()) {
          if (needCells[nk][j] == pii(-dy[d],-dx[d])) {
            T |= 1 << j;
          }
        }
        bitMap[k][S][d] = T;

        canGet[k][S][d] = 1;
        REP(i,n)
          if (S>>i&1 && needCells[k][i]==pii(dy[d],dx[d]))
            canGet[k][S][d] = 0;
      }
    }
  }
  while(cin>>h>>w>>K) {
    REP(i,h) REP(j,w) cin >> a[i][j];
    memset(dp,-1,sizeof(dp));
    cout << solve(0,0,0,0) << endl;
  }
  
}

Measured memory_bytes: 81332
#include <stdio.h>
int main()
{
	long long sum=0;
	int n,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&j);
		sum=sum+j-1;
	}
	printf("%lld\n",sum);
	return 0;
}

Measured memory_bytes: 128
#include<cstdio>
#include<vector>
#include<algorithm>
 
#define rep(i,n) for(int i=0;i<(n);i++)
 
using namespace std;
 
struct angle{
    int x,y,delta;
    bool operator<(const angle &a)const{
        return y*a.x==x*a.y ? delta<a.delta : y*a.x<x*a.y;
    }
};
 
#define O(i,j) (0<=i && i<h && 0<=j && j<w && B[i][j]=='#')
#define X(i,j) (!O(i,j))
 
int main(){
    int h,w; scanf("%d%d",&h,&w);
    char B[600][601];
    rep(i,h) scanf("%s",B[i]);
 
    vector<angle> A;
    rep(i,h+1) rep(j,w+1) {
        if(O(i-1,j-1) && X(i-1,j)
        && X( i ,j-1) && X( i ,j)) A.push_back((angle){j,h-i,1});
        if(X(i-1,j-1) && O(i-1,j)
        && O( i ,j-1) && O( i ,j)) A.push_back((angle){j,h-i,1});
        if(O(i-1,j-1) && O(i-1,j)
        && O( i ,j-1) && X( i ,j)) A.push_back((angle){j,h-i,-1});
        if(X(i-1,j-1) && X(i-1,j)
        && X( i ,j-1) && O( i ,j)) A.push_back((angle){j,h-i,-1});
    }
    sort(A.begin(),A.end());
 
    int ans=1,num=1;
    rep(i,A.size()) num+=A[i].delta, ans=max(ans,num);
    printf("%d\n",ans);
 
    return 0;
}

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

enum inf3 = 1_001_001_001;
enum inf6 = 1_001_001_001_001_001_001L;
enum mod = 1_000_000_007;




void main() {
    int n;
    scan(n);
    auto a = readln.split.to!(int[]);
    auto b = readln.split.to!(int[]);

    long ans;

    foreach (i ; 0 .. n) {
        int t = min(a[i], b[i]);
        ans += t;
        b[i] -= t;
        if (b[i] > 0) {
            int tt = min(b[i], a[i + 1]);
            ans += tt;
            a[i + 1] -= tt;
        }
    }

    writeln(ans);
}


















int[][] readGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new int[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v;
        scan(u, v);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= v;
        if (isUndirected) {
            adj[v] ~= u;
        }
    }

    return adj;
}

alias Edge = Tuple!(int, "to", int, "cost");

Edge[][] readWeightedGraph(int n, int m, bool isUndirected = true, bool is1indexed = true) {
    auto adj = new Edge[][](n, 0);

    foreach (i; 0 .. m) {
        int u, v, c;
        scan(u, v, c);
        if (is1indexed) {
            u--, v--;
        }
        adj[u] ~= Edge(v, c);
        if (isUndirected) {
            adj[v] ~= Edge(u, c);
        }
    }

    return adj;
}

void yes(bool b) {
    writeln(b ? "Yes" : "No");
}

void YES(bool b) {
    writeln(b ? "YES" : "NO");
}

T[] readArr(T)() {
    return readln.split.to!(T[]);
}

T[] readArrByLines(T)(int n) {
    return iota(n).map!(i => readln.chomp.to!T).array;
}

void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}

void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

bool chmin(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x > arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}

bool chmax(T, U...)(ref T x, U args) {
    bool isChanged;

    foreach (arg; args) {
        if (x < arg) {
            x = arg;
            isChanged = true;
        }
    }

    return isChanged;
}


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

#define fs first
#define se second
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb emplace_back

using pii = pair<int, int>;
using vi = vector<int>;
using lint = long long;

const int inf = 1001001001;
const lint linf = 1001001001001001001ll;
const int mod = 1e9 + 7;
const int dx[]{0, 1, 0, -1, -1, -1, 1, 1}, dy[]{1, 0, -1, 0, -1, 1, -1, 1};

template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; } return a > b; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; } return a < b; }
template<typename T> inline void print(const T &x, string s = "\n") { cout << x << s; }
template<typename T> inline void print(const vector<T> &v, string s = " ") 
{ rep(i, v.size()) cout << v[i] << (i + 1 == v.size() ? "\n" : s); }
inline bool inside(int y, int x, int H, int W) { return 0 <= y && y < H && 0 <= x && x < W; }
inline lint in() { lint x; std::cin>>x; return x; }

int main() {
	lint n = in(), m = in();

	lint ans = min(n, m / 2);
	n -= ans;
	m -= ans * 2;

	cout << ans + m / 4 << endl;
}



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

namespace AtCoderWorkspace
{
    public class Solver
    {
        public void Solve()

        {
            var cin = new Scanner();
            var s = cin.next();
            var ans = 0;
            var count = 0;
            foreach (var c in s)
            {                
                if ("ACGT".Contains(c))
                {
                    count++;
                    ans = Math.Max(ans, count);
                }
                else
                {
                    count = 0;
                }
            }
            Console.WriteLine(ans);
        }
    }

    class Scanner
    {
        string[] s;
        int i;

        char[] cs = new char[] { ' ' };

        public Scanner()
        {
            s = new string[0];
            i = 0;
        }

        public string next()
        {
            if (i < s.Length) return s[i++];
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();
            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            if (s.Length == 0) return next();
            i = 0;
            return s[i++];
        }

        public int nextInt()
        {
            return int.Parse(next());
        }
        public int[] ArrayInt(int N, int add = 0)
        {
            int[] Array = new int[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextInt() + add;
            }
            return Array;
        }

        public int[] DPArrayInt(int N, int ex)
        {
            int[] Array = new int[N+ex];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextInt();
            }
            return Array;
        }

        public long nextLong()
        {
            return long.Parse(next());
        }

        public long[] ArrayLong(int N, long add = 0)
        {
            long[] Array = new long[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextLong() + add;
            }
            return Array;
        }

        public long[] DPArrayLong(int N, int ex)
        {
            long[] Array = new long[N + ex];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextLong();
            }
            return Array;
        }

        public double nextDouble()
        {
            return double.Parse(next());
        }


        public double[] ArrayDouble(int N, double add = 0)
        {
            double[] Array = new double[N];
            for (int i = 0; i < N; i++)
            {
                Array[i] = nextDouble() + add;
            }
            return Array;
        }
    }   

    class Program
    {
        static void Main(string[] s) => new Solver().Solve();
    }
}


Measured memory_bytes: 13268
using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Numerics;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
using static System.Math;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;

static class P
{
    static void Main()
    {
        var k = int.Parse(Console.ReadLine());
        Console.WriteLine(k / 2 * (k - k / 2));
    }
}


Measured memory_bytes: 13140
import java.util.*;

class Main{
	public static void main(String[] $){
		Scanner s=new Scanner(System.in);
		int n=s.nextInt(),m=s.nextInt();
		long[]a=new long[n+1];
		for(int i=0;i<m;++i)
			a[s.nextInt()]=-1;

		a[0]=1;
		for(int i=1;i<=n;++i) {
			if(a[i]==-1) {
				a[i]=0;
				continue;
			}

			a[i]=a[i-1];
			if(i>=2) {
				a[i]+=a[i-2];
				a[i]%=1000000007;
			}
		}
		System.err.println(Arrays.toString(a));
		System.out.println(a[n]);
	}
}

Measured memory_bytes: 51352
#include<bits/stdc++.h>
using namespace std;
char str[1000005];
int main() {
	cin>>str+1;
	int n = strlen(str + 1);
	if (str[1] == 'A') {
		if(str[2] == 'C' || (str[2] < 'a' || str[2] > 'z') || str[n] == 'C' || str[n] < 'a' || str[n] > 'z'){
			cout<<"WA"<<endl;
			return 0;
		}
		int count = 0;
		for(int i = 3; i <= n - 1; i++) {
			if (str[i] == 'C') {
				count++;
			}
		}
		if(count == 1){
			for(int i = 3; i <= n - 1; i++){
				if((str[i] < 'a' || str[i] > 'z') && str[i] != 'C') {
					cout<<"WA"<<endl;
					return 0;
				}
			}
			cout<<"AC"<<endl;
			return 0;
			
		} else {
			cout<<"WA"<<endl;
			return 0;
		}
	}
	cout<<"WA"<<endl;
	return 0;
} 

Measured memory_bytes: 256
import itertools
n,m = map(int,input().split())
seq = [0,1]
v_list = list((itertools.product(seq,repeat = n)))
ks = []
ans = 0
for i in range(m):
    ks.append(list(map(int,input().split())))
p = list(map(int,input().split()))
s = set()
for i in range(m):
    for j in range(ks[i][0]):
        s.add(ks[i][j+1])

for x in range(2**n):
    counter = 0
    for i in range(m):
        tmp = 0
        for j in range(ks[i][0]):
            tmp += v_list[x][ks[i][j+1] - 1]
        if tmp % 2 == p[i]:
            counter +=1
    if counter == m:
        ans +=1
print(ans)

Measured memory_bytes: 3188
import java.io.BufferedReader
import java.io.InputStream
import java.io.InputStreamReader
import java.io.PrintWriter
import java.lang.StringBuilder
import java.util.*

fun PrintWriter.solve(sc: FastScanner) {
    val a = sc.nextInt()
    val v = sc.nextInt()
    val b = sc.nextInt()
    val w = sc.nextInt()
    val t = sc.nextInt()
    if (v <= w) {
        println("NO")
        return
    }
    val d = Math.abs(a - b)
    val s = v - w
    val time = (d + s - 1) / s
    if (time > t) {
        println("NO")
    } else {
        println("YES")
    }
}

fun main(args: Array<String>) {
    val writer = PrintWriter(System.out, false)
    writer.solve(FastScanner(System.`in`))
    writer.flush()
}

class FastScanner(s: InputStream) {
    private var st = StringTokenizer("")
    private val br = BufferedReader(InputStreamReader(s))

    fun next(): String {
        while (!st.hasMoreTokens()) st = StringTokenizer(br.readLine())

        return st.nextToken()
    }

    fun nextInt() = next().toInt()
    fun nextLong() = next().toLong()
    fun nextLine() = br.readLine()
    fun nextDouble() = next().toDouble()
    fun ready() = br.ready()
}

Measured memory_bytes: 34332
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
def factorial(n):
    if (n==0) or (n==1):
        return 1
    ret = 1
    for i in range(2, n+1):
        ret *= i
    return ret
def combination(n, k):
    return factorial(n)//factorial(k)//factorial(n-k)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

N, M = LI()
xy = LIR(M)

utov = [[] for i in range(N+1)]
for x, y in xy:
    utov[x].append(y)

dp = [-1]*(N+1)

def rec(u):
    if (dp[u] != -1):
        return dp[u]
    res = 0
    for v in utov[u]:
        res = max(res, rec(v)+1)
    dp[u] = res
    return res

ans = 0
for i in range(N+1):
    ans = max(ans, rec(i))
print(ans)


Measured memory_bytes: 163804
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> ab(100000);
vector<pair<int, int>> ori_ab(100000);
int main(void){
    int N;
    cin >> N;
    
    map<pair<int, int>, int> mp;
    for (int i = 0; i < N-1; i++) {
        int a, b;
        cin >> a >> b;
        ori_ab[i] = make_pair(a, b);
        ab[i] = make_pair(a, b);
        mp[make_pair(a, b)] = 0;
    }
    
    sort(ab.begin(), ab.begin()+N-1);
    
    int hen[100000] = {0};
    for (int i = 0; i < N-1; i++) {
        hen[ab[i].first-1]++;
        hen[ab[i].second-1]++;
    }
    int color = 0;
    for (int i = 0; i < N-1; i++)
        color = max(color, hen[i]);
    cout << color << endl;
    
    int parent_color[100000] = {0}, child_color[100000] = {0};
    for (int i = 0; i < N-1; i++) {
        if (child_color[ab[i].first-1]+1 != parent_color[ab[i].first-1]) {
            parent_color[ab[i].second-1] = child_color[ab[i].first-1]+1;
            child_color[ab[i].first-1]++;
            mp[ab[i]] = parent_color[ab[i].second-1];
            //cout << parent_color[ab[i].second-1] << endl;
        }
        else {
            parent_color[ab[i].second-1] = child_color[ab[i].first-1]+2;
            child_color[ab[i].first-1]+=2;
            mp[ab[i]] = parent_color[ab[i].second-1];
            //cout << parent_color[ab[i].second-1] << endl;
        }
    }
    
    for (int i = 0; i < N-1; i++)
        cout << mp[ori_ab[i]] << endl;
    
}

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

int main() {
  int N,K;
  int ans = 0;
  cin >> N>>K;
  
  vector<int> h(N);
  for (int i = 0; i < N; i++) {
    cin >> h[i];
    if(h[i]>=K){
      ans++;
    }
  }
  cout<< ans <<endl;
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, i, B, digit = 1, sum = 0, C;
  cin >> N;
  
  B = N; // Nのバックアップ
  C = N; // Nのバックアップ

  //N の桁数
  
 for ( i = 0; i < N; i++) { 
   if (B / 10 > 0) {
     B = B / 10;
     digit++;
   }
   else {
     break;
   }
}

  //Nの数字一覧
  
   for ( i = 0; i < digit; i++) { 
	sum += N % 10;
     N /= 10;
   }
 
  if( C % sum == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  
}

Measured memory_bytes: 3624
#include<bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define M (L+R)/2
#define N 500009
#define inf 99999999999
#define ll long long
using namespace std;
ll n,a[N],b[61],c[61],x;
unsigned long long ans,sum;
int main(){

	ios::sync_with_stdio(0);
	
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		x=a[i];
		for(int j=0;j<=60;j++){
			if(x&1)b[j]++;
			else c[j]++;
			x=(x>>1);
		
		}
	}
	x=1;
	for(int i=0;i<=60;i++){
		x%=1000000007;
		sum=b[i]*c[i];
		sum%=1000000007;
		sum*=x;
		sum%=1000000007;
		ans+=sum;
		ans%=1000000007;
		
		x=(x<<1);
	}
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 2560