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

using namespace std;
const int N =2e6+1;
int a[N];
int main() {
    cin.tie(0);
    cout.tie(0);
    ios_base::sync_with_stdio(0);
    int n;
    set<long long>s;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
    }
    for (int i = 0; i < n; ++i) {
         s.insert(a[i]);
    }
    if(s.size() == n)
        cout <<"YES\n";
    else
        cout<<"NO\n";
}

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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define LLi long long int

using namespace std;

int gcdi(int a, int b) {
	if(a<0) a=b;
	if(b<0) b=a;
    if (b == 0) return a;
    return gcdi(b, a%b);
}

int lcmi(int a, int b) {
    return a/gcdi(a, b)*b;
}

int gcdv(vector<int> gv){
	int tmp=gv[0];
	for(int i=1;i<(int)gv.size();i++) tmp=gcdi(tmp, gv[i]);
	return tmp;
}

int lcmv(vector<int> gv){
	int tmp=gv[0];
	for(int i=1;i<(int)gv.size();i++) tmp=lcmi(tmp, gv[i]);
	return tmp;
}

int main(){

	int n, k, gc;
  	vector<int> v;
	map<LLi, int> mp;
  
  	cin>> n >> k;
  	v.resize(n);
  	rep(i, n){
      	cin>> v[i];
      	if(v[i]==k){
          	cout<< "POSSIBLE" <<endl;
          	return 0;
        }
    }
  
  	gc=gcdv(v);
  	
  	rep(i, n){
      	if(v[i]-k>0 && (v[i]-k)%gc==0){
          	cout<< "POSSIBLE" <<endl;
          	return 0;
        }
    }
  
  	cout<< "IMPOSSIBLE" <<endl;
  
	return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define vlli vector<ll>
#define vi vector<int>
#define vs vector<string>
#define vplli vector< pair< ll,ll> >
#define plli pair< ll,ll >
#define vps vector< pair< string, string> >
#define vpi vector< pair< int, int> >
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fast ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define forn(i,a,n) for(ll i=a;i<n;i++)
#define forr(i,n,a) for(ll i=n-1;i>=a;i--)
#define scan(arr,a,n) for(ll i=(a);i<(n);i++)cin>>(arr)[i];
#define print(arr,a,n) for(ll i=(a);i<(n);i++)cout<<(arr)[i]<<" ";

const ll inf = 1e18;

ll add(ll x, ll y) {ll res = x + y; return (res >= mod ? res - mod : res);}
ll mul(ll x, ll y) {ll res = x * y; return (res >= mod ? res % mod : res);}
ll sub(ll x, ll y) {ll res = x - y; return (res < 0 ? res + mod : res);}
ll power(ll x, ll y) {ll res = 1; x %= mod; while (y) {if (y & 1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}
ll mod_inv(ll x) {return power(x, mod - 2);}


int main(){
    fast;
    #ifndef ONLINE_JUDGE
    freopen("input1.txt","r",stdin);
    freopen("output1.txt","w",stdout);
    #endif
    ll n, x;
    cin>>n>>x;
    ll a[n];
    scan(a, 0, n);
    ll ans = 0;
    forn(i, 1, n){
        if(a[i]+a[i-1]>x){
            ll z = a[i-1]+a[i]-x;
            ans+=z;
            if(z>=a[i]){
                a[i] = 0;
                z-=a[i];
                a[i-1]-=z;
            } else {
                a[i]-=z;
            }
            

        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 4400
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>

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

ll lcm(ll a,ll b){
    ll r,x,tmp,tmpa,tmpb;
    tmpa = a;
    tmpb = b;
    if(a == b){ return a;}
    if(max(a,b)%min(a,b)==0){return max(a,b);}
   // cout << "th" <<endl;
    //x = a * b;
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
  return tmpa / b * tmpb ;
}

int main(){
    ll n,ans;
    cin >> n;
    vector<ll> t(n,0);
    rep(i,n){ cin >> t[i];}
  
    ll temp = 0,len = n;
    for(int i=0; i<len; i++){
        for(int j=len-1; j>i; j--){
            if(t[j] < t[j-1]){//< 小さい
                temp = t[j];
                t[j] = t[j-1];
                t[j-1] = temp;
            }
        }
    }

    ans = t[0];
    //sort(t.begin(),t.end(),greater<long long > );
    rep(i,n){
       // cout << t[i] << endl;
    }
//cout << endl;
    rep(i,n-1){
        ans = lcm(ans,t[i+1]);
      //  cout << i<<":" << ans << endl;
    }
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
N, Y = map(int, input().split())
exists = False
for x in range(N+1):
  for y in range(N+1):
    z = (Y-10000*x-5000*y)//1000
    if 0<=z<=N and x+y+z==N:
      exists = True
      break
  else:
    continue
  break
if exists:
  print(x, y, z)
else:
  print(-1, -1, -1)

Measured memory_bytes: 9080
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int dp[2][1000001];
const int INF=1e9;
int main(){
    vector<int>S;
    for(int i=1;true;i++){
        int val=i*(i+1)*(i+2)/6;
        if(val<=1000000)S.push_back(val);
        else break;
    }
    fill_n(*dp,2*1000001,INF);
    dp[0][0]=dp[1][0]=0;
    for(int i=1;i<=1000000;i++){
        for(int j=0;j<S.size();j++){
            int val=S[j];
            if(i-val<0)continue;
            dp[0][i]=min(dp[0][i],dp[0][i-val]+1);
            if(val&1)dp[1][i]=min(dp[1][i],dp[1][i-val]+1);
        }
    }
    int n;
    while(scanf("%d",&n),n){
        printf("%d %d\n",dp[0][n],dp[1][n]);
    }
    return 0;
}

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

int main(){
    vector<int> time(5);
    for (int i = 0; i < 5;++i){
        cin >> time[i];
    }

    int minimum = 1145141919;
    int index = 114514810;
    int sum = 0;
    for (int i = 0; i < 5;++i){
        //cout << time[i] % 10 << endl;
        if (minimum > time[i]%10 && time[i]%10 != 0){
            minimum = time[i] % 10;
            index = i;
            //cout << minimum << endl;
        }
    }
    //cout << minimum << endl;
    for (int i = 0; i < 5;++i){
        if(index == i){
            sum += time[i];
            continue;
        }
        if(time[i] % 10 != 0)
            sum += 10 * (time[i]/10+1);
        if(time[i] % 10 == 0)
            sum += 10 * (time[i]/10);
    }
    
    cout << sum << endl;
}

Measured memory_bytes: 256
// #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <set>
using namespace std;
#define rep(i, n) for(int i=0;i<n;i++)
#define irep(i, n) for(int i=n-1;i>=0;i--)
#define lrep(i, n) for(long long i=0;i<n;i++)
typedef long long ll;
typedef vector<long long> llv;
typedef vector<vector<long long> > llvv;

int main(){
    string s;
    cin >> s;
    int n = s.size();
    bool t = true;
    rep(i,n){
        if ((i+1) % 2 == 1 && s[i] == 'L'){
            t = false;
        }
        if ((i+1) % 2 == 0 && s[i] == 'R'){
            t = false;
        }
    }
    if (t == true) cout << "Yes" << endl;
    else cout << "No" << endl;
}

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


int main()
{
    ll a,b,c=0,sum=0,sum1=0,sum2=0;
    cin>>a>>b;
    vector<ll>v;

    for(ll i=0;i<a;i++)
    {
        ll x;
        cin>>x;
        sum+=x;
        v.push_back(x);
    }

    sort(v.begin(),v.end(),greater<ll>());

    for(ll i=0;i<min(b,a);i++)
    {
        //cout<<v[i]<<" ";
        sum1+=v[i];
    }

    //cout<<sum<<endl;
    //cout<<sum1<<endl;

    sum2=sum-sum1;
    
    if(sum2<0)
    {
        cout<<"0"<<endl;
    }
    else
    cout<<sum2<<endl;

    return 0;
}


Measured memory_bytes: 2420
n = int(input())
s = list(input())
a = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
for i in range(len(s)):
  c = (a.index(s[i])+n)%26
  s[i] = a[c]
print("".join(s))

Measured memory_bytes: 9228
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define st string
#define ve(i) vector<i>
#define repi(i, m, n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i, n) repi(i, 0, n)
#define each(i, n) for(auto&& i: n)

int main() {
  int N, a = 0;
  cin >> N;
  ve(int) d(N);
  rep(i, N) {
    cin >> d.at(i);
  }
  rep(i, N) {
    rep(j, N) {
      if(i != j) {
        a += d.at(i) * d.at(j);
      }
    }
  }
  cout << a / 2 << endl;
} 

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

#define int long long

const int INF = 0x7f7f7f7f;

int n;
int f[405][405],s[405];

signed main()
{
	memset(f,INF,sizeof(f));
	cin>>n;
	for(int i=1,x;i<=n&&cin>>x;i++)
		s[i] = s[i-1]+x;
	for(int i=1;i<=n;f[i][i]=0,i++);
	for(int i=2;i<=n;i++)
		for(int l=1;l+i-1<=n;l++)
		{
			int r=l+i-1;
			for(int k=l;k<r;k++)
				f[l][r] = min(f[l][r],f[l][k]+f[k+1][r]+s[r]-s[l-1]);
		}
	cout<<f[1][n]<<endl;
	
	return 0;
} 

Measured memory_bytes: 1536
#include <bits/stdc++.h>
    #include <ext/pb_ds/assoc_container.hpp>
    #include <ext/pb_ds/tree_policy.hpp>
    #include <ext/pb_ds/detail/standard_policies.hpp>
    using namespace std;
    using namespace __gnu_pbds;
    #define ll long long
    #define int long long
    #define pb push_back
    #define For(i,n) for(ll  i=0;i<n;i++)
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) ;clock_t clk = clock();
    #define f(a,b,c) for(ll a=b;a<c;a++)
    #define ld long double
    #define read(t) ll t;cin>>t;
    #define all(x) x.begin(),x.end()
    #define fi first
    #define se second
    #define pii pair<ll,ll>
    #define endl "\n"
    #define sz(x) (int)(x).size()
    #define what_is(x) cerr << #x << " is " << x << endl;
    #define time cerr << "Time (in ms): " << double(clock() - clk) * 1000.0 / CLOCKS_PER_SEC << '\n';
    const double pi=3.14159265358979323846264;
    typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
    typedef tree<long long,null_type,greater<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set1;
/*.....................................................................................................................*/

    ll mod =(ll)1e9+7;
    ll add(ll x,ll y) {return (x+y)%mod;}
    ll mult(ll x, ll y){return ((x%mod )* (y%mod)) % mod;}
    long long binpow(long long x, long long p) 
    {
        if (p == 0) return 1;
    	if (p == 2 || (p & 1)) return mult(x, binpow(x, p - 1));
    	return binpow(binpow(x, p / 2), 2);
    }
    ll modinv(ll a) {return binpow(a,mod-2);}
    // bool check(ll x){}
    ll binsearch(ll l,ll r)
    {
        while(l<r)
        {
            ll mid=(l+r)/2;
            // if(check(mid))r=mid;
            // else l=mid+1;
        }
        return l;
    }
    const ll man=(ll)1005;
    vector<ll>adj[man];
    bool vis[man][man];
    ll d[man],depth[man],par[man];
    void addedge(ll u,ll v){adj[u].pb(v);adj[v].pb(u);}
    ll dx[4]={1,-1,0,0};ll dy[4]={0,0,1,-1};
/*........................................................................................................................*/

signed main()/*Check flow...question galat mat padhna */
{
    fast;   
    ll sum=0;
    map<ll,ll>mp;
    ll n;
    cin>>n;
    For(i,n)
    {
        read(x);
        sum+=x;
        mp[x]++;
    }
    ll q;
    cin>>q;
    while(q--)
    {
        ll a,b;
        cin>>a>>b;
        sum+=(b-a)*mp[a];
        
        mp[b]+=mp[a];mp[a]=0;
        cout<<sum<<endl;
    }
}      


Measured memory_bytes: 9468
#include <iostream>
#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

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

	REP(i,1,n+1)
	{
		bool flag = false;
		int temp = i;
		while(temp)
		{
			if(temp % 10 == 3) flag = true;
			temp /= 10;
		}

		if(flag || i%3 == 0) cout << " " << i;
	}

	cout << endl;
	
	return 0;
}

Measured memory_bytes: 1160
import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax 
    static final int INF = 1_000_000_000; // 10^9  
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		String s1 = saori.nextHayami();
		String[] s2 = saori.nextHayami().split("");
		String s3 = saori.nextHayami();
		System.out.println("A" + s2[0] + "C");
		
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() { 
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) { 
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() { 
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }
    
}

Measured memory_bytes: 23252
//In the name of ALLAH the most merciful the most beneficial

#include<cstdio>
#include<cstring>
#include<bits/stdc++.h>
#include<iostream>
#include<math.h>
#include<fstream>
#define sc(x) scanf("%d",&x)
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORd(i,a,b) for(int i=a;i>b;i--)
#define ff first
#define ss second
#define sz(x) x.size()
#define pb push_back

using namespace std;

typedef pair<int,int> pii;
typedef vector<pii> vii;
const int con = 1e9;
static const int INF = 0x3f3f3f3f;
static const int MOD = 998244353;

int main(){
    
    int n;sc(n);
    int A,B;sc(A);sc(B);
    int a=0,b=0,c=0,x;
    FOR(i,0,n){

        sc(x);
        if(x <= A)
            a++;
        else if(x > B)
            c++;
        else
            b++;
    }
    cout << min({a,b,c});
    return 0;
}



Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		if (a >= 13) {

		} else if (6 <= a && a <= 12) {
			b = b / 2;
		} else {
			b = 0;
		}
		System.out.println(b);
	}
}

Measured memory_bytes: 25684
#include <bits/stdc++.h>
#define ll    long long int
#define ld    long double
#define pb    push_back
#define mp    make_pair
#define Maxn  1000007
#define ff    first
#define se    second
using namespace std;
 
int main(){
    ll a,b;
    cin>>a>>b;
    if((a+b)%2==0){
        cout<<(a+b)/2;
    }
    else{
        cout<<"IMPOSSIBLE";
    }
}

Measured memory_bytes: 256
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int calc(VI &l, VI &r, int p){
    vector<P> a;
    int n = l.size();
    REP(i,n){
        a.push_back(P(l[i], r[i]));
    }
    sort(ALL(a));
    reverse(ALL(a));

    int res = 1e9, pma = p;
    REP(i,n){
        res = min(res, 2*a[i].first + 2*pma - p);
        pma = max(pma, a[i].second);
        // cout << "res" << res << " pma" << pma << endl;
    }
    res = min(res, 2*pma - p);
    return res;
}

int main(){
    string a, b;
    cin >> a >> b;
    int n = a.length();

    if (a == b){
        cout << 0 << endl;
        return 0;
    }

    if (b.find('1') == string::npos){
        cout << -1 << endl;
        return 0;
    }

    VI l(n), r(n);
    REP(i,n){
        while (b[(i+l[i])%n] == '0') l[i]++;
        while (b[(i-r[i]+n)%n] == '0') r[i]++;
        swap(l[i], r[i]);
    }

    int ans = 1e9;
    REP(i,n){
        VI ll, rr;
        REP(j,n){
            if (a[j] != b[(j+i)%n]){
                ll.push_back(l[j]);
                rr.push_back(r[j]);
            }
        }
        int m = ll.size();
        ans = min(ans, calc(ll, rr, i) + m);
        ans = min(ans, calc(rr, ll, (n-i) % n) + m);

        // cout << i << endl;
        // REP(i,m) cout << ll[i] << " ";
        // cout << endl;
        // REP(i,m) cout << rr[i] << " ";
        // cout << endl;
        // cout << calc(ll, rr, i) << " " << calc(rr, ll, (n-i) % n) << endl << endl;
    }
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
typedef long long ll;
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1000000007;

template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

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

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

Measured memory_bytes: 512
#include<iostream>
#include<cmath> 
#include<vector>

using namespace std;

bool Judge(int A)
{	
	for(int j=2;j<=floor(sqrt((double)A));j++){
		if(A%j==0)return false;
	}
	return true;
}

int PrimeNumbers(vector<int> A)
{
	int count = 0;
	for(int i=0;i<A.size();i++){
		if(Judge(A[i]))count++;
	}
	return count;
}

int main()
{	
	int n;
	cin >> n;
	
	vector<int> A;
	A.resize(n);

	for(int i=0;i<n;i++)cin >> A[i];
	
	cout << PrimeNumbers(A) << endl;
	
	return 0;
}

Measured memory_bytes: 1292
program sample
	implicit none
	integer :: h, w, I, j
	character(100),allocatable :: c(:)

	read(*,*) h, w
	allocate(c(h))
	c(:) = ''
	do i = 1, h
		read(*,*) c(i)
	end do
	do i = 1, h
		do j = 1, 2
			write(*,*) c(i)(1:w)
		end do
	end do
	
	stop
end program sample

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

using LL = long long;

int main() {
#ifdef LOCAL_EXEC
//	freopen("sample.in", "r", stdin);
//	freopen("sample.out", "w", stdout);
#else
	ios_base::sync_with_stdio(false); cin.tie(NULL);
#endif

	int a, b, c; cin >> a >> b >> c;
	cout << (a + b + c >= 22 ? "bust" : "win") << endl;

	return 0;
}


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

using namespace std;

const int DIM = 2007;
const int mod = 1e9 + 7;

#define int long long

int c[DIM][DIM];

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

    int n, k;
    cin >> n >> k;

    c[0][0] = 1;

    for(int i = 1; i <= n; i++)
    {
        c[i][0] = 1;

        for(int j = 1; j <= i; j++)
        {
            c[i][j] = c[i - 1][j] + c[i - 1][j - 1];

            if(c[i][j] >= mod)
                c[i][j] -= mod;
        }
    }

    if(n == k)
    {
        cout << 1 << '\n';

        for(int i = 2; i <= n; i++)
            cout << 0 << '\n';

        return 0;
    }

    for(int i = 1; i <= k; i++)
    {
        int p1 = c[k - 1][i - 1];
        int p2 = c[n - k - 1][i] + 2 * c[n - k - 1][i - 1] + (i != 1) * c[n - k - 1][i - 2];

        p1 %= mod;
        p2 %= mod;

        cout << ((p1 * p2) % mod) << '\n';
    }
}


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

#define int long long

#define F first
#define S second
#define all(x) (x).begin(), (x).end()

using namespace std;

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

//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);

    int n, g = -1;
    cin >> n;
    int a[n];

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

    vector<int> f(1000010, INT_MAX), cnt(10000001, 0);
    for(int i = 2; i <= 1000000; i++) {
        if(f[i] == INT_MAX) {
            f[i] = i;
            for(int j = i*i; j <= 1000000; j += i)
                if(f[j] == INT_MAX)
                    f[j] = i;
        }
    }

    vector<int> cur;
    for(int i = 0; i < n; i++) {
        int t = a[i];
        cur.clear();
        while(t > 1)
            cur.push_back(f[t]), t /= f[t];
        sort(all(cur));
        for(int j = 0; j < (int)cur.size(); j++)
            if(j == 0 || cur[j] != cur[j-1])
                cnt[cur[j]]++;
    }

    for(int i = 2; i <= 1000000; i++) {
        if(cnt[i] > 1) {
            if(g == 1)
                cout << "setwise coprime";
            else
                cout << "not coprime";
            return 0;
        }
    }

    cout << "pairwise coprime";

    return 0;
}


Measured memory_bytes: 96868
#include <bits/stdc++.h>
using namespace std;
int main() {
  // A君の回答を受け取る
  string s;
  string ret,year,mon,day;
      cin >> s;

    for(int i=0;i<4;i++){
      year.push_back(s.at(i));
    }
    for(int i=5;i<7;i++){
      mon.push_back(s.at(i));
    }
    for(int i=8;i<10;i++){
      day.push_back(s.at(i));
    }

    ret="Heisei";
    if(stoi(year)==2019){
        if(stoi(mon)>4)ret="TBD";
    }else if(stoi(year)>2019)ret="TBD";

  cout << ret << endl;
}


Measured memory_bytes: 256
import collections, itertools
N = int(input())
mod = 10**9 + 7
cd = collections.defaultdict
dp = cd(lambda: cd(lambda: cd(lambda: cd(int))))
dp[0][3][3][3] = 1
count = 0
for i in range(N):
    for c0, c1, c2, c3 in itertools.product(range(4), repeat=4):
        A1 = [c1, c2, c3]
        A2 = [c0, c2, c3]
        A3 = [c0, c1, c3]
        if A1 in [[0, 1, 2], [1, 0, 2], [0, 2, 1]] or [0, 1, 2] in [A2, A3]:
            continue
        dp[i + 1][c1][c2][c3] += dp[i][c0][c1][c2]
        dp[i + 1][c1][c2][c3] %= mod
        if i == N - 1:
            count += dp[i][c0][c1][c2]
            count %= mod
print(count)
# https://www.youtube.com/watch?v=w2AEXSloYk8


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

int main(){
    long int X;
    long int yen=100;
    long int year=0;

    cin >> X;

    if(10000000>X){
        while(yen<X){
            yen=yen+yen/100;
            year++;
        }
    }

    if(10000000<=X){
        year=1215;
        yen=10091727;

        while(yen<X){
            yen=yen+yen/100;
            year++;
        }
    }

    cout << year << endl;


    return 0;
}

Measured memory_bytes: 3636
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <utility>
#include <tuple>
#include <cctype>
#define INF 0x3f3f3f3f
#define MOD 1000000007
#define PI 4*atan(1.0)
typedef long long ll;
typedef long double ld;
using namespace std;
int dx[4]={0,0,-1,1};
int dy[4]={-1,1,0,0};
const int SIZE=200001;
//int arr[SIZE]={};
//ここまでテンプレ
int main(){
	int A,B,C;
	cin>>A>>B>>C;
	if(A<=C && C<=B)
		cout<<"Yes"<<endl;
	else
		cout<<"No"<<endl;
	return 0;
}

Measured memory_bytes: 256
#!/usr/bin/env python3
import sys
import collections

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int, K: int, Q: int, A: "List[int]"):

    ans = collections.defaultdict(int)
    for a in A:
        ans[a] += 1

    for i in range(1,N+1):
        p = K - Q + ans[i]
        if p > 0:
            print(YES)
        else:
            print(NO)


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    K = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    A = [ int(next(tokens)) for _ in range(Q) ]  # type: "List[int]"
    solve(N, K, Q, A)

if __name__ == '__main__':
    main()


Measured memory_bytes: 20124
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        int c = scanner.nextInt();

        int max = Math.max(a, Math.max(b, c));
        if(max==a) {
        	System.out.println(b*c/2);
        }else if(max==b) {
        	System.out.println(a*c/2);
        }else {
        	System.out.println(a*b/2);
        }

    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}

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


