akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define all(x) (x).begin(),(x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr auto INF = INT_MAX / 2;
constexpr auto LINF = 5000000000000000;
constexpr auto MOD = 1000000007;

int main() {

	int k, a, b;
	cin >> k >> a >> b;
	bool ok = false;
	for (int i = a;i <= b;i++)if (i % k == 0)ok = true;

	cout << (ok ? "OK" : "NG") << endl;

}

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

typedef long long ll;

int main()
{
	ll n;
	cin>>n;
	ll a[n];
	for(int i=0;i<n;i++)
		cin>>a[i];
	
	sort(a,a+n);
	ll ans=a[n-1],j=n-2;
	for(int i=n-3;i>=0;i--)
	{
		ans+=a[j];
		i--;
		if(i>=0)
			ans+=a[j];
		j--;
	}
	cout<<ans;
}

Measured memory_bytes: 5200
#include<cstdio>

int main(){
	int a,b,c;
	int d = 0, r = 0;
	while(1 + scanf("%d,%d,%d", &a, &b, &c)){
		if(a == b){
			d++;
		}else if(a * a + b * b == c *c){
			r++;
		}
	}
	printf("%d\n%d\n", r, d);
	return 0;
}

Measured memory_bytes: 1024
#include <iostream>
#include <stdio.h>
#include <vector>
#include <cstring>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <utility>
#include <queue>
#include <deque>
#include <stack>
#include <time.h>
#include <stdlib.h>
#include <bitset>
#include <algorithm>

#include <chrono>

#define INF 1e9
#define LL_INF 1e18

#define fst first
#define snd second
#define pb push_back
#define SZ(x) ((int)(x.size()))

#define MOD1 998244353
#define MOD2 666013
#define P1 255
#define P2 2059

using namespace std;

typedef long long int ll;

typedef pair<ll, ll> pll;
typedef pair<int, int> pii;

#define nmax 100010
#define MOD (1e9) + 7

int n, k;
int dp[110][nmax], sum[nmax], a[110];

void add_self(int& a, int b)
{
    a += b;

    if (a < 0) a += MOD;
    if (a >= MOD) a -= MOD;
}

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

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

    dp[0][0] = 1;

    for (int i = 1; i <= n; i++) {

        memset(sum, 0, sizeof(sum));

        for (int j = k; j >= 0; j--)
            if (dp[i - 1][j] > 0) {

                add_self(sum[j], dp[i - 1][j]); 
                add_self(sum[min(j + a[i] + 1, k + 1)], -dp[i - 1][j]);
            }

        for (int j = 0; j <= k; j++) {

            add_self(sum[j], (j - 1 < 0 ? 0 : sum[j - 1]));
            add_self(dp[i][j], sum[j]);
        }
    }

    printf("%d", dp[n][k]);

    // IMPORTANT!!!!!
    // Are you missing something????
    // check limits, int or ll

    return 0;
}

Measured memory_bytes: 40832
#include <iostream>
#include <iomanip>
#include <bits/stdc++.h>
#include <vector>
#include <iterator>
#include <string>
#define pan(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define vi vector<int>
#define pb push_back
#define INF 1e9+7
#define PI 3.141592653
#define inf 200001
using namespace std; 


int main(){
    int n;
    cin>>n;
    vi v,p;
    pan(i,n){int x;
        cin>>x;
        if(i%2==0) v.pb(x);
        else p.pb(x);
    }
    int o=0,o1=-1,e=0,e1=-1,x[inf],y[inf];
    memset(x,0,sizeof(x));
    memset(y,0,sizeof(y));
    for(int i=0;i<v.size();i++) x[v[i]]++;
    int ce=*max_element(x,x+inf);
    e=distance(x,max_element(x,x+inf));
    x[e]=0;
    int ce1=*max_element(x,x+inf);
    e1=distance(x,max_element(x,x+inf));
    pan(i,p.size()) y[p[i]]++;
    int co=*max_element(y,y+inf);
    o=distance(y,max_element(y,y+inf));
    y[o]=0;
    int co1=*max_element(y,y+inf);
    o1=distance(y,max_element(y,y+inf));
    int ans=0;
    if(o!=e) ans=n-co-ce;
    else{
        ans=min(n-co-ce1,n-co1-ce);
    }
    // cout<<co<<" "<<ce1<<endl;
    cout<<ans;
}

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

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

//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 iter(i,c) for(auto i=(c).begin(); i!=(c).end(); ++i)

//repetition
//------------------------------------------
#define loop(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  loop(i,0,n)

//constant
//--------------------------------------------
const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

// output vector
// ------------------------------------------
namespace std {
    template<typename T> ostream & operator<<(ostream& os, vector<T> const& v){
        for(auto it=v.begin(); it!=v.end(); ++it){
            os << *it << (it+1==v.end() ? "" : ",");
        }
        return os;
    }
}

//clear memory
#define clr(a) memset((a), 0 ,sizeof(a))

