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

using namespace std;

const int N =  2501;
const int OO = 1e9 + 10;
const int OO2 = 5e8;

int mx[N];
int n , m , p;

vector < pair < pair < int , int > , int > > edges;
vector < int > adj[N];
int start;
bool reach[N][N];
void dfs(int i)
{
    if(reach[start][i]) return;
    reach[start][i] = true;
    for(auto x : adj[i])dfs(x);
}
int main()
{
    ios::sync_with_stdio(false);    cin.tie(NULL);  cout.tie(NULL);
    cin >> n >> m >> p;
    for(int i = 1 ; i <= n ; i++)
            mx[i] = -OO;

    for(int i = 0 ; i < m ; i++)
    {
        int a , b , c;
        cin >> a >> b >> c;
        edges.push_back(make_pair(make_pair(a,b),c-p));
        adj[a].push_back(b);
    }
    for(start = 1 ; start <= n ; start ++)  dfs(start);

    mx[1] = 0;
    for(int i = 0 ; i < n-1 ; i++)
        for(auto e : edges)
            if(mx[e.first.second] < mx[e.first.first] + e.second)
                mx[e.first.second] = mx[e.first.first] + e.second;

    for(auto e : edges)
            if(mx[e.first.second] < mx[e.first.first] + e.second && reach[1][e.first.first] && reach[e.first.second][n])
                return cout << "-1\n" , 0;

    cout << max( 0 , mx[n]) << '\n';
    return 0;
}


Measured memory_bytes: 6656
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <queue>
#include <stack>
#include <stdlib.h>
using namespace std;
#define rep(i,n) for (int (i) = 0; (i) <(n); (i)++) 
#include <math.h>
#include <bits/stdc++.h>
using namespace std;
int binary(int bina){
    int ans = 0;
    for (int i = 0; bina>0 ; i++)
    {
        ans = ans+(bina%2)*pow(10,i);
        bina = bina/2;
    }
    return ans;
}
long comb(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;
}
using namespace std;
/*int main(){
    int n;std::cin >> n;
    int keta=0;
    while(true){
        keta++;
        if(n/10==0)break;
        n=n/10;
    }
    keta=keta-1;
    if(n>=7)n=3;
    else if(n>=5)n=2;
    else if(n>=3)n=1;
    int k=0;
    for(int i=3;i<=keta;i++){
        k+=comb(i-1,2);
        std::cout << k << std::endl;
    }std::cout << k << std::endl;
    k+=n*(keta);
    
    std::cout << k << std::endl;
    
}


*/
int main(){
  unsigned long long x,s;
  s=100;
  int k=0;
  std::cin>>x;
  while(true){
    s=s*1.01;
    k++;
    //std::cout << s << std::endl;
    if(s>=x){
        std::cout << k << std::endl;
        return 0;
    }
  }
  
  return 0;
  
}


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

const ll mod = 1e9 + 7;

struct ModComb {
    vector<long long> fact, rfact;
    long long max, mod;
    ModComb(long long ma, long long mod) :fact(ma, 0), rfact(ma, 0), max(ma), mod(mod) {
        fact[0] = 1;
        for (long long i=1; i<max; ++i) {
            fact[i] = fact[i-1]*i;
            fact[i] %= mod;
        }
        rfact[max-1] = mod_inverse(fact[max-1], mod);
        for (long long i=max-2; i>=0; --i) {
            rfact[i] = rfact[i+1]*(i+1);
            rfact[i] %= mod;
        }
    }
    long long mod_pow(long long x, long long n, long long mod) {
        long long a = 1LL;
        while (n) {
            if (n%2) a = ((a%mod)*(x%mod))%mod;
            x = ((x%mod)*(x%mod))%mod;
            n /= 2LL;
        }
        return a;
    }

    long long mod_inverse(long long a, long long m) {
        return mod_pow(a, m-2, m);
    }

    long long operator()(long long n, long long r) {
        if (n < r) return 0;
        return (((fact[n] * rfact[r]) % mod) * rfact[n - r]) % mod;
    }
};

int main() {
    ll x, y;
    cin >> x >> y;

    ModComb mb(1000001, mod);

    // x = n + 2m
    // y = m + 2n
    for (int n=0; n<=max(x, y); ++n) {
        int m = (x-n)/2;
        if (n + 2*m == x and m + 2*n == y) {
            cout << mb(n+m, n) << endl;
            return 0;
        }
    }
    cout << 0 << endl;
}


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

ll A[100010],res[1010];int D[100010],imp[1010];
int main(){
	ll N,T,Q;
	cin>>N>>T>>Q;
	for(int i=1;i<=N;i++){
		cin>>A[i]>>D[i];
	}
	
	for(int i=1;i<=Q;i++){
		cin>>imp[i];
	}

	vector<ll> vpl;
	for(int i=1;i<N;i++){
		if(D[i]==1&&D[i+1]==2){
			vpl.push_back((A[i]+A[i+1])/2);
		}
	}

	auto it=vpl.begin();
	for(int i=1;i<=Q;i++){
		while(it!=vpl.end()&&(*it)<A[imp[i]]) it++;
		if(D[imp[i]]==2&&it==vpl.begin()){
			res[i]=A[imp[i]]-T;
			continue;
		}
		else if(D[imp[i]]==2) it--;
		if(it==vpl.end()){
			res[i]=A[imp[i]]+T;
			continue;
		}
		if(D[imp[i]]==1){
			res[i]=min(A[imp[i]]+T,*it);
		}
		else{
			res[i]=max(A[imp[i]]-T,*it);
		}
	}
	for(int i=1;i<=Q;i++) cout<<res[i]<<endl;
	return 0;
}

Measured memory_bytes: 4400
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define SZ(x) ((int)(x).size())
#define rep(i,n) for(int i=0;i<(n);++i)
#define fore(i,a) for(auto &i:a)
#define min(...) min({__VA_ARGS__})
#define max(...) max({__VA_ARGS__})
#define Yes cout << "Yes" << endl;
#define No cout << "No" << endl;
#define ALL(x) (x).begin(),(x).end()
signed _main(); signed main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> using v = vector<T>;
template<class T> using vv = vector<v<T>>;
const int MOD=1e9+7;
const long long INF = 1LL << 60;
using P=pair<int,int>;

