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

using i64 = int64_t;

class UnionFindTree {
  private:
    std::vector<int> par;   // 親
    std::vector<int> depth; // 木の深さ

  public:
    // n要素で初期化
    UnionFindTree(int n) {
        for (int i = 0; i < n; i++) {
            par.push_back(i);
            depth.push_back(0);
        }
    }

    // 木の根を求める
    int find(int x) {
        if (par[x] == x) {
            return x;
        } else {
            return par[x] = find(par[x]);
        }
    }

    // xとyの属する集合を併合
    void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y)
            return;

        if (depth[x] < depth[y]) {
            par[x] = y;
        } else {
            par[y] = x;
            if (depth[x] == depth[y])
                depth[x]++;
        }
    }

    // xとyが同じ集合に属するか否か
    bool same(int x, int y) { return find(x) == find(y); }
};

int main(){
    int n, m;
    cin >> n >> m;
    vector<int> v;
    for(int i=0;i<n;++i){
        int p;
        cin >> p;
        v.push_back(p);
    }
    UnionFindTree uft(n+1);
    for(int i=0;i<m;++i){
        int x, y;
        cin >> x >> y;
        uft.unite(x, y);
    }
    int ans = 0;
    for(int i=0;i<n;++i){
        if(uft.same(i+1, v[i]))ans++;
    }

    cout << ans << endl;

    return 0;
}

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

int main(){
  int N, M;
  cin >> N >> M;  
  //　グラフを隣接行列で管理
  vector<vector<int>> graph(N, vector<int>(N));
  for(int i = 0; i < M; i++){
    int x, y;
    cin >> x >> y;
    x--; y--;
    graph.at(x).at(y) = graph.at(y).at(x) = 1;
  }

  // 順列(0, 1, 2, ……)
  vector<int> ord(N);
  for(int i = 0; i < N; i++){
    ord.at(i) = i;
  }

  // 順列を全部試す
  int ans = 0;
  do{
    if(ord.at(0) != 0) break; // 1から始まっていない順列は調べない

    bool ok = true;
    for(int i = 0; i + 1 < N; i++){
      int from = ord.at(i);
      int to = ord.at(i + 1);
      if(!graph.at(from).at(to)){
        ok = false;
      }
    }
    if(ok){
      ans++;
    }
  }while(next_permutation(ord.begin(), ord.end()));

  cout << ans << endl;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){
  int next[100][100];
  int mat[101][101] = {{0}};
  int k,num,i,j,m;

  scanf("%d",&m);

  for(i = 1; i <= m; i++){
    scanf("%d %d",&num,&k);
    for(j = 1 ; j <= k; j++){
      scanf(" %d",&next[i][j]);
      mat[i][next[i][j]] = 1;
    }
  }
  for(i = 1; i <= m; i++){
    for(j = 1 ; j < m; j++){
      printf("%d ",mat[i][j]);
    }
    printf("%d\n",mat[i][m]);
  }
  return 0;
}




Measured memory_bytes: 2104
let () =
  let n, m, l = Scanf.scanf "%d %d %d\n" (fun x y z -> x, y, z) in
  let a = Array.make_matrix n m 0 in
  let b = Array.make_matrix l m 0 in
  let c = Array.make_matrix n l 0 in
  let map2_product xs ys =      (* Array.map2 *)
    let n = Array.length xs in 
    let zs = Array.make n 0 in
    for i = 0 to (n - 1) do
      zs.(i) <- xs.(i) * ys.(i)
    done;
    zs
  in
  for i = 0 to (n-1) do
    for j = 0 to (m-1) do
      a.(i).(j) <- Scanf.scanf "%d " (fun x -> x)
    done
  done;
  for i = 0 to (m-1) do
    for j = 0 to (l-1) do
      b.(j).(i) <- Scanf.scanf "%d " (fun x -> x)
    done
  done;
  for i = 0 to (n-1) do
    for j = 0 to (l-1) do
      c.(i).(j) <- (map2_product a.(i) b.(j)
                    |> Array.fold_left (fun x y -> x + y) 0)
    done
  done;
  let sN ls = Array.map string_of_int ls |> Array.to_list |> String.concat " " in
  let sC ns = Array.map sN ns |> Array.to_list |> String.concat "\n" in
  sC c |> Printf.printf "%s\n" ;;


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

signed main(){
	int n; scanf("%d", &n);
	vector<ll> a(n);
	for(int i = 0; i < n; i++) {
		scanf("%lld", &a[i]);
	}
	ll ans1 = 0, ans2 = 0, sum1 = 0, sum2 = 0;
	for(int i = 0; i < n; i++){
		sum1 += a[i];
		if(i % 2 == 0){
			if(sum1 > 0) continue;
			else{
				ans1 += (1 - sum1);
				sum1 = 1;
			}
		}
		if(i % 2 == 1){
			if(sum1 < 0) continue;
			else{
				ans1 += (sum1 + 1);
				sum1 = -1;
			}
		}
	}
	for(int i = 0; i < n; i++){
		sum2 += a[i];
		if(i % 2 == 1){
			if(sum2 > 0) continue;
			else{
				ans2 += (1 - sum2);
				sum2 = 1;
			}
		}
		if(i % 2 == 0){
			if(sum2 < 0) continue;
			else{
				ans2 += (sum2 + 1);
				sum2 = -1;
			}
		}
	}
	cout << min(ans1, ans2) << endl;
}

Measured memory_bytes: 4028
#include<iostream>
#include<string>
using namespace std;
int main(){
	string cards;
	int m, h;
	string tmp;
	for (int i = 0; i < 10; i++){
		cin >> cards;
		if (cards == "-")
			break;
		cin >> m;
		if (m > 100)
			m = 100;
		for (int j = 0; j < m; j++){
			cin >> h;
			if (h > cards.size())
				h = cards.size();
			tmp = cards.substr(0, h);
			cards.erase(0, h);
			cards += tmp;
		}
		cout << cards << endl;
	}
}


