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

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cout<<setprecision(32);

	int n;
	cin>>n;
	ll ans = 1;
	for(int i = 0; i < n; i++){
		ll x; cin>>x;
		ans = ans*(x/__gcd(x, ans));
	}
	cout<<ans<<endl;

	return 0;
}

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

using namespace std;

const int INF = 1e9;

int main(){

    int A, B, M;
    cin >> A >> B >> M;
    vector<int> a(A);
    int minA = INF;
    for(int i = 0; i < A; i++){
        cin >> a[i];
        minA = min(minA, a[i]);
    }
    vector<int> b(B);
    int minB = INF;
    for(int i = 0; i < B; i++){
        cin >> b[i];
        minB = min(minB, b[i]);
    }

    int ans = minA + minB;

    int x, y, c;
    for(int i = 0; i < M; i++){
        cin >> x >> y >> c;
        int temp = a[x - 1] + b[y - 1] - c;
        ans = min(ans, temp);
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 1024
#include <iostream>

using namespace std;

int main() 
{
    int i, a, b, temp;
    for(i=1; i<=3000; i++)
    {
       cin >> a >> b;
       if(a==0 && b==0)
         break;
         
        if(a > b)   
        {
           temp = a;
           a = b;
           b = temp; 
          
        }
        
        cout << a << " " << b << endl;
    }
}


Measured memory_bytes: 3076
#include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rp(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

void solve(){
    int n,k;
    cin >> n >> k;
    if(n%k==0) print(0);
    else print(1);
    return;
}
int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    solve();
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(){
	int a;
	cin>>a;
	if (a%7==0) cout<<"thu"<<endl;
	if (a%7==1) cout<<"fri"<<endl;
	if (a%7==2) cout<<"sat"<<endl;
	if (a%7==3) cout<<"sun"<<endl;
	if (a%7==4) cout<<"mon"<<endl;
	if (a%7==5) cout<<"tue"<<endl;
	if (a%7==6) cout<<"wed"<<endl;
	return 0;
}

Measured memory_bytes: 3112
#include <bits/stdc++.h>
        using namespace std;
   #define int long long
const int MAX = 510000;
const int MOD =  998244353;
const int  Inv2 = (MOD+1)/2;

     signed main(){
  string s;
  cin>>s;
  for(int i=0;i<s.size();i++){
     if(s[i]==',')cout<<' ';
     else cout<<s[i];
  }
   cout<<endl;         
}

        


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

const int N=1e6+10;

class dsu{
	public:
	vector<int>p;
	int n;
		
	dsu(int _n):n(_n){
		p.resize(n);
		iota(p.begin(),p.end(),0);
	}
	inline int get(int x){
		return (x==p[x]?x:(p[x]=get(p[x])));
	}
	inline bool unite(int x,int y){
		x=get(x);
		y=get(y);
		if(x!=y){
			p[x]=y;
			return 1;
		}
		return 0;
	}
};

int main(){
	
	
	ios::sync_with_stdio(false);
  	cin.tie(0);
	int n,m;
	cin>>n>>m;
	int u,v;
	vector<vector<int>>g(n);
	for(int i=0;i<m;i++){
		cin>>u>>v;
		u--,v--;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	vector<int>deg(n);
	for(int i=0;i<n;i++)
		deg[i]=g[i].size();
	
	for(int i=0;i<n;i++)
		if(deg[i]%2){
			cout<<"No\n";return 0;
		}
	for(int i=0;i<n;i++)
		if(deg[i]>=6){
			cout<<"Yes\n";return 0;
		}
	for(int i=0;i<n;i++)
		if(deg[i]>=4){
			dsu d(n);
			for(int j=0;j<n;j++)
				if(j!=i){
					for(int k:g[j])
						if(k!=i&&k<j){
							if(!d.unite(j,k)){
								cout<<"Yes\n";return 0;
							}
						}
				}
		}
	cout<<"No\n";return 0;
			
}
/*

1 2 1 2


1 2 3 3 2

1 2 2 3 3


*/


Measured memory_bytes: 6528
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
using namespace std;

int main()
{
    for(;;){
        int n;
        cin >> n;
        if(n == 0)
            return 0;

        bool isLeftUp = false;
        bool isRightUp = false;
        bool isFloor = true;
        int ans = 0;
        while(--n >= 0){
            string s;
            cin >> s;
            if(s[0] == 'l')
                isLeftUp ^= true;
            else
                isRightUp ^= true;

            if(isFloor && isLeftUp && isRightUp){
                ++ ans;
                isFloor = false;
            }
            else if(!isFloor && !isLeftUp && !isRightUp){
                ++ ans;
                isFloor = true;
            }
        }

        cout << ans << endl;
    }
}

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

int main(){
	string s;
	while(1){
		 cin>>s;
	     if(s=="0")break;
	     int sum=0;
	     for(int i=0;i<s.size();i++){
            sum+=(int)s[i]-'0';
         }
         cout<<sum<<endl;
    }     
    return 0;
}    	
	
	   
	      



Measured memory_bytes: 3156
#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include<cassert>
#include<cmath>
#include<cstdint>

#define INF 1e9
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()

using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<char,int>;

const ll MOD = INF + 7;

ll mpow(ll x, ll n){
    ll ans = 1;
    while(n != 0){
        if(n & 1)ans = ans * x % MOD;
        x = x * x % MOD;
        n = n >> 1;
    }
    return ans;
}

int main(){
   int n;
   cin >> n;
   map<int, int> mp;
   rep(i, n){
      int a;
      cin >> a;
      mp[a]++;
   }

   if(n % 2 == 0){
      for(int i = 1; i < n; i += 2){
         if(mp[i] != 2){
            cout << 0 << endl;
            return 0;
         }
      }
      ll res = mpow(2, n / 2);
      cout << res << endl;
      return 0;
   }
   else {
      for(int i = 0; i < n; i += 2){
         if(i == 0){
            if(mp[0] != 1){
               cout << 0;
               return 0;
            }
         }
         else {
            if(mp[i] != 2){
               cout << 0 << endl;
               return 0;
            }
         }
      }
      ll res = mpow(2, n / 2);
      cout << res << endl;
      return 0;
   }
}

Measured memory_bytes: 6116
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<cstring>
#include<climits>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<deque>
#include<tuple>
#include<list>
#include<unordered_map>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vii vector<int>
#define vll vector<ll>
#define lb lower_bound
#define pb push_back
#define mp make_pair
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep2(i,a,b) for(ll i=a;i<b;i++)
#define repr(i,n) for(ll i=n-1;i>=0;i--)
#define all(x) x.begin(),x.end()
#define LB(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define UB(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
#define ERASE(v) v.erase(unique(v.begin(),v.end()),v.end())
// #define int ll
using namespace std;
const int INF (1 << 30);
const ll LLINF (1LL << 55LL);
const int MOD = 1000000007;
const int MAX = 510000;
const double pi = acos(-1);
const double eps = 1e-9;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n,x,a[200010],b[200010],ans=0,ans2=0;
    cin>>n>>x;
    rep(i,n){
        cin>>a[i];
        b[i]=a[i];
    }
    rep(i,n-1){
        if(a[i]+a[i+1]>x){
            ans+=(a[i]+a[i+1])-x;
            if(x-a[i]>=0) a[i+1]=x-a[i];
            else{
                a[i+1]=0;
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 1024
N = gets.to_i
A = gets.split.map(&:to_i)
B = gets.split.map(&:to_i)

limit = B.inject(:+) - A.inject(:+)
cnt1 = 0
cnt2 = 0

A.zip(B).each do |a, b|
  next if a == b

  if a > b
    cnt1 += a - b
  else
    cnt2 += ((b - a) / 2.0).ceil
  end
end

if cnt1 <= limit && cnt2 <= limit
  puts 'Yes'
else
  puts 'No'
end


Measured memory_bytes: 3452
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet, BinaryHeap};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[allow(unused_imports)]
use std::io::stdin;

mod util {
    use std::io::stdin;
    use std::str::FromStr;
    use std::fmt::Debug;

    #[allow(dead_code)]
    pub fn line() -> String {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.trim().to_string()
    }

    #[allow(dead_code)]
    pub fn gets<T: FromStr>() -> Vec<T>
    where
        <T as FromStr>::Err: Debug,
    {
        let mut line: String = String::new();
        stdin().read_line(&mut line).unwrap();
        line.split_whitespace()
            .map(|t| t.parse().unwrap())
            .collect()
    }
}

#[allow(unused_macros)]
macro_rules! get {
    ($t:ty) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            line.trim().parse::<$t>().unwrap()
        }
    };
    ($($t:ty),*) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            (
                $(iter.next().unwrap().parse::<$t>().unwrap(),)*
            )
        }
    };
    ($t:ty; $n:expr) => {
        (0..$n).map(|_|
                    get!($t)
                   ).collect::<Vec<_>>()
    };
    ($($t:ty),*; $n:expr) => {
        (0..$n).map(|_|
                    get!($($t),*)
                   ).collect::<Vec<_>>()
    };
    ($t:ty ;;) => {
        {
            let mut line: String = String::new();
            stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|t| t.parse::<$t>().unwrap())
                .collect::<Vec<_>>()
        }
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn main() {
    let (n, m) = get!(usize, usize);

    let t = 2usize.pow(m as u32);

    let ans = ((n - m) * 100 + m * 1900) * t;
    println!("{}", ans);
}


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

int main() {
  int N;
  cin >> N;
  
  vector<int> x(N + 1);
  for (int i = 0; i < N; i++) {
    int A;
    cin >> A;
    x.at(A) = i + 1;
  }
  
  for (int i = 1; i <= N; i++) {
    cout << x.at(i);
    if (i != N) cout << " ";
  }
  cout << endl;
  
  return 0;
}

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

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl




typedef long long ll;
const ll mod = 1e9+7;
const int maxn = 1e5+10;




//dp[i][j]: max value of first i items and we used j weight

void relax(ll& x,ll y) {
    x=max(x,y);
}

int n, w;

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

    
    cin>>n>>w;


    vector<ll> dp(maxn, 0);//max value using j weight so far
    
    for (int i=0; i<n; i++) {
	int wei; ll val;
	cin>>wei>>val;
	for (int j=w; j>=0; j--) {
	    if (j+wei<=w) {
		relax(dp[j+wei], val+dp[j]);
	    }
	}
    }

    ll ans = *max_element(dp.begin(), dp.end());
    cout<<ans<<endl;

    return 0;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int cnt[11];
int main(){
  ll H,W,N; cin >> H >> W >> N;
  for(int i = 0; i < 10; i++){ cnt[i] = 0;}
 map<pair<ll,ll>,ll> mp; 
  //mp[(x,y)]は、(x,y)を中心とする3*3正方形に含まれる黒マスの個数を表す
  for(ll i = 0; i < N; i++){
    ll a,b; cin >> a >> b; a--; b--; //0-index化
 //(a,b)が黒マスの時、周囲(自身含む）９つのマスについて、それぞれを中心とした時に(a,b)を含む
    for(ll j = -1; j <= 1; j++){
      for(ll k = -1; k <= 1; k++){
        if( 0 <= a+j && a+j < H && 0 <= b+k && b+k < W){
          mp[make_pair(a+j,b+k)]++;}}}
  }
 
   ll res = 0;
  for(auto ne: mp){ //周囲の黒マスの個数がne.secondとなる中心の個数を数えていく
    if( ne.first.first == 0 || ne.first.first == H - 1){
      continue;} //端にある場合は中心となれないので除外しなければいけない
    if( ne.first.second == 0 || ne.first.second == W - 1){ 
      continue;}
    
     cnt[ne.second]++; res++;} //０個のマスはmapで考慮されないため、別途考える必要がある
  
  res = (H-2)*(W-2) - res;
   cout << res << endl;
  for(int i = 1; i <= 9; i++){
    cout << cnt[i] << endl;}
  return 0;}
    

Measured memory_bytes: 56448
fun main(args: Array<String>) {


    val n = readLine()!!.toInt()
    val hn = readLine()!!.split(" ").map(String::toInt).toTypedArray()

    var count = 0
    hn.fold(0) { a, b ->
        if (b > a) {
            count += b - a
        }
        b
    }
    println(count)

}

Measured memory_bytes: 37820
//                          VIVEK UPADHYAY
//                          MANIT, BHOPAL(M.P)
/**********************************************************************************************/
/**********************************************************************************************/
//                        $$ JAB-TAK TODEGA NHI,
//                           TAB -TAK CHODEGA NHI :D

// g++ -std=c++11 file_name.cpp
// ./file_name.out
#include<iostream>
#include<algorithm>
#include<vector>
#include<list>
#include<cstdlib>
#include<unistd.h>
#include<string>
#include<cstring>
#include<stack>
#include<queue>
#include<utility>
#include<cmath>
#include<set>
#include<unordered_map>
#include<cstdio>
#include<map>
#include<numeric>
using namespace std;
#define F first
#define S second
#define mk(x,y) make_pair(x,y)
#define pb(x) push_back(x)
#define LINE cout<<"\n" ;
#define ok cout<<"ok\n" ;
#define dbg(x) cout<<#x<<" = "<<(x)<<"\n";
#define fill(A, VAL) memset(A, VAL, sizeof(A))
#define sz(a) ((int) a.size())
typedef long long ll ;
const int MAXN = 5*1e5 + 10;

ll mod = 998244353 ;
double m = .5 ;
int main () {
    
    ll N , K ;
    cin >> N >> K;
    double p = 1/(N*1.0) ,tot =0 ;
    for(int i = 1 ; i <= N; i++)
    {
        ll in = 1LL ;
        double add = 1.00 ;
        while((in*i) <= (K - 1)) {
            add*=.5 ;
            in*=2 ;
        }
        add*=p ;
        tot+=add ;
    }
    printf("%.12lf\n",tot) ;
    
    return 0 ;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, s, n) for (int i = (s); i < (n); ++i)
#define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define len(x) (int)(x).size()
#define dup(x, y) (((x) + (y)-1) / (y))
#define pb push_back
#define Field(T) vector<vector<T>>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int n;
  cin >> n;
  cout << n / 3 << endl;
}

Measured memory_bytes: 3596
import math

N = int(input())

# 時間削減のため、2乗して該当の数字に一番近いところから計算を始める
# その次に割り切れる数が見つかれば 2乗して近い数字 * i
for i in range(int(math.sqrt(N)), 0, -1):
    # 余りがないので割り切れる最大値
    if N % i == 0:
        ans = i+(N//i)-2
        print(ans)
        break


Measured memory_bytes: 3060
#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<queue>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
/************************************************/
#define rep(i,n) for(int i=0;i<n;i++)
#define m_p make_pair
#define pb push_back
#define fr first
#define se second
#define forn(i,a,n) for(int i=a;i<n;i++)
#define foreach(i,c) for(__typeof(c.begin())i=(c.begin());i!=(c).end();i++)
#define pii pair<int,int>
#define vi vector<int>
#define ll long long
#define sz(s) s.size()
#define all(s) s.begin(),s.end()
#define zero(x) memset(x,0,sizeof(x))
#define vii vector<pair<int,int> >
#define mpis map<int,string>
#define mpii map<int,int>
#define mpsi map<string,int>
#define re return
#define mod 1000000007
/************************************************/
using namespace std;

long long get(){
	char c=getchar();
	long long x=0LL;
	while(c<'0'||c>'9')
	c=getchar();
	while(c>='0'&&c<='9'){
		x*=10LL;
		x+=(c-'0');
		c=getchar();
	}
	return x;
}
int a,b,k;
int main(){
	ios::sync_with_stdio(0);
	cin>>k>>a>>b;
	if(a%k==0)
	cout<<"OK";
	else{
		a/=k;
		a*=k;
		a+=k;
		if(a<=b)
		cout<<"OK";
		else
		cout<<"NG";
	} 
	re 0;
}

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

int main() {
  int n,a,b,maxa = 0,minb = 1000000000;
  cin >> n;
  for (int i = 0;i < n;++i) {
    cin >> a >> b;
    maxa = max(a,maxa);
    minb = min(b,minb);
  }
  cout << maxa+minb << "\n";
  return 0;
}

Measured memory_bytes: 256
#include<iostream>   
#include<string>
#include<vector>
using namespace std; 
 
int main()
{
	int a; 
	cin >> a; 
	if (a<1200)
	{
		cout << "ABC\n";
	} 
	else
	{
		cout << "ARC\n";
	}
	
}

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

int main() {
 int x1,y1,x2,y2,x,y,x3,y3,x4,y4;cin>>x1>>y1>>x2>>y2;
  x=x2-x1;y=y2-y1;
  
   x3=x2-y;y3=y2+x;x4=x1-y;y4=y1+x;
  
  
  
  cout<<x3<<" "<<y3<<" "<<x4<<" "<<y4<<endl;

}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
const int INF (1<<30);

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

  ll cnt = 0LL;
  rep(i, N) {
    ll A;
    cin >> A;
    cnt += A;
  }

  if (H <= cnt) cout << "Yes" << endl;
  else cout << "No" << endl;

  return 0;
}


Measured memory_bytes: 256
n = gets.to_i
c = 0
ans = 'APPROVED'
gets.split(' ').map(&:to_i).each do |a|
    if a.even?
        if a % 3 == 0 || a % 5 == 0
            
        else
            ans = 'DENIED'
            break
        end
    end
end
puts ans


Measured memory_bytes: 1788
#include"bits/stdc++.h"
using namespace std;
using ll=long long;
template<typename T=ll>inline T in(istream&is=cin){T ret;is>>ret;return ret;}
template<typename T>inline auto vec2(typename vector<T>::size_type h,typename vector<T>::size_type w,T v=T()){return vector<vector<T>>(h,vector<T>(w,v));}

int main()
{
    string s;cin>>s;
    string ans(500000,'\0');
    ll b=200000,e=b+s.length();
    for(int i=0;i<s.length();++i)ans[b+i]=s[i];
    bool forward=true;
    ll q=in();
    for(int i=0;i<q;++i){
        if(in()==1){
            forward^=true;
        }else{
            ll f;char c;cin>>f>>c;
            ans[forward^f==2?--b:e++]=c;
        }
    }
    if(forward)for_each(ans.begin(),ans.end(),[](char c){if(c!='\0')cout<<c;});
    else for_each(ans.rbegin(),ans.rend(),[](char c){if(c!='\0')cout<<c;});
    cout<<endl;
}


Measured memory_bytes: 1280
def main():
    s = input()
    year = int(s[0:4])
    month = int(s[5:7])
    day = int(s[8:10])
    if(year<=2019 and month <= 4 and day <= 30):
        print("Heisei")
    else:
        print("TBD")
if __name__ == '__main__':
    main()

Measured memory_bytes: 3060
#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;

class UnionFind {
private:
	unsigned size_; 
	std::vector<unsigned> par, rank;
public:
	UnionFind() : size_(0), par(std::vector<unsigned>()), rank(std::vector<unsigned>()) {};
	UnionFind(unsigned size__) : size_(size__) {
		par.resize(size_); rank.resize(size_);
		for (unsigned i = 0; i < size_; i++) par[i] = i, rank[i] = 0;
	}
	unsigned size() { return size_; }
	//unsigned root(unsigned x) { return par[x] == x ? x : par[x] = root(par[x]); }
	unsigned root(unsigned x)
	{
		while(par[x] != x)
		{
			par[x] = par[par[x]];
			x = par[x];
		}
		return x;
	}
	bool same(unsigned x, unsigned y) { return root(x) == root(y); }
	void unite(unsigned x, unsigned y) {
		x = root(x), y = root(y);
		if (x == y) return;
		if (rank[x] < rank[y]) par[x] = y;
		else if (rank[x] == rank[y]) par[y] = x, rank[x]++;
		else par[y] = x;
	}
	bool operator==(const UnionFind &u) { return par == u.par; }
	bool operator!=(const UnionFind &u) { return par != u.par; }
};

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

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

	int N;
	
	cin >> N;

	int v[N];
	rep(i, N)
	{
		cin >> v[i];
	}

	sort(v, v+N);

	float ii = 0.0f;

	rep(i, N)
	{
		if ( i == 0 )
		{
			ii = v[i];
		}
		else
		{
			ii = (ii + v[i]) / 2.0f;
		}  	
	}

	cout << ii << endl;

	
	return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String args[]) {

        Scanner sc = new Scanner(System.in);
        String c = sc.next();

        boolean result = "a".equals(c) || "i".equals(c) || "u".equals(c) || "e".equals(c) || "o".equals(c);

        System.out.println(result ? "vowel" : "consonant");
    }
}


