akhauriyash/Code-Regression huggingface dataset:
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <list>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <iterator> 
#include <limits>

#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for (int i=(a); i<(b); i++)
#define ALL(a) (a).begin(),(a).end()
#define RALL(A) (a).rbegin(),(a).rend()
#define PB push_back
#define MP make_pair

#define dump(x) cerr << #x << " = " << (x) << endl;

using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

int K, N;
vector<LL> xs;
vector<LL> ys;

bool check(LL min_x, LL max_x, LL min_y, LL max_y) {
    int count = 0;
    REP(i, N) {
        if (min_x <= xs[i] and xs[i] <= max_x and min_y <= ys[i] and ys[i] <= max_y) {
            count += 1;
        }
    }
    return count >= K;
}

LL solve() {
    LL ans = numeric_limits<LL>::max() / 2;
    REP(i, N - 1) {
        FOR(j, i + 1, N) {
            LL max_x = max(xs[i], xs[j]);
            LL min_x = min(xs[i], xs[j]);
            LL max_y = max(ys[i], ys[j]);
            LL min_y = min(ys[i], ys[j]);
            if (check(min_x, max_x, min_y, max_y)) {
                ans = min(ans, (max_x - min_x) * (max_y - min_y));
            }
        }
    }

    REP(i, N - 2) {
        FOR(j, i + 1, N - 1) {
            FOR(k, j + 1, N) {
                LL max_x = max(xs[k], max(xs[i], xs[j]));
                LL min_x = min(xs[k], min(xs[i], xs[j]));
                LL max_y = max(ys[k], max(ys[i], ys[j]));
                LL min_y = min(ys[k], min(ys[i], ys[j]));
                if (check(min_x, max_x, min_y, max_y)) {
                    ans = min(ans, (max_x - min_x) * (max_y - min_y));
                }
            }
        }
    }

    REP(i, N - 3) {
        FOR(j, i + 1, N - 2) {
            FOR(k, j + 1, N - 1) {
                FOR(l, k + 1, N) {
                    LL max_x = max(xs[i], max(xs[j], max(xs[k], xs[l])));
                    LL min_x = min(xs[i], min(xs[j], min(xs[k], xs[l])));
                    LL max_y = max(ys[i], max(ys[j], max(ys[k], ys[l])));
                    LL min_y = min(ys[i], min(ys[j], min(ys[k], ys[l])));
                    if (check(min_x, max_x, min_y, max_y)) {
                        ans = min(ans, (max_x - min_x) * (max_y - min_y));
                    }
                    
                }
            }
        }
    }
    return ans;

}

int main(int argc, char const* argv[])
{
    cin >> N >> K;
    REP(i, N) {
        LL x, y;
        cin >> x >> y;
        xs.PB(x); ys.PB(y);
    }
    cout << solve() << endl;
    return 0;
}


Measured memory_bytes: 256
a,b,k = map(int,input().split())
ans = set([])
for i in range(a,min(a+k,b)):
    ans.add(i)
for i in range(max(b-k+1,a),b+1):
    ans.add(i)
ans = list(ans)
ans.sort()
for i in ans:
    print(i)

Measured memory_bytes: 9136
// <mst.cpp> - Sat Mar 25 19:28:19 2017
// This file is created by XuYike's black technology automatically.
// Copyright (C) 2015 ChangJun High School, Inc.
// I don't know what this program is.

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
using namespace std;
typedef long long lol;
template<typename T>
inline void gg(T &res){
    res=0;T fh=1;char ch=getchar();
    while((ch>'9'||ch<'0')&&ch!='-')ch=getchar();
    if(ch=='-')fh=-1,ch=getchar();
    while(ch>='0'&&ch<='9')res=res*10+ch-'0',ch=getchar();
    res*=fh;
}
inline int gi(){int x;gg(x);return x;}
inline lol gl(){lol x;gg(x);return x;}
const int MAXN=400010;
const int INF=2e9;
struct edge{
    int x,y,w;
    bool operator <(const edge b) const{return w<b.w;}
}e[MAXN];
int a[MAXN],f[MAXN];
int gf(int x){if(f[x]!=f[f[x]])f[x]=gf(f[x]);return f[x];}
int main(){
    int n=gi(),m=gi();
    for(int i=0;i<n;i++)f[i]=i,a[i]=a[i+n]=INF;
    for(int i=1;i<=m;i++){
        e[i].x=gi();e[i].y=gi();e[i].w=gi();
        a[e[i].x]=min(a[e[i].x],e[i].w+1);
        a[e[i].y]=min(a[e[i].y],e[i].w+2);
    }
    for(int i=1;i<n<<1;i++)a[i]=min(a[i],a[i-1]+2);
    for(int i=0;i<n;i++)e[++m]=(edge){i,(i+1)%n,min(a[i],a[i+n])};
    sort(e+1,e+m+1);
    lol ans=0;
    for(int i=1;i<=m;i++){
        int fa=gf(e[i].x),fb=gf(e[i].y);
        if(fa!=fb)f[fa]=fb,ans+=e[i].w;
    }
    printf("%lld",ans);
    return 0;
}

Measured memory_bytes: 10368
N = int(input().strip())

map = {i: {j: 0 for j in range(1, 10)} for i in range(1, 10)}

div = 1
for n in range(1, N + 1):
  h = n // div
  if h >= 10:
    div *= 10
    h = n // div
  t = n % 10
  if t == 0:
    continue
  map[h][t] += 1