Measured memory_bytes: 3180
#include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#define all(a) (a).begin(),(a).end()
#define vecin(a) rep(i,a.size())cin >> a[i]
#define vecout(a) rep(i,a.size()){cout << a[i];cout << (i == a.size() - 1 ? "\n":" ");}
#define rep(i,x) for(int i = 0;i<x;i++)
#define REP(i,x) for(ll i = 1;i<=x;i++)
#define mp make_pair
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll inf = 2147483647;
const ll INF = 1LL << 60;
const dou pi = 3.14159265358;
const ll mod = 1000000007LL;
//const ll mod = 998244353LL;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return true;}return false;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return true;}return false;}
template<class T> inline bool change(T a,T b){if(a > b){swap(a,b);return true;}return false;}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
ll lcm(ll a,ll b){
    return a / gcd(a,b) * b;
}

//素数判定O(sqrt(N))
bool isp(ll n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}
const ll cmax = 1000000;
ll fac[cmax], finv[cmax], inv[cmax];

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

// 二項係数計算
ll nCk(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
//nのm乗をMODで割ったあまりO(logm)
ll modpow(ll n,ll m,ll MOD){
    if(m == 0)return 1;
    if(m < 0)return -1;
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n) % MOD;
        m >>= 1;
        n *= n;
        n %= MOD;
    }
    return res;
}
ll mypow(ll n,ll m){
    if(m == 0)return 1;
    if(m < 0)return -1;
    ll res = 1;
    while(m){
        if(m & 1)res = (res * n);
        m >>= 1;
        n *= n;
    }
    return res;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    string S;
    cin >> S;
    ll s = S.size();
    rep(i,s - 1){
        if(S.substr(i,2) == "AC"){
            cout << "Yes" << "\n";
            return 0;
        }
    }
    cout << "No\n";
}

Measured memory_bytes: 3632
#include<bits/stdc++.h>
#define ls rt<<1
#define rs rt<<1|1
#define lson rt<<1,l,M
#define rson rt<<1|1,M+1,r
#define PI acos(-1)
#define MM int M=(l+r)>>1;
#define fu(i,r,t) for(int i=r;i<=t;i++)
#define fd(i,r,t) for(int i=r;i>=t;i--)
#define fh(i,be,e) for(int i=head[be];~i;i=e[i].next)
#define fa(i,V) for(auto i:V)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define endl '\n'
#define lcm(a,b) (a*b)/__gcd(a,b)
#define cp(i,ans) printf("%.if",ans);
#define cpp(i,ans) cout<<setprecision(i)<<fixed<<ans<<endl;
#define ppb pop_back
#define ppf pop_front
#define pb push_back
#define pf push_front
#define pq priority_queue
#define lowbit(x) (x)&(-x)
#define all(V) V.begin(),V.end()
#define ms multiset
#define mod(x) ((x+mo_num)%mo_num)
#define vc vector
#define vct vector<int>
#define out(i) cout<<(i)<<endl;
#define fi first
#define se second
#define fun(i) fu(i,1,n)
#define fut(i) fu(i,1,t)
#define fum(i) fu(i,1,m)
#define ld long double
#define umap unordered_map
#define P pair<int,int>
#define SET set<int>
#define mp map<int,int>
#define mk make_tuple
#define low lower_bound
#define upp upper_bound
#define yn(key) out(key?"YES":"NO")
#define in(i) i+1,i+1+n
#define im(i) i+1,i+1+m
#define bffs(i) __builtin_ffs(i)
#define bcount(i) __builtin_popcount(i)
#define bone(i) ((1<<i)-1)
using namespace std;
const int INF=LLONG_MAX-1e10;
const int dx[]={0,0,-1,1},dy[]={-1,1,0,0};//up down left right
const int maxn=1e5+1e5;
const int mo_num=1e9+7;
int n,m,t,a[maxn],b[maxn],ans;
vct e[maxn];
void dfs(int now)
{
    int key=1;
    fa(i,e[now])
    {
        if(a[i]<a[now])
        {
            b[i]=-1;
        }else if(a[i]==a[now])
        {
            b[now]=-1;
            b[i]=-1;
            return;
        } else{
            b[now]=-1;
            return ;
        }
    }
    b[now]=1;
}
main()
{
    IOS
    cin>>n>>m;
    fun(i)cin>>a[i];
    fum(i)
    {
        int u,v;
        cin>>u>>v;
        e[u].pb(v);
        e[v].pb(u);
    }
    fun(i)
    {
        if(b[i])continue;
        dfs(i);
    }
    fun(i)ans+=(b[i]==1?1:0);
    out(ans)
    return 0;
}


Measured memory_bytes: 13348
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <cstdio>
#include <algorithm>
#include <map>
using namespace std;

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

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

    if(n % 2 != 0){
        cout << "No";
        return 0;
    }

    int len = n / 2;
    rep(i, len){
        if(s[i] != s[i + len]){
            cout << "No" << endl;
            return 0;
        }
    }

    cout << "Yes" << endl;
}

Measured memory_bytes: 256
K = %w/dream dreamer erase eraser/
S = gets.chomp

until S.empty?
  k = K.find{|kw| S.end_with?(kw)}
  if k.nil?
    break
  else
    S.slice!(-k.size, k.size)
  end
end

puts S.empty? ? :YES : :NO

