akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = (int)1.01e9;
const int N = 1 << 19;
const int MOD = (int)1e9 + 7;


int main() {
#ifdef HOME
    freopen("in", "r", stdin);
#endif

    string s;
    while (cin >> s) {
        bool ok = 1;
        ok &= s.length() >= 4;
        if (ok) ok &= s.substr(0, 4) == "YAKI";
        string ans = ok ? "Yes" : "No";
        cout << ans << endl;
    }

#ifdef HOME
    cerr << clock() / (double)CLOCKS_PER_SEC << endl;
#endif
    return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <iostream>

using namespace std;
typedef long long ll;
ll a,b,c,i,j,k,n,m,t;
ll arr[100050];
int main(){
	for(i=2;i<=100000;i++){
		for(j=i;j*i<=100050;j++){
			arr[i*j]=1;
		}
	}
	scanf("%lld",&a);
	for(i=a;i<=100500;i++){
		if(arr[i]==0)
        {printf("%lld",i);break;}
	}
	return 0;
}


Measured memory_bytes: 1024
N,K = map(int, input().split())
cnt = [0]*(int(1e5)+1) # 1-indexed
for _ in range(N):
    a,b = map(int, input().split())
    cnt[a] += b

s = 0
for i,c in enumerate(cnt):
    s += c
    if s>=K:
        print(i)
        break

Measured memory_bytes: 5740
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <sstream>

using namespace std;

long long a,b;
string x,y;

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

cin >> a >> b;

stringstream q;
stringstream w;
q << a;
w << b;
string e = q.str();
string r = w.str();

for (int i = 0; i<b; i++)
	x += e;
	
for (int i = 0; i<a; i++)
	y += r;

if (a>b)
	cout << y;
else 
	cout << x;




return 0;
}



Measured memory_bytes: 256
N,Q = map(int,input().split())
S = input()
td = [input().split() for _ in range(Q)]
def solve(i):
    cur = i
    for t,d in td:
        if S[cur] == t:
            cur += 1 if d=='R' else -1
        if cur < 0 or cur >= N:
            return False
    return True
 
def binary_search(ok,ng):
    while abs(ok-ng) >1:
        mid = (ok+ng)//2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    return ok
 
print(max(0,binary_search(-1,N)-binary_search(N,-1)+1))

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

using namespace std;

#ifdef WIN32
	#define I64 "%I64d"
#else
	#define I64 "%lld"
#endif

typedef long long ll;

#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(s) s.begin(), s.end()
#define sz(s) (int(s.size()))
#define fname "a"

const int N = 30000;
int lp[N+1];
vector<int> pr;

int n;
vector<int> ans;

inline bool check(int n) {
	ll s = 0;
	for (int i = 0; i < n; ++i)
		s = __gcd(1LL * ans[i], s);
	if (s != 1) return 0;
	s = 0;
	for (int i = 0; i < n; ++i)
		s += ans[i];
	for (int i = 0; i < n; ++i) {
		if (__gcd(s - ans[i], 1LL * ans[i]) == 1) return 0;
	}
	return 1;
}

int main()
{
	#ifdef LOCAL
	freopen(fname".in", "r", stdin);
	freopen(fname".out", "w", stdout);
	#endif

	srand(311);
 
	for (int i=2; i<=N; ++i) {
		if (lp[i] == 0) {
			lp[i] = i;
			pr.push_back (i);
		}
		for (int j = 0; j<(int)pr.size() && pr[j]<=lp[i] && i*pr[j]<=N; ++j)
			lp[i * pr[j]] = pr[j];
	}

	scanf("%d", &n);

	if (n == 3) {
		printf("2 5 63\n");
		return 0;
	}

	for (int cur = 1; ;++cur){
	ans.clear();

	for (int i = 2; i <= N && sz(ans) + 1 < n; i += 2) {
		ans.pb(i);
	}

	if (sz(ans) % 2 != n % 2) ans.pop_back();

	int P = pr[cur];
	for (int i = P; i <= N && sz(ans) < n; i += P) {
		if (i % 2 == 0) continue;
		ans.pb(i);
	}
	if (check(n)) break;
	}
	assert(check(n));

	for (int i = 0; i < n; ++i)
		printf("%d%c", ans[i], " \n"[i + 1 == sz(ans)]);

	return 0;
}


Measured memory_bytes: 640
def prime_factorize(n):
    table = [1]
    while n % 2 == 0:
        table.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            table.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        table.append(n)
    return table


A, B = map(int, input().split())
a = set(prime_factorize(A))
b = set(prime_factorize(B))
ans = 0
for ap in a:
    if ap in b:
        ans += 1
print(ans)

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

#define N 150000

int main(void){
  int n;
  long long k;
  cin >> n >> k;
  long long a[N];
  for(int i = 0; i < N; i++) a[i] = 0;
  int tempa, tempb;
  for(int i = 0; i < n; i++){
    cin >> tempa >> tempb;
    a[tempa] += tempb;
  }

  for(int i = 1; i <= N; i++){
    if(a[i] >= k){
      cout << i << endl;
      break;
    }
    k -= a[i];
  }
  return 0;
}


Measured memory_bytes: 1536
n,k = map(int,input().split())
o = 0
g = []
for i in range(k):
    d = int(input())
    a = list(map(int,input().split()))
    for j in range(d):
        g.append(a[j])
g.sort()
for i in range(len(g)-1):
    if g[i] == g[i+1]:
        o += 1
print(n-len(g)+o)

Measured memory_bytes: 9200
//
import java.math.*;
import java.util.*;
import java.io.*;
  
public class Main { 
  
    static BufferedReader in;
    static PrintWriter out = new PrintWriter(System.out);
    static String file = "../in";
    static int test = 10; // 0 for local testing, 1 for std input
    static int inf = 1_000_000;

    void swap(int[]ary, int i, int j)
    {
        int t = ary[i];
        ary[i] = ary[j];
        ary[j] = t;
    }
    
    String[] split() throws Exception
    {
        return in.readLine().split(" ");
    }

    int readInt() throws Exception
    {
        return Integer.valueOf(in.readLine());
    }

