akhauriyash/Code-Regression huggingface dataset:
#include<algorithm>
#include<array>
#include<cmath>
#include<iostream>
#include<iomanip>
#include<iso646.h>
#include<queue>
#include<stack>
#include<string>
#include<vector>

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;

#define FOR(counter,initial_value,condition) for(int counter = initial_value; counter < condition;counter++)

int digitSum(int n,int digit=8) {
	// digit > 2
	int x = 1;
	FOR(i,0,digit){
		x *= 10;
	}
	int sum = 0;
	FOR(i, 0, digit) {
		sum += n / x;
		n %= x;
		x /= 10;
	}
	sum += n;
	return sum;
}

int main()
{
	string s;
	cin >> s;
	sort(s.begin(), s.end());
	bool alphabet[26];
	FOR(i, 0, 26) {
		alphabet[i] = false;
	}
	FOR(i, 0, s.size()) {
		alphabet[((int)s[i] - 97)] = true;
	}
	FOR(i, 0, 26) {
		if (alphabet[i] == false) {
			cout << (char)((int)'a' + i) << endl;
			return(0);
		}
	}
	cout << "None" << endl;
}


Measured memory_bytes: 512
#include<cstdio>
#include<algorithm>
using u32=unsigned int;
const int P=1000000007;
u32 f[2][3007];
int cal(int m,int n)
{
    int now=0,sum=0;
    std::fill(f[0]+1,f[0]+m+1,1),f[0][0]=f[0][m+1]=f[1][0]=f[1][m+1]=0;
    for(int i=0;i<n;++i,now^=1) for(int j=1;j<=m;++j) f[!now][j]=(f[now][j-1]+2*f[now][j]+f[now][j+1])%P;
    for(int i=1;i<=m;++i) (sum+=f[now][i])%=P;
    return sum;
}
int main()
{
    int n,m;scanf("%d%d",&n,&m);
    printf("%d",4ll*(cal(n,m-1)-cal(n-1,m-1)+P)%P);
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
#define ll long long int
#define ci cin>>
#define co cout<<
#define l <<endl
#define mp make_pair
#define v vector<int> v;
#define vv vector<vector<int>> vv
#define v_print for(auto x:v){cout<<x<<"\n";}
#define floop(i,a,b) for(int i=a;i<b;i++)
#define w(n) while(n--)
#define mod 1000000007
using namespace std;




int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	
	ll n,w,i,j;	ci n>>w;
	ll weight[n+1],value[n+1],dp[n+1][w+1];
	floop(i,1,n+1)
	{
		ci weight[i]>>value[i];
	}
	memset(dp,0,sizeof(dp));
	floop(i,1,n+1)
	{
		floop(j,1,w+1)
		{
			if(weight[i]>j)
			{
				dp[i][j]=dp[i-1][j];
			}
			else
			{
				dp[i][j]=max(dp[i-1][j],value[i]+dp[i-1][j-weight[i]]);
			}
			//co dp[i][j]<<" ";
		}
		//co endl;
	}
	co dp[n][w];

}

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

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

	sort(h.begin(), h.end(), greater<int>());

	int ans = 1000000000;
	for (int i = 0; i <= N - K; i++) {
		int tmp = h[i] - h[i + K - 1];
		if (tmp < ans)ans = tmp;
	}

	cout << ans << endl;
}

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

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

int main() {
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	int n,t,a,h; cin>>n>>t>>a; t*=1000; a*=1000;
	int mn=1e9, ret=-1;
	for (int i=0; i<n; i++) {
		cin>>h;
		int cur=abs(t-6*h - a);
		if(cur<mn)
			mn=cur, ret=i+1;
	}
	cout << ret << endl;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
typedef long long ll;
typedef pair<int, int> pii;
const ll INF = 1e9+100;
const ll MOD = 1e9+7;
const bool debug = 0;
//-----------------------------------------------//

int main() {
	string N;
	cin >> N;
	bool ans = false;
	REP(i, 2) if (N[0+i] == N[1+i] && N[1+i] == N[2+i]) ans = true;
	puts(ans ? "Yes" : "No");
	return 0;
}


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

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

    string s;
    int a = 0;
    for(int i = 0; i < n; i++){
        cin >> s;
        if(s == "A"){
            a++;
        }else if(s == "Un"){
            a--;
            if(a < 0){
                cout << "NO" << endl;
                return 0;
            }
        }
    }
    
    cout << (a == 0 ? "YES" : "NO") << endl;

    return 0;
}


Measured memory_bytes: 3168
#define  _CRT_SECURE_NO_WARNINGS
#pragma comment (linker, "/STACK:526000000")

#include "bits/stdc++.h"

using namespace std;
typedef string::const_iterator State;
#define eps 1e-11L
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL

#define MOD 998244353LL
#define seg_size 262144 * 4LL
#define pb push_back
#define mp make_pair
typedef long long ll;
#define REP(a,b) for(long long (a) = 0;(a) < (b);++(a))
#define ALL(x) (x).begin(),(x).end()

void init() {
	iostream::sync_with_stdio(false);
	cout << fixed << setprecision(20);
}

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

vector<pair<int, int>> inputs;

map<pair<int, int>, int> cnt;
int sol(int now,int itr) {
	for (int i = itr; i < inputs.size(); ++i) {
		if ((1 << i) & now) continue;
		int ans = 0;
		for (int q = i + 1; q < inputs.size(); ++q) {
			if ((1 << q) & now) continue;
			pair<int, int> next = mp(inputs[q].first - inputs[i].first, inputs[q].second - inputs[i].second);
			int hoge = gcd(next.first, llabs(next.second));
			next.first /= hoge;
			next.second /= hoge;
			cnt[next]++;
			ans = max(ans, sol(now + (1 << i) + (1 << q), i + 1));
			cnt[next]--;
		}
		return ans;
	}
	//solution
	int ans = 0;
	for (auto x : cnt) {
		ans += x.second * (x.second - 1) / 2;
	}
	return ans;
}