Measured memory_bytes: 3964
base_nums = gets.chomp.split(//).map(&:to_i)
flag = false
2.times do |first|
  2.times do |second|
    2.times do |third|
      nums = base_nums.dup
      nums[1] = nums[1] * -1 if first.even?
      nums[2] = nums[2] * -1 if second.even?
      nums[3] = nums[3] * -1 if third.even?
      if nums.inject(:+) == 7
        str = ""
        nums.each_with_index do |num, i|
          if i == 0
            str += num.to_s
          else
            if num >= 0
              str += "+"
              str += num.to_s
            else
              str += num.to_s
            end
          end
        end
        str += "=7"
        puts str
        flag = true
      end
      break if flag
    end
    break if flag
  end
  break if flag
end


Measured memory_bytes: 1788
#include <stdio.h>
int main ()
{
	int n;
	long long int sum = 0;
	scanf ("%d", &n);
	for (int i = 1; i <= n; i++){
		if (i % 3 != 0 && i % 5 != 0){
			sum += i;
		}
	}
	printf ("%lld", sum);
return 0;
}

Measured memory_bytes: 1736
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(long long i=0;i<x;i++)
#define repn(i,x) for(long long i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
vector<pair<string,P> >vec;
// vector<vector<int>> data(3, vector<int>(4));

void solve(long long N){
	if (N%2 == 0) cout << N/2-1 << endl; else cout << N/2 << endl;
}

int main(){	
	long long N;
	scanf("%lld",&N);
	solve(N);
	return 0;
}



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

// types
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<pll> vpll;

// macros
#define ALL(a) a.begin(),a.end()
#define SZ(a) ((int)a.size())
#define FI first
#define SE second
#define REP(i,n) for(int i=0;i<((int)n);i++)
#define REP1(i,n) for(int i=1;i<((int)n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define PB push_back
#define EB emplace_back
#define MP(a,b) make_pair(a,b)
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL

// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double eps = 1e-10;
const int MOD = 1e9 + 7;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};

ll memo[3003][3003];
ll n,m;
string s,t;

ll dfs(ll x, ll y){
  if(memo[x][y]>=0)
    return memo[x][y];

  if(x==n || y==m)
    return memo[x][y]=0;

  if(s[x]==t[y])
    return memo[x][y]=dfs(x+1,y+1)+1;

  return memo[x][y]=max(dfs(x+1,y),dfs(x,y+1));
}


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

  cin >> s >> t;
  n = s.size();
  m = t.size();
  REP(i,3003)REP(j,3003)memo[i][j]=-1;
  dfs(0,0);


  ll i=0;
  ll j=0;
  while(i<n&&j<m){
    if(s[i]==t[j]){
      cout<<s[i];
      i++;
      j++;
    }
    else if(memo[i+1][j]>memo[i][j+1])
      i++;
    else
      j++;
  }
  cout<<endl;

}


Measured memory_bytes: 70912
MOD = 10 ** 9 + 7
INF = 10 ** 10
import sys
sys.setrecursionlimit(100000000)
dy = (-1,0,1,0)
dx = (0,1,0,-1)

def main():
    n,m,x,y = map(int,input().split())
    X = list(map(int,input().split()))
    Y = list(map(int,input().split()))
    t = max(X)
    s = min(Y)
    if max(t,x) < min(s,y):
        print('No War')
    else:
        print('War')
if __name__ == '__main__':
    main()

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

string FMT_F = "%.10f";

static File _f;
void file_io(string fn) { _f = File(fn, "r"); }
static string[] s_rd;
T _RD(T = long)() { while(!s_rd.length) s_rd = readln.chomp.split; string res = s_rd[0]; s_rd.popFront; return res.to!T; }
T _RD(T = long)(File f) { while(!s_rd.length) s_rd = f.readln.chomp.split; string res = s_rd[0]; s_rd.popFront; return res.to!T; }
T[] _RDA(T = long)(T fix = 0) { auto r = readln.chomp.split.to!(T[]); r[] += fix; return r; }
T[] _RDA(T = long)(File f, T fix = 0) { auto r = f.readln.chomp.split.to!(T[]); r[] += fix; return r; }
T RD(T = long)() { if (_f.isOpen) return _RD!T(_f); else return _RD!T; }
T[] RDA(T = long)(T fix = 0) { if (_f.isOpen)  return _RDA!T(_f, fix); else return _RDA!T(fix); }

size_t[] MAKE_IDX(alias less = "a < b", Range)(Range range) { auto idx = new size_t[](range.length); makeIndex!(less)(range, idx); return idx;}
size_t MIN_POS(alias less = "a < b", Range)(Range range) { auto r = minPos!(less)(range); return range.length - r.length; }

void chmin(T)(ref T x, T y) { x = min(x, y); } void chmax(T)(ref T x, T y) { x = max(x, y); }
bool inside(T)(T x, T b, T e) { return x >= b && x < e; }
T lcm(T)(T x, T y) { return x * (y / gcd(x, y)); }

long mod = 10^^9 + 7;
//long mod = 998_244_353;
//long mod = 1_000_003;
void moda(T)(ref T x, T y) { x = (x + y) % mod; }
void mods(T)(ref T x, T y) { x = ((x + mod) - (y % mod)) % mod; }
void modm(T)(ref T x, T y) { x = (x * y) % mod; }
void modpow(T)(ref T x, T y) { if (!y) { x = 1; return; } auto t = x; x.modpow(y>>1); x.modm(x); if (y&1) x.modm(t); }
void modd(T)(ref T x, T y) { y.modpow(mod - 2); x.modm(y); }

T binarySearch(alias pred, T)(T ok, T ng)
{ 
	while (abs(ok-ng) > 1)
	{
		auto mid = (ok+ng)/2;
		if (unaryFun!pred(mid)) ok = mid;
		else ng = mid;
	}
	return ok;
}

void main()
{
	auto N = RD;
	auto K = RD;
	auto A = RDA;

	bool f(long x)
	{
		long cnt;
		foreach (i; 0..N)
		{
			cnt += (A[i]-1) / x;
		}
		return cnt <= K;
	}
	
	auto ans = binarySearch!(f)(10L^^9, 0);
	writeln(ans);
	stdout.flush;
	debug readln;
}

