akhauriyash/Code-Regression huggingface dataset:
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func Scan() string {
	sc.Scan()
	return sc.Text()
}
func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}
func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	x, y := iScan()-1, iScan()-1
	p := []int{300000, 200000, 100000}
	ans := 0
	if x <= 2 {
		ans += p[x]
	}
	if y <= 2 {
		ans += p[y]
	}
	if x == 0 && y == 0 {
		ans += 400000
	}
	fmt.Println(ans)
}


Measured memory_bytes: 1772
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;

#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-8;
const int MOD = 1000000007; // 998244353;
const int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};
/*-------------------------------------------------*/
int main() {
  cin.tie(0); ios::sync_with_stdio(false);
  // freopen("input.txt", "r", stdin);

  int n; string s; cin >> n >> s;
  map<char, int> mp;
  mp['W'] = 0; mp['B'] = 1;
  REP(i, n * 2) {
    int which = (mp[s[i]] + n * 2 - 1 - i) % 2;
    s[i] = (which == 0 ? 'W' : 'B');
  }
  int cnt = 0;
  long long ans = 1;
  REP(i, n * 2) {
    if (s[i] == 'W') {
      ++cnt;
    } else {
      if (cnt == 0) {
        cout << 0 << '\n';
        return 0;
      }
      (ans *= cnt) %= MOD;
      --cnt;
    }
  }
  if (cnt > 0) {
    cout << 0 << '\n';
    return 0;
  }
  FOR(i, 1, n + 1) (ans *= i) %= MOD;
  cout << ans << '\n';
  return 0;
}


Measured memory_bytes: 720
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define input_i(x) scanf("%d", &x)

#define N_SIZE 200001
#define Q_SIZE 200001

int *To[N_SIZE];
int To_size[N_SIZE];
int Ans[N_SIZE];

void dfs(int v, int p) {
    int i, u;
    for(i= 0; i < To_size[v]; i++) {
        u= To[v][i];
        if(u == p) continue;
        Ans[u]+= Ans[v];
        dfs(u, v);
    }
}

int main(int argc, char const *argv[]) {
    int N, Q, a, b, p, x, i;
    input_i(N);
    input_i(Q);
    for(i= 0; i < N - 1; i++) {
        scanf("%d %d", &a, &b);
        a--;
        b--;
        if(To_size[a] == 0)
            To[a]= (int *)malloc(sizeof(int));
        else
            To[a]= (int *)realloc(To[a], sizeof(int) * (To_size[a] + 1));
        To[a][To_size[a]]= b;
        To_size[a]++;
        if(To_size[b] == 0)
            To[b]= (int *)malloc(sizeof(int));
        else
            To[b]= (int *)realloc(To[b], sizeof(int) * (To_size[b] + 1));
        To[b][To_size[b]]= a;
        To_size[b]++;
    }
    for(i= 0; i < Q; i++) {
        input_i(p);
        input_i(x);
        p--;
        Ans[p]+= x;
    }
    dfs(0, -1);
    for(i= 0; i < N; i++) printf("%d ", Ans[i]);
    printf("\n");
    return 0;
}


Measured memory_bytes: 21120
#include <cstdio>
#include <vector>
using namespace std;

typedef struct P{
	int s,e;
}P;

int N;
bool li[100000];
vector<P> v;

int main(){
	v = vector<P>();
	scanf("%d",&N);
	int tmpi,f;
	for(int i = 0;i < N; i++){
		scanf("%d",&tmpi);
		li[i] = tmpi == 0 ? false : true;
		if(i==0){
			f = 0;
		}
		else{
			if(li[i]==li[i-1]){
				P tmpp = {f,i-1};
				v.push_back(tmpp);
				f = i;
			}
		}
	}
	P tmpp2 = {f,N-1};
	v.push_back(tmpp2);
	
	int maxl = 1;
	for(int i = 0; i < v.size(); i++){
		for(int j = v[i].s; j <= v[i].e; j++){
			li[j] = !li[j];
		}
		
		int l = v[i].e - v[i].s + 1;
		int it = v[i].s;
		while(it > 0 && (li[it] != li[it-1])){
			it--;
		}
		l += v[i].s - it;
		it = v[i].e;
		while(it < N-1 && (li[it] != li[it+1])){
			it++;
		}
		l += it - v[i].e;
		if(l > maxl){
			maxl = l;
		}

		for(int j = v[i].s; j <= v[i].e; j++){
			li[j] = !li[j];
		}
	}
	printf("%d\n",maxl);
	return 0;
}

Measured memory_bytes: 2996
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define REP(i, d, n) for(int i=(d); i<(n); ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
using P = pair<int, int>;
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;

    int one = 0;
    int zero = 0; 
    rep(i, s.length()){
        if(s[i] == '0'){
            zero++;
        }
        else{
            one++;
        }
    }
    cout << min(one, zero) * 2 << endl;

    return 0;
}

Measured memory_bytes: 512
/*
author:Rahul Chocha
school of eng. and applied science
*/

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define MAXI INT_MAX
#define MINI INT_MIN
#define din(t) long long t; cin >> t;
#define fi(i, l, r, d) for (i = l; i < r; i += d)
#define fd(i, l, r, d) for (i = l - 1; i >= r; i -= d)
#define pb push_back
#define mp make_pair


void speed_up()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
}
void Inp_Out(){
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("A.01.inp", "r", stdin);
    // for writing output to output.txt
    //freopen("A.01.out", "w", stdout);
    #endif
}

int main()
{   

   	speed_up();
   	//Inp_Out();

		din(a) din(b) din(c) din(k);
		ll flg=1;
		if(a>=pow(2,k)*b)flg=0;
		else {
			ll i=0;
			while(a>=b && i<=k){
				b*=2;
				//cout<<b<<"\n";
				i++;
			}
			k-=(i);
			//if(!k)flg=0;
		}
		if(b>=c*pow(2,k))flg=0;
		//cout<<a<<" "<<b<<" "<<c;
		if(flg)cout<<"Yes\n";
		else cout<<"No\n";
	
	

} 


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