void solve() {
	int n;
	cin >> n;
	REP(i, n) {
		int a, b;
		cin >> a >> b;
		inputs.push_back(mp(a, b));
	}
	sort(ALL(inputs));
	cout << sol(0, 0) << endl;
}

#undef int
int main() {
	init();
	solve();
}


Measured memory_bytes: 3152
n = int(input())
moto = [int(i) for i in input().split()]
 
array=[0]*n
 
for i in reversed(range(1,n+1)):
  if sum(array[i-1::i])%2 != moto[i-1]:
    array[i-1] = 1
    
m = sum(array)
print(m)
ans = ""
for i in range(n):
  if array[i] == 1:
    print(i+1, end=" ")


Measured memory_bytes: 8380
#include <stdio.h>
#include <stdlib.h>
int main() {
    int i, j, N, K, d, count = 0;
    scanf("%d %d", &N, &K);
    int *sn = malloc(sizeof(int) * N);
    for (i = 0; i < N; i++) sn[i] = 0;
    for (i = 0; i < K; i++) {
        scanf("%d", &d);
        for (j = 0; j < d; j++) {
            int A;
            scanf("%d", &A);
            sn[A - 1]++;
        }
    }
    for (i = 0; i < N; i++) {
        if (!sn[i]) count++;
    }
    printf("%d\n", count);
    return 0;
}

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


 const int MAX = 1001;
const int MOD = 1000000007;



signed main(){
    int n;
    string s;
    cin>>n>>s;
    int k[2*n]={};
    k[0]=0;int t=0;
    if(s[0]!='B'){
        cout<<0;
        return 0;
    }else{
        for(int i=1;i<2*n;i++){
            if(t==0){
                if(s[i-1]!=s[i])k[i]=k[i-1]+1;
                else{
                    k[i]=k[i-1];
                    t=1;
                }
            }else{
                if(s[i-1]!=s[i])k[i]=k[i-1]-1;
                else{
                    k[i]=k[i-1];
                    t=0;
                }
            }
        }
    }
    if(k[2*n-1]!=0){
        cout<<0;
        return 0;
    }
    int cou[2*n];
    cou[0]=0;
    for(int i=1;i<2*n;i++){
        if(k[i]!=k[i-1])cou[i]=cou[i-1];
        else cou[i]=(cou[i-1]+1)%2;
    }
    int ans=1,cc=0;
    for(int i=0;i<2*n;i++){
        if(cou[i]==0)cc++;
        else{
            if(cc==0){
                cout<<0;
                return 0;
            }
            ans=(ans*cc)%MOD;
            cc--;
        }
    }
    //for(int i=0;i<2*n;i++)cerr<<k[i]<<' ';
    for(int i=1;i<=n;i++)ans=(ans*i)%MOD;
    cout<<ans;

   return 0;
}

Measured memory_bytes: 3716
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long c = sc.nextLong();
        long[][] nums = new long[n][2];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < 2; j++) {
                nums[i][j] = sc.nextLong();
            }
        }
        long[][] max = new long[n + 2][4];
        long[] sum = new long[2];
        for (int i = 0; i < n; i++) {
            sum[0] += nums[i][1];
            max[i + 1][0] = Math.max(max[i][0], sum[0] - nums[i][0]);
            max[i + 1][1] = Math.max(max[i][1], sum[0] - nums[i][0] * 2);
            sum[1] += nums[n - i - 1][1];
            max[n - i][2] = Math.max(max[n - i + 1][2], sum[1] -( c - nums[n - i - 1][0]));
            max[n - i][3] = Math.max(max[n - i + 1][3], sum[1] -(c - nums[n - i - 1][0]) * 2);
        }
        long ans = 0;
        for (int i = 0; i < n + 1; i++) {
            ans = Math.max(ans, max[i][0] + max[i + 1][3]);
            ans = Math.max(ans, max[i][1] + max[i + 1][2]);
        }
        System.out.println(ans);

    }
}

Measured memory_bytes: 96380
#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
const ll mod = (ll)10e9+7;
const int INF = 0x3f3f3f3f;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string n;
    cin >> n;
    ll ans = 0;
    for(int i=0; i<n.length(); i++) for(int j=i+1; j<=n.length(); j++) ans += stoll(n.substr(i, (j-i)))*pow(2, max(0, i-1))*pow(2, max(0, (int)n.length()-j-1));
    cout << ans;
}

//TODO: 45


Measured memory_bytes: 384
#include <bits/stdc++.h>  // ver2.2.8
#define int long long
#define endl "\n"
#define ALL(v) (v).begin(),(v).end()
#define COUNT(a,k) upper_bound(ALL(a),k)-lower_bound(ALL(a),k)
#define BIGGER(a,k) a.end()-upper_bound(ALL(a),k)
#define SMALLER(a,k) lower_bound(ALL(a),k)-a.begin()
#define Vi vector<int>
#define VVi vector<Vi>
#define Vs vector<string>
#define Pii pair<int,int>
#define VPii vector<Pii>
#define Tiii tuple<int,int,int>
#define PQi priority_queue<int>
#define PQir priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define itos to_string
#define stoi stoll
#define FI first
#define SE second
#define cYES cout<<"YES"<<endl
#define cNO cout<<"NO"<<endl
#define cYes cout<<"Yes"<<endl
#define cNo cout<<"No"<<endl
#define cyes cout<<"yes"<<endl
#define cno cout<<"no"<<endl
#define _ <<' '<<
#define sortr(v) sort(v,greater<>())
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repeq(i,a,b) for(int i=a;i<=b;i++)
#define repreq(i,a,b) for(int i=a;i>=b;i--)
#define leng(n) (int)(log10(n)+1)
#define dem(a,b) ((a+b-1)/(b))
#define Vin(a) rep(iI,0,a.size())cin>>a[iI]
#define Vout(a) rep(lZ,0,a.size()-1)cout<<a[lZ]<<' ';cout<<a.back()<<endl
#define VVout(a) rep(lY,0,a.size()){if(!a[lY].empty()){Vout(a[lY]);}else cout<<endl;}
#define VPout(a) rep(lX,0,a.size())cout<<a[lX].FI<<' '<<a[lX].SE<<endl
#define Verr(a) rep(iZ,0,a.size()-1)cerr<<a[iZ]<<' ';cerr<<a.back()<<endl
#define VVerr(a) rep(J,0,a.size()){if(!a[J].empty()){Verr(a[J]);}else cerr<<'.'<<endl;}
#define VPerr(a) rep(iX,0,a.size())cerr<<a[iX].FI<<' '<<a[iX].SE<<endl
#define INF 3000000000000000000  //  3.0*10^18(MAXの1/3くらい)
#define MAX LLONG_MAX
#define MOD 1000000007  //  10^9 + 7
using namespace std;