Measured memory_bytes: 11644
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define repr(i, n) REPR(i, n, 0)
#define REPR(i, s, e) for(int i=(int)(s-1); i>=(int)(e); i--)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second

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

const ll INF = 1e9;
const ll MOD = 1e9 + 7;
const double EPS = 1e-8;

template<typename T> T chmax(T& a, const T& b){return a = (a > b ? a : b);}
template<typename T> T chmin(T& a, const T& b){return a = (a < b ? a : b);}

const int MAX_N = 1e6+10;
vector<int> primes;
vector<int> isPrime(MAX_N, 1);
void buildPrimes() {
    isPrime[0] = isPrime[1] = 0;
    REP(i, 2, MAX_N) {
        if(isPrime[i]) {
            primes.push_back(i);
            for(int j = i+i; j < MAX_N; j += i) isPrime[j] = false;
        }
    }
}

int main(){
    int x;
    cin >> x;
    buildPrimes();
    cout << *lower_bound(all(primes), x) << endl;
    return 0;
}

Measured memory_bytes: 4860
#include<iostream>
using namespace std;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    string n;
    cin >> n;
    int m = 0;
    for(int i = 0; i < n.size(); i++){
        m+=n[i]-'0';
    }
    if(m%9==0) 
	cout<<"Yes "<<"\n";
    else cout<<"No"<<"\n";
}

Measured memory_bytes: 3724
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
const ll MOD = 1e9+7;

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

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

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define dbg(x) cerr<<#x<<" = "<<x<<endl;
#define dbg_v(v,n) {cerr<<#v<<" = [";for(int III=0;III<=n;III++)cerr<<v[III]<<(III!=n?",":"]\n");}
#define ll long long
#define ld long double
#define pii pair<int,int>
#define MOD 1000000007
#define zeros(x) x&(x-1)^x
#define Nmax 100005
#define fi first
#define se second
using namespace std;

ll ans, sum[Nmax], mx = -1e18;
pii v[Nmax];

bool comp(pii A, pii B){
    return A.fi - A.se < B.fi - B.se;
}

template<typename T = int>
struct heap{
    vector<T> val;
    // min heap
    static bool comp(T A, T B){
        return A > B;
    }

    void clear(){val.clear();}
    int size(){return val.size();}

    void push(T x){
        val.push_back(x);
        push_heap(val.begin(), val.end(), comp);
    }

    T pop(){
        pop_heap(val.begin(),val.end(),comp);
        T aux = val.back();
        val.pop_back();
        return aux;
    }
};
heap<ll> H;

int main(){
    ios::sync_with_stdio(false);
    int x,y,z,c;
    cin >> x >> y >> z;
    int n = x + y + z;
    for (int i=1;i<=n;i++){
        cin >> v[i].fi >> v[i].se >> c;
        v[i].fi -= c;
        v[i].se -= c;
        ans += c;
    }

    sort(v+1,v+n+1,comp);

    for (int i=1;i<=n;i++){
        sum[i] = sum[i-1] + v[i].second;
        H.push(v[i].second);
        if (i <= y) continue;
        sum[i] -= H.pop();
    }
    H.clear();
    ll s = 0;
    for (int i=n;i>=y+1;i--){
        s += v[i].first;
        H.push(v[i].first);
        if (n-i+1 == x) mx = max(mx, s + sum[i-1]);
        if (n-i+1 <= x) continue;
        s -= H.pop();
        mx = max(mx, s + sum[i-1]);
    }

    cout << ans + mx << '\n';

    return 0;
}   

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

using namespace std;

const int N = 105;
long long memo[N][2][4];
string s;

long long solve (int i , bool less , int rem) {
    if (rem == 0)
        return 1;

    if (i == s.size())
        return 0;

    long long &ret = memo[i][less][rem];
    if (~ret)
        return ret;

    ret = 0;

    int r = less ? 9 : s[i];
    for (int d = 0 ; d <= r ; d++)
        ret += solve(i + 1 , less || (d < s[i] ), rem - (d != 0));

    return ret;
}

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.in" , "r" , stdin);
#endif
    int k;
    cin >> s >> k;

    for (char &c : s)
        c -= '0';

    memset(memo , -1 , sizeof memo);
    cout << solve(0 , 0 , k);
}


Measured memory_bytes: 3612
import java.util.Scanner;

public class Main {

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

        for (int n = sc.nextInt(); n != 0; n = sc.nextInt()) {
        	int[] data = new int[n];
        	int sum = 0;
        	for (int i = 0; i < n; i++) {
        		data[i] = sc.nextInt();
        		sum += data[i];
        	}
        	double average = (double)sum / n;

        	double sd = 0.0;
        	for (int i = 0; i < n; i++) {
        		sd += Math.pow(data[i] - average, 2);
        	}
        	sd /= n;

        	System.out.println(String.format("%.4f", Math.sqrt(sd)));
        }
         
        sc.close();
	}
}

Measured memory_bytes: 23768
//I am so vegetable
//#define err
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define pb push_back
#define in insert
#define er erase
#define ct count
#define ep empty
#define _for(i,a,b) for(int i = (a);i<(b);++i)
#define _rfor(i,a,b) for(int i = (a);i>(b);--i)
#define _sfor(p,st) for(auto &p:st)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9+7;
const double eps = 1e-6;
const double pi = acos(-1.0);
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll qpow(ll x, ll y) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans *= x; x *= x; }return ans; }
ll qpow(ll x, ll y, int MOD) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans = ans*x%MOD; x = x*x%MOD; }return ans; }
void exgcd(ll a,ll b,ll &x,ll &y){
    if(!b){x=1;y=0;return;}
    exgcd(b,a%b,x,y);
    ll X=x;
    x=y; y=X-a/b*y;
}
ll inv(ll x, int mod = MOD) { return qpow(x, mod - 2,mod); }
ll m_m(ll a){ return (a%MOD+MOD)%MOD; }