total = 0
for i in range(1, 10):
  for j in range(1, 10):
    total += map[i][j] * map[j][i]

print(total)


Measured memory_bytes: 3064
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
#include <functional>
#include <cctype>

using namespace std;

int n;
vector<int> S;
vector<int> temp;
int c;

const long long INF = 1 << 30;
#define REP(i,n) for(int i = 0; i < (int)n; ++i)

void Merge(int left, int mid, int right)
{
	int n1 = mid - left;
	int n2 = right - mid;
	int L[n1 + 1], R[n2 + 1];

	REP(i, n1)
		L[i] = S[left + i];
	REP(i, n2)
		R[i] = S[mid + i];

	L[n1] = INF;
	R[n2] = INF;

	int ii = left;
	int j = 0, k = 0;
	for(; ii < right; ++ii) {
		++c;
		if(L[j] <= R[k])
			S[ii] = L[j++];
		else
			S[ii] = R[k++];
	}
}

void MergeSort(int left, int right)
{
	if(left + 1 < right) {
		int mid = (left + right) / 2;
		MergeSort(left, mid);
		MergeSort(mid, right);
		Merge(left, mid, right);
	}
}

int main()
{
	cin >> n;
	S.reserve(n);
	temp.reserve(n);
	REP(i, n)
		cin >> S[i];

	MergeSort(0, n);

	// 出力
	REP(i, n) {
		cout << S[i];
		(i != n - 1)?
			cout << ' ' : cout << endl;
	}
	cout << c << endl;
	return 0;
}

Measured memory_bytes: 5084
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
const int MOD=998244353;
const int maxn=4005;
int n,k;
int po[maxn],C[maxn][maxn];
inline void ini(){
	po[0]=1;
	for(register int i=1;i<maxn;i++)po[i]=(po[i-1]*2)%MOD;
	C[0][0]=1;
	for(register int i=1;i<maxn;i++){
		C[i][0]=1;
		for(register int j=1;j<=i;j++)C[i][j]=(C[i-1][j-1]+C[i-1][j])%MOD;
	}
}
int c(int n,int m){
	if(m<0||n<0)return 0;
	return C[n][m];
}
inline int calc(int x,int n,int k){
	int ans=0;
	int tot=max(0,x/2-max(0,x-1-k));
	for(register int i=0;i<=tot;i++){
		ans=(1LL*po[i]*C[tot][i]%MOD*c(n+k-2*tot-1,k-tot*2+i-1)+ans)%MOD;
	}
	return ans;
}
int main(){
	ini();
	scanf("%d%d",&k,&n);
	for(register int i=2;i<=2*k;i++){
		if(i&1){
			printf("%d\n",calc(i,n,k));
		}
		else {
			printf("%d\n",(calc(i-1,n,k-1)+calc(i-1,n-1,k-1))%MOD);
		}
	}
}

Measured memory_bytes: 61440
#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;

typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

const int MAX_N = 1e5 + 5;
const int MAX_L = 20; // ~ Log N
const long long MOD = 1e9 + 7;
const long long INF = 1e9 + 7;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef vector<vi> vvi;
typedef map<int,int> mi;
typedef map<ll,ll> mll;
typedef unordered_map<int,int> umi;
typedef unordered_map<ll,ll> umll;

#define LSOne(S) (S & (-S))
#define isBitSet(S, i) ((S >> i) & 1)
#define fi first
#define se second
#define ins(x,y) insert({x,y}) 
#define pb(x) push_back(x)
#define cnt(x) count(x)


void solve() {

}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    int tc=1; 
    for (int t = 1; t <= tc; t++) {
        //cout << "Case #" << t  << ": ";
        double a,b,c;
        cin>>a>>b>>c;
        cout<<(ll)(c*(ceil(a/b)))<<endl;
        solve();
    }
}


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

using namespace std;

