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

#define ll          long long
#define ull         unsigned long long
#define pb          push_back
#define pii         pair<int,int>
#define pll         pair<long,long>
#define vi          vector<int>
#define vll         vector<ll>
#define vii         vector<pii>
#define Mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define rall(a)      (a).rbegin(),(a).rend()
#define ff           first
#define ss           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define mod        1000000007
//#define mod        998244353
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rem(i,a,b)  for(int i=a;i>b;i--)
#define mp(a,b)     make_pair(a,b)
#define INF         numeric_limits<ll>::max();
#define NINF        numeric_limits<ll>::min();
#define vvi(a,b,name)    vector<vector<int>> name(a,vector<int>(b,-1))
const long double pi=3.14159265359;
inline ll add(ll a,ll b,ll m){
    if((a+b)>=m)return (a+b)%m;
    return a+b;
}
inline ll mul(ll a,ll b,ll m){
    if((a*b)<m)return a*b;
    return (a*b)%m;
}



void solve(){
    int n,m;cin>>n>>m;
    ll su=0;
    rep(i,0,m){
        int temp;
        cin>>temp;
        su+=temp;
    }
    if(su<=n){
        cout<<n-su<<endl;
    }
    else cout<<-1<<endl;

}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    long t=1;
    //cin>>t;
    while(t--){
        solve();
    }
    return 0;
}


Measured memory_bytes: 3612
#include<bits/stdc++.h>
using namespace std;
const int maxn=2000009;


int nn=1;
int ch[maxn][26];
int siz[maxn][26];

void insert(string s){
	int len=s.size(),x=1;
	for(int i=len-1;i>0;--i){
		int c=s[i]-'a';
		if(!ch[x][c])ch[x][c]=++nn;
		x=ch[x][c];
	}
	siz[x][s[0]-'a']++;
}

int n;
string s[maxn];
int cmp(string s,string t){
	return s.size()<t.size();
}

int cnt[26];
long long ans;
void calc(int x){
	for(int i=0;i<26;++i){
		if(cnt[i])ans+=siz[x][i];
	}
}
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;++i)cin>>s[i];
	sort(s+1,s+1+n,cmp);
	
	for(int k=1;k<=n;++k){
		int len=s[k].size(),x=1;
		memset(cnt,0,sizeof(cnt));
		for(int i=0;i<len;++i)cnt[s[k][i]-'a']++;
		calc(1);
		for(int i=len-1;i>=0;--i){
			int c=s[k][i]-'a';
			if(!ch[x][c])ch[x][c]=++nn;
			x=ch[x][c];
			--cnt[s[k][i]-'a'];
			calc(x);
		}
		insert(s[k]);
	}
	
	printf("%lld\n",ans);
	return 0;
}

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

int main() {
	int a, b;
	cin >> a >> b;
	
	if ( a < b )
		cout << "a < b\n";
	else if ( a > b )
		cout << "a > b\n";
	else
		cout << "a == b\n";
		
	// your code goes here
	return 0;
}

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

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360)

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

typedef long long ll;

void solve(long long N, std::vector<long long> W) {
    ll ans = INF;
    ll l = 0;
    ll r = 0;
    rep(i, N) { r += W[i]; }
    rep(i, N) {
        l += W[i];
        r -= W[i];
        ans = min(ans, abs(l - r));
    }
    cout << ans << endl;
}

int main() {
    long long N;
    scanf("%lld", &N);
    std::vector<long long> W(N);
    for (int i = 0; i < N; i++) {
        scanf("%lld", &W[i]);
    }
    solve(N, std::move(W));
    return 0;
}


Measured memory_bytes: 256
//https://beta.atcoder.jp/contests/tenka1-2018/tasks/tenka1_2018_c
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
#ifdef BTK
#define DEBUG if(1)
#else
#define CIN_ONLY if(1)
struct cww {cww() {CIN_ONLY{ios::sync_with_stdio(false); cin.tie(0);}}}star;
#define DEBUG if(0)
#endif
#define ALL(v) (v).begin(),(v).end()
#define REC(ret, ...) std::function<ret (__VA_ARGS__)>
template <typename T>inline bool chmin(T &l, T r){bool a = l>r; if (a)l = r; return a;}
template <typename T>inline bool chmax(T &l, T r){bool a = l<r; if (a)l = r; return a;}
template <typename T>istream& operator>>(istream &is, vector<T> &v){for (auto &it : v)is >> it;return is;}
class range {private: struct I { int x; int operator*() { return x; }bool operator!=(I& lhs) { return x<lhs.x; }void operator++() { ++x; } }; I i, n;public:range(int n) :i({ 0 }), n({ n }) {}range(int i, int n) :i({ i }), n({ n }) {}I& begin() { return i; }I& end() { return n; }};

using V=vector<LL>;
LL sum(V a){
    int n = a.size();
    LL ret=0;
    for(int i:range(n-1)){
        ret+=abs(a[i]-a[i+1]);
    }
    return ret;
}
int main(){
    int N;
    cin>>N;
    V a(N);
    cin>>a;
    sort(ALL(a));
    V argret=a;
    if(N%2==0){
        for(int i:range(N)){
            if(i<N/2){
                argret[i*2+1]=a[i];
            }
            else{
                int id = i-N/2;
                argret[id*2]=a[i];
            }
        }
        //for(int i:range(N))cout<<argret[i]<<endl;
    }
    else{
        {
            V p,m;
            for(int i:range(N/2)){
                m.push_back(a[i]);
            }
            for(int i:range(N/2,N)){
                p.push_back(a[i]);
            }
            swap(p[1],p.back());
            V x;
            for(int i:range(N/2)){
                x.push_back(p[i]);
                x.push_back(m[i]);
            }
            x.push_back(p.back());
            if(sum(argret)<sum(x))argret=x;
        }
        {
            V p,m;
            for(int i:range(N/2+1)){
                m.push_back(a[i]);
            }
            for(int i:range(N/2+1,N)){
                p.push_back(a[i]);
            }
            swap(m.front(),m[m.size()-2]);
            V x;
            for(int i:range(N/2)){
                x.push_back(m[i]);
                x.push_back(p[i]);
            }
            x.push_back(m.back());
            if(sum(argret)<sum(x))argret=x;
        }
    }

    cout<<sum(argret)<<endl;
    return 0;
}

Measured memory_bytes: 5940
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <tuple>

using namespace std;

typedef long long ll;

int main(void){
    string s,c;
    ll n,k;
    cin >> n >> k;
    cin >> s;

    c = "abc";
    if(s[k - 1] == 'A'){
        s[k - 1] = c[0];
    }else if(s[k - 1] == 'B'){
        s[k -1] = c[1];
    }else if(s[k - 1] == 'C'){
        s[k - 1] = c[2];
    }
    cout << s << endl;
    return 0;
}