int main() {
    unsigned long long int A,B,N;
   cin >> A >> B >> N;
  if(A == 0 || A % N == 0) {
  cout << B / N - A / N + 1<< endl;
  }
  else{
    cout << B / N - A / N << endl;
  }
}
  

Measured memory_bytes: 764
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define uniq(x) (x).erase(unique(ALL(x)),(x).end())
#define SORT(x) sort(ALL(x))
#define REV(x) reverse(ALL(x))
#define foreach(it,x) for(__typeof((x).begin()) it=(x).begin();it!=(x).end();it++)
#define debug(x) cerr<<#x<<"="<<(x)<<endl
#define gett() cerr<<"Time:"<<clock()<<"ms."<<endl
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rlcfpoj(x) scanf("%I64d",&x)
#define pi(x) printf("%d",x)
#define pl(x) printf("%lld",x)
#define plcfpoj(x) printf("%I64d",x)
#define lfd() printf("\n")
#define sp() printf(" ")
#define inrep(x) int x;scanf("%d",&x);while(x--)
int n;
int a[200100];
int qj[200100];//<=i
int hj[200100];//>=i
int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=1;i<=n;i++)
		qj[i]=max(qj[i-1],a[i]);
	for(int i=n;i>=1;i--)
		hj[i]=max(hj[i+1],a[i]);
	for(int i=1;i<=n;i++)
		cout<<max(qj[i-1],hj[i+1])<<endl;
	return 0;
}


Measured memory_bytes: 3968
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm> 
#include <cmath>
#include <map>
#include <queue>
#include <utility>
#include <set>

using namespace std;

typedef long long LL;
typedef pair<int, int> pii;
typedef pair<int, pii> edge;

string s;
int main() {
	cin >> s;
	int ans = 0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'p' && i % 2 == 0) {
			ans--;
		} else if (s[i] == 'g' && i % 2 == 1) {
			ans++;
		}
	}
	cout << ans << endl;
}

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

int main(){
    ll N,K;
    cin >> N >> K;
    long double ans = 0;
    for(ll i = 1; i <= N; i++){
        long double tmp = 1;
        ll score = i;
        while(score < K){
            score *= 2;
            tmp /= 2;
        }
        ans += tmp;
    }
    ans /= N;
    cout << setprecision(10) <<  ans <<  "\n";
    return 0;
} 


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

int main() {
	long long X, K, D; std::cin >> X >> K >> D;
	X = std::abs(X);

	long long div = std::min(K, X / D);
	K -= div;
	X -= div * D;
	if (K % 2 == 0) std::cout << X << std::endl;
	else std::cout << D - X << std::endl;
	

	return 0;
}

Measured memory_bytes: 3592
#include<iostream>
#include<map>
#include<vector>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm> 
#include<climits>
#include<stack>
#include<queue>
#include<set>
#include<cctype>
using namespace std;
using Data = pair<long long, vector<int> >;

# define REP(i,n) for (int i=0;i<(n);++i)
# define rep(i,a,b) for(int i=a;i<(b);++i)
# define p(s) std::cout << s ;
# define pl(s)  std::cout << s << endl;
# define printIf(j,s1,s2) cout << (j ? s1 : s2) << endl;
# define YES(j) cout << (j ? "YES" : "NO") << endl;
# define Yes(j) std::cout << (j ? "Yes" : "No") << endl;
# define yes(j) std::cout << (j ? "yes" : "no") << endl;
# define all(v) v.begin(),v.end()
# define showVector(v) REP(i,v.size()){p(v[i]);p(" ")} pl("")
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;}
typedef pair<int,int> P_ii;
typedef pair<double,double> P_dd;
typedef long long int ll;
const int mod = 1e9+7;

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

    vector<int> v;
    v.push_back(1);
    int tmp=1;
    REP(i,20) {
        tmp *= 2;
        v.push_back(tmp);
    }

    double ans=0;
    rep(i,1,n+1) {
        auto a = lower_bound(v.begin(),v.end(),(k+i-1)/i);
        int num = a - v.begin();
        ans += pow(0.5,(double)num)/(double)n;
    }
    printf("%.12f\n",ans);
}

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

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int randi(int a, int b) { return uniform_int_distribution(a, b)(rng); }

struct rolling_hash {
  static constexpr uint64_t mod = 2e9 + 33;
  static inline array<long long, 2> base{randi(1e9, 2e9), randi(1e9, 2e9)};
  static inline array<vector<int>, 2> powb{vector{1}, vector{1}};
  int n;
  array<vector<int>, 2> h{vector{0}, vector{0}};
  template <class S = string> rolling_hash(const S& s = "") : n(size(s)) {
    for (int k : {0, 1}) {
      for (auto c : s) h[k].push_back((h[k].back() * base[k] + c) % mod);
      while ((int)size(powb[k]) <= n)
        powb[k].push_back(powb[k].back() * base[k] % mod);
    }
  }
  int get(int l, int r, int k) const {
    return (h[k][r] + (mod - h[k][l]) * powb[k][r - l]) % mod;
  }
  auto get(int l, int r) const { return make_pair(get(l, r, 0), get(l, r, 1)); }
};

struct chash {
  static uint64_t splitmix64(uint64_t x) {
    x += 0x9e3779b97f4a7c15;
    x = (x ^ x >> 30) * 0xbf58476d1ce4e5b9;
    x = (x ^ x >> 27) * 0x94d049bb133111eb;
    return x ^ x >> 31;
  }
  size_t operator()(pair<int, int> p) const {
    return splitmix64(p.first | (uint64_t)p.second << 32);
  }
};

