akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Linq;
using System.Collections.Generic;

using E = System.Linq.Enumerable;

public class Program
{
    public static void Main()
    {
        var n = int.Parse(Console.ReadLine());
        var ps = new Tuple<long, long>[n];
        for (int i = 0; i < ps.Length; i++)
        {
            var xy = Console.ReadLine().Split().Select(x => long.Parse(x)).ToArray();
            ps[i] = Tuple.Create(xy[0], xy[1]);
        }

        Array.Sort(ps);
        Console.Error.WriteLine(string.Join(", ", ps.Select(x => $"({x.Item1}, {x.Item2})")));

        var maxCount = 0;
        for (int u = 0; u < ps.Length; u++)
        {
            for (int v = u + 1; v < ps.Length; v++)
            {
                var p = ps[u].Item1 - ps[v].Item1;
                var q = ps[u].Item2 - ps[v].Item2;

                var ts = ps.Select(x => Tuple.Create(x.Item1 - p, x.Item2 - q)).ToArray();
                Array.Sort(ts);
                int ip = 0;
                int it = 0;
                var k = 0;
                while (true)
                {
                    while (ip < ps.Length && ps[ip].Item1 < ts[it].Item1)
                    {
                        ip++;
                    }
                    if (ip >= ps.Length)
                    {
                        break;
                    }
                    while (it < ts.Length && ps[ip].Item1 > ts[it].Item1)
                    {
                        it++;
                    }
                    if (it >= ts.Length)
                    {
                        break;
                    }
                    while (ip < ps.Length && ps[ip].Item1 == ts[it].Item1 && ps[ip].Item2 < ts[it].Item2)
                    {
                        ip++;
                    }
                    if (ip >= ps.Length)
                    {
                        break;
                    }
                    while (it < ts.Length && ps[ip].Item1 == ts[it].Item1 && ps[ip].Item2 > ts[it].Item2)
                    {
                        it++;
                    }
                    if (it >= ts.Length)
                    {
                        break;
                    }
                    if (ps[ip].Item1 != ts[it].Item1 || ps[ip].Item2 != ts[it].Item2)
                    {
                        continue;
                    }

                    k++;
                    ip++;
                    it++;
                }
                maxCount = Math.Max(maxCount, k);
            }
        }
        
        Console.WriteLine(n - maxCount);
    }
}


Measured memory_bytes: 17736
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <queue>
#include <set>
#include <map>

using namespace std;

typedef long long ll;
typedef pair <int, int> pii;
typedef pair <int, int> pii;
typedef vector <int> vi;
typedef vector <string> vs;
typedef vector <long long> vll;
typedef vector <pii> vpii;
typedef vector <vi> vvi;
typedef vector <vll> vvll;

#define forn(i, n) for((i) = 0; (i) < (n); (i)++)
#define form(i, m, n) for((i) = m; (i) < (n); (i)++)
#define vsort(v) sort((v).begin(), (v).end())

int main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);

    ll n, i;

    cin >> n;

    i = n + n * n + n * n * n;
    cout << i;

    return 0;
}

Measured memory_bytes: 3608
#include <iostream>
#include <vector>

using namespace std;

int main() {
    int N, K, Q;
    cin >> N >> K >> Q;
    vector<int> num(N, 0);

    for (int i = 0; i < Q; ++i) {
        int a;
        cin >> a;
        a--;
        num[a]++;
    }

    for (int i = 0; i < N; ++i) {
        if (K - (Q - num[i]) <= 0)
            cout << "No" << endl;
        else
            cout << "Yes" << endl;
    }
    return 0;
}

Measured memory_bytes: 3796
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1000000000; 

int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll> h(n);
  for(int i=0; i<n; i++) cin >> h[i];
  sort(h.begin(),h.end());
  reverse(h.begin(),h.end());
  ll ans = 0;
  for(int i=k; i<n; i++) ans += h[i];
  cout << ans << endl;

    
}

