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

typedef long long ll;
typedef long double ld;

#define pb push_back
#define sort(s) sort(s.begin(),s.end())
#define reverse(s) reverse(s.begin(),s.end())
#define rep(i,n) for(ll (i)=0;(i)<(n);(i)++)

const ll mod = 1e9+7;

//最大公約数
ll gcd(ll a, ll b) {
    return b ? gcd(b, a%b) : a;
}

//最小公倍数
ll lcm(ll a, ll b) {
    return a / gcd(a, b) * b;
}

//素数判定
bool isPrime(ll x){
    ll i;
    if(x < 2)return 0;
    else if(x == 2) return 1;
    if(x%2 == 0) return 0;
    for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
    return 1;
}

//桁和
int digsum(ll n) {
    int res = 0;
    while(n > 0) {
        res += n%10;
        n /= 10;
    }
    return res;
}

//桁数
int dignum(ll n) {
    int res = 0;
    while(n > 0) {
        res++;
        n /= 10;
    }
    return res;
}

//文字列中の特定の文字カウント
ll stringcount(string s,char c){
    return count(s.cbegin(),s.cend(),c);
}

//階乗
ll ka(ll i){
    ll res=1;
    while(i>0){
        res=res*i;
        i--;
    }
    return res;
}
 
//ncr
ll ncr(ll x,ll y){
    ll a = x;
    ll b = 1;
    if(y>(x/2)){
        y=x-y;
    }
    for(ll i=1;i<y;i++){
        a*=x-i;
        b*=i+1;
    }
    return a/b;
}

//フィボナッチ数列
ll f(ll x){
    ll dp[x+1];
    dp[1]=1;
    dp[2]=1;
    for(ll i=3;i<=x;i++){
        dp[i]=dp[i-1]+dp[i-2];
    }
    return dp[x];
}

//char->int
int ctoi(char c){
    return c-'0';
}

vector<pair<long long, long long> > prime_factorize(long long N) {
    vector<pair<long long, long long> > res;
    for (long long a = 2; a * a <= N; ++a) {
        if (N % a != 0) continue;
        long long ex = 0; // 指数

        // 割れる限り割り続ける
        while (N % a == 0) {
            ++ex;
            N /= a;
        }

        // その結果を push
        res.push_back({a, ex});
    }

    // 最後に残った数について
    if (N != 1) res.push_back({N, 1});
    return res;
}



int main(){
    int l,r,d;
    cin >> l >> r >> d;

    int ans = 0;

    for(int i=l;i<=r;i++){
        if(i%d==0){
            ans++;
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 3624
#!/usr/bin/env python
# coding: utf-8

# In[21]:


S=input()
t=list()
ct=0
for i in range(len(S)):
    if S[i]=='A' or S[i]=='C' or S[i]=='T' or S[i]=='G':
        i+=1
        ct+=1
    else:
        t.append(ct)
        ct=0
        i+=1
t.append(ct)
print(max(t))


# In[ ]:






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

using namespace std;
using ll = long long;
const double pi = acos(-1);
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
	REP(i, v.size()) { if (i)os << " "; os << v[i]; }return os;
}
template<typename T> ostream& operator<<(ostream& os, const vector<vector<T>>& v) {
	REP(i, v.size()) { if (i)os << endl; os << v[i]; }return os;
}

const ll INF = LLONG_MAX;
ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

#define int long long

inline void my_io() {

	std::ios::sync_with_stdio(false);

	std::cin.tie(0);

	cout << fixed << setprecision(16);

	//cout << setprecision(10) << scientific << ans << endl;
}

signed main() {
	ll n, k, a;

	cin >> n >> k;

	ll cnt = 0;
	ll ans = 0;

	REP(i, n) {
		cin >> a;
		cnt++;
		if (cnt == k) {
			ans++;
			cnt = 1;
		}
	}

	if (cnt > 1) {
		ans++;
	}

	cout << ans << endl;
}

Measured memory_bytes: 256
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

def main():
    s, w = nm()

    if w >= s:
        print('unsafe')
    else:
        print('safe')


if __name__ == '__main__':
    main()

Measured memory_bytes: 9672
def resolve():
    def sub(s):
        cur = 0
        last = -(C + 1)
        res = [0] * (N + 1)
        for i in range(N):
            if i - last > C and s[i] == "o":
                cur += 1
                last = i
            res[i + 1] = cur
        return res

    N, K, C = map(int, input().split())
    S = input()

    left = sub(S)
    T = S[::-1]
    right = sub(T)
    for i in range(N):
        if S[i] == "x":
            continue
        if left[i] + right[N - i - 1] < K:
            print(i + 1)


if __name__ == "__main__":
    resolve()


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

const int COMMAX = 200000;
const int MOD = 998244353;
vector<long long> fac, finv, inv;
vector<long long> pwr; 
void InitializeCombination(void){
    fac.push_back(1LL);
    fac.push_back(1LL);
    finv.push_back(1LL);
    finv.push_back(1LL);
    inv.push_back(0LL); //Though 0^(-1) cannot be defined, there should be some number in inv[0]
    inv.push_back(1LL);
    for (int i = 2; i < COMMAX; i++){
        fac.push_back(fac[i-1] * (long long)i % (long long)MOD);
        inv.push_back((long long)MOD - inv[MOD%i] * (long long)(MOD/i) % (long long)MOD);
        finv.push_back(finv[i-1] * inv[i] % (long long)MOD);
    }
}

void InitializePower(int base){
    long long buf = 1;
    pwr.push_back(buf);
    for(int i=1; i<COMMAX; i++){
        buf = buf * base % MOD;
        pwr.push_back(buf);
    }
}
 
long long Combination(int n, int r){
    if (n < r) return 0LL;
    if (n < 0 || r < 0) return 0LL;
    return fac[n] * (finv[r] * finv[n-r] % MOD) % MOD;
}

int main(void){
    int N, M, K;
    cin >> N >> M >> K;

    InitializeCombination();
    InitializePower(M-1);

    long long res = 0;
    for(int r=0; r<=K; r++){
        res += Combination(N-1, r)*pwr[N-1-r];
        res %= MOD;
    }
    cout << res*M%MOD << endl;

    return 0;
}

Measured memory_bytes: 11088
"use strict";
process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

var re = /\s+|$/;
reader.on('close', () => {
    let l = lines.shift();
    const n = Number(l.trim());
    let ss=[]
    for (var i=0; i<n; i++) {
	l = lines.shift();
	ss.push(l.trim().split(re))
    }

    console.log(aux(ss).map(x=>x.toString()).join(' '));
});

function aux(ss)
{
    let p0=0;
    let p1=0;
    while (ss.length > 0) {
	let s = ss.shift();
	if (s[0] > s[1]) {
	    p0 += 3;
	} else if (s[0] < s[1]) {
	    p1 += 3;
	} else {
	    p0 += 1;
	    p1 += 1;
	}
    }

    return [p0,p1];
}


Measured memory_bytes: 17132
using System;

namespace atcoder_A___Discount_Fare
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int X = int.Parse(input[0]);
            int Y = int.Parse(input[1]);

            Console.WriteLine(X + (Y / 2));
        }
    }
}

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