int main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  int n;
  cin >> n;
  vector<rolling_hash> rh(n);
  vector<__gnu_pbds::gp_hash_table<pair<int, int>, int, chash>> ht(26);
  for (auto&& e : rh) {
    string s;
    cin >> s;
    reverse(begin(s), end(s));
    e = s;
    int bt = 0;
    for (int i = e.n; i--; ) {
      bt |= 1 << (s[i] - 'a');
      auto p = e.get(0, i);
      for (int x = 0; x < 26; ++x) {
        if (~bt >> x & 1) continue;
        ++ht[x][p];
      }
    }
  }
  auto res = 0LL;
  for (auto&& e : rh) {
    res += ht[e.get(e.n - 1, e.n, 0) - 'a'][e.get(0, e.n - 1)];
  }
  cout << res - n << '\n';
}


Measured memory_bytes: 883588
import math
a, b, h, m = map(int, input().split())
theta_h = 2 * math.pi * (h + m / 60) / 12
theta_m = 2 * math.pi * m / 60
d_theta = abs(theta_h - theta_m)
answer = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(d_theta))
print(answer)

Measured memory_bytes: 9496
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define int long long
#define float long double
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define endl '\n'
#define pii pair<int, int>
#define min3(a,b,c) min(a, min(b, c))
#define max3(a,b,c) max(a, max(b, c))
#define all(x) x.begin(), x.end()
#define fill(a,b) memset(a, b, sizeof(a))
#define sz(x) (int)x.size()
#define sp(x) setprecision(x)
#define ff first
#define ss second
#define lb lower_bound
#define ub upper_bound
#define bs binary_search

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

    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    int n; cin>>n;
    int arr[n],ans=0;
    for(int i=0;i<n;i++) cin>>arr[i];
    sort(arr,arr+n);
    for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            for(int k=j+1;k<n;k++){
                if(arr[i]!=arr[j] && arr[j]!=arr[k] && arr[k]<arr[i]+arr[j]) ans++;
            }
        }
    }
    cout<<ans<<endl;

}

Measured memory_bytes: 3636
import std.stdio, std.string, std.conv, std.algorithm, std.numeric;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

void main() {
    int n, m;
    scan(n, m);

    auto uf = UnionFind(n);

    foreach (i ; 0 .. m) {
        int ai, bi;
        scan(ai, bi);
        ai--, bi--;
        uf.unite(ai, bi);
    }

    long a = uf.count_node(0), b = uf.count_node(1);
    a = min(a, b);

    long ans = a * (a - 1) / 2 + (n - a) * (n - a - 1) / 2 - m;

    writeln(ans);
}


struct UnionFind {
    private {
        int N;
        int[] p;
        int[] rank;
        int[] num_v;
    }

    this (int n) {
        N = n;
        p = iota(N).array;
        rank = new int[](N);
        num_v = new int[](N);
        foreach (i ; 0 .. N) {
            num_v[i] = 1;
        }
    }

    int find_root(int x) {
        if (p[x] != x) {
            p[x] = find_root(p[x]);
        }

        return p[x];
    }

    bool same(int x, int y) {
        return find_root(x) == find_root(y);
    }

    void unite(int x, int y) {
        int u = find_root(x), v = find_root(y);

        if (u == v) return;

        if (rank[u] < rank[v]) {
            p[u] = v;
            num_v[v] += num_v[u];
            num_v[u] = 0;
        }
        else {
            p[v] = u;
            num_v[u] += num_v[v];
            num_v[v] = 0;

            if (rank[u] == rank[v]) {
                rank[u]++;
            }
        }
    }

    int count_node(int x) {
        return num_v[find_root(x)];
    }
}


void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

Measured memory_bytes: 4348
#include <stdio.h>

#define MAX 10000
#define NIL -1

typedef struct {
	int parent, left, right;
} Node;

Node T[MAX];
int n, D[MAX], H[MAX];

void setDepth(int u,int d) {
  if(u == NIL) return;
  D[u] = d;
  setDepth(T[u].left, d+1);
  setDepth(T[u].right,d+1);
}

int setHeight(int u) {
  int h1 = 0, h2 = 0;
  if(T[u].left != NIL)
    h1 = setHeight(T[u].left)  + 1;
  if(T[u].right != NIL)
    h2 = setHeight(T[u].right) + 1;
  return H[u] = (h1 > h2 ? h1 : h2);
}

// 接点 u の兄弟を返す
int getSibling(int u) {
  if(T[u].parent == NIL) return NIL;
  if(T[T[u].parent].left != u && T[T[u].parent].left != NIL )
    return T[T[u].parent].left;
  if(T[T[u].parent].right != u && T[T[u].parent].right != NIL )
    return T[T[u].parent].right;
  return NIL;
}

void print(int u) {
  int deg = 0;
  printf("node %d: ",u);
  printf("parent = %d, ",T[u].parent);
  printf("sibling = %d, ",getSibling(u));
  if(T[u].left  != NIL) deg++;
  if(T[u].right != NIL) deg++;
  printf("degree = %d, ",deg);
  printf("depth = %d, ",D[u]);
  printf("height = %d, ",H[u]);
  
  if(T[u].parent == NIL) {
    printf("root\n");
  } else if(T[u].left == NIL && T[u].right == NIL) {
    printf("leaf\n");
  } else {
    printf("internal node\n");
  }
}

int main(void) {
  int i, v, l, r, root = 0;
  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].parent = NIL;
  for(i=0;i<n;i++) {
    scanf("%d %d %d",&v,&l,&r);
    T[v].left  = l;
    T[v].right = r;
    if(l != NIL) T[l].parent = v;
    if(r != NIL) T[r].parent = v;
  }
  
  for(i=0; i<n; i++)
  if(T[i].parent == NIL) root = i;
  
  setDepth(root,0);
  setHeight(root);
  
  for(i=0;i<n;i++) print(i);
  
  return 0;
}

