akhauriyash/Code-Regression huggingface dataset:
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Stack;

public class Main{
	public static class FastReader {
		BufferedReader br;
		StringTokenizer root;
		
 
		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}
 
		String next() {
			while (root == null || !root.hasMoreTokens()) {
				try {
					root = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return root.nextToken();
		}
 
		int nextInt() {
			return Integer.parseInt(next());
		}
 
		double nextDouble() {
			return Double.parseDouble(next());
		}
 
		long nextLong() {
			return Long.parseLong(next());
		}
 
		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static int mod = (int) (1e9+7);
	static long cf = 998244353;
    static final int MAX = (int) 1e6;
    public static List<Pair>[] edges;
    public static int[][] parent;
    public static int col = 20;
    public static long[] Bit;
    public static long[] fac,inv;
    public  static int[] prime; 
    public static long[] dp;
	public static FastReader sc = new FastReader();
	public static void main(String[] args) {
	//	Scanner sc = new Scanner(System.in);
 
		 int n = sc.nextInt();
	     int k = sc.nextInt();
	     int q = sc.nextInt();
	     int[] a = new int[n];
	     Arrays.fill(a,k - q);

	     for(int i=0;i<q;++i) {
	    	 int idx = sc.nextInt()-1;
	    	 a[idx]++;
	     }
	       for(int i=0;i<n;++i) {
	    	   if(a[i] > 0) out.println("Yes");
	    	   else out.println("No");
	       }
	    
	 
		 
		out.close();
	}

	
	static class Pair{
		int x;
		int y;
		Pair(int x,int y){
			this.x = x;
			this.y = y;
		}
	}
	
}

Measured memory_bytes: 36712
#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let v = read_vec::<i64>();
    let (h, n) = (v[0], v[1] as usize);
    let a = read_vec::<i64>();
    if a.iter().sum::<i64>() >= h {
        println!("Yes");
    } else {
        println!("No");
    }
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}


Measured memory_bytes: 6396
#include <bits/stdc++.h>
using namespace std;
int main(){int n,a=0,j,i,r;cin>>n;for(i=1;i<=n;i+=2){r=2;for(j=2;j<=i/2;++j)if(i%j==0)++r;a+=r==8;}cout<<a<<'\n';}

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

int n;
std::pair<unsigned int, int> arr[210];

int main() {
    while(std::cin >> n, n) {
        int m, a, b;
        for(int i = 0; i < n; ++i) {
            std::cin >> m >> a >> b;

            arr[i * 2] = std::make_pair(a, m);
            arr[i * 2 + 1] = std::make_pair(b, -m);
        }

        std::sort(arr, arr + n * 2);

        int w = 0;
        bool ok = true;
        for(int i = 0; i < n * 2; ++i) {
            w += arr[i].second;

            if(w > 150) {
                ok = false;
                break;
            }
        }

        std::cout << (ok ? "OK" : "NG") << std::endl;
    }
}

Measured memory_bytes: 1156
# -*- coding: utf-8 -*-
n, m = [int(x) for x in input().split()]
adj = [[0]*n for i in range(n)]
visited = [0]*n
for i in range(m):
    a, b = [int(x) for x in input().split()]
    adj[a-1][b-1] = 1
    adj[b-1][a-1] = 1

ans = 0
def dfs(v):
    global ans
    if sum(visited) == n:
        ans += 1
    for i in range(n):
        if adj[v-1][i] == 1 and visited[i] == 0:
            visited[i] = 1
            dfs(i+1)
            visited[i] = 0

visited[0] = 1
dfs(1)
print(ans)

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

int main(){
  int A,B;
  cin>>A>>B;
  if(A==1){
    A+=13;
  }
  if(B==1){
    B+=13;
  }
  if(A>B){
    cout<<"Alice"<<endl;
  }
  else if (A<B){
    cout<<"Bob"<<endl;
  }
  else if (A==B){
    cout<<"Draw"<<endl;
  }
}



Measured memory_bytes: 256
#include <iostream>
#include <cctype>
#include <string>

int main() {
  std::string s, p;
  std::cin >> s;
  std::cin >> p;
  s += s;
  if (s.find(p) != std::string::npos) {
    std::cout << "Yes" << "\n";
  } else {
    std::cout << "No" << "\n";
  }
}


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

using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define ll long long int
#define INF 1000000007
// cin.eof() 入力個数の問題
int main(){
int k;
cin>>k;
string s;
cin>>s;
if(s.size()<=k){
  cout<<s<<endl;
}else
{
  s.erase(k);
  s+="...";
cout<<s<<endl;
}




  return 0;
}


Measured memory_bytes: 3628
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <tuple>
#include <numeric>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;

// Binary Index Treeは長さnの数列に対して
// 1. 区間[a,b)にxを加算する
// 2. 区間[a,b)の総和を求める
// という操作をO(log(n))で処理できる
 
// 区間加算にも対応したBinary Index Tree(1-indexで使うことに気をつける)
template <class Abel> struct BIT {
    
    vector<Abel> dat[2];
    Abel UNITY_SUM = 0;
    
    BIT(ll n) { 
        init(n);
    }
 
    void init(ll n) { 
        for(ll iter = 0; iter < 2; ++iter) {
            dat[iter].assign(n+1, UNITY_SUM); 
        }
    }
    
    inline void sub_add(ll p, ll a, Abel x) {
        for(ll i = a; i < (ll)dat[p].size(); i += i & -i) {
            dat[p][i] = dat[p][i] + x;
        }
    }

    inline Abel sub_sum(ll p, ll a) {
        Abel res = UNITY_SUM;
        for(ll i = a; i > 0; i -= i & -i) {
            res = res + dat[p][i];
        } 
        return res;
    }

    // 区間[a,b)にxを加算する(a,bは1-index)
    inline void add(ll a, ll b, Abel x) {
        sub_add(0, a, x * -(a - 1)); 
        sub_add(1, a, x);
        sub_add(0, b, x * (b - 1));
        sub_add(1, b, x * (-1));
    }
    
    // 区間[a,b)の総和を計算する(a,bは1-index)
    inline Abel getsum(ll a, ll b) {
        return sub_sum(0, b - 1) + sub_sum(1, b - 1) * (b - 1) - sub_sum(0, a - 1) - sub_sum(1, a - 1) * (a - 1);
    }
};

int main() {
    ll n, q;
    cin >> n >> q;

    vl a(n+1);
    exrep(i, 1, n) {
        cin >> a[i];
    }

    BIT<ll> biT(n+10);
    exrep(i, 1, n) {
        biT.add(i, i+1, a[i]);  // biT[i]をa[i]で初期化
    }

    rep(i, q) {
        ll t;
        cin >> t;
        if(t == 0) {
            ll p, x;
            cin >> p >> x;
            p++;  // pを1-indexにする 
            biT.add(p, p+1, x);
        }
        else if(t == 1) {
            ll L, R;
            cin >> L >> R;
            L++;  R++;  // L,Rを1-indexにする
            out(biT.getsum(L, R)); 
        }
    }
    
    re0;
}

Measured memory_bytes: 16052
#include <bits/stdc++.h>
#define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a)
#define rep2(i, s, n) rep3(i, s, n, 1)
#define rep(i, n) rep2(i, 0, n)

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;

int main(){
    int n, x, t;
    cin>> n >> x >> t;
    cout << t * ((n-1) / x + 1) << endl;
    return 0;
}

Measured memory_bytes: 3592
class UnionFind:
    def __init__(self, size):
        self.data = [-1] * size
    def find(self, x):
        if self.data[x] < 0:
            return x
        else:
            self.data[x] = self.find(self.data[x])
            return self.data[x]
    def union(self, x, y):
        x, y = self.find(x), self.find(y)
        if x != y:
            if self.data[y] < self.data[x]:
                x, y = y, x
            self.data[x] += self.data[y]
            self.data[y] = x
        return (x != y)
    def same(self, x, y):
        return (self.find(x) == self.find(y))
    def size(self, x):
        return -self.data[self.find(x)]


N, M, K, *ABCD = map(int, open(0).read().split())
AB, CD = ABCD[:2 * M], ABCD[2 * M:]

E = [[] for _ in range(N + 1)]
uf = UnionFind(N + 1)
for a, b in zip(*[iter(AB)] * 2):
    uf.union(a, b)
    E[a].append(b)
    E[b].append(a)

B = [[] for _ in range(N + 1)]
for c, d in zip(*[iter(CD)] * 2):
    B[c].append(d)
    B[d].append(c)

A = []
for i in range(1, N + 1):
    A.append(uf.size(i) - 1 - len(E[i]) - sum(1 for b in B[i] if uf.same(b, i)))

print(*A)

Measured memory_bytes: 53124
#include<iostream>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int x=0;
	if(a==b)
	x++;
	if(b==c)
	x++;
	if(a==c)
	x++;
	if(x==1)
	cout<<"Yes";
	if(x!=1)
	cout<<"No";
 } 

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define MOD 1000000007
#define pb push_back
#define int long long
#define bw(i,r,l) for (int i=r-1;i>=l;i--)
#define fw(i,l,r) for (int i=l;i<r;i++)
#define fa(i,x) for (auto i:x)
using namespace std;
const int N=2e5+5;
int h,w,a,b;
int fac[N+1];
struct math {
	int fpow(int a,int p,int mod) {
		if (!p) return 1;
		int ans=fpow(a,p>>1,mod); ans*=ans; ans%=mod;
		if (p&1) {ans*=a; ans%=mod;}
		return ans;
	}
	int inv(int a,int mod) {return fpow(a,mod-2,mod);}
	void preC(int n,int mod) {
		fac[0]=1;
		fw (i,1,n+1) fac[i]=fac[i-1]*i%mod;
	}
	int getC(int k,int n,int mod) {if (k<0) return 0; if (k>n) return 0; if (!k) return 1; return fac[n]*inv(fac[k]*fac[n-k]%mod,mod)%mod;}
} m;
int ans=0;
signed main() {
	//freopen("aome.inp","r",stdin);
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	cin>>h>>w>>a>>b;
	/*
	Use inclusion - exlusion, we will count number of invalid paths
	Invalid path: A path that will enter the forbidden area at some point
	Check through all first columns of the forbidden area, we can see a valid path always go from
	the spot right above it down to it. So we just count easily.
	*/
	m.preC(N,MOD);
	ans=m.getC(w-1,h+w-2,MOD);
	fw (i,1,b+1) {
		//cout<<"Reach: "<<m.getC(i-1,h-a+i-2,MOD)<<", to end: "<<m.getC(a-1,w-i+a-1,MOD)<<"\n";
		ans-=m.getC(i-1,h-a+i-2,MOD)*m.getC(a-1,w-i+a-1,MOD)%MOD;
		if (ans<0) ans+=MOD;
	}
	cout<<ans;
	return 0;
}

