akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>

int main()
{
    std::string s;
    std::cin >> s;

    int result = (s[0] == '0' ? 0 : 1);
    result += (s[1] == '0' ? 0 : 1);
    result += (s[2] == '0' ? 0 : 1);

    std::cout << result << std::endl;

    return 0;
}

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

// エイリアス
using  ll = long signed long;
using ull = long unsigned long;
using  ld = long double;
using   P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;

// 汎用マクロ
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define FOREACH(i,q) for (auto &i : q)
#define UNIQUE(v) do { sort((v).begin(), (v).end()); (v).erase(unique((v).begin(), (v).end()), (v).end()); } while (false)
#define SZ(x) ((int)(x).size())
template <class T>inline bool chmin(T &a, const T b) {if (a > b) { a = b; return true;} return false;}
template <class T>inline bool chmax(T &a, const T b) {if (a < b) { a = b; return true;} return false;}
template <class T>inline void line_out(const vector<T> vec) {int n = SZ(vec); rep(i, n) { cout << vec[i]; if(i < n-1) cout << " ";}cout << endl;}
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 28;
const ll INF64 = 1ll << 60;
const int mod = 1000000007;
//const int mod = 998244353;
//const int mod = 100000;
struct mint
{
  ll x; // typedef long long ll;
  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++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  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;
  }

  // for prime mod
  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;
  }
};


int main()
{
  ll x, y; cin >> x >> y;
  int ans = 1;
  while(x*(1ll<<ans) <= y) ++ans;
  cout << ans << endl;
}


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

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#define ull unsigned long long
#define ld long double

template <class T>
using V = vector<T>;
template <class T>
using VV = V<V<T>>;
template <class T>
using VVV = V<V<V<T>>>;

#define rep2(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) rep2(i, 0, n)
#define rep1(i, n) rep1(i, 1, n + 1)

// #define repr(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
// #define rep1r(i, n) for (int i = ((int)(n)); i >= 1; i--)

#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()  //

#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RSORT(x) sort(rall(x));

#define INF (1e9)
#define PI (acos(-1))
#define EPS (1e-7)

// 総数を1000000007（素数）で割った余り
const long long mod = 1e9 + 7;

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

ull gcd(ull a, ull b) { return b ? gcd(b, a % b) : a; }
ull lcm(ull a, ull b) { return a / gcd(a, b) * b; }

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << std::fixed << std::setprecision(15);
    //    cout << std::setfill('0') << std::setw(2);

    long long N;
    std::cin >> N;
    std::vector<long long> X(N);
    std::vector<long long> L(N);
    for (int i = 0; i < N; i++) {
        std::cin >> X[i];
        std::cin >> L[i];
    }

    vector<pii> a(N);
    rep(i, N) {
        a[i].first = X[i] + L[i];
        a[i].second = X[i] - L[i];
    }
    sort(all(a));
    int e = -INF;
    int ans = 0;
    rep(i, N) {
        if (e <= a[i].second) {
            ans++;
            e = a[i].first;
        }
    }
    cout << ans << endl;

    return 0;
}


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

int main(){
  int n, m=0;
  cin >> n;
  vector<int> a(n), b(n);
  for(int i = 0; i < n; i++) cin >> a.at(i);

  for(int i = n-1; i > n/2; i--){
    b.at(i) = a.at(i);
    m += b.at(i);
  }
  for(int i = n/2; i > -1; i--){
    int k, sum = 0;
    k = n / (i+1) + 1;
    for(int j = 2; j < k; j++) sum += b.at((i+1)*j - 1);
    
    if(a.at(i) == sum % 2) b.at(i) = 0;
    else b.at(i) = 1;
    m += b.at(i);
  }
  cout << m << endl;
  for(int i=0; i<n; i++) if(b.at(i) != 0) cout << i+1 << " ";
  cout << endl;
}

Measured memory_bytes: 2432
N = int(input())
Fs = [[int(f) for f in input().split(' ')] for _ in range(N)]
Ps = [[int(f) for f in input().split(' ')] for _ in range(N)]



def get_price(plan):
    price = 0
    for i, F in enumerate(Fs):
        n = sum([1 for f, p in zip(F, plan)
                 if f == 1 and p == 1])
        price += Ps[i][n]
    return price

prices = []

def dfs(i, array):
    if i == 10:
        if sum(array) > 0:
            price = get_price(array)
            prices.append(price)

    else:
        array[i] = 0
        dfs(i+1, array)

        array[i] = 1
        dfs(i+1, array)


dfs(0, [0 for _ in range(10)])
print(max(prices))

Measured memory_bytes: 47580
/*
ID: zhaowei10
TASK:
LANG: C++
*/
#include <algorithm>
#include <array>
#include <climits>
#include <cmath>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

#define pb push_back
#define MOD 1000000007
#define FOR(i, j, k, l) for (s32 i = j; i < k; i += l)
#define RFOR(i, j, k, l) for (s32 i = j; i >= k; i -= l)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j, 0, 1)
#define ALL(x) x.begin(), x.end()
#define MEAN(a, b) min(a, b) + (abs(b - a) >> 1)
#define FASTIO()    \
  cin.tie(nullptr); \
  ios::sync_with_stdio(false);

typedef int64_t s64;
typedef uint64_t u64;
typedef int32_t s32;
typedef uint32_t u32;
typedef float f32;
typedef double f64;
typedef pair<s32, s32> II;
typedef pair<s64, s64> LL;
typedef vector<s32> VI;
typedef vector<II> VII;
typedef vector<char> VC;
typedef vector<VII> VVII;
typedef priority_queue<s32> PQI;
typedef priority_queue<s32, VI, greater<s32>> PQIA;
typedef priority_queue<s64> PQL;
typedef priority_queue<II> PQII;
typedef priority_queue<II, VII, greater<II>> PQIIA;
typedef priority_queue<LL> PQLL;
typedef unordered_set<s32> USI;
typedef unordered_set<s64> USL;
typedef set<II> SII;
typedef multiset<s32> MSI;

template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}