signed _main(){
  int a,b; cin >> a >> b;
  cout << a * b << endl;
  return 0;
}


Measured memory_bytes: 3620
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <cmath>
#include <bitset>
#include <iomanip>
#include <stack>
#include <list>
#include <map>
#include <unordered_map>
#include <chrono>
#include <numeric>
using namespace std;
using ll = long long;
const ll INF = (ll)1e18+1;
const ll DIV = 1000000007;
//#define TEST
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
#ifdef TEST
    chrono::system_clock::time_point start, end;
    start = chrono::system_clock::now();
#endif
    long X;
    cin >> X;
    if(X==3 || X==5 || X==7) cout << "YES" << endl;
    else cout << "NO" << endl;
#ifdef TEST
    end = chrono::system_clock::now();
    cerr << static_cast<double>(chrono::duration_cast<chrono::microseconds>(end - start).count() / 1000.0) << "[ms]" << endl;
#endif
    return 0;
}

Measured memory_bytes: 3660
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Satoshi
{
	class Program
	{
		public static void Main(string[] args)
		{
			string s = Console.ReadLine();
			if("aiueo".Contains(s))
				Console.WriteLine("vowel");
			else
				Console.WriteLine("consonant");
		}
	}
}

Measured memory_bytes: 2648
#include<stdio.h>
int acm(int x)
{
    int rest=0;
    int y=x;
    while(x!=0)
    {
        rest*=10;
        rest+=x%10;
        x/=10;
    }
    if(y==rest)
        return 1;
    return 0;
}
int main()
{
    int n;
    int a,b;
    scanf("%d",&n);
    for(int i=n;; i--)
    {
        if(acm(i)==1)
        {
            a=i;
            break;
        }
    }
    for(int i=n;; i++)
    {
        if(acm(i)==1)
        {
            b=i;
            break;
        }
    }
    if(n-a>b-n)
        printf("%d\n",b);
    if(n-a==b-n)
        printf("%d\n",a);
    if(n-a<b-n)
        printf("%d\n",a);
    return 0;
}



Measured memory_bytes: 2148
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define inf 1001001001
#define mod 1000000007
#define pi 3.141592653589793
#define all(v) v.begin(),v.end()


ll gcd(ll a,ll b){
    if(b>a) swap(a,b);
    if(b==0) return a;
    return gcd(b,a%b);
}
ll lcm(ll a,ll b){
    ll g=gcd(a,b);
    return a/g*b;
}
ll rep_jijo(ll n,ll x){
    if(x==0) return 1;
    if(x%2==0){
        ll t=rep_jijo(n,x/2);
        return t*t%mod;
    }
    return n*rep_jijo(n,x-1)%mod;
}

int main(){
  int n,k;
  cin >> n >> k;
  vector<bool>snuke(n,false);
  rep(i,k){
    int d;
    cin >> d;
    rep(j,d){
      int a;
      cin >> a;
      a--;
      snuke[a]=true;
    }
  }
  int ans=0;
  rep(i,n){
    if(snuke[i]==false) ans++;
  }
  cout << ans << endl;

  return 0;
}



Measured memory_bytes: 3632
#include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <numeric>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using vl = vector<ll>;  // long longの1次元の型に vl という別名をつける
using vvl = vector<vl>; // long longの2次元の型に vvl という別名をつける
int MOD = 1000000007; //10^9 + 7

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 ll  LINF = 1LL << 60;
const int iINF = 1 << 29;

int main(void){
  char c;
  cin >> c;

  if(c=='a' || c=='i' || c=='u' || c=='e' || c=='o')cout << "vowel" << endl;
  else cout << "consonant" << endl;
  return 0;
}

Measured memory_bytes: 3512
#include <iostream>
#include <algorithm>
#include <string.h>
#include <stdio.h>
using namespace std;
#define ll long long
int main(int argc, char const *argv[])
{
    ll a, b, sum = 0;
    cin >> a >> b;
    while (a <= b) {
        ++sum;
        a *= 2;
    }
    printf("%lld\n", sum);
    return 0;
}

Measured memory_bytes: 888
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double PI=acos(-1);
const double EPS=1e-10;

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	int n,m;
	cin>>n>>m;
	vector<vector<Pi>> g(n);
	rep(i,m){
		int p,y;
		cin>>p>>y;
		p--;
		g[p].push_back(Pi(y,i));
	}
	vector<string> ans(m);
	rep(i,n){
		sort(begin(g[i]),end(g[i]));
		string p=to_string(i+1);
		while(p.size()!=6){
			p="0"+p;
		}
		rep(j,g[i].size()){
			int now=j+1;
			string x=to_string(now);
			while(x.size()!=6) x="0"+x;
			ans[g[i][j].se]=p+x;
		}
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 12416
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 130000;
char cn[CM + 10], * ci = cn + 10, ct, c, * owa = cn + CM;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	swap(c, ci[8]);
	ll tmp = *(ll*)ci;
	int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
	tmp = tmp << dig & ma1;
	tmp = tmp * 10 + (tmp >> 8) & ma2;
	tmp = tmp * 100 + (tmp >> 16) & ma3;
	tmp = tmp * 10000 + (tmp >> 32) & ma4;
	swap(c, ci[8]);
	ci += (64 - dig >> 3) + 1;

	if (ci - owa > 0) {
		memcpy(cn, owa, 10);
		ci -= CM;
		fread(cn + 10, 1, CM, stdin);
	}
	return tmp;
}