int main(){
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    if(a+b>c+d) cout<<"Left"<<endl;
    else if(a+b<c+d) cout<<"Right"<<endl;
    else cout<<"Balanced"<<endl;
    
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#define debug(x) cerr << #x << ':' << x << endl
#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
using namespace std;
typedef long long ll;
 
int main(){
    ll x,y;
    cin >> x >> y;
 
    ll ans=0;
    while(x<=y){
        ans+=1;
        x*=2;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    int n;
    cin>>n;
    while(n--){
        int x,y,b,p;
        cin>>x>>y>>b>>p;
        int A=x*b+y*p;
        int B=A;
        if(b<5)B+=(5-b)*x;
        if(p<2)B+=(2-p)*y;
        B=B*4/5;
        cout<<min(A,B)<<endl;
    }
}

Measured memory_bytes: 1164
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]


def gcd(a, b):
    while True:
        a, b = b, a % b
        if b == 0:
            break
    return a


def lcm(a, b):
    return a * b // gcd(a, b)


a, b = ril()
print(lcm(a, b))

Measured memory_bytes: 3064
"use strict";
    
const main = arg => {
    arg = arg.split("\n");
    const k = parseInt(arg[5]);
    const antennas = arg.slice(0, 5).map(n=>~~n);
    
    console.log(antennas[4] - antennas[0] > k ? ":(" : "Yay!");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


Measured memory_bytes: 7372
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll,ll> Pl;
#define all(a) (a).begin(),(a).end()
#define rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(ll i=(a);i<(b);i++)
#define rrep(i,n) for(ll (i)=(n)-1;(i)>=0;i--)
#define SHOW(x) cout << #x << ": " << x << endl;
const ll INF=1e18,MOD = 1e9+7;
const int iINF = 1e9;
ll GCD(ll a,ll b){
    ll hoge;
    do{
        hoge=a%b;
        a=b;
        b=hoge;
    }while(hoge!=0);
    return a;
}
ll LCM(ll a,ll b){
    return a/GCD(a,b)*b;//overflow対策
}
int main(){
    int a,b;
    cin>>a>>b;
    cout<<LCM(a,b)<<endl;
}


Measured memory_bytes: 256
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int n,l;
int a[100010];
int aa[100010];

void f(int i){
	int k=0;
	if(i>0&&a[i]<a[i-1]){
		if(aa[i-1]==0)f(i-1);
		k=aa[i-1];
	}
	if(i<n-1&&a[i]<a[i+1]){
		if(aa[i+1]==0)f(i+1);
		chmax(k,aa[i+1]);
	}
	k+=l-a[i];
	aa[i]=k;
}

int main() {
	cin>>n>>l;
	int i;
	for(i=0;i<n;i++){
		cin>>a[i];
	}
	for(i=0;i<n;i++){
		if(aa[i]>0)continue;
		f(i);
	}
	int res=0;
	for(i=0;i<n;i++){
		chmax(res,aa[i]);
	}
	cout<<res<<endl;
	return 0;
}

Measured memory_bytes: 1200
// --------------------<optimizations>--------------------
#pragma GCC optimize("O3")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)\
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)\
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>

using namespace std;

#define ll long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define pii pair<ll,ll>
#define vpii vector<pair<ll,ll> >
#define F first
#define S second
#define ld long double
#define built __builtin_popcountll
#define mst(a,i) memset(a,i,sizeof(a))
#define all(x) x.begin(),x.end()
#define itit(it,a) for(auto it=(a).begin(); it!=(a).end(); it++)
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define repr(i,a,b) for(ll i=a; i>b; i--)
#define reprr(i,a,b) for(ll i=a; i>=b; i--)
#define pi 3.14159265358979323846264338327950288419716939937510582097494459230
ll max3(ll x,ll y,ll z) {return max(max(x,y),z);}
ll min3(ll x,ll y,ll z) {return min(min(x,y),z);}
const ll M=2e5+10,M2=1e6+10,mod=1e9+7,inf=1e17+10;
void add(int& a, int b) {a+=b;if(a>=mod){a-=mod;}}
#define trace1(x)			 	 cerr<<#x<<": "<<x<<endl
#define trace2(x, y)		 	 cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)		 	 cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)	 	 cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)	 cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
int X[] = {0, 1, 0, -1};
int Y[] = {-1, 0, 1, 0};
ll power(ll x,ll n){ll result=1;while(n>0){if(n%2==1)result=(result*x)%mod; x=((x%mod)*(x%mod))%mod;n=n/2;}return result;}



int main()
{
	#ifndef ONLINE_JUDGE
   // freopen("input.txt", "r", stdin);
   // freopen("output.txt", "w", stdout);
	#endif

	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll a[3];
	rep(i,0,3) cin >> a[i];
	sort(a,a+3);
	cout << a[0]+a[1];
	return 0;
}
/* The judge is never wrong! Your code is buggy 
   Look for:
 * * Read the problem carefully.
 * * Don't forget to sort(), mod, ll!!!!
 * * Initial value = +/- infinity instead of zero!!!
 * * an easier and alternate approach
 * * read the problem statement carefully
 * * if concept is correct and still WA, try with a different implementation
 * * special cases (n=1?)
 * * if you have no idea just guess the appropriate well-known algorithm instead of doing nothing :/
 */

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

int main(){
    ll n, k;
    cin >> n >> k;
    vector<ll> a(n);
    rep(i,n) cin >> a.at(i);
    sort(a.begin(), a.end());
    reverse(a.begin(), a.end());
    ll total = 0;
    for(int i=k;i<n;i++){
        total += a.at(i);
    }
    cout << total << endl;
    
} 

Measured memory_bytes: 1792
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cctype>
#define len length()
#define sz size()
#define rng(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) rng(i, 0, n)
#define srt(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define vi(a, n) vector<int> a(n)
#define vs(a, n) vector<string> a(n)
#define vc(a, n) vector<char> a(n)
#define psb(a) push_back(a)
#define ppb pop_back()
#define erc(S, i) S.erase(S.begin() + i)
#define ers(S, i, j) S.erase(S.begin() + i, S.begin() + j)
#define sp(n) cout << setprecision(n) << fixed
#define fst(s) s.at(0)
#define lst(s) s.at(s.len - 1)
using namespace std;

int main(){
    int A, B;
    string S;
    cin >> A >> B >> S;
    if(S.at(A) == '-'){
        erc(S, A);
    }
    else{
        cout << "No" << endl;
        return 0;
    }
    rep(i, A+B-1){
        if(!isdigit(S.at(i))){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
    
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>

struct node{
  struct node *right;
  struct node *left;
  struct node *parent;
  int key;
};

typedef struct node * Node;
#define NIL NULL

void inorder(Node);
void preorder(Node);
void insert(int);
int find(int,Node);

Node root;

int main(){
  int n, i, x;
  char com[20];
  
  scanf("%d", &n);

  for(i = 0; i < n; i++){
    scanf("%s", com);
    if ( com[0] == 'i' ){
      scanf("%d", &x);
      insert(x);
    }
    if(com[0] == 'f'){
      scanf("%d",&x);
      if(find(x,root) == 1) printf("yes\n");
      else printf("no\n");
    }
    else if(com[0] == 'p' ){
      inorder(root);
      printf("\n");
      preorder(root);
      printf("\n");
    } 
  }

  return 0;
}


void insert(int k){
  Node y = NIL;
  Node x = root;
  Node z;

  z = malloc(sizeof(struct node));
  z->key = k;
  z->left = NIL;
  z->right = NIL;

  while(x != NIL){
    y = x; // 親を設定
    if(z->key < x->key){
      x = x->left;
    }// 左の子へ移動
    else{
      x = x->right;
    }// 右の子へ移動
  }
  z->parent = y;

  if(y == NIL){ // T が空の場合
    root = z;
  }
  else if(z->key < y->key){
    y->left = z;
  }// z を y の左の子にする
  else{
    y->right = z;
  }// z を y の右の子にする
}

void inorder(Node u){
  if(u->left != NIL) inorder(u->left);
 
  printf(" %d",u->key);

  if(u->right != NIL) inorder(u->right);
}

void preorder(Node u){
  printf(" %d",u->key);

  if(u->left != NIL) preorder(u->left);
  if(u->right != NIL) preorder(u->right);
}

int find(int k, Node n){
  while(n){
    if(n->key > k) n = n->left;
    else if(n->key < k) n = n->right;
    else return 1;
  }
  return 0; 
}


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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

int main(void){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int64 X;
	cin >> X;
	if (X >= 30) {
	  cout << "Yes" << endl;
	} else {
	  cout << "No" << endl;
	}
}


Measured memory_bytes: 3648
#include <bits/stdc++.h>
using namespace std;
#define fst ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endk cout<<"\n";
typedef long long int ll;
typedef long int l;
#define l(i,a,b) for(i=a;i<b;i++)
#define lo(i,a,b) for(i=a;i>=b;i--)
#define s(v) sort(v.begin(),v.end());
#define pb push_back;
#define vll vector<ll>
#define vint vector<int>
#define test() ll t;cin>>t;while(t--){solve();};
#define test1() int t=1;while(t--){solve();};
bool isPrime(ll x)
{
    ll i,n;
    n=sqrt(x);
    if(x==1) return false;
    if(x==2 || x==3) return true;
    for(i=2;i<=n;i++)
    {
        if(!(x%i)) return false;
    }
    return true;
}
ll power(ll x,ll y)
{
	ll ans=1;
	while(y>0)
	{
		if(y&1) ans=ans*x;
		x=x*x;
		y=y>>1;
	}
	return ans;
}
vector<vll> adj(200001);
vll visited(200001,0);
ll sum=0;
void dfs(ll n)
{
    visited[n]++;
    sum++;
    ll i,j;
    j=adj[n].size();
    for(i=0;i<j;i++)
    {
        //cout<<adj[n][i]<<"s "<<n;
        //endk
        if(!visited[adj[n][i]])
        {
            dfs(adj[n][i]);
        }
    }
}
int solve()
{
    ll n,m,i,ans=0,j,k;
    cin>>n>>m;
    map<pair<ll,ll>,ll> cnt;
    for(i=0;i<m;i++)
    {
        cin>>j>>k;
        if(!cnt[{j,k}])
        {
            cnt[{j,k}]++;
            adj[j].push_back(k);
            adj[k].push_back(j);
        }
    }
    ans=-1;
        for(i=1;i<=n;i++)
        {
            if(!visited[i])
            {
                sum=0;
                dfs(i);
                ans=max(ans,sum);
            }      
        }
    cout<<ans;
    return 0;
}
int main()
{
    fst;
    test1();
    return 0;
}


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

int main(){
    int n;
    cin >> n;
    set<int> s;
    for(int i = 0; i < n; i++){
        int x;  cin >> x;
        if(s.count(x)){
            cout << "NO" << endl;
            return 0;
        }
        s.insert(x);
    }
    cout << "YES" << endl;
    return 0;
}

Measured memory_bytes: 9600
#include <bits/stdc++.h>
using namespace std;
 
#define REP(i,n) for(int i = 0;i < n;++i)
#define FORN(i,a,b) for (int i = (a);i <=(b); ++i)
#define FORD(i,a,b) for (int i = (a); i >= (b); --i)
#define SORT(list) sort(ALL((list)));
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define IOS  cin.tie(0),cout.tie(0); ios::sync_with_stdio(false);
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
 
const ll mod=1000000007;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

int main(){
    bool ok=false;
    int n; cin >> n;
    FORN(i, 1, 9) FORN(j, 1, 9){
		if(i*j==n) ok=true;     
    }
    if(ok) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;

int main()
{	
	int menseki[100][100];
	int tate[110];
	int yoko[110];
	int hantei[110];
	int W, H, N, hirosa = 0;
	cin >> W >> H >> N;
	for (int i = 0; i < W; i++)
	{
		for (int j = 0; j < H; j++)
		{
			menseki[i][j] = 1;
		}
	}
	for (int i = 0; i < N; i++)
	{
		cin >> yoko[i] >> tate[i] >> hantei[i];
	}

	for (int p = 0; p < N; p++)
	{
		if (hantei[p] == 1)
		{
			for (int i = 0; i < yoko[p]; i++)
			{
				for (int j = 0; j < H; j++)
				{
					menseki[i][j] = 0;
				}
			}
		}
		if (hantei[p] == 2)
		{
			for (int i = yoko[p]; i < W; i++)
			{
				for (int j = 0; j < H; j++)
				{
					menseki[i][j] = 0;
				}
			}
		}
		if (hantei[p] == 3)
		{
			for (int i = 0; i < W; i++)
			{
				for (int j = 0; j < tate[p]; j++)
				{
					menseki[i][j] = 0;
				}
			}
		}
		if (hantei[p] == 4)
		{
			for (int i = 0; i < W; i++)
			{
				for (int j = tate[p]; j < H; j++)
				{
					menseki[i][j] = 0;
				}
			}
		}

	}

	for (int i = 0; i < W; i++)
	{
		for (int j = 0; j < H; j++)
		{
			if (menseki[i][j] == 1)
			{
				hirosa++;
			}
		}
	}

		
	cout << hirosa << endl;
}

Measured memory_bytes: 256
L=input()

S = [1]
s = 1
for i in range(len(L)):
    s = (s*3)%(10**9+7)
    S.append(s)
S2 = [1]
s2 = 1
for i in range(len(L)):
    if L[i]=="1":
        s2=(s2*2)%(10**9+7)
        S2.append(s2)


ans = 0
count = 0
for i in range(len(L)):
    if L[i]=="1":
        ans = (ans+S2[count]*S[len(L)-i-1])%(10**9 + 7)
        count+=1

print((ans+S2[count])%(10**9 + 7))

Measured memory_bytes: 46688
import java.util.Scanner;

public class Main {

	static Main instance = new Main();

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		//入力値取得
		int N = scan.nextInt();
		long[] S = new long[N];

		for (int i = 0; i < N; i++) {
			S[i] = scan.nextLong();
		}

		sort(S, 0, S.length - 1);

		long[] newS = new long[N];
		for (int i = 0; i < N; i++) {
			newS[i] = S[N - i - 1];
		}

		//WK変数
		long result = newS[0];

		//演算
		if (N % 2 == 0) {
			for (int i = 1; i <= N / 2 - 1; i++) {
				result += 2L * newS[i];
			}
		} else {
			for (int i = 1; i < (N - 1) / 2; i++) {
				result += 2L * newS[i];
			}
			result += newS[(N - 1) / 2];

		}

		//結果出力
		System.out.println(result);
	}


    public static void sort(long[] array, int left, int right){
        if(left <= right){
            long p = array[(left + right) >>> 1];
            int l = left;
            int r = right;
            while(l <= r){
                while (array[l] < p){
                    l ++;
                }
                while (array[r] > p){
                    r --;
                }
                if (l <= r){
                    long tmp = array[l];
                    array[l] = array[r];
                    array[r] = tmp;
                    l++ ;
                    r-- ;
                }
            }
            sort(array, left, r);
            sort(array, l, right);
        }
    }
}

Measured memory_bytes: 60876
/**
 * File              : D - Knapsack 1 .cpp
 * Author            : horcrux2301 <khajuriaharsh729@gmail.com>
 * Date              : 06.01.2019
 * Last Modified Date: 06.01.2019
 */
#include <bits/stdc++.h>
#define ll long long
#define mp(a,b)     make_pair(a,b)
#define newline     cout << endl;
#define ff          first
#define ss          second
#define pii         pair<int,int>
#define pll         pair<ll,ll>
using namespace std;

template<typename S, typename T>
ostream& operator<<(ostream& out,pair<S,T> const& p){out<<'('<<p.ff<<", "<<p.ss<<')';return out;}

template<typename T>
ostream& operator<<(ostream& out,vector<T> const& v){
int l=v.size();for(int i=0;i<l-1;i++)out<<v[i]<<' ';if(l>0)out<<v[l-1];return out;}

template<typename T>
void trace(const char* name, T&& arg1){cout<<name<<" : "<<arg1<<endl;}

template<typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args){
const char* comma = strchr(names + 1, ',');cout.write(names, comma-names)<<" : "<<arg1<<" | ";trace(comma+1,args...);}

int main(){
    //clock_t tStart = clock();
    int test;
    test=1;
    //cin >> test;
    while(test--){
        ll N,W;
        cin >> N >> W;
        vector<ll> v(N), w(N);
        for(ll i=0;i<N;i++){
            cin >> w[i] >> v[i];
        }

        ll dp[N][W+1];
        for(ll i=0;i<N;i++){
            for(ll j=0;j<W+1;j++){
                dp[i][j]=-1;
            }
        }
        for(ll i=0;i<N;i++){
            dp[i][0]=0;
        }
        for(ll i=1;i<W+1;i++){
            if(i<w[0]) dp[0][i]=0;
            else dp[0][i]=v[0];
        }
        for(ll i=1;i<N;i++){
            for(ll j=1;j<W+1;j++){
                if(j-w[i]>0)
                    dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i]]+v[i]);
                else
                    dp[i][j] = dp[i-1][j];
            }
        }
    

        ll ans = dp[N-1][W];
        cout << ans << endl;
    }
    //printf("Time taken: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
    return 0;
}