template <typename T>
inline s32 ndigits(T x) {
  s32 r = 0;
  while (x) {
    x /= 10;
    ++r;
  }
  return r;
}

int main() {
  FASTIO();

  int n;
  cin >> n;

  vector<int> p(n), q(n);
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
  }
  for (int i = 0; i < n; ++i) {
    cin >> q[i];
  }

  int a = 0;
  while (prev_permutation(p.begin(), p.end())) {
    ++a;
  }

  int b = 0;
  while (prev_permutation(q.begin(), q.end())) {
    ++b;
  }

  cout << abs(a - b);
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,a) for(int i=0;i<int(a);++i)
#define REP(i,a,b) for(int i=int(a);i<int(b);++i)
#define pb push_back
#define mp make_pair
#define F first
#define S second
using ll = long long;
using itn = int;
using namespace std;
using Graph = vector<vector<int>>;
static const long double GRATIO=(long double)(1+sqrt(5))/2;
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;
}
int main(){
    int N;
    cin>>N;
    vector<int> p(N);
    rep(i,N) cin>>p[i];
    int ans=0;
    rep(i,N){
        if(p[i]==i+1){
            int tmp=p[i];
            p[i]=p[i+1];
            p[i+1]=tmp;
            ans++;
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 640
n = int(input())
a_list = list(map(int, input().split()))
b_list = list(map(int, input().split()))

if sum(a_list) < sum(b_list):
    print(-1)
    exit()

a_sub_b = [a_list[i] - b_list[i] for i in range(n)]
insufficients = [x for x in a_sub_b if x < 0]

cnt = len(insufficients)
sum_insuf = sum(insufficients)
for x in sorted(a_sub_b, reverse=True):
    if sum_insuf >= 0:
        break
    sum_insuf += x
    cnt += 1
print(cnt)


Measured memory_bytes: 83888
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll N;
ll a[60];

bool check(const ll K) {
  ll rest = K;
  ll t = N - 1 - K;
  for(ll i = 0; i < N; ++i) {
    if ((a[i] - t + N) / (N + 1) > rest) return false;
    rest -= (a[i] - t + N) / (N + 1);
  }

  return true;
}
int main () {
  cin >> N;
  for(ll i = 0; i < N; ++i) cin >> a[i];

  ll l = 0;
  ll r = LLONG_MAX;
  ll ret = r;
  while(l <= r) {
    ll mid = l + (r - l) / 2;

    bool has = false;
    for(ll i = -N; i <= N && mid + i <= r; ++i) {
      if (mid + i < l) continue;
      if (check(mid + i)) {
        ret = min(ret, mid + i);
        r = min(r, mid + i - 1);
        has = true;
        break;
      }
    }

    if (!has) {
      l = mid + N + 1;
    }
  }
  cout << ret << endl;
}

Measured memory_bytes: 256
n = int(input())
s = str(input())
r = s.count("R")
g = s.count("G")
b = s.count("B")
total = r * g * b
for i in range(2000):
    for j in range(n-2*i):
        if j + (2*i) <= n-1:
            if s[j] != s[j+i] and s[j+i] != s[j+(2*i)] and s[j+(2*i)] != s[j]:
                total -= 1
print(total)

Measured memory_bytes: 9208
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define mii map <int, int>
#define mll map <ll, ll>
#define pii pair <int, int>
#define pll pair <ll, ll>
#define vi vector <int>
#define vd vector <double>
#define vll vector <ll>
#define fi first
#define se second
#define si set <int>
#define sll set <ll>
#define spii set <pii>
#define vs vector <string>
#define vpii vector <pair <int,int> >
#define vpll vector <pair <long long,long long> >
#define vvi vector <vector <int> >
#define vvpii vector <vector <pii > >
#define mp make_pair
#define vvll vector <vll>
#define vsi vector <si>
#define forn(i, n) for (int i = 0; i < (n); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define for1(i, n) for (int i = 1; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define MANX MAXN


const ll INFLL = 1e18;
const int MAXN = 1e6+100;
const ll INF = 1e9;
const ll mod1=1e9+7;
const ll mod2=2e9+11;


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    #ifdef LOCAL
    freopen("a.in","r",stdin);
    #endif
    int n;
    cin>>n;
    int k;
    cin>>k;
    vector <int> a(n);
    rep(i,n)
        cin>>a[i];
    while (k>0)
    {
        k--;
        vector <int> b(n);
        for (int i=0;i<n;i++)
        {
            b[max(0,i-a[i])]++;
            if (i+a[i]+1<n)
            b[i+a[i]+1]--;
        }
        int sum=0;
        bool ok=true;
        for (int i=0;i<n;i++)
        {
            sum+=b[i];
            a[i]=sum;
            if (sum!=n)
            {
                ok=false;
            }
        }
        if (ok)
            break;
    }
    for (auto to:a)
        cout<<to<<" ";


    //n=1 ?
    //recursion - matrix exponential
    //linear algebra - just a joke
    //check ios_base, MAXN, mod1 before submit
    //if debug more than 15 minutes - write stress
    //compression
}

Measured memory_bytes: 4996
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
    int cnt[4] = {};
    for (int i = 0; i < 3; i++) {
        int a, b;
        cin >> a >> b;
        cnt[--a]++;
        cnt[--b]++;
    }

    bool f = true;
    for (int x : cnt) {
        f &= !!x;
        f &= x < 3;
    }
    cout << (f ? "YES" : "NO") << endl;

    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>


using namespace std;

int const MAX_N = 100000;
int par[MAX_N]; // 親
int depth[MAX_N]; // 木の深さ
long int element[MAX_N]; // iが属する集合の要素数

// n要素で初期化
void init(int n){
    for(int i = 0; i < n; i++){
        par[i] = i;
        depth[i] = 0;
        element[i] = 1;
    }
}

// 木の根を求める
int find(int x){
    if (par[x] == x) {
        return x;
    }else{
        return par[x] = find(par[x]);
    }
}

long int size(int x){
    x = find(x);
    return element[x];
}

// xとyの属する集合を合併
void unite(int x, int y){
    x = find(x);
    y = find(y);
    if (x == y) return;

    if (depth[x] < depth[y]) {
        par[x] = y;
        element[y] += element[x]; 
    }else{
        par[y] = x;
        element[x] += element[y];
        if (depth[x] == depth[y]) depth[x]++;
    }
}

// xとyが同じ集合に属するか否か
bool same(int x, int y){
    return find(x) == find(y);
}

int main(){
    int n, m;
    cin >> n >> m;
    int a[m], b[m];
    for(int i = 0; i < m; i++){
        cin >> a[i] >> b[i];
    }
    long int ans[m];
    init(n);

    ans[m-1] = (long int)n * ((long int)n - 1) / 2;
    for(int i = m - 1; i >= 1; i--){
        if (!same(a[i] - 1, b[i] - 1)) {
            long int n1 = size(a[i] - 1);
            long int n2 = size(b[i] - 1);
            ans[i-1] = ans[i] - n1 * n2;
            unite(a[i] - 1, b[i]- 1);
        }else{
            ans[i-1] = ans[i];
        }
    }
    for(int i = 0; i < m; i++){
        cout << ans[i] << "\n";
    }
    
}

Measured memory_bytes: 4480
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
using ll = long long;
using pi = pair <ll, ll>;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	map <string, int> a;
	a["SAT"] = 1;
	a["SUN"] = 7;
	a["MON"] = 6;
	a["TUE"] = 5;
	a["WED"] = 4;
	a["THU"] = 3;
	a["FRI"] = 2;
	string x;
	cin >> x;
	cout << a[x];
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef vector<int> vei;
typedef vector<vector<int>> ve_vei;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
 
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

    int N; cin >> N;
    int sum = 0;
    vei l(N); 

    rep(i,N) {
        cin >> l[i];
        sum += l[i];
    }
    int maxl = *max_element(l.begin(),l.end());
    cout << ((2 * maxl < sum) ? "Yes" : "No") << endl;
}

Measured memory_bytes: 256
from itertools import permutations, combinations,combinations_with_replacement,product
import sys
input = sys.stdin.readline
import math

n = int(input())
town = []
for i in range(n):
    town.append(list(map(int, input().replace("\n","").split())))
townnum = [i for i in range(n)]

chklist = list(permutations(townnum))

sumval = 0.0
for i in range(len(chklist)):
    for j in range(n-1):
        sumval += math.sqrt(((town[chklist[i][j]][0] - town[chklist[i][j+1]][0])**2) + ((town[chklist[i][j]][1] - town[chklist[i][j+1]][1])**2))

print(sumval/len(chklist))

Measured memory_bytes: 46832
N, M = [int(i) for i in input().split()]
A = [int(i) for i in input().split()]
sum = 0
for item in A:
  sum += item

for i in range(0, M):
  max = 0
  for item in A:
    if max < item:
      max = item
  if max >= sum/(4*M):
    A.remove(max)

if len(A) == N-M:
  print("Yes")
else:
  print("No")

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

int main(){
    int n;
    cin >> n;
    while (n!=0){
        vector<int> w(n);
        for (int i = 0; i < n; i++){
            cin >> w[i];
        }
        vector<vector<bool>> check(n, vector<bool>(n));
        for (int i=0; i<n-1; i++){
            if (abs(w[i+1]-w[i])<=1) check[i][i+1]=true;
        }
        for (int i=3; i<n; i+=2){
            for (int j=0; j<n-i; j++){
                for (int k=j+1; k<j+i; k++){
                    if (!check[j][j+i] && check[j][k] && check[k+1][j+i]){
                        check[j][j+i]=true;
                        break;
                    }
                }
                if (!check[j][j+i] && abs(w[j]-w[j+i])<=1 && check[j+1][j+i-1]) check[j][j+i]=true;
            }
        }
        vector<int> dp(n);
        for (int i=0; i<n; i++){
            for (int j=0; j<n; j++){
                if (check[i][j]){
                    if (i!=0) dp[j]=max(dp[j],dp[i-1]+j-i+1);
                    else dp[j]=j-i+1;
                }
            }
            if (i!=0) dp[i]=max(dp[i],dp[i-1]);
        }
        cout << dp[n-1] << endl;
        cin >> n;
    }
}


Measured memory_bytes: 3124
# -*- coding: utf-8 -*-
n = int(input())
if n == 1:
    print(0)
    exit()

a = []

while n % 2 == 0:
    a.append(2)
    n //= 2
f = 3
while f * f <= n:
    if n % f == 0:
        a.append(f)
        n //= f
    else:
        f += 2
if n != 1:
    a.append(n)

cnt = 0
pre = None
current_pow = 1
target_pow = 1

for i in a:
    if pre == None or pre != i:
        cnt += 1
        pre = i
        current_pow = 0
        target_pow = 2
        continue

    current_pow += 1

    if current_pow == target_pow:
        cnt += 1
        current_pow = 0
        target_pow += 1

print(cnt)
    

Measured memory_bytes: 9220
from collections import deque

N = int(input())
d = {i:[] for i in range(1, N+1)}
q = deque([(1, "a")])

while q:
    pos, s = q.popleft()
    if pos == N+1:
        break
    d[pos].append(s)
    size = len(set(s))
    for i in range(size+1):
        q.append((pos+1, s+chr(97+i)))

for i in d[N]:
    print(i)

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

int N;
long long a, b, res;

bool check (long long);

int main () {
    scanf("%d", &N);
    for (int i = 1;i <= N; ++i) {
	scanf("%lld%lld", &a, &b);
	long long m = (long long)std :: sqrt(a * b);
	res = 2 * m - 1;
	if (m * m == a * b && a != b) res--;
	if (m * (m + 1) >= a * b) res--;
	printf("%lld\n", res);
    }
    return 0;
}


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

int main() {
  long n,a,b,x,ans;
  cin >>n>>a>>b;

  x = n/(a+b);
  ans = x*a+min(n-x*(a+b),a);
  
  cout << ans << endl;  
  return 0;
}

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

#define ff        first
#define ss        second
#define int       long long
#define pb        push_back
#define mp        make_pair
#define vi        vector<int>
#define pii       pair<int,int>
#define mii       map<int,int>
#define w(x)      int x; cin>>x; while(x--)
#define all(x)      (x).begin(),(x).end()
#define rep(i,a,b)  for(int i=(a);i<(b);i++)
#define mod       1000000007

int dp[100001];

void c()
{
    // ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
}

int Mincost(vi& h,int n)
{
    if(n==0)
        return 0;
    if(dp[n]!=-1)
        return dp[n];

    return dp[n]=min(Mincost(h,n-1)+abs(h[n]-h[n-1]),(n>=2?Mincost(h,n-2)+abs(h[n]-h[n-2]):INT_MAX) );
}

int32_t main() {

    //c();
    memset(dp,-1,sizeof(dp));
    int n; cin>>n;
    vi a(n);
    rep(i,0,n) cin>>a[i];

    cout<<Mincost(a,n-1);            
    return 0;
}

Measured memory_bytes: 4096
#include<iostream>
#include<algorithm>

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

int main(void){
	int a;
	while(cin>>a){
	
	long long int sum=1;
	loop(i,1,a+1)sum*=i;
	cout<<sum<<endl;
	}
	return 0;
}

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

using namespace std;
#define sqr(x) ((x)*(x))
#define cube(x) ((x)*(x)*(x))
#define GCD(a, b) __gcd(a, b)
#define LCM(a, b) ((a)*(b)/GCD(a,b))
#define PI (3.141592653589793238462643383279502884197169399375105820974944)
#define MP make_pair
#define n1 first
#define n2 second
#define ALL(x) (x).begin(), (x).end()
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define PDB pair<db,db>
#define SI set<int>
#define SL set<ll>
#define MS multiset
#define MSI multiset<int>
#define MSLL multiset<ll>
#define PB push_back
#define PF push_front
#define VI vector<int>
#define VPI vector<pair<int,int>>
#define VLL vector<ll>
#define VS vector<string>
#define SZ(x) ((int)x.size())

typedef long long ll;

typedef unsigned long long ull;
typedef long double ld;
typedef double db;
const db eps = 0.000001;
const int INF = 1000000007;
const ll LINF = 1000000000000000555;
const int N = 450555;
const int M = 1155;

void solve() {
    ll a,v,b,w,t;
    cin >> a >> v >> b >> w >> t;

    if (abs(b-a) <= t*(v-w)){
        cout << "YES";
    } else cout << "NO";

}

int main() {
    ios_base::sync_with_stdio(false);
#ifdef dxz05
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#else

#endif

    int T = 1;
    //cin >> T;

    while (T--) {
        solve();
    }

    return 0;
}

Measured memory_bytes: 3640
#include<bits/stdc++.h>
using namespace std;
int main(){
  int H,W;
  while(true){
    cin >>H >>W;
    if(H==0&&W==0)break;
    for(int j=0; j<H; j++){
      for(int i=0; i<W; i++){
        if((i+j)%2==0)cout<<"#";
        else cout<<".";
      }
    cout <<endl;
  }
  cout <<endl;
  }
  return 0;
}  


Measured memory_bytes: 3092
#include <bits/stdc++.h>
using namespace std;
int main() {
    size_t n;
    cin >> n;
    vector<int> v( n );
    for ( size_t i = 0; i < n; ++i )
        cin >> v.at( i );
    sort( v.begin(), v.end() );
    reverse( v.begin(), v.end() );
    int c = 0, t = 101;
    for ( size_t i = 0; i < n; ++i ) {
        if ( t != v.at( i ) )
            ++c;
        t = v.at( i );
    }
    cout << c;
}

Measured memory_bytes: 256
s=str(input())
t=str(input())
n=len(s)
m=len(t)
if m-1!=n:
    print('No')
else:
    k=1
    for i in range (n):
        if s[i]!=t[i]:
            k=0
    if k==0:
        print('No')
    else:
        print('Yes')



Measured memory_bytes: 9056
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>
#include <deque>

using namespace std;

#define mod 1000000007
#define pi atan(1) * 4
int swapresult[100001][61];

int main()
{
	int n;
	cin >> n;
	int x[100001];
	for(int i = 0; i < n; i++){
		cin >> x[i];
	}
	long long int m, k;
	cin >> m >> k;
	int a[100001];
	for(int i = 0; i < m; i++){
		cin >> a[i];
		a[i]--;
	}
	int dy[100001];
	for(int i = 0; i < n - 1; i++){
		dy[i] = x[i + 1] - x[i];
	}
	for(int i = 0; i < n; i++){
		swapresult[i][0] = i;
	}
	for(int i = 0; i < m; i++){
		swap(swapresult[a[i]][0], swapresult[a[i] - 1][0]);
	}
	for(int i = 0; i < 60; i++){
		for(int j = 0; j < n; j++){
			swapresult[j][i + 1] = swapresult[swapresult[j][i]][i];
		}
	}
	for(int i = 60; i >= 0; i--){
		long long int tmp = pow(2, i);
		if(k >= tmp){
			k -= tmp;
			int newdy[100001];
			for(int j = 0; j < n; j++){
				newdy[j] = dy[swapresult[j][i]];
			}
			for(int j = 0; j < n; j++){
				dy[j] = newdy[j];
			}
		}
	}
	printf("%.10f\n", x[0] + 0.0);
	double now = x[0] + 0.0;
	for(int i = 0; i < n - 1; i++){
		printf("%.10f\n", now + (double)dy[i]);
		now += (double)dy[i];
	}
	return 0;
}

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

long long int modby=1000000007;

int main(){
    long long int n,i,mod=1;
    scanf("%lld",&n);

    for(i=1;i<=n;i++)
        mod=((mod%modby)*(i%modby))%modby;

    printf("%lld\n",mod);

    return 0;
}



Measured memory_bytes: 128
#include <algorithm>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map> //pair is also included in this library
#include <queue>
#include <stack>
#include <string>
#include <vector>

#define REP(i, s, n) for(int i = (int)(s); i < (int)(n); i++)

using namespace std;

typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PII;

//prefer define statement
//for reason that const int ver. of INF will raise a silly warning (unused variable)
#define INF (INT_MAX/3)
//const int INF = INT_MAX/3;

/*------------------------------------------------------------------------------*/

int main(){
  int N, K;

  cin >> N >> K;

  int ans = K;

  REP(i, 1, N){
    ans *= K-1;
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define M 100005
int n,m;
vector<int>v1[M],p1[M],v2[M],p2[M];
bool mrk[M];
int num[M];

int fun1(int u)
{
    mrk[u]=1;
    int l=v1[u].size();
    int ck=1,c;
    for(int i=0; i<l; i++)
    {
        if(mrk[v1[u][i]]==0)
        {
            num[v1[u][i]]=num[u]+p1[u][i];
            c=fun1(v1[u][i]);
            if(c==0)ck=0;
        }
        else{
            if(num[v1[u][i]]-num[u]!=p1[u][i])ck=0;
        }
    }

    l=v2[u].size();
    for(int i=0; i<l; i++)
    {
        if(mrk[v2[u][i]]==0)
        {
            num[v2[u][i]]=num[u]-p2[u][i];
            c=fun1(v2[u][i]);
            if(c==0)ck=0;
        }
        else{
            if(num[u]-num[v2[u][i]]!=p2[u][i])ck=0;
        }
    }

    return ck;

}
bool ok[M];
int main()
{
    int u,v,w;
    scanf("%d %d", &n, &m);
    while(m--)
    {
        scanf("%d %d %d", &u, &v, &w);
        v1[u].push_back(v);
        p1[u].push_back(w);

        v2[v].push_back(u);
        p2[v].push_back(w);
    }
    int ck=1,c;
    for(int i=1; i<=n; i++)
    {
        if(mrk[i]==0)
        {
            c=fun1(i);
            if(c==0)ck=0;
        }
    }
//    for(int i=1; i<=n; i++)
//    {
//        printf("== %d %d\n",i,num[i]);
//    }
    if(ck==1)printf("Yes\n");
    else printf("No\n");
}


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

void slove(int year, int month, int day){
	if(year < 1868 && month <= 9 && day <= 7) cout << "pre-meiji" << endl;
	else if (year == 1868 && month < 9) cout << "pre-meiji" << endl;
	else if (year == 1868 && month == 9 && day < 8) cout << "pre-meiji" << endl;
	else if (year < 1912) cout << "meiji " << year - 1868 + 1 << " " <<  month << " " << day << endl;
	else if (year == 1912 && month < 7) cout << "meiji " << year - 1868 + 1 << " " <<  month << " " << day << endl;
	else if (year == 1912 && month == 7 && day < 30) cout << "meiji " << year - 1868 + 1 << " " <<  month << " " << day << endl;
	else if (year < 1926) cout << "taisho " << year - 1912 + 1 << " " << month << " " << day << endl;
	else if (year == 1926 && month < 12) cout << "taisho " << year - 1912 + 1 << " " << month << " " << day << endl;
	else if (year == 1926 && month == 12 && day < 25) cout << "taisho " << year - 1912 + 1 << " " << month << " " << day << endl;
	else if (year < 1989) cout << "showa " << year - 1926 + 1 << " " << month << " " << day << endl;
	else if (year == 1989 && month < 1) cout << "showa " << year - 1926 + 1 << " " << month << " " << day << endl;
	else if (year == 1989 && month == 1 && day < 8) cout << "showa " << year - 1926 + 1 << " " << month << " " << day << endl;
	else cout << "heisei " << year - 1989 + 1 << " " << month << " " << day << endl;
}

int main(){
	int y,m,d;
	while(cin >> y >> m >> d)
		slove(y,m,d);
	return 0;
}

Measured memory_bytes: 0
#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream> 
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <fstream>
using namespace std;
#define eps 0.000000001
#define LONG_INF 10000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define REP(i,n) for(long long i = 0;i < n;++i)
int ans[1000] = {};
int main() {
	int n, m;
	cin >> n >> m;
	REP(i, m) {
		int a, b;
		cin >> a >> b;
		ans[a]++;
		ans[b]++;
	}
	for (int i = 1;i <= n;++i) {
		cout << ans[i] << endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

#define INF 10000000

int main(void){
  double low = INF, high = 0, mt;

  while(scanf("%lf", &mt) != EOF){
    if(high < mt)  high = mt;
    if(low > mt)  low = mt;
  }
  printf("%f\n", high-low);
  return 0;
}

Measured memory_bytes: 648
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.awt.Point;
import java.util.*;
   
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String str;
while(!(str=br.readLine()).equals("0 0")){
String[] value=str.split(" ");
int h=Integer.parseInt(value[0]);
int w=Integer.parseInt(value[1]);
char[][] map=new char[h][w];
for(int i=0;i<h;i++){
map[i]=br.readLine().toCharArray();
}
Deque <Point> fifo  =new  ArrayDeque<Point>();
  int ans=0;
   for(int m=0;m<h;m++){
   for(int n=0;n<w;n++){
if(map[m][n]!='.'){
ans++;
Point p = new Point(n,m);
fifo.addLast(p);
while(fifo.peekFirst()!=null){
p=fifo.pollFirst();
int x=p.x;
 int y=p.y;
  char crop = map[y][x];
map[y][x]='.';
 int [] dx ={0,1,0,-1};
 int [] dy ={1,0,-1,0};                   
     for(int i=0;i<4;i++){
      int nx =x+dx[i];
   int ny =y+dy[i];
if(nx>=0&&nx<w&&ny>=0&&ny<h&&map[ny][nx]==crop&&map[ny][nx]!='.'){
          Point np = new Point();
                        np.x=nx;
                        np.y=ny;
                     fifo.addLast(np);                       
}
}
}
}
}
}System.out.println(ans);
}
}
}

Measured memory_bytes: 25888
n, m = map(int, input().split())
cards = [0] * n
for i in range(m):
    l, r = map(lambda x: int(x)-1, input().split())
    cards[l] += 1
    if r+1 < n:
        cards[r+1] -= 1

from itertools import accumulate
ac = list(accumulate(cards))

ans = 0
for a in ac:
    if a == m:
        ans += 1
print(ans)


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

#define MOD 998244353

long long n;

int sum(int x){
	if(x == 0) return 0;
	return x % 10 + sum(x / 10);
}

int main(){
	cin >> n;

	int mins = 1000000000;
	for(int a = 1; a < n; a++){
		int b = n - a;
		mins = min(mins, sum(a) + sum(b));
	}
	cout << mins << "\n";
}

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

#define rep(i,a) for(int i=0; i<a; i++)
#define rrep(i,a) for(int i=a; i>=0; i--)
#define loop3(i,j,k,a) for(int i=0; i<a; i++)for(int j=0; j<a; j++)if(i!=j)for(int k=0; k<a; k++)if(i!=k&&j!=k)
#define loop4(i,j,k,l,a) for(int i=0; i<a; i++)for(int j=0; j<a; j++)if(i!=j)for(int k=0; k<a; k++)if(i!=k&&j!=k)for(int l=0; l<a; l++)if(i!=l&&j!=l&&k!=l)
#define rep1(i,a) for(int i=1; i<=a; i++)

#define scnd1(a) scanf("%d", &a)
#define scnd2(a,b) scanf("%d%d", &a,&b)
#define scnd3(a,b,c) scanf("%d%d%d", &a,&b,&c)
#define scnd4(a,b,c,d) scanf("%d%d%d%d", &a,&b,&c,&d)

#define cin1(a) cin >> a;
#define cin2(a,b) cin >> a >> b;
#define cin3(a,b,c) cin >> a >> b >> c;
#define cin4(a,b,c,d) cin >> a >> b >> c >> d;
#define cout1(a) cout << a << endl;
#define cout2(a,b) cout << a << " " << b << endl;
#define cout3(a,b,c) cout << a << " " << b << " " << c << endl;
#define cout4(a,b,c,d) cout << a << " " << b << " " << c << " " << d << endl;
#define prtd1(a) printf("%d\n", a)
#define prtd2(a,b) printf("%d %d\n", a,b)
#define prtd3(a,b,c) printf("%d %d %d\n", a,b,c)
#define prtd4(a,b,c,d) printf("%d %d %d %d\n", a,b,c,d)

#define mem(a,n) memset( a, n, sizeof(a))
#define INF 1000000000
typedef long long ll;

int nums[100009];

int main() {
    int N;
    cin >> N;
    
    mem(nums,0);
    
    rep(i,N){
        int n;
        cin >> n;
        nums[n]++;
    }
    
    int ans=0;
    for(int i=1; i<99999;i++){
        if( ans < nums[i-1] + nums[i] + nums[i+1]) ans = nums[i-1] + nums[i] + nums[i+1];
    }
    
    cout<<ans<<endl;
}

Measured memory_bytes: 640
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <utility>
#include <set>

#define N 100000

using namespace std;

typedef pair<int, int> P;

set<int> stt;
map<int, P> mpp;

void makePr()
{
  vector<int> vec;
  bool pr[N];

  fill(pr, pr+N, true);
  pr[0] = pr[1] = false;
  for(int i = 2; i < N; i++)
    if(pr[i]){
      vec.push_back(i);
      for(int j = i+i; j < N; j+=i) pr[j] = false;
    }

  map<int, bool> mpp2;
  for(int q = 0; q < vec.size(); q++)
    for(int p = q; p < vec.size(); p++){
      if(vec[p] >= 1000 && vec[q] >= 1000) break;
      int t = vec[p]*vec[q];
      if(t >= N) break;
      if(!mpp2[t]){
	stt.insert(t);
	mpp2[t] = true;
	mpp[t] = P(vec[p], vec[q]);
      } else {
	if((double)mpp[t].first/mpp[t].second > (double)vec[p]/vec[q]) mpp[t] = P(vec[p], vec[q]);
      }
    }

  return ;
}

int main()
{
  int m, a, b;
  P p, q;
  makePr();

  while(cin>>m>>a>>b && (m+a+b)){
    p = P(0, 1);
    for(set<int>::iterator it = stt.begin(); it != stt.end() && *it <= m; it++){
      q = mpp[*it];
      if(p.first == 0 || a*q.first <= b*q.second) p = q;
    }

    cout << p.second << " " << p.first << endl;
  }

  return 0;
}

Measured memory_bytes: 3056
import sys

def isNum(a) :
    try:
        int(a)
    except:
        return False
    return True

for line in sys.stdin:
    stack = []
    task = line.strip().split(" ") ;
    for i in range(0, len(task) ) :
        if isNum(task[i]) :
            stack.append(task[i])
        elif len(stack) != 0 :
            stack.append( str( eval( stack.pop(-2) + task[i] + stack.pop(-1) ) ) )
    print("{:6f}".format(float(stack[0])))


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

class Dice
{
private:
    int l1, l2, l3, l4, l5, l6;
public:
    Dice(int l1, int l2, int l3, int l4, int l5, int l16);
    void n();
    void w();
    void e();
    void s();
    void print();
};

Dice::Dice(int a, int b, int c, int d, int e, int f)
{
    l1 = a;
    l2 = b;
    l3 = c;
    l4 = d;
    l5 = e;
    l6 = f;
}

void Dice::n()
{
    int temp;

    temp = l1;
    l1 = l2;
    l2 = l6;
    l6 = l5;
    l5 = temp;
}

void Dice::w()
{
    int temp;

    temp = l1;
    l1 = l3;
    l3 = l6;
    l6 = l4;
    l4 = temp;
}

void Dice::e()
{
    int temp;

    temp = l1;
    l1 = l4;
    l4 = l6;
    l6 = l3;
    l3 = temp;
}

void Dice::s()
{
    int temp;

    temp = l1;
    l1 = l5;
    l5 = l6;
    l6 = l2;
    l2 = temp;
}

void Dice::print()
{
    cout << l1 << endl;
}

int main()
{
    int l1, l2, l3, l4, l5, l6;
    string str;

    cin >> l1 >> l2 >> l3 >> l4 >> l5 >> l6 >> str;

    Dice dice(l1, l2, l3, l4, l5, l6);

    for (int i = 0; i < (int)str.size(); i++) {
        if (str[i] == 'N') {
            dice.n();
        } else if (str[i] == 'E') {
            dice.e();
        } else if (str[i] == 'W') {
            dice.w();
        } else {
            dice.s();
        }
    }
    dice.print();

    return 0;
}

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

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

int main(void) {
	int n, m, i,c=0;
	cin >> n >> m;
	vector<int> x(m),v(m-1);
	rep(i, m) {
		cin >> x[i];
	}
	sort(x.begin(), x.end());
	rep(i, m - 1) {
		v[i] = x[i + 1] - x[i];
	}
	sort(v.begin(),v.end());

	rep(i, x.size() - n) {
		c += v[i];
	}
	cout << c << endl;
	return 0;
}

Measured memory_bytes: 4032
def solve(string):
    n, m, *a = map(int, string.split())
    needs = {i + 1: n for i, n in enumerate(map(int, "2 5 5 4 5 6 3 7 6".split()))}
    if 2 in a and 5 in a or 2 in a and 3 in a:
        a.remove(2)
    if 3 in a and 5 in a:
        a.remove(3)
    if 6 in a and 9 in a:
        a.remove(6)
    a = sorted(a, key=lambda x: needs[x])
    index = 0
    base = str(a[0]) * (n // needs[a[0]])
    n %= needs[a[0]]
    while n > 0:
        use = [_b for _b in a if needs[_b] <= needs[a[0]] + n]
        if len(use) == 1:
            base = base[:-1]
            n += needs[a[0]]
            continue
        flag = max(use) == a[0]
        tmp_n = use[-1] if flag else max(use)
        tmp_c = n // (needs[tmp_n] - needs[a[0]])
        if flag:
            base = base[:-tmp_c] + str(tmp_n) * tmp_c
        else:
            base = base[:index] + str(tmp_n) * tmp_c + base[index + tmp_c:]
            index += tmp_c
        n -= (needs[tmp_n] - needs[a[0]]) * tmp_c
    return base


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

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

#define INF 2000000000

#define min(x,y) (x < y) ? x : y

int main(){
  int n;
  int b[100004];
  int c[100004];
  int i;
  int sum = 0;

  scanf("%d", &n);

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

  b[0] = INF;
  b[n] = INF;

  for(i = 1;i <= n;i++){
    c[i] = min(b[i - 1],b[i]);
    sum += c[i];
  }

  printf("%d\n", sum);

  return 0;
}


Measured memory_bytes: 128
n = int(input())
A = [0] * n
B = [0] * n
C = [0] * n
for i in range(n):
    a, b, c = map(int, input().split())
    A[i] = a
    B[i] = b
    C[i] = c

def chmax(a, b):
    if a > b:
        return a
    else:
        return b

dp = [[0] * 3 for _ in range(n + 10) ]
for i in range(n):
    dp[i + 1][0] = chmax(dp[i][1] + A[i], dp[i][2] + A[i])
    dp[i + 1][1] = chmax(dp[i][0] + B[i], dp[i][2] + B[i])
    dp[i + 1][2] = chmax(dp[i][0] + C[i], dp[i][1] + C[i])

print(max(dp[n]))

Measured memory_bytes: 61656
using System;


namespace ConsoleApplication13
{
    class Program
    {
        static void Main(string[] args)
        {
            string n = Console.ReadLine();
            string[] s = Console.ReadLine().Split(' ');

            int o = int.Parse(n);
            int min=1000000, max= -1000000;
            long sum=0;
            for (int i = 0; i < o; i++)
            {
                int p = int.Parse(s[i]);
                if (min > p)
                {
                    min = p;
                }
                if (max < p)
                {
                    max = p;
                }
                sum += p;
                
            }
            Console.WriteLine(min + " " + max + " " + sum);
            
        }
    }
}

Measured memory_bytes: 9952
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define MOD 1000000007
using namespace std;

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

int main() {
    int N;
    cin >> N;
    int rate[3][2];
    for (int i = 0; i <= 1; i++) {
        cin >> rate[0][i] >> rate[1][i] >> rate[2][i];
    }

    long long maximum = N;

    vector<long long> dp1(N + 1, 0);
    int X = 0;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j <= N; j++) {
            if (j >= rate[i][X]) {
                dp1[j] = max(
                    dp1[j],
                    dp1[j - rate[i][X]] + rate[i][1 - X]
                );
            }
        }
    }

    for (int i = 0; i <= N; i++) {
        maximum = max(maximum, dp1[i] + N - i);
    }

    N = maximum;

    vector<long long> dp2(N + 1, 0);
    X = 1;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j <= N; j++) {
            if (j >= rate[i][X]) {
                dp2[j] = max(
                    dp2[j],
                    dp2[j - rate[i][X]] + rate[i][1 - X]
                );
            }
        }
    }

    for (int i = 0; i <= N; i++) {
        maximum = max(maximum, dp2[i] + N - i);
    }

    cout << maximum << endl;

    return 0;
}

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

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

	char b;
	cin >> b;
	if (b == 'A')cout << 'T' << '\n';
	if (b == 'C')cout << 'G' << '\n';
	if (b == 'G')cout << 'C' << '\n';
	if (b == 'T')cout << 'A' << '\n';
	return 0;
}