int gcd(int a,int b){return b?gcd(b,a%b):a;}  //  最大公約数gcd
int lcm(int a,int b){return a/gcd(a,b)*b;}  //  最小公倍数lcm
void press(auto &v){v.erase(unique(ALL(v)),v.end());}  //  圧縮
int mypow(int x, int n, int m){  //  累乗x^n(mod m)  O(log(n))
if(n==0)return 1;if(n%2==0)return mypow(x*x%m,n/2,m);else return x*mypow(x,n-1,m)%m;}



signed main() {
  cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(12);
  int n,m;
  cin >> n >> m;
  vector<VPii> ch(m);
  int qw,er,ty;
  rep(i,0,n){
    cin >> qw >> er >> ty;
    ty--;
    ch[ty].pb(mp(qw,er));
  }
  
  Vi memo,check(100010);
  
  
  rep(i,0,m){
    if(ch[i].size()==0) continue;
    memo = Vi(100010);
    rep(j,0,ch[i].size()){
      memo[ch[i][j].FI]++;
      memo[ch[i][j].SE]--;
    }
    rep(j,0,100005){
      if(memo[j] > 0) check[j-1] += memo[j];
      else if(memo[j] < 0) check[j] += memo[j];
    }
  }
  
  int now = 0;
  
  rep(i,0,100005){
    now += check[i];
    check[i] = now;
  }
  
  cout << *max_element(ALL(check)) << endl;
  return 0;
}

Measured memory_bytes: 5232
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000


N,M = map(int,input().split())
tree = [[] for i in range(N)]
for i in range(M):
    X,Y,Z = map(int,input().split())
    X -= 1
    Y -= 1
    tree[X] += [Y]
    tree[Y] += [X]

# print(tree)
used = [0 for i in range(N)]

def dfs(node,p):
    used[node] = 1
    # print(tree[node])
    for new in tree[node]:
        if new == p or used[new] == 1:continue
        dfs(new,node)

cnt = 0
while sum(used) < len(used):
    for i in range(N):
        if used[i] == 0:
            dfs(i,-1)
            cnt += 1

ans = N - (sum(used) - cnt)
print(ans)


Measured memory_bytes: 112988
INF = float('inf')


def tc():
    s = input()
    t = input()
    n, m = len(s), len(t)

    # dp[i][j] = LCS so far up to pos i in s and pos j in t
    dp = [[0] * (m + 1) for _ in range(n + 1)]

    for i in range(1, n + 1):
        for j in range(1, m + 1):
            if s[i - 1] == t[j - 1]:  # if chars are the same, use them both
                dp[i][j] = dp[i - 1][j - 1] + 1
            else:
                dp[i][j] = max(dp[i - 1][j], dp[i][j - 1])

    i, j = n, m
    ans = ''
    while dp[i][j]:
        me = dp[i][j]
        l = dp[i][j - 1]
        u = dp[i - 1][j]
        d = dp[i - 1][j - 1]
        if d > l and d > u:
            ans += s[i - 1]
            i -= 1
            j -= 1
        elif d == l and d == u:
            if d < me:
                ans += s[i - 1]
                i -= 1
                j -= 1
            else:
                i -= 1
        elif l >= u:
            j -= 1
        elif u > l:
            i -= 1

    print(''.join(reversed(ans)))


tc()


Measured memory_bytes: 144580
#include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename Q_temp>
using smaller_queue = priority_queue<Q_temp, vector<Q_temp>, greater<Q_temp>>;

const ll MOD = (ll)(1e9 + 7);
const int INF = (int)1e9;
const ll LINF = (ll)4e18;
const double PI = acos(-1.0);

#define REP(i, m, n) for (ll i = m; i < (ll)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define possible(n) cout << ((n) ? "possible" : "impossible") << endl
#define Yay(n) cout << ((n) ? "Yay!" : ":(") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x) cerr << #x << ":" << x << endl;

vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll gcd(ll a, ll b)
{
  if (a < b)
    swap(a, b);
  return b == 0 ? a : gcd(b, a % b);
}

inline ll lcm(ll a, ll b)
{
  return a / gcd(a, b) * b;
}

int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(20) << setiosflags(ios::fixed);

  ll n, m;
  cin >> n >> m;
  ll a[100010];
  set<int> div;
  rep(i, n)
  {
    cin >> a[i];
    int cnt = 0;
    ll b = a[i];
    while (b % 2 == 0)
    {
      b /= 2;
      cnt++;
    }
    div.insert(cnt);
  }
  if (div.size() != 1)
  {
    cout << 0 << endl;
    return 0;
  }

  ll l = 1;
  rep(i, n)
  {
    l = lcm(l, a[i]);
    if (l > 2e10)
    {
      cout << 0 << endl;
      return 0;
    }
  }
  cout << (m + l / 2) / l << endl;
  return 0;
}


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