Measured memory_bytes: 78336
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


def main():

    N, M, V, P = in_nn()
    A = sorted(in_nl())[::-1]

    # print(A)

    def is_ok(i):
        if i < P:
            return True
        else:
            baf = 0
            for j in range(N):
                if j < P - 1 or i <= j:
                    baf += M
                    continue

                if A[i] + M - A[j] < 0:
                    return False
                else:
                    baf += A[i] + M - A[j]

            # print(i, baf, V * M)
            return V * M <= baf

    def bisect(ng, ok):

        while abs(ok - ng) > 1:
            mid = (ok + ng) // 2
            if is_ok(mid):
                ok = mid
            else:
                ng = mid
        return ok

    ans = bisect(N, 0) + 1
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 85704
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String a=sc.next();
    String b=sc.next();
    String s=a+b;
    final int S=Integer.parseInt(s);
    double d=Math.sqrt(S);
    int i=(int)d;
    if(i*i==S){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
  }
}

Measured memory_bytes: 22484
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}

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

    srep(i,x-k+1,x+k){
        cout << i << endl;
    }

    return 0;
}
 
 


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

int main() {
  while(1){
    int n, m, p;
    cin >> n;
    cin >> m;
    cin >> p;
    int sum = 0;
    int s;
    int win;

    if(n == 0 && m  == 0 && p == 0)
      return 0;

    for(int i = 1; i <= n; i++){
      cin >> s;
      sum += s;
      if(i == m)
        win = s;
    }
    if(win != 0)
      cout << (int)(((100 * sum) * (100 - p) / 100) / win) << "\n";
    else
      cout << 0 << "\n";
  }
}



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