Measured memory_bytes: 1792
from math import floor
from fractions import gcd


def lcm(x, y):
    return x*y//gcd(x, y)


A, B, C, D = map(int, input().split())

LCM = lcm(C, D)

x = B // C
y = B // D
z = B // LCM
ans = B-x-y+z

x = (A-1) // C
y = (A-1) // D
z = (A-1) // LCM

ans -= (A-1) - x - y + z

print(ans)


Measured memory_bytes: 5048
import java.util.*;
class Main {
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		String s = sc.next();
		if(a >= 3200) {
			System.out.println(s);
		}else {
			System.out.println("red");
		}
	}
}

Measured memory_bytes: 20948
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se second
#define mp make_pair
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,K,Q,A,B;
string S, T;
//const ll MOD = 998244353;
const ll MOD = (1e+6) + 3;
const ll INF = 1LL << 60;
typedef pair<ll,ll> P;

ll fastpow(ll a, ll pw) {
	ll res = 1;
	while (pw) {
		if (pw & 1) res = res * a % MOD;
		a = a * a % MOD;
		pw >>= 1;
	}
	return res;
}

int main() {
    const ll mod = 1e+6 + 3;
    vec sum(mod, 1);
    ll temp = 1;
    reps(i,1,mod) {
        sum[i] = temp;
        (temp *= i + 1)%=mod;
    }
    cin>>Q;
    rep(i,Q){
        ll x, d, n;
        cin>>x>>d>>n;
        if(d == 0){
            cout<<fastpow(x, n)<<endl;
        }else {
            (x *= fastpow(d, mod - 2)) %= mod;
            if (x + n - 1 >= mod || x == 0) cout << 0 << endl;
            else cout << ((sum[x + n - 1] * fastpow(sum[x - 1], mod - 2)) % mod) * fastpow(d, n) % mod << endl;
        }
    }
}

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