string replace(string &a,string b){
    int t;
    while((t=a.find(b))!=-1){
        a=a.substr(0,t)+'*'+a.substr(t+(int)b.size());
    }
    return a;
}
signed main() {
    //ifstream cin("E:\\acm dream\\in.in");
	//ofstream cout("E:\\acm dream\\out.out");
	FIO;
    #ifdef err
	double be = clock();
    #endif

    string s;cin>>s;
    replace(s,"eraser");
    replace(s,"erase");
    replace(s,"dreamer");
    replace(s,"dream");
    int f=1;
    _sfor(i,s){
        if(i!='*'){
            f=0;
            break;
        }
    }
    puts(f?"YES":"NO");
    
    #ifdef err
	double en = clock();
    cout<<"time: "<<fixed<<setprecision(8)<<en-be;
    #endif
	return 0;
}

Measured memory_bytes: 4096
#include<stdio.h>
#include<iostream>
using namespace std;

int main()
{
	int i;
	int a[6];
	int b;
	for(i=1;i<=5;i++)
	{
		cin>>a[i];
		if(a[i]==0)
		b=i;
	}
	cout<<b;
	
	return 0;
}

Measured memory_bytes: 3588
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Numerics;
using System.Diagnostics;

class Program
{
    public void Slove()
    {
        int n = int.Parse(Console.ReadLine());
        int h = int.Parse(Console.ReadLine());
        int w = int.Parse(Console.ReadLine());
        Console.WriteLine((n - w + 1) * (n - h + 1));
    }
    static void Main(string[] args)
    {
        var p = new Program();
        p.Slove();
    }
}


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

int main(){
  int64_t S;
  cin>>S;
  int64_t j=753;
  for(int64_t i=0;i<to_string(S).size()-2;i++){
    j=min(j,abs(753-S%(int64_t)pow(10,i+3)/(int64_t)pow(10,i)));
  }
  cout<<j<<endl;
}

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

int main () {
  int N , Y ;
  cin >> N >> Y ;
  
  int a = -1 , b = -1 , c = -1 ;
  
  for( int i = 0 ; i < N + 1 ; i++ ) {
    for( int j = 0 ; j < N - i + 1 ; j++ ) {
      int pre = N - i - j ;
      if( 10000 * i + 5000 * j + 1000 * pre == Y ) {
        a = i ;
        b = j ;
        c = pre ;
      }
    }
  }
  cout << a << ' ' << b << ' ' << c << endl ;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define int           long long
#define pb            push_back
#define x             first
#define y             second
#define sz(v)         (int)v.size()
#define all(x)        (x).begin(),(x).end()
#define PI            3.14159265358979
#define N             200005

vector<int> v[N];
int solve(){
    int n,m; cin>>n>>m;
    int h[n+1]; for(int i=1; i<=n; i++) cin>>h[i];
    for(int i=1; i<=m; i++){
        int a,b; cin>>a>>b;
        v[a].pb(b);
        v[b].pb(a);
    }
    int ans=0;
    for(int i=1; i<=n; i++){
        int t=h[i];
        bool f=1;
        for(int j:v[i]){
            if(h[i]<=h[j]) f=0;
        }
        if(f) ans++;
    }
    cout<<ans;
    return 0;
}

signed main() {
    ios::sync_with_stdio(0);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    int t=1;
    // cin>>t;
    while(t--) solve();
    return 0;
}

Measured memory_bytes: 12620
#include <iostream>
#include <vector>
#include <queue>
#include <cmath>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
    int n,x,y;
    cin >> n >> x>>y;
    int a=x-1,b=y-x,c=n-y;
    int d=min(a,c);
    int e=max(a,c);
    vector<int> ans(n,0);
    int kyori1,kyori2;
    for(int i=1;i<=n-1;i++){
        for(int j=i+1;j<=n;j++){
            kyori1 = j-i;
            kyori2 = abs(i-x)+abs(j-y)+1;
            ans[min(kyori1,kyori2)]++;
        }
    }
    // cout << ans[0] << endl;
    for(int k=1;k<n;k++){
        cout << ans[k] << endl;
    }
    
    return 0;
}

Measured memory_bytes: 256
// +build ignore
package main

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

func solve(sc *scanner, wr *bufio.Writer) int {
	A := sc.f()
	B := sc.f()
	H := sc.f()
	M := sc.f()

	radA := math.Pi * 2.0 * (H + M/60.0) / 12.0
	radB := math.Pi * 2.0 * (M / 60.0)
	rad := radA - radB
	d := A*A + B*B - 2*A*B*math.Cos(rad)
	fmt.Println(math.Sqrt(d))

	return 0
}

func main() {
	sc := newScanner(os.Stdin)
	wr := bufio.NewWriter(os.Stdout)
	ret := solve(sc, wr)
	wr.Flush()
	os.Exit(ret)
}

// I/O
type scanner struct {
	sc *bufio.Scanner
}

func newScanner(input io.Reader) *scanner {
	sc := bufio.NewScanner(input)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &scanner{sc}
}

func (s *scanner) s() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *scanner) i() int {
	i, e := strconv.Atoi(s.s())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *scanner) f() float64 {
	f, e := strconv.ParseFloat(s.s(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *scanner) bs() []byte {
	return []byte(s.s())
}

func (s *scanner) is(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.i()
	}
	return res
}

func (s *scanner) fs(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.f()
	}
	return res
}


Measured memory_bytes: 1760
def is_prime(x):
    if x == 1:
        return 0
    l = x ** 0.5
    n = 2
    while n <= l:
        if x % n == 0:
            return 0
        n += 1
    return 1