/*
9
0 1 4
1 2 3
2 -1 -1
3 -1 -1
4 5 8
5 6 7
6 -1 -1
7 -1 -1
8 -1 -1
*/


Measured memory_bytes: 2104
#include <bits/stdc++.h>
using namespace std;
int main(void){
    long long int a,b,n,x,y,z,i=0,ans=0,c=0;
    string s;
    cin >> x >> y >> z;
    cout << z << " "<< x << " "<< y << endl;
    return 0;
}


Measured memory_bytes: 3572
#include<cstring>
#include<string>
#include<vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<list>
#include<set>
#include<map>
#include<complex>
#include<sstream>
#include<climits>

#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define fi first
#define sc second
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int MAX_N = 100000;
ll N, A, B;
ll h[MAX_N];

int main() {
  cin >> N >> A >> B;
  rep(i,N) cin >> h[i];

  // (lb, ub]に解が含まれている。
  ll lb = 0, ub = 1e10, mid;
  while (ub-lb > 1) {
    mid = (ub+lb)/2;

    ll op_n = 0;
    for (int i = 0; i < N; ++i) {
      ll magic = (h[i] - B*mid + (A-B-1)) / (A-B);
      if (magic > 0) op_n += magic;
    }

    if (op_n <= mid) ub = mid;
    else lb = mid;
  }

  cout << ub << endl;

  return 0;
}


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

int main() {
	vector<int> a(3,0);
	for(int i = 0;i < 3;i++)
	{
		cin >> a.at(i);
	}
	sort(a.begin(),a.end());
	int k = 0;
	for(int i = 1;i < 3;i++)
	{
		k += a.at(3 - i) - a.at(2 - i);
	}
    cout << k << endl;
	return 0;
}


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

using namespace std;

int a[26];

int main(){



    string s;

    cin >> s;

    for(int i = 0;i < s.size();i++){
    	a[(char)s[i] - 'a']++;
    }

    for(int i = 0;i < 26;i++){
    	if(a[i] > 1){
    		cout << "no" <<endl;
    		return 0;
    	}
    }

    cout << "yes" << endl;

	return 0;



}


Measured memory_bytes: 256
using System;
using System.Linq;
using System.Collections.Generic;

class Program
{
  static void Main(string[] args)
  {
    long N = long.Parse (Console.ReadLine ());
    long s=0;
    long NN=N;
    for (int i = 0; i < 10; i++) {
        s += NN%10;
        NN/=10;
    }

    if (N%s==0){
            Console.WriteLine("Yes");
        }else{
            Console.WriteLine("No");
        }
    
  }

}


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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n; cin >> n;
  long long int x = 1, y = 1;
  while (n--) {
    int ra, rb; cin >> ra >> rb;
    long long int i = max(x / ra, y / rb);
    while (ra * i < x || rb * i < y) {
      i++;
    }
    x = ra * i, y = rb * i;
  }
  cout << x + y << '\n';
  return 0;
}


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

int main() {
    int k;
    string s;
    cin >> k;
    cin >> s;
    if(s.size() <= k) {
        cout << s;
        return 0;
    }
    for(int i=0; i<k; i++) {
        cout << s[i];
    }
    cout << "...";
    return 0;
}


Measured memory_bytes: 3624
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repr(i,n) for(int i = (int)(n); i >= 0; i--)
#define all(v) v.begin(),v.end()
typedef long long ll;

int main(){
    int H,W;
    cin >> H >> W;
    vector<string> vec(H);
    rep(i,H){
        cin >> vec[i];
    }
    vector<vector<int> > left(H,vector<int>(W));
    vector<vector<int> > right(H,vector<int>(W));
    vector<vector<int> > up(H,vector<int>(W));
    vector<vector<int> > down(H,vector<int>(W));
    
    
    rep(i,H){
        if (vec[i][0] == '.') left[i][0] = 1;
        else left[i][0] = 0;
        rep(j,W - 1){
            if (vec[i][j + 1] == '.') left[i][j + 1] = left[i][j] + 1;
            else left[i][j + 1] = 0;
        }
    }
    
    rep(i,H){
        if (vec[i][W - 1] == '.') right[i][W - 1] = 1;
        else right[i][W - 1] = 0;
        for (int j = W - 1; j >= 1; j--){
            if (vec[i][j - 1] == '.') right[i][j - 1] = right[i][j] + 1;
            else right[i][j - 1] = 0;
        }
    }
    
    rep(i,W){
        if (vec[0][i] == '.') up[0][i] = 1;
        else up[0][i] = 0;
        for (int j = 0; j < H - 1; j++){
            if (vec[j + 1][i] == '.') up[j + 1][i] = up[j][i] + 1;
            else up[j + 1][i] = 0;
        }
    }
    
    rep(i,W){
        if (vec[H - 1][i] == '.') down[H - 1][i] = 1;
        else down[H - 1][i] = 0;
        for (int j = H - 1; j >= 1; j--){
            if (vec[j - 1][i] == '.') down[j - 1][i] = down[j][i] + 1;
            else down[j - 1][i] = 0;
        }
    }
    
    int ans = 0;
    rep(i,H){
        rep(j,W){
            ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3);
        }
    }
    cout << ans << endl;
}



Measured memory_bytes: 67200
#include <iostream>
#include<string>
#include<vector>
#include <algorithm>
using namespace std;
int main(void){
    int N;
    cin >> N;
    vector<int> A;
    int a;
    for(int i = 0; i <N ;i++){
        cin >> a;
        A.push_back(a);
    }
    
    sort(A.begin(),A.end());
    
    cout << A[N/2]-A[N/2-1]<<endl;
    
    
    
    
    
    
    
    
}