int gcd(int a, int b){
   int tmp;
   while(a%b!=0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}
 
int lcm(int a,int b){
   return a*b/gcd(a,b);
}
 
bool prime_number(int n){
   if(n==0||n==1) return false;
   vb a(n+1);
   fill(all(a),true);
   loop(i,2,n/2+1){
      if(!a[i]) continue;
      for(int j=2;i*j<=n;j++){
         a[i*j]=false;
      }
   }
   return a[n];
}

int main(){
   double a[3];
   char s;
   
   while(cin >> a[0]){
      rep(i,2) cin>>s>>a[i+1];
      if(a[1]/pow(a[2],2)>=25) cout << a[0] << endl;
   }
}

Measured memory_bytes: 1276
import math
K = int(input())

ans = 0

for a in range(1, K + 1):
    for b in range(a, K + 1):
        ab = math.gcd(a, b)
        for c in range(b, K + 1):
            abc = math.gcd(ab, c)
            if a == b == c:
                m = 1
            elif a == b or b == c or c == a:
                m = 3
            else:
                m = 6
            ans += m * abc

print(ans)

Measured memory_bytes: 9208
// https://atcoder.jp/contests/dp/tasks/dp_c
#include<iostream>
#include <cstdlib>
#include <algorithm>

using namespace std;

struct happy{
	int a,b,c;
};

int main()
{
	ios_base::sync_with_stdio(false);cin.tie(NULL);
	int n;
	cin >> n;
	happy arr[n],independent[n];
	for(int i=0;i<n;i++)
		cin >> arr[i].a >> arr[i].b >> arr[i].c;
	independent[0].a = arr[0].a;
	independent[0].b = arr[0].b;
	independent[0].c = arr[0].c;
	for(int i=1;i<n;i++)
	{
		independent[i].a = arr[i].a + max(independent[i-1].b, independent[i-1].c);
		independent[i].b = arr[i].b + max(independent[i-1].a, independent[i-1].c);
		independent[i].c = arr[i].c + max(independent[i-1].b, independent[i-1].a);
	}
	int ans = max(max(independent[n-1].a, independent[n-1].b),independent[n-1].c);
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 5480
#include<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
#include<cassert>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
//問題文および制約はちゃんと確認しよう！
//サイズは10^5じゃなくて2×10^5とかかもしれないし、重要な制約・条件を見落としているかも
//とりあえずサンプルを読んでから解法を考えよう？
int main()
{
	lint a,b,v,w,t;
	cin>>a>>v;
	cin>>b>>w;
	cin>>t;
	if((v-w)*t>=abs(a-b)) cout<<"YES"<<endl;else cout<<"NO"<<endl;
}


Measured memory_bytes: 3584
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>



void swap (int *x, int *y) {
  int temp;

  temp = *x;
  *x = *y;
  *y = temp;

  return;
}


int gcd(int a, int b){
  int c;

  while (b > 0){
    c = a % b;
    a = b;
    b = c;
  }

  return a;
}

/* クイックソート */
int dn(const void*a,const void*b){return*(int*)b-*(int*)a;}


long int modpow(long int a,long int n,long int mod){
  long int ans=1;
  while(n>0){
    if(n & 1){
      ans=ans*a%mod;
    }
    a=a*a%mod;
    n/=2;
  }
  return ans;
}

long int modinv(long int a,long int mod){
  return modpow(a,mod-2,mod);
}

int max(int a,int b){
  if(a<b){
    return b;
  }
  else{
    return a;
  }
}

int min(int a,int b){
  if(a<b){
    return a;
  }
  else{
    return b;
  }
}

void chmax(int *a,int b){
  if(*a < b){
    *a = b;
  }

  return;
}

void chmin(int *a,int b){
  if(*a > b){
    *a =b;
  }

  return;
}

/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

int main(void){
  double a,b,h,m;
  scanf("%lf%lf%lf%lf",&a,&b,&h,&m);

  double pi=3.14159265358979;
  /*

  時計の中心と文字盤の0を結んだ線を基準線と呼ぶことにします．

  時計の中心と文字盤のh(0<=h<12)を結んだ線と基準線が作る角の大きさx(0<=x<180)は
  度数法で(30*h)と表すことができます．
  
  また，m分(0<=m<60)の時の長針と基準線が作る角の大きさy(0<=y<180)は
  度数法で(6*m)と表すことができます．

  これらをまとめてh時m分の時の長針と短針が作る角の大きさは
  abs(30*h-6*m)と表すことができそうです(これが180を超える場合は360から引いてやればいいです)

  が，短針は時間が変わったら30度一気に動くわけではなく，60分かけて30度を動いていくので，それも考慮しなければなりません．

  つまり，30*(m/60)=m/2をxに足してやる必要があります．

  改めて，h時m分の時の長針と短針が作る角の大きさzは
  abs(30*h+m/2-6*m)と表すことができます．

  ここで余弦定理を用いて求める長さが欲しいわけですが，注意しなければいけないのは
  sin(z)の引数(渡してあげるzのこと)は度数法ではなく弧度法でないといけません．

  pi==180\degreeであるのでpi:180==?:zの式を?について解くと
  ?=z*pi/180であることがわかります．

  以上のことより，答えは

  a*a+b*b-2*a*b*cos(z*pi/180)

  となります．
  
  */
  
  //0<=h<12にする
  if(h>=12){
    h-=12;
  }

  //hは基準線とそれが作る角度
  h=30*h+m/2;

  //mは基準線とそれが作る角度
  m*=6;
  
  
  double z=h-m;
  
  //この部分，なんでこんな実装をしているかというと，
  //abs(h-m)を渡してやったら誤差で消えるケースがあったので
  //こういう実装をしました．
  if(z<0){
    z*=-1;
  }
  
  
  if(z>180){
    z=360-z;
  }


  z=z*pi/180;
  
  double ans=a*a+b*b-2*a*b*cos(z);

  //"%lf"の間に入っている.16っていうのは「小数点16まで表示します」という命令
  printf("%.16lf\n",sqrt(ans));

  return 0;
}

Measured memory_bytes: 2508
// ABC 154-C
// 2020.2.9 bal4u

#include <stdio.h>

#define gc() getchar_unlocked()

int in() {   // 非負整数の入力
	int n = 0; int c;
	c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

// 数値のハッシュ関数
#define HASHSIZ 2000081
int hash[HASHSIZ+5], *hashend = hash + HASHSIZ;

int insert(int n) {
	int *p = hash + n % HASHSIZ;
	while (*p) {
		if (*p == n) return 1;
		if (++p == hashend) p = hash;
	}
	*p = n;
	return 0;
}

int main()
{
	int N;
	
	N = in();
	while (N--) {
		if (insert(in())) {
			puts("NO");
			return 0;
		}
	}
	puts("YES");
	return 0;
}


Measured memory_bytes: 7936
fun main(args:Array<String>){
    var n = readLine()!!.split(" ").map { it.toInt()}.toMutableList()
    var count = 0
    while (true){
        n[0] -= n[1]
        count++
        if(n[0] <= 0){
            println(count)
            break
        }
    }
}


Measured memory_bytes: 37904
n = int(input())

ans = []
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def f(n):
  ans.append(alphabet[n%26-1])
  if n > 26:
    if n%26 == 0:
      f((n-26)//26)
    else:
      f((n-n%26)//26)


    
f(n)

for i in range(len(ans)):
  if i == len(ans)-1:
    print(ans[-i-1])
  else:
    print(ans[-i-1], end = '')
    
    

Measured memory_bytes: 9052
#!/usr/bin/env python3
import sys


def solve(N: int, x: "List[int]", y: "List[int]", h: "List[int]"):
    X = 0
    Y = 0
    hh = 0
    for i in range(0, 101):
        for j in range(0, 101):
            H =  []
            s = 0
            for k in range(N):
                if h[k] > 0:
                    s += h[k]
                    H.append(h[k] + abs(x[k] - i) + abs(y[k] - j))
            if len(H) > 1 and len(list(set(H))) == 1:
                X, Y, hh = i, j, H[-1]
            elif len(H) == 1 and H[0] == s:
                X, Y, hh = i, j, H[0]

    print(X, Y, hh)
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    x = [int()] * (N)  # type: "List[int]" 
    y = [int()] * (N)  # type: "List[int]" 
    h = [int()] * (N)  # type: "List[int]" 
    for i in range(N):
        x[i] = int(next(tokens))
        y[i] = int(next(tokens))
        h[i] = int(next(tokens))
    solve(N, x, y, h)

if __name__ == '__main__':
    main()


Measured memory_bytes: 3444
#define _USE_NATH_DEFINES
#include<cstdio>
#include <iostream>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<algorithm>
#include<cmath>
#include<complex>
#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>
#include<iterator>
using namespace std;

int main() {
	int n, len = 0, num,big;
	int s[11];
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> s[i];
		len += s[i];
	}

	/* 1個目の整数を big に代入 */
	big = s[0];

	for (int i = 1; i < n; ++i) {
		/* n個目の整数を入力 */
		num = s[i];
		/* 入力した整数を big と比較 */
		if (num>big)
			big = num;
	}
	len = len - big;
	if (big < len)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}


	/*cin >> n >> s;
	for (int i = 0; i < n-1; i++) {
		for (int j = 0; j < n-1; j++) {
			for (int k = 0; k < n-1; k++) {
				len = s[i] + s[j] + s[k];
				ma = max(s[i], max(s[j], s[k]));
				rest = len - ma;
			}
		}

	}
	if (ma < rest)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}*/
}

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

int main() {
  char x, y;
  cin >> x >> y;
  if (x < y) cout << '<' << endl;
  else if (x > y) cout << '>' << endl;
  else cout << '=' << endl;
  return 0;
}

Measured memory_bytes: 3640
x, y = [int(num) for num in input().split()]
group1 = {1, 3, 5, 7, 8, 10, 12}
group2 = {4, 6, 9, 11}
group3 = {2}
L = [group1, group2, group3]
for group in L:
  if set([x, y]) <= group:
    print("Yes")
    break
else:
  print("No")

Measured memory_bytes: 38384
#include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
using namespace std;

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

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

using namespace std;

int main(){
	int n;
	cin>>n;
	int arr[10001]={0};
	for(int i=1;i<=100;i++){
		for(int j=1;j<=100;j++){
			for(int k=1;k<=100;k++){
				int m=i*i+k*k+j*j+i*k+i*j+j*k;
				if(m<=10000){
					arr[m]++;
				}
			}
		}
	}
	for(int i=1;i<=n;i++){
		cout<<arr[i]<<endl;
	}
}

Measured memory_bytes: 3560
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
const ll MOD = 1e9+7;

int main(){
  int n, c, k, i;
  cin >> n >> c >> k;
  vector<int> T(n);
  rep(i, n) cin >> T[i];
  sort(T.begin(), T.end());
  int bus=0, ct=1, p=T[0];
  for(i=1; i<n; i++){
    //int to = T[i];
    //int tk = T[k-i+1];
    if(i==n-1){
      if(ct==c) bus += 2;
      else if(T[n-1]<=p+k) bus++;
      else bus += 2;
    }
    else if(ct==c) {
      bus++;
      p = T[i];
      ct=1;
    }
    else if(T[i]<=p+k) ct++;
    else {
      bus++;
      ct=1;
      p = T[i];
    }
  }
  cout << bus << endl;
}

Measured memory_bytes: 640
import sys
input = sys.stdin.readline

def main():
    N, M = map(int, input().split())

    ans = 0
    tmp = min(N, M//2)
    N -= tmp
    M -= 2 * tmp
    ans += tmp
    if N == 0:
        ans += M // 4
    print(ans)

if __name__ == "__main__":
    main()

Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int man=1000005;
const int MAXM= 15000005;
int n;
int a,b,c;
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin>>a>>b>>c;
  int a1=max(max(a,b),c);
  int b1=min(min(a,b),c);
  int c1=a+b+c-a1-b1;
  cout<<10*a1+c1+b1<<endl;

}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int no_of_input;
  string input;
  cin >> no_of_input >> input;
  int dp[no_of_input+1][no_of_input+1];
  int ans = 0;
  memset(dp,0,sizeof(dp));
  for(int i=1;i<=no_of_input;i++){
    for(int j=i+1;j<=no_of_input;j++){
      if(input.at(i-1)==input.at(j-1)&&dp[i-1][j-1]<(j-i)){
        dp[i][j] = dp[i-1][j-1]+1;
        ans = max(ans,dp[i][j]);
      }
      else{
        dp[i][j] = 0;
      }
    }
  }
  cout << ans;

}

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

#define REP(i, n) for (int i = 0; i < (n); ++i)
/***** MAIN *****/
signed main() {
  int n;
  cin >> n;
  vector<int> flower(n);
  REP(i,n) cin >> flower[i];
  int ans = 0;
  int active = 0;
  REP(i,n) {
    if(active >= flower[i]) {
      active = flower[i];
    } else {
      ans += flower[i] - active;
      active = flower[i];
    }
  }
  cout << ans;

  cout << "\n";
  return 0;
}
/***** MAIN *****/


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

class Solver {
  public:
    
    bool solve() {
        int N; cin >> N;
        ll a = 1, b = 1;
        rep(i, N) {
            ll T, A; cin >> T >> A;
            ll base = T + A;
            ll sum = ((a + b) / base + ((a + b) % base != 0));
            sum = max(sum, a / T + (a % T != 0));
            sum = max(sum, b / A + (b % A != 0));
            a = sum * T;
            b = sum * A;
            cerr << a << " : " << b << endl;
        }
        cout << a + b << endl;
        return 0;
    }
};

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


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

#define L 20
#define Gard NULL

struct Tree{
  int nodekey;
  struct Tree *parent;
  struct Tree *leftch;
  struct Tree *rightch;
};

typedef struct Tree  *Search;
Search road;

void Insert(int );
void Pre(Search );
void In(Search );


int main(){
  int loop,numnode;
  char order[L];
  int i;
    
  scanf("%d",&loop);
  
  for(i=0;i<loop;i++){
    scanf("%s",order);
    
    if(order[0]=='i'){
      scanf("%d",&numnode);
      Insert(numnode);
    }
    
    if(order[0]=='p'){
      In(road);
      printf("\n");
      Pre(road);
      printf("\n");
    }
  }
  
  return 0;
}

void Insert(int numnode){
  Search x,y,z;
  
  x=road;
  y=Gard;
  z=malloc(sizeof(struct Tree));
  z->nodekey=numnode;
  z->leftch=Gard;
  z->rightch=Gard;
  
  while(x!=Gard){
    y=x;
    
    if(z->nodekey<x->nodekey){
      x=x->leftch;
    }
    
    else{
      x=x->rightch;
    }
  }
  
  z->parent=y;
  
  if(y==Gard){
    road=z;
  }
  
  else if(z->nodekey<y->nodekey){
    y->leftch=z;
  }
  
  else{
    y->rightch=z;
  }
    
}

void Pre(Search road){

  if(road==Gard){
    return;
  }
  
  printf(" %d",road->nodekey);
 
  Pre(road->leftch);
  Pre(road->rightch);
  
}

void In(Search road){

  if(road==Gard){
    return;
  }
  
  In(road->leftch);
  
  printf(" %d",road->nodekey);
  
  In(road->rightch);
}



Measured memory_bytes: 25128
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    // TODO 自動生成されたメソッド・スタブ
    Scanner sc = new Scanner(System.in);
    long n = sc.nextLong();

    // a*b = nを満たすなかで、a+bが最小のものを選び、そこから-2する

    long min = n;
    long x = 1, y = 1;
    for (long i = 1; i <= Math.sqrt(n); i++) {
      if (n % i == 0) {

        if (min > i + (n / i)) {
          x = i;
          y = (n / i);
          min = x + y;
        }
      }
    }
    if (x == 1 || y == 1) {
      System.out.println(min - 1);
    } else {
      System.out.println(min - 2);
    }
  }
}