#define rep(i, n) for(int i = 0; i < (n); i++)
#define rrep(i, n) for(int i = (n) - 1; i >= 0; i--)
#define trep(i, n) for(int i = 0; i <= (n); i++)
#define mfor(i, s, t) for(int i = (s); i < (t); i++)
#define tfor(i, s, t) for(int i = (s); i <= (t); i++)

int main() {
  string s;
  cin >> s;
  rep(i, s.size()) {
    if(i % 2 == 0) {
      cout << s[i];
    }
  }
  cout << endl;
}


Measured memory_bytes: 512
#include<iostream>
#include<string.h>

using namespace std;

int main() {

	int n;
	int ac = 0;
	int wa = 0;
	int tle = 0;
	int re = 0;

	string s;

	cin >> n;

	for (int i = 0; i < n; i++) {
		cin >> s;
		if (s == "AC")ac++;
		else if (s == "WA")wa++;
		else if (s == "TLE")tle++;
		else if (s == "RE")re++;
	}

	cout << "AC x " << ac << endl;
	cout << "WA x " << wa << endl;
	cout << "TLE x " << tle << endl;
	cout << "RE x " << re << endl;

	return 0;
}

Measured memory_bytes: 3620
#include<iostream>
#include<map>
using namespace std;
#define repa(i,a,n) for(int i=(a);i<(n);i++)
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
typedef long int li;

int main(){

  string s; cin >> s;
  rep(i,4) cout << s[i];
  cout << " ";
  repa(i,4,s.size()) cout << s[i];
  cout << "\n";
}

  






Measured memory_bytes: 256
//Badwaper gg
#include<bits/stdc++.h>
#define inf 1e18
#define eps 1e-6
#define mp make_pair
#define pb push_back
#define re register ll
#define fr first
#define sd second
#define FOR(i,a,b) for(re i=a;i<=b;i++)
#define REP(i,a,b) for(re i=a;i>=b;i--)
#define lowbit(x) x&(-x)
#define Z(x) (x>=mod?x-mod:x)
#define N 110
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
inline ll read()
{
	char ch=getchar();
	ll s=0,w=1;
	while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){s=s*10+ch-'0';ch=getchar();}
	return s*w;
}
ll n,c[N],w[N],v[N],p[N],x,d;
ll f[N*N*N],fa[N];
ll V[N*N],W[N*N],tot,ans;
inline ll cmp(ll x,ll y){return v[x]*w[y]>v[y]*w[x];}
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	n=read(),x=read(),d=read();
	w[1]=read();v[1]=1;
	FOR(i,2,n)w[i]=read(),fa[i]=read(),v[i]=1,c[i]=d;
	REP(i,n,2)w[fa[i]]+=w[i],v[fa[i]]+=v[i];c[1]=inf;
	FOR(i,1,n)p[i]=i;
	sort(p+1,p+n+1,cmp);
	ll ns=0,S=0; 
	FOR(i,1,n)
	{
		ll t=min(c[i],n);S+=t*v[i];c[i]-=t;
		ll nowv=v[i],noww=w[i],o=1;
		while(o<=t){W[++tot]=noww,V[tot]=nowv,t-=o;o<<=1,nowv<<=1,noww<<=1;}
		if(t)W[++tot]=t*w[i],V[tot]=t*v[i];
	}
	FOR(i,1,S)f[i]=inf;
	FOR(i,1,tot)
	{	
		REP(j,ns,0)f[j+V[i]]=min(f[j+V[i]],f[j]+W[i]);
		ns+=V[i];
	}
	FOR(i,0,S)
	{
		if(f[i]>x)continue;
		ll nowv=i,sum=x-f[i];
		FOR(j,1,n)
		{
			ll now=p[j];
			ll o=min(c[now],sum/w[now]);
			nowv+=o*v[now];sum-=o*w[now];
		}
		ans=max(ans,nowv);
	}
	printf("%lld\n",ans);
	return 0;
}


Measured memory_bytes: 4224
#include <bits/stdc++.h>
#define INF 1e18
#define int long long
#define Rep(i, a, n) for (int i = (a); i < (n); i++)
#define Repr(i, n, a) for (int i = (n); i >= (a); i--)
#define rep(i, n) Rep(i, 0, n)
#define repr(i, n) Repr(i, n, 0)
#define all(a) a.begin(), a.end()
using namespace std;
typedef pair<int, int> P;
typedef pair<int, P> PP;
const int mod = 1000000007;

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

    int a[5];
    rep(i, 5) cin >> a[i];
    int sum = 0;
    rep(i, 5)
    {
        int cost = max(10LL, a[i]);
        if (cost % 10 != 0)
            cost += 10 - cost % 10;
        sum += cost;
    }
    int tmp = 0;
    rep(i, 5) if (a[i] % 10 != 0) tmp = max(tmp, 10 - a[i] % 10);
    int ans = sum - tmp;
    cout << ans << endl;
}

Measured memory_bytes: 256
#include<stdio.h>
#define MAX 35

int W[MAX];

void swap(int a, int b) {
	int buff;
	buff = W[a];
	W[a] = W[b];
	W[b] = buff;
}

int main() {
	int w;
	int n;
	int a, b;
	for (int i = 0; i < 31; i++) {
		W[i] = i;
	}
	scanf("%d", &w);
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d,%d", &a, &b);
		swap(a, b);
	}
	for (int i = 1; i <= w; i++) {
		printf("%d\n", W[i]);
	}


	return 0;
}