Measured memory_bytes: 1792
#include <iostream>
using namespace std;
 
 
int main()
{
    int D;
    cin >> D;
 
    if(D == 25) cout << "Christmas" << endl;
    else if(D == 24) cout << "Christmas Eve" << endl;
    else if(D == 23) cout << "Christmas Eve Eve" << endl;
    else if(D == 22) cout << "Christmas Eve Eve Eve" << endl;
 
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int a=0,b=0,c=0,d=0,e=0;

int main() {
  cin >> a;
  int anko[4][3][10]={{{}}};
  for(int i=0;i<a;i++){
    cin >> b >> c >> d >> e;
    anko[b-1][c-1][d-1]+=e;
  }
  for(int u=0;u<4;u++){
    for(int y=0;y<3;y++){
      for(int t=0;t<10;t++){
        cout << ' ';
        cout << anko[u][y][t];
        if(t==9){
          cout << endl;
        }
      }
      if(y==2 && u<3){
        cout << "####################" << endl;
      }
    }
  }
}



Measured memory_bytes: 3100
#include <iostream>
#include<math.h>
 
int main()
{
    double A,B,H,M;
    double r;
    std::cin>>A>>B>>H>>M;
    H=(H*60+M)*.5;
    H > M*6 ? r = H - M*6 : r = M*6 - H;
    if(r>180)
    {
        r=360-r;
    }
    r = r  * M_PI / 180.0;
    printf("%.10lf\n",sqrt((double)(A*A+B*B)-(double)(2*A*B*cos(r))));
    return 0;
}

Measured memory_bytes: 3560
#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>

template<class T>
void print(std::vector<T> x){
	for(int i=0;i<x.size();++i){
		if(i==0) std::cout << x[i];
		else std::cout << " " << x[i];
	}
	std::cout << std::endl;
}

using namespace std;

int main() {
	int N;
	scanf("%d", &N);
  vector<int> p(N+1,0);	
	for(int i=1;i<N+1;++i) {
		int tmp;
		scanf("%d", &tmp);
		p[tmp] = i;
	}
	//print(p);
	// orig: 3 1 2 4
	// indx: 2 3 1 4
	int cnt=1, m = 1;
	for(int i=1;i<N;++i) {
		cnt = (p[i] < p[i+1]) ? cnt+1 : 1;
		m = max(m, cnt);
	}
	cout << N-m << endl;
	return 0;
}


Measured memory_bytes: 1024
#include "bits/stdc++.h"
using namespace std;
#define MOD 1000000007
#define Nmax 200010
#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define RFOR(i,a,b) for(long long i = (b-1);i>=a;i--)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ITR(itr,mp) for(auto itr = (mp).begin(); itr != (mp).end(); ++itr)
#define RITR(itr,mp) for(auto itr = (mp).rbegin(); itr != (mp).rend(); ++itr)
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<P> Graph;

int main() {
	int A[3]={},B,C;
	cin >> A[0] >> A[1] >> A[2];
	sort(A,A+3);
	int ans=(A[2]-A[1])+(A[1]-A[0]);
	cout << ans << endl;
	
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define BITCNT(n) (__builtin_popcountll(n))
#define SUBS(s,f,t) ((s).substr((f)-1,(t)-(f)+1))
#define ALL(a) (a).begin(),(a).end()
using namespace std;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n,a,b;
  cin>>n>>a>>b;
  if((b-a)%2){
    ll hoge=min(a-1,n-b);
    ll ans=hoge+(b-a)/2+1;
    cout<<min(ans,min(b-1,n-a))<<endl;
  }else{
    cout<<(b-a)/2<<endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
#define MIN2(x,y)	((x)<(y)?(x):(y))

int main(){
    int         a,b,c,x,y;
    long long   less, cost;

    scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);

    //AとBで少ない方の枚数
    less = MIN2(x,y);

    //less枚すべてを、2*Cで買った方が安いのか、AとBをそれぞれ買った方が安いのか
    cost = MIN2(2*c*less, (a*less)+(b*less));

    //less枚を超える分を、2*cで買った方が安いのか、単体で買った方が安いのか
    //X > Y
    if     ( x-less > 0 ){ cost += MIN2(2*c*(x-less), a*(x-less)); }
    //X < Y
    else if( y-less > 0 ){ cost += MIN2(2*c*(y-less), b*(y-less)); }

    printf("%lld\n", cost);
    return 0;
}

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

typedef long long ll;
typedef pair<int, ll> p;
const int maxn = 100000 + 10;

ll dp[110][maxn];

int n;

vector<p> snacks;

ll dfs(int step, int restSize) {
	if(step == n or restSize == 0)
		return 0;

	if(dp[step][restSize] != -1)
		return dp[step][restSize];

	ll value = 0;
	if(restSize >= snacks[step].first) {
		value = max(value, dfs(step+1, restSize-snacks[step].first)+snacks[step].second);
	}

	value = max(value, dfs(step+1, restSize));

	return dp[step][restSize] = value;
}
	
int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int w;
	cin >> n >> w;
	snacks.resize(n);

	for(int i = 0; i < maxn; i++)
		for(int j = 0; j < 110; j++) dp[j][i] = -1;

	for(int i = 0; i < n; i++)
		cin >> snacks[i].first >> snacks[i].second;

	cout << dfs(0, w) << endl;

	return 0;
}


Measured memory_bytes: 86272
import java.util.*;
import java.io.*;
 
public class Main{
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        long sum = 1;
        long[] arr = new long[n];
        for(int i = 0; i < n; i++){
            arr[i] = sc.nextLong();
        }

        boolean zero = false;
        for(int i = 0; i < n; i++){
            if(arr[i] == 0){
                zero = true;
            }
        }

        if(zero){
            sum = 0;
        } else{
            for(int i = 0; i < n; i++){
                if(arr[i] <= (long) Math.pow(10, 18) / sum){
                    sum *= arr[i];
                } else{
                    sum = -1;
                    break;
                }
            }
        }
        System.out.println(sum);
    }
}

Measured memory_bytes: 61484
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}

fn main() {
    let v = read_vec::<u32>();
    let a = v[0];
    let b = v[1];

    if a < 6 {
        println!("{}", 0);
    } else if a >= 6 && a < 13 {
        println!("{}", b / 2);
    } else {
        println!("{}", b);
    }
}


Measured memory_bytes: 4352
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<iostream>
#define mmod 1000000007
#define N 22
#define M (1<<20)+10
#define lowbit(x) (x&(-x))
using namespace std;
int n,m,lim[N][N],f[M],g[M],ans;
void init()
{
	int k;scanf("%d%d%d",&n,&m,&k);
	n--;
	memset(lim,-1,sizeof(lim));
	while(k--)
	{
		int a,b,c;scanf("%d%d%d",&a,&b,&c);
		lim[a][b]=c;
	}
}
void upd(int &x,int y)
{
	x=(x+y)%mmod;
}
void solve()
{
	int ss=(1<<n)-1;
	f[0]=1;
	for(int i=1;i<=m;i++)
		for(int j=1;j<=n;j++)
		{
			for(int k=0;k<=ss;k++) g[k]=0;
			for(int k=0;k<=ss;k++)
			{
				if(f[k]==0) continue;
				if(lim[i][j]==0 && (k&(1<<(j-1)))) continue;
				if(lim[i][j]!=1 && (k&(1<<(j-1)))==0) {int s=k;upd(g[s],f[k]);}
				if(lim[i][j]!=0)
				{
					int s=k;
					if((k&(1<<(j-1)))==0) 
					{
						int t=s&((1<<j)-1);
						t|=1<<(j-1);
						s>>=j;
						s-=lowbit(s);
						s<<=j;
						s+=t;
					}
					upd(g[s],f[k]);
				}
			}
			for(int k=0;k<=ss;k++) f[k]=g[k];
		}
	for(int i=0;i<=ss;i++) upd(ans,f[i]);
	printf("%d\n",ans);
}
int main()
{
	init();
	solve();
	return 0;
}

Measured memory_bytes: 8448
class Dice
  def initialize(i1, i2, i3, i4, i5, i6)
    @nums = [i1, i2, i3, i4, i5, i6]
  end
  def get_top
    @nums[0]
  end
  def get_right
    @nums[2]
  end
  def move_n
    move(1, 5, 2, 3, 0, 4)
  end
  def move_s
    move(4, 0, 2, 3, 5, 1)
  end
  def move_w
    move(2, 1, 5, 0, 4, 3)
  end
  def move_e
    move(3, 1, 0, 5, 4, 2)
  end
  def normalize(top, front)
    i = @nums.index(top)
    case i
    when 1 then move_n
    when 2 then move_w
    when 3 then move_e
    when 4 then move_s
    when 5 then move_n; move_n
    end
    i = @nums.index(front)
    case i
    when 0 then return false
    when 1 then return true
    when 2 then move_s; move_e; move_n; return true
    when 3 then move_s; move_w; move_n; return true
    when 4 then move_e; move_n; move_w; move_s; move_e; move_n; return true
    when 5 then return false
    else return false
    end
  end
  private
  def move(i1, i2, i3, i4, i5, i6)
    @nums[0], @nums[1], @nums[2], @nums[3], @nums[4], @nums[5] =
      @nums[i1], @nums[i2], @nums[i3], @nums[i4], @nums[i5], @nums[i6]
  end