const int MAX = 5100000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main() {
  	int i, x, y, K, k;
	cin >> x >> y;
    
    COMinit();
  
    K = x + y;
    if (K % 3 != 0) {
        cout << 0 <<endl;
    } else {
        k = K / 3;
        i = 2 * k - x;
        cout << COM(k, i) << endl;
    }    
}

Measured memory_bytes: 119808
#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>
#include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<string.h>
#include<algorithm>
#include<numeric>

using namespace std;

int main() {
	string s1;
	string s2;

	cin >> s1;

	for (int i = 0;i<s1.size();i+=2) {
	
		s2 += s1[i];
	}

	cout << s2 << endl;
	return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>

#define int long long

using namespace std;

class Solver {
};

tuple<string,char> dfs(string s, int remain) {
	string now = "";
	for (int i = 0; i < s.size(); i++) {
		if ('0' <= s[i] && s[i] <= '9') {
			int loop = 0;
			while ('0' <= s[i] && s[i] <= '9') {
				loop *= 10;
				loop += (s[i] - '0');
				i++;
			}
			i++;
			string tmp = "";
			int nest = 1;
			for (; i < s.size(); i++) {
				if (s[i] == '(')nest++;
				if (s[i] == ')') {
					nest--;
					if (nest == 0) {
						break;
					}
				}
				tmp += s[i];
			}

			tuple<string, char> tpl = dfs(tmp, remain);
			if (get<1>(tpl) != '0')return make_tuple(now, get<1>(tpl));
			tmp = get<0>(tpl);
			for (int j = 0; j < loop; j++) {
				remain -= tmp.size();
				now += tmp;
				if (remain < 0)return make_tuple(now, now[now.size() + remain]);
			}
		}
		else {
			now += s[i];
			remain--;
			if (remain < 0)return make_tuple(now, now[now.size() + remain]);
		}
	}
	return make_tuple(now, '0');
}

signed main() {
	while (true) {
		string s;
		int n;
		cin >> s >> n;
		if (s[0] == '0')break;

		string formated = "";
		for (int i = 0; i < s.size(); i++) {
			if (i > 0 && 'A' <= s[i] && s[i] <= 'Z'
				&& '0' <= s[i - 1] && s[i - 1] <= '9') {
				formated += '(';
				formated += s[i];
				formated += ')';
			}
			else {
				formated += s[i];
			}
		}
		cout << get<1>(dfs(formated, n)) << endl;
	}
}


Measured memory_bytes: 8140
#include<cstdio>
#include<cstring>

#define ran 101101

int n;
char s[ran];
int to[ran], ans[ran];

int main() {
	scanf("%s", s);
	n = strlen(s);
	
	memset(to, -1, sizeof to);
	for(int i=0;i<n-1;i++) {
		if (s[i]!='R' || s[i+1]!='L') continue;
		to[i] = to[i+1] = i;
		
		for(int j=i-1;j>=0 && s[j] == 'R'; j--)
			to[j] = i;
		for(int j=i+2;j<n && s[j] == 'L'; j++)
			to[j] = i;
	}
	
	for(int i=0;i<n;i++)
		if ((to[i]-i)%2) ans[to[i]+1] ++;
		else ans[to[i]]++;
	for(int i=0;i<n;i++)
		printf("%d%c", ans[i], i<n-1 ? ' ' : '\n');
	
	return 0;
}

Measured memory_bytes: 1280
#include<iostream>
#include<bits/stdc++.h>
#include<climits>
#include<math.h>

#define forn(x,n,s) for(int i = x; i < n; i += s )
#define forr(x,n,s) for(int i = x; i>=n; i -= s)
#define PI 3.14159265358979323846264338327950L

using namespace std;

void go(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);

  #ifndef ONLINE_JUDGE
       freopen("input.txt","r",stdin);
       freopen("output.txt","w",stdout);
  #endif
} 
long long int mod = 1e9+7;

int main(){
    go(); 

    // code here
    int n,k;cin>>n>>k;
    unordered_set<int> st;
    forn(0,k,1){
        int inp;cin>>inp;
        for(int j = 0; j < inp; j++){
            int inp2;cin>>inp2;
            st.insert(inp2);
        }
    }
    cout<<n - st.size();
}





Measured memory_bytes: 3616
#include<iostream>
#include<bits/stdc++.h>
using namespace std; 
int main(){
  int a,b=0,d=0,m=0,r=0;
  cin>>a;
  int c[a];
  for(int i=0;i<a;i++)cin>>c[i];
  for(int i=0;i<a-1;i++){
    if(c[i]>=c[i+1])d++;//cout<<c[i]<<d<<" 2 ";}
    else{
      if(d>m){
        m=d;d=0;
      }//cout<<c[i]<<d<<" 2 ";
      d=0;
    }
    
  }if(d>m){
        m=d;d=0;
      }
  cout<<m;
  return 0;
}

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

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

  if ((a < b && a < c && c < b) || (a > b && a > c && b < c)) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}


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

#define int long long
#define endl '\n'
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define REPS(i, a, n) for (int i = (a); i < (int)(n); ++i)
#define RREP(i, n) for (int i = 1; i <= (int)(n); ++i)
#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define ALL(v) v.begin(), v.end()

typedef pair<int, int> P;

inline bool inside(int y,int x,int H,int W){return(y>=0&&x>=0&&y<H&&x<W);}
inline int in() {int x; std::cin >> x; return x;}

const int MOD = 1e9 + 7;
const int INF = 1e9 + 9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

int d[50];

signed main()
{
  int n;
  while (cin >> n, n){
    memset(d, 0, sizeof(d));
    d[0] = 1;
    for (int i = 0; i < n; i++){
      for (int j = 1; j <= 3; j++){
        d[i + j] += d[i];
      }
    }

    cout << ((d[n] - 1) / 10 + 1) / 365 + 1 << endl;
  }
}