Measured memory_bytes: 256
// *********************************************************************************
// *                        MURTAZA MUSTAFA KHUMUSI                                *
// *                        NIT-DGP,CSE - 2019-2023                                *
// *********************************************************************************

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MOD 1000000007;
#define loop(i, a, n) for (int i = a; i < n; i++)
#define loop1(i, b, n) for (int i = b; i <= n; i++)
#define loopit(a) for (auto it = a.begin(); it != a.end(); it++)
#define ms(a, b) memset(a, b, sizeof(a))
#define pb(a) push_back(a)
#define MP make_pair
#define pi pair<int, int>
#define ff first
#define ss second
#define bloop(i, a, b) for (int i = a; i > b; i--)
#define bloop1(i, a, b) for (int i = a; i >= b; i--)
#define PQ priority_queue<int> pq;
#define MPQ priority_queue<pi, vector<int>, greater<pi>> mpq;
#define io                        \
    ios_base::sync_with_stdio(0); \
    cin.tie(NULL);
const int maxm = 100001;

void solve()
{

    int d,s,k;
    cin>>d>>s>>k;

    if(s*k<d)
    cout<<"No"<<"\n";
    else
    cout<<"Yes"<<"\n";

}

int main()
{
    io;

    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    solve();
    
    return 0;
}