int main() {
    int t,x;
    cin>>t>>x;

    cout<<(double)t/x<<endl;

        
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <vector>
#include <list>

using namespace std;

int main() {
	long long int h, sum = 0;
	int n, a[100000];
	cin >> h >> n;
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		sum += a[i];
	}
	if (sum >= h) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

Measured memory_bytes: 640
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String n = sc.next();

        if (n.substring(0,1).equals("9") || n.substring(1,2).equals("9") ) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

}

Measured memory_bytes: 21844
#include<iostream>
#include<string>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<deque>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<iomanip>
#include<sstream>
using namespace std;
#define pi acos(-1.0) 
#define ms(x,n) memset(x,n,sizeof(x));
#define pb push_back
typedef long long ll;//string::npos
typedef long long iint;
ll gcd(ll a,ll b){ return a%b==0?b:gcd(b,a%b); }
const int inf=0x3f3f3f3f;
const int maxn=2e5+5;
const int mod=998244353;
//priority_queue<ll,vector<ll>,greater<ll> > q;//小根堆 
//vector<int> vt;
//pair<int,int> p;
//map<int,int> m; 
int main() {
	ios::sync_with_stdio(false);
	
	int n;
	cin>>n;
	if(n%10==7||n/10%10==7||n/100==7){
		cout<<"Yes\n";
	} else{
		cout<<"No\n";
	}
	
	
	
}