end

nums = STDIN.gets.chomp.split(' ').map(&:to_i)
dice = Dice.new(*nums)

count = STDIN.gets.chomp.to_i

(1..count).each do |i|
  top, front = STDIN.gets.chomp.split(' ').map(&:to_i)
  dice.normalize(top, front)
  puts dice.get_right
end

Measured memory_bytes: 8632
#include <bits/stdc++.h>
#define lli long long
using namespace std ;
int main(){
    lli n , w , i , j , sum = 0 ;
    cin >> n >> w ;
    vector<vector<lli>> item(n,vector<lli>(2,0)) ;
    for(i=0;i<n;++i) cin >> item[i][0] >> item[i][1] ;
    vector<vector<lli>> dp(n,vector<lli>(w+1,0)) ;
    for(i=0;i<n;++i){
        for(j=0;j<=w;++j){
            if(i==0){
                if(j>=item[i][0]) dp[i][j] = item[i][1] ;
                else dp[i][j] = 0 ;
            }
            else{
                if(j>=item[i][0]) dp[i][j] = max(item[i][1]+dp[i-1][j-item[i][0]],dp[i-1][j]) ;
                else dp[i][j] = dp[i-1][j] ;
            }
        }
    }
    cout << dp[n-1][w] << "\n" ;
    return 0 ;
}

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


int main() {
    int N, A, B;
    cin >> N >> A >> B;
    
    int tmp, ans = 0;
    
    for (int i=1; i<=N; i++) {
        tmp = (i%10) + (i%100)/10 + (i%1000)/100 + (i%10000)/1000 + i/10000;
        if (tmp >= A && tmp <= B) ans += i;
    }
    
    cout << ans << endl;
}

Measured memory_bytes: 256
s = str(input())

T = ["dream", "dreamer", "erase", "eraser"]

new_s =s[::-1]
new_t = []
for item in T:
  new_t.append(item[::-1])

ans_t =''
collector = ''

for c in new_s:
  collector += c
  if collector in new_t:
    ans_t += collector
    collector = ''
    
if new_s == ans_t:
  print('YES')
else:
  print('NO')


Measured memory_bytes: 3316
#include <cstdio>
#include <string.h>
#include <vector>

using namespace std;

namespace {

class Dictionary {
 private:
  struct Node {
    Node* a;
    Node* c;
    Node* g;
    Node* t;
    char flags[4];

    Node() : a(NULL), c(NULL), g(NULL), t(NULL) {
      flags[0] = 0;
      flags[1] = 0;
      flags[2] = 0;
      flags[3] = 0;
    }
  };

 public:
  Dictionary()
      : root_(new Node),
        block_size_(4096),
        pool_index_(0),
        block_index_(0) {
    pool_.push_back(new Node[block_size_]);
  }

  ~Dictionary() {
    for (size_t i = 0; i < pool_.size(); ++i) {
      delete[] pool_[i];
    }
    delete root_;
  }

  void insert(const char* k, size_t n) {
    Node* p = root_;
    int id = 0;
    for (size_t i = 0; i < n; ++i) {
      const char c = k[i];
      switch (c) {
        case 'A':
          {
            if (!p->a) {
              p->a = Alloc();
            }
            p = p->a;
            id = 0;
          }
          break;
        case 'C':
          {
            if (!p->c) {
              p->c = Alloc();
            }
            p = p->c;
            id = 1;
          }
          break;
        case 'G':
          {
            if (!p->g) {
              p->g = Alloc();
            }
            p = p->g;
            id = 2;
          }
          break;
        case 'T':
          {
            if (!p->t) {
              p->t = Alloc();
            }
            p = p->t;
            id = 3;
          }
          break;
      }
    }
    p->flags[id] = 1;
  }

  bool find(const char* k, size_t n) {
    Node* p = root_;
    int id = 0;
    for (size_t i = 0; i < n; ++i) {
      const char c = k[i];
      switch (c) {
        case 'A':
          p = p->a;
          id = 0;
          break;
        case 'C':
          p = p->c;
          id = 1;
          break;
        case 'G':
          p = p->g;
          id = 2;
          break;
        case 'T':
          p = p->t;
          id = 3;
          break;
      }
      if (!p) {
        return false;
      }
    }
    if (!p) {
      return false;
    }
    return p->flags[id];
  }

 private:
  Node* root_;

  Node* Alloc() {
    if (block_index_ >= block_size_) {
      pool_.push_back(new Node[block_size_]);
      pool_index_++;
      block_index_ = 0;
    }
    Node* r = &pool_[pool_index_][block_index_];
    block_index_++;
    return r;
  }

  size_t block_size_;
  size_t pool_index_; // pos in pool
  size_t block_index_; // pos in the block
  vector<Node* > pool_;
};

} // namespace

int main() {
  int n;
  scanf("%d", &n);

  Dictionary d;
  char op[7];
  char str[13];
  for (int i = 0; i < n; ++i) {
    scanf("%s ", op);
    scanf("%s", str);
    const char c = op[0];
    const size_t len = strnlen(str, 13);
    if (c == 'i') {
      d.insert(str, len);
      continue;
    }

    if (d.find(str, len)) {
      printf("yes\n");
    } else {
      printf("no\n");
    }
  }

  return 0;
}

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

int n;
int a[100005],dp[100005];

int main(){

    cin>>n;
    for(int i=1;i<=n;i++)
        cin>>a[i];

    dp[1]=0;
    dp[2]=abs(a[1]-a[2]);

    for(int i=3;i<=n;i++)
        dp[i]=min(dp[i-1]+abs(a[i]-a[i-1]),dp[i-2]+abs(a[i]-a[i-2]));

    cout<<dp[n];

}


Measured memory_bytes: 1024
#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
#include <cstdio>

using namespace std;