Measured memory_bytes: 256
import sys
s=sys.stdin.readline
while 1:
 n=int(s())
 if n==0:break
 d={}
 for _ in[0]*n:
  k,v=s().strip().split()
  d[k]=v
 a=''
 for _ in[0]*int(s()):
  a+=d.get(*[s().strip()]*2)
 print(a)


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

int main(void){
    int a[5];
    int k;

    rep(i, 5)
        cin >> a[i];
    cin >> k;

    if(a[4] - a[0] > k)
        cout << ":(" << endl;
    else
        cout << "Yay!" << endl;

    return 0;

}


Measured memory_bytes: 256
import java.util.*;

public class Main {
  public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    
    int H = sc.nextInt();
    int W = sc.nextInt();
    String S = "";
    for(int i=0; i<H; i++) {
      S = sc.next();
      System.out.println(S);
      System.out.println(S);
    }
  }
}

Measured memory_bytes: 37788
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define F first
#define S second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define mk make_pair
#define fast                    \
  ios_base::sync_with_stdio(0); \
  cin.tie(0);                   \
  cout.tie(0);
#define rep(i, a, b) for (ll i = a; i < b; i++)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
#define sz(x) (int)x.size()
#define mem(a, val) memset(a, val, sizeof(a))
#define deci(x) cout << fixed << setprecision(x);
#define bitcount(x) __builtin_popcountll(x)

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

const long long int mod = 1e9 + 7;
const long double EPS = 1e-12;
const int N = 1e5 + 20;

void solve() {
  string s, t;
  cin >> s >> t;
  ll ans = 0;
  ll n = s.length();
  rep(i, 0, n) ans += (s[i] != t[i]);
  cout << ans;
}
int main() {
  fast;
  ll t;
  t = 1;

  // cin>>t;

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

  return 0;
}
// Problem : B - Minor Change
// Contest : AtCoder - AtCoder Beginner Contest 172
// URL : https://atcoder.jp/contests/abc172/tasks/abc172_b
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)


Measured memory_bytes: 3796
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf=1e9+7;
string A,B,C;
queue<char> ta,tb,tc;