Measured memory_bytes: 3004
long long int Pow3(long long int a) {
  long long int f[314159]; 
  f[0] = 1; 
  for (int i = 1; i < 314159; ++i){
     f[i] = (f[i-1] * 3) % 1000000007;  
  }
 return f[a];
}
#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
int main(){
long long int p = 1000000007; 
string S; 
cin >> S; 
int N = S.size(); 
long long int A[114514] = {0}, C[114514] = {0}, 
              Q[114514] = {0}; 
for(int i = 1; i <= N; i++){
  A[i] = A[i-1], C[i] = C[i-1], Q[i] = Q[i-1];    
if(S.at(i-1) == 'A') A[i]++; 
else if(S.at(i-1) == 'C') C[i]++;
else if(S.at(i-1) == '?') Q[i]++;
}
long long int count = 0; 
for(int i = 2; i < N; i++){
if(S.at(i-1) == 'B'){ 
  count = 
  (count + (A[i-1] * (C[N] - C[i])) % p 
  + (((Q[i-1] * (C[N] - C[i])) % p) * 333333336) % p 
  + (((A[i-1] * (Q[N] - Q[i])) % p) * 333333336) % p
  + (((Q[i-1] * (Q[N] - Q[i])) % p) * 111111112) % p) 
    % p; 
}
else if(S.at(i-1) == '?') {
  count = (count +(((A[i-1] * (C[N] - C[i])) % p 
  + (((Q[i-1] * (C[N] - C[i])) % p) * 333333336) % p 
  + (((A[i-1] * (Q[N] - Q[i])) % p) * 333333336) % p
  + (((Q[i-1] * (Q[N] - Q[i])) % p) * 111111112) % p) 
            % p) * 333333336) % p; 
}
} 
  cout << (count * Pow3(Q[N])) % p << endl; 
}

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

using namespace std;

int main()
{
  int n = 3;
  vector <int> vc;
 
  while(n--){
    int x;
    cin >> x;
    vc.push_back(x);

      }

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

  if(vc[0] == 5 && vc[1] == 5 && vc[2] == 7){
    cout << "YES" << "\n";
  }else{
    cout << "NO" << "\n";
  }
}

Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

	public static class Rect implements Comparable<Rect>{
		int height, width;
		
		public Rect(int w, int h){
			height = h;
			width = w;
		}

		public int dist(){
			return height * height + width * width;
		}
		
		@Override
		public int compareTo(Rect o) {
			int this_dist = dist();
			int o_dist = o.dist();
			
			if(this_dist != o_dist){
				return this_dist - o_dist;
			}else if(this.height != o.height){
				return this.height - o.height;
			}else{
				return 0;
			}
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + height;
			result = prime * result + width;
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Rect other = (Rect) obj;
			if (height != other.height)
				return false;
			if (width != other.width)
				return false;
			return true;
		}
		
		@Override
		public String toString(){
			return this.height + " " + this.width;
		}
		
		
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		ArrayList<Rect> list = new ArrayList<Rect>();
		
		for(int w = 1; w <= 150; w++){
			for(int h = 1; h < w; h++){
				list.add(new Rect(w, h));
			}
		}
		
		Collections.sort(list);
		//System.out.println(list);
		
		while (true) {
			final int h = sc.nextInt();
			final int w = sc.nextInt();
			
			if(h == 0 && w == 0){
				break;
			}
			
			Rect rect = new Rect(w, h);
			
			System.out.println(list.get(Collections.binarySearch(list, rect) + 1));
		}
	}
}

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

int main()
{
    int q;
    cin >> q;
    vector<int> l(q);
    vector<int> r(q);
    for (int i = 0; i < q; i++)
    {
        cin >> l.at(i) >> r.at(i);
    }
    //似てる数
    //000101000001
    bitset<100001> isResemble(0);
    for (int i = 2; i <= 100000; i++)
    {
        isResemble.set(i);
    }
    for (int i = 2; i < 100000; i++)
    {
        if (isResemble[i])
        {
            for (int j = i * 2; j < 100000; j += i)
            {
                isResemble.reset(j);
            }
        }
    }
    for (int i = 100000 - 1; i >= 0; i--)
    {
        if (!isResemble[(i + 1)/2])
        {
            isResemble.reset(i);
        }
        
    }
    

    
    //累積和
    //sum = {0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 3}
    vector<int> sum(100001, 0);
    sum.at(0) = 0;
    for (int i = 1; i < 100001; i++)
    {
        sum.at(i) += sum.at(i - 1);
        if (isResemble[i])
        {
            sum.at(i)++;
        }
        
    }
    
    

    //solve
    vector<int> ans(q);
    for (int i = 0; i < q; i++)
    {
        ans.at(i) = sum.at(r.at(i)) - sum.at(l.at(i) - 1);
    }
    

    for (auto &&i : ans)
    {
        cout << i << endl;
    }
    
}

Measured memory_bytes: 2176
/*
 * Author: .-O_O-.
 */
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include<bits/stdc++.h>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define pb push_back
#define vi vector<int>
#define rep0(a,b) for(int a=0;a<b;a++)
#define rep1(a,b) for(int a=1;a<=b;a++)
#define repp(a,b,c) for(int a=b;a<c;a++)
#define in insert
#define len length()
#define si size()
#define lb lower_bound
#define ub upper_bound
#define beg begin()
#define en end()
#define f first
#define s second
#define pr(a) cout<<a
#define pr2(a,b) cout<<a<<" "<<b<<"\n"
#define nx cout<<"\n"
#define int long long
// void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
                                                     
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]"<<endl;}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define deb(x...)
#endif
const ll mod = 1000000007;
const ll N = 3005;
const ll mm = 1e+18;
void solve()
{
    int x,k,d;
    cin>>x>>k>>d;
    x=abs(x);
    int how=x/d;
    if(how>=k){
        cout<<x-k*d;
    }
    else{
        k-=how;
        int xx=x-how*d;
        deb(xx,k,d);
        int x1=abs(d-xx);
        if(k&1) xx=x1;
        cout<<xx;
    }
}
signed main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t=1;
    //cin>>t;
    rep1(_i,t){
        //cout<<"Case #"<<_i<<": ";
        solve();
        //nx;
    }
    return 0;
}


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