const int MAX_V = 100;
int V;
vector<int>G[MAX_V];
vector<int>rG[MAX_V];
vector<int>vs;
bool used[MAX_V];
int cmp[MAX_V];
vector<int>sG[MAX_V];
vector<int>SCC[MAX_V];

void add_edge(int from, int to){
  G[from].push_back(to);
  rG[to].push_back(from);
}

void graph_clear(){
  for(int i=0;i<MAX_V;i++) G[i].clear();
  for(int i=0;i<MAX_V;i++) rG[i].clear();
  for(int i=0;i<MAX_V;i++) sG[i].clear();
  for(int i=0;i<MAX_V;i++) SCC[i].clear();
}

void dfs(int v){
  used[v] = true;
  for (int i=0;i<G[v].size();i++){
    if(!used[G[v][i]]) dfs(G[v][i]);
  }
  vs.push_back(v);
}

void rdfs(int v, int k){
  used[v] = true;
  cmp[v] = k;
  for(int i=0;i<rG[v].size();i++){
    if(!used[rG[v][i]]) rdfs(rG[v][i], k);
  }
}


int scc(){
  memset(used, 0, sizeof(used));
  vs.clear();
  for(int v=0;v<V;v++){
    if(!used[v]) dfs(v);
  }

  memset(used, 0, sizeof(used));
  int k = 0;
  for(int i=vs.size()-1;i>=0;i--){
    if(!used[vs[i]]) rdfs(vs[i], k++);
  }
  return k;
}

vector<double>P;
vector<int>M;

int main(){
  while(1){
    cin >> V;
    if(V == 0) break;
    graph_clear();
    P.clear();
    M.clear();
    for(int i=0;i<V;i++){
      double p; int m; cin >> p >> m;
      P.push_back(p);
      M.push_back(m);
      for(int j=0;j<m;j++){
	int a; cin >> a; a--;
	add_edge(i, a);
      }
    }
    int k = scc();

    for(int i=0;i<V;i++){
      int c = cmp[i];
      //      cout << c << endl;
      SCC[c].push_back(i);
      for(int j=0;j<rG[i].size();j++){
	// cout << c << " " << cmp[rG[i][j]] << endl;
	if(c != cmp[rG[i][j]])
	  sG[c].push_back(cmp[rG[i][j]]);
      }
    }
    
    double res = 1;
    for(int i=0;i<k;i++){
      if(sG[i].size()) continue;
      //      cout << SCC[i].size() << endl;
      double prob = 1;
      for(int j=0;j<SCC[i].size();j++){
	//	cout << P[SCC[i][j]] << endl;
	prob *= P[SCC[i][j]];
      }
      //      cout << prob << endl;
      res *= 1-prob;
    }
    printf("%.10f\n", res);
  }
  return 0;
}

Measured memory_bytes: 3376
#include <iostream>
#include <vector>
#include <numeric>
#include <algorithm>
#include <cstring>
#include <map>
#include <set>
#include <cmath>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define INF 1145141919
typedef long long int ll;
using namespace std;

template <typename T>
istream &operator>>(istream &is, vector<T> &vec)
{
    for (T &x : vec)
        is >> x;
    return is;
}

ll gcd(ll m, ll n)
{
    if ((0 == m) || (0 == n))
        return 0;
    while (m != n)
    {
        if (m > n)
            m = m - n;
        else
            n = n - m;
    }
    return m;
}

ll lcm(ll m, ll n)
{
    if ((0 == m) || (0 == n))
        return 0;
    return ((m / gcd(m, n)) * n);
}

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

    cin >> y >> c1 >> m >> c2 >> d;
    cout << (m <= 4 ? "Heisei" : "TBD") << endl;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define read freopen("input.txt","r",stdin);
#define write freopen("out.txt","w",stdout);
#define endl "\n"
using namespace std;
const double pi = 2 * acos(0.0);
using ll = long long;
using ull = unsigned long long;
template <typename T> inline T gcd (T a, T b) {return a % b == 0 ? b : gcd(b, a%b);}
template <typename Y> inline Y lcm (Y a, Y b) {return (a / gcd(a, b)) * b;}

int main() {
	fast;
	ull a, b;
	cin >> a >> b;
	if(a == 1 || b == 1) {
		cout << 1 << endl;
		return 0;
	}
	ull ans = ceil((a * b * 1.00)/2.00);
	printf("%lld\n", ans);
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <memory>

using namespace std;

struct Node {
  int key;
  Node* parent;
  Node* left;
  Node* right;
  
  Node(int key = -1) : key(key), parent(nullptr), left(nullptr), right(nullptr) {};
};

struct Tree {
  Node* root;  
  
  Tree() : root(nullptr) {};
};

static void insert(Tree& tree, int v) {
  Node* z = new Node(v);
  Node* x(tree.root);
  Node* y(nullptr);
  while (x != nullptr) {
    y = x;
    if (z->key < x->key) {
      x = x->left;
    } else {
      x = x->right;
    }
  }
  
  z->parent = y;
  if (y == nullptr) {
    tree.root = z;
  } else if (z->key < y->key) {
    y->left = z;
  } else {
    y->right = z;
  }
}

static bool find(const Node* node, int v) {
  if (node == nullptr) {
    return false;
  }
  if (node->key > v) {
    return find(node->left, v);
  } else if (node->key < v) {
    return find(node->right, v);
  }
  return true;
}

void preorderWalk(const Node* node) {
  if (node->key == -1) {
    return;
  }
  cout << " " << node->key;
  if (node->left != nullptr) {
    preorderWalk(node->left);
  }
  if (node->right != nullptr) {
    preorderWalk(node->right); 
  }
}

void inorderWalk(const Node* node) {
  if (node->key == -1) {
    return;
  }
  if (node->left != nullptr) {
    inorderWalk(node->left);
  }
  cout << " " << node->key;

  if (node->right != nullptr) {
    inorderWalk(node->right); 
  }
}

static Tree TREE;

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

  string command;
  int v;
  for (int i = 0; i < n; i++) {
    cin >> command;
    if (command[0] == 'i') {
      scanf("%d", &v);
      insert(TREE, v);
    } else if (command[0] == 'f') {
      scanf("%d", &v);
      bool found = find(TREE.root, v);
      cout << (found ? "yes" : "no") << endl;
    } else {
      inorderWalk(TREE.root);
      cout << endl;
      preorderWalk(TREE.root);
      cout << endl;
    }
  }

  return 0;
}