char judge(char a)
{

    char t;
    if(a=='a'&&!ta.empty())
    {
        t=ta.front();
        ta.pop();
    }
    if(a=='b'&&!tb.empty())
    {
        t=tb.front();
        tb.pop();
    }
    if(a=='c'&&!tc.empty())
    {
        t=tc.front();
        tc.pop();
    }
    return t;
}
int main()
{
    //freopen("input.txt","r",stdin);
    ios::sync_with_stdio(false);
    cin>>A>>B>>C;
    for(int i=0; i<A.size(); i++)
    {
        ta.push(A[i]);
    }
    for(int i=0; i<B.size(); i++)
    {
        tb.push(B[i]);
    }
    for(int i=0; i<C.size(); i++)
    {
        tc.push(C[i]);
    }
    char t=ta.front();ta.pop();
    while(1)
    {
        if(t=='a'&&ta.empty()){cout<<"A"; return 0;}
        if(t=='b'&&tb.empty()){cout<<"B"; return 0;}
        if(t=='c'&&tc.empty()){cout<<"C"; return 0;}
        t=judge(t);
    }

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <numeric>
#include <functional>
#include <vector>

using namespace std;

int a, b, c, d = 0;

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

int main() {

	cin >> a >> b >> c >> d;

	printf("%d", get_min(&a,&b) + get_min(&c, &d));

	return 0;
}

Measured memory_bytes: 256
from functools import lru_cache
import sys
sys.setrecursionlimit(10**7)
n = int(input())
k = int(input())


@lru_cache(maxsize=None)
def f(n, k):
    if k == 0:
        return 1
    if len(str(n)) == 1:
        if k >= 2:
            return 0
        if k == 1:
            return n

    r = n % 10
    m = (n - r) // 10
    return r * f(m, k-1) + (9 - r) * f(m-1, k-1) + f(m, k)


print(f(n, k))


Measured memory_bytes: 3940
# if any tree contains an odd no of table then first is the winner
# First strategy is to make a tree with odd no of apples
# second strategy is to make a tree with even no of apples
# if the tree doesn't contain any odd apples when first takes an apples he will make it odd
# second would try to make it even by taking one apple from that tree
def main():
	n = int(input())
	ans =0
	f=0
	for i in range(0 , n):
		t = int(input())
		if t%2!=0:
			f=1
	if f==1:
		print("first")
	else:
		print("second")
if __name__=="__main__":
	main()

Measured memory_bytes: 74620
D = int(input())
C = list(map(int,input().split()))
 
s = [[] for _ in range(D)]
last = [0]*26
 
for i in range(D):
    s[i] = list(map(int,input().split()))

def evaluation(d):
    P = [0]*26
    for i in range(26):
        P[i] += s[d][i]
        for j in range(26):
            if i == j:
                continue
            P[i] -= C[j] * (d+1 - last[j])
    return P.index(max(P))
 
 
for d in range(D):
    d_maxP = evaluation(d)
    last[d_maxP] = d+1
    print(d_maxP + 1)


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

e = [0] * (n+1)
for i in range(2,n+1):
  cur = i
  for j in range(2, i+1):
    while cur % j == 0:
      e[j] += 1
      cur //= j

def num(m):
  return sum([ei>=m-1 for ei in e])      

print(num(75)  \
    + num(25)*(num(3)-1) \
    + num(15)*(num(5)-1) \
    + num(5) *(num(5)-1)*(num(3)-2)//2)

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

int main(void){
    int i, j, a, n, q, count = 0;
    int s[10001], t[501];

    scanf("%d", &n);
    for(i = 0; i < n; i++) {
        scanf("%d", &s[i]);
    }

    scanf("%d", &q);
    for(i = 0; i < n; i++) {
        scanf("%d", &t[i]);
    }


    for(i = 0; i < n; i++){
        for(j = 0; j < q; j++){
        if(s[i] == t[j]) {
            count++;
            t[j] = -1;
            break;
        }
        }
    }

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

    return 0;
}

Measured memory_bytes: 640
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <algorithm>
#include <set>
#include <queue>
#include <math.h>

using namespace std;
#define ll long long

int main()
{
    //freopen("aa_input.txt", "r", stdin);
    ll n;
    cin>>n;
    ll sum = 0; 
    for(int i=1; i<=n; i++){
        for(int j=1; j<=n; j++){
            for(int k=1; k<=n; k++){
                sum += __gcd( __gcd(i,j),k);
            }
        }
    }
    cout<<sum<<endl;
    return 0;
}
/*

riaadmorshed@gmail.com

*/

Measured memory_bytes: 3620
#include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <sstream>
#include <limits.h>
using namespace std;
 
int main()
{
    int n;
    cin >> n;
    /*
    int a[n];
    std::vector<int> v;
    for(int i=0; i<n; i++){
        int tmp;
        cin >> tmp;
        a[i] = tmp;
    }
    */
    int a = n;
    cout << a+a*a+a*a*a << endl;
    //cout << "Yes" << endl;
    //cout << a << endl;
    
    return 0;
}

Measured memory_bytes: 3596
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define SIZE(x) ((ll)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define SORTR(x) sort(ALLR(x));
#define SORT(x) sort(ALL(x));
#define SUM(x) accumulate(ALL(A), 0);
#define EACH(i,x) for(typeof((x).begin()) i=(x).begin(); i!=(x).end(); ++i)
typedef vector<ll> VI;
typedef vector<VI> VVI;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
template <class BidirectionalIterator>
bool next_partial_permutation(BidirectionalIterator first, BidirectionalIterator middle,BidirectionalIterator last){reverse(middle, last); return next_permutation(first , last);}

VVI heightmap(VVI &grid){

	return grid;
}




void Main()
{
	ll W,H;
	ll result=0;
	cin>>H>>W;
	//vector<vector<char>> S(H,vector<char>(W,'0'));
	vector<string> S(H);
	//vector<vector<char>> Map(H,vector<char>(W,'0'));
	VVI grid(H,VI(W,0));
	REP(i, H) cin >> S[i];
	REP(j,H){
		REP(i,SIZE(S[0])){
			if(S[j][i]=='#'){
				//Map[i][j]='#';
				if(i-1>=0&&j-1>=0) grid[j-1][i-1]+=1;
				if(i-1>=0&&j>=0) grid[j][i-1]+=1;
				if(i-1>=0&&j+1<H) grid[j+1][i-1]+=1;
				//
				if(i>=0&&j-1>=0) grid[j-1][i]+=1;
				if(i>=0&&j+1<H) grid[j+1][i]+=1;
				//
				if(i+1<W && j-1>=0) grid[j-1][i+1]+=1;
				if(i+1<W && j>=0) grid[j][i+1]+=1;
				if(i+1<W && j+1<H) grid[j+1][i+1]+=1;
			}
		}
	}
	REP(j,H){
		REP(i,SIZE(S[0])) {
			if(S[j][i]=='#') cout<<"#";
			else cout<< grid[j][i];
		}
		cout<<endl;
	}

	//cout << result << "\n";
	return;
}

int main()
{
	std::cin.tie(0);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#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 INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;


int main()
{
    ll x_1, y_1, x_2, y_2;
    cin >> x_1 >> y_1 >> x_2 >> y_2;
    ll dir_x = x_2 - x_1;
    ll dir_y = y_2 - y_1;

    ll x_3 = -dir_y + x_2;
    ll y_3 = dir_x + y_2;

    dir_x = x_3 - x_2;
    dir_y = y_3 - y_2;

    ll x_4 = -dir_y + x_3;
    ll y_4 = dir_x + y_3;

    cout << x_3 << " " << y_3 << " " << x_4 << " " << y_4 << endl;
    return 0; 
}

Measured memory_bytes: 764
#include<cstdio>
#include<algorithm>
#define RI register int
#define CI const int&
using namespace std;
const int N=5005;
int n,sa[N<<2],sb[N<<2],ans; char s[N],t[N];
inline void calc(int ret=1e9)
{
	RI i,j,ta=0,tb=0; for (i=1;i<=n;++i) sa[++ta]=0;
	for (i=1;i<n;++i) if (s[i]=='1'&&s[i+1]=='0') sa[++ta]=i;
	for (i=1;i<=n;++i) sa[++ta]=n;
	for (i=1;i<n;++i) if (t[i]=='1'&&t[i+1]=='0') sb[++tb]=i;
	for (i=1;i+n-1<=ta;++i)
	{
		int cur=0; for (j=1;j<i;++j) cur+=sa[j];
		for (j=1;j<=tb;++j) cur+=abs(sa[i+j-1]-sb[j]);
		for (j=i+tb;j<=ta;++j) cur+=n-sa[j]; ret=min(ret,cur);
	}
	ans+=ret;
}
int main()
{
	RI i; scanf("%d%s%s",&n,s+1,t+1);
	if (n==1) return puts(s[1]==t[1]?"0":"1"),0;
	if (n==2&&s[1]!=t[1]&&s[1]==s[2]&&t[1]==t[2]) return puts("2"),0;
	for (calc(),i=1;i<=n;++i) s[i]=48+((s[i]-48)^1),t[i]=48+((t[i]-48)^1);
	return calc(),printf("%d",ans),0;
}

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

int main() {
  int N;
  cin >>N;
  double TES = 0;    
  vector<double> A(N);
  
   for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  } 
    for (int i = 0; i < N; i++) {
  TES += 1/A.at(i);
  } 
   cout << 1/TES << endl;
}

Measured memory_bytes: 256
S=str(input())
a = S[0:1]
b = S[1:2]
c = S[2:3]
d = S[3:4]
if a==b and b==c and c==d and a==d:
    print('No')
elif a==b:
    if c==d:
        print('Yes')
    else:
        print('No')
elif a==c:
    if b==d:
        print('Yes')
    else:
        print('No')    
elif a==d:
    if b==c:
        print('Yes')
    else:
        print('No')
elif a==b and b==c and c==d and a==d:
    print('No')
else:
    print('No')
    

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// Welcome to my source code!

int main() {
    int h, w;
    cin >> h >> w;
    string a[h];
    for (int i = 0; i < h; i++) cin >> a[i];
    vector<int> w_crush;
    w_crush.push_back(1000);
    for (int j = 0; j < w; j++) {
        bool flag = true;
        for (int i = 0; i < h; i++) {
            if (a[i][j] == '#') flag = false;
        }
        if (flag) w_crush.push_back(j);
    }
    sort(w_crush.begin(), w_crush.end());
    vector<int> h_crush;
    h_crush.push_back(1000);
    for (int i = 0; i < h; i++) {
        bool flag = true;
        for (int j = 0; j < w; j++) {
            if (a[i][j] == '#') flag = false;
        }
        if (flag) h_crush.push_back(i);
    }
    sort(h_crush.begin(), h_crush.end());
    for (int i = 0; i < h; i++) {
        if (i == *lower_bound(h_crush.begin(), h_crush.end(), i)) continue;
        for (int j = 0; j < w; j++) {
            if (j == *lower_bound(w_crush.begin(), w_crush.end(), j)) continue;
            cout << a[i][j];
        }
        cout << endl;
    }
}

Measured memory_bytes: 256
#include <cstdio>

int main(){
    int b,r,g,c,s,t;
    for(;;){
        scanf("%d%d%d%d%d%d",&b,&r,&g,&c,&s,&t);
        if(b==0&&r==0&&g==0&&c==0&&s==0&&t==0) break;
        int m=100;
        m-=3*(t-s-b*5-r*3);
        m-=2*(b*5+r*3);
        m+=b*15*6;
        m+=r*15*4;
        m+=g*7;
        m+=c*2;
        printf("%d\n",m);
    }
}

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

using namespace std;

int main(){
    int n;
    scanf("%d",&n);
    set<int> a;
    for(int i=0;i<n;i++){
        int t;
        scanf("%d",&t);
        a.insert(t);
    }
    int s=a.size();
    if(s%2==0) printf("%d\n",s-1);
    else printf("%d\n",s);
    return 0;
}


Measured memory_bytes: 4992
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<ctime>
#include<iostream>
typedef long long LL;
using namespace std;
const int maxn = 1e2;
char T[maxn][maxn];
int n,m;
int dx[5] = { 0 , 0 , -1 , 1 };
int dy[5] = { 1 , -1 , 0 , 0 };
void dfs(){
	int flag = 0 , mark = 0;
	for( int i = 1 ; i <= n ; i++ ){
		for( int j =  1 ; j <= m ; j++ ){
			if( T[i][j] != '#' )	continue;
			flag = 0;
			for( int k = 0 ; k < 4 ; k++ ){
				if( j + dx[k] < 1 || j + dx[k] > m || i + dy[k] < 1 || i + dy[k] > n )
					continue;
				if( T[i+dy[k]][j+dx[k]] == '#' )	flag = 1;
				if( flag == 1 )	break;
			}
			if( flag == 0 )	mark = 1;
			if( mark == 1 )	break;
		}
		if( mark == 1 )	break;
	}
	if( mark == 1 )	cout << "No" << endl;
	else cout << "Yes" << endl;
}
int main()
{
	while( cin >> n >> m ){
		for( int i = 1 ; i <= n ; i++ ){
			for( int j = 1 ; j <= m ; j++ ){
				cin >> T[i][j];
			}
		}
		dfs();
	}
}

Measured memory_bytes: 256
H,W = map(int,input().split())
Matrix = list()
S = ''

for x in range(0,W+2):
    S += '.' 

Matrix.append(S)

for x in range(0,H):
    s = input()
    row = '.' + s + '.'
    Matrix.append(row)

Matrix.append(S)

answer = True

for x in range(1,H+1):
    for y in range(1,W+1):
        if Matrix[x][y] == '#':
            if Matrix[x+1][y] == '.' and Matrix[x-1][y] == '.' and Matrix[x][y+1] == '.' and Matrix[x][y-1] == '.':
                answer = False

if answer:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 3064
#include <iostream>
#include <string>
#include <map>
#include <algorithm>

int main(int argc, char const* argv[])
{
	std::string str;
	std::map<char,unsigned> m;
	while (!std::cin.eof()) {
		std::string s;
		std::cin >> s;
		str += s;
	}
    std::transform(str.begin(), str.end(), str.begin(), tolower);
	for (auto c : str) {
		m[c]++;
	}
	for (char c = 'a'; c <= 'z'; c++) {
		std::cout << c << " : " << m[c] << std::endl;
	}

	return 0;
}

Measured memory_bytes: 3152
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int A = sc.nextInt();
		int B = sc.nextInt();
		
		if(A <10 && B < 10) {
			System.out.println(A*B);
		}else {
			System.out.println("-1");
		}
		
		sc.close();
	}
}

Measured memory_bytes: 22100
#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

int H, W, dx[] = { -1,0,0,1 }, dy[] = { 0,-1,1,0 };
char s[55][55];

int main()
{
	in >> H >> W;
	rep(i, H) in >> s[i + 1] + 1;
	rep(i, H)
	{
		rep(j, W)
		{
			if (s[i][j] == '#')
			{
				bool flag = false;
				rep(k, 4)
				{
					if (s[i][j] == s[i + dx[k]][j + dy[k]])
					{
						flag = true;
						break;
					}
				}
				if (!flag)
				{
					out << "No" << std::endl;
					return 0;
				}
			}
		}
	}
	out << "Yes" << std::endl;
	return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
int main(){
    int a,b,c;
    int count = 0;
    scanf("%d %d %d",&a,&b,&c);
    for(int i=a;i<=b;i++){
        if(c%i==0){
        count++;
        }
    }
    printf("%d\n",count);
  return 0;
}



Measured memory_bytes: 2100
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=200005,p=1000000007,inf=0x3f3f3f3f;
int read(){
	int f=1,g=0;char ch=getchar();
	for (;!isdigit(ch);ch=getchar()) if (ch=='-') f=-1;
	for (;isdigit(ch);ch=getchar()) g=g*10+ch-'0';
	return f*g;
}
int n,a[N],b[N],pos[N];
ll sum,ans;
bool cmp(int x,int y){return a[x]<a[y];}
int main(){
	n=read();
	for (int i=1;i<=n;i++) a[i]=read(),a[i+n]=read();
	ans=0;
	for (int i=1;i<=n;i++) ans+=a[i];
	sum=0;
	for (int i=n+1;i<=n*2;i++) sum+=a[i];
	ans=min(ans,sum);
	for (int i=1;i<=n*2;i++) b[i]=i;
	sort(b+1,b+n*2+1,cmp);
	for (int i=1;i<=n*2;i++) pos[b[i]]=i;
	
	sum=0;
	for (int i=1;i<=n-2;i++) sum+=a[b[i]];
	for (int i=1;i<=n;i++){
		ll t=sum;int cnt=n-2;
		if (min(pos[i],pos[i+n])<=cnt) t+=a[b[++cnt]];
		if (max(pos[i],pos[i+n])<=cnt) t+=a[b[++cnt]];
		if (pos[i]>cnt) t+=a[i];
		if (pos[i+n]>cnt) t+=a[i+n];
		ans=min(ans,t);
	}
	printf("%lld\n",ans);
	return 0;
}

Measured memory_bytes: 2688
X, N = map(int, input().split())

if N == 0:
  print(X)
else:
  P = set(map(int, input().split()))
  for i in range(N + 1):
    if X - i not in P:
      print(X - i)
      break
    elif X + i not in P:
      print(X + i)
      break

Measured memory_bytes: 9096
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int,int> pii;
typedef vector<int> vi;
#define de(x) cout << #x << "=" << x << endl
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define fi first
#define se second
const int N = 1e5+5;
char str[N];
int a[30];
int main()
{
	scanf("%s",str);
	int len=strlen(str);
	for(int i=0;i<len;i++)
	{
		a[str[i]-'a']++;
	}
	for(int i=0;i<26;i++)
	{
		if(a[i]==0) {printf("%c",i+'a');return 0;
		}
	}
	cout<<"None";	
} 

Measured memory_bytes: 384
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

double dist[9][9];
int coor[9][2];
int a[8] = { 1, 2, 3, 4, 5, 6, 7, 8 };
int fact[9] = { 0, 1, 2, 6, 24, 120, 720, 5040, 40320 };

int main()
{
	int n;
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> coor[i][0] >> coor[i][1];
		for (int j = 1; j < n; j++)
		{
			int dx = coor[i][0] - coor[j][0];
			int dy = coor[i][1] - coor[j][1];
			dist[i][j] = dist[j][i] = sqrt(dx * dx + dy * dy);
		}
	}
	double sum = 0.0;
	do
	{
		for (int i = 0; i < n - 1; i++)
		{
			sum += dist[a[i]][a[i + 1]];
		}
	} while (next_permutation(a, a + n));
	printf("%.10f\n", sum / fact[n]);
	return 0;
}

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

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

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

const int MAX = 1e5 + 5;
const int INF = 1001001001;
const int MOD = 1e9 + 7;

int main(){
    int N, M, R;
    cin >> N >> M >> R;

    vector<int> r(R);
    rep(i, R) cin >> r[i];
    rep(i, R) r[i]--;

    vector<vector<int>> d(N, vector<int>(N, INF));
    rep(i, N) d[i][i] = 0;

    rep(i, M) {
        int A, B, C;
        cin >> A >> B >> C;
        A--, B--;
        d[A][B] = d[B][A] = C;
    }

    rep(k, N) {
        rep(i, N) {
            rep(j, N) {
                d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
            }
        }
    }
    
    int ans = INF;
    sort(r.begin(), r.end());

    do {
        int res = 0;
        for (int i = 1; i < R; ++i) {
            int from = r[i - 1];
            int to = r[i];
            res += d[from][to];
        }
        ans = min(ans, res);
    } while (next_permutation(r.begin(), r.end()));

    cout << ans << endl;
}

Measured memory_bytes: 384
//压行课次
#include<bits/stdc++.h>
#define LL long long
using namespace std;
LL a,b,x;
long double ans,s,PI=3.1415926;
LL read(){LL sss=0,fff=1;char ccc;ccc=getchar();while(ccc<'0'||ccc>'9'){if(ccc=='-')fff=-1;ccc=getchar();}while(ccc>='0'&&ccc<='9')sss=(sss<<1)+(sss<<3)+(ccc^'0'),ccc=getchar();return sss*fff;}
int main()
{
//	freopen("123.in","r",stdin);
//	freopen("123.out","w",stdout);
	a=read();b=read();x=read();
	
	s=(long double)x/a;
//	printf("%Lf\n",s);
	if(s*2.0>=a*b)
	{
		s=(long double)a*b-s;
		s=s*2/a;
//	printf("%lld %lld %Lf\n",a,b,s);
		ans=a/s;
//	printf("%Lf\n",ans);
		ans=atan(ans)*180.0f/acos(-1);
		printf("%.10Lf",90.0f-ans);
	}
	else
	{
		ans=2.0*s/b;
//		printf("%Lf\n",ans);
		ans=ans/b;
		ans=atan(ans)*180.0f/acos(-1);
		printf("%.10Lf",90.0f-ans);
	}
	return 0;
}


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

int main() {
  int h, w, d;
  cin >> h >> w >> d;
  vector<vector<int>> an(h * w, vector<int>(2));
  int ai;
  rep(i, h) {
    rep(j, w) {
      cin >> ai;
      an[ai-1][0] = i;
      an[ai-1][1] = j;
    }
  }
  vector<int> bn(h * w, 0);
  rep(i, h*w) {
    if (i < d) continue;
    bn[i] = bn[i-d] + abs(an[i][0] - an[i-d][0]) + abs(an[i][1] - an[i-d][1]);
  }
  
  int q, l, r;
  cin >> q;
  rep(i, q) {
    cin >> l >> r;
    cout << bn[r-1] - bn[l-1] << endl;
  }
}


Measured memory_bytes: 6400
# include <stdio.h>
int main(){
	int a,b;
	scanf("%d %d",&a,&b);
	if(a==1)a=14;
	if(b==1)b=14;
	if(a>b)printf("Alice");
	else if(a==b)printf("Draw");
	else printf("Bob");
	return 0;
}

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

using namespace std;

int main(){
    int N; cin >> N;
    vector<int> p(N); for (int i = 0; i < N; i++) cin >> p[i];

    int sum = 0;
    for (int i = 0; i < N; i++) sum += p[i];

    int max_price = *max_element(p.begin(), p.end());
    sum -= max_price/2;

    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <sstream>
#include <algorithm>
#include <iterator>
#include <time.h>
#define fin(i,n) for (int i = 0; i < (int)(n); i++)
#define fin2(i,j,m,n) fin(i,m) fin(j,n)
using namespace std;

template <typename T> bool contains(vector<T> list, T value) {
	for (T tmp : list) if (tmp == value) return true;
	return false;
}


int main()
{
	string s, t;
	cin >> s;
	cin >> t;
	const int s_len = s.length();
	const int t_len = t.length();


	vector<int> list;
	fin(i, s_len - t_len + 1) {
		fin(j, t_len) {
			if (s[i + j] != t[j] && s[i + j] != '?') break;
			if (j == t_len - 1) list.push_back(i);
		}
	}

	if (list.empty()) {
		cout << "UNRESTORABLE" << endl;;
		return 0;
	}

	fin(i, t_len) {
		s[list.back() + i] = t[i];
	}
	fin(i, s_len) {
		if (s[i] == '?') s[i] = 'a';

	}

	cout << s << endl;;


}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
  while (1){
    string D;
    cin >> D;
    if (D == "-"){
      break;
    }
    int m;
    cin >> m;
    for (int i = 0; i < m; i++){
      int h;
      cin >> h;
      string D2;
      for (int j = h; j < D.size(); j++){
        D2 += D[j];
      }
      for (int j = 0; j < h; j++){
        D2 += D[j];
      }
      D = D2;
    }
    cout << D << endl;
  }
}


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

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#define start_routine() int begtime = clock();
#define end_routine() int endtime = clock(); cerr << endl << "Time elapsed: " << (endtime - begtime)*1000/CLOCKS_PER_SEC << " ms"; return 0
#define speed() cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(false)
// #define exit(a, b) return cout << a, b;

// debugger
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#define debug(stuff) cout << #stuff << ": " << stuff <<endl
#define debugc(stuff) cout << #stuff << ": "; for(auto x: stuff) cout << x << " "; cout << endl;
// 

#define loop(i,a,b) for(ll i=a;i<b;i++)
#define all(v) v.begin(), v.end() 

#define print(stuff) cout << stuff << endl
#define printc(stuff) for(auto x: stuff) cout << x << " "; cout << endl;
#define printPrec(stuff) cout << fixed << setprecision(15) << stuff << endl;
#define len length
#define ret0 return 0
#define ret return 


#define ll long long
#define ld long double
#define fi first
#define endl '\n'
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define fill(ar, x) memset(ar, x, sizeof ar)

#define vl vector<ll> 
#define sl set<ll>
#define pll pair<ll, ll>
#define mll map<ll, ll> 
#define pq priority_queue<ll>

// typedef tree<ll,null_type,less<ll>,rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;

#define inf (long long int) 1e18
#define eps 0.000001
#define mod 1000000007
#define mod1 998244353
#define MAXN (ll)1e5+5

ll ceil(ll a,ll b){
    if(a >= 0) return a/b+(a%b!=0);
    else if(a < 0) ret a/b;
}
void solve(){
    ll a, b;
    cin>>a>>b;
    ll ans = 0;
    ll cnt = 1;
    while(cnt < b){
        ans++;
        cnt--;
        cnt += a;
    }
    print(ans);
}

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

    ll t = 1;
    // cin>>t;
    while(t--){
        solve();
    }
        
    
}