int main(){
	int x,y;
	cin>>x>>y;
	long long cnt=0;
	if (y==0) {
		cout<<(long long)x*x<<endl;
		return 0;
	}
	for (int j=y+1;j<=x;j++) {
		int i=y,tmp=j-i,tmp1=x-i+1;
		int ans=tmp1/j*tmp+min(tmp,tmp1%j);
		cnt+=(long long)ans;
	}
	cout<<cnt<<endl;
}

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


int main()
{
  char b; cin >> b;

  if (b=='A')
  {
    cout << "T" << endl;
  }
  else if (b=='T')
  {
    cout << "A" << endl;
  }
  else if (b=='C')
  {
    cout << "G" << endl;
  }
  else if (b=='G')
  {
    cout << "C" << endl;
  }
}


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

int main(){
    int_fast64_t N;
    scanf("%ld", &N);
    int_fast64_t M(0), z(0);
    vector<pair<int_fast64_t, int_fast64_t>> a(N);
    for(int_fast64_t i = 0; i < N; ++i){
        scanf("%ld", &a[i].first);
        M += a[i].first;
        a[i].first *= N;
        a[i].second = i;
    }
    sort(a.begin(), a.end());
    auto t = lower_bound(a.begin(), a.end(), make_pair(M, z));
    auto s = lower_bound(a.begin(), a.end(), make_pair(lower_bound(a.rbegin(), a.rend(), make_pair(M, N), [](auto a, auto b){return a > b;}) -> first, z));
    printf("%ld\n", ((t -> first + s -> first > 2 * M || ((t -> first + s -> first == 2 * M) && (t -> second > s -> second))) ? s  : t) -> second);
    return 0;
}


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

int main(void){

  int N,S;
  int temp;
  int sum;

  while(1){

    int temp = 0;

    cin >> N;

    if( N == 0 ) break;

      sum = 0;

      for( int j = 1 ; j*j <= N; j++ ){
	
	if( N % j == 0 ){ 
	  sum += j;
	  if( j*j != N ) sum += N/j;
           
	}
    }
      
      sum -= N;

    if( N < sum ) cout << "abundant number" << endl;
    else if( N > sum ) cout << "deficient number" << endl;
    else cout << "perfect number" << endl;

  }

  return 0;

}

Measured memory_bytes: 1152
H, W = map(int, input().split())
A = [list(map(int, input().split())) for _ in range(H)]

arr = []
for i in range(H-1):
    for j in range(W):
        if A[i][j]%2!=0:
            A[i+1][j]+=1
            arr.append([i+1, j+1, i+2, j+1])
            
for k in range(W-1):
    if A[H-1][k]%2!=0:
        A[H-1][k+1]+=1
        arr.append([H, k+1, H, k+2])
        
N = len(arr)

print(N)

for i in range(N): 
    print(arr[i][0], arr[i][1], arr[i][2], arr[i][3])

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

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for(int i = 0; i < n; i++){
    cin >> a.at(i);
  }
  int masu = 0;
  for(int i = 0; i < n; i++){
    if(a.at(i) % 2 != 0 && i % 2 == 0) masu++;
  }
  cout << masu << endl;
}


Measured memory_bytes: 3644
def permutation_rank(p):
    n = len(p)
    fact = 1
    for i in range(2, n):
        fact *= i
    r = 0
    digits = list(range(n))
    for i in range(n-1):
        q = digits.index(p[i])
        r += fact * q
        del digits[q]
        fact //= (n - 1 - i)
    return r


N = int(input())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
P = [x - 1 for x in P]
Q = [x - 1 for x in Q]

print(abs(permutation_rank(P) - permutation_rank(Q)))


Measured memory_bytes: 3064
N=int(input())
S=input()
cnt=S.count("R")*S.count("G")*S.count("B")
for i in range(N):
    for j in range(i+1,N):
        k=2*j-i
        if k<N and S[i]!=S[j]!=S[k]!=S[i]:
            cnt-=1
print(cnt)

Measured memory_bytes: 9188
import sys
n=int(raw_input())

w={}
pre_last=''
for i in range(n):
  s=raw_input()
  if s in w:
    print "No"
    sys.exit()
  else:
    w[s]=1
  now_begin=s[0:1]
  if i > 0:
    if pre_last!=now_begin:
      print "No"
      sys.exit()
  pre_last=s[-1:]
print "Yes"


Measured memory_bytes: 2568
#include <bits/stdc++.h>
using namespace std;
int main() {
    #ifdef DEBUG
    std::ifstream in("/home/share/inputf.in");
    std::cin.rdbuf(in.rdbuf());
    #endif
    int A, B, X;
    cin >> A >> B >> X;
    cout << (A <= X && X <= A + B ? "YES" : "NO") << endl;
    return 0;
}

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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;

void Main()
{
	int n;
  	cin >> n;
  	vi p(n);
  	int cnt = 0;
  	rep(i,n) {
      	cin >> p[i];
      	if(p[i]!=i+1) cnt++;
    }  
  	if(cnt == 0 || cnt == 2) cout << "YES" << endl;
    else cout << "NO" << endl;
	return;
}

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


Measured memory_bytes: 256
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<iomanip>
#include<map>
#include<utility>
#include<string>
#include<unordered_map>
#include<queue>

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

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
int gcd(int a, int b){return b ? gcd(b, a%b) : a;}
int lcm(int a, int b){return a*b / gcd(a, b);}

int main(){
    int n;
    cin >> n;
    vector<int> point(n);
    int sum = 0;
    for(int i = 0; i < n; i++){
        cin >> point[i];
        sum += point[i];
    }

    sort(point.begin(), point.end());
    if(sum%10 == 0){
        for(int i = 0; i < n; i++){
            if(point[i]%10 != 0){
                sum -= point[i];
                cout << sum << endl;
                return 0;
            }
        }
        cout << 0 << endl;
    }
    else{
        cout << sum << endl;
    }
    return 0;
}