#define ull unsigned long long
#define ul unsigned long
#define ll long long
#define size_t long long
// sort(&a[0], &a[4], [](auto& x, auto& y){return x[0] < y[0];});
//accumulate(&arr2[n], &arr2[m-1], 0);
using namespace std;

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

  int X,A; std::cin >> X >> A;

  std::cout << ((X < A)?0:10) << '\n';

  return 0;
}


Measured memory_bytes: 256
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#include <set>
#include <unordered_set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <complex>
#include <regex>
#include <locale>
#include <random>
#include <type_traits>

using namespace std;

#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}

using LL = long long;

//~~~~~~~~~~~~~~~~~~~~~_(＾～＾ ｣ ∠)_~~~~~~~~~~~~~~~~~~~~~

int main() {

    int N, A, B;
    cin >> N >> A >> B;

    cout << min(A * N, B) << endl;

}

































Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const long long INF = (1LL << 32);
const long long MOD = 1000000007;
const long double PI = 3.1415926;
#define FOR(i,r,n) for(ll i = (ll)(r); i < (ll)(n); i++)
#define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define RALL(x) x.rbegin(),x.rend()
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<pair<ll, ll> > vp;
typedef vector<string> vs;
typedef vector<char> vc;
typedef list<ll> lst;
typedef pair<ll, ll> P;
template <class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <class T> T &chmax(T &a, const T &b) { return a = max(a, b); }

ll n, m, k, ans = 0, sum = 0, cnt = 0;
string s;
//char c;

#define Endl endl

/*--------------------template--------------------*/


int main() {
    cin >> s;
    if(s.size()==2){
        if(s[0]!=s[1]){
            cout << "-1 -1" << endl;
        }else{
            cout << "1 2" << endl;
        }
        return 0;
    }
    REP(i,s.size()-2) {
        string t = s.substr(i, 3);
        sort(ALL(t));
        if(t[0]==t[1]||t[1]==t[2]){
            cout << i + 1 << " " << i + 3 << endl;
            return 0;
        }
    }
    cout << "-1 -1" << endl;
}

Measured memory_bytes: 512
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		String str1 = sc.nextLine();
		String str2 = sc.nextLine();
		sc.close();
		String str3 = str2.substring(0, str1.length()) ;
			String ans = "No";

		if (str3.compareTo(str1)==0) {
			ans = "Yes";
		}
		System.out.println(ans);
	}
}


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