Measured memory_bytes: 892
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <tuple>
using namespace std;

int main(){

    int n, a, b, c, d;
    cin >> n >> a >> b >> c >> d;

    string str = "0", strtemp;

    cin >> strtemp;
    str += strtemp;

    bool overtake = false;
    if(d < c){
        overtake = true;
    }

    bool triplePlane = false;
    for(int i=b; i<=d; i++){
        if(str[i-1] == '.' && str[i] == '.' && str[i+1] == '.'){
            triplePlane = true;
            break;
        }
    }

    bool doubleRock = false;
    for(int i=a+1; i<c-1; i++){
        if(str[i] == '#' && str[i+1] == '#'){
            doubleRock = true;
            break;
        }
    }
    for(int i=b+1; i<d-1; i++){
        if(str[i] == '#' && str[i+1] == '#'){
            doubleRock = true;
            break;
        }
    }

    if(overtake == false && doubleRock == false){
        cout << "Yes";
    }
    else if(overtake == true && doubleRock == false && triplePlane == true){
        cout << "Yes";
    }
    else{
        cout << "No";
    }

    return 0;
}

Measured memory_bytes: 772
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));
		String [] input = br.readLine().split(" ");
		long A = Long.parseLong(input[0]);
		long B = Long.parseLong(input[1]);
		long C = Long.parseLong(input[2]);
		long defineA= A;
		long defineB = B;
		long defineC = C;
		long result = 0;
			while(true) {
				if(Even(A) || Even(B) || Even(C)) {
					break;
				}
				long A2 = A/2;
				long B2 = B/2;
				long C2 = C/2;
				A = B2 + C2;
				B = A2 + C2;
				C = A2 + B2;
				result++;
				if(defineA == A && defineB == B && defineC == C) {
					result = -1;
					break;
				}
			}
		System.out.println(result);
	}
	private static boolean Even(long var) {
		return (var % 2!=0);
	}

}

Measured memory_bytes: 22484
using System;
using System.Linq;
using System.Numerics;
namespace Sample
{
  class Sample
  {
    static void Main(string[] args)
    {
    string[] str=Console.ReadLine().Split(' ');
      int N=int.Parse(str[0]);
      int K=int.Parse(str[1]);
      string[] str2=Console.ReadLine().Split(' ');
       BigInteger[] monsters=str2.Select(BigInteger.Parse).ToArray();
      BigInteger sum=0;
      for(int i=0;i<N;i++){
        sum+=monsters[i];
      }
     // BigInteger sum=monsters.Sum();
      Array.Sort(monsters);
      Array.Reverse(monsters);
      BigInteger exc=(BigInteger)0;
      BigInteger ans=(BigInteger)0;
      if(K>=N){
        ans=0;
      }else if(K==0){
        ans=sum;
      }
      
      else{
      for(int i=0;i<K;i++){
        exc+=monsters[i];
        ans=sum-exc;
      }

      }
      Console.WriteLine(ans);
      
  
    }
    
  }

}


Measured memory_bytes: 77504
k=int(input())

q=["1","2","3","4","5","6","7","8","9"]
x=9
for i in q:
    if x>100000:
        break
    x+=1
    a=i[-1]
    for j in ([-1,0,1]):
        bb=int(a)+j
        if bb<10 and bb>=0:
            q.append(i+str(bb))
 
       
print(q[k-1])

Measured memory_bytes: 23796
#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int n,a[100];
    cin >> n;
    for( int i=0; i<n; i++){
        cin >> a[i]; 
    }
    for( int i=n-1; i>0; i--){
        cout << a[i] << " ";
    }
    cout << a[0];
    cout << endl;
    
}


Measured memory_bytes: 3080
#!/usr/bin/env python
import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (
    acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians,
    sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


def inlist():
    return(list(map(int, input().split())))


def instr():
    s = input()
    return(list(s[:len(s)]))


def invr():
    return(map(int, input().split()))


def main():
    n = inp()
    a = inlist()
    res = 0
    for i in range(n):
        if a[i] % 2 != 0 and i % 2 == 0:
            res += 1
    print(res)


    # region fastio
BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip("\r\n")

# endregion


if __name__ == "__main__":
    main()


Measured memory_bytes: 10692
#include <stdio.h>
#include <string.h>
int main()
{
  int q,a,b;
  int i,j;
  char str[1001],strcp[1001],ins[8];
  scanf("%s",str);
  scanf("%d",&q);
  for(i=0;i<q;i++)
  {
    scanf("%s %d %d",ins,&a,&b);
    if(!strcmp(ins,"print"))
    {
      for(j=a;j<=b;j++)
      {
	printf("%c",str[j]);
	if(j==b)printf("\n");
      }
    }
    if(!strcmp(ins,"reverse"))
    {
      for(j=0;j<=(b-a)/2;j++)
      {
	char temp = str[a+j];
	str[a+j]=str[b-j];
	str[b-j]=temp;
      }
    }
    if(!strcmp(ins,"replace"))
    {
      char p;
      for(j=0;j<=b-a;j++)
      {
	scanf(" %c",&p);
	str[a+j]=p;
      }
    }
  }
  return 0;
}

Measured memory_bytes: 572
N=input()
B=0
B=len(N)
B=B-1
#print(B,N)
if N[B]=='2' or N[B]=='4' or N[B]=='5' or N[B]=='7' or N[B]=='9':
    print('hon')
elif N[B]=='0' or N[B]=='1' or N[B]=='6' or N[B]=='8':
    print('pon')
else:
    print('bon')


Measured memory_bytes: 9040
package main

import (
	"fmt"
	"sort"
)

func ceilDivInt(end int, div int) int {
	if end%div > 0 {
		return end/div + 1
	}
	return end / div
}

func battle(h int, attack int, arrB []int) int {
	var cnt = 0
	for i := range arrB {
		if arrB[i] < attack {
			break
		}
		h -= arrB[i]
		cnt++
		if h <= 0 {
			break
		}
	}
	if h <= 0 {
		return cnt
	}
	return cnt + ceilDivInt(h, attack)
}

func main() {
	const nCity = 5
	var n, h int
	fmt.Scan(&n, &h)
	arrA, arrB := make([]int, n), make([]int, n)
	for i := 0; i < n; i++ {
		fmt.Scan(&arrA[i], &arrB[i])
	}
	sort.Sort(sort.Reverse(sort.IntSlice(arrA)))
	sort.Sort(sort.Reverse(sort.IntSlice(arrB)))

	var attack = arrA[0]

	fmt.Println(battle(h, attack, arrB))
}


Measured memory_bytes: 5504
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int M = sc.nextInt();
		int a[] = new int[A];
		int b[] = new int[B];
		int x[] = new int[M];
		int y[] = new int[M];
		int c[] = new int[M];
		int min = Integer.MAX_VALUE;
		int min_reizouko = Integer.MAX_VALUE;
		int min_renji = Integer.MAX_VALUE;
		for(int i=0;i<A;i++){
			a[i] = sc.nextInt();
			if(min_reizouko > a[i])min_reizouko = a[i];
		}
		for(int i=0;i<B;i++){
			b[i] = sc.nextInt();
			if(min_renji > b[i])min_renji = b[i];
		}
		for(int i=0;i<M;i++){
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			c[i] = sc.nextInt();
		}
		min = min_reizouko + min_renji;
		for(int i=0;i<M;i++){
			int price = a[x[i]-1] + b[y[i]-1] - c[i];
			if(min>price)min = price;
		}
		System.out.println(min);
	}
}

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