    int[] toIntArray() throws Exception
    {
        String[] sp = split();
        int n = sp.length;
        int[] ary = new int[n];
        for(int i = 0; i < n; i++) ary[i] = Integer.valueOf(sp[i]);
        return ary;
    }

    String reverse(String str)
    {
        return new StringBuilder(str).reverse().toString();
    }

    public static void main(String[] args) throws Exception
    {
        int _k = Integer.valueOf("1");
        if(test > 0) in = new BufferedReader(new InputStreamReader(System.in));
        else in = new BufferedReader(new FileReader(file));
        if(test < 0) {String[] str = in.readLine().split(" ");}
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
        // System.out.println((-100 + 0) / 2);

        new Main().a();
        out.flush();
    }

    void a() throws Exception
    {
      	int n = readInt();
        int[] ary = toIntArray();
        Map<Long, Long> map = new HashMap<>();
      	map.put(0L, 1L);
      	long sum = 0L;	
      	long re = 0;
      	for(int k : ary)
        {
        	sum += k;
          	if(map.containsKey(sum)) re += map.get(sum);
          	map.put(sum, map.getOrDefault(sum, 0L) + 1);
        }
      	out.println(re);
    }
}


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

int main(){
    ll A,B,M;
    cin>>A>>B>>M;
    ll a[A],b[B];
    ll flag_a=1e9;
    ll flag_b=1e9;
    for(ll i=0;i<A;++i){
        cin>>a[i];
        flag_a=min(flag_a,a[i]);
    }
    for(ll i=0;i<B;++i){
        cin>>b[i];
        flag_b=min(flag_b,b[i]);
    }
    ll sum=flag_a+flag_b;
    ll x,y,c;
    for(ll i=0;i<M;++i){
        cin>>x>>y>>c;
        sum=min(sum,a[x-1]+b[y-1]-c);
        
    }
    cout<<sum<<endl;

}

Measured memory_bytes: 1792
#include <algorithm>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define repd(i, a, b) for (ll i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
typedef long long ll;

using namespace std;

template <typename T> void output(T, int);
int gcd(int a, int b);

int main() {
    // source
    int n;
    cin >> n;
    int t[n];
    rep(i, n) { cin >> t[i]; }
    int m;
    cin >> m;
    int p[m], x[m];
    rep(i, m) { cin >> p[i] >> x[i]; }

    int sum = 0;
    rep(i, n) { sum += t[i]; }

    rep(i, m) { cout << sum - t[p[i] - 1] + x[i] << endl; }
    return 0;
}

template <typename T> void output(T a, int precision) {
    if (precision > 0) {
        cout << setprecision(precision) << a << "\n";
    } else {
        cout << a << "\n";
    }
}

template <typename T> T min(T a, T b) {

    if (a < b) {
        return a;
    } else {
        return b;
    }
}

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


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef vector<int>Vl;
typedef pair<int,int>pii;
typedef vector<pii>Vll;
typedef vector<pair<int,pair<int,int> > >Vlll;
#define S second
#define F first
#define mp make_pair
#define ms(x,y) memset(x,y,sizeof(x))
#define pb push_back
#define sl(n) cin>>n 
#define pl(n) cout<<n<<" "
const int N=2e5+2;
const int inf= (int)(1e19+10LL);
void solve(){
int curr=100;
int x;
sl(x);
int cnt=0;
while(curr<x){
	curr=curr+((curr)*1)/100;
	cnt++;
}
cout<<cnt<<endl;
	
} 
signed main(){
  int test=1;
// sl(test);
 while(test--){
 	solve();
 }
 
}

Measured memory_bytes: 3596
#include <string>
#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <map>
#include <set>
typedef long long ll;
const int mod=1e9+7;
#define lol(i,n) for(int i=0;i<n;i++)

using namespace std;
int a,b,c,d;
int main() {
    cin >> a>>b >> c>>d;
    if(a%2==1&&b%2==1&&(c+d)%2==1)cout << "No"<< endl;
    else cout << "Yes"<< endl;
}



Measured memory_bytes: 3104
#include<stdio.h>
int main()
{
   int W,H,x,y,r;
   scanf("%d %d %d %d %d",&W,&H,&x,&y,&r);
   if(x-r>=0 && x+r<=W && y-r>=0 && y+r<=H) 
   printf("Yes\n");
   else  
   printf("No\n");
   return 0;
}


Measured memory_bytes: 2700
#include <bits/stdc++.h>
#define INF 1000000007
#define rep(i, N) for(ll i = 0; i < N; i++)
#define rep2(i, j, k) for(ll i = j; i < k; i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define print(x) cout << x << "\n"
#define print2(x, y) cout << x << " " << y << "\n"
#define printv(vec) rep(lp, vec.size()) cout << vec[lp] << " "; print("\n"); 
#define show(x) cerr << #x << " = " << x << "\n";
#define ALL(v) v.begin(), v.end()
#define SUM(v) accumulate(ALL(v), 0)
#define MAX(v) *max_element(ALL(v))
#define MIN(v) *min_element(ALL(v))
#define SORT(v) sort(ALL(v))
#define REV(v) reverse(ALL(v))
typedef long long ll;
using namespace std;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vs = vector<string>;

const int mod = 998244353;
class mint {
public:
    ll x;
    mint(ll x = 0) : x((x % mod + mod) % mod) {}
    mint operator-() const { 
      return mint(-x);
    }
    mint& operator+=(const mint& a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint& a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const  mint& a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint& a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint& a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint& a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }
    mint inv() const {
        return pow(mod - 2);
    }
    mint& operator/=(const mint& a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint& a) const {
        mint res(*this);
        return res /= a;
    }
    friend ostream& operator<<(ostream& os, const mint& m){
        os << m.x;
        return os;
    }
};

ll modpow(ll a, ll n){
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}

void Main(){
	
	ll N, M;
	cin >> N >> M;
	vl v(N);
	rep(i, N) cin >> v[i];
	
	ll ans = 0;
	rep(i, N) ans += (v[i] * 4 * M >= SUM(v));
	if(ans >= M) print("Yes");
	else print("No");
 
}