Measured memory_bytes: 256
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int N = in.nextInt();
            int T = in.nextInt();
            int A[] = new int[N];
            for (int i = 0; i < N; i++) A[i] = in.nextInt();

            int min = A[0];
            int max_diff = 0;


            for (int i = 1; i < N; i++) {
                if (min > A[i]) {
                    min = A[i];
                }
                max_diff = Math.max(max_diff, A[i] - min);
            }
            int cnt = 0;
            min = A[0];
            for (int i = 1; i < N; i++) {
                if (min > A[i]) {
                    min = A[i];
                }
                if (A[i] - min == max_diff) cnt++;
            }

            out.println(cnt);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}


Measured memory_bytes: 23832
s = input()
def dfs(s, d=0, plus=[]):
    if len(s) -1 == d:
        equation = []
        for i in range(len(s)-1):
            equation.append(s[i])
            equation.append(plus[i])
        equation.append(s[-1])
        #print(''.join(equation))
        return eval(''.join(equation))
    
    total = 0
    total += dfs(s, d+1, plus+[''])
    total += dfs(s, d+1, plus+['+'])    
    
    return total

print(dfs(s))

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

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl




typedef long long ll;
const ll mod = 1e9+7;
const int maxn = 3030;
const ll inf = 1e18;

int n;
ll a[maxn];
ll dp[maxn][maxn];



ll solve(int l, int r) {
    assert(l<=r);
    if (l==r) return a[r];
    if (~dp[l][r]) return dp[l][r];

    return dp[l][r]=max(a[l]-solve(l+1,r), a[r]-solve(l,r-1));
}

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

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

    memset(dp,-1,sizeof(dp));

    cout<<solve(0,n-1)<<endl;
  

    return 0;
}


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

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

constexpr int INF = 1e9;
//constexpr ll INF = 1LL<<61;
// constexpr ll mod = 1e9+7;


int main(){
  ll N;
  cin >> N;
  map<ll, ll> s;
  for(ll i = 2; i*i <= N; i++){
    if(N%i != 0) continue;
    while(N % i == 0){
      s[i]++;
      N /=i;
    }
  }
  if(N != 1){
    s[N]++;
  }
  ll ans = 0;
  for(auto mp : s){
    ll x = mp.second;
    ll add = 1, cnt = 1;
    for(int i = 2; i+add <= x; i++){
      add+= i;
      cnt++;
    }
    ans += cnt;
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 3624
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Forenska(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define GREATER(x) x,vector<x>,greater<x>
#define randIn(L,R) (((LL)rand()*rand())%(R-L)+L)
#define __lcm(a,b) ((a)/__gcd(a,b)*(b))
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pLL;
typedef vector<int> vec;
typedef vector<LL> vecL;
typedef vector<pii> vecP;
typedef vector<pLL> vecPL;
typedef vector<string> vecS;
typedef vector<vec> mat;
typedef complex<double> point;
const long double PI=3.14159265358979323846264338327950288419716939937510582097;
const LL INFLL=0x3f3f3f3f3f3f3f3f;
const int INF=0x3f3f3f3f;
const long double EPS=1e-10;
int read()
{
    int x=0;
    char ch=' ';
    bool flag=false;
    while(ch<'0' || ch>'9')
    {
        if(ch=='-')flag=true;
        ch=getchar();
    }
    while(ch>='0' && ch<='9')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return flag?-x:x;
}
int a[3],b[3],grid[3][3];
int main()
{
	rep(i,0,3)
	{
		rep(j,0,3)
		{
			cin>>grid[i][j];
		}
	}
	bool ok;
	For(x,0,100)
	{
		ok=true;
		a[0]=x;
		b[0]=grid[0][0]-a[0];
		a[1]=grid[1][0]-b[0];
		b[1]=grid[1][1]-a[1];
		a[2]=grid[2][1]-b[1];
		b[2]=grid[2][2]-a[2];
		rep(i,0,3)
		{
			rep(j,0,3)
			{
				if(grid[i][j]!=a[i]+b[j])ok=false;
			}
		}
	}
	puts(ok?"Yes":"No");
	return 0;
}



Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
#define EPS (1e-5)
#define bit(n,k) ((n>>k)&1)
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
	ll x, y;
	bool operator<(const H& b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H & b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H & b) const { return x == b.x && y == b.y; }
	bool operator!=(const H & b) const { return (*this) != b; }
};
struct P {
	ll pos, cost;
	bool operator<(const P& b) const { return cost < b.cost; }
	bool operator>(const P& b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E& b) const { return cost < b.cost; }
	bool operator>(const E& b) const { return cost > b.cost; }
};
template<typename T, typename U>
void chmin(T & a, U b) {
	if (a > b) a = b;
}
template<typename T, typename U>
void chmax(T & a, U b) {
	if (a < b) a = b;
}
template<typename T>
T max_0(T a) {
	if (a < 0) return 0;
	return a;
}
template<typename T>
T min_0(T a) {
	if (a > 0) return 0;
	return a;
}
ll read() {
	ll u;
	ll k = scanf("%lld", &u);
	return u;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j % i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
int a, b;
signed main() {
	cin >> a >> b;
	if (a >= 13) cout << b << endl;
	else if (a >= 6) cout << b / 2 << endl;
	else cout << 0 << endl;
}

Measured memory_bytes: 256
require 'prime'

g = Prime.each(100000).to_a
g -= g.reject{|p| ((p + 1) / 2).prime?}
k = Array.new(100001, 0)
g.each do |x|
  k[x] = 1
end
1.upto(100000) do |i|
  k[i] += k[i - 1]
end
gets.to_i.times do
  l, r = gets.split.map(&:to_i)
  puts k[r] - k[l - 1]
end

Measured memory_bytes: 15628
#include <iostream>
#include <iomanip>
#include<math.h>
#include<list>
#include <algorithm>
#include<set>
#include<vector>
#include<math.h>
#include<map>
#include<string>
#include <numeric>
#include <queue>
#include <sstream>
#include <bitset>
#include<stack>

using namespace std;
using ll = long long;
using vll = vector<long long>;
using sll = set<long long>;

template<typename T>
T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template<typename T>
T lcm(T a, T b) { return a / gcd(a, b) * b; }

template<typename T>
map<T, T> getPrimeFactor(T n) {
	map<T, T> res;
	for (T i = 2; i * i <= n; ++i) {
		while (n % i == 0) {
			res[i] ++;
			n /= i;
		}
	}
	if (n != 1) res[n] = 1;
	return res;
}

template<typename T>
bool IsPrimeNumber(T num)
{
	if (num <= 2) return true;
	else if (num % 2 == 0) return false;

	double sqrtNum = sqrt(num);
	for (int i = 3; i <= sqrtNum; i += 2)
	{
		if (num % i == 0)
		{
			return false;
		}
	}

	return true;
}

long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}


#define in(x) cin >> x
#define out(x) cout << x
#define outn(x) cout << x << '\n'
#define outs(x) cout << x << ' '
#define rep(i,s,e) for(ll i=s;i<e;i++)
#define repeq(i,s,e) for(ll i=s;i<=e;i++)


int main() {
	
	map<ll, bool> flg;
	ll n,a;
	std::cin >> n;
	
	rep(i, 0, n) {
		std::cin >> a;
		if (flg[a]) {
			std::cout << "NO" << endl;
			return 0;
		}
		flg[a] = true;
	}

	std::cout << "YES" << endl;
	return 0;
}

Measured memory_bytes: 12800
// Problem : A - Frog 1
// Contest : Educational DP Contest
// URL : https://atcoder.jp/contests/dp/tasks/dp_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/coder3101/cp-editor)

#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>

using namespace std;

int main()
{
    int n;
    cin >> n;
    int h[n + 1];
    for (int t = 1; t < n + 1; t++)
        cin >> h[t];
    int dp[n + 1];
    dp[1] = 0;
    dp[2] = abs(h[1] - h[2]);
    for (int t = 3; t < n + 1; t++)
        dp[t] = min(abs(h[t - 1] - h[t]) + dp[t-1], abs(h[t - 2] - h[t]) + dp[t-2]);
    cout << dp[n];
    return 0;
}


Measured memory_bytes: 1024
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = sc.nextInt();
		int W = sc.nextInt();

		int h [] = new int [H];
		int w [] = new int [W];
		char grid [] [] = new char [H][W];
		
		
		for (int i=0; i<H; i++){
			String temp = sc.next();
			boolean hh = false;
			
			for (int j=0; j<W; j++){
				grid [i][j] = temp.charAt(j);
				if (temp.charAt(j)=='#'){
					hh=true;
					w[j]=1;
				}
			}
			
			if (hh)
				h[i]=1;
		} 
		
		for (int i=0; i<H; i++){
			
			for (int j=0; j<W; j++){
				if (h[i]==1 && w[j]==1)
					System.out.print(grid[i][j]);
			}
			
			if (h[i]==1)
				System.out.println();
		}	
		
		sc.close();
	}

}