Measured memory_bytes: 3636
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
typedef int_fast64_t ll;

ll N, A, B, C, D;

int main() {
    scanf("%lld %lld %lld %lld %lld", &N, &A, &B, &C, &D);
    N--;
    ll L = N * C, R = N * D;
    ll diff = R - L;
    ll target = abs(B - A) + R;
    ll s = C + D;
    printf("%s", target <= --N * s + diff && target % s <= diff ? "YES" : "NO");
	return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main{
	
	public static void main(String[] args){
		
		Scanner s = new Scanner(System.in);
		
		int temperature = s.nextInt();
			
		if(temperature >= 30){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
		
		}
	
}


	


Measured memory_bytes: 35564
#include <bits/stdc++.h>
typedef long long ll;
#define MOD 1000000007
#define INF 99999999 
using namespace std;
 
int main()
{
    ll N,M; cin >> N >> M;
    vector<ll> v(N);
    for (int i = 0; i < N; i++)
    {
        cin >> v[i];
    }
    sort(v.begin(), v.end());
    vector< pair<ll,ll> > CB(M);
    for (int i = 0; i < M; i++)
    {
        ll B,C; cin >> B >> C;
        CB[i].first = C;
        CB[i].second = B;
    }
    sort(CB.begin(),CB.end(),greater< pair<ll,ll> >());
    int j = 0;
    for (int i = 0; i < N; i++)
    {
        if(v[i] < CB[j].first){
            v[i] = CB[j].first;
            CB[j].second--;
            if(CB[j].second == 0) j++;
            if(j == M) break;
        }
    }
    ll ans = 0;
    for (int i = 0; i < N; i++)
    {
        ans += v[i];
    }
    cout << ans << endl;  
    
}

Measured memory_bytes: 2560
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		char[] a = br.readLine().toCharArray();
		br.close();

		boolean one = false;
		for (int i = 0; i < n; i++) {
			if (a[i] == '2') {
				one = true;
				break;
			}
		}

		int[] p = new int[n];
		for (int i = 2; i < n; i+=2) {
			int x = i;
			while (x % 2 == 0) {
				p[i]++;
				x /= 2;
			}
		}
		for (int i = 1; i < n; i++) {
			p[i] += p[i - 1];
		}

		if (!one) {
			for (int i = 0; i < n; i++) {
				if (a[i] == '3') {
					a[i] = '2';
				}
			}
		}
		int ans = 0;
		for (int i = 0; i < n; i++) {
			if (a[i] == '2') {
				if (p[n - 1] - p[i] - p[n - 1 - i] <= 0) {
					ans++;
				}
			}
		}
		ans %= 2;
		if (!one) {
			ans *= 2;
		}
		System.out.println(ans);
	}
}