Measured memory_bytes: 256
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    sx,sy,tx,ty=map(int,readline().split())

    ans=""
    u=ty-sy
    v=tx-sx
    a=u*"U"
    b=v*"R"
    c=u*"D"
    d=v*"L"
    ans+=a+b+c+d
    ans+="L"+a+"U"+b+"R"+"D"
    ans+="R"+c+"D"+d+"L"+"U"
    print(ans)

if __name__=="__main__":
    main()

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
using P = pair<ll, ll>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
#define ALL(obj) (obj).begin(), (obj).end()
const int INF = 1e9;

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

	ll N;
	ll ans = 0;

	cin >> N;
	vector<ll> A(N);
	rep(i, N) cin >> A[i];
	deque<ll> dq;

	rep(i, N) {
		auto itr = lower_bound(dq.rbegin(), dq.rend(), A[i]);
		if (itr == dq.rbegin()) {
			dq.push_back(A[i]);
		}
		else {
			itr--;
			*itr = A[i];
		}
	}

	ans = dq.size();
	cout << ans << "\n";

	return 0;
}


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


#include <bits/stdc++.h>

using namespace std;

class CSnack {
public:
    int64_t gcd(int a, int b) {
        return b != 0 ? gcd(b, a % b) : a;
    }

    void solve(std::istream &cin, std::ostream &cout) {
        int64_t a, b;
        cin >> a >> b;
        cout << a * b / gcd(a, b) << endl;
    }
};


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


Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main()
{
    int t,x,i;
    cin>>t;
    if(t%1000==0)
    cout<<"0"<<endl;
    else
    {
        for(i= 1000;i<t;i+=1000)
        {
            x=i;
            
        }
        cout<<i-t<<endl;
        
        
    }
    return 0;
}