Measured memory_bytes: 2044
use proconio::input;

fn main() {
    input! {
        n:u64
    }

    let ret = match n % 10 {
        2 | 4 | 5 | 7 | 9 => "hon",
        0 | 1 | 6 | 8 => "pon",
        3 => "bon",
        _ => panic!("nothing"),
    };
    println!("{}", ret)
}


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

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

typedef long long ll;

const int INF = 1 << 30;
const ll LLINF = 1LL << 62;

int mod = 1000000007;

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N; cin >> N;
    vector<int> A(N+1, 0);
    for(int x = 1; x <= 100; x++){
        for(int y = 1; y <= 100; y++){
            for(int z = 1; z <= 100; z++){
                int val = x*x + y*y + z*z + x*y + y*z + z*x;
                if(val <= N) A[val]++;
            }
        }
    }

    for(int i = 1; i <= N; i++) cout << A[i] << endl;
    return 0;
}

Measured memory_bytes: 3540
import std.stdio, std.conv, std.functional, std.string;
import std.algorithm, std.array, std.container, std.typecons;
import std.numeric, std.math;
import core.bitop;

string FMT_F = "%.10f";

T RD(T = long)() { static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res.to!T; }
string RDR()() { return readln.chomp; }
T[] ARR(T = long)(in string str, T fix = 0) { auto r = str.split.to!(T[]); r[] += fix; return r; }
size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
bool minimize(T)(ref T x, T y) { if (x > y) { x = y; return true; } else { return false; } }
bool maximize(T)(ref T x, T y) { if (x < y) { x = y; return true; } else { return false; } }

long mod = 10^^9 + 7;
void moda(ref long x, long y) { x = (x + y) % mod; }
void mods(ref long x, long y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(ref long x, long y) { x = (x * y) % mod; }

void main()
{
	auto N = RD;
	auto A = RD;
	auto B = RD;
	auto X = RDR.ARR;
	
	long ans;
	foreach (i; 0..N-1)
	{
		auto d = (X[i+1] - X[i]) * A;
		ans += min(d, B);
	}
	writeln(ans);
	stdout.flush();
}

Measured memory_bytes: 4436
N = int(input())
A = [int(input()) for i in range(N) ]
left = []
right = []
left_max = 0
right_max = 0
for i in range(N):
    if i == 0:
        left.append(0)
    else:
        left.append(max(left_max, A[i-1]))
    
    if (A[i-1] > left_max) and i != 0:
        left_max = A[i-1]
        
for i in range(N-1, -1, -1):
    if i == N-1:
        right.append(0)
    else:
        right.append(max(right_max, A[i+1]))
    
    if i != N-1:
        if A[i+1] > right_max:
            right_max = A[i+1]
right.reverse()

for i in range(N):
    print(max(left[i],right[i]))

Measured memory_bytes: 15632
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>

using namespace std;

struct Point {
    double x, y;
    Point() {}
    Point(double x, double y) : x(x), y(y) {}
    Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
    Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
    Point operator*(double k) const { return Point(k * x, k * y); }
    Point operator/(double k) const { return Point(x / k, y / k); }
};
double dot(const Point& a, const Point& b) { return a.x * b.x + a.y * b.y; }
double cross(const Point& a, const Point& b) { return a.x * b.y - a.y * b.x; }
double norm(const Point& a) { return sqrt(dot(a, a)); }
Point rot90(const Point& p) { return Point(p.y, -p.x); } // 時計回りに90度回転 
ostream& operator<<(ostream& os, const Point& p) { return os << "(" << p.x << "," << p.y << ")"; }

struct Line {
    Point a, b;
    Line() {}
    Line(const Point& a, const Point& b) : a(a), b(b) {}
};

Point projection(const Line& l, const Point& p) {
    Point u = (p - l.a), v = (l.b - l.a);
    return l.a + (v / norm(v)) * (dot(u, v) / norm(v));
}

Point reflection(const Line& l, const Point& p) {
    Point h = projection(l, p);
    return p + (h - p) * 2;
}

istream& operator>>(istream& is, Point& p) { return is >> p.x >> p.y; }
istream& operator>>(istream& is, Line& l) { return is >> l.a >> l.b; }
int main() {
    Line l; cin >> l;
    int Q; cin >> Q;
    for (int i = 0; i < Q; i++) {
        Point p; cin >> p;
        Point r = reflection(l, p);
        cout << fixed << setprecision(12) << r.x << " " << r.y << endl;
    }
    return 0;
}

Measured memory_bytes: 1296
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<ll,int> pli;
typedef pair<int,int> pii;
#define rep(i,a,b) for(ll i=a ; i<b ; i++)
#define qrep(que, ite) for(auto ite=begin(que) ; ite!=end(que) ; ite++)
const int max_n = 1e5;
const ll mod = 1e9+7;
const ll INF = 1e17;
const int inf = 1e5;
typedef long double ld;
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; }
ll gcd(ll a, ll b) { return a ? gcd(b%a, a) : b; }
int dx[4] = {0,0,1,-1};
int dy[4] = {1,-1,0,0};
struct UnionFind {
    vector<int> par;

    UnionFind(int n) : par(n, -1) { }
    void init(int n) { par.assign(n, -1); }

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

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

    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (par[x] > par[y]) swap(x, y); // merge technique
        par[x] += par[y];
        par[y] = x;
        return true;
    }

    int size(int x) {
        return -par[root(x)];
    }
};
struct SegmentTree{
  int N;
  vector<int> node;
  public :
    void intit(vector<int>v){
      int sz = v.size();
      N=1;
      while(N<sz) N*=2;
      node.resize(N);
      for(int i=0 ; i<sz ; i++) node[i+N-1] = v[i];
      for(int i=N-2 ; i>=0 ; i--) node[i] = min(node[i*2+1], node[i*2+2]);
    }
    void update(int x, int val){
      x += N-1;
      node[x+N-1] = val;
      while(x>0){
        x = (x-1)/2;
        node[x] = min(node[x*2+1], node[x*2+2]);
      }
    }
    int getmin(int a, int b, int k, int l, int r){
      if(b<=l || r<=a) return inf;
      else if(a<=l && r<=b) return node[k];
      else{
        int vl = getmin(a, b, 2*k+1, l, (l+r)/2);
        int vr = getmin(a, b, 2*k+2, (l+r)/2, r);
        return min(vl, vr);
      }
    }
};
vector<ll> divisor(ll n){
  vector<ll> res;
  for(ll i=1; i*i<=n ; i++){
    while(n%i==0){
      ++res[i];
      n /= i;
    }
  }
  if(n!=1) res[n]=1;
  return res;
}
int main(){
  ll N;  cin>>N;
  vector<ll> v(N);
  ll sum=0;
  rep(i,0,N){
      cin>>v[i];
      if(i!=0) sum+=v[i];
      sum %= mod;
  }
  ll ans = 0;
  rep(i,0,N-1){
    ans += v[i] * sum % mod;
    ans %= mod;
    sum -= v[i+1];
    if(sum<0) sum += mod;
  }
  cout<<ans<<endl;
  return 0;
}