Measured memory_bytes: 37644
#include <bits/stdc++.h>
#define repr(i,from,to) for(int (i)=(from);(i)<(to);(i)++)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
// const bool debug=true;
const bool debug=false;
#define DEBUG if(debug==true)
#define vprint(x) for(auto a:(x)) cout << x << endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) { a = b; return true;}
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) { a = b; return true;}
    return false;
}
int main(void) {
    ll n,k,score[3];
    string t;
    cin>>n>>k>>score[0]>>score[1]>>score[2]>>t;
    map<char, int> mp;
    mp['r'] = score[2];
    mp['s'] = score[0];
    mp['p'] = score[1];
    vector<bool> chk(n,false);
    cin.tie(0);
    ios::sync_with_stdio(false);
    int res = 0;
    rep(i,n) {
        if (i<k) {
            res += mp[t[i]];
            chk[i] = true;
        }
        else {
            if (t[i] != t[i-k] || !chk[i-k]) {
                res += mp[t[i]];
                chk[i] = true;
            }
        }
    }
    cout << res << endl;
    return 0;
}


Measured memory_bytes: 512
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define show(x) cout << #x << " = " << x << endl;
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
ll n;
ll mod = 1000000007;
ll rui[1234567];
const int NUM_ = 1234567;
static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];
int main(){
    cin >> n;
    inv[1]=fact[0]=factr[0]=1;
    for (int i=2;i<=NUM_;++i) inv[i] = inv[mod % i] * (mod - mod / i) % mod;
    for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%mod, factr[i]=factr[i-1]*inv[i]%mod;
    ll ans = 0;
    for(ll i = n-1; i>=(n+1)/2; i--){
        rui[i] = fact[i];
        ll k = n-1-i;
        rui[i] = (rui[i]*fact[i-1]%mod)*factr[i-1-k]%mod;
    }
    for(ll i = (n+1)/2; i<n;i++){
        ans += i*(rui[i]-rui[i-1]+mod);
        ans%=mod;
    }
    cout << ans << endl;
}

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