Measured memory_bytes: 21844
#include<bits/stdc++.h>
using namespace std;
int main () {
	int n,ans=0;
	cin>>n;
	int a[n];
	for (int i=0;i<n;i++) {
		cin>>a[i];
	}
	sort (a,a+n);
	for (int i=2;i<n;i++) {
		for (int j=1;j<i;j++) {
			for (int k=0;k<j;k++) {
				if (a[i]<a[j]+a[k]) {
					ans++;
				}
			}
		}
	}
	cout<<ans;
}

Measured memory_bytes: 256
#include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
#include <cmath>
#include <stack>
#define rep(i,n) for (int i=0; i<(n); ++i)
using namespace std;
using ll = long long int;

template <class T> ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto i = v.begin(); i != v.end(); i++) {
    os << *i << " ";
  }
  return os;
}

ll ans = 0;
ll Q;
ll N;
ll M;
std::vector<long long> a;
std::vector<long long> b;
std::vector<long long> c;
std::vector<long long> d;

void f(ll n, ll m, vector<ll> &v, ll dep) {
  if(n == dep) {
    ll t = 0;
    rep(i,Q) {
      if(v[b[i]-1]-v[a[i]-1]==c[i])
	t += d[i];
    }
    ans = max(t, ans);
  } else {
    for(ll i=v[dep-1]; i<=m; i++) {
      v[dep] = i;
      f(n, m, v, dep+1);
    }
  }
  return ;
}