char* di = cn;
const int MAX = 200000;
class shuturyoku_unko {
public:
	char C[MAX * 6 - 100000];
	int K[MAX + 10];
	constexpr shuturyoku_unko() : C(), K() {
		auto di = C + 1;
		C[0] = '0';
		K[1] = 1;
		rep1(i, MAX) {
			int X = i;
			int keta = 0;
			char c[10] = {};
			while (X) {
				*(c + keta) = '0' + X % 10;
				X /= 10;
				keta++;
			}
			for (int j = keta - 1; j >= 0; j--)* di++ = (*(c + j));
			K[i + 1] = K[i] + keta;
		}
	}
} f;
inline void putint(ll X) {
	int ue = X / 100000;
	if (ue) {
		for (int i = f.K[ue]; i < f.K[ue + 1]; i++)* di++ = f.C[i];
		int sita = X - ue * 100000ll;
		rep(i, 5 - f.K[sita + 1] + f.K[sita])* di++ = '0';
		for (int i = f.K[sita]; i < f.K[sita + 1]; i++)* di++ = f.C[i];
	}
	else for (int i = f.K[X]; i < f.K[X + 1]; i++)* di++ = f.C[i];
	*di++ = '\n';
}

int B[200001];

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


	fread(ci, 1, CM, stdin);

	int N = getint();
	ll kotae = 1;
	int A[200000];
	rep(i, N) kotae += B[(A[i] = getint())]++;
	int i = 0;
	
	int amari = N % 10800;
	int shou = N / 10800;
	rep(j, shou) {
		rep(k, 10800) putint(kotae - B[A[i++]]);
		fwrite(cn, 1, di - cn, stdout);
		di = cn;
	}
	rep(k, amari) putint(kotae - B[A[i++]]);
	fwrite(cn, 1, di - cn, stdout);

	Would you please return 0;
}

Measured memory_bytes: 3712
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    String s = sc.next();
    String s1 = " ";
    String s2 = " ";
    int ans = 0;

    for(int v1 = 0; v1 < 10; v1++){
      boolean p1 = false;
      for(int i = 0; i < n; i++){
        if(s.charAt(i) == v1 + '0'){
          s1 = s.substring(i + 1);
          p1 = true;
          break;
        }
      }
      if(p1 == false){
        continue;
      }
      for(int v2 = 0; v2 < 10; v2++){
        boolean p2 = false;
        for(int i = 0; i < s1.length(); i++){
          if(s1.charAt(i) == v2 + '0'){
            s2 = s1.substring(i + 1);
            p2 = true;
            break;
          }
        }
        if(p2 == false){
          continue;
        }
        for(int v3 = 0; v3 < 10; v3++){
          for(int i = 0; i < s2.length(); i++){
            if(s2.charAt(i) == v3 + '0'){
              ans += 1;
              break;
            }
          }
        }
      }
    }

    System.out.println(ans);
  }
}


Measured memory_bytes: 27988
// Problem : A - Takahashikun, The Strider
// Contest : AtCoder - AtCoder Grand Contest 046
// URL : https://atcoder.jp/contests/agc046/tasks/agc046_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣠⣶⡾⠏⠉⠙⠳⢦⡀⠀⠀⠀
⠀⠀⠀⣴⠿⠏⠀⠀⠀⠀⠀⠀⢳⡀⠀
⠀⠀⢠⣟⣋⡀⢀⣀⣀⡀⠀⣀⡀⣧⠀
⠀⠀⢸⣯⡭⠁⠸⣛⣟⠆⡴⣻⡲⣿⠀
⠀⠀⣟⣿⡭⠀⠀⠀⠀⠀⢱⠀⠀⣿⠀
⠀⠀⠙⢿⣯⠄⠀⠀⠀⢀⡀⠀⠀⡿⠀⠀
⠀⠀⠀⠀⠹⣶⠆⠀⠀⠀⠀⠀⡴⠃⠀⠀
⠀⠀⠀⠀⠀⢸⣷⡦⢤⡤⢤⣞⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⢀⣤⣴⣿⣏⠁⠀⠀⠸⣏⢯⣷⣖⣦⡀⠀⠀⠀⠀⠀⠀
⢀⣾⣽⣿⣿⣿⣿⠛⢲⣶⣾⢉⡷⣿⣿⠵⣿⠀⠀⠀⠀⠀⠀
⣼⣿⠍⠉⣿⡭⠉⠙⢺⣇⣼⡏⠀⠀⠀⣄⢸⠀⠀⠀⠀⠀⠀
⣿⣿⣧⣀⣿.........⣀⣰⣏⣘⣆⣀⠀
*/
#include <bits/stdc++.h> 
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
 
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
 
 
using namespace std;
using namespace __gnu_pbds;
 
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
 
typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;
 
typedef vector<int> vi;
typedef vector<ld> vd;
typedef vector<ll> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
typedef vector<cd> vcd;
 
#define l00p(i, a, b) for (int i=a; i<(b); i++)
#define loop(i, a) for (int i=0; i<(a); i++)
#define rep1(i,a,b) for (int i = (b)-1; i >= a; i--)
#define rep(i,a) for (int i = (a)-1; i >= 0; i--)
#define trav(a,x) for (auto& a : x)
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)

#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define ins insert
#define imax INT_MAX
#define imin INT_MIN
//#define MOD 998244353
 
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

 
const int MOD = 1000000007;
const char nl = '\n';
const ll INF = 1e18;
const int MX = 100001; //check the limits, dummy

int main() {
	 
	ios_base::sync_with_stdio(0); cin.tie(0); 
	int k;
	cin>>k;
	int t=1;
	while(k*t%360!=0)
	t++;
	cout<<t<<nl;
	return 0;
}
// read the question correctly (ll vs int)
// template by bqi343

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

using namespace std;

int n, x[105], st, s, mn=1000000000;

int main()
{
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>x[i];
    }
    for(int i=1;i<=100;i++){
        s=0;
        for(int j=1;j<=n;j++){
            st=(x[j]-i)*(x[j]-i);
            s+=st;
            //cout<<st<<" ";
        }
        if(s<mn){
            mn=s;
        }
        //cout<<s<<endl;
    }
    cout<<mn;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define len(v) ll(v.size())
#define fi first
#define se second

template <class T>
void cout_vec(const vector<T> &vec){
  for(auto itr:vec) cout<<itr<<' ';
  cout<<endl;
}