Measured memory_bytes: 3224
a = int(input())
l = list(map(int,input().split()))
l_1 = sorted(l)
d = "NO"
for m in range(a):
  for n in range(a):
    x =l[m]
    l[m] = l[n]
    l[n] = x
    if l == l_1 :
      d ="YES"
      break
    else:
      x = l[n]
      l[n]=l[m]
      l[m]=x
print(d)

Measured memory_bytes: 3060
//#define _GLIBCXX_DEBUG

#include<bits/stdc++.h>
using namespace std;
const int INF= 1e9+5;
typedef long long ll;

int main(){
  int n;
  cin>>n;
  if(n%2==0)cout<<n/2<<endl;
  else cout<<n/2+1<<endl;
}
  

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int D;
  vector<pair<int, int>> c(26);
  vector<vector<int>> s(D, vector<int>(26));
  vector<int> t(D);
  
  cin >> D;
  for(int i = 0; i < 26; i++){
    cin >> c.at(i).first;
    c.at(i).second = 0;
  }
  
  for(int i = 0; i < D; i++){
    for(int j = 0; j < 26; j++){
      cin >> s.at(i).at(j);
    }
  }
  
  for(int i = 0; i < D; i++){
    t.at(i) = rand() % 26+1;
  }
  
  int count = 0;
  int S = 0;
  vector<int> ans(D);
  while(count++ < 50000){
    
  t.at((rand() % D+1)-1) = rand() % 26+1;

  int Pl = 0;
  int Mi = 0;
  
    for(int i = 0; i < D; i++){
      Pl += s.at(i).at(t.at(i)-1);
      c.at(t.at(i)-1).second = i + 1;
      for(int j = 0; j < 26; j++){
        Mi += c.at(j).first*(i+1 - c.at(j).second);
      }
      Pl -= Mi;
      Mi = 0;
    }
  if(S < Pl){
    S = Pl;
    for(int i = 0; i < D; i++){
      ans.at(i) = t.at(i);
    }
  }
  else if(S >= Pl){
    continue;
  } 
}
  for(int i = 0; i < D; i++){
    cout << ans.at(i) << endl;
  }
}