void solve(long long N, long long M, long long Q, std::vector<long long> a, std::vector<long long> b, std::vector<long long> c, std::vector<long long> d){


}

int main(){
  scanf("%lld",&N);
  scanf("%lld",&M);
  scanf("%lld",&Q);
  a.resize(Q);
  b.resize(Q);
  c.resize(Q);
  d.resize(Q);
  for(int i = 0 ; i < Q ; i++){
    scanf("%lld",&a[i]);
    scanf("%lld",&b[i]);
    scanf("%lld",&c[i]);
    scanf("%lld",&d[i]);
  }
  vector<ll> v(N);
  for(ll i=1; i<=M; i++) {
    v[0] = i;
    f(N, M, v, 1);
  }
  std::cout << ans << std::endl;
  return 0;
}



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


int main() {
    int N;
    cin >> N;
    vector<pair<ll, int>> p(N);
    rep(i, N) {
        ll t;
        cin >> t;
        p[i] = {t, i+1};
    }
    sort(p.rbegin(), p.rend());

    set<int> st;
    st.insert(0);
    st.insert(N+1);
    st.insert(p[0].second);

    ll ans = 0;
    for (int i=1; i<N; ++i) {

        auto tmp = st.lower_bound(p[i].second);
        ll r1, r2, l1, l2;

        r1 = *tmp;
        if (*tmp == N+1) r2 = r1;
        else {
            auto tmp2 = tmp;
            tmp2++;
            r2 = *tmp2;
        }

        tmp--;
        l1 = *tmp;
        if (*tmp == 0) l2 = l1;
        else {
            tmp--;
            l2 = *tmp;
        }

        // Left
        ll x = 0;
        if (l1 != 0) {
            x += (l1-l2) * (r1 - p[i].second);
        }
        if (r1 != N+1) {
            x += (r2-r1) * (p[i].second - l1);
        }

        //cout << p[i].first << ", " << x << endl;
        //cout << l1 << ", " << l2 << " " << r1 << ", " << r2 << endl;
        ans += x * p[i].first;
        st.insert(p[i].second);
    }
    cout << ans << endl;
}