Measured memory_bytes: 4796
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(x) (x).begin(), (x).end()

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

    ll X, Y;
    cin >> X >> Y;
    if (abs(X - Y) < 2) cout << "Brown" << endl;
    else cout << "Alice" << endl;
}

Measured memory_bytes: 256
#include<iostream>

using namespace std;


int s[502][502] = {};
int main(){
    int N, M, Q;
    cin >> N >> M >> Q;
    for(int i = 0; i < M; i++){
        int L, R;
        cin >> L >> R;
        s[1][R]++;
        s[L+1][R]--;
        s[1][N+1]--;
        s[L+1][N+1]++;
    }
    /*
    cout << "****"<<endl;
    for(int l = 1; l <= N; l++){
        for(int r = 1; r <= N; r++){
            cout << s[l][r] << " " ;
        }
        cout << endl;
    }
    cout << "****" << endl;
    */
    for(int l = 1; l <= N; l++){
        for(int r = 1; r <= N; r++){
            s[l][r+1] += s[l][r];
        }
    }
    for(int r = 1; r <= N; r++){
        for(int l = 1; l <= N; l++){
            s[l+1][r] += s[l][r];
        }
    }
    /*
    cout << "**********"<<endl;
    for(int l = 1; l <= N; l++){
        for(int r = 1; r <= N; r++){
            cout << s[l][r] << " ";
        }
        cout << endl;
    }
    cout << "**********"<<endl;
    */
    for(int i = 0; i < Q; i++){
        int p, q;
        cin >> p >> q;
        cout << s[p][q] << endl;
    }
}


Measured memory_bytes: 1920
n, m  = gets.strip.split.map(&:to_i)
as = gets.strip.split.map(&:to_i)

match_numbers = [2, 5, 5, 4, 5, 6, 3, 7, 6].map.with_index {|e, i| [e, i+1] }.select {|e, i| as.include?(i)}.sort.to_h

dp = Array.new(n+1)
(1..n).each do |i|
  tmp = match_numbers[i].to_i.to_s
  match_numbers.each do |cost, number|
    next if !dp[i-cost] || dp[i-cost].zero?

    a = dp[i-cost].to_s
    b = number.to_s
    str = a<b ? (b+a) : (a+b)
    tmp = str if str.length > tmp.length || (tmp.length == str.length && tmp < str)
  end
  dp[i] = tmp.to_i
end

p dp[n]


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

#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repLRE(i, l, r) for (ll i = (l); i <= (r); ++i)
#define rrepLRE(i, l, r) for (ll i = (l); i >= (r); --i)
#define Sort(v) sort(v.begin(), v.end())
#define Reverse(v) reverse(v.begin(), v.end())
#define Lower_bound(v, x) \
  distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) \
  distance(v.begin(), upper_bound(v.begin(), v.end(), x))

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vP = vector<P>;
using vT = vector<T>;
using vvll = vector<vector<ll>>;
using vvP = vector<vector<P>>;
using dqll = deque<ll>;

ll dx[9] = {-1, 1, 0, 0, -1, -1, 1, 1, 0};
ll dy[9] = {0, 0, -1, 1, -1, 1, -1, 1, 0};

/* Macros reg. ends here */

const ll INF = 1LL << 50;

static const long long mod = 1000000007;

ll n, q;

// diel = 1, dier = 2, survive = 0
ll die(string& ts, string& ds, string& s, ll pos) {
  rep(i, q) {
    if (pos < 0)
      return 1;
    else if (pos >= n)
      return 2;
    if (s[pos] == ts[i]) {
      if (ds[i] == 'L')
        pos--;
      else
        pos++;
    }
  }
  if (pos < 0)
    return 1;
  else if (pos >= n)
    return 2;
  return 0;
}