long long MOD=1000000007;

int main(){
    //input
    string S;
    cin >> S;
    long long keta=S.length();
    long long L[keta];
    long long i;
    for(i=0; i<keta; i++){
        L[i]=(long long)(S[i]-'0');
    }

    //calc
    long long bdd, nonbdd;
    nonbdd=1;
    bdd=2;
    for(i=1; i<keta; i++){
        if(L[i]==0){
            nonbdd = 3*nonbdd;
            nonbdd%=MOD; 
        }else if(L[i]==1){
            nonbdd = 3*nonbdd + bdd;
            nonbdd%=MOD;
            bdd = 2*bdd;
            bdd%=MOD;
        }
    }

    //answer
    cout << (nonbdd + bdd)%MOD << endl;
    system("pause");
    return 0;
}

Measured memory_bytes: 4588
#include<cstdio>
inline void read(int&r)
{
	register char c;r=0;
	do c=getchar();while(c<'0'||c>'9');
	do r=r*10+c-'0',c=getchar();while(c>='0'&&c<='9');
}

typedef long long ll;
const int mod=1e9+7;

int main()
{
	int n,i,x,ans=1;read(n);
	for(i=1;i<=n;i++)
	{
		read(x);
		if(x<=(i-1)<<1)
			ans=(ll)ans*i%mod,i--,n--;
	}
	do ans=(ll)ans*n%mod;while(--n);
	printf("%d\n",ans);
}