Measured memory_bytes: 7548
/*************************************************************************
	> File Name: 1.cpp
	> Author: Knowledge_llz
	> Mail: 925538513@qq.com 
	> Blog: https://blog.csdn.net/Pig_cfbsl 
	> Created Time: 2020/6/27 20:00:31
 ************************************************************************/

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<algorithm>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define LL long long
using namespace std;
int read(){
	char x=getchar(); int u=0,fg=0;
	while(!isdigit(x)){ if(x=='-') fg=1; x=getchar(); }
	while(isdigit(x)){ u=(u<<3)+(u<<1)+(x^48); x=getchar(); }
	return fg?-u:u;
}
int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.in", "r", stdin);
	freopen("output.out", "w", stdout);
#endif
	int a=read();
	cout<<a+a*a+a*a*a;
	return 0;
}


Measured memory_bytes: 3620
/*
Author : Aditya Gupta
Team : TechTurtle
Date : 29-08-2020
Time : 20:05:54
*/


#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define vll vector<ll>
#define vvll vector< vll >
#define vld vector< ld >
#define vvld vector< vld >
#define pll pair<ll ,ll >
#define vpll vector< pll >
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define endl "\n"
#define flash ios_base::sync_with_stdio(false);cin.tie(NULL);
#define test ll t;cin>>t;while(t--)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define fst first
#define scd second
#define mk(arr,n,type)  type *arr=new type[n];


#define forn(i,n) for(ll (i) = 0 ; (i) < (n) ; ++(i))
#define for1(i,n) for(ll (i) = 1 ; (i) <= (n) ; ++(i))
#define forr(i,n) for(ll (i) = (n)-1 ; (i)>=0 ; --(i))
#define forab(i,a,b,c) for(ll (i) = a ; (i) <= (b) ; (i)+=(c))