typedef pair<ll,ll> P;
const ll mod=1e9+7;
const ll inf=1e15;

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int h,w,k;
  cin>>h>>w>>k;
  vector<vector<ll>> dp(h+1,vector<ll>(w+1,0));
  dp[0][1]=1;
  rep(i,h){
    FOR(j,1,w+1){
      ll x=0,y=0,z=0;
      rep(l,1ll<<(w-1)){
        bool flag=false,now=!(l & 1ll);
        rep(x,w-1){
          if(now && now==((l>>x) & 1ll)){
            flag=true;
            break;
          }else{
            now=(l & (1ll<<x));
          }
        }
        if(flag) continue;
        if(l & (1ll<<(j-2))) z++;
        else if(l & (1ll<<(j-1))) y++;
        else x++;
        x%=mod,y%=mod,z%=mod;
      }
      (dp[i+1][j]+=(x*dp[i][j])%mod)%=mod;
      if(j+1<=w) (dp[i+1][j+1]+=(y*dp[i][j])%mod)%=mod;
      if(1<=j-1) (dp[i+1][j-1]+=(z*dp[i][j])%mod)%=mod;
    }
  }
  cout<<dp[h][k]<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define repi(i, x) \
	for (auto i = (x).begin(), i##_fin = (x).end(); i != i##_fin; i++)
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define solve(a) ((a) ? "Yes" : "No")
typedef vector<int> Vi;
typedef vector<Vi> VVi;
typedef pair<int, int> Pi;
typedef vector<Pi> VPi;
typedef vector<long long> V;
typedef vector<V> VV;
typedef pair<long long, long long> P;
typedef vector<P> VP;
template <class T>
inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return 1;
	}
	return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return 1;
	}
	return 0;
}
const long long INFLL = 1LL << 60;
const int INF         = 1 << 30;
const double PI       = acos(-1);
int main() {
	int x, n;
	int ans = INF;
	cin >> x >> n;
	Vi p(n + 1);
	p[n] = INF;
	rep(i, n) { cin >> p[i]; }
	sort(all(p));
	auto itr = p.begin();
	for (int i = -1; i <= 101; i++) {
		if (*itr < i) {
			itr++;
			if (itr == p.end()) {
				p[0] = INF;
				itr  = p.begin();
			}
		}
		if (*itr == i) {
			continue;
		} else {
			if (abs(ans - x) > abs(i - x)) {
				ans = i;
			}
		}
	}
	cout << ans << endl;
}

Measured memory_bytes: 3528
#include <iostream>
#include<cstring>
using namespace std;
int main(){
	int s[12];
	s[1]=0;
	s[3]=0;
	s[5]=0;
	s[7]=0;
	s[8]=0;
	s[10]=0;
	s[12]=0;
	s[4]=1;
	s[6]=1;
	s[9]=1;
	s[11]=1;
	s[2]=2;
	int m,n;
	cin>>m>>n;
	if(s[m]==s[n]){
		cout<<"Yes"<<endl;
	}
	if(s[m]!=s[n]){
		cout<<"No"<<endl;
	}
	return 0;
} 

Measured memory_bytes: 256
#include<cstdio>

int main() {
	int N, C;
	scanf("%d %d", &N, &C);
	int Adjacency_matrix[C][C];
	for (int i = 0; i < C; ++i){
		for (int j = 0; j < C; ++j) scanf("%d", &Adjacency_matrix[i][j]);
	}
	int A[3][C];
	for (int i = 0; i < 3; ++i){
		for (int j = 0; j < C; ++j) A[i][j] = 0;
	}
	for (int i = 1; i <= N; ++i){
		for (int j = 1; j <= N; ++j){
			int tmp;
			scanf("%d", &tmp);
			A[(i + j) % 3][tmp - 1]++;
		}
	}
	int answer = 250000000;
	for (int i = 0; i < C; ++i){
		for (int j = 0; j < C; ++j){
			for (int k = 0; k < C; ++k){
				if(i != j && j != k && k != i){
					int candidate = 0;
					for (int l = 0; l < C; ++l) candidate += (Adjacency_matrix[l][i]*A[0][l] + Adjacency_matrix[l][j]*A[1][l] + Adjacency_matrix[l][k]*A[2][l]);
					if(candidate < answer) answer = candidate;
				}
			}
		}
	}
	printf("%d\n", answer);
	return 0;
}

Measured memory_bytes: 128
from itertools import accumulate
from collections import defaultdict


def main():
    n = int(input())
    prime_counter = defaultdict(int)  # key ^ value
    accum = tuple(accumulate(range(1, 10)))  # because 10^12 < 2^39

    def facs(n):
        yield 2
        for x in range(3, int(pow(n, 0.5)) + 1, 2):
            yield x

    for fac in facs(n):
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
    if n != 1:
        prime_counter[n] += 1

    ans = 0
    for c in prime_counter.values():
        for accum_count, accum_value in enumerate(accum):
            if c < accum_value:
                break
        ans += accum_count
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9696
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define w(t) ll t;cin>>t; while(t--)

vector<int>v[200001];
bool vis[200001]={false};int s=-1;
int dfs(int x)
{
    int ans=0;
    if(!vis[x]){
    vis[x]=true;
    ans++;
    for(auto it:v[x])
    {
        ans+=dfs(it);
    }}
    return ans;
    
}
int main()
{
  ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
//w(t){
int i,n,m,a,b, flag=0;cin>>n>>m;
while(m--)
{
    cin>>a>>b;
    v[a].push_back(b);
    v[b].push_back(a);
    
}
//cout<<dfs(1);
for(i=1;i<=n;i++)
{
   if(!vis[i]) 
    s=max(s,dfs(i));  
}
cout<<s;

}

Measured memory_bytes: 20960
#include <iostream>
#include <algorithm>
#include <climits>
#include <vector>
#include <utility>
#include <functional>
#include <map>
#include <string>
#include <set>
#include <math.h>

#define llong long long

using namespace std;

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

  llong n;
  cin >> n;
  llong minP = LLONG_MAX;
  for (int i = 0; i < 5; i++) {
    llong p;
    cin >> p;
    minP = min(minP, p);
  }

  if (n % minP == 0) {
    cout << 5 + (n / minP) - 1 << endl;
  }
  else {
    cout << 5 + (n / minP) << endl;
  }
}

Measured memory_bytes: 256
// ABC050A - 

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

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