int main() {
	int N;
	cin >> N;
	vector<int> d(N);
	rep(i, N) {
		cin >> d.at(i);
	}
	int ans = 0;
	rep(i, N) {
		for (int j = i + 1;j < N;++j) {
			ans += d.at(i) * d.at(j);
		}
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

# http://mkan-0141.hatenablog.com/entry/2018/02/18/224008


C = []
for i in range(3):
    x = list(map(int, input().split()))
    C.append(x)

if(C[0][0] - C[0][1] == C[1][0] - C[1][1] and # a1のb1<>b2 と a2のb1<>b2の比較
   C[1][0] - C[1][1] == C[2][0] - C[2][1] and # a2のとa3の b1<>b2の比較
   C[0][1] - C[0][2] == C[1][1] - C[1][2] and # a0のとa1のb2<>b3の比較
   C[1][1] - C[1][2] == C[2][1] - C[2][2]):   # a2のとa3のb2<>b3の比較
    print('Yes')
else:
    print('No')


Measured memory_bytes: 3064
#include <cstdlib>
#include <climits>
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <complex>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <utility>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <regex>

#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/multi_array.hpp>

using namespace std;

int main()
{
    size_t N;
    std::cin >> N;

    std::vector<uint64_t> A;
    for (size_t i = 0; i < N; ++i) {
        uint64_t t;
        std::cin >> t;
        A.push_back(t);
    }

    // 降順ソート
    std::sort(std::begin(A), std::end(A),
              [](const auto& a, const auto& b) {
                  return a > b;
              });

    for (size_t i = 0; i < N - 1; ++i) {
        if (A[i] == A[i+1]) {
            for (size_t j = i+2; j < N - 1; ++j) {
                if (A[j] == A[j+1]) {
                    std::cout << A[i]*A[j] << std::endl;
                    return 0;
                }
            }
            break;
        }
    }

    std::cout << 0 << std::endl;

    return 0;
}


Measured memory_bytes: 1400
m,d = map(int,input().split())
count = 0
for i in range(1,m+1):
    for j in range(1,d+1):
        if j >= 22:
            d_s = str(j)
            if int(d_s[0])*int(d_s[1])==i and (int(d_s[0])>=2 and int(d_s[1])>=2):
                count += 1
print(count)

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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

int main(){
	ll N;
	cin >> N;
	vector<ll> a(N), b(N);
	REP(i, N) cin >> a[i];
	REP(i, N) cin >> b[i];
	vector<ll> c(N), d(N);
	vector<ll> bits(30);
	REP(k, 30){

		//printf("k: %d\n", k);

		ll res = 0;
		REP(i, N){
			c[i] = a[i]%(1<<(k+1));
			d[i] = b[i]%(1<<(k+1));
		}
		sort(d.begin(), d.end());

		/*
		REP(i, N){
			cout << c[i] << " ";
		}
		cout << endl;
		REP(i, N){
			cout << d[i] << " ";
		}
		cout << endl;
		*/

		ll T = (1<<k);
		REP(i, N){
			ll res1 = (lower_bound(d.begin(), d.end(), 2*T-c[i]) - lower_bound(d.begin(), d.end(), T-c[i]));
			ll res2 =  (lower_bound(d.begin(), d.end(), 4*T-c[i]) - lower_bound(d.begin(), d.end(), 3*T-c[i]));
			res += res1;
			res += res2;
		}
		bits[k] = (res%2);
	}

	ll ans = 0;
	REP(k, 30){
		ans += (bits[k]*(1<<k));
	}
	cout << ans << endl;
    return 0;
}

Measured memory_bytes: 8576
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(begin, i, end) for (int i = begin; i < (int)(end); i++)
#define all(v) v.begin(), v.end()
const int MOD = 1000000007;

int main()
{
    ll N, K;
    cin >> N >> K;
    cout << min(N % K, abs(K - N % K)) << endl;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
 
int main(){
 int a,b,c;
  int A;
 cin>>A;
  a=A/100;
  b=A/10-a*10;
  c=A-a*100-b*10;
 
 if(a==1 && b==1 && c==1){
   cout<<3<<endl;
 }
 
 else if((a==1 && b==1) || (a==1 && c==1) || (b==1 &&c==1)){
   cout<<2<<endl;
 }
 else if(a==1 || b==1 || c==1){
   cout<<1<<endl;
 }
   else{
     cout<<0<<endl;
   }
 }


Measured memory_bytes: 256
/*
　　　∫ ∫ ∫
　　　ノヽ
　　（＿　 ）
　（＿　　　 ）
（＿＿＿＿＿＿ ）
　ヽ(´･ω･)ﾉ　
　　 |　 /
　　 UU
*/
#pragma region macro
#include <bits/stdc++.h>
typedef long long int64;
using namespace std;
using P = pair<int64, int64>;
typedef vector<int> vi;
const int MOD = (int)1e9 + 7;
const int64 INF = 1LL << 62;
const int inf = 1<<30;
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; }
#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i,s,n) for (int i = s; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end() //コンテナじゃないと使えない!!
#define debug(x) cerr << #x << ": " << x << "\n";
#define mp make_pair
#define bn '\n'
template <typename T>
ostream& operator<<(ostream& os, const vector<T> &V){
    int N = V.size();
    REP(i,N){
        os << V[i];
        os << "\n";
    }
    return os;
}
template <typename T,typename S>
ostream& operator<<(ostream& os, pair<T,S> const&P){
    os << "(";
    os << P.first;
    os << " , ";
    os << P.second;
    os << ")";
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, set<T> &S){
    auto it=S.begin();
    while(it!=S.end()){
        os << *it;
        os << " ";
        it++;
    }
    os << "\n";
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, deque<T> &q){
    for(auto it=q.begin();it<q.end();it++){
        os<<*it;
        os<<" ";
    }
     os<<endl;
    return os;
}
vector<pair<int,int>> dxdy = {mp(0,1),mp(1,0),mp(-1,0),mp(0,-1)};
#pragma endregion
//fixed<<setprecision(10)<<ans<<endl;



int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N,M;
    cin >> N >> M;

    vector<vector<int>> edge(N);
    vector<int> indegree(N,0);
    REP(i,M){
        int a,b;
        cin >> a >> b;
        edge[--a].emplace_back(--b);
        indegree[b]++;
    }

    vector<int> ans;
    bool flag = false;
    queue<int> q;
    REP(i,N){
        if(indegree[i] == 0){
            q.push(i);
        }
    }

    while(not q.empty()){
        if(q.size() >= 2) flag = true;
        int v = q.front(); q.pop();
        ans.emplace_back(v+1);
        for(auto to:edge[v]){
            indegree[to]--;
            if(indegree[to] == 0){
                q.push(to);
            }
        }
    }

    cout << ans << flag << bn;

}


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

// 0 -> lose
// 1 -> win
int a[1000][1000];
int f(int x, int y) {
  if (a[x][y] > -1) {
    return a[x][y];
  }
  for (int i=2; i<=x; i+=2) {
    if (f(x-i, y+i/2) == 0) {
      a[x][y] = 1;
      return 1;
    }
  }
  for (int i=2; i<=y; i+=2) {
    if (f(x+i/2, y-i) == 0) {
      a[x][y] = 1;
      return 1;
    }
  }
  a[x][y] = 0;
  return 0;
}
int main() {
  long long x, y;
  cin>>x>>y;
  if (abs(x - y) <= 1) {
    cout<<"Brown"<<endl;
  } else {
    cout<<"Alice"<<endl;
  }
  /*
  for (int i=0; i<1000; i++) {
    for (int j=0; j<1000; j++) {
      if (i + j <= 1) {
        a[i][j] = 0;
      } else if (i == 1 && j == 1) {
        a[i][j] = 0;
      } else {
        a[i][j] = -1;
      }
    }
  }
  for (int i=0; i<=x+y/2; i++) {
    for (int j=0; j<=y+x/2; j++) {
      if (a[i][j] == -1) {
        f(i, j);
      }
    }
  }
  for (int i=0; i<=x+y/2; i++) {
    for (int j=0; j<=y+x/2; j++) {
      printf("%3d ", a[i][j]);
    }
    cout<<endl;
  }
  */
}

Measured memory_bytes: 256
N = int(input())
hen = list(map(int, input().split()))

kosu = 0

if N <= 2:
    print(kosu)

else:
    for i in range(N - 2):
        for j in range(i + 1, N - 1):
            for k in range(j + 1, N):
                if hen[i] != hen[j] and hen[j] != hen[k] and hen[k] != hen[i]\
                and hen[i] + hen[j] > hen[k] and hen[k] + hen[i] > hen[j] and hen[j] + hen[k] > hen[i]\
                and i < j < k:
                    kosu += 1

    print(kosu)

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


//      DEEP


using namespace std;
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define fwd(i,a,n) for(int i=a;i<=n;i++)
#define bak(i,a,n) for(int i=a;i>=n;i--)
#define all(v) v.begin(),v.end()
#define pb push_back

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;
typedef set<int> si;
const ll mod = 1e9 + 7;
ull power(ull x,ull y){
   if(y==0) return 1;
   else{
     if(y%2==0) return power(x*x,y/2);
     else return x*power(x*x,(y-1)/2);
   }
}
ull gcd(ull x,ull y){
   if(y==0)return x;
   return gcd(y,x%y);
}
int main(){
    boost;
    int TESTS=1;
    //cin>>TESTS;
    while(TESTS--){
      string s;
      cin>>s;
      if(s=="ABC")cout<<"ARC"<<endl;
      else cout<<"ABC"<<endl;
    }
}
/* Be careful about integer ranges;
   Check the corner cases before submitting.
*/




Measured memory_bytes: 3640
def main():
    n = int(input())
    s = int(input())

    def check(a, i):
        ans = 0
        while a:
            ans += a % i
            a //= i
        return ans

    for i in range(2, int(n**0.5)+2):
        if check(n, i) == s:
            print(i)
            return 0
    for i in range(int(n**0.5), 0, -1):
        if (n-s) % i == 0:
            b = (n-s)//i+1
            x = s-i
            if x < 0:
                continue
            if b > x:
                print(b)
                return 0
    if n == s:
        print(n+1)
    else:
        print(-1)


main()


Measured memory_bytes: 3188
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	string s,t;
	cin >> s >> t;
	sort(s.begin(),s.end());
	sort(t.begin(),t.end(),greater<char>());
	int k = s.length()>t.length() ? t.length():s.length();
	bool ans=true;
	int i;
	for(i=0;i<k;i++){
		if(s[i]<t[i]) {
			ans=true;
			break;
		}else if(s[i]>t[i]){
			ans=false;
			break;
		}
	}
	if(i==k && s.length()>=t.length()) ans=false;
	if(ans) cout << "Yes" << endl;
	else cout << "No" << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define li long
#define ll long long
#define ull unsigned long long
#define ff first
#define ss second
#define pii pair<int,int>
#define pli pair<li,li>
#define pll pair<ll,ll>
#define pb push_back
#define fori(i,k,n) for(int i = k;i<n; i++)
#define rfori(i,k,n) for(int i = k; i>=n; i--)
#define tc int t;cin>>t;while(t--)
#define all(v) v.begin(),v.end()
#define inf INT_MAX
#define ninf INT_MIN
#define W(x) cout<<x<<endl
#define WW(x,y) cout<<x<<' '<<y<<endl;
#define in(x) cin>>x
const ll mod1 = 99844353;
const ll mod2 = 1e9+7;
template <class T>
using oset = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

void fastio()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

ll power(ll x,ll y){
    ll res = 1;
    
    while(y>0){
        if(y&1)res = (res*x);
        y>>=1;
        x = (x*x);
    }
    return res;
}

ll power(ll x,ll y,ll p){
    ll res = 1;
    x%=p;
    while(y>0){
        if(y&1)res = (res*x)%p;
        y>>=1;
        x = (x*x)%p;
    }
    return res;
}

const int N = 1e5+1;
const int M = 1e5+1;
map<int,vector<int>> mp;
vector<int> H(N);
int n,m,a,b;

int main(){
	fastio();
	cin>>n>>m;
	mp.clear();
	H.clear();
	fori(i,0,n)cin>>H[i+1];
	for(int i = 0; i<m; i++){
		cin>>a>>b;
		mp[a].pb(b);
		mp[b].pb(a);
	}
	int ans = 0;
	for(int i = 1; i<=n; i++){
		if(mp.find(i)==mp.end())ans++;
		else{
			bool ok = 1;
			int maxh = H[i];
			for(int &v:mp[i]){
				if(maxh<=H[v])ok&=0;
			}
			if(ok)ans++;
		}
	}
	cout<<ans<<"\n";
}

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

#define rep(i, x, n) for (int i = x; i < n; i++)
typedef long long ll;

const int INF = 1e9 + 7;

using namespace std;

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

	int n, m;
	cin >> n >> m;

	vector<string> a(n);
	vector<string> b(m);
	rep (i, 0, n)
		cin >> a[i];
	rep (i, 0, m)
		cin >> b[i];

	rep(i, 0, n) {
		rep (j, 0, n) {
			if (n - i >= m && n - j >= m) {
				bool judge = true;
				rep (k, 0, m) {
					rep (l, 0, m) {
						if (a[i + k][j + l] != b[k][l]) {
							judge = false;
							k = m;
							break;
						}
					}
				}
				if (judge) {
					cout << "Yes" << endl;
					return 0;
				}
			}
		}
	}

	cout << "No" << endl;
	return 0;
}