Measured memory_bytes: 6528
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<iostream>

using namespace std;

int top, stack[100000];

void push(int x){
  stack[++top] = x ;
}

int pop(){
  top--;

  return stack[top+1];
}

int main(){
  int first,second;
  top=0;
  char s[100];


while(scanf("%s",s) != EOF){
  if(s[0]=='+'){
    first =pop();
    second = pop();
    push(first + second);
  }
else  if(s[0]=='-'){
    first =pop();
    second = pop();
    push(second - first);
  }
else  if(s[0]=='*'){
    first =pop();
    second = pop();
    push(first * second);
  }
  else{
    push(atoi(s));
  }
}
cout<<pop()<<endl;

return 0;
}



Measured memory_bytes: 3236
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define nl '\n'
#define print(vec,l,r) for(int i = (l); i < (r); i++) cout << vec[i] <<" "; cout << endl;
#define forf(i,a,b) for(int i = (a); i < (b); i++)
#define forr(i,a,b) for(int i = (b)-1; i >= (a); i--)
#define input(vec,N) for(int i = 0; i < (N); i++) cin >> vec[i];
#define debug(x) cerr << #x << " = " << (x) << endl;

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int , int> pi;

int dfs(vi *a, vector<bool> &visited, int i)
{
	int count = 1;
	visited[i] = true;
	for(auto u: a[i])
	{
		if(visited[u]) continue;
		count += dfs(a, visited, u);
	}
	return count;
}