Measured memory_bytes: 22024
#include "bits/stdc++.h"

using namespace std;

using ll = long long;

template<typename T> using V = std::vector<T>;
using Vi = V<int>;
using VVi = V<V<int>>;
using Vl = V<ll>;
using VVl = V<V<ll>>;
using Vs = V<string>;

template<typename T1, typename T2> using P = std::pair<T1, T2>;
using Pii = P<int, int>;
using Pll = P<ll, ll>;
using Pdd = P<double, double>;

template<typename T1, typename T2> using M = std::map<T1, T2>;
using Mii = M<int, int>;
using Msi = M<string, int>;

#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define REP2(i,s,e) for(int i=(int)(s);i<(int)(e);++i)
#define RREP(i,s,e) for(int i=(int)(s);i>=(int)(e);--i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin(),ie=(c).end();i!=ie;++i)
#define ALL(c) (c).begin(), (c).end()

const double PI = acos(-1);
const ll MOD = 1e9+7;

int n, m;
// string s;

int main() {
    cin >> n >> m;
    Vi x(m);
    REP(i, m) cin >> x[i];
    sort(ALL(x));

    Vi edges(m-1);
    REP(i, m-1) {
        edges[i] = abs(x[i+1] - x[i]);
    }
    sort(ALL(edges));

    int res = 0;
    REP(i, m-n) {
        res += edges[i];
    }
    cout << res << '\n';

    return 0;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N ((ll)101*1000)
#define MOD ((ll)1e9+7)

ll n,a[N],b[N];

int main()
{
	//ios_base::sync_with_stdio(0);cin.tie(0);
	cin>>n;
	for(int i=0;i<n;i++)cin>>a[i]>>b[i];
	ll add=0;
	for(int i=n-1;i>=0;i--)
	{
		ll ex=(add+a[i])%b[i];
		if(ex)ex=b[i]-ex;
		add+=ex;
	}
	cout<<add<<"\n";
	return 0;
}

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

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

  int S, W; cin >> S >> W;

  if (S <= W)
    cout << "unsafe" << endl;
  else
    cout << "safe" << endl;

  return 0;
}


Measured memory_bytes: 3612
//input = "4 5\n0 5\n-2 4\n3 4\n4 -4"

function main(input){
  input = input.trim();
  let answer = "";
  let list = input.split("\n");
  let n = parseInt(list[0].split(" ")[0]);
  let d = parseInt(list[0].split(" ")[1]);
  function kyori(x,y){
    return(Math.sqrt(x**2+y**2));
  }
  let count=0;
  for(let i=1; i<list.length; i++){
    let x = parseInt(list[i].split(" ")[0]);
    let y = parseInt(list[i].split(" ")[1]);
    if(kyori(x,y)<=d){count++;}
  }
  answer = count;
  console.log(answer);
}
//main(input);
main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 62472
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int[] a = new int[n];
		for(int i = 0; i < n; i++) a[i] = sc.nextInt();
		ArrayList<Integer> left = new ArrayList<Integer>();
		ArrayList<Integer> right = new ArrayList<Integer>();
		for(int i = 1; i < n; i += 2) left.add(a[i]);
		for(int i = 0; i < n; i += 2) right.add(a[i]);
		if(n % 2 == 0) {
			Collections.reverse(left);
			System.out.print(left.get(0)); left.remove(0);
			for(int i : left) System.out.print(" " + i);
			for(int i : right) System.out.print(" " + i);
			System.out.println();
		}else {
			Collections.reverse(right);
			System.out.print(right.get(0)); right.remove(0);
			for(int i : right) System.out.print(" " + i);
			for(int i : left) System.out.print(" " + i);
			System.out.println();
		}
	}
}

Measured memory_bytes: 93484
#include<stdio.h>
int main(void){
	int a,b;
	char op;
	while(1){
		scanf("%d %c %d",&a,&op,&b);
		if(op == '+')printf("%d\n",a+b);
		else if(op == '-')printf("%d\n",a-b);
		else if(op == '*')printf("%d\n",a*b);
		else if(op == '/')printf("%d\n",a/b);
		else if(op == '?')break;
		
	}
	
	return 0;
}

Measured memory_bytes: 600
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main(){

    input!{
        n: usize,
        a: [usize;n+1],
        b: [usize;n],
    }

    let mut tmp = 0;
    let mut left = 0;
    let mut mons = 0;
    for i in 0..n+1 {
        if a[i] >= tmp {
            left = a[i] - tmp;
            mons += tmp;
        } else if a[i] < tmp {
            left = 0;
            mons += a[i];
        }

        if i<n {
            if left <= b[i] {
                mons += left;
                tmp = b[i] - left;
            } else {
                mons += b[i];
                tmp = 0;
            }
        }
        // print!("tmp = {}, ", tmp);
        // print!("left = {}, ", left);
        // println!("mons = {}", mons);
    }
    
    println!("{}", mons);

}

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

int main() {

    string t, p;
    cin >> t >> p;

    if(t.length() < p.length()){
        return 0;
    }

    for(int i = 0; i < t.length() - p.length() + 1; ++i){
        string str = t.substr(i, p.length());
        if(str == p){
            cout << i << endl;
        }
    }

    return 0;
} 


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

#define sysp system("pause")

long long a,b,c;
string s,t,u;

int main(){
	cin>>a;
	long long d[a];
	for(int i=0;i<a;i++){
		cin>>d[i];
	}
	for(int i=0;i<a;i++){
		b+=d[i];
	}
	cout<<b-a<<endl;
} 

Measured memory_bytes: 256
#include <map>
#include <set>
#include <vector>
#include <algorithm>
#include <iostream>
#include <bitset>
#include <cassert>
#include <queue>
#include <random>
#include <stack>
#include <iomanip>

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

typedef unsigned int uint;
typedef long long llong;
typedef unsigned long long ullong;
typedef long double ldouble;

typedef vector<llong> vecllong;
typedef vector<vecllong> vvecllong;

const llong MOD = 1e9 + 7;
const llong INF = 1e17;

#define FOR(i, n) for (llong i = 0; i < n; i++)
#define FORS(i, a, b) for (llong i = a; i < b; i++)
#define FORR(i, n) for (llong i = n; i > 0; i++)

llong N, Z, W;
vecllong A;

vvecllong memo;  // memo[cardNum][person]