Measured memory_bytes: 21844
N,A,B=map(int,input().split())

if (B-A)%2==0:
    print((B-A)//2)
else:
    C=min(N+1-B,N+1-A)
    D=max(N+1-B,N+1-A)
    print(min(A + (B-A-1)//2,C + (D-C-1)//2))


Measured memory_bytes: 38384
#include<iostream>
using namespace std;
int main(){
    int m,f,r;
    
    while(1){
        cin >> m >> f >> r;
        
        if(m == -1 && f == -1 && r == -1) break;
        
        if(m+f >= 80) cout << "A" << endl;
        else if(m == -1 || f == -1) cout << "F" << endl;
        else if(m+f >= 65 && m+f < 80) cout << "B" << endl;
        else if(m+f >= 50 && m+f < 65) cout << "C" << endl;
        else if(m+f >= 30 && m+f < 50){
            if(r >= 50) cout << "C" << endl;
            else cout << "D" << endl;
        }
        else if(m+f < 30) cout << "F" << endl;
        
    }
    
    
    return 0;
}


Measured memory_bytes: 3076
#include<bits/stdc++.h>
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/detail/standard_policies.hpp>
// using namespace __gnu_pbds;

#pragma GCC optimize("O3")
#ifdef LOCAL
#include "debug_utils.h"
#else
#define print(...) ;
#define printn(...) ;
#endif

#define rep(i, a, b) for(auto i = (a); i < (b); i++)
#define rrep(i, a, b) for(auto i = (a); i > (b); i--)
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define maxi(x, y) x = max(x, y)
#define mini(x, y) x = min(x, y)
#define endl '\n'
#define solve_testcase int T;cin>>T;for(int t=1;t<=T;t++){solve(t);}

long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }

typedef unsigned long long ull;
typedef long long ll;
 
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<pdd> vpdd;
typedef vector<long long> vll;

const int MAXN = 100 + 10;
void solve(int tt) {}
int n,m;
string s[MAXN];
int dp[MAXN][MAXN]={};


int main(int argc, char * argv[]) {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    // solve_testcase;

    cin>>n>>m;
    rep(i,0,n)cin>>s[i];
    dp[0][0]=s[0][0]=='#';
    rep(j,1,m)dp[0][j]=s[0][j]==s[0][j-1]?dp[0][j-1]:dp[0][j-1]+(s[0][j]=='#');
    rep(i,1,n)dp[i][0]=s[i][0]==s[i-1][0]?dp[i-1][0]:dp[i-1][0]+(s[i][0]=='#');
    rep(i,1,n) {
        rep(j,1,m) {
            dp[i][j]=1e9;
            if(s[i][j]==s[i][j-1])
                mini(dp[i][j],dp[i][j-1]);
            else
                mini(dp[i][j],dp[i][j-1]+(s[i][j]=='#'));
            if(s[i][j]==s[i-1][j])
                mini(dp[i][j],dp[i-1][j]);
            else
                mini(dp[i][j],dp[i-1][j]+(s[i][j]=='#'));
        }
    }
    printn(dp,n,m);
    cout<<dp[n-1][m-1]<<endl;



    return 0;
}





















Measured memory_bytes: 384
#include <algorithm>
#include<stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include<stack>
#include <queue>
#include<map>
#include <set>
#include<math.h>
using namespace std;
#define int long long
#define ll long long
#define rep(i,n) for(ll i=0;i<n;++i)
#define loop(i,m,n) for(ll i=m;i<n;++i)
#define ggr getchar(); getchar();return 0;
#define pie 3.141592653589793238462643383279
#define elif else if
#define P pair<ll,ll>
const int mod = 1000000007;
const int mod2 = 998244353;
int bin(int bina) {
	int ans = 0;
	for (int i = 0; bina > 0; i++)
	{
		ans = ans + (bina % 2) * pow(10, i);
		bina = bina / 2;
	}
	return ans;
}
bool prime(int n) {
	for (ll i = 2; i <= sqrt(n); i++) {
		if (n % i == 0)return false;
	}
	return n != 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x % y);
}
int lcm(int x, int y) {
	return x * y / gcd(x, y);
}
int kai(int x) {
	if (x == 0)return 1;
	return kai(x - 1) * x % mod;
}
int mod_pow(int x, int y, int mod) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % mod;
		}
		x = x * x % mod;
		y >>= 1;
	}
	return res;
}
long nCr(int n, int r) {
	long ans = 1;
	for (int i = n; i > n - r; --i) {
		ans = ans * i;
	}
	for (int i = 1; i < r + 1; ++i) {
		ans = ans / i;
	}
	return ans;
}
struct union_find {
	int par[200010], size_[200010];
	void init(int x) {
		rep(i, x) { par[i] = i; size_[i] = 1; }
	}
	int find(int x) {
		if (par[x] == x)return x;
		return par[x] = find(par[x]);
	}
	void unite(int x, int y) {
		x = find(x); y = find(y);
		if (x == y)return;
		if (size_[x] < size_[y]) {
			par[x] = y;
			size_[y] += size_[x];
		}
		else {
			par[y] = x;
			size_[x] += size_[y];
		}
	}
};
int a[100010], b[100010],n,m;
signed main() {
	cin >> n;
	rep(i, n) {
		cin >> a[i];
	}
	cin >> m;
	rep(i, m) {
		cin >> b[i];
	}
	int ans = 0;
	rep(i, m) {
		int l = 0, r = n;
		while (l + 1 < r) {
			int m = (l + r) / 2;
			if (a[m] <= b[i]) l = m;
			else r = m;
		}
		if (a[l] != b[i])continue;
		ans++;
	}
	cout << ans << endl;
}