using namespace std;

///////////////////////////////////////////////////////////////////////// Maths //////////////////////////////////////////////////////////////////////////////

//vll sieve;
//void Sieve(int N){  //smallest prime factor
//	const ll maxn = N;
//	sieve.resize(maxn);
//	forn(i,maxn) sieve[i] = i;
//	sieve[1] = -1;
//	sieve[0] = -1;
//	forab(i,2,maxn,1) if(i == sieve[i]) for(ll j = i*i ; j < maxn ; j+=i) if(sieve[j] == j) sieve[j] = i;
//
////	for(auto i:sieve){
////		cout<<i<<" ";
////	}
//
//}
vll sieve;
vll* Sieve(int N) {
	const ll maxn = N;
	sieve.resize(maxn);
	forn(i,maxn) sieve[i] = 1;
	sieve[1] = 0;
	sieve[0] = 0;
	forab(i,2,maxn,1) if(1 == sieve[i]) for(ll j = i*i ; j < maxn ; j+=i) sieve[j] = 0;

	vll* primes=new vll();
	primes->pb(2);
	for(int i=3; i<maxn; i+=2)
		if(sieve[i]) {
			primes->pb(i);
		}
	return primes;

}


ll extended_GCD(ll a , ll b , ll &x , ll &y) {
	if(a == 0) {
		x = 0;
		y = 1;
		return b;
	}
	ll x1 , y1;
	ll gcd = extended_GCD(b%a , a , x1 , y1);
	x = y1 - (b/a)*x1;
	y = x1;
	return gcd;
}

ll ncr(ll n,ll k) {
	ll r=1;
	if(k>n-k)
		k=n-k;
	for(ll i=0; i<k; i++) {
		r*=(n-i);
		r/=(i+1);
	}
	return r;
}


ll power(ll a, ll b,ll m = MOD) {
	ll res = 1;
	while (b > 0) {
		if (b & 1)
			res = (res * a)%m;
		a = (a * a)%m;
		b >>= 1;
	}
	
	return res;
}

ll modinv(ll a , ll mod = MOD) {
	ll x , y;
	extended_GCD(a , mod , x , y);
	if(x < 0) x += mod;
	return x;
}


/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
bool prime(int n) {
	int c=0;
	for(int i=2; (i*i)<=n; i++) {
		if(n%i==0) {
			c++;
			return false;
		}
	}
	if(c==0)
		return true;
}
// bool compareInterval(char i1, char i2)
//{
//    return (i1 < i2);
//}
// int countoperation(int n,m){
// 	vector<int> d<m+1,-1>;
// }



void solve() {
ll d,t,s;
cin>>d>>t>>s;
if((double)d/s<=(double)t)
cout<<"Yes\n";
else
cout<<"No\n";
}

int main() {
	flash
//	freopen("input.txt","r",stdin);
//	freopen("output.txt","w",stdout);

//	test
	solve();
	return 0;
}

Measured memory_bytes: 3652
N=gets.to_i;v=$<.map{|e|Complex(*e.split.map(&:to_i))};h={};r=2**N+~N;[*0...N].combination(2){|i,j|h[x=[i,j]]||((j+1...N).map{|k|((v[j]-v[k]).conj*(v[i]-v[k])).imag==0&&x<<k};r-=2**(l=x.size)+~l;x.combination(2){|e|h[e]=1})};p r%998244353

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

using namespace std;

int main() {
  int N;
  while (cin >> N) {
    if (N == 0) break;
    int num[5000];
    for (int i = 0; i < N; i++) {
      cin >> num[i];
    }
    int m = num[0];
    for (int i = 0; i < N; i++) {
      int sum = 0;
      for (int j = i; j < N; j++) {
        sum += num[j];
        m = max(m, sum);
      }
    }
    cout << m << endl;
  }

  return 0;
}

Measured memory_bytes: 0
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define rep(i,n) for(int i=0;i<(int)n;i++)
const ll INF = (1LL<<60);
const int MOD = 1000000007;
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;
}

int N,K;
vector<int> a(110);
vector<vector<ll> > dp(110,vector<ll>(100010,0));

int main(){
    cin >> N >> K;
    rep(i,N){
        cin >> a[i];
    }

    vector<ll> sum(100010,0);
    dp[0][0] = 1;
    for(int i=0;i<N;i++){
        sum[0] = 0;
        for(int j=0;j<=K;j++) sum[j+1] = (sum[j] + dp[i][j]) % MOD;
        for(int j=0;j<=K;j++) dp[i+1][j] = (sum[j+1] - sum[max(0, j-a[i])] + MOD) % MOD;
    }
    cout << dp[N][K] << endl;
}

Measured memory_bytes: 90408
#include <cstdio>
#include <vector>
#include <string>
#include <iostream>
using namespace std;
const int MAXN = 3005;
int dp[MAXN][MAXN]={0};
inline int max(int a,int b){
    return a>b?a:b;
}
int main(){
    string s,t;
    cin>>s>>t;
    for(int i=1;i<=s.length();++i){
        for(int j=1;j<=t.length();++j){
            if(s[i-1]==t[j-1]){
                dp[i][j]=dp[i-1][j-1]+1;
            }
            else{
                dp[i][j]=max(dp[i][j-1],dp[i-1][j]);
            }
        }
    }
    string n;
    int x=s.length(),y=t.length();
    // cout<<dp[x][y]<<endl;
    // int res=dp[x][y];
    while(x&&y){
        // cout<<x<<" "<<y<<endl;
        if(s[x-1]==t[y-1]){
            n=s[x-1]+n;
            x--;y--;
        }
        else{
            if(dp[x-1][y]==dp[x][y])x--;
            else y--;
        }
    }
    cout<<n<<endl;
    return 0;
}

Measured memory_bytes: 35456
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define DUMP(x)  cout << #x << " = " << (x) << endl;
#define FOR(i, m, n) for(ll i = m; i < n; i++)
#define IFOR(i, m, n) for(ll i = n - 1; i >= m; i-- )
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
#define FOREACH(x,a) for(auto& (x) : (a) )
#define ALL(v) (v).begin(), (v).end()

int main(){
  ll n; cin >> n;
  vector<ll> a(n);
  REP(i,n) cin >> a[i];
  ll ans = a[0]/2;
  a[0] %= 2;
  FOR(i,1,n){
    // i-1, i
    ll t = min(a[i-1],a[i]);
    ans += t;
    a[i] -= t;
    // i,i
    ans += a[i]/2;
    a[i] %= 2;
  }
  cout << ans << endl;
}