Measured memory_bytes: 128
n = int(input())
w = [input() for i in range(n)]
l = list(set(w))
if len(l) != n:
    print("No")
    quit()
a = w[0][-1]
for i in range(1,n):
    if a != w[i][0]:
        print("No")
        quit()
    a = w[i][-1]
print("Yes")

Measured memory_bytes: 3064
#include <cstdio>

int main(){
    int a,b;
    scanf("%d %d", &a, &b);
    a = (a+11) % 13;
    b = (b+11) % 13;
    printf(a == b ? "Draw\n" : a < b ? "Bob\n" : "Alice\n");
    return 0;
}


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

int main(){
    int H,W;
    cin >> H >> W;
    char a[H][W];

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

    for(int i=0; i<H+2; i++){
        for(int j=0; j<W+2; j++){
            if(i==0 || i==H+1 ){
                cout << '#';
            }else if(j==0 || j==W+1){
                cout << '#';
            }else{
                cout << a[i-1][j-1];
            }
        }
        cout << endl;
    }    

    return 0;
}

Measured memory_bytes: 256
var
	n,i,ma,mb:Longint;
	a:array[1..200000]of Longint;
function f(c:Longint):Longint;
var L,R,M,cnt,i:Longint;
begin
	L:=0;
	R:=1000000001;
	while R-L>1 do begin
		M:=(L+R)div 2;
		cnt:=0;
		for i:=1 to n do if a[i]<=M then inc(cnt);
		if cnt>=c then R:=M else L:=M;
	end;
	f:=R;
end;
begin
	read(n);
	for i:=1 to n do read(a[i]);
	ma:=f(n div 2+1);
	mb:=f(n div 2);
	for i:=1 to n do if a[i]<ma then writeln(ma)else writeln(mb);
end.

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


int main()
{
    int n,x=0,s;
    cin>>n;

    string sn;
    cin>>sn;

    if((n%2)==1)
        cout<<"No"<<endl;


    else
    {
    char bn[n+1],an[n+1];
    int j=0;

    for(int i=0;i<n/2;i++)
        an[i]=sn[i];

    for(int i=n/2;i<n;i++)
        {
            bn[j]=sn[i];
            j++;
        }



    for(int i=0;i<n/2;i++)
    {
        if(an[i]==bn[i])
            x++;
        else
            break;
    }


    if(x!=n/2)
        cout<<"No"<<endl;
    else
        cout<<"Yes"<<endl;

    }


    return 0;
}


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

auto keta(ll n) {
    ll res;
    for(ll i = 0; i < 100; i++) {
        n = n / 10;

        if(n == 0) {
            res = i + 1;
            break;
        }
    }
    return res;
}

int main() {
    int n;
    cin >> n;
    map<int, int> m;
    rep(i, n - 1) {
        int a;
        cin >> a;
        m[a]++;
    }
    REP(i, n) {
        cout << m[i] << endl;
    }
}

Measured memory_bytes: 12988
from collections import deque
K = int(input())
Q = deque([i for i in range(1,10)])

for _ in range(K-1):
    q = Q.popleft()
    if q%10 != 0:
        Q.append(10*q+(q%10)-1)
    Q.append(10*q+(q%10))
    if q%10 != 9:
        Q.append(10*q+(q%10)+1)
print(Q.popleft())

Measured memory_bytes: 11908
def cntDiv(n):
    cnt = 0
    for i in range(1,n+1):
        if n%i == 0:
            cnt += 1
    return 1 if cnt == 8 else 0