#define real() cout<<"\n";

#define debug(arguments...) {string pri=#arguments;replace(pri.begin(),pri.end(),',',' ');stringstream prii(pri);istream_iterator<string> _iterat(prii);error(_iterat,arguments);}
void error(istream_iterator<string> _iterat) {}
template<typename T,typename...args>
void error(istream_iterator<string> _iterat,T a,args...arguments)
{
    cerr<<*_iterat<<"="<<a<<"\n";
    error(++_iterat,arguments...);
}

#define debugmp(z) {string pri=#z;error(pri,z);}
template<typename T,typename V>
void error(string pri,const pair<T,V> &z)
{
    cerr<<pri<<"="<<"{"<<z.first<<","<<z.second<<"}"<<"\n";
}
template<typename T,typename V>
void error(string pri,const map<T,V> &z)
{
    cerr<<pri<<" is={";
    for(auto it=z.begin();it!=z.end();++it)
    {
        cerr<<it->first<<":"<<it->second;
        auto _it=z.end();
        _it--;
        if(it!=_it) cerr<<",";
    }
    cerr<<"}";
    cerr<<"\n";
}

#define debugc(z,st,ed) {string pri=#z;error(pri,z,st,ed);}
template<typename T>
void error(string pri,const vector<T> &z,long long st,long long ed)
{
    cerr<<pri<<" in range["<<st<<","<<ed<<")=[";
    for(long long i=st;i<ed;++i)
    {
        cerr<<z[i];
        if(i!=ed-1) cerr<<" ";
    }
    cerr<<"]";
    cerr<<"\n";
}
template<typename T>
void error(string pri,const set<T> &z,long long st,long long ed)
{
    cerr<<pri<<" in range["<<st<<","<<ed<<")=[";
    long long tempcount=0;
    for(auto it=z.begin();it!=z.end();++it)
    {
        if(tempcount>=st and tempcount<ed)
        {
            cerr<<*it;
            if(tempcount!=ed-1) cerr<<" ";
        }
        tempcount++;
    }
    cerr<<"]";
    cerr<<"\n";
}
template<typename T>
void error(string pri,const T z[],long long st,long long ed)
{
    cerr<<pri<<" in range["<<st<<","<<ed<<")=[";
    for(long long i=st;i<ed;++i)
    {
        cerr<<z[i];
        if(i!=ed-1) cerr<<" ";
    }
    cerr<<"]";
    cerr<<"\n";
}