Measured memory_bytes: 256
X = int(input())

if 400 <= X <= 599:
    print('8')
elif 600 <= X <= 799:
    print('7')
elif 800 <= X <= 999:
    print('6')
elif 1000 <= X <= 1199:
    print('5')
elif 1200 <= X <= 1399:
    print('4')
elif 1400 <= X <= 1599:
    print('3')
elif 1600 <= X <= 1799:
    print('2')
elif 1800 <= X <= 1999:
    print('1')

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

using namespace std;

int main() {
    int n = 0;
    cin >> n;
    int h[n] = {};
    int dp[n] = {};
    h[0] = 0;
    for(int i = 0; i < n; i++) {
        cin >> h[i];
    }
    for(int i = 1; i < n; i++) {
        if(i == 1 || min(dp[i-1]+abs(h[i-1]-h[i]), dp[i-2]+abs(h[i-2]-h[i]))==dp[i-1]+abs(h[i-1]-h[i])) {
            dp[i] = dp[i-1]+abs(h[i-1]-h[i]);
        } else {
            dp[i] = dp[i-2]+abs(h[i-2]-h[i]);
        }
    }
    cout << dp[n-1] << endl;
}


Measured memory_bytes: 1024
# coding: utf-8

num = int(input())

shain = input().split(" ")
kazu = []
for i in range(len(shain)):
    shain[i] = int(shain[i])
    