int main() {
	int A, B;
	char op;
	cin >> A >> op >> B;

	if (op == '+') {
		cout << A + B << endl;
	} else {
		cout << A - B << endl;
	}

	return 0;
}


Measured memory_bytes: 256
#!/usr/bin/env python3
N, Q = map(int, input().split())
S = input()
LR = []
for i in range(Q):
    l, r = map(int, input().split())
    LR.append([l,r])

A = [0]

cnt = 0
for i in range(1, len(S)):
    if S[i-1:i+1] == 'AC':
        cnt += 1
    A.append(cnt)

for l, r in LR:
    print(A[r-1] - A[l-1])


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

typedef long long int ll;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
#define sz(x) int(x.size())
const ll mod = 1000000007;
int INF = 1001001001;

int main() {
    int n; cin >> n;
    int d[n]; rep(i,n) cin >> d[i];
    int ans = 0, now = 0;
    rep(i,n) {
        ans += d[i]*now;
        now += d[i];
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3648
#include<iostream>

#define REPI(i, n) for(int i = 0; i < n; i++)
#define REPJ(j, n) for(int j = 0; j < n; j++)

using namespace std;

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

    int n, q;
    long long k;
    cin >> n >> k >> q;

    int array[q + 1];
    for(int i = 1; i <= q; i++){
        cin >> array[i];
    }
    int a[n + 1];
    for(int i = 0; i <= n; i++){
        a[i] = 0;
    }

    for(int i = 1; i <= q; i++){
        a[array[i]]++;
    }

    for(int i = 1; i <= n; i++){
        if(q - a[i] <  k){
            cout << "Yes" << '\n';
        }else{
            cout << "No" << '\n';
        }
    }

    //for(int i = 1; i <= n; i++){
    //  cout << a[i] << endl;
   // }
}


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

ll gcd(ll a, ll b){
    if(a%b == 0){
        return b;
    }else{
        return gcd(b, a%b);
    }
}

ll prime_fac_num(ll n){
  ll s = floor(sqrt(n));
  ll ans = 0;
  for(ll i=2; i<=s; i++){
    if(n%i==0){
      do{
        n /= i;
      }while(n%i==0);
      ans++;
    }
  }

  if(n>s){
    ans++;
  }

  return ans;
}

ll prime_fac(ll n, vector<pair<ll, ll> >&l){
  ll s = floor(sqrt(n));
  ll r;
  pair<ll, ll> x;
  for(ll i=2; i<=s; i++){
    if(n%i==0){
      r=0;
      do{
        r++;
        n /= i;
      }while(n%i==0);
      x = make_pair(i, r);
      l.push_back(x);
    }
  }

  if(n>s){
    x = make_pair(n, 1);
    l.push_back(x);
  }

  return l.size();
}

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

  ll g = gcd(a, b);

  vector<pair<ll, ll> > buf;
  ll ans = 1 + prime_fac(g, buf);

  cout<<ans<<endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll Mod = 1000000007;
const int Size = 100005;
int main()
{
    string S, T;
    cin >> S >> T;
    int Count = 0;
    for(int i = 0; i < 3; i++)
    {
        if(S[i] == T[i])
        {
            Count++;
        }
    }
    cout << Count << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <set>
#include <bitset>
#include <functional>
using namespace std;
const constexpr int INF = 1e9;
//typedef std::pair<std::string,double> P;

#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

typedef long long ll;
typedef vector<int> VI;
const constexpr ll MOD = 1e9 + 7;

struct Less {
	bool operator()(const pair<int, int>& x, const pair<int, int>& y) const {
		return x.first > y.first;
	}
};
//グラフの隣接リスト
//VI g[200010];
//頂点の入次数を管理
int h[100010];

int g[101][101];
int dxy[5]={-1, 0, 1, 0, -1};
vector<string> field;
int H, W, N, sy, sx, gy, gx;

int bfs(){
    int dist[1010][1010];
    for(int i=0; i<H; ++i){
        for(int j=0; j<W; ++j){
            dist[i][j] = 1e9;
        }
    }
    dist[sy][sx]=0;
    queue<pair<int, int> > que;
    que.push({sy, sx});
    
    while(!que.empty()){
        pair<int, int> p = que.front(); que.pop();
        
        if(p.first==gy&&p.second==gx) break;
        
        for(int i=0; i<4; ++i){
            int ny = p.first + dxy[i+1],
                nx = p.second + dxy[i];
            if(ny>=0&&ny<H&&nx>=0&&nx<W&&dist[ny][nx]==1e9&&field[ny][nx]!='X'){
                que.push({ny, nx});
                dist[ny][nx] = dist[p.first][p.second]+1;
            }
        }
    }
    
    return dist[gy][gx];
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> H >> W >> N;
    cin.ignore();
    REP(i, H){
        string s; getline(cin, s);
        field.push_back(s);
    }
    
    vector<pair<int, int> > vp;
    
    REP(j, H){
            REP(k, W){
                if(field[j][k]=='S'){
                    vp.push_back({j, k});
                } 
            }
        }
    for(int i=0; i<N; ++i){
        REP(j, H){
            REP(k, W){
                if(field[j][k]==(char)('1'+i)){
                    vp.push_back({j, k});
                } 
            }
        }
    }
    ll ans=0;
    for(int i=0; i<(int)vp.size()-1; ++i){
        sy = vp[i].first; sx =vp[i].second;
        gy = vp[i+1].first; gx =vp[i+1].second;
        
        ans += bfs();
    }
    cout << ans << endl;
	return 0;
}


Measured memory_bytes: 7816
#include <iostream>
using namespace std;
int main ()
{
    int a, b, c, x;
    cin >> a>> b >>c;
    if (a>b) {
        x=a;
        a=b;
        b=x;
    }
       if(b > c){
      x = b;
      b = c;
      c = x;

 

   }
   
   if(a > b){
      x = a;
      a = b;
      b = x;
      
   }
   
   cout << a << " " << b << " " << c << endl;
   
   return 0;
}


Measured memory_bytes: 3116
#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0;i<int(N);++i)
#define rep1(i,N) for(int i=1;i<int(N);++i)
#define all(a) (a).begin(),(a).end()		//sort(all(vi S)) sort(all(string S))
#define print(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<_<<", "; cerr<<"]"<<endl; }
#define printpair(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<"{"<<_.first<<","<<_.second<<"}"<<", "; cerr<<"]"<<endl; }

using P = pair<int, int>;		//P.first, P.second
typedef long long ll;
typedef vector<int> vi;
typedef set<int> seti;
typedef vector<string> vs;

const int MOD = 1e9+7;
const int INF = 1e9;

int main() {
	string S;
	cin>>S;
	vector<string> v;
	v.push_back("AKIHABARA");

	v.push_back("KIHABARA");
	v.push_back("AKIHBARA");
	v.push_back("AKIHABRA");
	v.push_back("AKIHABAR");

	v.push_back("KIHBARA");
	v.push_back("KIHABRA");
	v.push_back("KIHABAR");
	v.push_back("AKIHBRA");
	v.push_back("AKIHBAR");
	v.push_back("AKIHABR");

	v.push_back("KIHBRA");
	v.push_back("KIHBAR");
	v.push_back("AKIHBR");
	v.push_back("KIHABR");

	v.push_back("KIHBR");

	rep(i,(int)v.size()){
		if(S == v[i]){
			cout<<"YES"<<endl;
			return 0;
		}
	}
	cout<<"NO"<<endl;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int num1 = scanner.nextInt();
		int num2 = scanner.nextInt();
		int num3 = scanner.nextInt();
		int num4 = scanner.nextInt();
		int num5 = scanner.nextInt();
		
		if(num3-num5<0|| num4-num5<0||num3+num5>num1||num4+num5>num2)
			System.out.println("No");
		else
			System.out.println("Yes");
	}
}

Measured memory_bytes: 17356
#include <stdio.h>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <stdint.h>
#include <string.h>

//#define _USE_MATH_DEFINES
//#include <math.h>

#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <string>

#include <algorithm>
#include <functional>
#include <bitset>
#include <functional>
#include <chrono>
#include <random>
#define sqr(x) (x) * (x)

typedef unsigned int u32;
typedef int i32;
typedef unsigned long long int u64;
typedef long long int i64;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;

using namespace std;
using namespace std::chrono;

const i64 mod = 1000000007ll;
const i64 smod = 998244353ll;
const i64 inf = 10000000000000007ll;

const double eps = 1e-10;


const i64 MAXN = 3004;

i64 n;

int main(int argc, char* argv[]) {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed);
    i64 h, a;
    cin >> h >> a;
    cout << (h / a) + (h % a ? 1 : 0) << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll  long long int
#define fr(i,n) for(ll i=0; i<n; i++)
#define fre(i,n) for(ll i=1; i<=n; i++)
#define pb push_back
#define mp(i,j) make_pair(i,j)
#define fi first
#define se second
#define pii pair<ll,ll>
#define ve vector
#define piii pair<pii, ll>
#define FAST ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
using namespace std;

ll power(ll x, ll n, ll m)
{
    if(n==0)
        return 1;
    if(n==1)
        return x;
    x%=m;
    if(n%2)
        return (x*(power((x*x)%m, n/2, m)%m))%m;
    return power((x*x)%m, n/2, m)%m;
}

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

    ll a[n][3], dp[n][3];
    for(int i=0; i<n; i++){
      for(int j=0; j<3; j++){
        cin>>a[i][j];
        dp[i][j] = a[i][j];
      }
    }

    
    for(int i=1; i<n; i++){
        dp[i][0] += max( dp[i-1][1], dp[i-1][2]);
        dp[i][1] += max( dp[i-1][0], dp[i-1][2]);
        dp[i][2] += max( dp[i-1][0], dp[i-1][1]);
    }

    cout<<max(dp[n-1][0], max(dp[n-1][1], dp[n-1][2] ));

}