import sys

def solve():
    N = int(input())
    cnt = 0
    for i in range(N):
        cnt += is_prime(int(input()))
    print(cnt)

solve()

Measured memory_bytes: 7848
#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
// Welcome to my source code!

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 w;
    cin >> w;
    int n = w.size();
    map<char, int> mp;
    for (int i = 0; i < n; i++) {
        mp[w[i]]++;
    }
    bool flag = true;
    for (pair<char, int> x : mp) {
        if (x.second % 2) flag = false;
    }
    if (flag) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Measured memory_bytes: 256
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        long w = sc.nextLong();
        long h = sc.nextLong();
        long x = sc.nextLong();
        long y = sc.nextLong();

        double area = (double)w*(double)h/2.0;

        if((double)x == (double)w / 2 && (double)y == (double)h / 2){
            System.out.println(area + " " + 1);
        }else{
            System.out.println(area + " " + 0);
        }
    }

    private static 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: 21204
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)

const ll ATCODER_AMARI = 1000000007; //10^9 + 7
const ll INF = 10000000000000;

//階乗関数　ATCODER_AMARIに注意
ll factorial(ll k){
  ll sum = 1;
  for(ll i = 1 ; i < k + 1; i++) {
    sum *= i;
    //sum = sum % ATCODER_AMARI;
  }
  return sum;
}

int main() {
  ll n; cin >> n;
  ll sum = 0;
  vector<ll> a(100001,0);
  rep(i,n) {
    ll tmp; cin >> tmp;
    sum += tmp;
    a.at(tmp)++;
  }
  
  ll q; cin >> q;
  rep(i,q) {
    ll b,c; cin >> b >> c;
    ll tmp2;
    sum -= b * a.at(b);
    sum += c * a.at(b);

    tmp2 = a.at(b);
    a.at(b) = 0;
    a.at(c) += tmp2;

    cout << sum << endl;
  }

  
}


Measured memory_bytes: 4048
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <math.h>
#include <iomanip>
#include <bitset>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
#include <map>
using namespace std;

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

Measured memory_bytes: 640
import fractions
def lcm(x, y):
  return (x * y) // fractions.gcd(x, y)

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

tmp1 = B//C-A//C
if A%C==0:
  tmp1 +=1

tmp2 = B//D-A//D
if A%D==0:
  tmp2 +=1

tmp3 = B//E-A//E
if A%E==0:
  tmp3 +=1

print((B-A+1)-tmp1-tmp2+tmp3)

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

using ll = long long;

void solve(long long N){
    string ans;
    //N--;
    while(N != 0){
        N--;
        ans.push_back(N % 26 + 'a');
        N /= 26;
    }
    reverse(ans.begin(), ans.end());
    for(int i = 0;i < ans.size();i++){

    }
    cout<<ans<<endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    solve(N);
    return 0;
}


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

using namespace std;

int N, M;

int main(){
  cin >> N >> M;
  vector<int> x(M);
  vector<int> d(M - 1);
  for(int i = 0; i< M; i++){
    cin >> x[i];
  }
  sort(x.begin(), x.end());
  for(int i = 0; i< M-1;i++){
    d[i] = x[i+1] - x[i];
  }
  sort(d.begin(), d.end());
  long long ans = 0;
  for(int i = 0; i < (M - 1) - (N -1); i++){
    ans += d[i];
  }
  cout << ans;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb emplace_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
#define PQ(T) priority_queue<T>
#define SPQ(T) priority_queue<T,vector<T>,greater<T>>
#define dame(a) {out(a);return 0;}
#define decimal cout<<fixed<<setprecision(15);
#define dupli(a) a.erase(unique(all(a)),a.end())
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef tuple<ll,ll,ll,ll> PPP;
typedef multiset<ll> S;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
using vvvvi=vector<vvvi>;
using vp=vector<P>;
using vvp=vector<vp>;
using vb=vector<bool>;
using vvb=vector<vb>;
const ll inf=1001001001001001001;
const ll INF=1001001001;
const ll mod=1000000007;
const double eps=1e-10;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())cout<<'('<<v[i].fi<<','<<v[i].se<<')';cout<<'\n';}
template<class T> void outvvp(T v){rep(i,v.size())outvp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);}
template<class T> bool isin(T x,T l,T r){return (l)<=(x)&&(x)<=(r);}
template<class T> void yesno(T b){if(b)out("yes");else out("no");}
template<class T> void YesNo(T b){if(b)out("Yes");else out("No");}
template<class T> void YESNO(T b){if(b)out("YES");else out("NO");}
template<class T> void noyes(T b){if(b)out("no");else out("yes");}
template<class T> void NoYes(T b){if(b)out("No");else out("Yes");}
template<class T> void NOYES(T b){if(b)out("NO");else out("YES");}
void outs(ll a,ll b){if(a>=inf-100)out(b);else out(a);}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}

int main(){
    string s;cin>>s;
    if(s=="ABC")out("ARC");
    else out("ABC");
}

Measured memory_bytes: 3640
import java.io.*;
import java.util.StringTokenizer;
public class Main {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int N = Integer.parseInt(st.nextToken());
		long K = Long.parseLong(st.nextToken());
		
		st = new StringTokenizer(br.readLine());
		long[] input = new long[N];
		for (int i = 0; i < N; i++) {
			input[i] = Long.parseLong(st.nextToken()) - 1;
		}
		
		long[] touch = new long[N];
		int current = 0;
		long divisor;
		while (K != 0) {
			if (touch[current] == 0) {
				touch[current] = K;
				current = (int) input[current];
				K--;
			} else {
				divisor = -K + touch[current];
				K = K % divisor;
				if (K == 0) {
					break;
				}
				current = (int) input[current];
				K--;
			}			
		}
		System.out.println(current + 1);
	}
}

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