int main(){
	
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	Main();
	return 0;
	
}





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

using namespace std;
const int lg = 9, N = 1<<18, MX = 1e5 + 1, inf = 1e9;
int v[N], w[N], h[N], prp[1<<lg][MX], par[N][lg+1];
int sum[1<<lg], val[1<<lg];

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int n; cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> v[i] >> w[i], h[i] = h[i/2] + 1, par[i][0] = i;
        for (int j = 1; j <= lg; j++) par[i][j] = par[i/2][j - 1];
    }
    for (int i = 1; i < min(n + 1, 1<<lg); i++) {
        memset(sum, 0, sizeof sum), memset(val, 0, sizeof val);
        for (int mask = 1; mask < (1<<h[i]); mask++) {
            int bit = __builtin_ctz(mask);
            sum[mask] = sum[mask^(1<<bit)] + w[par[i][bit]], val[mask] = val[mask^(1<<bit)] + v[par[i][bit]];
            if (sum[mask] < MX) prp[i][sum[mask]] = max(prp[i][sum[mask]], val[mask]);
        }
        for (int j = 1; j < MX; j++) prp[i][j] = max(prp[i][j], prp[i][j - 1]);
    }
    int q; cin >> q;
    for (int i = 0; i < q; i++) {
        int u, L; cin >> u >> L;
        if (h[u] <= lg) {
            cout << prp[u][L] << "\n";
            continue ;
        }
        int ans = 0, p = par[u][lg];
        memset(sum, 0, sizeof sum), memset(val, 0, sizeof val);
        for (int mask = 1; mask < (1<<lg); mask++) {
            int bit = __builtin_ctz(mask);
            sum[mask] = sum[mask^(1<<bit)] + w[par[u][bit]], val[mask] = val[mask^(1<<bit)] + v[par[u][bit]];
            if (sum[mask] <= L) ans = max(ans, val[mask] + prp[p][L - sum[mask]]);
        }
        cout << max(ans, prp[p][L]) << "\n";
    }
}


Measured memory_bytes: 216508
N = int(input())
dp = [float('inf')]*(N+1)
dp[0] = 0
for i in range(N+1):
    if i+1 <= N:
        dp[i+1] = min(dp[i+1],dp[i]+1)
    for j in range(1,N+1):
        if i + 6**j > N:
            break
        dp[i+6**j] = min(dp[i+6**j],dp[i]+1)
    for k in range(1,N+1):
        if i + 9**k > N:
            break
        dp[i+9**k] = min(dp[i+9**k],dp[i]+1)
print(dp[N])

Measured memory_bytes: 74772
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]
 
n, m = getList()
nums = getList()
sn = sum(nums)
if sn > n:
  print(-1)
else:
  print(n - sn)

Measured memory_bytes: 67060
from sys import stdin, setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    D, T, S = map(int, input().split())
    if D / S <= T:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()

Measured memory_bytes: 65436
process.stdin.resume()
process.stdin.setEncoding('utf8')
var g_input = ''
process.stdin.on('data', function(chunk) {
    g_input += chunk
})
process.stdin.on('end', function() {
    main(g_input.split(/\r?\n/))
})
function main(input){
  input = input[0]
  input = `${input}${input[input.length-1]=='s'?'es':'s'}`
  console.log(input)
}