Measured memory_bytes: 8292
import sys
from collections import deque
import copy

def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline


def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [N] = [long(input_raw[0])]
    input_raw = read_func().strip().split()
    [T, A] = [long(input_raw[0]), long(input_raw[1])]
    input_raw = read_func().strip().split()
    min_sub = sys.maxint
    min_idx = 0
    for i in range(N):
        H = long(input_raw[i])
        sub = abs(float(A) - (T - H * 0.006))
        if sub < min_sub:
            min_sub = sub
            min_idx = i
    print min_idx + 1

if __name__ == '__main__':
    main()

Measured memory_bytes: 3060
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<cstring>
#include<vector>
#include<list>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
#define mt make_tuple
#define pqueue priority_queue
const int inf=1e9+7;
const ll mod=1e9+7;
const ll mod1=998244353;
const ll big=1e18;
const double PI=2*asin(1);

int main() {
  int T;
  cin>>T;
  ll N, A, B, C, D;
  pair<ll, ll> state;
  ll ans[T];
  for(int i=0;i<T;++i) {
    cin>>N>>A>>B>>C>>D;
    priority_queue<pair<ll, ll>, vector<pair<ll, ll> >, greater<pair<ll, ll> > > que;
    map<ll, ll> amap;
    que.push(mp(0, N));
    while(!que.empty()) {
      state = que.top();que.pop();
      if(amap[state.se]>0) continue;
      amap[state.se] = state.fi;
      if(state.se==0) break;
      if(state.se%2==0 && amap[state.se/2]==0 && state.se/2!=N) {
        if(A/D>=state.se/2) {
          que.push(mp(state.fi+(state.se/2)*D, state.se/2));
        }
        else que.push(mp(state.fi+A, state.se/2));
      }
      if(state.se%3==0 && amap[state.se/3]==0 && state.se/3!=N) {
        if(B/D>=state.se/3*2) {
          que.push(mp(state.fi+(state.se/3*2)*D, state.se/3));
        }
        else que.push(mp(state.fi+B, state.se/3));
      }
      if(state.se%5==0 && amap[state.se/5]==0 && state.se/5!=N) {
        if(C/D>=state.se/5*4) {
          que.push(mp(state.fi+(state.se/5*4)*D, state.se/5));
        }
        else que.push(mp(state.fi+C, state.se/5));
      }
      if(amap[state.se-(state.se%2)]==0 && state.se-(state.se%2)!=N) {
        que.push(mp(state.fi+(state.se%2)*D, state.se-(state.se%2)));
      }
      if(amap[state.se-(state.se%3)]==0 && state.se-(state.se%3)!=N) {
        que.push(mp(state.fi+(state.se%3)*D, state.se-(state.se%3)));
      }
      if(amap[state.se-(state.se%5)]==0 && state.se-(state.se%5)!=N) {
        que.push(mp(state.fi+(state.se%5)*D, state.se-(state.se%5)));
      }
      if(amap[state.se+(2-state.se%2)%2]==0 && state.se+(2-state.se%2)%2!=N) {
        que.push(mp(state.fi+((2-state.se%2)%2)*D, state.se+(2-state.se%2)%2));
      }
      if(amap[state.se+(3-state.se%3)%3]==0 && state.se+(3-state.se%3)%3!=N) {
        que.push(mp(state.fi+((3-state.se%3)%3)*D, state.se+(3-state.se%3)%3));
      }
      if(amap[state.se+(5-state.se%5)%5]==0 && state.se+(5-state.se%5)%5!=N) {
        que.push(mp(state.fi+((5-state.se%5)%5)*D, state.se+(5-state.se%5)%5));
      }
    }
    ans[i] = amap[0];
  }
  for(int i=0;i<T;++i) cout<<ans[i]<<endl;
}