llong search(llong cardNum, llong prevCard, int person) {
    if(cardNum == N - 1) {
        return abs(A[N] - prevCard);
    }
    if(memo[cardNum][person] >= 0) {
        return memo[cardNum][person];
    }

    llong ret;
    if(person == 0) {
        ret = abs(prevCard - A[N]);
        FORS(i, cardNum + 1, N) {
            ret = max(ret, search(i, A[i], 1));
        }
    } else {
        ret = abs(prevCard - A[N]);
        FORS(i, cardNum + 1, N) {
            ret = min(ret, search(i, A[i], 0));
        }
    }
    memo[cardNum][person] = ret;
    return ret;
}


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

    cin >> N >> Z >> W;

    memo.resize(N + 1, vecllong(2, -1));
    A.resize(N + 1, 0);

    FORS(i, 1, N + 1) {
        cin >> A[i];
    }

    llong ans = search(0, W, 0);

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 512
<?php

while (false !== ($line = fgets(STDIN))) {
    $line = trim($line);
    if ('0' === $line) {
        break;
    }
    $nums = preg_split('//', trim($line), -1 , PREG_SPLIT_NO_EMPTY);

    $sum = array_reduce($nums, function ($carry, $item) { return $carry + intval($item); }, 0);
    echo "$sum\n";
}

Measured memory_bytes: 7000
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int x = sc.nextInt();
        int y = sc.nextInt();

        if(n-k<0){
            System.out.println(n*x);
        }else{
        System.out.println(k*x+(n-k)*y);
    }
    }
}


Measured memory_bytes: 23764
#include <bits/stdc++.h>
using namespace std;
 
int main() {

int a,b,c,k;
  cin>>a>>b>>c>>k;
  if(k<a){cout<<k<<endl;}
  else if(k<b){cout<<a<<endl;}
  else {cout<<a-k+a+b<<endl;}
}

Measured memory_bytes: 3632
program sample
	implicit none
    integer(8) ::a,b,c
    
    read(*,*) a,b,c
    
    if(a<b) then
    	write(*,*) (c-1)/b+1
    else
    	write(*,*) (c-1)/a+1
    end if
    
    stop
end program sample

Measured memory_bytes: 2820
#include <iostream>
#include <cmath>
#include <vector>
#include <bitset>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <climits>
#include <set>
#include <map>
#include <iomanip>
#include <cassert>
#include <functional>
#include <cstring>

using namespace std;

#define mp make_pair
#define FOR(i, a, b) for(int (i)=a;(i)<=(b);++(i))
#define rep(i, n)  FOR(i,0,n-1)
#define FFOR(i, a, b) for(int (i)=a;(i)>(b);--(i))
#define rrep(i,n) FFOR(i,0,n)
#define vsort(v) sort((v).begin(), (v).end());					//小さい順
#define rvsort(v) sort(v.begin(), v.end(),greater<>());		//大きい順
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define all(c) (c).begin(),(c).end()
#define ll long long
#define lb long double
#define vi vector<int>
#define vvi vector<vector<int>>
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
#define vs vector<string>
#define vc vector<char>
#define vvc vector<vector<char>>
#define Print(p) cout<<(p)<<endl
#define F first
#define S second
#define pb push_back
#define ll long long
#define mod 1000000007LL
#define INF 123456789012345
typedef pair<int, int> P;
typedef pair<int, P> PP;

const int maxn =1e4 + 10;

ll a[200005];
ll l[200005],r[200005];
int main() {
	
	ll n;cin>>n;
	a[0] = 0;

	FOR(i,1,n)
	{
		cin >> a[i];
		a[i]+=a[i-1];
	}

	int l = 1,r=3;
	ll ans = 1e18;
	FOR(mid,2,n-2)
	{
		// l<midは必要か？
		while(l<mid&&abs(a[mid]-a[l]-a[l])>=abs(a[mid]-a[l+1]-a[l+1])) l++;
		while(r<n&&abs(a[n]-a[r]-(a[r]-a[mid])) >= abs(a[n]-a[r+1]-(a[r+1]-a[mid]))) r++;

		ll dai = max(a[l],max(a[mid]-a[l],max(a[r]-a[mid],a[n]-a[r])));
		ll syou =min(a[l],min(a[mid]-a[l],min(a[r]-a[mid],a[n]-a[r])));
		ans = min(ans,dai-syou); 
	}

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

Measured memory_bytes: 2944
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using u32 = uint32_t;
using vi = vector<int>;    using vvi = vector<vi>;
using vb = vector<bool>;   using vvb = vector<vb>;
using vl = vector<ll>;     using vvl = vector<vl>;
using vd = vector<double>; using vvd = vector<vd>;

#define MAXC(c, x) (c = max(c, x))
#define MINC(c, x) (c = min(c, x))

#define REP(i,n) for(auto i = 0 * (n), i##_len = (n); i < i##_len; ++i)
#define ALL(c) (c).begin(), (c).end()
#define FOR(i,s,n) for(ll i=s, i##_len=(ll)(n); i<i##_len; ++i)
#define TEN(x) ((ll)1e##x)
const ll mod = TEN(9) + 7;

const ll INF = 1e9;

ll max_abs(vector<pair<ll,ll>> & v, ll l, ll r) {
	vector<pair<ll, ll>> w;
	FOR(i, l, r + 1) w.push_back(v[i]);
	sort(ALL(w));

	if (w.back().first == 0 || abs(w.front().first) > abs(w.back().first) && w.front().first != 0) {
		return w.front().second;
	} else {
		return w.back().second;
	}
}

int main() {
	#ifdef INPUT_FROM_FILE
	ifstream cin("sample.in");
	ofstream cout("sample.out");
	#endif
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(50);

	ll n; cin >> n;
	vector<pair<ll,ll>> a(n);
	REP(i, n) {
		cin >> a[i].first;
		a[i].second = i;
	}
	ll idx = max_abs(a, 0, n - 1);
	if (a[idx].first > 0) {
		cout << 2 * n << endl;
		REP(i, n) {
			cout << (i == 0 ? idx + 1 : i) << " " << i + 1 << endl;
			cout << (i == 0 ? idx + 1 : i) << " " << i + 1 << endl;
		}
	} else {
		cout << 2 * n << endl;
		for(ll i = n - 1; i >= 0; --i) {
			cout << (i == n - 1 ? idx + 1 : i + 2) << " " << i + 1 << endl;
			cout << (i == n - 1 ? idx + 1 : i + 2) << " " << i + 1 << endl;
		}
	}

	return 0;
}


Measured memory_bytes: 256
s = input()



for i in range(8):
    ans = int(s[0])
    f = s[0]
    for j in range(3):
        if i >> j & 1:
            ans += int(s[j + 1])
            f = f + "+" + s[j + 1]
        else:
            ans -= int(s[j + 1])
            f = f + "-" + s[j + 1]
    #print(bin(i), ans, f)
    if ans == 7:
        print(f + "=7")
        break

Measured memory_bytes: 3060
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i < b; i++)
#define Rep(i, a, b) for(int i = a; i <= b; i++)
#define _GLIBCXX_DEBUG
#define Vl vector<ll>
#define Vs vector<string>
#define Vp vector<pair<ll, ll>>
#define P pair<ll, ll>
using ll = long long;
#define ALL(v) (v).begin(),(v).end()
#define endl "\n"
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define co(x) cout << x << endl
#define coel cout << endl
#define pb push_back
#define sz(v) ((ll)(v).size())
using namespace std;  
const double pi = acos(-1.0);
const ll MOD = 1e9 + 7;
const ll INF = 1LL << 60;
#define pp pair<ll, pair<ll, ll>> 