void solve()
{
	int n, m;
	cin>>n>>m;
	vi a[n+1];
	for(int i=0; i<m; i++)
	{
		int x, y;
		cin>>x>>y;
		a[x].pb(y);
		a[y].pb(x);
	}
	vector<bool> visited(n+1);
	int maxcount = 0;
	for(int i=1; i<=n; i++)
	{
		if(visited[i]) continue;
		maxcount = max(maxcount, dfs(a, visited, i));
	}
	cout<<maxcount<<endl;
}

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


Measured memory_bytes: 27024
n, a, b = gets.strip.split.map(&:to_i)

# 各桁の和を求める
def digit_sum n
    sum = 0
    while n > 0 do
        sum += n % 10
        n /= 10
    end
    sum
end

ans = (1..n)
        .map { |i| [i, digit_sum(i)] }
        .select { |d| a <= d[1] && d[1] <= b }
        .inject(0) { |sum, d| sum + d[0] }

puts ans

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

#define ll long long
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define vi vector<int>
using namespace std;
int mod = 1'000'000'000 + 7;
namespace uf {
    vector<int> par, rank;

    void init(int n) {
        par.resize(n);
        rank.resize(n);
        for (int i = 0; i < n; i++) {
            par[i] = i;
            rank[i] = 0;
        }
    }

    int root(int x) {
        if (par[x] == x) {
            return x;
        } else {
            return par[x] = root(par[x]);
        }
    }

    bool same(int x, int y) {
        return root(x) == root(y);
    }

    void unite(int x, int y) {
        x = root(x);
        y = root(y);
        if (x == y)return;
        if (rank[x] < rank[y]) {
            par[x] = y;
        } else {
            par[y] = x;
            if (rank[x] == rank[y])rank[x]++;
        }
    }
}

ll pow_mod(ll n, ll k, ll m) {
    ll r = 1;
    for (; k > 0; k >>= 1) {
        if (k & 1) r = (r * n) % m;
        n = (n * n) % m;
    }
    return r;
}

ll gcd(ll a, ll b) {
    if (b == 0)return a;
    return gcd(b, a % b);
} // C++17


void COME_LET_THE_GAMES_BEGIN() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << setprecision(20);
}

int N, A, B;
ll v[55];
ll memo[100][100];

ll pCq(ll p, ll q) {
    if (memo[p][q] != -1)return memo[p][q];
    if (p == q || q == 0) {
        return 1;
    }
    return memo[p][q] = pCq(p - 1, q - 1) + pCq(p - 1, q);
}

int main() {
    COME_LET_THE_GAMES_BEGIN();
    rep(i, 100)rep(j, 100)memo[i][j] = -1;
    cin >> N >> A >> B;
    rep(i, N) {
        cin >> v[i];
        v[i] = -v[i];
    }
    ll x = 0;
    sort(v, v + N);
    rep(i, A) {
        x += v[i];
    }
    cout << -(double) x / A << endl;
    ll ans = 0;
    for (int i = A; i <= B; i++) {
        ll a = 0;
        rep(j, i) {
            a += v[j];
        }
        if (a * A != x * i) {
            break;
        }
        ll b = 0;
        ll s = 0;
        rep(j, N) {
            if (v[j] == v[i - 1]) {
                if (b == 0) {
                    s = j;
                }
                b++;
            }
        }
        ll o = i - 1 - s + 1;
        ans += pCq(b, o);
    }
    cout << ans << endl;
}

Measured memory_bytes: 384
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>
#include <deque>
#include <numeric>

using namespace std;

#define mod 1000000007