int main() {
	int N;
	string s;

	cin >> N >> s;

	int red = 0;
	for( int i = 0; i < N; i++ ) {
		if( s[i] == 'R' ) {
			red++;
		}
	}

	if( red > N - red ) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <set>
#include <algorithm>
#include <iomanip>
#include <string.h>

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

typedef long long lint;

using namespace std;

lint gcd(lint m,lint n){
  if(n==0)return m;
  else return gcd(n,m%n);
}

lint lcm(lint m,lint n){
  return m/gcd(m,n)*n;
}

int main(){
  lint A,B;
  cin>>A>>B;
  lint C=gcd(A,B);
  lint ans=1;
  cerr<<C<<endl;
  FOR(i,2,1e6+1){
    int r=0;
    while(C%i==0){
      C/=i;
      r++;
    }
    if(r>0)ans++;
  }
  if(C>1)ans++;
  cout<<ans<<endl;
  return 0;
}


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

using ll = long long;
using pii = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vi>;

template <class T>
using max_heap = priority_queue<T>;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;

template <class T, class U>
void chmax(T &a, U b) {
    if (a < b) a = b;
}
template <class T, class U>
void chmin(T &a, U b) {
    if (b < a) a = b;
}

#define rep(i, j) for (int i = 0; i < j; i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
#define debug(x) cerr << #x << ": " << x << endl;
#define int ll

const ll mod = 1e9 + 7;
const ll inf = (1LL << 50);

void solve(long long N, long long K, std::vector<long long> a) {
    vi dp(K + 1, 0);

    rep(i, K + 1) {
        dp[i] = -1;
        rep(j, N) {
            if (i - a[j] >= 0 and dp[i - a[j]] < 0) {
                dp[i] = 1;
            }
        }
    }

    // rep(i, K + 1) {
    //     cout << i << " " << dp[i] << endl;
    // }
    cout << (dp[K] == 1 ? "First" : "Second") << endl;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout << fixed;

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


Measured memory_bytes: 1024
#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define E "\n"

using namespace std;
const long long MOD = (long long)1e9 + 7;

int sum, a;

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    for (int i = 0; i < 3; i++) {
        cin >> a;
        sum += a;
    }
    if (sum >= 22) cout << "bust" << E;
    else cout << "win" << E;
    //system("pause");
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define REP(i, a, b) for(int i = (a); i <= (b); i++)
#define PER(i, a, b) for(int i = (a); i >= (b); i--)
#define rep(i, a, b) for(int i = (a); i < (b); i++)
#define all(S) (S).begin(), (S).end()
#define pb push_back
#define mk make_pair
#define S second
#define F first
typedef long long ll;
typedef long double lf;
typedef pair<int, int> ii;
char s[10];
int cnt, ans;

int main(int argc, char * * argv) {
	scanf(" %s", s);
	rep(i, 0, 3) {
	    if(s[i] == 'R') cnt++;
	    else cnt = 0;
	    ans = max(ans, cnt);
	}
	printf("%d\n", ans);
	return 0;
}


Measured memory_bytes: 3756
#include <iostream>
#include <string>
#include <string.h>
using namespace std;

int main() {
    int a, b, res;
    cin >> a >> b;
    string c(a, '0' + b), d(b, '0' + a);
    res = strcmp(c.c_str(), d.c_str());

    if(res > 0) cout << d << endl; 
    else cout << c << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
	string s,t;
	while(cin >> s >> t){
		int cnt=0;
		for(int i=0;i<3;i++)
			if(s[i]==t[i])
				cnt++;
		cout << cnt << endl;
	}
} 

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define int long long
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

signed main(){
	int n;
	while(cin>>n && n>0){
		vvi d(n,vi(n,0)),f(n,vi(n,0));
		rep(i,0,n) rep(j,0,n) cin>>d[i][j];
		int a=0,b=0;
		rep(i,0,n){
			a=b=i;
			rep(j,0,n){
				if(d[i][a]>d[i][j]) a=j;
				if(d[b][i]<d[j][i]) b=j;
			}
			f[i][a]++;
			f[b][i]++;
		}
		int ans=0;
		rep(i,0,n){
			rep(j,0,n){
				if(f[i][j]==2){
					ans=d[i][j];
				}
			}
		}
		o(ans);
	}
}

Measured memory_bytes: 1212
#include <bits/stdc++.h>
#define ll long long int
#define FASTIO std::ios::sync_with_stdio(false);
#define pb push_back
#define mp make_pair
#define ld long double
#define F first
#define S second
#define input_from_file  freopen("input.txt", "r", stdin);
#define inf 1000000000000000
using namespace std;

int main()
{
FASTIO
//input_from_file

int n;
cin >> n;

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

ld dp[n+1][n+1];
memset(dp, 0, sizeof(dp));

dp[1][0] = 1 - a[0];
dp[1][1] = a[0];

for(int i = 2; i <= n; i++){
  for(int j  = 0; j <= i; j++){
    dp[i][j] = dp[i-1][j]*(1 - a[i-1]) + dp[i-1][j-1]*(a[i-1]);
  }
}

ld ans = 0;
for(int i = n/2 + 1; i <= n; i++){
  ans += dp[n][i];
}

cout << setprecision(10) << ans;
}


Measured memory_bytes: 140928
# -*- coding: utf-8 -*-
N = int(input())

P = list(map(int, input().split()))

res = 0

for i in range(1, len(P)-1):
    if (P[i-1] < P[i] and P[i] < P[i+1]) or (P[i-1] > P[i] and P[i] > P[i+1]):
        res += 1

print(res)

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define PI (3.14159265358979323846)
#define ld long double
#define int long long
#define MOD 1000000007
#define w(x) int x; cin >> x; while(x--)
#define F first
#define S second
#define PB push_back
     
const char nl = '\n';
const int N = 1e6 + 5;


bool vis[N] = {0};
vector <int> sev;

int no_of_fact(int n){

    int x = 1, o = n;

    for(auto p : sev)
    {
        int c = 0;

        if(p*p > n) break;

        while(n%p == 0)
        {
            c++;
            n /= p;
        }
        x *= (c + 1);
    }

    if(n > 2) x *= 2;

    return x;

}

void solve(){
 
    int n; cin >> n;

    for(int i = 2; i < n; i++)
    {
        if(!vis[i])
        {
            sev.PB(i);
            for(int j = i*i; j < N; j += i)
            {
                if(j%i==0) vis[j] = 1;
            }
        }
    }

    int ans = 1;
    for(int i = 2; i <= n-1; i++)
    {
        if(!vis[i]) ans += 2;
        else ans += no_of_fact(i);
    }

    cout << ans << nl;

}   


int32_t main(){
         
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
        
    solve();


}

Measured memory_bytes: 5140
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; ++i)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define repr(i, n) for (int i = (int)n - 1; i >= 0; --i)
#define ALL(a) (a).begin(), (a).end()
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
const int dx[] = {0, 1, -1, 0};
const int dy[] = {1, 0, 0, -1};
const ll mod = 1e9 + 7;
const ll INF = 1e9;
const ll LINF = 1LL << 60;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  //////////////////////////////////////
  while (1) {
    ll n, k;
    cin >> n >> k;
    if (n == 0 && k == 0) break;
    vector<ll> sum(n + 1, 0), a(n);
    rep(i, n) cin >> a[i];
    rep(i, n) sum[i + 1] = sum[i] + a[i];
    ll ans = -LINF;
    rep(i, n - k + 1) ans = max(ans, sum[i + k] - sum[i]);
    cout << ans << endl;
  }
  return 0;
}