typedef long long ll;
typedef int64_t i6;

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 1; i <= n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define Sort(x) sort(ALL(x))
#define Sort_rev(x) Sort(x);reverse(ALL(x))

template<typename V,typename T>
T find_num(V v, T num) {
    if ( find(ALL(v), num) == v.end() ) {
        return false;
    } else {
        return true;
    }
}

// π M_PI
// deg = rad*180/M_PI

ll num( ll a, ll b, ll i ) {
    ll ans = (int)(a*i/b)-a*(int)(i/b);
    // cout << "a " << ans << endl;
    return ans;
}

int main() {
    ll a, b, n;
    cin >> a >> b >> n;
    ll ans = 0;
    if ( n < b ) {
        // std::vector<ll> v;
        /*
        rep2(i, n) {
            v.push_back( num(a, b, i) );
        }
        ans = *max_element(ALL(v));*/
        ans = num(a, b, n);
    } else {
        ll nn = b;
        ll i = 2;
        // std::vector<ll> v;
        priority_queue<ll> q;
        while (nn <= n) {
            // v.push_back( num(a, b, nn-1) );
            // v.push_back( num(a, b, nn) );
            ll k = num(a, b, nn-1);
            if ( !q.empty() && k < q.top() ) {
                break;
            }
            q.push(k);
            q.push( num(a, b, nn) );
            nn = b*i;
            i++;
        }
        ans = q.top();
    }

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3680
#include <stdio.h>
int main(void){
    int A[100][100];
    int B[100];
    int C[100]={0};
    int i, j, m, n;
    
    scanf("%d %d", &n, &m);
    
    for(i=0; i<n; i++){
        for(j=0; j<m; j++){
            scanf("%d", &A[i][j]);
        }
    }
    
    for(i=0; i<m; i++){
        scanf("%d", &B[i]);
    }
    
    for(i=0; i<n; i++){
        for(j=0; j<m; j++){
            C[i]+=A[i][j]*B[j];
        }
        printf("%d\n", C[i]);
    }
    return 0;
}



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

#define sc(a) scanf("%d",&a)
#define scm(a,b) scanf("%d%d",&a,&b)
#define fl(c,i,n) for(int i=c;i<n;i++)
#define f(i,n) for(int i=0;i<n;i++)
#define mem(a) memset(a,0,sizeof(a))
#define ll long long int
#define ull unsigned long long int
#define inf INT_MAX
#define linf LLONG_MAX
#define pb push_back
#define pp pop_back()
#define aov(a) a.begin(),a.end()
//#define mp make_pair
#define nl printf("\n")
#define PI 2.0*acos(0.0) //#define PI acos(-1.0)
#define xx first
#define yy second
#define mxv(a) *max_element(aov(a))
#define mnv(a) *min_element(aov(a))
#define LB(a,x) (lower_bound(aov(a),x)-a.begin())
#define UB(a,x) (upper_bound(aov(a),x)-a.begin())
#define to_c_string(a) a.c_str()
#define strtoint(c) atoi(&c[0])
#define pii pair<int,int>
#define MAXN 100005
#define MOD 1000000007

template <class T> inline T bigmod(T p,T e,T M){
    ll ret = 1;
    for(; e > 0; e >>= 1){
        if(e & 1) ret = (ret * p) % M;
        p = (p * p) % M;
    } return (T)ret;
}
template <class T> inline T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template <class T> inline T modinverse(T a,T M){return bigmod(a,M-2,M);}
/*int fact[MAXN];
int invfact[MAXN];
int inv(int a, int b){
    if(b==0)
        return 1;
    if(b&1)
        return (long long)a*inv(a, b-1)%MOD;
    else{
        int res = inv(a, b>>1);
        return (long long)res*res%MOD;
    }
}
void init(){
    fact[0] = 1;
    for(int i=1;i<MAXN;i++){
        fact[i] = (long long)fact[i-1]*i%MOD;
    }
    invfact[MAXN-1] = inv(fact[MAXN-1], MOD-2);
    for(int i=MAXN-1;i>0;i--){
        invfact[i-1] = (long long)invfact[i]*i%MOD;
    }
}
int C(int n, int r){
    if(r>n || r<0)
        return 0;
    return (long long)((long long)fact[n]*invfact[r]%MOD)*invfact[n-r]%MOD;
}*/
int a, b, c;
void solve(){
    cin>>a>>b>>c;
    if(c>=a && c<=b)    cout<<"Yes";
    else    cout<<"No";
}
int main(){
    /*FILE *fin = freopen("C-small-attempt0.in", "r", stdin);
	assert( fin!=NULL );
	FILE *fout = freopen("C-small.out", "w", stdout);*/
	//init();
    solve();
    return 0;
}


Measured memory_bytes: 256
package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush() // !!!!coution!!!! you must use Fprint(out, ) not Print()
	/* --- code ---*/
	n, a, b := nextInt(), nextInt(), nextInt()
	ans := 0
	for i := 1; i <= n; i++ {
		s := strconv.Itoa(i)
		// fmt.Printf("s:%s\n", s)
		c := 0
		for _, v := range s {
			nn, _ := strconv.Atoi(string(v))
			// fmt.Printf("---- v:%v\n", nn)
			c += nn
		}
		if a <= c && c <= b {
			// fmt.Printf("---- c=%d\n", c)
			ans += i
		}
	}
	fmt.Println(ans)
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextFloat64() float64 {
	a, _ := strconv.ParseFloat(next(), 64)
	return a
}

func nextInts(n int) []int {
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}
func nextFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		ret[i] = nextFloat64()
	}
	return ret
}
func nextStrings(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = next()
	}
	return ret
}