Measured memory_bytes: 4276
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aajisaka
 */

#include<bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
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; }

using ll = long long;
using P = pair<ll, ll>;

constexpr double PI = 3.14159265358979323846;
mt19937_64 engine(chrono::steady_clock::now().time_since_epoch().count());

class DLongBlackboard {
public:
    void solve(istream& cin, ostream& cout) {
      SPEED;
      int n; cin >> n;
      deque<char> s1, s2;
      vector<char> v1 = {'.', '.', '#', '#'};
      vector<char> v2 = {'.', '#', '.', '#'};
      bool flag = false;
      while(true) {
        if (!flag) {
          bool found = false;
          rep(i, 4) {
            s1.push_back(v1[i]);
            s2.push_back(v2[i]);
            for(auto c: s1) {
              cout << c;
            }
            cout << endl;
            for(auto c: s2) {
              cout << c;
            }
            cout << endl;
            string r; cin >> r;
            if (r == "end") {
              return;
            } else if (r == "T") {
              found = true;
              break;
            } else {
              s1.pop_back();
              s2.pop_back();
            }
          }
          if (!found) {
            flag = true;
          }
        } else {
          rep(i, 4) {
            s1.push_front(v1[i]);
            s2.push_front(v2[i]);
            for(auto c: s1) {
              cout << c;
            }
            cout << endl;
            for(auto c: s2) {
              cout << c;
            }
            cout << endl;
            string r; cin >> r;
            if (r == "end") {
              return;
            } else if (r == "T") {
              break;
            } else {
              s1.pop_front();
              s2.pop_front();
            }
          }
        }
      }
    }
};