////////////////////////////////////////////////////////


int main() {
    string s; cin >> s;
    bool f = true;
    while(f){
        bool f = true;
        rep(i, 0, sz(s)-5){
            if(s[i]=='S'&&s[i+1]=='S'&&s[i+2]=='S'&&
            s[i+3]=='T'&&s[i+4]=='T'&&s[i+5]=='T'){
                s.erase(i, 6);
                f = false;
                i -= 5;
            }
        }
        rep(i, 0, sz(s)-1){
            if(s[i] == 'S' && s[i+1] == 'T'){
                s.erase(i, 2);
                f = false;
                i--;
            }
        }
        if(f) break;
    }
    co(sz(s));

    return 0;
}


Measured memory_bytes: 640
using System;
using System.Collections.Generic;

namespace Project
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			string[] s = Console.ReadLine().Split(' ');
			int W, H, N;
			W = int.Parse(s[0]);
			H = int.Parse(s[1]);
			N = int.Parse(s[2]);
			int[] x = new int[N];
			int[] y = new int[N];
			int[] a = new int[N];
			for (int i = 0; i < N; i++)
			{
				string[] ss = Console.ReadLine().Split(' ');
				x[i] = int.Parse(ss[0]);
				y[i] = int.Parse(ss[1]);
				a[i] = int.Parse(ss[2]);
			}
			List<int> a1 = new List<int>();
			List<int> a2 = new List<int>();
			List<int> a3 = new List<int>();
			List<int> a4 = new List<int>();

			for (int i = 0; i < N; i++)
			{
				switch (a[i])
				{
					case 1:
						a1.Add(x[i]);
						break;
					case 2:
						a2.Add(x[i]);
						break;
					case 3:
						a3.Add(y[i]);
						break;
					case 4:
						a4.Add(y[i]);
						break;
				}
			}
			a1.Sort();
			a2.Sort();
			a3.Sort();
			a4.Sort();
			int tate = H, yoko = W;
			if (a1.Count * a2.Count == 0)
			{
				if (a1.Count == 0 && a2.Count == 0)
					yoko = W;
				else if (a1.Count == 0)
					yoko = a2[0];
				else
					yoko = W - a1[a1.Count - 1];
			}
			else
			{
				yoko = a2[0] - a1[a1.Count - 1];
			}

			if (a3.Count * a4.Count == 0)
			{
				if (a3.Count == 0 && a4.Count == 0)
					tate = H;
				else if (a3.Count == 0)
					tate = a4[0];
				else
					tate = H - a3[a3.Count - 1];
			}
			else
			{
				tate = a4[0] - a3[a3.Count - 1];
			}
			if (tate <= 0 || yoko <= 0)
				Console.WriteLine(0);
			else
				Console.WriteLine(tate * yoko);

		}
	}
}


Measured memory_bytes: 2904
using System;

public class Program
{
	public static void Main()
	{
		Dice d1 = new Dice(Console.ReadLine().Split(' '));
		Dice d2 = new Dice(Console.ReadLine().Split(' '));

		if(d1.IsEquals(d2)) Console.WriteLine("Yes");
		else	Console.WriteLine("No");
	}
}

public class Dice
{
	public string Left { get; private set; }
	public string Front { get; private set; }
	public string Right { get; private set; }
	public string Rear { get; private set; }
	public string Top { get; private set; }
	public string Bottom { get; private set; }

	//   4
	// 3 0 2 5
	//   1
	public Dice(string[] faces)
	{
		Front = faces[0];
		Bottom = faces[1];
		Right = faces[2];
		Left = faces[3];
		Top = faces[4];
		Rear = faces[5];
	}

	public void RollX(bool direction)
	{
		var tmp = "";
		if(direction) {
			tmp = Top;
			Top = Front;
			Front = Bottom;
			Bottom = Rear;
			Rear = tmp;
		} else {
			tmp = Top;
			Top = Rear;
			Rear = Bottom;
			Bottom = Front;
			Front = tmp;
		}
	}

	public void RollY(bool direction)
	{
		var tmp = "";
		if(direction) {
			tmp = Top;
			Top = Right;
			Right = Bottom;
			Bottom = Left;
			Left = tmp;
		} else {
			tmp = Top;
			Top = Left;
			Left = Bottom;
			Bottom = Right;
			Right = tmp;
		}
	}

	public void RollZ(bool direction)
	{
		var tmp = "";
		if(direction) {
			tmp = Front;
			Front = Right;
			Right = Rear;
			Rear = Left;
			Left = tmp;
		} else {
			tmp = Front;
			Front = Left;
			Left = Rear;
			Rear = Right;
			Right = tmp;
		}
	}

	public void Roll(char direction)
	{
		var c = char.ToUpper(direction);

		switch(c){
			case 'N':	RollX(true);	break;
			case 'S':	RollX(false);	break;
			case 'W':	RollY(true);	break;
			case 'E':	RollY(false);	break;
			case 'U':	RollZ(true);	break;
			case 'D':	RollZ(false);	break;
		}

		//Console.WriteLine(this.Left + this.Front + this.Right + this.Rear + this.Top + this.Bottom);
	}