N = int(input())
ans = 0
for i in range(1,N+1,2):
    ans += cntDiv(i)

print(ans)

Measured memory_bytes: 3060
N, K = map(int, input().split())
X = [int(x) for x in input().split()]

ans = float('inf')
for left in range(N - K + 1):
    lv, rv = X[left], X[left+K-1]
    if lv * rv > 0:
        ans = min(ans, max(abs(rv), abs(lv)))
    else:
        ans = min(ans, min(rv*2 - lv, rv - lv*2))
print(ans)

Measured memory_bytes: 14228
// parameter "input" gets all data
function Main(input) {
	// the first line is assigned to input[0], the second line is assigned to input[1] similarly.
	var n = parseInt(input);
	if(n%2==1)
		console.log(parseInt((n-1)*(n+1)/4));
	else
		console.log(parseInt((n*n)/4));
}
// Don't edit this line!
//Main(require("fs").readFileSync(__dirname+'/in.txt', "utf8"));
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));

Measured memory_bytes: 21064
#include <stdio.h>

int main(){
  int n, a[200005];
  long long int k;
  scanf("%d %lld", &n, &k);
  for(int i=1; i<=n; i++){
    scanf("%d", &a[i]);
  }
  long long int counter = 0;
  int visited[200005] = {0};
  int route[200005] = {0};
  int heiro[200005] = {0};
  int nowplace = 1;
  int flag = 0;
  visited[1] = 1;
  while(route[0] < k){
    route[++route[0]] = nowplace;
    nowplace = a[nowplace];
    if(visited[nowplace]){
      int count = 0;
      heiro[++heiro[0]] = route[route[0]];
      while(route[route[0]-count] != nowplace){
	count++;
	heiro[++heiro[0]] = route[route[0]-count];
      }
      flag = 1;
      break;
    }else{
      visited[nowplace] = 1;
    }
  }
  /*
  puts("route");
  for(int i=1; i<=route[0]; i++) printf("%d ", route[i]); puts("");
  puts("heiro");
  for(int i=1; i<=heiro[0]; i++)
    printf("%d ", heiro[i]);
  puts("");
  printf("now len : %d\n", route[0]);
  printf("size of heiro : %d\n", heiro[0]);
  printf("nowplace : %d\n", nowplace);
  */
  if(flag){
    int ans = heiro[heiro[0] - (k - route[0])%heiro[0]];
    printf("%d\n", ans);
  }else{
    printf("%d\n", nowplace);
  }  
  return 0;
}


Measured memory_bytes: 4856
#include <iostream>
#include <vector>

using namespace std;

#define REP(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n)-1;  i >= 0; i--)