for i in range(num):
    kazu.append(0)
    
for j in range(len(shain)):
    kazu[shain[j] - 1] += 1
    
for k in range(num):
    print(kazu[k])
    

Measured memory_bytes: 103652
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin())  // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#ifdef _DEBUG
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
#else
#define debug(x)
#endif
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr double PI = 3.141592653589793238462643383279;
ll getDigit(ll x) {
  return x == 0 ? 1 : log10(x) + 1;
}

ll gcd(ll x, ll y) {
  return y ? gcd(y, x % y) : x;
}

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

vector<P> factorize(ll n) {
  vector<P> result;
  for (ll i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      result.pb({i, 0});
      while (n % i == 0) {
        n /= i;
        result.back().second++;
      }
    }
  }
  if (n != 1) {
    result.pb({n, 1});
  }
  return result;
}

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

template <typename T>
void debugV(const vector<T> v) {
#ifdef _DEBUG
  rep(i, v.size()) {
    cout << i << ":" << v[i] << " ";
  }
  cout << endl;
#else
  (void)v;
#endif
}

signed main() {
  ll N, K;
  cin >> N >> K;
  vll x(N);
  rep(i, N) {
    cin >> x[i];
  }

  ll ans = INF;
  rep(i, N) {
    if (i + K - 1 >= N) {
      continue;
    }

    ll l = x[i];
    ll r = x[i + K - 1];
    // debug(l);
    // debug(r);
    // debug(ans);
    if (r <= 0) {
      ans = min(ans, abs(l));
      continue;
    }

    if (l < 0 && 0 < r) {
      if (abs(l) < abs(r)) {
        ans = min(ans, abs(r) + 2 * abs(l));
      } else {
        ans = min(ans, abs(l) + 2 * abs(r));
      }
      continue;
    }

    if (0 <= l) {
      ans = min(ans, abs(r));
      continue;
    }
  }
  COUT(ans);
  return 0;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define fastio()                  \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
#define pb push_back
#define show(x) cout << (#x) << " : " << x << endl;
#define ll long long
#define ld long double

#define mp make_pair
#define ff first
#define ss second
#define pii pair<ll, ll>
#define sq(x) ((x) * (x))
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
const ll MOD = 1000 * 1000 * 1000 + 7;
using namespace std;



ll N;



ll p[100005];


ll dp[100005];


ll rec(ll idx,ll D)
{
  
if (idx+1>D-1)
return 0;  

if (dp[idx]!=INT_MAX)
return dp[idx];
else if (idx==N-2) 
return dp[idx]=min(abs(p[idx]-p[idx+1])+rec(idx+1,D),LLONG_MAX);
else
return dp[idx]=min(abs(p[idx]-p[idx+1])+rec(idx+1,D),abs(p[idx]-p[idx+2])+rec(idx+2,D));



}



int main()
{


fastio();

cin>>N;

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

fill(dp,dp+N,INT_MAX);

ll k=rec(0, N);

cout<<k;
    
return 0;
}


Measured memory_bytes: 4224
import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
      	int n = Integer.parseInt(line);
      
      	int x = n % 1000;
      	int answer = 0;
      	if(x > 0){
          answer = 1000 - x;
        }
      System.out.println(String.valueOf(answer));
    }
}

Measured memory_bytes: 35744
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner scanner = new Scanner(System.in);
		int A = scanner.nextInt();
		int B = scanner.nextInt();
		scanner.close();

		if (((A + B) & 1) == 0)
			System.out.println((A + B) >> 1);
		else
			System.out.println("IMPOSSIBLE");
	}
}

Measured memory_bytes: 23124
#include<iostream>
using namespace std;
int main(){
  long long i=1,k=0,c=0;
  cin>>k;
  for(i=1;i<=k;i++){
    c=(c*10)+7;
    c%=k;
    if(c==0){
      cout<<i<<endl;
      return 0;
    }
  }
  cout<<"-1";
}

Measured memory_bytes: 3620
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;

public class Main {
    static int[] painted;
    static Queue[] a;
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(stdR.readLine());
        a = new Queue[N];
        for(int i = 0 ; i < N ; i++) {
            a[i] = new LinkedList<String>();
        }
        painted = new int[N];//0 undef 1 white 2 black
        Queue<String> q = new LinkedList<String>();
        for(int i = 0 ; i < N - 1 ; i++) {
            String[] strs = stdR.readLine().split(" ");
            int u = Integer.parseInt(strs[0]) - 1;
            int v = Integer.parseInt(strs[1]) - 1;
            int w = Integer.parseInt(strs[2]);
            if(u > v) {
                int tmp = u;
                u = v;
                v = tmp;
            }
            a[u].add(v+" "+w);
            a[v].add(u+" "+w);
        }
        String[] s = a[0].poll().toString().split(" ");
        int v = Integer.parseInt(s[0]);
        int w = Integer.parseInt(s[1]);
        if(w % 2 == 0) {
            painted[0] = 1;
            painted[v] = 1;
        }else {
            painted[0] = 1;
            painted[v] = 2;
        }
        //System.out.println(v);
        painter(v);
        
        for(int i = 0 ; i < N ; i++) {
            System.out.println(painted[i] - 1);
        }
    }
    
    public static void painter(int u) {
        while(!a[u].isEmpty()) {
            String[] s = a[u].poll().toString().split(" ");
            int v = Integer.parseInt(s[0]);
            int w = Integer.parseInt(s[1]);
            //System.out.println(u+","+v+","+w+","+a[u].size());
            if(w % 2 == 0) {
                if(painted[u] == 1) {
                    painted[v] = 1;
                }else {
                    painted[v] = 2;
                }
            }else {
                if(painted[u] == 1) {
                    painted[v] = 2;
                }else {
                    painted[v] = 1;
                }
            }
            painter(v);
        }
    }
}