Measured memory_bytes: 26224
#include <bits/stdc++.h>
#define F first
#define S second
#define all(a) a.begin(),a.end()
#define setDP(arr) memset(arr,-1,sizeof arr)
#define Clear(arr) memset(arr,0,sizeof arr)
#define oo 2000000000
#define inf 1000000000000000000
#define P1 31
#define P2 37
#define M  1000000007
#define M2 1000000009
#define pii pair<ll,ll>
typedef long long ll;
using namespace std;
const int N = 355001;
const int SQRTN = 320;
const int LOGN = 20;
const long double PI = acos(-1);
const long double TAU = 2*PI;

ll n,p,a[N],ans,dp[55][55];

ll calc(int idx, int sum){
    if(idx==n)return sum%2==p;
    ll&ret = dp[idx][sum];
    if(ret!=-1)return ret;
    ret = calc(idx+1,sum+a[idx]);
    ret +=calc(idx+1,sum);
    return ret;
}

signed main(){
    cin >> n >> p ;
    for(int i = 0 ; i <n ; i++){
        cin >> a[i];
        a[i]%=2;
    }
    setDP(dp);
    cout << calc(0,0);
}

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

int main()
{
  int a, b, c;
  cin >> a >> b >> c;
  
  int tmp;
  tmp = b;
  b = a;
  a = tmp;

  tmp = c;
  c = a;
  a = tmp;

  cout << a << " " << b << " " << c << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, l, r) for (int i = l; i <= (int)(r); i++)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define all(v) v.begin(), v.end()
#define MOD (int) (1e9+7)
#define INF (int) 1e9
#define LLINF (ll) 1e18

vector<int> edges[100005];

int main(){
    int n, m;
    cin >> n >> m;
    int h[n];
    rep(i, n) cin >> h[i];
    rep(i, m){
        int a, b;
        cin >> a >> b;
        a--;
        b--;
        edges[a].emplace_back(b);
        edges[b].emplace_back(a);
    }

    int ans = 0;
    rep(i, n){
        bool ok = true;
        for (auto ei : edges[i]){
            if(h[ei] >= h[i]) ok = false;
        }
        if(ok) ans++;
    }

    cout << ans << endl;
    // printf("%d\n", N);
    return 0;
}

Measured memory_bytes: 9156
import math
from collections import defaultdict
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:input()

"""========main code==============="""
t=1
#t=ii()
for _ in range(t):
    a,b,c=ml()
    if(b*c>=a):
        print("Yes")
    else:
        print("No")

Measured memory_bytes: 65072