// Genericsがないので筋肉で...
// interfaceでの取扱がようわからんし
func containStr(arr []string, target string) bool {
	for _, v := range arr {
		if v == target {
			return true
		}
	}
	return false
}

func PrintOut(src interface{}, joinner string) {
	switch reflect.TypeOf(src).Kind() {
	case reflect.Slice:
		s := reflect.ValueOf(src)
		for idx := 0; idx < s.Len(); idx++ {
			fmt.Fprintf(out, "%v", s.Index(idx))
			if idx < s.Len()-1 {
				fmt.Fprintf(out, "%s", joinner)
			} else {
				fmt.Fprintln(out)
			}
		}
	default:
		fmt.Fprintln(out, "fuck")
	}
}

// mapからkeysとvaluesを返す感じのやつ
// なんかしらんけどmap[interface{}]interface{}しか受け付けない。なんのためのinterface{}やねん
// なので呼ぶときのmapはmap[int]stringとかじゃダメ
func splitKeyValue(m map[interface{}]interface{}) (keys, values []interface{}) {
	switch reflect.TypeOf(m).Kind() {
	case reflect.Map:
		s := reflect.ValueOf(m)
		for _, v := range s.MapKeys() {
			keys = append(keys, v)
			values = append(values, s.MapIndex(v))
		}
	default:
		fmt.Fprintln(out, "fuck")
	}
	return
}


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

int main(){
  int n;
  cin >> n;
  vector<long int> h(n);
  for(int i =0;i<n;i++){
    cin >> h.at(i);
  }
  long int max = 0;
  for(int i =0;i<n-1;i++){
    if(h.at(i + 1) < max){
      cout << "No";
      return 0;
    }
    if(h.at(i) - h.at(i+1) <= 1){
      h.at(i)--;
      if(max < h.at(i)) max = h.at(i);
    }else{
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}

Measured memory_bytes: 1024
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

#define REP(X, Y, Z) for (ll(X) = (Y); (X) < (Z); (X)++)
#define REV(X, Y, Z) for (ll(X) = (Y); (X) > (Z); (X)--)

using namespace std;
using ll = long long;
using dll = deque<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using usll = unordered_set<ll>;
using umll = unordered_map<ll, ll>;
using sll = stack<int>;
using vll = vector<ll>;
using vvll = vector<vll>;

constexpr ll kMax = 1e12 + 1;
constexpr ll kMod = 1e9 + 7;
constexpr long double kPI = 3.14159265358979323846;

ll gcd(ll a, ll b) {
  if (a < b) {
    return gcd(b, a);
  }
  ll c = a % b;
  while (c != 0) {
    a = b;
    b = c;
    c = a % b;
  }
  return b;
}

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

void init() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
}

int main() {
  init();

  ll N;
  cin >> N;
  vll A(N), B(N), s(N);
  REP(i, 0, N) {
    cin >> A[i];
  }
  REP(i, 0, N) {
    cin >> B[i];
    s[i] = A[i] - B[i];
  }
  sort(s.begin(), s.end(), less<>());

  ll t = 0;
  ll al = 0;
  while (t < N && s[t] < 0) {
    al += s[t];
    t++;
  }

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

  ll y = 1;
  while (y <= N && 0 < s[N - y] && al < 0) {
    al += s[N - y];
    y++;
  }

  if (0 <= al) {
    cout << t + y - 1 << endl;
  } else {
    cout << -1 << endl;
  }

  return 0;
}


Measured memory_bytes: 2560
N=int(input())
H=list(map(int,input().split()))

tmp=0
ans=0
for i in range(N-1):
#    print(str(i)+':'+str(H[i])+','+str(H[i+1])+','+str(ans))
    if H[i] >= H[i+1]:
        tmp += 1
    else:
        if ans < tmp:
            ans = tmp
        tmp = 0
if ans < tmp:
    ans = tmp

print(ans)

Measured memory_bytes: 63984
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define pi pair<ll,ll>
#define pii pair<ll,pi>
#define pb push_back
#define mk make_pair
#define db double long
const int siz = 2 * 1e5 + 7;
int parent1[siz];
int nodesize1[siz];
int parent2[siz];
int nodesize2[siz];
int get2(int x) {
	if (parent2[x] == x)return x;
	return parent2[x] = get2(parent2[x]);
}
void dsu2(int u, int v) {
	u = get2(u);
	v = get2(v);
	if (v != u) {
		if (rand() & 1)swap(u, v);
		parent2[v] = u;
		nodesize2[u] += nodesize2[v];
		nodesize2[v] = 0;
	}
}
int get1(int x) {
	if (parent1[x] == x)return x;
	return parent1[x] = get1(parent1[x]);
}
void dsu1(int u, int v) {
	u = get1(u);
	v = get1(v);
	if (v != u) {
		if (rand() & 1)swap(u, v);
		parent1[v] = u;
		nodesize1[u] += nodesize1[v];
		nodesize1[v] = 0;
	}
}
void clear() {
	for (int i = 0; i < siz; i++) {
		parent1[i] = i;
		nodesize1[i] = 1;
		parent2[i] = i;
		nodesize2[i] = 1;
	}
}
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int n, k, l;
	cin >> n >> k >> l;
	clear();
	for (int i = 0; i < k; i++) {
		int a, b;
		cin >> a >> b;
		if (get1(a) != get1(b)) {
			dsu1(a, b);
		}
	}
	for (int i = 0; i < l; i++) {
		int a, b;
		cin >> a >> b;
		if (get2(a) != get2(b)) {
			dsu2(a, b);
		}
	}
	map<pi, int>m;
	for (int i = 1; i <= n; i++) {
		m[mk(get1(i), get2(i))]++;
	}
	for (int i = 1; i <= n; i++) {
		cout << m[mk(get1(i), get2(i))] << " ";
	}
	cout << endl;
}


Measured memory_bytes: 18132