signed main() {
  DLongBlackboard solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

Measured memory_bytes: 724
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) for(int i=0;i < (n);i++)
#define ALL(obj) (obj).begin(),(obj).end()
#define SCANF(i) int i;scanf("%d",&i)
typedef long long ll;
using namespace std;
using P = pair<int,int>;
const long long INF = 1LL << 60;
const int IINF=100000000;
const int MOD = (int)1e9 + 7;
//約数列挙
vector<long long> divisor(long long n) {
    vector<long long> ret;
    for (long long i = 1; i * i <= n; i++) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i * i != n) ret.push_back(n / i);
        }
    }
    //sort(ret.begin(), ret.end()); // 昇順に並べる
    return ret;
}
vector<int> dx={1,0,-1,0};vector<int> dy={0,-1,0,1};

signed main () {
    int n;cin >> n;
    ll ans= n + n*n + n*n*n;
    cout << ans << endl;
}//https://atcoder.jp/contests/abc172/tasks/abc172_a

Measured memory_bytes: 3640
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
        long x = sc.nextLong();
        long y = sc.nextLong();
		sc.close();
		int ans = 1;
        while(true){
            x = x*2;
            if(x > y){
                break;
            }else{
                ans++;
            }
        }
        System.out.println(ans);
	}
}