Measured memory_bytes: 110700
#include <bits/stdc++.h>
using namespace std;
int main(){	
	int N,W,w,v,res=0;
	map<int,int> dp;
	dp[0]=0;
	cin>>N>>W;
	while(N--){
		cin>>w>>v;
		for(auto it=dp.rbegin();it!=dp.rend();++it){
			int ws=it->first,vs=it->second;
			if(ws+w<=W)dp[ws+w]=max(dp[ws+w],vs+v);
		}
	}
	for(auto it:dp)res=max(res,it.second);
	cout<<res<<endl;
}


Measured memory_bytes: 384
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = getInt(sc);
		int x = getInt(sc);
		int[] a = getIntArray(sc);

		Arrays.sort(a);
		int count = 0;
		for (int i = 0; i < n; i++) {
			x -= a[i];
			if (x >= 0) {
				count++;
			} else {
				break;
			}
		}
		if (x > 0) {
			count -= 1;
		}
		System.out.println(count);

	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をStringで返却
	 *
	 * @return
	 */
	public static String getString(Scanner sc) {

		return sc.next();
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をint配列で返却
	 *
	 * @return
	 */
	public static int[] getIntArray(Scanner sc) {
		String line = "";
		// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策
		while (line.equals("")) {
			line = sc.nextLine();
		}

		String[] strArray = line.split(" ");
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < strArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

}


Measured memory_bytes: 23764
#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 cout << "C" << endl;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
#define rep(i,a,b) for (int i = (a); i < (b); i++)
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef complex<double> com;
const int mod = 1e9 + 7;
const int MOD = 998244353;
const int inf = 2e9;



int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n; cin >> n;
	vector<ll> a(n);
	rep(i, 0, n) cin >> a[i];
	ll ans = 0;
	while(1){
		sort(a.begin(), a.end());
		if (a[n - 1] < n) break;
		ll add = a[n - 1] / n;
		ans += add;
		rep(i, 0, n - 1) a[i] += add;
		a[n - 1] %= n;
	}
	printf("%lld", ans);
 	return 0;
}


Measured memory_bytes: 256
/*
   * * * * *       *        * * * * * * * * * * * * * * * * * * * * * * * *     * * * * * * *               * *               * * * * * * * * * *
   * * * * *      * *       * * * * * * * * * * * * * * * * * * * * * *    *    * * * * * * *              * * *             * ** * * * * * * * * *
   * *           * * *            * *     * *     * *      * *          * * *   * * *       *             * * * *           * * * *       * *    * *
   * * * * *    * * * *           * *     * *     * *       * * * * * * *  * *  * * * * * * *            * * * * *         * *  * *       * * * * *
   * * * * *   * * * * *          * *     * *     * *        * * * * ** *   * * * * * * * * *           * * * * * *       * *   * * * *   * * * *
         * *  * * * * * *   * *   * *     * *     * *       * * * * * * *    * ** *     * * *          * * * * * * *     * *    * * * *   * *  * *
         * * * *       * *  * *   * *     * *     * *      * *          *     * * *     * * *         * *       * * *   * *     * *       * *   * *
   * * * * ** *         * * * * * * * * * * * * * * * * * * * * * * * * *      *  * * * * * * * * * ** *         * * * * *      * * * * * * *    * *
   * * * * * *           * ** * * * * * * * * * * * * * * * * * * * * * *       * * * * * * * * * * * *           * * * *       * * * * * * *     * *
*/

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <set>
#define ll long long
#define rep(i, a, b) for (int i = int(a); i <= int(b); i++)
#define sz(a) int((a).size())
using namespace std;
int arr[95];
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll d,t,s;
    cin>>d>>t>>s;
    if((t*s)>=d)
    {
        cout<<"Yes"<<endl;
    }
    else
    {
        cout<<"No"<<endl;
    }
    return 0;
}


Measured memory_bytes: 3064
var
 sum,i,max,x,k,t:longint;
begin
 readln(k,t);
 max:=-maxlongint;
 for i:=1 to t do
  begin
   read(x);
   if x>max then max:=x;
  end;
 sum:=(max-(k-max)-1);
 if 0<sum then writeln(sum)
          else writeln(0);
end.

Measured memory_bytes: 128
N, M, C = map(int,input().split())
B = list(map(int,input().split()))
A = [list(map(int,input().split())) for x in range(N)]

ans = 0

for i in range(N):
        test = C

        for j in range(M):
            test +=int(A[i][j]*B[j])

        if test > 0:
            ans += 1

print(ans)

Measured memory_bytes: 3064
#include<iostream>
using namespace std;
int main(){
    int E,Y,M;
    cin>>E>>Y;
    if(E==0){
        if((1868<=Y)&&(Y<=1911)){
            M=Y-1867;
            cout<<"M"<<M<<endl;
        }else if((1912<=Y)&&(Y<=1925)){
            M=Y-1911;
            cout<<"T"<<M<<endl;
        }else if((1926<=Y)&&(Y<=1988)){
            M=Y-1925;
            cout<<"S"<<M<<endl;
        }else if((1989<=Y)&&(Y<=2016)){
            M=Y-1988;
            cout<<"H"<<M<<endl;
        }
    }else if(E==1){
        cout<<1867+Y<<endl;
    }else if(E==2){
        cout<<1911+Y<<endl;
    }else if(E==3){
        cout<<1925+Y<<endl;
    }else if(E==4){
        cout<<1988+Y<<endl;
    }
    return 0;
}


Measured memory_bytes: 3120
#include<iostream>
using namespace std;
int a[3005];
int main(){
	int r,d,x;
	scanf("%d%d%d",&r,&d,&x);
	for(int i=1;i<=10;i++){
		printf("%d\n",r*x-d);
		x=r*x-d;
	}	
}

Measured memory_bytes: 888
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000