	public bool IsEquals(Dice d)
	{
		foreach ( var c in "UUUUNUUUUNUUUUNUUUUEUUUUSSUUUU".ToCharArray()) {
			if(this.Bottom == d.Bottom &&
			   this.Front == d.Front &&
			   this.Left == d.Left &&
			   this.Rear == d.Rear &&
			   this.Right == d.Right &&
			   this.Top == d.Top){
				return true;
			}

			d.Roll(c);
		}

		return false;
	}
}

Measured memory_bytes: 9164
/**Bismillahir Rahmanir Rahim.**/
/*
         Md.Fagun Molla
         18ICTCSE006
         BSMRSTU(SHIICT)
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
using ll=long long;
using db=double;
///***************************************************** CONSTANTS ******************************************************///

int const N=1e6+3;
ll MOD=1e9+7,fact[N];
const long long inf=(long long)1e18;
const long double PI=3.14159265358979;

///************************************************ CONTAINER DEFINITIONS ***********************************************///

typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

///************************************************ SHORT FORM KEYWORDS *************************************************///

#define PB push_back
#define F first
#define S second
#define MP make_pair
#define I insert
#define lb lower_bound
#define ub upper_bound
#define endl '\n'

///************************************************ SHORT FORM FUNCTIONS ************************************************///

#define loop(a,b) for(ll i=a;i<b;i++)
#define loopr(a,b) for(ll i=a-1;i>=b;i--)
#define mem(a,b) memset(a, b, sizeof(a) )
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define sa(v) sort(v.begin(),v.end())
#define sd(v) sort(v.begin(),v.end(),greater<>())
#define rev(s) reverse(s.begin(),s.end())
#define stll(x) stoll(x, nullptr, 10);
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define mx(a) *max_element(all(a))
#define mn(a) *min_element(all(a))
#define all(a) a.begin(),a.end()
#define mxa(a,N) *max_element(a,a+N)
#define mna(a,N) *min_element(a,a+N)
#define print(a) {for(auto x:a)cout<<x<<" ";cout<<endl;}
#define io() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);


///************************************************ SOLUTION STARTS HERE ************************************************///
///======================================================================================================================///

void solve(){
   double a,b,c;
   cin>>a>>b>>c;
   if(a/c<=b) cout<<"Yes"<<endl;
   else cout<<"No"<<endl;
}
int main()
{
    io();
    int T=1;//cin>>T;
    while(T--) solve();
    return 0;
}

/****************ALHAMDULILLAH******************/




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

int main()
{
    long long l,r,d;
    cin>>l>>r>>d;
    int i,cnt=0;
    long long a;
    for(i=1;i<10000;i++){
        a=d*i;
        if(a>=l&&a<=r)
            cnt++;
    }
    cout<<cnt<<endl;
    return 0;
}

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

const int maxn = 1e5 + 10;
int n, a[maxn];
map<long long, long long> _count;
multiset<long long> my_set;

int main() {
    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        _count[a[i]]++;
        if (_count[a[i]] == 2) {
            my_set.insert(a[i]);
            _count[a[i]] = 0;
        }
    }
    if (my_set.size() < 2) {
        cout << 0 << endl;
    } else {
        auto it = --my_set.end();
        cout << *it * *(--it) << endl;
    }
    return 0;
}

Measured memory_bytes: 6912
#include <bits/stdc++.h>
#define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i];
typedef long long int ll;
using namespace std;

int main(){
	int n; cin >>n;
	vector<long long> a(n);
	cinf(n,a);
	ll sum=0;
	ll mi=1000000;
	ll ma=-1000000;
	for(int i=0;i<n;i++){
		sum+=a[i];
		mi=min(mi,a[i]);
		ma=max(ma,a[i]);
	}
	cout << mi << " "<< ma << " "<< sum << endl;
}


Measured memory_bytes: 3164
#include <iostream>
  #include <string>
  #include <vector>
  #include <algorithm>
  #include <map>
  using namespace std;
  typedef long long ll;
  #define rep(i,n) for (int i=0;i < (int)(n);i++)

  int main(){
    int n,l;
    string s;
    cin >> n >> l;
    int ans = 200;
    int tmp =0;
    int sum=0;
    for (int i=1;i <=n;i++){
      if ( ans > abs(i+l-1)){
        ans=abs(i+l-1);
        tmp=i+l-1;
      }
      sum+=(i+l-1);
    }
    cout << sum-tmp << endl;

    
    return 0;
  }
    
    

Measured memory_bytes: 256
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>

using namespace std; 

typedef long long int ll;


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

    int n;
    cin >> n;
    
    long double A[n];
    for(int i = 0; i < n; i++)cin >> A[i];
    long double x = 0;
    for(int i = 0; i < n; i++) x+=(1/A[i]);

    x = (1/x);
    cout << x;
    // int num;
    // double fracSum = 0;

    // for(int i = 0; i < n; i++)
    // {
    //     num = 0;
    //     cin >> num;
    //     fracSum += (1/num);
    // }
    
    // float inverse = 1/fracSum;
    // cout << inverse;
    return 0;
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    int number[9999];
    for(int i=1;i<9999;i++)number[i]=i*i;
    while(cin>>n,n){
        vector<int> num;
        for(int i=1;i<n;i++)num.push_back(number[i]%n);
        sort(num.begin(),num.end());
        num.erase(unique(num.begin(),num.end()),num.end());
        int ans[5000]={};
        for(int i=0;i<num.size();i++){
            for(int j=0,k;j<num.size();j++){
                k=num[i]-num[j];
                if(k<0)k+=n;
                if(k>n/2)k=n-k;
                ans[k]++;
            }
        }
        for(int i=1;i<=n/2;i++)cout<<ans[i]<<endl;
    }
}

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

using namespace std;

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

    int max_r = -1;
    vector<int> whites, reds;
    char c;
    for(int i = 0; i < n; i++) {
        cin >> c;
        if(c == 'W') {
            whites.push_back(i);
        }else {
            reds.push_back(i);
            max_r = i;
        }
    }

    if(max_r == -1) {
        cout << 0 << endl;
        return 0;
    }

    int count = 0;
    for(auto w : whites) {
        max_r = reds[reds.size()-1];
        if(w > max_r) break;
        reds.pop_back();
        count++;
    }

    cout << count << endl;
}

Measured memory_bytes: 4516