Measured memory_bytes: 7876
#include <bits/stdc++.h>
using namespace std;
  #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  #define int long long
  #define endl "\n"
  #define all(v) v.begin(),v.end()
  #define double long double
  #define trace1(x)                cerr<<#x<<": "<<x<<endl
  #define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
  #define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
  #define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
  #define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<< ": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
  #define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
  #define cases int testcases;cin>>testcases; while(testcases--)
  const int N = 200005;
  void yesno(bool a){if(a){cout << ("Yes");}else{cout << ("No");}}


int32_t main()
{


    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    IOS


    int d,t,s;
    cin >> d >> t >> s;

    yesno(d <= s*t);






    return 0;
}


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

namespace DPL1_B
{
    class Program
    {
        static void Main(string[] args)
        {
            var a = scan;
            int n = a[0];
            int w = a[1];
            var dp = new int[w + 1];
            for (int i = 0; i < n; i++)
            {
                var k = scan;
                for (int j = w; j >= k[1] ; j--)
                {
                    dp[j] = Math.Max(dp[j], dp[j - k[1]] + k[0]);
                }
            }
            Console.WriteLine(dp[w]);
        }

        static int[] scan
        {
            get { return Console.ReadLine().Split().Select(int.Parse).ToArray(); }
        }
    }
}

Measured memory_bytes: 9668
#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;
#define DEBUG
#ifdef DEBUG
#define debug(...) __f(#__VA_ARGS__, __VA_ARGS__)
	template <typename Arg1>
	void __f(const char* name, Arg1&& arg1){
		cerr << name << " : " << arg1 << std::endl;
	}
	template <typename Arg1, typename... Args>
	void __f(const char* names, Arg1&& arg1, Args&&... args){
		const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
	}
#else
#define debug(...)
#endif
#define FOR(i,a,b) 	for(int i=a;i<b;++i)
#define RFOR(i,a,b) 	for(int i=a;i>=b;--i)
#define ln 		"\n"
#define mp make_pair
#define pb push_back
#define sz(a)	ll(a.size())
#define F first
#define S second
#define all(c)	c.begin(),c.end()
#define rall(c) c.rbegin(), c.rend()
#define trace(c,x) for(auto &x:c)
#define pii pair<ll,ll>
#define init(a, x) memset(a,x,sizeof(a))
typedef long long ll;
typedef long double ld;
typedef	priority_queue<pii,std::vector<pii>,greater<pii> > revpr;

typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> pbds;
// ordered_set X
//K-th smallest
//*X.find_by_order(k-1)
//NO OF ELEMENTS < A
//X.order_of_key(A)
const int L=1e6+7;
int last_visit[L];
int bit[L], ans[L], a[L];
struct Query 
{ 
	int l, r, idx; 
}; 
bool cmp(Query x, Query y) 
{ 
	return x.r < y.r; 
} 
void update(int idx, int val, int bit[], int n) 
{ 
	for (; idx <= n; idx += idx&-idx) 
		bit[idx] += val; 
} 
int query(int idx, int bit[], int n) 
{ 
	int sum = 0; 
	for (; idx>0; idx-=idx&-idx) 
		sum += bit[idx]; 
	return sum; 
} 
ll n, q;
Query queries[L];
void answeringQueries() 
{ 
	init(last_visit, -1);
	int query_counter = 0; 
	for (int i=0; i<n; i++) 
	{ 
		if (last_visit[a[i]] !=-1) 
			update (last_visit[a[i]] + 1, -1, bit, n); 
		last_visit[a[i]] = i; 
		update(i + 1, 1, bit, n); 
		while (query_counter < q && queries[query_counter].r == i) 
		{ 
			ans[queries[query_counter].idx] = 
					query(queries[query_counter].r + 1, bit, n)- 
					query(queries[query_counter].l, bit, n); 
			query_counter++; 
		} 
	} 
	for (int i=0; i<q; i++) 
		cout << ans[i] << endl; 
} 
int main() 
{ 
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin >> n >> q;
	FOR(i,0,n)cin >> a[i];
	FOR(i,0,q)
	{
		cin >> queries[i].l >> queries[i].r;
		queries[i].l--;
		queries[i].r--;
		queries[i].idx= i;
	}
	sort(queries, queries+q, cmp); 
	answeringQueries(); 
	return 0; 
} 


Measured memory_bytes: 19396
#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>
#include <algorithm>

using namespace std;
typedef long long ll;

int main(int argc, char *argv[]) {
  string s;
  int k;
  cin>>s>>k;
  int now=0;
  set<string> ststr;
  for (int i=0;i<30;i++){
    char c = 'a' + i;
    for (int j=0;j<s.size();j++){
      if (s[j] == c){
        for(int j2=1;j2<=5;j2++){
          if (j+j2>s.size())break;
          ststr.insert(s.substr(j, j2));
        }
      }
    }
    if (ststr.size() > k)break;
  }
  // for(auto t : ststr){
  //   cout<<t<<endl;
  // }
  string ans=*std::next(ststr.begin(), k-1);
  cout<<ans<<endl;
  return 0;
}