void logic()
{
    long long n;
    cin>>n;
    long long count=0;
    for(int i=1;i<=1000000;++i)
    {
        for(int j=1;j<=1000000;++j)
        {
            int a=i;
            int b=j;
            int c=n-(a*b);
            if(c>0) count++;
            else break;
        }
    }
    cout<<count;
    cout<<"\n";
    //incase of wrong answer...stress test your code...do not stress test yourself
    //overflow,bounds,size,constraints
    //sample tests,corner case/special case(n==0 or n==1 or negative numbers...),some hand written tests
    //read statement carefully
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    long long t;
    //cin>>t;
    //while(t--)
    {
        logic();
    }
}


Measured memory_bytes: 3648
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;

namespace LogicSummoner
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                var nums = GetNumbersInt();
                var n = nums[0];
                var x = nums[1];
                if (n == 0 && x == 0)
                {
                    break;
                }

                var count = 0;

                // 1-3
                for (int i = 1; i < n - 1; i++)
                {
                    // 2-4
                    for (int j = i + 1; j < n; j++)
                    {
                        var k = x - i - j;
                        if (j < k && k < n + 1)
                        {
                            count++;
                        }
                    }
                }

                System.Console.WriteLine(count);
            }
        }

        //static StreamReader Console = new StreamReader("input.txt");

        static int GetNumber()
        {
            return int.Parse(Console.ReadLine().Trim());
        }

        static double GetDounble()
        {
            return double.Parse(Console.ReadLine().Trim());
        }

        static int[] GetNumbersInt(int n = 0)
        {
            return Console.ReadLine().Trim().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(x => int.Parse(x)).ToArray();
        }

        static long[] GetNumbersLong(int n = 0)
        {
            return Console.ReadLine().Trim().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(x => long.Parse(x)).ToArray();
        }

        static double[] GetNumbersDouble(int n = 0)
        {
            return Console.ReadLine().Trim().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).Select(x => double.Parse(x)).ToArray();
        }

        static string[] GetStrings(int n = 0)
        {
            return Console.ReadLine().Trim().Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries).ToArray();
        }
    }
}

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