int main()
{
	int a[5];
	int k;
	for(int i = 0; i < 5; i++){
		cin >> a[i];
	}
	cin >> k;
	int cnt = 0;
	for(int i = 0; i < 5; i++){
		for(int j = i + 1; j < 5; j++){
			if(a[j] - a[i] > k) cnt++;
		}
	}
	if(cnt > 0) cout << ":(" << endl;
	else cout << "Yay!" << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <vector>


using namespace std;
#define LENGTH 10

void printDay(int num){
  switch(num){
  case 0:
    cout << "Monday" << endl;
    break;
  case 1:
    cout << "Tuesday" << endl;
    break;
  case 2:
    cout << "Wednesday" << endl;
    break;
  case 3:
    cout << "Thursday" << endl;
    break;
  case 4:
    cout << "Friday" << endl;
    break;
  case 5:
    cout << "Saturday" << endl;
    break;
  case 6:
    cout << "Sunday" << endl;
    break;
  }
}
    
    

int main(){
  int month, day;
  int days[12]={31,29,31,30,31,30,31,31,30,31,30,31};
  while(cin >> month >> day){
    int d=3;
      if(month==0){
      break;
    }

    for(int i=0;i<month-1;i++){
      d+=days[i];
      d = d%7;
    }

    for(int i=1;i<day;i++){
      d+=1;
      d = d%7;
    }
    printDay(d);
  }
}

Measured memory_bytes: 1152
import java.util.Scanner;


public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		int y = sc.nextInt();
		
		if(x==1|x==3|x==5|x==7|x==8|x==10|x==12){
			if(y==1|y==3|y==5|y==7|y==8|y==10|y==12){
				System.out.println("Yes");
			}else{
				System.out.println("No");
			}
		}else if(x==4|x==6|x==9|x==11){
			if(y==4|y==6|y==9|y==11){
				System.out.println("Yes");
			}else{
				System.out.println("No");
				}
		}else if(x==2){
			if(y==2){System.out.println("Yes");
		}else{System.out.println("No");}
		
	}

	}
}

Measured memory_bytes: 20692
#include <bits/stdc++.h>
#define ll long long int
#define ld double
#define f first
#define s second
#define pb push_back
#define mk make_pair
#define MOD 1000000007
#define fo(i,a,b) for(i=a;i<b;i++)
#define foe(i,a,b) for(i=a;i<=b;i++)
#define boost ios::sync_with_stdio(false); cin.tie(0)
using namespace std;
int main()
{
	boost;
	int n, i, j;
	cin >> n;
	map <int, int> mp;
	fo(i, 1, 10){
		fo(j, 1, 10)
		mp[i * j]++;
	}
	cout << (mp[n] ? "Yes" : "No");
}

Measured memory_bytes: 256
H,W=map(int,input().split())
S=[input() for _ in range(H)]

def count_bomb(h,w,S):
    if S[h][w]=="#":
        return "#"
    
    ret=0
    for i,j in ([1,0],[-1,0],[0,1],[0,-1],[1,1],[1,-1],[-1,1],[-1,-1]):
        next_h=h+i
        next_w=w+j
        if next_h<0 or next_h>=H:
            continue
        elif next_w<0 or next_w>=W:
            continue

        if S[next_h][next_w]=="#":
            ret+=1
    
    return str(ret)

ans=[""]*H
for i in range(H):
    for j in range(W):
        cnt=count_bomb(i,j,S)
        ans[i]+=cnt

for i in range(H):
    print(ans[i])

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

using namespace std;

int sd(int x) {
   if(!x) return 0;
   return sd(x / 10) + (x % 10);
}
int main() {

   int a, b;
   int mn = 800;
   int n;
   cin >> n;
   for(int i=1;i<n;++i)
    mn=min(mn,sd(i)+sd(n-i));
   cout<<mn;
}


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


int main() {
    char s;
    cin >> s;
    if (isupper(s) ) {
        cout << "A" << endl;
    }
    else {
        cout << "a" << endl;
    }
    return 0;
}

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

int main(int argc, const char * argv[]) {
    string s;
    string a;
    string c;
    
    cin >> a >> s >> c;
    cout << a.at(0) << s.at(0) << c.at(0) << endl;
    
    return 0;
}

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

//typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int MOD = 1000000007;

// grid
//--------------------------------------------
VL dx = {0, 1, 0, -1};
VL dy = {1, 0, -1, 0};
VL dx2 = {-1, 0, 1, -1, 1, -1, 0, 1};
VL dy2 = {-1, -1, -1, 0, 0, 1, 1, 1};

//debug
//--------------------------------------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

//IO accelerate
//--------------------------------------------
struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

//template
//--------------------------------------------
template<typename T>
istream& operator >>(istream& is, vector<T>& vec) {
  for(T& x: vec) is >> x;
  return is;
}
template<typename T>
ostream& operator <<(ostream& os, const vector<T>& vec) {
  for(int i=0; i<vec.size(); i++){
    os << vec[i] << ( i+1 == vec.size() ? "" : "\t" );
  }
  return os;
}
template<typename T>
ostream& operator <<(ostream& s, const vector<vector<T>>& vv) {
	for (int i = 0; i < vv.size(); ++i) {
		s << vv[i] << endl;
	}
	return s;
}

//main code
int main(int argc, char const* argv[])
{
	LL n,a,b;
	cin >> n >> a >> b;
	VL x(n);
	cin >> x;
	LL ans = 0;
	for (int i = 1; i < n; i++) {
		ans += min((x[i] - x[i-1])*a,b);
	}
	cout << ans << endl;
	return 0;
}



Measured memory_bytes: 1024
while s=gets
  ioi = 0
  joi = 0
  for i in 0..(s.length - 2)
    ioi += 1 if s.slice(i, 3) == "IOI"
    joi += 1 if s.slice(i, 3) == "JOI"
  end
  puts joi
  puts ioi
end