Measured memory_bytes: 3632
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
N = 3
rows = [list(map(int,input().split())) for _ in range(N)]
arr = np.array(rows)

b1 = arr[0] -arr[0][0]
b2 = arr[1] -arr[1][0]
b3 = arr[2] -arr[2][0]
if not (list(b1)==list(b2)==list(b3)):
    print("No")
    exit()

arr = arr.T
a1 = arr[0]-arr[0][0]
a2 = arr[1]-arr[1][0]
a3 = arr[2]-arr[2][0]
if not(list(a1)==list(a2)==list(a3)):
    print("No")
    exit()

print("Yes")
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))


Measured memory_bytes: 12476
#include <iostream>
//#include <iomanip>
#include <string>
//#include <vector>
//#include <algorithm>
//#include <utility>
//#include <set>
//#include <map>
//#include <queue>
//#include <bitset>
//#include <math.h>
using namespace std ;
//using ll = long long ;
//using ld = long double ;
//using vll = vector<ll> ;
//using vvll = vector<vll> ;
//using vc = vector<char> ;
//using vvc = vector<vc> ;
//using vb = vector<bool> ;
//using vvb = vector<vb> ;
//using pll = pair<ll,ll> ;

//ll mod = 1000000007 ;
//long double pie = acos(-1) ;