Measured memory_bytes: 21716
#include<bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define all(x) x.begin(),x.end()
#define ld long double
#define fast  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
signed main(){
    fast;
	string s;
	cin>>s;
	int sum = 0;
	for(auto &x:s){
		int num = x - '0';
		sum += num;
	}
	if(sum%9) cout<<"No";
	else cout<<"Yes";
}

Measured memory_bytes: 3696
#include <iostream>
#include <string>

int main(){
    std::string s, t;

    std::cin >> s >> t;

    int count = 0;
    for(int i=0; i<s.length(); ++i){
        if(s[i] != t[i]){
            count += 1;
        }
    }

    std::cout << count << std::endl;
}

Measured memory_bytes: 3920
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<queue>
#include<vector>
const int maxn = 0x3f3f3f3f;
const int mass = 105;
#define clr(arr,val) memset(arr,val,sizeof arr)
using namespace std;
int main()
{
	int n;
	scanf("%d",&n);
	for(int i = 0;i <= 100; i++)
	{
		for(int j = 0;j <= 100; j++)
		{
			if(i * 4 + j * 7 == n)
			{
				printf("Yes\n");
				return 0;
			}
		}
	}
	printf("No\n");
	return 0;
}

Measured memory_bytes: 128
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
//if(strcmp(s[i],"AC")==0)
//if(s[l]=='#')
/*小文字判定
if((moji>= 'a') && (moji<='z')){
    printf("a\n");
    return 0;
  }
  */

int W_Length(char *str){
	int length = 0;
	while(*str++ != '\0')
		length++;
	return length;
}

void swap(long long int *a, long long int *b){
  int temp;
  temp=*a;
  *a=*b;
  *b=temp;
}
//swap(&a, &b)

double deg(double theta){//deg to theta
return theta*(2*3.14159265359)/360;
}

long long int cmp( const void *p, const void *q ) {
    return *(long long int*)p - *(long long int*)q;
}//ちいさい順
//qsort(a,n,sizeof(long long int),cmp);


int cmp_s(const void * left, const void * right)
{
	char *left_char = (char *)left;
  char *right_char = (char *)right;
  return strcmp(left_char, right_char);
}
//qsort(s,n,sizeof(s[0]),cmp_s);
//char s[n][11]

long long int GCD(long long int a, long long int b){
  long long int L=a,S=b;
  while(1){
    if(S>L){
      L=S+L;
      S=L-S;
      L=L-S;
    }
    if(L%S==0){
      return S;
    }
    L=L%S;
  }
  
}

long long int LCM(long long int a, long long int b){
  return a*b/(GCD(a,b));
}

int main (void)
{
	long long int p[5005],b,c,n,i,min,k,a[210000],max,j=1,t[210000],count=0;
scanf("%lld",&n);
for(i=0;i<n;i++){

  scanf("%lld",&a[i]);
    if(i==0){
   min=a[i]; 
  }
      if(a[i]<=min){
      min=a[i];
      count++;
    }

  
}  
  printf("%lld",count);
return 0;
}


Measured memory_bytes: 3300
V, E = map(int, input().split())
G = [[] for _ in range(V)]
for _ in range(E):
    s, t, d = map(int, input().split())
    G[s].append((t, d))

dp = [[float('inf')]*V for _ in range(V)]

for i in range(V):
    dp[i][i] = 0
    for j, d in G[i]:
        dp[i][j] = d

# print(*dp, sep='\n')

for k in range(V):
    for i in range(V):
        for j in range(V):
            dp[i][j] = min(dp[i][j], dp[i][k]+dp[k][j])

# print(*dp, sep='\n')
if all([dp[i][i] == 0 for i in range(V)]):
    for l in dp:
        print(*[d if d != float('inf') else 'INF' for d in l])