using namespace std;

int main()
{
    int n, k, a, b;
    cin >> n >> k >> a >> b;
    if(n <= k)
        return cout << n * a << '\n', 0;
    else
        return cout << k * a + (n - k) * b << '\n', 0;
}


Measured memory_bytes: 256
use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

pub fn read_n<T: FromStr>(n: usize) -> Vec<T> {
    read_n_logic::<T>(n, vec![])
}

pub fn read_n_logic<T: FromStr>(n: usize, mut a: Vec<T>) -> Vec<T> {
    match n {
        0 => a,
        _ => {
            a.push(read::<T>());
            read_n_logic(n - 1, a)
        }
    }

}

use std::cmp::{max, min};

fn main() {
    let n: usize = read();
    let a: Vec<i64> = read_n(n);
    let mut b: Vec<i64> = vec![0; n];

    for (i, v) in a.iter().enumerate() {
        b[(v - 1) as usize] = (i + 1) as i64
    }

    for i in b {
        print!("{} ", i)
    }

}


Measured memory_bytes: 33532
#[allow(dead_code)]
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()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}

fn main() {
    let mut v = read_vec::<u32>();
    v.sort();
    let ans = v[0] + v[1] + 10 * v[2];
    println!("{}", ans);
}


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

int main(){
  string s,t;
  cin >> s >> t;
  if(s.size() > t.size()) { cout << "GREATER" << endl; return 0; }
  else if(s.size() < t.size()) { cout << "LESS" << endl; return 0; }
  for(int i = 0; i < s.size(); i++){
    if(s[i] > t[i]){
      cout << "GREATER" << endl;
      return 0;
    }else if(s[i] < t[i]){
      cout << "LESS" << endl;
      return 0;
    }
  }
  cout << "EQUAL" << endl;
  return 0;
}

Measured memory_bytes: 3584
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <map>
#include <math.h>

typedef long long ll;
using namespace std;
 
 
ll GreatestCommonDivisor(ll p, ll q)
{
  if ( p < q ) swap( p, q);
  while ( true )
  {
    long long yo = p % q;
    if ( yo == 0 ) break;
    p = q;
    q = yo;
  }
  return q;
}
 
//最小公倍数
long long LeastCommonMultiple(ll a, ll b)
{
  return a / GreatestCommonDivisor(a,b) * b;
}
 
 
ll f(ll a)
{
  ll num = 0;
  while ( a > 0 )
  {
    if ( a % 2 == 1) return num;
    ++num;
    a = a / 2;
  }
  return num;
}
 

int main()
{
  ll n, m;
  cin >> n >> m;
  
  vector<ll> a(n);
  for ( auto& ai : a) {
    cin >> ai;
    ai /= 2;
  }
 
 
  //ai に 含まれる2の数を計算（同じでないと半公倍数は存在せず）
  ll c = f( a[0] );
  for ( int i = 1; i < n; ++i )
  {
    if ( c != f(a[i])) { 
      cout << 0;
      return 0;
    }
  }
 
  //a の最小公倍数を計算
  ll lcm = a[0];
  for ( ll i = 1; i < n; ++i )
    lcm = LeastCommonMultiple(lcm, a[i]);
 
  // clm * (2p+1) <= M を満たす最大のp
  //ll num = (m - lcm ) / 2 / lcm;
  //p=clm * (2*0+1) < m なら p=0もカウント
  //if ( lcm <= m ) ++num;
  //cout << num;

  //以下だとOK
  // lcm * (2 p - 1) <= M を満たす最大のp
  cout << (m + lcm ) / lcm / 2;
  
  return 0;
}
 

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T> ostream& operator<<(ostream& s,const multiset<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double EPS=1e-10;
const double PI=acos(-1);

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	int n,x,y;
	cin>>n>>x>>y;
	x--,y--;
	vector<int> cnt(n,0);
	rep(i,n)FOR(j,i+1,n){
		cnt[min(abs(i-j),abs(i-x)+1+abs(y-j))]++;
	}
	FOR(k,1,n){
		cout<<cnt[k]<<endl;
	}
}

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

int main() {
  int N;
  cin >> N;
  if (N < 99){
    int x = (N % 10);
    //cout << x << endl;
    if (x == 2 || x == 4 || x == 5 || x == 7 || x == 9){
      cout << "hon" << endl;
    }
    else if (x == 0 || x == 1 || x == 6 || x == 8){
      cout << "pon" << endl;
    }
    else if (x == 3){
      cout << "bon" << endl;
    }
  }
  else if (100 <= N){
    int x = (N % 10);
    //cout << x << endl;
    if (x == 2 || x == 4 || x == 5 || x == 7 || x == 9){
      cout << "hon" << endl;
    }
    else if (x == 0 || x == 1 || x == 6 || x == 8){
      cout << "pon" << endl;
    }
    else if (x == 3){
      cout << "bon" << endl;
    }
  }
}

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

#define rep(i,n) for (int i = 0; i< (n); ++i)
#define vvec(m,n) vector<vector<int>> (int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()

using ll = long long;