//string yorn(bool a){if(a) return"Yes" ; return "No" ;}
//string YorN(bool a){if(a) return"YES" ; return "NO" ;}
//ll gcd(long long a,long long b){if(b==0) return a ; return gcd(b,a%b) ;}
//ll lcm(long long a,long long b){return a/gcd(a,b)*b ;}
//ll sa(long long a,long long b){if(a>b) return a-b ; return b-a ;}
//void mysort(vector<long long> &a){sort(a.begin(),a.end()) ;}
//void myrev(vector<long long> &a){reverse(a.begin(),a.end()) ;}

int main(){
	string s ; cin >> s ;
	int w ; cin >> w ;
	for(int i=0;i<s.size();i+=w){
		cout << s.at(i) ;
	}
	cout << endl ;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int n; double bx, by; pair<double, double> p[100009];
int main() {
	scanf("%d", &n);
	double sq = 0.28, cq = 0.96;
	for(int i = 0; i < n; i++) {
		scanf("%lf%lf", &bx, &by);
		double ex = bx * cq - by * sq;
		double ey = bx * sq + by * cq;
		p[i] = make_pair(ex, ey);
	}
	sort(p, p + n);
	double ret = 1.0e+10;
	for(int i = 0; i < n; i++) {
		for(int j = i + 1; j < n; j++) {
			double dx = p[i].first - p[j].first;
			if(dx * dx > ret) break;
			double dy = p[i].second - p[j].second;
			double dist = dx * dx + dy * dy;
			if(ret > dist) ret = dist;
		}
	}
	printf("%.15lf\n", sqrt(ret));
	return 0;
}

Measured memory_bytes: 4752
//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//Abdulhamid Han
//Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

typedef long long int lo;
typedef pair< int,int > PII;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(lo i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)

const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 500005;
const lo mod = 1000000007;

lo n,m,b[li],a[li],k,flag,t,cev1;
lo cev;
string s;
vector<int> v;

int main(void){
	scanf("%lld %lld %lld %lld",&n,&m,&k,&t);
	lo at=n/k;
	if(n%k!=0)at++;
	at*=k;
	lo at1=m/k;
	at1*=k;
	if(at1<at)cev=0;
	else{
		cev=at1-at;
		cev/=k;
		cev++;
	}
	at=n/t;
	if(n%t!=0)at++;
	at*=t;
	at1=m/t;
	at1*=t;
	if(at1<at)cev1=0;
	else{
		cev1=at1-at;
		cev1/=t;
		cev1++;
	}
	cev=cev+cev1;
	cev1=0;
	t=t*k/__gcd(t,k);
	at=n/t;
	if(n%t!=0)at++;
	at*=t;
	at1=m/t;
	at1*=t;
	if(at1<at)cev1=0;
	else{
		cev1=at1-at;
		cev1/=t;
		cev1++;
	}
	cev-=cev1;
	printf("%lld\n",(m-n+1)-cev);
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int abs(int x){
  if(x < 0)
    return -x;

  return x;
}

vector <long long> a(300000);

int main()
{
  long long n,min = 0,h;

  for(int i = 0;i < 300000;i++)
    a[i] = 1000000000;

  cin >> n;

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

  sort(a.begin(),a.end());

  h = a[n/2];
  
  for(int j = 0;j < n;j++){
      int c;
      c = a[j] - h;
      c = abs(c);
      min += c;
  }
    

  cout << min << endl;

  return 0;
}
  


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

int main(void){
    int n;
    cin >> n;
    vector<int> arr(n-1);
    for(int i=0;i<n-1;i++) cin >> arr[i];

    int ans = arr[0];
    for(int i=0;i<n-2;i++){
        ans += min(arr[i], arr[i+1]);
    }
    ans += arr[n-2];
    
    cout << ans << endl;
}

Measured memory_bytes: 256
(defun solve (n k q ans)
  (let ((scores (make-array n :initial-element (- k q) :element-type 'fixnum)))
    (loop for a in ans
          unless (< 0 (aref scores (1- a)))
          do (incf (aref scores (1- a))))
    (loop for score across scores
          if (<= score 0)
          do (format t "No~%")
          else
          do (format t "Yes~%"))))

#-swank
(let* ((n (read))
       (k (read))
       (q (read))
       (ans (loop repeat q collect (read))))
  (solve n k q ans))


Measured memory_bytes: 60256