Measured memory_bytes: 6096
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
char a[1000005];
int main()
{
	char L='L',R='R';
	int i,x=1;
	cin>>a;
	for(i=0;i<=100;i++)
	{
		if(i%2==0)
		{
			if(a[i]==L)
			{
				cout<<"No";
				return 0;
			}
		}
		else if(i%2==1)
		{
			if(a[i]==R)
			{
				cout<<"No";
				return 0;
			}
		}
	}
	cout<<"Yes";
	return 0;
}

Measured memory_bytes: 256
n,k=map(int, input().split())  


ans=0
for i in range(1,n+1):
    x=(n+1)//i
    y=(n+1)%i
    ans+=max(x*(i-k),0)+max(y-k,0)

if k==0:
    print(ans-n)
else:
    print(ans)

        
    


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

using namespace std;

int a[101];

int dp[101][4][4];

int n, k;

int rec(int day, int pp, int p)
{
	if (day > n) return 1;

	if (dp[day][pp][p] >= 0) return dp[day][pp][p];

	int res = 0;

	if (a[day]) {
		if (a[day] != pp || a[day] != p) {
			res = rec(day + 1, p, a[day]);
			res %= 10000;
		}
	} else {
		for (int i = 1; i <= 3; ++i) {
			if (pp == p && p == i) continue;
			res += rec(day + 1, p, i);
			res %= 10000;
		}
	}

	return dp[day][pp][p] = res;
}

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

	for (int i = 0; i < k; ++i) {
		int day; cin >> day;
		cin >> a[day];
	}
	
	memset(dp, -1, sizeof(dp));

	printf("%d\n", rec(1, 0, 0));
}

Measured memory_bytes: 1152
<?php
  
while ($line = fgets(STDIN)) {
   $stdin[] = trim($line);
}
#$v2 = str_split($stdin[0]);
$v2 = explode(" ", $stdin[0]);

$tree = $v2[0];
$range = $v2[1];

$ans = ceil($tree / (($range * 2) + 1 ));




echo $ans . PHP_EOL;

Measured memory_bytes: 3700
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <clocale>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i, s, n) for(int i = (s), i##_len=(n); i < i##_len; ++i)
#define FORS(i, s, n) for(int i = (s), i##_len=(n); i <= i##_len; ++i)
#define VFOR(i, s, n) for(int i = (s); i < (n); ++i)
#define VFORS(i, s, n) for(int i = (s); i <= (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FORS(i, 0, n)
#define VREP(i, n) VFOR(i, 0, n)
#define VREPS(i, n) VFORS(i, 0, n)
#define RFOR(i, s, n) for(int i = (s), i##_len=(n); i >= i##_len; --i)
#define RFORS(i, s, n) for(int i = (s), i##_len=(n); i > i##_len; --i)
#define RREP(i, n) RFOR(i, n, 0)
#define RREPS(i, n) RFORS(i, n, 0)
#define ALL(v) (v).begin(), (v).end()
#define SORT(v) sort(ALL(v))
#define RSORT(v) sort(ALL(v), greater<decltype(v[0])>())
#define SZ(x) ((int)(x).size())
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define MT make_tuple
#define BIT(n) (1LL<<(n))
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end())

using ld = long double;
using ll = long long;
using ui = unsigned int;
using ull = unsigned long long;
using Pi_i = pair<int, int>;
using VB = vector<bool>;
using VC = vector<char>;
using VD = vector<double>;
using VI = vector<int>;
using VLL = vector<ll>;
using VS = vector<string>;
using VSH = vector<short>;
using VULL = vector<ull>;

const int MOD = 1000000007;
const int INF = 1000000000;
const int NIL = -1;
const double EPS = 1E-10;

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


int main(){
    int N, M; cin >> N >> M;
    cout << (N == M ? "Yes" : "No") << endl;
    return 0;
}


Measured memory_bytes: 256
n,a,b = map(int , input().split())
s = input()
Judgment = 0
rank = 0
overseas=0
for num in range(n):
  if s[num] == 'a' and rank < a+b:
    print('Yes')
    rank = rank+1
  elif s[num] == 'b' and rank < a+b and overseas < b:
    print('Yes')
    rank = rank +1
    overseas = overseas + 1
  else:
    print('No')

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

int main() {
  int N,ans=0,flag=0;
  cin >> N;
  int a[N];
  for(int i=0; i<N; i++){
    cin >> a[i];
  }
  while(flag==0){
    for(int i=0; i<N; i++){
	  if(a[i]%2 != 0){
        flag=1;
 	    cout << ans << endl;
        break;
	  }
	  a[i] /= 2;
	}
  ans++;
  }
}


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

class Program
{
    static void Main(string[] args)
    {
        int N = int.Parse(Console.ReadLine());

        Console.WriteLine(Enumerable.Range(1, N).Select(i => (long)i).Where(i => i % 3 != 0 && i % 5 != 0).Sum());
    }
}

Measured memory_bytes: 28208
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Set;
import java.util.TreeSet;

public class Main {

  public static void main(String[] args) {
    new Main().run();
  }