else:
    print('NEGATIVE CYCLE')



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

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if(a+b+c == 2* max(a, max(b,c))){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <cstring>
#include <utility>
#include <set>
#include <stack>
#include <climits>
#include <cmath>
#include <iomanip>
#include <unordered_map>
#include <map>
#include <boost/multiprecision/cpp_int.hpp>

#define rep(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define rep1(i,n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
#define reps(i,s,n) for(int i=s, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
#define MEMSET(v, h) memset((v), h, sizeof(v))
typedef long long ll;
typedef long double ld;
const char sp = ' ';

using namespace boost::multiprecision;
using namespace std;

int main(void){
    ll A, B, C, D;
    cin>>A>>B>>C>>D;
    cout<<min(A, B)+min(C,D)<<endl;
    return 0;
}


Measured memory_bytes: 3632
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF=1001001001;
const int mod=1e9+7;

int main() {
  int N;
  cin>>N;
  for(int i=N;i<1000;i++){
    if(i%10==i/10%10&&i/10%10==i/100%10){
      cout<<i<<endl;return 0;
    }
  }
  
  return 0;
}

Measured memory_bytes: 3588
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <set>
#include <deque>

using namespace std;
typedef long long ll;
ll mod = 1e9+7;
#define rep(i,n) for(int i = 0; i < (n); ++i)

int main(){
    int n, m;
    cin >> n >> m;
    vector<pair<int, int>> ba(m);
    rep(i, m) {
        int tmp_a, tmp_b;
        cin >> tmp_a >> tmp_b;
        ba[i] = make_pair(tmp_b, tmp_a);
    }
    sort(ba.begin(), ba.end());
    int right_place = ba[0].first;
    int ans = 1;
    rep(i, m) {
        if (right_place <= ba[i].second) {
            right_place = ba[i].first;
            ++ans;
        }
    }
    cout << ans << endl;
    return 0;
}


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

int main()
{
    long n,ans; cin>>n;
    long a[n];
    
    ans=10000000;
    
    for(int i=0;i<n;++i){
        cin>>a[i];
    }
    
    for(int i=1;i<=100;++i){
    long sum=0;
    for(int j=0;j<n;++j){
    sum+=(a[j]-i)*(a[j]-i);
    }
    ans = min(ans,sum);
    }

	cout<<ans<<endl;
}

Measured memory_bytes: 256
#!/usr/bin/env python3

# 1 <= K <= N <= 15
# 1 <= a_i <= 10 ** 9

N, K = map(int, input().split())
heights = list(map(int, input().split()))
# print(N, K, heights)


def calc(i, heights):
    cost = 0
    for shift in range(1, N):
        if i & (1 << shift):
            max_h = max(heights[:shift])
            if max_h >= heights[shift]:
                cost += (max_h + 1) - heights[shift]
                heights[shift] = max_h + 1
    return cost


str_bin = ""
for _ in range(K):
    str_bin += "1"
min_i = int(str_bin, 2)
min_cost = float("inf")


def is_valid(i, K):
    count = 0
    for bit in range(N):
        if i & (1 << bit):
            count += 1
    if count == K:
        return True
    return False


for i in range(min_i, 2 ** N):
    if is_valid(i, K):
        heights_copy = heights[:]
        # print(f"i = {i} ({bin(i)})")
        cost = calc(i, heights_copy)
        # print(f"cost = {cost}")
        min_cost = min(min_cost, cost)

print(min_cost)


Measured memory_bytes: 44508
def main():
    lst = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
    n = int(input())
    print(lst[n-1])


if __name__ == '__main__':
    main()


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

int main(){
  ll n; cin>>n;
  vector<pair<pair<string,ll>,ll>>v;
  
  for(ll i=1;i<=n;i++){
  string s; cin>>s; ll t; cin>>t; t*=-1;
  //v.push_back(pair<pair<string,ll>,ll>((s,t),i));はダメ
  v.push_back(make_pair(make_pair(s,t),i)); 
  }
  
  //sort(v.begin(),v.end());
  sort(all(v));
  
  for(pair<pair<string,ll>,ll>t:v){
   cout<<t.second<<endl;
  }
  
}

Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>

using namespace std;


int main(){
    int a,b,c;
    scanf("%d/%d/%d",&a,&b,&c);
    if(a<=2019){
        if(b<=4){
            if(c<=30){
                printf("Heisei");
                return 0;
            }
        }
    }
    printf("TBD");
    return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <math.h>
using namespace std;


int main() {
	int n;
	string s;
	cin >> n >> s;
	int x = 0;
	int *a = new int[n+1];
	a[0] = 0;
	for (int i = 0; i < n; i++){
		if (s[i] == 'D'){ x--; }
		else if (s[i] == 'I'){ x++; }
		a[i + 1] = x;
	}
	sort(a, a + n + 1);
	cout << a[n];
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <cstdio>

using namespace std;

int main() {
	string abc = "abcdefghijklmnopqrstuvwxyz";
	string n;
	int nn;
	char c;
	cin >> nn >> c;
	for (int p = 0; p < nn; p++) {
		getline(cin, n);
		if (p == 0) {
			n = c+n;
		}
		vector<int> data(n.size(), -1);
		for (int i = 0; i < n.size(); i++) {
			for (int j = 0; j < abc.size(); j++) {
				if (n[i] == abc[j]) {
					data[i] =j;
					break;
				}
			}
		}
		string b;
		for (int i = 3; ; i++) {
			if (i % 2 != 0 && 1 % 13 != 0) {
				bool hantei = false;
				for (int j = 0; j < 26; j++) {
					string c = "";
					for (int k = 0; k < n.size(); k++) {
						if (data[k] == -1) {
							c += ' ';
						} else {
							c += abc[(i*data[k]+j)%26];
						}
					}
					if (c.find("this") != string::npos || c.find("that") != string::npos) {
						b = c;
						hantei = true;
						break;
					}
				}
				if (hantei) {
					break;
				}
			}
		}
		cout << b << endl;
	}
	return 0;
}

Measured memory_bytes: 1220
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<ll> vi;
typedef vector<bool> vb;
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define sq(x) ((x)*(x))
#define fo(i,n) for(int i=0;i<n;i++)
#define fp(i,k,n) for(int i=k;i<n;i++)
#define Fo(i,n) for(int i=1;i<=n;i++)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define deb(x) cout<<#x<<"="<<x<<"\n"
#define deb2(x,y) cout<<#x<<"="<<x<<" "<<#y<<"="<<y<<"\n"
#define fi first
#define se second
const double pi = 3.14159265358979323846;
#define uni(c) (c).resize(unique(all(c))-(c).begin())
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL)
//pair <int, int> w[4] = {mp(-1, 0), mp(0, -1), mp(1, 0), mp(0, 1)};   // for matrix movement:
void cp()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
}
void solve()
{
    ll a, b, c; cin >> a >> b >> c;
    if (a <= b * c)
        cout << "Yes";
    else
        cout << "No";
}
int main()
{
    fast;
    //cp();
    ll t = 1;
    //cin >> t;
    while (t--)
        solve();


    return 0;
}

Measured memory_bytes: 3636
#include<iostream>
#include<vector>
#include<list>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
#include<set>
using namespace std;
int main() {
	string a;
	while (getline(cin,a)&&a != ".") {
		vector<char>b;
		bool l = true;
		vector<char>::iterator it = b.begin(), it2;
		for (int i = 0; i < a.length(); i++) {
			if (a[i] == '(' || a[i] == '[') {
				b.push_back(a[i]);
			}
			else if (a[i] == ')' || a[i] == ']') {
				if (b.size() != 0) {
					it = b.end();
					it--;
					if (!((a[i] == ')' && (*it) == '(') || (a[i] == ']' && (*it) == '['))) {
						l = false;
					}
					b.erase(it);
				}
				else
					l = false;
			}
		}
		if (l&&b.size()==0) cout << "yes" << endl;
		else cout << "no" << endl;
	}
}

Measured memory_bytes: 3168
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define pb push_back
#define vec vector<int>
#define fo(i, n) for (int i = 0; i < n; i++)
#define foo(i, a, b) for (int i = a; i < b; i++)
#define mp make_pair
#define deb(x) cout << #x << "-->" << x << endl;
#define deb1a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
    {                             \
        cout << it << " ";        \
    }                             \
    cout << endl;
#define deb2a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
    {                             \
        for (auto it1 : it)       \
        {                         \
            cout << it1 << " ";   \
        }                         \
        cout << endl;             \
    }
    #define mod 1000000007

vec p(12);

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n, m;
    cin >> n >> m;
    vec v(n);
    //int ans = 0;
    fo(i,n)
    {
        cin >> v[i];
       
    }
    sort(v.begin(), v.end());
    int ans = 0;
    fo(i,n-m){
        ans += v[i];
    }
    cout << ans;
        


}
  