int main() {
  // ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);

  string s;
  cin >> n >> q >> s;
  string ts, ds;
  rep(i, q) {
    char t, d;
    cin >> t >> d;
    ts += t, ds += d;
  }

  ll ans = n;

  // chk diel
  ll l = -1, r = n;
  while (l + 1 < r) {
    ll m = (l + r) / 2;
    if (die(ts, ds, s, m) == 1)
      l = m;
    else
      r = m;
  }
  ans -= l + 1;

  // chk dier
  l = -1, r = n;
  while (l + 1 < r) {
    ll m = (l + r) / 2;
    if (die(ts, ds, s, m) == 2)
      r = m;
    else
      l = m;
  }
  ans -= n - r;

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 1024
import sys

ab = [[False] * 5 for _ in range(5)]
for _ in range(3):
    a, b = map(int, input().split())
    ab[a][b] = True
    ab[b][a] = True

for i in (1, 2, 3, 4):
    for j in (1, 2, 3, 4):
        for k in (1, 2, 3, 4):
            for l in (1, 2, 3, 4):
                if len(set((i, j, k, l))) < 4:
                    continue
                if not ab[i][j]:
                    continue
                if not ab[j][k]:
                    continue
                if not ab[k][l]:
                    continue
                print("YES")
                sys.exit()
print("NO")


Measured memory_bytes: 3064
# -*- coding: utf-8 -*-

N = int(input())
A = input()
B = input()
C = input()

min = 0

for i in range(N):
    if A[i] == B[i]:
        if A[i] != C[i]:
            min += 1
    else:
        if A[i] == C[i]:
            min += 1
        elif C[i] == B[i]:
            min += 1
        else:
            min += 2

print("{}".format(min))


Measured memory_bytes: 3060
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <iomanip>
#include <cmath>
using namespace std;

int main(){
	int n,m,s,c;
	int nu[4]={};
	bool a[4]={false};
	cin>>n>>m;
	for(int i=0;i<m;i++){
		cin>>s>>c;
		if(a[s]==true&&nu[s]!=c){
			cout<<-1<<endl;
			return 0;
		}
		nu[s]=c;
		a[s]=true;
	}
	if(n!=1){
		if(nu[1]==0){
			if(a[1]==true){
				cout<<-1<<endl;
				return 0;
			}else{
				nu[1]=1;
			}
		}
	}
	for(int i=1;i<=n;i++){
		cout<<nu[i];
	}
	cout<<endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstring>
#include <queue>
using namespace std;
struct po{int lx,ly,rx,ry;};
int w,h;
string mp[2][51];

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

bool bfs(int lx,int ly,int rx,int ry){
  bool visited[51][51][51][51]={};
  queue <po> Q;
  Q.push((po){lx,ly,rx,ry});
  while(!Q.empty()){
    po t=Q.front();Q.pop();
    lx=t.lx, ly=t.ly;
    rx=t.rx, ry=t.ry;
    int cnt=(mp[0][ly][lx]=='%')+(mp[1][ry][rx]=='%');
    if(cnt==2)return true;
    if(visited[lx][ly][rx][ry]||cnt==1)continue;
    visited[lx][ly][rx][ry]=1;
    for(int i=0;i<4;i++){
      int flg=0;
      int nlx=lx+dx[i],nly=ly+dy[i];
      int nrx=rx-dx[i],nry=ry+dy[i];
      if(nlx<0||nly<0||nlx>=w||nly>=h||mp[0][nly][nlx]=='#')nlx=lx,nly=ly,flg++;
      if(nrx<0||nry<0||nrx>=w||nry>=h||mp[1][nry][nrx]=='#')nrx=rx,nry=ry,flg++;
      if(flg==2||visited[nlx][nly][nrx][nry])continue;
      Q.push((po){nlx,nly,nrx,nry});
    }
  }
  return false;
}

int main(){
  while(1){
    cin >>w>>h;
    if(!w&&!h)break;
    for(int i=0;i<h;i++)cin>>mp[0][i]>>mp[1][i];
    int lx,ly,rx,ry;
    for(int i=0;i<h;i++)
      for(int j=0;j<w;j++){
	if(mp[0][i][j]=='L')lx=j,ly=i;
	if(mp[1][i][j]=='R')rx=j,ry=i;
      }

    if(bfs(lx,ly,rx,ry))cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
  }
  return 0;
}

Measured memory_bytes: 9588
// #define _GLIBCXX_DEBUG // for STL debug (optional)
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
using namespace std;

#define debug(...) fprintf(stderr, __VA_ARGS__)
#define int long long int
 
template<typename T> void chmax(T &a, T b) {a = max(a, b);}
template<typename T> void chmin(T &a, T b) {a = min(a, b);}
template<typename T> void chadd(T &a, T b) {a = a + b;}
 
typedef pair<int, int> pii;
typedef long long ll;
 
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
const ll INF = 1001001001001001LL;
const ll MOD = 1000000007LL;
 
signed main() {
    int A, B, C; cin >> A >> B >> C;
    if(B < A*C) {
        cout << B / A << endl;
    }
    else {
        cout << C << endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <math.h>
#define ll long long
using namespace std;

int main(){
  int N; cin >> N;
  ll a[N+1],b[N];
  
  for(int i=0; i<N+1; i++){cin >> a[i];}
  for(int i=0; i<N; i++){cin >> b[i];}
  
  ll sum,rem;
  sum = 0;
  rem = 0;
  for(int i=0; i<N; i++){
    if(rem>=a[i]){
      sum = sum + a[i];
      rem = b[i];
    }
    else{
      sum = sum + min(rem+b[i],a[i]);
      rem = max(rem+b[i]-a[i],(ll)0);
    }
  }
  sum = sum + min(rem,a[N]);
  
  cout << sum;
  
  return 0;
}


Measured memory_bytes: 1792
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

a,b,c=mii()

if (c-a-b)**2>4*a*b and c-a-b>0:
    print("Yes")
else:
    print("No")


Measured memory_bytes: 63340
import heapq
N,M = map(int,input().split())
A = list(map(lambda x:-int(x),input().split()))
heapq.heapify(A)
m = 0
while m<M:
    m+=1
    a = heapq.heappop(A)
    heapq.heappush(A,a/2)
print(sum([-int(a) for a in A]))

Measured memory_bytes: 14180
N = int(input())
A = [0] + list(map(int, input().split()))

# 実体Bと大きい順にループを回してindexを取得するためだけのC
B = [[a, i, 1] for i, a in enumerate(A)]
C = sorted(B, reverse=True)

# 自分より左側で最大となる値と位置
# 最大となる値が複数ある場合は最も左のものを採用
a_max, idx = 0, 0 # [value, idx]
left_max = [[0, 0] for i in range(N+1)] # [value, idx]
for i, a in enumerate(A):
  left_max[i] = [a_max, idx]
  if a > a_max:
    a_max, idx = a, i

ans = [0] * (N+1)
next_i = C[0][1]
for _, i, _ in C: # indexだけ取得
  a, _, num = B[i] # 実体を取得、numは右側で同じ数になったとき、同じ山と見なして計算量削減
  if i == next_i:
    next_a, next_i = left_max[i] # 次の最大値であるnext_aになるまではこのiがsに追加される
    now_i = i
    ans[i] += (a - next_a) * num # 差分(a-next_a)をnum回分追加
    B[next_i][2] += num # 残った分はnext_iの石が消されるタイミングで消されるのでまとめる
  else:
    ans[now_i] += (a - next_a) * num
    B[next_i][2] += num

print(*ans[1:], sep='\n')

Measured memory_bytes: 44788
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,N) for(int i = 0; i < (N); i++)
#define erep(i,N) for(int i = N; i >= 0; i--)
#define PI 3.1415936535//ここ

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;}

char upper(char c){
    if('a' <= c && c <= 'z'){
        c = c - ('a' - 'A');
    }
    return c;
}

char lower(char c){
    if('A' <= c && c <= 'Z'){
        c = c + ('a' - 'A');
    }
    return c;
}

const ll INF = 1000000000;

//input


//processing


//dpTable
int dp[100050];

int main(){
    int H1,M1,H2,M2,K;
    cin >> H1 >> M1 >> H2 >> M2 >> K;
    cout << (H2 - H1) * 60 + (M2 - M1) - K << endl;
}

Measured memory_bytes: 3596
/*"You can do anything you set your mind to,man" - Eminem*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define llpow(a,b) (ll)(pow(a,b)+0.5)
#define l_b(a,val) min((int)a.size()-1, (int)(lower_bound(a.begin(),a.end(),val)-a.begin()))
#define f first
#define up(a,b) max(a,b)
#define s second
#define INF 9223372036854775807
const  int mod = 1000000007;
template <typename T> T add(T& a, T b){a+=b;while(a>=mod)a-=mod;while(a<0)a+=mod;}
template <typename T> T mul(T& a, T b){a*=b;while(a>=mod)a-=mod;while(a<0)a+=mod;}
template <typename T> T up_self(T& a, T b){a = up(a,b);}
template <typename T> T min_self(T& a, T b){a = min(a,b);}
ll binexpomodulo(ll x, ll y){ll res =1;x%=mod;if(!x)return 0;while(y){if(y&1){mul(res, x);}mul(x,x);y>>=1;}return res;}
ll nCrInOr(ll n, ll r){ll res = 1;if(r>n-r)r = n-r;ll rin = 1;for(ll i = 1; i <=r ; i++)rin = (rin*i)%mod;rin = binexpomodulo(rin,mod-2);for(ll i = 1; i <= r; i++)res = (res*(n-i+1))%mod;res = (res*rin)%mod;return res;}
int msb(ll n){int ans;for(int i = 0 ; i < 64;  i++)if(n&(1LL<<i))ans = i+1;return ans;}
int main()
{
	int n,m; cin>>n>>m;
	vector<string> s(n);
	for(int i =0 ; i < n; i++) cin>>s[i];
	vector<vector<int>> dp(n,vector<int>(m,0));
	dp[0][0] = 1;
	for(int i = 0 ; i < n; i++){
		for(int j = 0 ; j < m; j++){
			if(s[i][j]!='#'){
				if(i&&j){
					if(s[i-1][j]!='#')
						add(dp[i][j],dp[i-1][j]);
					if(s[i][j-1]!='#')
						add(dp[i][j],dp[i][j-1]);
				}
				else if(i){
					if(s[i-1][j]!='#')
						add(dp[i][j],dp[i-1][j]);
				}
				else{
					if(s[i][j-1]!='#')
						add(dp[i][j],dp[i][j-1]);
				}
			}
		}
	}
	cout<<dp[n-1][m-1]<<endl;
  	return 0;
}

Measured memory_bytes: 5248
#coding: utf-8
l = []
ans = 0
rest = 10
for i in range(5):
    l.append(int(input()))
    if l[i] % 10 != 0:
        rest = min(rest, l[i] % 10)
for i in range(5):
    if l[i] % 10 != 0:
        ans += l[i] // 10 * 10 + 10
    else:
        ans += l[i]
print(ans + rest - 10)

Measured memory_bytes: 3060
import java.util.Scanner;

/**
 * Created by enpingkuang on 2020/9/10 10:58 下午
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        long sum = 0;
        int length = s.length();
        for(int i = 0;i<length;i++){
            sum += (s.charAt(i)-'0');
        }
        System.out.println(sum % 9==0?"Yes":"No");
    }
}


Measured memory_bytes: 40436
while True:
    n = int(input())
    if n == 0:
        break

    a_point = 0
    b_point = 0
    for _ in range(n):
        a, b = [int(x) for x in input().split()]

        if a > b:
            a_point += a + b
        elif a < b:
            b_point += a + b
        else:
            a_point += a
            b_point += b
    print(a_point, b_point)

Measured memory_bytes: 7736
// I/O
#include <iostream>
#include <iomanip>

// data structures
#include <set>
#include <queue>
#include <vector>

// manipulations
#include <algorithm>

#define rep(i,n) for(int i=0;i< (n);++i)
#define REP(i,n) for(int i=1;i<=(n);++i)
#define for_lowercase(c) for(int c='a';c<='z';++c)
#define for_uppercase(c) for(int c='A';c<='Z';++c)
#define ALL(a) (a).begin(),(a).end()
using LLI = long long int;
LLI GCD(LLI a,LLI b){ if(a<b) return GCD(b,a); else if(a%b==0) return b; else return GCD(b,a%b); }
LLI LCM(LLI a,LLI b){ return (a/GCD(a,b))*b; }
using VI  = std::vector<LLI>;
using PI  = std::pair<LLI,LLI>;
using VVI = std::vector<VI>;
using VPI = std::vector<PI>;
template<class T> bool is_odd (T x){ return   x%2 ; }
template<class T> bool is_even(T x){ return !(x%2); }
LLI combination(LLI n,LLI k,bool reset=false){
    static VVI C; static LLI n_hashed = -1;
    if(n<0){ std::cerr << "[ERROR] n must be non-negative in combination()" << std::endl; exit(1); }
    if(!(0<=k&&k<=n)){ std::cerr << "[WARNING] k should be in range [0,n] in combination()" << std::endl; return 0; }
    if(n_hashed<n || reset){
        C.resize(n+1);
        for(int i=0;i<=n;++i) C[i].resize(i+1,1); // filled with 1
        for(int i=1;i<=n;++i)for(int j=1;j<i;++j) C[i][j] = C[i-1][j-1] + C[i-1][j];
        n_hashed = n;
    }
    return C[n][k];
}
template<class T> bool has_element(const std::set<T> &set,const T &elem){ return set.find(elem)!=set.end(); }

int main() {
    std::ios::sync_with_stdio(false);
    LLI N,M;
    std::cin >> N >> M;
    VI A(M),B(M);
    rep(i,M){
        std::cin >> A[i] >> B[i];
        A[i]--; B[i]--; // 0-indexed
    }

    VVI graph(N);
    rep(i,M){
        graph[A[i]].push_back(B[i]);
        graph[B[i]].push_back(A[i]);
    }

    std::set<LLI> zero_side;
    VI flag(N,0);
    std::queue<LLI> queue;
    queue.push(0);
    bool is_bipartite = true;

    while(!queue.empty()){
        LLI pos = queue.front();
        queue.pop();
        if(flag[pos]) continue;
        flag[pos] = 1; // true
        rep(i,graph[pos].size()) {
            LLI next = graph[pos][i];
            if (!flag[next]){
                queue.push(next);
                if(!has_element(zero_side,pos)){ // pos not in zero side
                    zero_side.insert(next);
                }
            }else{
                if(has_element(zero_side,pos)==has_element(zero_side,next)){ // not bipartite !
                    is_bipartite = false;
                    break;
                }
            }
        }
    }

    // std::cout << is_bipartite << std::endl;

    if(is_bipartite){
        LLI ans = (N-zero_side.size()) * zero_side.size() - M ;
        std::cout << ans << std::endl;

    }else{
        std::cout << N*(N-1)/2 - M << std::endl;
    }

    return 0;
}

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


int n, q;
vector<int> v[200010];
ll cnt[200010];

void dfs(int c, int p){
    for (int cc : v[c]) {
        if (cc != p){
            cnt[cc] += cnt[c];
            dfs(cc, c);
        }
    }    
}

int main(){
    cin >> n >> q;
    rep(i, n - 1){
        int a, b;
        cin >> a >> b;
        v[a - 1].push_back(b - 1);
        v[b - 1].push_back(a - 1);
    }

    rep(i, q) {
        int p, x;
        cin >> p >> x;
        cnt[p - 1] += x;
    }

    dfs(0, -1);
    rep(i, n - 1) cout << cnt[i] << " ";
    cout << cnt[n - 1] << endl;
    return 0;
}

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

def main():
    N = int(input())

    j = 1
    ans = N
    for i in range(1, int(N**0.5) + 1):
        if N % i == 0:
            j = int(N/i)
        tmp = i - 1 + j - 1
        if tmp < ans:
            ans = tmp            
    print(ans)


main()

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
#define rep(i,n) for (ll i=0;i<n;++i)
#define rep2(i,a,b) for (ll i=a;i<b;++i)
const ll MOD=1e9+7;
const ll INF=1e9;
const ll IINF=1e18;
const double EPS=1e-8;
const double pi=acos(-1);

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;
}

struct BinaryIndexedTree{
    private:
    int n;
    vector<int> dat;
    public:
    BinaryIndexedTree(int n_){
        n=1;
        while(n<n_){
            n*=2;
        }
        dat.resize(n,0);
    }
    void add(int a,int w){
        for (int i=a;i<=n;i+=i&-i){
            dat[i]+=w;
        }
    }
    int sum(int a){
        int res=0;
        for (int i=a;i>0;i-=i&-i){
            res+=dat[i];
        }
        return res;
    }
    int binarysearch(int w){
        if (w<=0){
            return 0;
        }
        int x=0;
        for (int k=n;k>0;k/=2){
            if (x+k<=n&&dat[x+k]<w){
                w-=dat[x+k];
                x+=k;
            }
        }
        return x;
    }
};

int main(){
    cout << fixed  << setprecision(10);
    int N;
    cin >> N;
    vector<Pll> pos(N);
    rep(i,N){
        ll x,y;
        cin >> x >> y;
        pos[i]=Pll(x,y);
    }
    int ans=N;
    rep(i,N){
        rep2(j,i+1,N){
            ll dx=pos[i].first-pos[j].first,dy=pos[i].second-pos[j].second;
            int cnt=0;
            rep(k,N) if (!(find(pos.begin(),pos.end(),Pll(pos[k].first-dx,pos[k].second-dy))!=pos.end())) ++cnt;
            chmin(ans,cnt);
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define clr(a) memset(a, 0, sizeof(a))
#define sz(x) x.size()
#define printarray(arr) for (auto it = arr.begin(); it != arr.end(); ++it) cout<<*it<<" "; cout<<endl;
#define rep(n) for (ll i = 0; i < n; i++)
#define repc(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define DEC(i, x, y) for (int i = x; i >= y; i--)
#define all(v) v.begin(), v.end()
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define alla(a, n) a, a + n
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b)/gcd(a, b)
#define int long long int
#define ull unsigned long long

using namespace std;
const int MOD = 1e9 + 7;
const int MAXN = 1e5 + 5;

int fastexpo(int b, int exp){
    if(exp == 0) return 1;
    if(exp == 1) return b;
    int ans = (fastexpo(b,exp/2) % MOD);
    ans *= ans;
    ans %= MOD;
    if(exp % 2 == 1){
        ans *= b;
    }
    ans %= MOD;
    return ans;
}




signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int a, b, c;
    cin>>a>>b>>c;
    float d = (float)a/(float)c;
    if(d <= b){
        cout<<"Yes"<<endl;
    } else {
        cout<<"No"<<endl;
    }
    return 0;
}





Measured memory_bytes: 3684
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;

public class Main {
	static FastScanner sc = new FastScanner();
	static PrintWriter out = new PrintWriter(System.out);
	
	public static void main(String[] args) {
		int r = sc.nextInt();
		
		out.println(r*r);
		
		out.flush();
	}
	
	static class FastScanner {
	    private final InputStream in = System.in;
	    private final byte[] buffer = new byte[1024];
	    private int ptr = 0;
	    private int buflen = 0;

	    private boolean hasNextByte() {
	      if (ptr < buflen) {
	        return true;
	      } else {
	        ptr = 0;
	        try {
	          buflen = in.read(buffer);
	        } catch (IOException e) {
	          e.printStackTrace();
	        }
	        if (buflen <= 0) {
	          return false;
	        }
	      }
	      return true;
	    }

	    private int readByte() {
	      if (hasNextByte()) return buffer[ptr++];
	      else return -1;
	    }

	    private static boolean isPrintableChar(int c) {
	      return 33 <= c && c <= 126;
	    }

	    private void skipUnprintable() {
	      while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
	    }

	    public boolean hasNext() {
	      skipUnprintable();
	      return hasNextByte();
	    }

	    public String next() {
	      if (!hasNext()) throw new NoSuchElementException();
	      StringBuilder sb = new StringBuilder();
	      int b = readByte();
	      while (isPrintableChar(b)) {
	        sb.appendCodePoint(b);
	        b = readByte();
	      }
	      return sb.toString();
	    }

	    public long nextLong() {
	      if (!hasNext()) throw new NoSuchElementException();
	      long n = 0;
	      boolean minus = false;
	      int b = readByte();
	      if (b == '-') {
	        minus = true;
	        b = readByte();
	      }
	      if (b < '0' || '9' < b) {
	        throw new NumberFormatException();
	      }
	      while (true) {
	        if ('0' <= b && b <= '9') {
	          n *= 10;
	          n += b - '0';
	        } else if (b == -1 || !isPrintableChar(b)) {
	          return minus ? -n : n;
	        } else {
	          throw new NumberFormatException();
	        }
	        b = readByte();
	      }
	    }

	    public int nextInt() {
	      return (int) nextLong();
	    }

	    public int[] nextIntArray(int N, boolean oneBased) {
	      if (oneBased) {
	        int[] array = new int[N + 1];
	        for (int i = 1; i <= N; i++) {
	          array[i] = sc.nextInt();
	        }
	        return array;
	      } else {
	        int[] array = new int[N];
	        for (int i = 0; i < N; i++) {
	          array[i] = sc.nextInt();
	        }
	        return array;
	      }
	    }

	    public long[] nextLongArray(int N, boolean oneBased) {
	      if (oneBased) {
	        long[] array = new long[N + 1];
	        for (int i = 1; i <= N; i++) {
	          array[i] = sc.nextLong();
	        }
	        return array;
	      } else {
	        long[] array = new long[N];
	        for (int i = 0; i < N; i++) {
	          array[i] = sc.nextLong();
	        }
	        return array;
	      }
	    }
	  }

	}	 




		

Measured memory_bytes: 21204
#include <bits/stdc++.h>
#define debug(args...) fprintf(stderr, args)
using namespace std;

const int MOD = 1e9 + 7;

typedef long long lint;

int main() {
    int n;
    vector<int> ps;
    cin >> n;
    for (int i = 2; i <= n; i++) {
        bool prime = true;
        for (int j = 2; prime && j * j <= i; j++) {
            if (!(i % j)) prime = false;
        }
        if (prime) ps.push_back(i);
    }
    lint ans = 1;
    for (int p : ps) {
        lint cnt = 0;
        for (int i = 2; i <= n; i++) {
            int j = i;
            while (!(j % p)) {
                cnt++;
                j /= p;
            }
        }
        ans = (ans * (1 + cnt)) % MOD;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 5;
const int INF = 0x3f3f3f3f;
const ll p = 1e9 + 7;
#define DEBUG(x) cout << (x) << '\n'
#define fi first
#define se second

int n, a[MAXN];
void run(){
    cin >> n;
    for(int i = 1; i <= n; i++) cin >> a[i];
    int mx = 0;
    ll ans = 0;
    for(int i = 1; i <= n; i++)
        ans += max(0, mx - a[i]), mx = max(mx, a[i]);
    DEBUG(ans);
}
int main(){
#ifdef Irene
    freopen("in.txt", "r", stdin);
#endif // Irene
    ios_base::sync_with_stdio(false);

    run(); return 0;
}


Measured memory_bytes: 4396
#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, B;
  cin>>A>>B;
  int N;
  int ans = 0;
  for(int a=1; a < 10; a++){
    for(int b=0; b < 10; b++){
      for(int c=0; c < 10; c++){
        N = 10001 * a + 1010 * b + 100 * c;
        if(A <= N && N <= B){
          ans++;
        }
      }
    }
  }
  cout<<ans<<endl;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void){
	long int x, y;
	long int ans=0;

	scanf("%ld %ld", &x, &y);


	if(x >= 0){
		if(y >= 0){
			if(y < x){
				if(y==0)	ans = x-y+1;
				else 		ans = x-y+2;
			}else{
				ans = y-x;
			}
		}else{
			if(-y < x){
				// 絶対値を揃えてから富豪を反転
				ans = y+x + 1;
			}else{
				ans = -y-x+1;
			}
		}
	}else{
		if(y >= 0){
			if(y < -x){
				if(y == 0)	ans = -x-y;
				else		ans = -x-y+1;
			}else{
				ans = y+x+1;
			}
		
		}else{
			if(-y <= -x){
				ans = y-x;
			}else{
				ans = x-y+2;
			}
		}
	}
	printf("%ld\n", ans);

	return 0;
}


Measured memory_bytes: 128
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))

using namespace std;

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 INF=1e18;

int main()
{
    ll a;
    double b;
    cin >> a >> b;
    ll c=b*100+0.5;
    c*=a;
    c/=100;
    cout << c << endl;
    return 0;
} 

Measured memory_bytes: 3724
#include<stdio.h>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int i,j,n,min;
  while(scanf("%d",&n),n){
    min=1000000000;
    for(i=0;i*i*i<=n;i++);
    while(i--){
      for(j=0;j*j<=n-i*i*i;j++);
      while(j--)min=MIN(min,i+j+n-i*i*i-j*j);
    }
    printf("%d\n",min);
  }
  return 0;
}

Measured memory_bytes: 600
#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define PI 3.141592653589793238
#define INF 1050000000

using vi = vector<int>;


int main() {

	int A, B, C;

	cin >> A >> B >> C;

	cout << (((A+B)>=C) ? "Yes" : "No") << endl;

	return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		try (Scanner sc = new Scanner (System.in)){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();

			int result = 0;

			for (int i = a; i <= b; i++) {
				if (c%i == 0) result++;
			}

			System.out.println(result);
		}
	}
}


Measured memory_bytes: 26172
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,c=0;
  string s;
  
  cin >>n>>s;
  
  for(int i=0;i<n-2;i++){
    if(s.substr(i,3)=="ABC")c++;
  }
  
  cout << c <<endl;
  
}

Measured memory_bytes: 256
N,M = map(int, input().split())
A = [int(n) for n in input().split()]

t = sum(A)/(4*M)
c = 0

for a in A:
    if a >= t:
        c += 1
    else:
        continue

if c >= M:
    print("Yes")
else:
    print("No")

Measured memory_bytes: 3060