Measured memory_bytes: 30000
#二回目
import fractions
a,b,c,d=map(int,input().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


ans1=b
a-=1
ans2=0
ans1-=b//c
ans1-=b//d

ans1+=b//(lcm(c,d))
#print(ans1)

ans2+=a//c
ans2+=a//d
ans2-=a//(lcm(c,d))
print(ans1-(a-ans2))

Measured memory_bytes: 5048
import sys
from math import ceil

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


def main():
    n, x, t = nm()
    print(ceil(n / x) * t)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9172
#include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;
using ll = long long;

constexpr static ll MOD = 1000000007ll;
constexpr static int INF = 1 << 28; // for x <= 10^9
constexpr static ll INFL = 1ll << 60; // for x <= 10^19

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

    int d = 1;
    int ans = 0;
    while (d < b) {
        d = (d - 1) + a;
        ans++;
    }

    cout << ans << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
const in INF=1<<30;
#define vec2(a,y,x) vector<vector<char>> a(y,vector<char>(x))
#define vec1(a,n) vector<int> a(n);rep(i,n)cin>>a[i]

int main(){
  string s,t;
  cin>>s>>t;
  int x=s.size();
  int y=t.size();
  bool pos=true;
  int fin=100;
  if(x<y){cout<<"UNRESTORABLE"<<endl;return 0;}
  for(int i=x-1;i>=y-1;i--){
    pos=true;
     for(int j=y-1;j>=0;j--){
     	if(s[i-(y-1-j)]==t[j] || s[i-y+1+j]=='?') continue;
       pos=false;
       break;
     }
    if(pos){fin=i;break;}
  }
  if(!pos) {cout<<"UNRESTORABLE"<<endl;return 0;}
  rep(i,y){
  	s[fin-i]=t[y-i-1];
  }
  rep(i,x) if(s[i]=='?') s[i]='a';
  cout<<s<<endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
  // 入力
  long int N, K;
  cin >> N >> K;

  long int result = N%K;

  if (abs(result-K) < result) {
    result = abs(result-K);
  }

  cout << result << endl;

  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
typedef long long ll;

inline void up(int &x, int y) { x < y ? x = y : 0; }
inline void down(int &x, int y) { x > y ? x = y : 0; }

int main() {
	ll a;
	int cnt = 0;
	std::cin >> a;
	double b = 100;
	while (1) {
		++cnt;
		b = b * 1.01;
		b = ll(b);
		if (b >= a) break;
	}
	std::cout << cnt << '\n';
	return 0;
}










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

const int N=200005; 
const int base=2000; 
const long long mod=1000000007; 

using namespace std;

int n;
int a[N],b[N]; 
 
long long ans; 
long long f[4005][4005]; 
long long fac[8005],inv[8005];

long long C(int a,int b){ return fac[a]*inv[b]%mod*inv[a-b]%mod; }

int main(){
	cin>>n; 
	for(int i=1; i<=n; ++i) cin>>a[i]>>b[i];
	for(int i=1; i<=n; ++i) ++f[base-a[i]][base-b[i]]; 
	for(int i=0; i<=base<<1; ++i)
		for(int j=0; j<=base<<1; ++j){
			if(i>0) f[i][j]=(f[i][j]+f[i-1][j])%mod; 
			if(j>0) f[i][j]=(f[i][j]+f[i][j-1])%mod; 
		}
	fac[0]=1; 
	for(int i=1; i<=8000; ++i) fac[i]=1ll*i*fac[i-1]%mod;  
	inv[0]=inv[1]=1; 
	for(int i=2; i<=8000; ++i) inv[i]=(mod-mod/i)*inv[mod%i]%mod; 
	for(int i=2; i<=8000; ++i) inv[i]=inv[i]*inv[i-1]%mod; 
	for(int i=1; i<=n; ++i) ans=(ans+f[base+a[i]][base+b[i]])%mod; 
	for(int i=1; i<=n; ++i) {
		ans=(ans-C((a[i]+b[i])<<1,a[i]<<1))%mod;  
		if(ans<0) ans+=mod;
	}
	ans=(ans*inv[2])%mod; 
	cout<<ans<<endl; 
	return 0; 
}

Measured memory_bytes: 127232
#include <iostream>
#include <cmath>

using namespace std;

struct Point {
  double x;
  double y;
};

void print_point(Point point) {
  printf("%.8f %.8f\n", point.x, point.y);
}

double to_radian(double degree) {
  return M_PI * degree / 180;
}

void draw_inner_koch_curve(int depth, Point start_point, Point end_point) {
  if(depth < 1) {
    return;
  }


  Point one_thirds_point;
  Point two_thirds_point;

  // 回転行列
  one_thirds_point.x = start_point.x + (end_point.x - start_point.x) * (1 / 3.0);
  one_thirds_point.y = start_point.y + (end_point.y - start_point.y) * (1 / 3.0);
  two_thirds_point.x = start_point.x + (end_point.x - start_point.x) * (2 / 3.0);
  two_thirds_point.y = start_point.y + (end_point.y - start_point.y) * (2 / 3.0);

  Point rotation_point;
  double rotation_degree = 60;
  rotation_point.x =
    (two_thirds_point.x - one_thirds_point.x) * cos(to_radian(rotation_degree)) -
    (two_thirds_point.y - one_thirds_point.y) * sin(to_radian(rotation_degree)) +
    one_thirds_point.x;

  rotation_point.y =
    (two_thirds_point.x - one_thirds_point.x) * sin(to_radian(rotation_degree)) +
    (two_thirds_point.y - one_thirds_point.y) * cos(to_radian(rotation_degree)) +
    one_thirds_point.y;

  draw_inner_koch_curve(depth - 1, start_point, one_thirds_point);
  print_point(one_thirds_point);
  draw_inner_koch_curve(depth - 1, one_thirds_point, rotation_point);
  print_point(rotation_point);
  draw_inner_koch_curve(depth - 1, rotation_point, two_thirds_point);
  print_point(two_thirds_point);
  draw_inner_koch_curve(depth - 1, two_thirds_point, end_point);
};


int main() {
  Point start_point{0, 0}, end_point{100, 0};
  int depth;
  cin >> depth;


  print_point(start_point);
  draw_inner_koch_curve(depth, start_point, end_point);
  print_point(end_point);

}



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

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<ll> vl;
typedef vector<string> vs;
const ll mod = 1e9+7;
const ll inf = 1e17;
const int INF = 1e9;
const double PI = acos(-1);
#define fo(i, a, b) for (int i = a; i < b; i++)
#define re(i, n) fo(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(s) s.begin(), s.end()
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { ll g = gcd(a, b); return a / g * b; }
double gya(double n)
{
  double g = 1 / n;
  return g;
}
int main()
{
  double n;
  cin >> n;
  vd a(n);
  re(i, n) cin >> a[i];

  double s = 0;
  re(i, n) {
    s += gya(a[i]);
  }

  cout << fixed << setprecision(6)<< 1 / s << endl;

  return 0;
}


Measured memory_bytes: 256
//optimised approach O(nlogn)
#include<bits/stdc++.h>
#define int long long
#define mod 1000000007
using namespace std;
int32_t main(){
    int n;
    cin>>n;
    int h[n+1];
    int a[n+1];
    for(int i=1;i<=n;i++){
        cin>>h[i];    
    }
    for(int i=1;i<=n;i++){
        cin>>a[i];    
    }
    int dp[n+1];
    map<int,int> hm;
    dp[1]=a[1];
    hm[h[1]]=a[1];
    for(int i=2;i<=n;i++){
        dp[i]=a[i];
        auto it=hm.upper_bound(h[i]);
        if(it!=hm.begin()){
            it--;
            dp[i]=max(dp[i],a[i]+it->second);
        }
        hm[h[i]]=dp[i];
        it=hm.upper_bound(h[i]);
        while(it!=hm.end() && dp[i]>=it->second){
            auto tmp=it;
            it++;
            hm.erase(tmp);
        }
    }
    cout<<*max_element(dp+1,dp+n+1)<<endl;
    return 0;
}


Measured memory_bytes: 17408
#include <iostream>
#include <string>
#include <vector>
#include <stack>
#include <algorithm>

using namespace std;
using ll = long long;
using pii = pair<int, int>;
static const int INF = 1000000000;

vector<ll> solve(const vector<ll>& a){
	const int n = a.size();
	vector<ll> incr(n);
	stack<pii> istack;
	istack.emplace(n, INF);
	for(int i = n - 2; i >= 0; --i){
		incr[i] = incr[i + 1];
		if(a[i + 1] < a[i]){
			for(ll j = 1; a[i + 1] * j < a[i]; j *= 4){
				while(istack.top().second == 0){ istack.pop(); }
				const auto t = istack.top();
				istack.pop();
				incr[i] += 2 * (t.first - i - 1);
				istack.emplace(t.first, t.second - 1);
			}
		}else{
			int margin = 0;
			for(ll j = 4; a[i] * j <= a[i + 1]; j *= 4){
				++margin;
			}
			istack.emplace(i + 1, margin);
		}
	}
	return incr;
}

int main(){
	ios_base::sync_with_stdio(false);
	int n;
	cin >> n;
	vector<ll> a(n);
	for(int i = 0; i < n; ++i){ cin >> a[i]; }
	const auto positive = solve(a);
	reverse(a.begin(), a.end());
	auto negative = solve(a);
	reverse(negative.begin(), negative.end());
	ll answer = positive[0];
	for(int i = 1; i < n; ++i){
		answer = min(answer, negative[i - 1] + i + positive[i]);
	}
	cout << answer << endl;
	return 0;
}


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

typedef long long int LL;
typedef long long int LLint;
typedef pair<int,int> intpair;
typedef pair<bool,bool> boolpair;
typedef pair<string,string> strpair;
typedef pair<LL,LL> LLpair;
typedef pair<double,double> doublepair;
typedef pair<float,float> floatpair;
typedef vector<int> intvector;
typedef vector<bool> boolvector;
typedef vector<string> strvector;
typedef vector<LL> LLvector;
typedef vector<double> doublevector;
typedef vector<float> floatvector;
#define wait(sec) usleep((sec) * 1000000)
#define ED return 0;
#define TEST cout << "OK" << endl;
#define UP(a,b) ((a+(b-1))/b)
#define SORT(vec) sort(vec.begin(),vec.end());
#define DOUBLECHANGE(count) cout << setprecision(count);
#define REV(vec) reverse(vec.begin(),vec.end());
#define ipow(x,y) LL(pow(x,y))
#define INF 999999999
const long long mod = 1000000007;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b;
    cin >> a >> b;
    cout << a + b / 2 << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define inf 10000000000000007
#define eps 1e-8
#define PI 3.14159265359
#define sp printf(" ")
#define vi vector<int>
#define vl vector<long long>
#define vc vector<char>
#define vs vector<string>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define pcc pair<char, char>
#define mp make_pair
#define FF first
#define SS second
#define pb(x) push_back(x)
#define sd(x) scanf("%d", &(x))
#define pd(x) printf("%d", (x))
#define pdn(x) printf("%d\n", (x))
#define sld(x) scanf("%ld", &(x))
#define pld(x) printf("%ld", (x))
#define pldn(x) printf("%ld\n", (x))
#define slf(x) scanf("%lf", &(x))
#define plf(x) printf("%.9lf", (x))
#define plfn(x) printf("%.12lf\n", (x))
#define sch(x) scanf("%c", &(x))
#define pch(x) printf("%c", (x))
#define pchn(x) printf("%c\n", (x))
#define gtl(x) getline(cin, (x))
#define flsh fflush(stdout)
#define ios ios::sync_with_stdio(false); cin.tie(0) ; cout.tie(0)
#define endl '\n'
using namespace std;
long long int modpow (long long int a, ll mo)
{
	ll res = 1;
	ll j=mo-2;
	while (j > 0)
		if (j & 1) {
			res = (res * a) % mo;
			--j;
		}
		else {
			a = (a * a) % mo;
			j >>= 1;
		}
	return res %mo;
}
ll fact[100006],ifact[100005];
int v[100005],a[100004];
int main()
{
    int n;
    cin>>n;
    fact[0]=1;ifact[0]=modpow(1,mod);
    int in,jn;
    for(ll i=1;i<=n+1;i++)
    {
        cin>>a[i];
        fact[i]=fact[i-1]*i;
        fact[i]%=mod;
        ifact[i]=ifact[i-1]*modpow(i,mod);
        ifact[i]%=mod;
        if(v[a[i]]==0)
        {
            v[a[i]]=i;
        }
        else
        {
             in=v[a[i]]-1;
             jn=n+1-i;
        }
    }
    //cout<<in<<" "<<jn<<endl;
    for(int i=1;i<=n+1;i++)
    {
        ll w=fact[n+1]*ifact[i];
        w%=mod;
        w=w*ifact[n+1-i];
        w=w%mod;
        ll o=0;
        if(in+jn>=i-1)
        {
            //cout<<i<<endl;
             o=fact[in+jn]*ifact[i-1];
            o%=mod;
            o=o*ifact[in+jn-i+1];
            o%=mod;
           // cout<<i<<" "<<o<<endl;
        }
        w=w-o+mod;
        w%=mod;
        cout<<w<<endl;

    }
    cout<<endl;



}




Measured memory_bytes: 3584
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;

#define ff               first
#define ss               second
#define pb               push_back
#define all(x)           (x).begin(), (x).end()
#define mem0(x)          memset(x, 0, sizeof (x))
#define mem1(x)          memset(x, -1, sizeof (x))

typedef long long ll;
typedef vector <int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector <ii> vii;
typedef vector<vii> vvii;
typedef vector <ll> vll;
typedef vector<vll> vvll;
typedef pair<ll, ll> pll;

ll memo[3003][3003][4];
int board[3003][3003];
int n, m;
const ll INF = 1e18;

ll dp(int i, int j, int cnt){
    if (i == n && j == m){
        if (cnt < 3) return board[i][j];
        else return 0;
    }else if (i > n || j > m) return -INF;

    if (~memo[i][j][cnt]) return memo[i][j][cnt];
    ll ans = 0;
    if (j < m){
        if (cnt < 3) ans = board[i][j] + dp(i,j+1,cnt+1);
        ans = max(ans, dp(i,j+1,cnt));
    }
    if (i < n){
        if (cnt < 3) ans = max(ans, board[i][j] + dp(i+1,j,0));
        ans = max(ans, dp(i+1,j,0));
    }
    return memo[i][j][cnt] = ans;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int k;
    mem1(memo);
    cin >> n >> m >> k;
    for (int i = 0; i < k; ++i) {
        int x, y, v;
        cin >> x >> y >> v;
        board[x][y] = v;
    }
    cout << dp(1,1,0) << "\n";
}

Measured memory_bytes: 321108
#include<stdio.h>

int main()
{
    int A,B,C,D;
    scanf("%d %d %d %d",&A,&B,&C,&D);
    while(1){
        C=C-B;
        if(C<=0){
            printf("Yes");
            break;
        }
        A=A-D;
        if(A<=0){
            printf("No");
            break;
        }

    }
    return 0;
}

Measured memory_bytes: 1736
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;

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

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

// Self settings
// clang-format off
#define MAX_N 100000
#define REP(i, N) for (int i = 0; i < (int)(N); ++i)
#define SLN(i,N) (i == N-1 ? "\n" : " ")
// clang-format on

int A, B;

int main(void)
{
  cin >> A >> B;
  int ans;
  if (B % A == 0) {
    ans = A + B;
  }
  else {
    ans = B - A;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 632
n = int(input())
s = set()
for i in range(n):
    w = input()
    c = len(s)
    s.add(w)
    if i > 0:
        if w0[len(w0)-1] != w[0] or c+1 != len(s):
            print("No")
            exit()
    w0 = w

print("Yes")

Measured memory_bytes: 3060
/*#include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		int m, n;
		cin >> m >> n;
		int p[100000], q[100000],temp[100000];
		int i,j;
		bool flag[10000] = { 0 };
		for (i = 0; i < m; i++)
		{
			cin >> p[i];
			temp[i] = p[i];
		}
		for (i = 0; i < n; i++)
		{
			cin >> q[i];
		}
		sort(temp, temp + m);
		for (i = 0; i < m; i++)
		{
			for (j = 0; j < m; j++)
			{
				if (p[i] == temp[j])
				{
					if (i - j < 0)
					{
						int k = abs(i - j);
						//g = 0;
						while (k--)
						{
							flag[i++] = 1;
						}
					}
					else
					{
						int k = i - j;
						while (k--)
						{
							flag[--i] = 1;
						}
					}
				}
				else
					continue;
			}
		}
		for (i = 0; i < m; i++)
		{
			cout << flag[i] << " ";
		}
	}
}*//*
#include<iostream>
#include<set>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int i, count = 0;
	int a[10000];
	set<int>s;
	for (i = 0; i < n; i++)
		cin >> a[i];
	for (i = 0; i < n - 2; i++)
	{
		if (a[i] != a[i + 2])
		{
			count++;
			s.insert(a[i]);
			s.insert(a[i + 2]);
		}
		s.insert(a[i]);
	}
	if (s.size() == 1)
		cout << count + n/2;
	else
		cout << count;
}

*/
#include<bits/stdc++.h>

using namespace std;
int main()
{
	string s;
	cin >> s;
	int min = INT_MAX;
	int l = s.length();
	int i, j, k, m;
	for (i = 0; i < l-2; i++)
	{
		for (j = i + 1; j < i+2 ; j++)
		{
			for (k = i + 2; k < i + 3; k++)
			{
				m = 753-((s[i] - '0')*100 + (s[j] - '0')*10 + (s[k] - '0')*1);
				if (abs(m) < min)
					min = abs(m);
				//cout << m << " ";
			}
		}

	}
	cout << abs(min);
}

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


#define INF 100000000
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; }

using namespace std;

int main(){
  int a, i,j,k,n,d;
  cin >>n>>d;
  a=n+d;
  if(a<n-d)a=n-d;
  if(a<n*d)a=n*d;

  cout << a<<endl;;

  return 0;
}

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

using namespace std;

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

    int V[N], C[N];
    for (int i = 0; i < N; ++i) cin >> V[i];
    for (int i = 0; i < N; ++i) cin >> C[i];

    int ans = 0;
    for (int i = 0; i < N; ++i) {
        ans += max(0, V[i] - C[i]);
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
import sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np
# from numpy import cumsum  # accumulate
class Doubling:
    def __init__(self, lst, max_step):
        self.lst = lst
        self.max_step = max_step
        self.k = int(log2(max_step * 2 - 1)) + 1
        # print(self.k)
        self.D = self.create()

    def create(self):
        len_ = len(self.lst)
        D = [[-1] * len_ for _ in range(self.k)]
        D[0] = self.lst
        d = 2
        for i in range(1, self.k):
            for j in range(len_):
                D[i][j] = D[i - 1][D[i - 1][j]]
            d *= 2
        # print(D)
        return D

    def step(self, start, step):
        v = start
        for i in range(self.k, -1, -1):
            l = 1 << i
            if l <= step:
                v = self.D[i][v]
                # print(i, l)
                step -= l
        return v

def solve():
    N, K = MI()
    A = LI1()

    db = Doubling(A, K)
    v = db.step(0, K)
    print(v+1)

if __name__ == '__main__':
    solve()


Measured memory_bytes: 175760
N,K=map(int,input().split())
A  = list(map(int,input().split()))

from collections import deque
scores=deque()

for i in range(0,K):
    scores.append(A[i])

for j in range(K,N):
#     if 0 in scores:
#         scores.pop(0)
#         scores.append(A[j])
#         if 0 in scores:
#             print("No")
#         else:
#             print("Yes")
    if scores.popleft()<A[j]:
        print("Yes")
        scores.append(A[j])
    else:
        print("No")
        scores.append(A[j])


Measured memory_bytes: 31612
// Example program
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;

int main()
{
    ll n, m, a, b, c;
    cin >> n >> m >> a >> b >> c;
    if (n * 2 < m)
        m = n * 2;
    if (m * 2 < a)
        a = m * 2;
    if (a * 2 < b)
        b = a * 2;
    ll x = (c / 2) * b;
    if (c % 2 == 1)
        x += a;
    cout << x;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

signed main() {
    int n;
    cin >> n;
    vector<int> v(n);
    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }
    int d = __gcd(v[0], v[1]);
    for (int i = 2; i < n; i++) {
        d = __gcd(d, v[i]);
    }
    cout << d << "\n";
}

Measured memory_bytes: 1024
def solve():
    N = int(input())
    A = list(map(int, input().split()))
    M = 0
    ret_M = []
    memo_N = [0]*N # memo: 倍数を足したときに2で割った余り
    for i in range(N)[::-1]:
        i_ = i+1
        q = N//i_
        s = sum(memo_N[i_*(d+1)-1] for d in range(1,q))
        memo_N[i] = (s%2)^A[i]
        if memo_N[i]:
            M += 1
            ret_M.append(i_)
                
    print(M)
    if M: print(' '.join(map(str, ret_M[::-1])))
      
solve()

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

using namespace std;
using ll = long long;
using ld = long double;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define reps(i,s,n) for(int i=(int)(s);i<(int)(n);i++)
const ll mod = 1e9 + 7;
const ll INF = 1e9;
int main() {
	cin.sync_with_stdio(false);
	int N;
	cin >> N;
	vector<int>A(N);
	rep(i, N)cin >> A[i];
	ll ans = 1;
	rep(i, N)ans *= 3;
	ll x = 1;
	rep(i, N) {
		if (A[i] % 2 == 0)x *= 2;
	}
	cout << ans - x << endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main()
{
  int ans=0;
  string s;
  cin>>s;
  if(s[0]=='1'){
    ans++;
  }
  if(s[1]=='1'){
    ans++;
  }
  if(s[2]=='1'){
    ans++;
  }
  cout<<ans;
}

Measured memory_bytes: 3200
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var vals = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var N = vals[0];
            var M = vals[1];
            var S = Console.ReadLine();
            var T = Console.ReadLine();

            var result = IsGoodString(N, M, S, T);
            Console.WriteLine(result);
        }

        public static long Lcm(int a, int b)
        {
            return (long)a * (long)b / Gcd(a, b);
        }

        // ユークリッドの互除法 
        public static int Gcd(int a, int b)
        {
            if (a < b)
                // 引数を入替えて自分を呼び出す
                return Gcd(b, a);
            while (b != 0)
            {
                var remainder = a % b;
                a = b;
                b = remainder;
            }
            return a;
        }

        static long IsGoodString(int N, int M, string S, string T)
        {
            //L＝最小公倍数の倍数を調べればよい
            var lcm = Lcm(N, M);

            for(long i = lcm; i <= lcm; i+=lcm)
            {
                if (i % N != 0 || i % M != 0) continue;
                var chars = new Dictionary<int, char>();
                foreach(var si in Enumerable.Range(0, S.Length))
                {
                    chars[(int)(1 + i / N * si)] = S[si];
                }
                var conflict = false;
                foreach(var ti in Enumerable.Range(0, T.Length))
                {
                    char ctemp;
                    if (chars.TryGetValue((int)(1 + i / M * ti), out ctemp))
                    {
                        if (ctemp != T[ti])
                        {
                            conflict = true;
                            break;
                        }
                    }
                    else
                    {
                        chars[(int)(1 + i / M * ti)] = T[ti];
                    }
                }
                if (!conflict) return i;
            }
            return -1;
        }
    }

}


Measured memory_bytes: 22112
import java.util.Scanner;

/**
 * 外汇交易赚取汇率差，计算价格差的最大值
 * 	输入：
 * 		第一行输入整数n，接下来n行依次给整数赋值
 * 	输出：
 * 		在单独一行中输出最大值
 * 	限制：
 * 		2 <= n <= 200 000
 * 		1 <= R <= 10^9
 * 
 * @author MZ21G
 */
public class Main {
	
	public static void main(String[] args) {
	
		
		Scanner scanner = new Scanner(System.in);
		
		int n = scanner.nextInt();
		
		int arrR[] = new int [n];
		
		for (int i = 0; i < n; i++) {
			arrR[i] = scanner.nextInt();
		}
		
		int maxv = Integer.MIN_VALUE;
		/**
		 * 使用下列方法复杂度会为n^2,无法再限制时间内完成处理
		 */
//		for (int i = 1; i < n; i++) {
//			for (int j = 0; j < i; j++) {
//				int profit = arrR[i] - arrR[j];
//				if (maxv < profit) {
//					maxv = profit;
//				}
//			}
//		}
		int minv = arrR[0];
		for (int i = 1; i < n; i++) {
			if (maxv < arrR[i] - minv) {
				maxv = arrR[i] - minv;
			}
			if (minv > arrR[i]) {
				minv = arrR[i];
			}
			
		}
		
		
		
		System.out.println(maxv);
		
	}
	
}



Measured memory_bytes: 100720
from math import factorial
n, a, b = map(int, input().split())
mod = 10**9+7

def comb(n,k):
    x,y = 1,1
    for i in range(k):
        x = x * (n-i) % mod
        y = y * (i+1) % mod
    return x * pow(y,mod-2,mod) % mod

ans = pow(2,n,mod) - 1 - comb(n,a) - comb(n,b)
ans %= mod
print(ans)

Measured memory_bytes: 38512
#include <bits/stdc++.h>
using namespace std;
int main()
{
    long long  x;
    scanf("%lld",&x);
    string s;
    while (x > 0)
    {
        int h= x%26;
        if (h==0)
            h=26;
        s=(char)(h+'a'-1)+s;
        x=(x-h)/26;
    }
    cout<<s;
    return 0;
}





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

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

Measured memory_bytes: 3540
#include<bits/stdc++.h>
using namespace std;
 
#define SPEED ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define MP make_pair
#define pb push_back
#define ff first
#define ss second
#define sz(x) x.size()
#define all(c) c.begin(),c.end()
#define int long long
#define fr(i,j,x) for(int i=j;i<x;i++)
#define rep(i,j,x) for(int i=j;i<=x;i++)
#define mem(x,val) memset(x,val,sizeof(x))
//#define endl '\n'
#define vi vector<int>
#define pii pair<int,int>
#define piii pair<int,pii>
 
const int mod=1e9+7;
const int N=2e5+10;
const int MAXN=2e6+10;
const int INF=1e18;

string to_string(string s) { return '"' + s + '"';}
string to_string(char s) { return string(1, s);}
string to_string(const char* s) { return to_string((string) s);}
string to_string(bool b) { return (b ? "true" : "false");}
template <typename A> string to_string(A);
template <typename A, typename B>string to_string(pair<A, B> p) {return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}
template <typename A> string to_string(A v) {bool f = 1; string r = "{"; for (const auto &x : v) {if (!f)r += ", "; f = 0; r += to_string(x);} return r + "}";}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {cerr << " " << to_string(H); debug_out(T...);}
#define pr(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)



void solve(){
    int d,t,s;
    cin>>d>>t>>s;
    if(t*s>=d){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
}


int32_t main()
{

    SPEED;
    int T=1;
    //cin>>T;
    int t1=1;
    while(true)
    {  
        //cout<<"Case #"<<t1<<": ";
        solve();
        t1++;
        if(t1>T)
            break;
    }
}

Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
template<typename T1, typename T2>
inline bool cmn (T1& a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<typename T1, typename T2>
inline bool cmx (T1& a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template<typename T>
class fixed_point : T {
  public:
    explicit constexpr fixed_point (
        T&& t
      ) noexcept
      : T(forward<T>(t))
      {
      }
    template<typename... Args>
    constexpr decltype(auto)
    operator()(
        Args&&... args
      ) const
      {
        return T::operator()(*this, forward<Args>(args)...);
      }
};
template<typename T>
static inline constexpr decltype(auto) fix (T&& t) noexcept {
  return fixed_point<T>{forward<T>(t)};
}
template<typename T>
class diameter {
  const int n;
  const vector<vector<pair<T, int>>>& grh;
  T diam;
  int ex, fx;
  void cal () {
    for (int t = 0; t < 2; t++) {
      diam = 0;
      fix ([&](auto dfs, int crr, int prt, T dpt = 0) -> void {
        if (cmx(diam, dpt)) fx = crr;
        for (auto const& e : grh[crr]) {
          T w; int nxt; tie(w, nxt) = e;
          if (nxt == prt) continue;
          dfs(nxt, crr, dpt + w);
        }
      })(ex, ex);
      swap(ex, fx);
    }
    if (ex > fx) swap(ex, fx);
  }
  public:
    diameter (vector<vector<pair<T, int>>>& grh) :
      n(grh.size()), grh(grh),
      diam(0), ex(0), fx(0)
      {
        cal();
      }
    T result () const {return diam;}
    auto extremals () const -> pair<int, int> {return {ex, fx};}
};
int main() {
  cin.tie(0); cin.sync_with_stdio(false);
  int n; cin >> n;
  vector<vector<pair<int, int>>> grh(n);
  for (int i = 0; i < n - 1; i++) {
    int s, t; int d;
    cin >> s >> t >> d;
    grh[s].emplace_back(d, t);
    grh[t].emplace_back(d, s);
  }
  diameter<int> cal(grh);
  cout << cal.result() << endl;
  return 0;
}


Measured memory_bytes: 11784
a = int(input())
b = int(input())
c = int(input())
x = int(input())

cnt = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x == 500*i + 100*j + 50* k:
                cnt += 1
print(cnt)

Measured memory_bytes: 3064
import java.util.*;
import java.io.PrintWriter;

public class Main{
	static int[] c=new int[26];
	static int[] lastD=new int[26];
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int d=sc.nextInt();
		for(int i=0; i<26; i++){
			c[i]=sc.nextInt();
		}
		int[][] s=new int[d][26];
		for(int i=0; i<d; i++){
			for(int j=0; j<26; j++){
				s[i][j]=sc.nextInt();
			}
		}
		int maxSati=-1000000;
		int maxInd=-1;
		//j:何日目
		for(int j=0; j<d; j++){
			//i:どの大会をやるか
			for(int i=1; i<=26; i++){
				int sati=0;
				lastD[i-1]=j+1;
				sati+=s[j][i-1];
				sati-=subSati(j+1);
				lastD[i-1]=0;
				if(maxSati<sati){
					maxSati=sati;
					maxInd=i;
				}
			}
			System.out.println(maxInd);
			lastD[maxInd-1]=j+1;
			maxSati=-1000000;
			maxInd=-1;
		}
	}
	static int subSati(int d){
		int ret=0;
		for(int i=0; i<26; i++){
			ret+=c[i]*(d-lastD[i]);
		}
		return ret;
	}
}


Measured memory_bytes: 46528
def main():
    n,x = map(int,input().split(' '))
    a = list(map(int,input().split(' ')))
    res = 0
    for i in range(n-1):
        if a[i]+a[i+1] <=x:
            continue
        res += a[i]+a[i+1]-x
        if x-a[i] >=0:
            a[i+1] = x-a[i]
        else:
            a[i+1] = 0
            a[i] = 2*a[i]-x
    print(res)

if __name__ == '__main__':
    main()

Measured memory_bytes: 14068
#include <iostream>
int main(){
  int N;
  std::cin >> N;
  int n = N / 7;
  for(int i = 0; i < n + 1; i++){
    if((N - i*7) % 4 == 0){
      std::cout << "Yes" << std::endl;
      return 0;
    }
  }
  std::cout << "No" << std::endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
char cf[111];

int main(){
    scanf("%s",cf);
    bool c=false,f=false;
    int l=strlen(cf);
    for(int i=0;i<l;i++){
    if(c==0&&cf[i]=='C')
        c=true;
    if(c==1&&cf[i]=='F')
        f=true;}
    if(c&&f)printf("Yes");
    else printf("No");
    return 0;}

Measured memory_bytes: 256
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <cmath>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <random>
#include <map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include <fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;

using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using vb = vector<bool>;
using mll = map<ll, ll>;
using sll = stack<ll>;
#define REP(i,n) for(ll i(0);(i)<(n);(i)++)
#define rep(i,n) for(ll i(0);(i)<(n);(i)++)
#define ALL(a) a.begin(), a.end()
#define enld endl //* missspell check
const ll INF = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }

void solve(long long a, long long b, long long c, long long d){
    ll ans = -INF;
    chmax(ans, a*c);
    chmax(ans, a*d);
    chmax(ans, b*c);
    chmax(ans, b*d);
    cout<<ans<<endl;
}
int main(){
    long long a;
    scanf("%lld",&a);
    long long b;
    scanf("%lld",&b);
    long long c;
    scanf("%lld",&c);
    long long d;
    scanf("%lld",&d);
    solve(a, b, c, d);
    return 0;
}


Measured memory_bytes: 3252