int main()
{
  int X, Y; cin >> X >> Y;
  REP(i, X+1)
  {
    if(2*i + 4*(X-i) == Y)
    {
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
}  


Measured memory_bytes: 3624
//D
#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;

long long int x;
long long int y;


bool dp[1002][1002];

bool use[1002][1002];

inline bool dfs(int a, int b){
	if (use[a][b]){
		return dp[a][b];
	}
	if (a == 0 && b <= 1){
		return false;
	}
	if (a <= 1 && b == 0){
		return false;
	}
	use[a][b] = true;
	dp[a][b] = false;
	for (int i = 2; i <= a; i += 2){
		dp[a][b] |= (dfs(a - i, b + i / 2) ^ true);
	}
	for (int i = 2; i <= b; i += 2){
		dp[a][b] |= (dfs(a + i / 2, b - i) ^ true);
	}
	return dp[a][b];
}


int main(){
	scanf("%lld%lld", &x, &y);
	long long int dif = abs(x - y);
	if (dif > 1LL){
		puts("Alice");
	}
	else{
		puts("Brown");
	}
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
// type alias
typedef long long LL;
typedef pair<int,int> II;
typedef tuple<int,int,int> III;
typedef vector<int> VI;
typedef vector<string> VS;
typedef unordered_map<int,int> MAPII;
typedef unordered_set<int> SETI;
template<class T> using VV=vector<vector<T>>;
// minmax
template<class T> inline T SMIN(T& a, const T b) { return a=(a>b)?b:a; }
template<class T> inline T SMAX(T& a, const T b) { return a=(a<b)?b:a; }
// repetition
#define FORE(i,a,b) for(int i=(a);i<=(b);++i)
#define REPE(i,n)  for(int i=0;i<=(n);++i)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define FORR(x,arr) for(auto& x:arr)
#define SZ(a) int((a).size())
// collection
#define ALL(c) (c).begin(),(c).end()
// DP
#define MINUS(dp) memset(dp, -1, sizeof(dp))
#define ZERO(dp) memset(dp, 0, sizeof(dp))
// stdout
#define println(args...) fprintf(stdout, ##args),putchar('\n');
// debug cerr
template<class Iter> void __kumaerrc(Iter begin, Iter end) { for(; begin!=end; ++begin) { cerr<<*begin<<','; } cerr<<endl; }
void __kumaerr(istream_iterator<string> it) { (void)it; cerr<<endl; }
template<typename T, typename... Args> void __kumaerr(istream_iterator<string> it, T a, Args... args) { cerr<<*it<<"="<<a<<", ",__kumaerr(++it, args...); }
template<typename S, typename T> std::ostream& operator<<(std::ostream& _os, const std::pair<S,T>& _p) { return _os<<"{"<<_p.first<<','<<_p.second<<"}"; }
#define __KUMATRACE__ true
#ifdef __KUMATRACE__
#define dump(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); __kumaerr(_it, args); }
#define dumpc(ar) { cerr<<#ar<<": "; FORR(x,(ar)) { cerr << x << ','; } cerr << endl; }
#define dumpC(beg,end) { cerr<<"~"<<#end<<": "; __kumaerrc(beg,end); }
#else
#define dump(args...)
#define dumpc(ar)
#define dumpC(beg,end)
#endif

// $ cp-batch KyuInAtCoder | diff KyuInAtCoder.out -
// $ g++ -std=c++14 -Wall -O2 -D_GLIBCXX_DEBUG -fsanitize=address KyuInAtCoder.cpp && ./a.out

/*

 7/25/2020

 5:00-

 */

int x;

void solve() {
  int y=(x+1+199)/200-3;
  //dump(x,y);
  int res=8-y;
  cout<<res<<endl;
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout<<setprecision(12)<<fixed;

  cin>>x;
  solve();

  return 0;
}


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

const int M=2e5+5;
int a[M],b[M];

int main()
{
	int n; scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d%d",a+i,b+i);
	sort(a+1,a+n+1);
	sort(b+1,b+n+1);
	int ma,mb;
	if(n&1^1)
	{
		ma=a[n/2]+a[n/2+1];
		mb=b[n/2]+b[n/2+1];
	}
	else
	{
		ma=a[(n+1)/2];
		mb=b[(n+1)/2];
	}
	printf("%d\n",abs(ma-mb)+1);
	return 0;
}

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


int main(){
	int n, cnt = 0, mini = INT_MAX;
	cin >> n;
	int a[n];
	rep(i,n) cin >> a[i];

	rep(i,n){
	    cnt = 0;
	    while(a[i] > 0 && a[i] % 2 == 0){
            a[i] /= 2;
            cnt++;
	    }
	    mini = min(mini, cnt);
	}
	cout << mini << "\n";
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define LL long long
using namespace std;
const int N = 1e5 + 10;

int n, m, a[N * 2], b[N * 2];

int check(int mid) {
	int dis = 0x3f3f3f3f;
	for (int i = 1; i <= n * 2 - 1; ++i)
		b[i] = (a[i] >= mid);
	int ans = b[1];
	for (int i = 1; i < n * 2 - 1; ++i) {
		if (b[i] == b[i + 1]) {
			int d = min(abs(n - i), abs(n - i - 1));
			if (d < dis) {
				dis = d;
				ans = b[i];
			}
		}
	}
	return ans;
}

int main() {
	cin >> n;
	for (int i = 1; i <= n * 2 - 1; ++i)
		scanf("%d", &a[i]);
	int l = 1, r = 2 * n - 1;
	while (l < r) {
		int mid = (l + r + 1) >> 1;
		if (check(mid)) l = mid;
		else r = mid - 1;
	}
	cout << l << endl;
	return 0;
}


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

int main(){

  const int INF = 100000000;

  int n,k;
  cin >> n >> k;
  if(k > n-1) k = n-1;
  std::vector<int> h_v(n);

  for(int i=0;i<n;++i) cin >> h_v[i];

  vector<int> dp(n,INF);

  dp[0] = 0;
  for(int i=1; i<k; ++i){
    vector<int> costs(i);
    for(int j=1; j<=i; ++j){
      costs[j-1] = dp[i-j] + abs(h_v[i] - h_v[i-j]);
    }
    dp[i] = *min_element(costs.begin(),costs.end());
  }

  for(int i=k; i<n; ++i){
    vector<int> costs(k);
    for(int j=1; j<=k; ++j){
      costs[j-1] = dp[i-j] + abs(h_v[i] - h_v[i-j]);
    }
    dp[i] = *min_element(costs.begin(),costs.end());
  }

  cout << dp[n-1] << endl;

  return 0;
}


Measured memory_bytes: 1024
#include<iostream>
using namespace std;
int main() {
	int N;
	cin >> N;
	if (N == 1) {
		cout << 1 << endl;
	}
	else if (N == 0) {
		cout << 2 << endl;
	}
	else {
		long long a = 1, b = 2;
		for (int i = 2; i <= N; ++i) {
			long long c = a + b;
			b = a;
			a = c;
		}
		cout << a << endl;
	}
	return 0;
}

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

int main() {
  int n;
  cin >> n;
  int a[n];
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  cout << a[n - 1] - a[0] << endl;
  return 0;
}

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

int main() {
  int N, Q;
  string S;
  cin >> N >> Q >> S;
  vector<int> l(Q), r(Q);
  for(int i = 0; i < Q; i++){
    cin >> l[i] >> r[i];
  }
  vector<int> sum(N+1, 0);
  int count = 0;//文字列は0スタートなので1引く
  for(int i=1; i < N; i++){
    sum[i+1] += sum[i];
    if(S[i] == 'C' && S[i-1] == 'A'){
      sum[i+1]++;
    }
  }
  for(int i = 0; i < Q; i++){
    cout << sum[r[i]]-sum[l[i]] << endl;
  }
}

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

int main() {
  int a, b[4], sum = 0;
  cin >> a;
  b[3] = a % 10;
  b[2] = (a % 100) / 10;
  b[1] = (a % 1000) / 100;
  b[0] = a / 1000;
  char op[3];
  for(int i = 0; i < 2; i++) {
    for(int j = 0; j < 2; j++) {
      for(int k = 0; k < 2; k++) {
        sum = b[0];
        if(i == 0) {
          op[0] = '+';
          sum += b[1];
        } else {
          op[0] = '-';
          sum -= b[1];
        }
        if(j == 0) {
          op[1] = '+';
          sum += b[2];
        } else {
          op[1] = '-';
          sum -= b[2];
        }
        if(k == 0) {
          op[2] = '+';
          sum += b[3];
        } else {
          op[2] = '-';
          sum -= b[3];
        }
        if(sum == 7) {
          cout << b[0] << op[0] << b[1] << op[1] << b[2] << op[2] << b[3] << "=7";
          return 0;
        }
      }
    }
  }
}

Measured memory_bytes: 256