Measured memory_bytes: 4408
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<utility>
#include<string>
#include<stack>
#include<queue>
#include<set>
#include<math.h>
#include <map>
using namespace std;
typedef long long int ll;
#define repi(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,a) repi(i,0,a)
#define all(u) u.begin(),u.end()
#define pl pair<ll,ll>
#define fi first
#define se second
#define mod 1000000007
#define inf 1<<30
#define mp(a,b) make_pair(a,b)
#define len(u,N) u.begin(),u.begin()+N


ll A,B,C;

int main() {
    cin >> A >> B >> C;
    if ((C > A && C < B) || (C < A && C > B)){
        cout <<"Yes" << endl;
        
    }
    else cout << "No" << endl;
    return 0;
}


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

public class Main {
	public static void main(String[] args) {
		int n, i, a;
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> su = new ArrayList<Integer>();
		n = sc.nextInt();
		
		for(i = 0; n - 1 >= i; i++){
			a = sc.nextInt();
			su.add(new Integer(a));
		}
		
		for(i = n - 1; i >= 0; i--){
			if(i == 0)
				System.out.println(su.get(new Integer(0)));
			else
				System.out.print(su.get(new Integer(i)) + " ");
		}			
	}
}

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

string to_string(string s) {
	return '"' + s + '"';
}

string to_string(bool b) {
	return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
	return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A>
string to_string(A v) {
	bool first = true;
	string res = "{";
	for (const auto &x : v) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(x);
	}
	res += "}";
	return res;
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
	cerr << " " << to_string(H);
	debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

void test_case() {
	int k, n;
	cin >> n >> k;
	vector<int> h(n);
	for (int i = 0; i < n; ++i) {
		cin >> h[i];
	}
	sort(h.begin(), h.end());
	int res = 2e9;
	for (int i = 0; i < n; ++i) {
		if (i + k - 1 >= n) {
			break;
		}
		res = min(res, h[i + k - 1] - h[i]);
	}
	cout << res << "\n";
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	test_case();
	return 0;
}

Measured memory_bytes: 640
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>

using namespace std;

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

    cout << (a-1)*(b-1) << endl;
    return 0;
}


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

#define fi first
#define se second
#define pb push_back
#define sz(a) (int)(a).size()
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;