int main(){
    int n;
    string s;
    cin >> n;
    cin >> s;
    int abc_sum = 0;
    rep(i,n-2){
        if(s.at(i)=='A' && s.at(i+1) == 'B' && s.at(i+2)=='C') abc_sum++;
    }
    cout << abc_sum << endl;
}  

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


public class Main{
	static int n;
	static int [][] f;
	static int [][] p;
	static int []a;
	static int ans;
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		f = new int[n][10];
		for(int i = 0;i < n;i++){
			for(int j = 0;j < 10;j++){
				f[i][j] = sc.nextInt();			//店の状態
			}
		}
		p = new int[n][11];
		for(int i = 0;i < n; i++){
			for(int j = 0; j< 11; j++){
				p[i][j] = sc.nextInt();			//利益の入力
			}
		}
		sc.close();
		a = new int [10];			//姉さんの店の状態を入れる配列
		ans = Integer.MIN_VALUE;		//intの最小値
		dfs(0);
		System.out.println(ans);
	}
	static void dfs(int index){
		if(index == 10){
			if(Arrays.toString(a).equals("[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"))return;
			memo();
			return;

		}else{
			a[index] = 0;
			dfs(index + 1);
			a[index] = 1;
			dfs(index + 1);

		}
	}

	static void memo(){
		int partAns = 0;
		for(int i = 0;i < n;i++){
			int count = 0;
			for(int j = 0; j < 10;j++){
				if(a[j] == 1&& f[i][j] == 1){			//姉さんの店と店iが空いてたらカウントプラス１
					count++;
				}
			}
			partAns += p[i][count];
		}
		ans = Math.max(partAns, ans);
	}
}


Measured memory_bytes: 27320
x = int(input())
if 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)
else:
    print(1)


Measured memory_bytes: 9176
n = int(input())
a = list(map(int,input().split()))
INF = 114514191981036436433-4
mi = 0
for i in range(n):
    if a[i] < 0:
        mi += 1
        a[i] *= (-1)
a.sort()

if mi%2 == 0:
    print(sum(a))
else:
    print(sum(a) - 2 * a[0])

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

int32_t main() 
{
      int p=1000000007;
      int n,k,ans=0;
      cin>>n>>k;
      int i;
      for(i=k;i<=n+1;i++)
      {
            int a,b,c,d;
            a=((i)*(i-1));
            c=(a/2);
            b=((i)*(2*n-i+1));
            d=b/2;
            //cout<<"i "<<i<<" a "<<a<<" b "<<b<<endl;
            ans=(ans+(d-c)+1)%p;
            //cout<<ans<<endl;
      }


      cout<<ans%p<<endl;


	return 0;
}


Measured memory_bytes: 3620
#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N = 55;

int n;
int x[N], y[N];

int32_t main()
{
	IOS;
	int n;
	cin >> n;
	for(int i = 1; i <= n; i++)
		cin >> x[i] >> y[i];
	map<pair<int, int>, int> m;
	for(int i = 1; i <= n; i++)
	{
		for(int j = 1; j <= n; j++)
		{
			if(i == j)
				continue;
			int a = x[j] - x[i];
			int b = y[j] - y[i];
			m[{a, b}]++;
		}
	}
	int mx = 0;
	for(auto &it:m)
		mx = max(mx, it.second);
	int ans = n - mx;
	cout << ans;
	return 0;
}

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

using namespace std;
typedef pair<int, int> P;

void solve()
{
	vector<int> a(3);
	for (int i = 0; i < 3; ++i)
	{
		cin >> a[i];
	}
	sort(a.begin(), a.end());
	cout << a[0] * a[1] / 2 << endl;
}

int main()
{
	solve();
	return(0);
}

Measured memory_bytes: 256
import sys
mod=10**9+7 ; inf=float("inf")
from math import sqrt, ceil
from collections import deque, Counter, defaultdict #すべてのkeyが用意されてる defaultdict(int)で初期化
input=lambda: sys.stdin.readline().strip()
sys.setrecursionlimit(11451419)
from decimal import ROUND_HALF_UP,Decimal  #変換後の末尾桁を0や0.01で指定
  #Decimal((str(0.5)).quantize(Decimal('0'), rounding=ROUND_HALF_UP))
from functools import lru_cache
from bisect import bisect_left as bileft, bisect_right as biright
#メモ化再帰defの冒頭に毎回 @lru_cache(maxsize=10**10)
#引数にlistはだめ
#######ここまでテンプレ#######
#ソート、"a"+"b"、再帰ならPython3の方がいい
#######ここから天ぷら########

C=[1,400,800,1200,1600,2000,2400,2800,3200]
n=int(input())
A=list(map(int,input().split()))
cnt=[0]*9
for i in range(n):
    q=biright(C,A[i])-1
    cnt[q]+=1

print(max(1,8-cnt[:-1].count(0)) , 8-cnt[:-1].count(0)+cnt[-1])


Measured memory_bytes: 9928
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);

		int n = scan.nextInt();

		int tmp;
		if (n % 2 == 0) {
			tmp = n / 2;
		} else {
			tmp = (n + 1) / 2;
		}

		BigDecimal bd1 = new BigDecimal(tmp);
		BigDecimal bd2 = new BigDecimal(n);
		BigDecimal ret = bd1.divide(bd2, 10, BigDecimal.ROUND_HALF_UP);

		out.println(ret);
		out.flush();
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Measured memory_bytes: 21332