Measured memory_bytes: 1024
N = int(input())
S = []
for i in range(N):
    S.append(input())

def check(S, A, B):
    for i in range(N):
        for j in range(i+1, N):
            if S[i][j] != S[j][i]:
                return 0
    return 1

cnt = 0
for i in range(N):
    cnt += check(S[i:] + S[:i], 0, 0)
print(cnt * N)


Measured memory_bytes: 3060
n = int(input())
K = 0
while(True):
    if n //10**K > 0:
        K += 1
    else:
        break
max_num = int(str(n//10**(K-1))+("9"*(K-1)))
if n == max_num:
    print(n//10**(K-1)+9*(K-1))
else:
    print(n//10**(K-1)+9*(K-1)-1)

Measured memory_bytes: 3060
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
	char a;
	cin>>a;
	if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u')cout<<"vowel"<<endl;
	else cout<<"consonant"<<endl;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
int main(){
  double x;

  while( scanf("%lf",&x) != EOF ){

    if( x <= 48.00 ){
      printf("light fly\n");
    }

    if( x > 48.00 && x <= 51.00 ){
      printf("fly\n");
    }

    if( x > 51.00 && x <= 54.00 ){
      printf("bantam\n");
    }

    if( x > 54.00 && x <= 57.00 ){
      printf("feather\n");
    }

    if( x > 57.00 && x <= 60.00){
      printf("light\n");
    }

    if( x > 60.00 && x <= 64.00){
      printf("light welter\n");
    }

    if( x > 64.00 && x <= 69.00){
      printf("welter\n");
    }

    if( x > 69.00 && x <= 75.00 ){
      printf("light middle\n");
    }

    if( x > 75.00 && x <= 81.00 ){
      printf("middle\n");
    }

    if( x > 81.00 && x <= 91.00 ){
      printf("light heavy\n");
    }

    if( x > 91.00 ){
      printf("heavy\n");
    }

  }

  return 0;
}

Measured memory_bytes: 608
N, K = map(int, input().split())

sunuke_list = [0] * (N + 1)
d_list = []
A_list = []

for i in range(K):
    d = int(input())
    A = list(map(int, input().split()))

    for a in A:
        sunuke_list[a] += 1

print(sunuke_list.count(0) - 1)

    




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

int main(){
  int n, d; cin >> n >> d;
  vector<vector <int>> x(n, vector<int> (d));
  
  for (int i = 0; i < n; i++){
    for (int j = 0; j < d; j++){
      cin >> x.at(i).at(j);
    }  
  }
  
  int cnt = 0;

  for (int i = 0; i < n; i++){
    for (int j = i + 1; j < n; j++){
      int dist = 0;
      
      for (int k = 0; k < d; k++){
        int add = x.at(i).at(k) - x.at(j).at(k);
        add = add * add;
        dist += add;
      }
      
      for(int sq = 1; sq < 140; sq++){
        if (sq * sq == dist){
           cnt++;
          break;
        }
      }
      
    }
    
    
  }
  
  cout << cnt << endl;
}

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

int main(){
	int n,a,f=0,z=0,t=0;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a;
		if(a%4==0){
			f++;
		}
		else if(a%2==0){
			t++;
		}
		else{
			z++;
		}
	}
	if(z>f && (f+z<n || (f+z==n && f!=z-1)))
		cout<<"No";
	else
		cout<<"Yes";
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	/**
	 * Comparing Strings
	 * @param 1 ≤ a ≤ 9
	 * @param 1 ≤ b ≤ 9
	 */
	public static void main(String... args) {
		try (Scanner sc = new Scanner(System.in)) {
			int a = sc.nextInt();
			int b = sc.nextInt();
			StringBuilder sb = new StringBuilder();
			if (a < b) {
				for (int i = 0; i < b; i++) {
					sb.append(a);
				}
			} else {
				for (int i = 0; i < a; i++) {
					sb.append(b);
				}
			}
			System.out.println(sb.toString());
		}
	}
}

Measured memory_bytes: 21844
#include<cstdio>
#include<queue>
#include<algorithm>
#include<vector>
#include<map>
using namespace std;
const int MAX= 100005 ;
const int INF= 1<<30 ;
int n,d[MAX],vis[MAX];
vector<pair<int,int> > G[MAX];
void init(){
	for(int i=0;i<n;i++){
		d[i]=INF;
		vis[i]=0;
	}
	d[0]=0;
}
void dijkstra(){
	priority_queue<pair<int,int> > PQ;
	PQ.push(make_pair(0,0));
	while(!PQ.empty()){
		pair<int,int> f=PQ.top();PQ.pop();
		int u=f.second;
		vis[u]=1;
		if(d[u]>=-f.first){
			for(int i=0;i<G[u].size();i++){
				int v=G[u][i].first;
				if(!vis[v] && d[v]>G[u][i].second+d[u]){
					d[v]=G[u][i].second+d[u];
					PQ.push(make_pair(-d[v],v));
				}
			}
		}
	}
}
int main(){
	int u,k,v,c;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d %d",&u,&k);
		for(int j=0;j<k;j++){
			scanf("%d %d",&v,&c);
			G[u].push_back(make_pair(v,c));
		}
	}
	init();
	dijkstra();
	for(int i=0;i<n;i++){
		printf("%d %d\n",i,d[i]);
	}
	return 0;
} 


Measured memory_bytes: 9708
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int>pii;
const int N=405,M=1e5+5;
int n,m,x[M],y[M],i,j,k,a[N],aa[N][N],ans;
bool b[N],bb[M];
vector<pii>e[N];
void dfs(int u){
	for(pii v:e[u])
		if(!a[v.first] && v.second<a[u])
			bb[a[v.first]=v.second]=1,dfs(v.first);
}
int main(){
	scanf("%d%d",&n,&m);
	for(i=1;i<=m;++i)scanf("%d%d",x+i,y+i);
	for(i=m;i;--i)e[x[i]].push_back(pii(y[i],i)),e[y[i]].push_back(pii(x[i],i));
	for(i=1;i<=n;++i){
		memset(bb+1,0,m);memset(a+1,0,n<<2);a[i]=M;
		dfs(i);
		for(j=1;j<=m;++j)if(!bb[j] && a[x[j]] && a[y[j]] && (a[x[j]]>j || a[y[j]]>j))break;
		if(j<=m)b[i]=1;
		memcpy(aa[i]+1,a+1,n<<2);
	}
	for(i=1;i<n;++i)if(!b[i])for(j=i+1;j<=n;++j)if(!b[j]){
		for(k=1;k<=n;++k)if(aa[i][k] && aa[j][k] && aa[i][k]!=aa[j][k])break;
		ans+=k>n;
	}
	printf("%d\n",ans);
	return 0;
}

Measured memory_bytes: 4352