Measured memory_bytes: 256
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val m = sc.nextInt()
    val lr = (0 until m).map { sc.next().toInt() to sc.next().toInt() }
    println(problem127c(n, m, lr))
}

fun problem127c(n: Int, m: Int, lr: List<Pair<Int, Int>>): Int {
    val dp = (0 until m).map { mutableListOf(0, Int.MAX_VALUE) }.toMutableList()
    dp[0][0] = lr[0].first
    dp[0][1] = lr[0].second
    for (i in 1 until m) {
        dp[i][0] = Math.max(lr[i].first, dp[i - 1][0])
        dp[i][1] = Math.min(lr[i].second, dp[i - 1][1])
    }
    val ans = dp[m - 1][1] - dp[m - 1][0] + 1
    return if (ans >= 0) ans else 0
}

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

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

typedef long long ll;
typedef pair<int, int> P;

#define MAX 100005
#define INF 1001001001

int main(int, char**)
{
  int n;
  cin >> n;
  vector<int> a(n);
  rep(i,n) cin >> a[i];

  vector<int> ans;
  int q;
  cin >> q;
  rep(i,q) {
    int k; cin >> k;
    auto itr = lower_bound(a.begin(), a.end(), k);
    ans.push_back(itr-a.begin());
  }

  for (auto a : ans) cout << a << endl;

  return 0;
}



Measured memory_bytes: 4248
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int A,B,c;
char op;
int main(void){
scanf("%d",&A);
scanf(" %c",&op);
scanf("%d",&B);
if(op == '+'){
c = (A + B);
//printf("%d",A + B);
}
else{
c = (A - B);

}
printf("%d",c);
return 0;
}

Measured memory_bytes: 128
package main

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

func main() {
	_ = nextInt()
	S := nextString()
	var lCnt, rCnt int
	ans := []byte(S)
	for _, s := range S {
		if s == '(' {
			lCnt++
		} else {
			rCnt++
		}
		diffCnt := lCnt - rCnt
		if diffCnt < 0 {
			ans = append([]byte{'('}, ans...)
			lCnt++
		}
	}
	diffCnt := lCnt - rCnt
	if diffCnt > 0 {
		for i := 0; i < diffCnt; i++ {
			ans = append(ans, []byte{')'}...)
		}
	}
	fmt.Println(string(ans))
}

// Input. ----------

var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Buffer([]byte{}, math.MaxInt64)
	sc.Split(bufio.ScanWords)
}

func nextInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}

	return i
}

func nextString() string {
	sc.Scan()
	if err := sc.Err(); err != nil {
		panic(err)
	}

	return sc.Text()
}

// ---------- Input.

// Util. ----------

func min(x, y int) int {
	return int(math.Min(float64(x), float64(y)))
}

func max(x, y int) int {
	return int(math.Max(float64(x), float64(y)))
}

// ---------- Util.


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

double EPS = 1e-9;
int n;
double pw,vw[111000],pf[110001],vf[101001],th[101001];

double ch(double x){
  double res=x*pw;
  r(i,n){
    if(vw[i]*x>=th[i])continue;
    res+=(th[i]-vw[i]*x)/vf[i]*pf[i];
  }
  return res;
}

int main(){
  while(cin>>n,n){
    cin>>pw;
    r(i,n)cin>>vw[i]>>pf[i]>>vf[i]>>th[i];
    double l=0,r=500;
    r(i,100){
      if(r<l)break;
      double mid=(l+r)/2;
      if(ch(mid)<ch(mid+EPS))r=mid;
      else l=mid;
    }
    printf("%.10f\n",ch(l));
  }
}



Measured memory_bytes: 6300
import math
import copy


def main():
    n = int(input())
    p = list(map(int, input().split()))
    q = list(map(int, input().split()))

    p_order = 1
    q_order = 1

    p_diff = []
    q_diff = []
    p_sort = list(range(1, 9))
    q_sort = list(range(1, 9))

    for i in range(n):
        # 残っている要素の下から何番目かを順番に特定する
        p_diff.append(p_sort.index(p[i]))
        q_diff.append(q_sort.index(q[i]))
        p_sort.remove(p[i])
        q_sort.remove(q[i])

    for i in range(n):
        rest_p = len(p_diff[i+1:]) if i < n else 0
        rest_q = len(q_diff[i+1:]) if i < n else 0
        p_order += p_diff[i] * math.factorial(rest_p)
        q_order += q_diff[i] * math.factorial(rest_q)

    answer = abs(p_order - q_order)
    print(answer)


'''
    while p != []:
        i = 0
        diff = p[i] - min(p)
        if diff > 2:
            p_order += math.factorial(len(p) - 1)
        p.pop(i)
'''

'''
    pq_diff = [p[i] - q[i] for i in range(n)]

    answer = 0
    for i in range(n):
        if pq_diff[i] == 0:
            continue
        answer += (pq_diff[i] - 1) * math.factorial(n-i-1)
    print(answer
'''


if __name__ == "__main__":
    main()


Measured memory_bytes: 9232
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,i,j;
string s,h;
int main(){
    ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
    s="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,";
    cin>>a;
    for(b=0; b<s.size(); ){
        while(s[b]<'0'||s[b]>'9') b++;
        c=0;
        for(i=b; ; i++){
            if(s[i]<'0'||s[i]>'9') break;
            c=c*10+s[i]-'0';
        }
        a--;
        if(a==0){
            cout<<c;
            return 0;
        }
        b=i;
    }
    return 0;
}

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

int main(){
    string num ;
    cin >> num ;
    bool ans = false;
    for (int i = 0; i < 3; i++)
    {
        if (num.at(i) == num.at(i+1))
        {
            ans = true ;
            break ;
        }
        
    }
    if (ans == true)
    {
        cout << "Bad" << endl ;
    }else
    {
        cout << "Good" << endl ;
    }
    
    
    
    }

Measured memory_bytes: 256