Measured memory_bytes: 1792
def main():
    N, M = tuple([int(_x) for _x in input().split()])
    A = [int(_x) for _x in input().split()]
    total = sum(A)
    if total % (4*M) == 0:
        min_vote = total // (4 * M)
    else:
        min_vote = 1 + total // (4 * M)

    cnt = 0
    for vot in A:
        if vot >= min_vote:
            cnt += 1
    if (cnt >= M):
        print("Yes")
    else:
        print("No")


main()


Measured memory_bytes: 9120
using System;
using System.Collections.Generic;
using System.Linq;

class Program
{
    static string InputPattern = "InputX";

    static List<string> GetInputList()
    {
        var WillReturn = new List<string>();

        if (InputPattern == "Input1") {
            WillReturn.Add("3");
            WillReturn.Add("1 2 3");
            //0
        }
        else if (InputPattern == "Input2") {
            WillReturn.Add("4");
            WillReturn.Add("1 3 1 1");
            //2
        }
        else if (InputPattern == "Input3") {
            WillReturn.Add("8");
            WillReturn.Add("27 23 76 2 3 5 62 52");
            //2
        }
        else {
            string wkStr;
            while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr);
        }
        return WillReturn;
    }

    static void Main()
    {
        List<string> InputList = GetInputList();

        int[] WArr = InputList[1].Split(' ').Select(X => int.Parse(X)).ToArray();
        int UB = WArr.GetUpperBound(0);

        int Answer = int.MaxValue;
        for (int T = 1; T <= UB; T++) {
            int SumLeft = 0;
            for (int I = 0; I <= T; I++) {
                SumLeft += WArr[I];
            }
            int SumRight = 0;
            for (int I = T + 1; I <= UB; I++) {
                SumRight += WArr[I];
            }
            Answer = Math.Min(Answer, Math.Abs(SumLeft - SumRight));
        }
        Console.WriteLine(Answer);
    }
}


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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n,d,x; cin>>n>>d>>x;
	for(int i=0;i<n;++i){
		int a; cin>>a;
		++x;
		for(int j=1,k=a*j+1;k<=d;++j,k=a*j+1)++x;
	}
	cout<<x<<"\n"s;
}

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

int a[100010];

int main(){
   int h,a;cin>>h>>a;
   int r = h%a;
   int ans = h/a;
   if(r==0)cout<<ans<<endl;
   else cout<<ans+1<<endl;
}

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

int main() {
    ll r, D, x_2000; cin >> r >> D >> x_2000;
    ll x = x_2000;
    for(int i = 1; i <= 10; i++){
        x = r * x - D;
        cout << x << endl;
    }
}

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

int main() {
  int k, s;
  int ans = 0;
  cin >> k >> s;
  
  for (int x = 0; x <= k; x++) {
    for (int y = 0; y <= k; y++) {
        int z = s-x-y;
        if (0 <= z && z <= k) ans += 1;
    }
  }  
  cout << ans << endl;
}

Measured memory_bytes: 256
#!usr/bin/env python3
import sys
import math
import string
import collections
import fractions
import random
from operator import itemgetter
import itertools
from collections import deque
import copy
import heapq
import bisect

MOD = 10 ** 9 + 7
INF = float('inf')
input = lambda: sys.stdin.readline().strip()

sys.setrecursionlimit(10 ** 8)

H, W, K = map(int, input().split())
c = [list(map(int, list(input()))) for _ in range(H)]
ans = 0
cc = copy.deepcopy(c)
for z in range(H):
    for m in range(W):
        c = copy.deepcopy(cc)
        c[z][m] = 0
        temp_ans = 0
        repeat_num = -1
        p = 1
        while p:
            p = 0
            for i in range(H):
                num = 1
                for j in range(W):
                    if j != W - 1:
                        if c[i][j] == c[i][j + 1] and c[i][j] != -1:
                            num += 1
                        elif num >= K:
                            temp_ans += 2 ** repeat_num * c[i][j] * num
                            for k in range(j - num + 1, j + 1):
                                c[i][k] = 0
                            num = 1
                            p = 1
                        else:
                            num = 1
                    elif num >= K:
                        temp_ans += 2 ** repeat_num * c[i][j] * num
                        for k in range(j - num + 1, j + 1):
                            c[i][k] = 0
                        num = 1
                        p = 1
            for i in reversed(range(H)):
                for j in reversed(range(W)):
                    if not c[i][j]:
                        if i == 0:
                            c[i][j] = -1
                        else:
                            for k in reversed(range(i)):
                                if c[k][j] != 0:
                                    c[i][j] = c[k][j]
                                    c[k][j] = 0
                                    break
            repeat_num += 1
            if repeat_num == 0:
                p = 1
        ans = max(ans, temp_ans)
print(ans)

Measured memory_bytes: 84056
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int a,b;
		Scanner sc = new Scanner(System.in);
		a=sc.nextInt();
		b=sc.nextInt();
		if(a%2==0 || b%2==0) System.out.println("Even");
		else System.out.println("Odd");
	}
}


Measured memory_bytes: 21844