  public void run() {

    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {

      String line = in.readLine();
      int k = Integer.parseInt(in.readLine());

      int n = line.length();
      Set<String> set = new TreeSet<>();

      for(int i=0; i <= n; i++) {
        for(int j=i; j<=n && j<=i+k; j++) {
            set.add(line.substring(i, j));
        }
      }

      Iterator<String> ite = set.iterator();
      String[] ans = new String[k+1];
      for(int i=0; i<=k; i++)
        ans[i] = ite.next();

      System.out.println(ans[k]);
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
}

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

int main() {
  int A,B;
  int ans = 0;

  cin >> A >> B;

  if (A >= 13) {
    ans = B;
  }
  else if (A <= 12 && A >=6) {
    ans = B/2;
  }

  cout << ans << endl;
}

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

using namespace std;

#define endl '\n'
#define fr first
#define se second
#define ll long long
#define sz(x) ((int)(x.size()))
#define mod 1000000007

const int N = 1e6;

inline ll add(ll x, ll y) {
	x += y;
	if(x >= mod) return x - mod;
	return x;
}

inline ll mul(ll x, ll y) {
	x *= y;
	if(x >= mod) return x % mod;
	return x;
}

inline ll power(ll x, ll y) {
	if(y == 0) return 1;
	ll p = power(x, y/2);
	p = mul(p, p);
	if(y&1) return mul(p, x);
	return p;
}

ll po[N];

set < pair <ll, ll> > st;
vector < pair <ll, ll> > v;
map < pair <ll, ll>, ll > cnt;

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

	ll L = 0, R = 0, Z = 0;

	int n;
	cin >> n;
	ll x, y, g;
	for(int i=0; i<n; i++) {
		cin >> x >> y;
		if(x == 0 && y == 0) Z++;
		else if(x == 0) L++;
		else if(y == 0) R++;
		else {
			g = __gcd(abs(x), abs(y));
			x /= g;
			y /= g;
			if(y < 0) {
				x *= -1;
				y *= -1;
			}
			cnt[{x, y}]++;
		}
	}
	for(auto e : cnt) {
		if(st.count(e.fr)) continue;
		x = e.fr.se;
		y = -e.fr.fr;
		if(y < 0) {
			x *= -1;
			y *= -1;
		}
		st.insert(e.fr);
		st.insert({x, y});
		v.push_back({e.se, cnt[{x, y}]});
	}

	po[0] = 1;
	for(int i=1; i<N; i++) {
		po[i] = po[i-1] + po[i-1];
		if(po[i] >= mod) po[i] -= mod;
	}

	ll res = 1;
	for(auto e : v) {
		ll _res = add(mod - 1, add(po[e.fr], po[e.se]));
		res = mul(res, _res);
	}

	ll ans = add(add(mul(po[L], res), mul(po[R], res)), mod - res);

	cout << add(ans,Z+mod-1) << endl;

	return 0;
}

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

int main() {
    string ans = "No";
    int N;
    cin >> N;
    for(int i = 1; i < 10; i++) {
        if((N / i) * i == N && (N / i) / 10 == 0)
            ans = "Yes";
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define FOR(i,k,n) for(int(i)=(k);(i)<(n);++(i))
#define rep(i,n) FOR(i,0,n)
#define all(v) begin(v),end(v)
#define debug(x) std::cerr<<#x<<": "<<x<<"\n"
#define debug2(x,y) std::cerr<<#x<<": "<<x<<", "<<#y<<": "<<y<<"\n"
#define debug3(x,y,z) std::cerr<<#x<<": "<<x<<", "<<#y<<": "<<y<<", "<<#z<<": "<<z<<"\n"

using ll=long long;
using vi=std::vector<int>;
using vvi=std::vector<vi>;
using vll=std::vector<ll>;
using vvll=std::vector<vll>;
template<typename T> using vvec=std::vector<std::vector<T>>;
template<typename T>
auto make_v(size_t sz){return std::vector<T>(sz);}
template<typename T,typename... Ts>
auto make_v(size_t sz,Ts...ts){return std::vector<decltype(make_v<T>(ts...))>(sz,make_v<T>(ts...));}
template<typename T>
void fill_v(T&var,const T&x){var=x;}
template<typename V,typename T>
void fill_v(V&v,const T&x){for(auto&& w:v){fill_v(w,x);}}

template<typename T> std::ostream& operator<<(std::ostream&s,const std::vector<T>&v){
  int sz=v.size();s<<"\n";rep(i,sz){s<<v[i];if(i<sz-1){s<<"\t";}}s<<"\n";return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::vector<std::vector<T>>&v){
  for(auto&& w:v){s<<w;}return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::deque<T>&v){
  int sz=v.size();s<<"\n";rep(i,sz){s<<v[i];if(i<sz-1){s<<"\t";}}s<<"\n";return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::deque<std::deque<T>>&v){
  for(auto&& w:v){s<<w;}return s;}
template<typename T> std::ostream& operator<<(std::ostream&s, const std::set<T>&v){
  s<<"\n";for(auto&& elm:v){s<<elm<<"\t";}s<<"\n";return s;}

inline void scan(int&a){scanf("%d",&a);}
inline void scan(ll&a){scanf("%lld",&a);}
inline void scan(char&a){scanf(" %c",&a);}
inline void scan(double&a){scanf("%lf",&a);}
inline void scan(std::string&s){char BUF[3000000];scanf(" %s",BUF);s=std::string(BUF);}
template<typename T>
inline void scan(std::vector<T>&v){for(auto&& sv:v){scan(sv);}}
template<typename First,typename...Args>
inline void scan(First&f,Args&...args){scan(f);scan(args...);}
inline void print(int a){printf("%d\n",a);}
inline void print(ll a){printf("%lld\n",a);}
inline void print(double a){printf("%.12f\n",a);}
inline void print(std::string s){std::cout<<s<<"\n";}

using namespace std;

int main() {
  int a, b;
  scan(a, b);
  if (a <= 5) {
    print(0);
  } else if (a <= 12) {
    print(b / 2);
  } else {
    print(b);
  }

  return 0;
}


Measured memory_bytes: 888
#include<stdio.h>
int strint(char* a){
  int n,i;
  for(i=n=0;a[i];i++)n=n*10+a[i]-'0';
  return n;
}
int main(){
  char s[15];
  int i,n,c,m;
  scanf("%s",s);
  for(i=n=c=0;s[i];i++){
    if(s[i]-'0'){
      m=strint(s+i);
      if(m>=n)c+=1-(m-n)%2;
    }//printf("%d %d\n",n,m);
    n=n*10+s[i]-'0';
  }
  printf("%d\n",c);
  return 0;
}

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

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)

int main(void) {
    int i, j, h, w, d;
    cin >> h >> w >> d;
    REP (i,h) {
        REP (j,w) printf("%c","RYGB"[(i+j)/d%2+(i-j+500*d)/d%2*2]);
        puts("");
    }
    return 0;
}

Measured memory_bytes: 512