int nxt[200002][26];
int dp[200002];
int main(void)
{
    string A; cin >> A;
    for (int j = 0; j < 26; j++) {
        nxt[A.length()+1][j] = A.length()+1;
    }
    for (int i = A.length(); i >= 0; i--) {
        for (int j = 0; j < 26; j++) {
            nxt[i][j] = nxt[i+1][j];
            if (A[i] == 'a' + j) nxt[i][j] = i+1;
        }
    }
    
    /*
    for (int i = 0; i < A.length(); i++) {
        for (int j = 0; j < 26; j++) {
            printf("nxt[%d][%d] = %d\n", i, j, nxt[i][j]);
        }
    }
    */
    for (int i = A.length(); i >= 0; i--) {
        dp[i] = dp[nxt[i][0]] + 1;
        //printf("nxt[%d][0] = %d\n", i, nxt[i][0]);
        for (int j = 1; j < 26; j++) {
            dp[i] = min(dp[i], dp[nxt[i][j]] + 1);
            //printf("nxt[%d][%d] = %d\n", i, j, nxt[i][j]);
        }
    }
    /*
    for (int i = A.length()-1; i >= 0; i--) {
        printf("dp[%d] = %d\n", i, dp[i]);
    }
    */
    int count = dp[0];
    int i = 0;
    while (count > 0) {
        for (int j = 0; j < 26; j++) {
            if (dp[nxt[i][j]] == count-1){
                printf("%c", 'a' + j); 
                count--; i = nxt[i][j]; break;
            }
        }
    }
    return 0;
}


Measured memory_bytes: 21636
#include <bits/stdc++.h>
#define rep(i, a, b) for(register int i = a; i <= b; i++)
#define per(i, a, b) for(register int i = a; i >= b; i--)
using namespace std;

typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef long long ll;

template <typename _T>
inline void read(_T &f) {
    f = 0; _T fu = 1; char c = getchar();
    while(c < '0' || c > '9') { if(c == '-') fu = -1; c = getchar(); }
    while(c >= '0' && c <= '9') { f = (f << 3) + (f << 1) + (c & 15); c = getchar(); }
    f *= fu;
}

template <typename T>
void print(T x) {
    if(x < 0) putchar('-'), x = -x;
    if(x < 10) putchar(x + 48);
    else print(x / 10), putchar(x % 10 + 48);
}

template <typename T>
void print(T x, char t) {
    print(x); putchar(t);
}

const int N = 3e5 + 5, md = 1e9 + 7;

inline int add(int x, int y) {
    x += y;
    if(x >= md) x -= md;
    return x;
}

inline int sub(int x, int y) {
    x -= y;
    if(x < 0) x += md;
    return x;
}

inline int mul(int x, int y) { return 1ll * x * y % md; }

inline int fpow(int x, int y) {
    int ans = 1;
    while(y) {
        if(y & 1) ans = mul(ans, x);
        y >>= 1; x = mul(x, x);
    }
    return ans;
}

ll a[N];
int n, ans;

int main() {

  cin>>n;
for(register int i = 1; i <= n; i++)
	cin>>a[i];
 
 
 for(register int j = 0; j < 60; j++) {
	 int cnt = 0;
        for(register int i = 1; i <= n; i++)
		cnt += ((a[i]>>j)&1);
	//ll temp = 1LL<<j;
	//ans= (ans + ((temp % mod) * (cnt*(n-cnt)) ) % mod);
	ans = add (ans , mul((1LL << j)%md , mul(cnt,n-cnt)));
}
 
cout<<ans;
    return 0;
}


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

using namespace std;

#define int long long

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, m;
    cin >> n >> m;
    vector<int> a(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> a[i];
    }
    sort(a.begin(), a.end());
    reverse(a.begin(), a.end());
    int l = 0;
    int r = 2e5 + 7;
    while (r - l > 1)
    {
        int med = (l + r) / 2ll;
        int cnt = 0;
        for (int i = 0; i < n; ++i)
        {
            int ll = i - 1;
            int rr = n;
            while (rr - ll > 1)
            {
                int mm = (ll + rr) / 2ll;
                if (a[mm] + a[i] >= med)
                {
                    ll = mm;
                }
                else
                {
                    rr = mm;
                }
            }
            int cc = ll - i + 1;
            if (cc > 0)
            {
                cnt++;
                cnt += (cc - 1) * 2ll;
            }
        }
        if (cnt >= m)
        {
            l = med;
        }
        else
        {
            r = med;
        }
    }
    int cnt = 0;
    int ans = 0;
    vector<int> pr(n + 1);
    pr[0] = 0;
    for (int i = 0; i < n; ++i)
    {
        pr[i + 1] = pr[i] + a[i];
    }
    for (int i = 0; i < n; ++i)
    {
        int ll = i - 1;
        int rr = n;
        while (rr - ll > 1)
        {
            int mm = (ll + rr) / 2ll;
            if (a[mm] + a[i] >= l)
            {
                ll = mm;
            }
            else
            {
                rr = mm;
            }
        }
        if (ll >= i)
        {
            ++cnt;
            ans += (a[i] + a[i]);
        }
        if (ll >= i + 1)
        {
            cnt += 2ll * (ll - i);
            ans += 2ll * ((ll - i) * a[i] + pr[ll + 1] - pr[i + 1]);
        }
    }
    ans -= (cnt - m) * l;
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 1792
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<functional>
#include<map>
#include<cstdlib>
#include<complex>
#include<numeric>
#include<set>

using namespace std;
using Int = long long;
Int INF = 1LL << 60;
const Int MOD = 1000000007;

int main() {

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	Int N;
	cin >> N;

	Int m = 0;
	Int a = 0;
	Int r = 0;
	Int c = 0;
	Int h = 0;
	string temp;
	for (Int i = 0; i < N; i++) {
		cin >> temp;
		if (temp[0] == 'M') {
			m++;
			//continue;
		}
		if (temp[0] == 'A') {
			a++;
			//continue;
		}
		if (temp[0] == 'R') {
			r++;
			//continue;
		}
		if (temp[0] == 'C') {
			c++;
			//continue;
		}
		if (temp[0] == 'H') {
			h++;
			//continue;
		}
	}

	Int ans = 0;
	ans += m * (a * (r + c + h) + r * (c + h) + c * h) + a * (r * (c + h) + c * h) + r * c * h;

	cout << ans << endl;
}

Measured memory_bytes: 256