const ll MOD = 998244353;
const ll INF = 1e18;
const ll IINF = INT_MAX;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int n, s;
    cin >> n >> s;
    int a[n];
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    vvll dp(n + 5, vll(s + 5, 0));
    dp[0][0] = 1;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j <= s; j++) {
            dp[i + 1][j] = (dp[i + 1][j] + dp[i][j] + dp[i][j]) % MOD;
            if (j + a[i] <= s) {
                dp[i + 1][j + a[i]] += dp[i][j];
                dp[i][j] %= MOD;
            }
        }
    }
    cout << dp[n][s] << '\n';
    return 0;
}

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

int main() {
    string S, T;
    cin >> S;

    for (int i = 1; i <= S.size(); i++) {
        if (S[i] == 'C' && S[i - 1] == 'B') {
            T.push_back('D');
            i++;
        } else {
            T.push_back(S[i - 1]);
        }
    }

    long long res = 0, cnt = 0;
    for (int i = 0; i < T.size(); i++) {
        if (T[i] == 'B' || T[i] == 'C') {
            cnt = 0;
        } else if (T[i] == 'A') {
            cnt++;
        } else {
            res += cnt;
        }
    }
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 776
N = int(input())
s = [input() for i in range(N)]

a = s.count('AC')
b = s.count('WA')
c = s.count('TLE')
d = s.count('RE')

print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Measured memory_bytes: 16272
let () =
  Scanf.scanf "%d %d\n" @@ fun a b ->
  if abs (a-b) mod 2 = 0 then 
    if a > b then (print_int (a-((a-b)/2)); print_newline ())
    else (print_int (b-((b-a)/2)); print_newline ())
  else print_endline "IMPOSSIBLE"

Measured memory_bytes: 3796
/* ***************************************
Author        :Scau.ion
Created Time  :2016/11/28 11:46:06 UTC+8
File Name     :ion.cpp
*************************************** */

#include <bits/stdc++.h>

#define LL long long
#define ULL unsigned long long
#define PB push_back
#define MP make_pair
#define PII pair<int,int>
#define VI vector<int>
#define VPII vector<PII>
#define X first
#define Y second
#define IOS ios::sync_with_stdio(0);cin.tie(0);
#define IN freopen("in", "r", stdin);
#define OUT freopen("out", "w", stdout);

using namespace std;

int main()
{
    double x[3],y[3],len[3];
    for (int j=0;j<3;++j)
        cin>>x[j]>>y[j];
    for (int j=0;j<3;++j)
    {
        double xx=x[j]-x[(j+1)%3];
        double yy=y[j]-y[(j+1)%3];
        len[j]=sqrt(xx*xx+yy*yy);
    }
    double rad[3];
    for (int j=0;j<3;++j)
    {
        double a=len[j],b=len[(j+1)%3],c=len[(j+2)%3];
        rad[j]=acos((b*b+c*c-a*a)/(2*b*c));
        rad[j]/=2;
    }
    double ma=0;
    for (int j=0;j<3;++j)
    {
        double a=tan(rad[(j+1)%3]),b=tan(rad[(j+2)%3]);
        double xi=(len[j]*a*b)/(a+b+a*b*2);
        ma=max(ma,xi);
    }
    printf("%.12lf\n",ma);
    return 0;
}


Measured memory_bytes: 384
<?php

function input($func = null) {
    if ($func === null) {
        return trim(fgets(STDIN));
    } else {
        return $func(trim(fgets(STDIN)));
    }
}
function input_array($func = null) {
    if ($func === null) {
        return explode(' ', trim(fgets(STDIN)));
    } else {
        return array_map(function($v) use ($func) {
            return $func($v);
        }, explode(' ', trim(fgets(STDIN))));
    }
}

$happinesses = [];

$n = input('intval');
for ($i = 0; $i < $n; $i++) {
    $happinesses[] = input_array('intval');
}
usort($happinesses, function($x, $y) {
    return ($y[0] + $y[1]) - ($x[0] + $x[1]);
});

$takahashi = 0;
$aoki = 0;
$turn = 'takahashi';
foreach ($happinesses as $happiness) {
    if ($turn === 'takahashi') {
        $takahashi += $happiness[0];
        $turn = 'aoki';
    } else if ($turn === 'aoki') {
        $aoki += $happiness[1];
        $turn = 'takahashi';
    }
}

$difference = $takahashi - $aoki;
echo "{$difference}\n";

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

#define M_PI       3.14159265358979323846   // pi

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;

#define rep(a,n) for(ll a = 0;a < n;a++)
#define repi(a,b,n) for(ll a = b;a < n;a++)

static const ll INF = 1e15;



int main(void)
{
	string s;
	cin >> s;
	if (s.size() % 2 == 1) {
		cout << "No" << endl;
		return 0;
	}
	for (int i = 0; i < s.size() / 2; i++) {
		if (s[2*i] == 'h' && s[2*i + 1] == 'i') {
		}
		else {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}


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

void solve(long long N, std::vector<long long> X, std::vector<long long> L)
{
    vector<pair<ll, ll>> robots;
    for (ll i = 0; i < N;i++) {
        robots.emplace_back(X[i] - L[i], X[i] + L[i]);
    }

    sort(begin(robots), end(robots), [](auto&& a, auto&& b) { return a.second < b.second; });

    ll ans = 1;
    ll s = robots[0].second;
    for (auto r : robots) {
        if (s <= r.first) {
            ans++;
            s = r.second;
        }
    }
    cout << ans << endl;
}

// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
// clang-format off
#pragma GCC diagnostic ignored "-Wunused-result"
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    long long N;
    scanf("%lld",&N);
    std::vector<long long> X(N);
    std::vector<long long> L(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&X[i]);
        scanf("%lld",&L[i]);
    }
    solve(N, std::move(X), std::move(L));
    return 0;
}


Measured memory_bytes: 3956