akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<vector>
#include<algorithm>
#define ll long long int 
using namespace std;

int fac(int k) {
	int temp = 1;
	while (k--) {
		temp *= 2;
	}
	return temp;
}

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

	if (a >= b) {
		if (a >= c) {
			cout << (fac(k)* a) + b + c << endl;
		}
		else
			cout << a + b + (fac(k) * c) << endl;
	}
	else {
		if (b >= c) {
			cout << a + (b*fac(k)) + c << endl;
		}
		else
			cout << a + b + (c*fac(k)) << endl;
	}

	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <numeric>
#include <unordered_map>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <memory>
#include <iomanip>
#include <type_traits>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
constexpr long long MOD = 1e9 + 7;
constexpr long long MAX = 1000000;

//long long MOD = 998244353;
constexpr ll INF = 1e17;
constexpr double PI = 3.141592653589793;
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

ll h, w;
vector<ll> dx = { -1, 0, 1, 0 };
vector<ll> dy = { 0, -1, 0, 1 };


bool isInField(ll x, ll y) {
    bool f = x >= 0 && x < w && y >= 0 && y < h;
    return f;
}

bool compare_first(pair<ll, ll> x, pair<ll, ll> y)
{
    if (x.first != y.first) {
        return x.first < y.first;
    }
    else {
        return x.second < y.second;
    }
}

bool compare_second(pair<ll, ll> x, pair<ll, ll> y)
{
    if (x.second != y.second) {
        return x.second < y.second;
    }
    else {
        return x.first < y.first;
    }
}

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

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

    if (a == b && b == c) {
        cout << "No" << "\n";
        return 0;
    }

    if (a == b || b == c || c == a) {
        cout << "Yes" << "\n";
        return 0;
    }
    cout << "No" << "\n";


    return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

int main(){
    string s;
    cin >> s;
    
    int index_a = -99, index_x = -99;
    unsigned long int len = s.length();
    for (int i = 0; i < len && index_a == -99; i++) {
        if (s[i] == 'A') index_a = i;
    }
    for (unsigned long int i = len - 1; 0 <= i && index_x == -99; i--) {
        if (s[i] == 'Z') index_x = int(i);
    }
    
    cout << index_x - index_a  + 1 << endl;
    
    return 0;
}

Measured memory_bytes: 888
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int w,a,b;
    cin>>w>>a>>b;
    if(a<=b)
    {
        if(a+w<=b)
            cout<<b-a-w<<endl;
        else
            cout<<"0"<<endl;
    }
    else
    {
        if(b+w<=a)
            cout<<a-b-w<<endl;
        else
            cout<<"0"<<endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include<algorithm>
#include<iostream>
#include<functional>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
  long long int a,k;
  string s;
  cin>>s>>k;
  for(int i=0;i<s.size();i++){
    a=s[i]-'0';
    if(a!=1)
      break;
    if(a==1 and i+1==k)
      break;
  }
  cout<<a<<endl;
}

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

int main(void){
    int i,n;
    long long int sum = 0;
    scanf("%d",&n);
    for(i=1;i<=n;i++){
        if(i%3 == 0 || i%5 == 0);
        else sum += i;
    }

    printf("%lld",sum);


    return 0;
}

Measured memory_bytes: 1736
X,N=map(int,input().split() )
if( (N==0)):
  print(X)

else:
  p = list(map(int,input().split() ))

  p.sort()
  q=list(range(-5,102))

  for i in p:
    q.remove(i)

  Z=1000
  for i in q:
    if( abs(X-i)<Z):
      Z=abs(X-i)
      ans=i
  
  print(ans)

Measured memory_bytes: 9136
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<ll> vl;
typedef vector<vector<int, int> > vvi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define in insert
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const int INF = 1e9 + 5;
int main(){
    int a, b, c;
    cin >> a >> b >> c;
    if(a==b && b==5 && c==7){
        cout << "YES";
        return 0;
    }
    else if(a==c && c==5 && b==7){
        cout << "YES";
        return 0;
    }
    else if(b==c && c==5 && a==7){
        cout << "YES";
        return 0;
    }
    cout << "NO";
}

Measured memory_bytes: 256
package main

import (
	"bufio"
	. "fmt"
	"io"
	"os"
)

// github.com/EndlessCheng/codeforces-go
func run(_r io.Reader, _w io.Writer) {
	in := bufio.NewReader(_r)
	out := bufio.NewWriter(_w)
	defer out.Flush()

	var n,d,s int
	Fscan(in, &n,&d)
	d*=d
	for i := 0; i < n; i++ {
		var x,y int
		Fscan(in, &x, &y)
		if x*x+y*y <=d {
			s++
		}
	}
	Fprintln(out, s)
}

func main() { run(os.Stdin, os.Stdout) }


Measured memory_bytes: 6332
#include<iostream>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
#include<set>
#include<map>
#include<unordered_map>
#include<vector>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll INF=2e18;
const ll MOD=1e9+7;

ll N;
string s;
ll anim[100010];
bool Check(){
    for(ll i=1;i<N-1;i++){
        if(s[i]=='o'){
            if(anim[i]==0){//羊
                anim[i+1] = anim[i-1];
            }else{
                anim[i+1] = (anim[i-1]+1)%2;
            }
        }else{
            if(anim[i]==0){//羊
                anim[i+1] = (anim[i-1]+1)%2;
            }else{
                anim[i+1] = anim[i-1];
            }
        }
    }
    if(s[0]=='o'){
        if(anim[0]==0){
            if(anim[N-1]!=anim[1])return false;
        }else{
            if(anim[N-1]==anim[1])return false;
        }
    }else{
        if(anim[0]==1){
            if(anim[N-1]!=anim[1])return false;
        }else{
            if(anim[N-1]==anim[1])return false;
        }
    }

    if(s[N-1]=='o'){
        if(anim[N-1]==0){
            if(anim[N-2]!=anim[0])return false;
        }else{
            if(anim[N-2]==anim[0])return false;
        }
    }else{
        if(anim[N-1]==1){
            if(anim[N-2]!=anim[0])return false;
        }else{
            if(anim[N-2]==anim[0])return false;
        }
    }
    return true;
}
int main(){
    cin>>N>>s;
    for(ll i=0;i<4;i++){
        anim[0]=i/2;
        anim[1]=i%2;
        if(Check()){
            for(ll i=0;i<N;i++){
                cout<<(anim[i]==0?"S":"W");
            }
            return 0;
        }
    }
    cout<<-1;
    
    return 0;
}

Measured memory_bytes: 1408
#include <iostream>
#include <vector>
#include <array>
#include <deque>
#include <stack>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <numeric>
#include <utility>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <complex>
#include <bitset>
#include <functional>

using namespace std;
using ll=long long int;

template<typename M, typename N>
constexpr common_type_t<M, N> gcd(M a, N b) {
    return b ? gcd(b, a%b) : abs(a);
}

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

    n = n % k;

    cout << min(n, k-n) << endl;

    return 0;
}


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

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

    int z,ans = 0;
    for(int x = 0; x <= k; x++){
        for(int y = 0; y <= k; y++){
            z = s - x - y;
            if(z >= 0 && z <= k && x + y + z == s) ans++;
        }
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
def main(x):
    retval = ''
    sort_list = sorted(x)
    retval = '%d' % sort_list[0]
    for i in range(1, len(sort_list)):
        retval = '%s %d' % (retval, sort_list[i])
    print(retval)
        
if '__main__' == __name__:
    try:
        while True:
            main(list(map(int, input().strip().split(' '))))
    except EOFError:
        pass



Measured memory_bytes: 5600
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <set>
#include <string>
#include <vector>
#define SORT(a) sort((a).begin(), (a).end())
#define RSORT(a) sort((a).rbegin(), (a).rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(a) a.begin(), a.end()
typedef long long int ll;
using namespace std;

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

    int N, K;
    cin >> N >> K;
    vector<int> A(N);
    REP(i, N) cin >> A[i];

    SORT(A);
    int ans = 0;
    for (int i = 0; i < N - 1; i += K - 1) {
        while (A[i] == A[i + 1]) {
            i++;
        }
        ans++;
    }

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

Measured memory_bytes: 640
#![allow(non_snake_case, unused)]
use std::cmp::*;
use std::collections::*;
use std::f64::consts::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input!{
        k: i64,
        s: i64,
    }
    let mut cnt = 0;
    for x in 0..k + 1 {
        for y in 0..k + 1 {
            let z = s - x as i64 - y as i64;
            if 0 <= z && z <= k {
                cnt += 1
            }
        }
    }
    println!("{}", cnt);
}


Measured memory_bytes: 4352
#include <iostream>
#include <algorithm>
using namespace std;
#define MAX_N 200001

void get_median(long int *X, int N, long int *left_value, long int *right_value){
    long int Y[MAX_N];
    for (int i = 0; i < N; i++){
        Y[i] = X[i];
    }
    sort(Y, Y + N);
    *left_value = Y[N/2 - 1];
    *right_value = Y[N/2];
}

int main(){
    int N;
    long int left_value, right_value;
    long int X[MAX_N];
    cin >> N;
    for (int i = 0; i < N; i++){
        cin >> X[i];
    }
    get_median(X, N, &left_value, &right_value);
    // cout << left_value << right_value << endl;
    for (int i = 0; i < N; i++){
        if (X[i] <= left_value){
            cout << right_value << endl;
        }else{
            cout << left_value << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 5376
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;

int N;
string s;
int num[26];

int main(){
	cin >> N;
	for (int i = 0; i < 26; i++)num[i] = INT_MAX;
	for (int i = 0; i < N; i++) {
		cin >> s;
		int box[26] = {};
		for (auto j : s) {
			box[j - 'a']++;
		}
		for (int j = 0; j < 26; j++) {
			num[j] = min(num[j], box[j]);
		}
	}
	for (int i = 0; i < 26; i++) {
		for (int j = 0; j < num[i];j++) {
			cout << (char)('a' + i);
		}
	}
	cout << endl;
	return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int A, B;
	cin >> A >> B;
	int ans = 0;
	ans = max(ans, A + A - 1);
	ans = max(ans, A + B);
	ans = max(ans, B + B - 1);
	cout << ans << endl;
	system("pause");
	return 0;
}

Measured memory_bytes: 504
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        if (Integer.parseInt(str) < 1200){
            System.out.println("ABC");
        } else if (Integer.parseInt(str) < 2800){
            System.out.println("ARC");
        } else {
            System.out.println("AGC");
        }
    }
}

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

int main() {
	string str;
	bool one;
	cin >> str;
	one = str[0]=='1';
	int bans = str.length();
	int len = 1;
	for (int i = 1; i < bans; i++) {
		if ((str[i]=='1') == one) {
			len++;
		}
		else {
			len--;
			if (len < 0) {
				len = -len;
				one = !one;
			}
		}
	}
	cout << bans - len << endl;
	return 0;
}


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

using namespace std;

int N, M, X;
bool A[101];
int res = 0;

int main()
{
  for (int h = 0; h < 101; h++)
  {
    A[h] = false;
  }
  cin >> N >> M >> X;
  for (int i = 1; i <= M; i++)
  {
    int temp;
    cin >> temp;
    A[temp] = true;
  }
  ////////////////////

  int temp = 0;
  for (int i = 1; i < X; i++)
  {
    if (A[i])
    {
      temp++;
    }
  }
  int temp2 = 0;
  for (int j = X + 1; j < N; j++)
  {
    if (A[j])
    {
      temp2++;
    }
  }
  res = min(temp, temp2);
  cout << res << endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define mod 1000000007
#define pb push_back
#define nl cout<<"\n"
#define db(x) cout<<x<<" "
#define fi(a,b) for(int i=a;i<b;i++)
#define fj(a,b) for(int j=a;j<b;j++)
#define fk(a,b) for(int k=a;k<b;k++)
#define F first
#define S second
template <typename T> istream &operator>>(istream &is, vector<T> &vec) { for (auto &v : vec) is >> v; return is; }
#define mxsize (int)1e6
ll fastexp(ll a,ll n,ll nod){
    if(nod==0)	nod=LLONG_MAX;
    ll ans=1;
    while(n){
        if(n&1)
            ans=(ans*a)%nod;
        a=(a*a)%nod;
        n>>=1;
    }
    return ans;
}
void fun(){
    ll n;
    cin>>n;
    ll ans=fastexp(10,n,mod);
    ans=(ans+mod-(fastexp(9,n,mod)*2)%mod)%mod;
    ans=(ans+fastexp(8,n,mod))%mod;
    cout<<ans<<"\n";
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("/ATOM/input.txt", "r", stdin);
        freopen("/ATOM/output.txt", "w", stdout);
    #endif
    int t=1;
    // cin>>t;

    while(t--){
        fun();
    }
}

Measured memory_bytes: 3564
#include<bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vi>
#define vs vector<string>
#define pb push_back
#define P pair<int,int>
#define vp vector<P>
#define PP pair<int,P>
#define vpp vector<PP>
#define fi first
#define se second
#define INF 1e9
#define MOD 1000000007
#define REP(i,n) for(int i=0;i<n;i++)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define FOR(i,m,n) for(int i=m;i<n;i++)
#define all(x) (x).begin(),(x).end()
int main(){
    string st;
    cin>>st;
    REP(i,(int)st.size()-1){
        if(st[i]==st[i+1]){
            cout<<i+1<<" "<<i+2<<endl;
            return 0;
        }
    }
    REP(i,(int)st.size()-2){
        if(st[i]==st[i+2]){
            cout<<i+1<<" "<<i+3<<endl;
            return 0;
        }
    }
    cout<<-1<<" "<<-1<<endl;
    return 0;
}

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

int main() {
  int n;
  double b;
  b=0;
  cin >> n;
  vector<double> a(n);
  for(int i=0;i<n;i++) {
    cin >> a.at(i);
    b+=1/a.at(i);
  };
  cout << fixed << setprecision(6);
  cout << 1/b << endl;
}

Measured memory_bytes: 256
#include <cstdio>
#include <utility>
#include <unordered_map>
#include <queue>
#include <vector>
#include <climits>
using namespace std;

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
_in() {return in(gcu());}
_sc(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
template <typename H,typename... T> _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
template <typename T>
_vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
template <typename H,typename... T> _vo(H&& h, T&&... t){out(h);out(move(t)...);}
_vl(){out('\n');}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

#define B(n) n = in()
typedef unordered_map<int, unordered_map<int, int>> R;

struct N {
	int n, c;
	bool operator < (const N &a) const {return a.c < c;}
};

int min_cost(int s, int g, int n, R &r) {
	priority_queue<N> q;
	vector<N> v(n + 1, {0, INT_MAX});
	for (q.push({s,0}) ;!q.empty();) {
		auto p = q.top(); q.pop();
		if (p.n == g) return p.c;
		if (v[p.n].n) continue;
		v[p.n].n = 1;
		for (auto n: r[p.n]) {
			int c = p.c + n.second;
			if (v[n.first].c > c)
				q.push({n.first, v[n.first].c = c});
		}
	}
	return -1;
}

int main() {
	int B(n), B(m);
	R r;
	while (m--) {
		int B(a), B(b), B(c), B(d);
		r[a][b] = c;
		r[b][a] = d;
	}
	int B(s), B(g), B(v), B(p);
	outl(v - p - min_cost(s, g, n, r) - min_cost(g, s, n, r));
}



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

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

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


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, a, b;
    cin >> n >> a >> b;
    VI q(3, 0);
    REP(i, n) {
        int p;
        cin >> p;
        if(p <= a) q[0]++;
        else if(p <= b) q[1]++;
        else q[2]++;
    }
    cout << *min_element(ALL(q)) << endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
using MethodImplAttribute = System.Runtime.CompilerServices.MethodImplAttribute;
using MethodImplOptions = System.Runtime.CompilerServices.MethodImplOptions;
public static class P
{
    public static void Main()
    {
        Console.WriteLine((char)(Console.Read() + 1));
    }
}

Measured memory_bytes: 11092
/*{{{*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<string>
#include<iostream>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include<bitset>
#include<vector>
#include<limits.h>
#include<assert.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define FORS(I, S) for (int I = 0; S[I]; ++I)
#define RS(X) scanf("%s", (X))
#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 CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VPII;
typedef pair<LL,LL> PLL;
typedef vector<PLL> VPLL;
template<class T> void _R(T &x) { cin >> x; }
void _R(int &x) { scanf("%d", &x); }
void _R(LL &x) { scanf("%lld", &x); }
void _R(double &x) { scanf("%lf", &x); }
void _R(char &x) { scanf(" %c", &x); }
void _R(char *x) { scanf("%s", x); }
void R() {}
template<class T, class... U> void R(T &head, U &... tail) { _R(head); R(tail...); }
template<class T> void _W(const T &x) { cout << x; }
void _W(const int &x) { printf("%d", x); }
void _W(const LL &x) { printf("%lld", x); }
void _W(const double &x) { printf("%.16f", x); }
void _W(const char &x) { putchar(x); }
void _W(const char *x) { printf("%s", x); }
template<class T,class U> void _W(const pair<T,U> &x) {_W(x.F); putchar(' '); _W(x.S);}
template<class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); }
void W() {}
template<class T, class... U> void W(const T &head, const U &... tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); }
#ifdef HOME
 #define DEBUG(...) {printf("# ");printf(__VA_ARGS__);puts("");}
#else
 #define DEBUG(...)
#endif
int MOD = 1e9+7;
void ADD(LL& x,LL v){x=(x+v)%MOD;if(x<0)x+=MOD;}
/*}}}*/
const int SIZE = 1e6+10;
int main(){
    string A,B;
    R(A,B);
    W(B+A);
    return 0;
}


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

int main(void)
{
    string S;
    cin >> S;

    for (int i = 0; i < S.size(); i = i + 2) {
        if (S[i] != 'R' && S[i] != 'U' && S[i] != 'D') {
            cout << "No" << endl;
            return 0;
        }
    }
    for (int i = 1; i < S.size(); i = i + 2) {
        if (S[i] != 'L' && S[i] != 'U' && S[i] != 'D') {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}



Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner scanner = new Scanner(System.in);
        final String s = scanner.nextLine();

        switch (s.length()) {
            case 1:
                System.out.println(Integer.parseInt(s));
                break;
            case 2:
                System.out.println(9);
                break;
            case 3:
                System.out.println((9 + Integer.parseInt(s) - 99));
                break;
            case 4:
                System.out.println(909);
                break;
            case 5:
                System.out.println((909 + Integer.parseInt(s) - 9999));
                break;
            default:
                System.out.println(90909);
        }
    }
}


Measured memory_bytes: 21716
#include<stdio.h>

int main(){
	
	int H,W,i,h;
	while(1){
		scanf("%d %d",&H,&W);
		if(H==0 && W==0)break;
		for(i=0;i<H;i++){
			for(h=0;h<W;h++){
				if(i==0 || i==H-1){
					printf("#");
				} else {
					if(h==0 || h==W-1){
						printf("#");
					} else {
						printf(".");
					}
				}
			}
			printf("\n");
		}
		printf("\n");
	}
	
	return 0;
}



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



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

    ll n;
    while(cin>>n){
        if(n==0) break;
        ll ans = 0;
        ll a[n];
        for(int i=0;i<n;i++){
            cin>>a[i];
            ans += a[i];
        }
        ans -= *max_element(a,a+n) + *min_element(a,a+n);
        ans /= (n-2);
        cout << ans << endl;
    }
}


Measured memory_bytes: 3140
#include<bits/stdc++.h>
using namespace std;
int n,a[100005],bit[200005];
int b[200005];
void add(int x){
	while (x<200005){
		bit[x]++;
		x+=(x&-x);
	}
}
int num(int x){
	int tmp=0;
	while(x){
		tmp+=bit[x];
		x-=x&-x;
	}
	return tmp;
}
bool check(int x){
	memset(bit,0,sizeof(bit));
	for(int i=0;i<n;i++)b[i]=(a[i]<=x)-(a[i]>x);
	long long all=0,cnt=0;
	for(int i=0;i<n;i++){
		all+=b[i];
		add(all+100000);
		cnt+=(all>0);
		cnt+=num(all+99999);//Ö»Òªall-Ä³¸öÇø¼ä>=0 ¼´¿É³ÉÁ¢ 
	//	cout<<cnt<<' ';
	//	for(int i=-3;i<=3;i++)cout<<bit[i+100000];
	//	cout<<endl;
	}
	//cout<<endl;
	return cnt>=((n*1ll*(n+1))/2)/2+1;
}
int main(){
	cin>>n;
	vector<int>v;
	for(int i=0;i<n;i++)cin>>a[i],v.push_back(a[i]);
	//sort(a,a+n);
	sort(v.begin(),v.end());
	v.erase(unique(v.begin(), v.end()), v.end());
    int l=0,r=v.size()-1;
	while(l<r){
		int mid=(l+r)/2;
		if(check(v[mid]))
			r=mid;
		else
			l=mid+1;
	}
	cout<<v[l];
}

Measured memory_bytes: 2296
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>

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

int main(){
    int N,K;
    string S;
    cin >>N >> K >> S;
    string T;
    int b=0,f=0;
    int ans =0;
    for(int i=0;i<N-1;i++){
        if(S[i]=='L' && S[i+1]=='R')b++;
        if(S[i]=='R' && S[i+1]=='L')f++;
        if(S[i] == S[i+1])ans++;
    }
    int true_ans = 0;
    int mini = min(b,min(f,K));
    ans += 2*min(b,min(f,K));
    if(mini == K){
        true_ans = ans;
    }else {
        if(K-min(f,b) >= 2)true_ans = ans + 2;
        else true_ans = ans + 1;
    }

    cout << min (max(N-1, 0)  ,true_ans) << endl;;

    return 0;

}

Measured memory_bytes: 3732
#include <iostream>
#include <string>
using namespace std;
int main() {
	string S;
	cin >> S;

	int count = 0;

	for (int i = 0; i < 3; i++) {
		if (S.at(i) == 'R') {
			count++;
		}
	}

	if (S.at(0) == S.at(2) && S.at(0) == 'R' && S.at(2) == 'R' && S.at(1) == 'S') {
		count--;
	}

	cout << count << endl;
}

Measured memory_bytes: 3592
#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
#define int long long
#define INF 1000000000000000000
using namespace std;

typedef vector<int> vec;
typedef vector<vec> mat;
typedef pair<int, int> Pii;

template<typename T>
void readvec(vector<T> &a);
void readindex(vector<int> &a);



signed main(){

    int n1 = 10;
    char a[10];
    while(n1 <= 1000000000){
        printf("? %lld\n", n1);
        fflush(stdout);
        scanf("%s", a);
        if(a[0] == 'N') break;
        n1 *= 10;
    }
    if(n1 != 10000000000){
        int n0 = n1 / 10;
        // n0 < ans < n1
        int x1 = n0;
        int x2 = n1 - 1;
        while(x2 - x1 > 1){
            int x = (x1 + x2 + 1) / 2;
            printf("? %lld000000000\n", x);
            fflush(stdout);
            scanf("%s", a);
            if(a[0] == 'Y'){
                x2 = x;
            }else{
                x1 = x;
            }
        }
        printf("! %lld\n", x2);
        fflush(stdout);
    }else{
        //答えは10^n
        int n1 = 9;
        while(n1 <= 1000000000){
            printf("? %lld\n", n1);
            fflush(stdout);
            scanf("%s", a);
            if(a[0] == 'Y') break;
            n1 = n1 * 10 + 9;
        }
        printf("! %lld\n", (n1 + 1) / 10);
        fflush(stdout);
    }
    

    return 0;
}


template<typename T>
void readvec(vector<T> &a){
    REP(i, a.size()){
        cin >> a[i];
    }
}
void readindex(vector<int> &a){
    REP(i, a.size()){
        cin >> a[i];
        a[i]--;
    }
}

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

#define ll long long
#define vecll vector<long long>
#define vecs vector<string>
#define vec2ll vector<vector<long long>>
#define vecbool vector<bool>
#define vecpairll vector<pair<long long,long long>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s > 0;s--)

int main()
{
  ll k=0;
  string s, prev, next;
  cin >> s;
  
  forll(i, 0, s.size()){
	forll(j, 0, 2){
	  next = s.substr(i, j + 1);
	  if (prev != next){
		k++;
		prev = next;
		i += j;
		break;
	  }
	}
  }	
  cout << k << endl;
}

Measured memory_bytes: 640
#include<iostream>
#include<iomanip>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#define REP(i, N) for(ll i = 0; i < N; ++i)
#define FOR(i, a, b) for(ll i = a; i < b; ++i)
#define ALL(a) (a).begin(),(a).end()
#define pb push_back
#define INF (long long)1000000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

int main(void) {
	while(true) {
		int w, h;
		cin>>w>>h;
		if(w == 0 && h == 0) break;
		vector<vector<char> > m(h, vector<char>(w));
		vector<P> p;
		REP(i, h) {
			REP(j, w) {
				cin>>m[i][j];
				if(m[i][j] == 'o') {
					p.pb(P(i, j));
				}
			}
		}
		REP(i, h) {
			REP(j, w) {
				if(m[i][j] == '*') {
					p.pb(P(i, j));
				}
			}
		}
		vector<vector<ll> > d(p.size(), vector<ll>(p.size(), INF * INF));
		REP(i, p.size()) {
			P s = p[i];
			vector<vector<ll> > dir(h, vector<ll>(w, INF * INF));
			dir[s.first][s.second] = 0;
			queue<P> q;
			q.push(s);
			while(!q.empty()) {
				P np = q.front();
				q.pop();
				REP(j, 4) {
					ll nh = np.first + dx[j];
					ll nw = np.second + dy[j];
					if(nh >= 0 && nh < h && nw >= 0 && nw < w && m[nh][nw] != 'x') {
						if(dir[nh][nw] == INF * INF) {
							dir[nh][nw] = dir[np.first][np.second] + 1;
							q.push(P(nh, nw));
						}
					}
				}
			}
			REP(j, p.size()) {
				if(i == j) continue;
				d[i][j] = dir[p[j].first][p[j].second];
			}
		}
		bool det = false;
		FOR(i, 1, p.size()) {
			if(d[0][i] == INF * INF) det = true;
		}
		if(det) {
			cout<<-1<<endl;
			continue;
		}
		vector<int> perm;
		REP(i, p.size() - 1) {
			perm.pb((int)(i + 1));
		}
		ll ans = INF * INF;
		if(p.size() == 1) {
			cout<<"hoge"<<endl;
			cout<<0<<endl;
		}
		else {
			do {
				ll res = 0;
				res += d[0][perm[0]];
				REP(i, perm.size() - 1) {
					res += d[perm[i]][perm[i + 1]];
				}
				ans = min(ans, res);
			} while(next_permutation(ALL(perm)));
			cout<<ans<<endl;
		}
	}
}

Measured memory_bytes: 3068
import sys

input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))

def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x%y == 0:
        return y
    else:
        while x%y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z

A.sort()
ans = A[0]
for i in range(1, N):
    ans = gcd(ans, A[i])
print(ans)



Measured memory_bytes: 14252
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int INF = 1000000009;
int main()
{
    ll n;
    cin >> n;
    vector<ll> t(n);
    rep(i, n)
    {
        cin >> t[i];
    }
    ll g = t[0];
    rep(i, n-1)
    {
        ll tmp = __gcd(g, t[i + 1]);
        g = g / tmp * t[i + 1];
    }
    cout << g << endl;
}

Measured memory_bytes: 256
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
INF = 10**9
mod = 10**9+7

N = i()
S = [l() for _ in range(N)]
ans = 0
pq = []
for i in S:
    for j in S:
        if i == j:
            continue
        pq.append((i[0]-j[0],i[1]-j[1]))
for p,q in set(pq):
    cnt = 0
    for i in S:
        for j in S:
            if i == j:
                continue
            if (i[0]-j[0],i[1]-j[1]) == (p,q):
                cnt += 1
    ans = max(ans,cnt)
print(N-ans)

Measured memory_bytes: 10448
#include <iostream>
#include <vector>
#include <algorithm>
#define CALC_BIT 45

typedef long long ll;

using namespace std;

ll n,k;

int main() {
	cin >> n >> k;
	vector<ll> arr(n);
	for(int i = 0; i < n; i++) {
		cin >> arr[i];
	}

	bool bitonemany[CALC_BIT];
	for(int i = 0; i < CALC_BIT; i++) {
		int cnt = 0;
		for(int j = 0; j < n; j++) {
			cnt += ((arr[j]&(1LL<<(ll)i))!=0)?1:0;
		}
		bitonemany[i] = cnt>=n-cnt;
	}

	ll x = 0;
	ll nownum = 1LL<<(ll)CALC_BIT;
	for(int i = CALC_BIT-1; i >= 0; i--) {
		if(!bitonemany[i]) {
			ll bitnum = (1LL<<(ll)i);
			if(bitnum<=k) {
				x += bitnum;
				k -= bitnum;
			}
		}
	}

	//cout << "x = " << x << endl;

	ll ans = 0;
	for(int i = 0; i < n; i++) {
		//cout << (arr[i]^x) << endl;
		ans += (arr[i]^x);
	}

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 1024
//#define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"

#define rep(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007LL
#define INF (1LL<<60LL)
typedef long long ll;

using namespace std;


int main() {
	ll n;
	ll ans = 0;
	cin >> n;
	vector<ll> v(3*n);
	rep(i, 3 * n) cin >> v[i];
	sort(v.begin(), v.end());
	reverse(all(v));
	for (int i = 0; i < n; i++) {
		ans += v[1 + 2 * i];
	}
	cout << ans << endl;
}

Measured memory_bytes: 2560
import sys
def input():
    return sys.stdin.readline()[:-1]
N = int(input())

sentences = [None]*N

dp = {}

for i in range(N):
     k = list(map(str,input()))
     k.sort()
     sentences[i] = k

def addTree(tree, sentence,org):
    l = len(sentence)
    if l==0:
        return None
    st = sentence[0]
    if st not in tree:
        tree[st] = {}
    else:
        if l==1:
            org = ''.join(org)
            if org in dp:
                dp[org] += 1
            else:
                dp[org] = 2

    tree[sentence[0]] = addTree(tree[st], sentence[1:],org)

    return tree


def createTree(sentences):
    tree = {}
    for sentence in sentences:
        tree = addTree(tree, sentence, sentence)

    return tree

tree = createTree(sentences)

ans = 0
for i in dp.values():
    ans += i*(i-1)/2
print(int(ans))

Measured memory_bytes: 135184
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
// #include <pair>

int calc_max(std::vector<int> &h, int n){
    int maxh = 0;
    for (int i=0; i < n; i++){
        if (h[i]>maxh) maxh = h[i];
    }
    return maxh;
}


int main(){
	int n, m;
    std::cin >> n >> m;
    std::vector<int> x(m);
	for (int i=0; i < m; i++){
		std::cin >> x[i];
	}
    std::sort(x.begin(), x.end());

    std::vector<int> d(m-1);
    // std::vector<int> a(n-1);
    // std::pair<int, int> c(n-1);
    for (int i=0; i < m-1; i++){
        d[i] = x[i+1] - x[i];
    }
    std::sort(d.begin(), d.end());
    
    int count = 0;
    for(int i=0; i<(m-1) - (n-1); i++){
        count+= d[i];        
    }

    std::cout << count << std::endl;
	return 0;
}


Measured memory_bytes: 1024
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
using namespace std;
#define INF 0x3f3f3f3f
#define pb push_back
#define mk make_pair


int n,cont=0,k;
vector<int> v;
map<int,int>m;
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=0;i<n;i++)
	{
		int a;
		scanf("%d",&a);
		v.pb(a);
		m[a]++;
	}
	vector<pair<int,int> > v2;
	int quant=0;
	for(int i=0;i<200005;i++)
	{
		if(m.count(i) == true)
		{
			v2.pb(mk(m[i],i));
			quant++;
		}
	}
	sort(v2.rbegin(),v2.rend());
	set<int>s;
	for(int i=k;i<quant;i++)
	{
		s.insert(v2[i].second);
	}
	int resp=0;
	for(int i=0;i<v.size();i++)
	{
		if(s.count(v[i])==true)
			resp++;
	}
	printf("%d\n",resp );
	return 0;
}

Measured memory_bytes: 21360
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define pa(x,n) for(ll i=0;i<n;i++){cout<<(x[i])<<" \n"[i==n-1];};
#define pb push_back

using ll = long long;
using namespace std;
using pint = pair<int,int>;
using pll = pair<ll,ll>;
const int INFint = 1e9;
const ll INFll = 1e18;
ll MOD=1e9+7;

ll gcd(ll a, ll b) { return __gcd(a,b); } //最大公約数
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; } //最大公倍数

// aのn乗をMODで割りながら計算する
ll modpow(ll a, ll n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1; // right shift
  }
  return res;
}

// MODを法としたaの逆元を計算する
ll modinv(ll a) {
  return modpow(a, MOD - 2);
}

int main(){
  int n,x[100];
  cin>>n;
  for (int i(0);i<n;i++) cin>>x[i];
  int ans(1e9+1);
  for (int i(0);i<100;i++){
    int tmp(0);
    for (int j(0);j<n;j++){
      tmp += (x[j]-i)*(x[j]-i);
    }
    ans = min(ans,tmp);
  }
  cout << ans << endl;
  return 0;
}



Measured memory_bytes: 256
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <queue>
#include <string>
#include <set>
#include <vector>
#include <stdlib.h>

#define FOR(i, l, r) for (i = (l); i < r; i++ )

using namespace std;
typedef long long ll;

#define MAX_N (500010)

struct Node{
    int key;
    Node *p_p;
    Node *p_l;
    Node *p_r;
};

int m;

Node *T = NULL;


void insert(int k) {
    Node *p_y = NULL;		// parent of x
    Node *p_x = T;
    Node *p_z = (Node *)malloc(sizeof(Node));
    
    p_z->key = k;
    p_z->p_p = p_z->p_l = p_z->p_r = NULL;

    while ( p_x != NULL ) {
	p_y = p_x;
	if ( k < p_x->key ) {
	    p_x = p_x->p_l;
	}
	else {
	    p_x = p_x->p_r;
	}
    }

    if ( p_y == NULL ) {		// T is NULL.
	T = p_z;
    }
    else if ( k < p_y->key ) {	// z is left child of y.
	p_y->p_l = p_z;
    }
    else {			// z is right child of y.
	p_y->p_r = p_z;
    }

    return;
}

void preorder( vector<int> *p_v, Node *p_x ) {
    if ( p_x == NULL ) return;
    else {
	p_v[0].push_back(p_x->key);
	preorder(p_v, p_x->p_l);
	preorder(p_v, p_x->p_r);	
    }
    
    return;
}

void inorder( vector<int> *p_v, Node *p_x ) {
    if ( p_x == NULL ) return;
    else {
	inorder(p_v, p_x->p_l);
	p_v[0].push_back(p_x->key);	
	inorder(p_v, p_x->p_r);	
    }
    
    return;
}

int main()
{
    scanf("%d", &m);
    for ( int i = 0; i < m; i++ ) {
	char str[100];
	scanf("%s", str);
	if ( str[0] == 'i' ) {	// insert
	    int k;
	    scanf("%d", &k);
	    insert(k);
	}
	else {			// print
	    vector<int> pre;
	    vector<int> in;
	    preorder( &pre, T );
	    inorder( &in, T );

	    for ( int i = 0; i < in.size(); i++ ) {
		printf(" %d", in[i]);
	    }
	    printf("\n");
	    for ( int i = 0; i < pre.size(); i++ ) {
		printf(" %d", pre[i]);
	    }
	    printf("\n");	    
	}
    }
    
    return 0;
}

Measured memory_bytes: 31236
n,k = gets.chomp.split(' ').map(&:to_i)
up_arr = (1..(n+1)).to_a
down_arr = (1..(n+1)).to_a.reverse
up_sum = up_arr[0..(k-1)].sum
down_sum = down_arr[0..(k-1)].sum
ans = down_sum - up_sum + 1
i = k
while i < n + 1
  i += 1
  up_sum += i
  down_sum += (n + 1) - i + 1 
  ans += down_sum - up_sum + 1
  ans %= 10**9+7
end
puts ans

Measured memory_bytes: 19752
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Math;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            A();
        }

        static void A()
        {
            var ABC = ReadSplitInt();
            YesOrNo(ABC[0] <= ABC[2] && ABC[2] <= ABC[1]);
        }

        static List<long> ReadLines(long n)
        {
            var l = new List<long>();
            for (long i = 0; i < n; i++)
            {
                l.Add(ReadLong());
            }
            return l;
        }

        static void YESOrNO(bool e)
        {
            if (e) Println("YES");
            else Println("NO");
        }

        static void YesOrNo(bool e)
        {
            if (e) Println("Yes");
            else Println("No");
        }

        static IEnumerable<int> Range(int start, int stop)
        {
            if (start < 0 || stop < 0 || start > stop || (start <= 0 && stop <= 0))
                return new List<int>();

            return Enumerable.Range(start, stop - start);
        }

        static bool IsDigit(string str)
        {
            var i = 0;
            return int.TryParse(str, out i);
        }

        static int SumDigits(long num)
        {
            return num.ToString().Select(x => x.ToString()).Sum(int.Parse);
        }

        static int[] ToIntArray(string str)
        {
            return str.Select(x => x.ToString()).Select(int.Parse).ToArray();
        }

        static long Gcd(long a, long b) => b == 0 ? a : Gcd(b, a % b);
        static long Lcm(long a, long b) => a / Gcd(a, b) * b;

        static bool IsPrime(int x)
        {
            if (x <= 1 || (x != 2 && x % 2 == 0)) return false;
            if (x == 2) return true;

            for (int i = 3; i < x; i += 2)
                if (x % i == 0) return false;

            return true;
        }

        static string Read() => Console.ReadLine();
        static int ReadInt() => int.Parse(Read());
        static long ReadLong() => long.Parse(Read());

        static List<string> ReadSplit() => Read().Split().ToList();
        static List<int> ReadSplitInt() => Read().Split().Select(int.Parse).ToList();
        static List<long> ReadSplitLong() => Read().Split().Select(long.Parse).ToList();

        static void Print(object value) => Console.Write(value.ToString());
        static void Println(object value) => Console.WriteLine(value.ToString());

        static string Join<T>(IEnumerable<T> list) => string.Join("", list);
    }

    public static class MyExtensions
    {
        public static string Slice(this string str, int start = 0, int stop = 0)
        {
            if (start > str.Length || stop > str.Length || start < 0 || stop < 0)
                return "";

            if (stop == 0) stop = str.Length;
            return str.Substring(start, stop - start);
        }
    }
}


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

int main() {
    int N = 0;
    cin >> N;
    int A[N];
    for (int i = 0; i < N; i++) cin >> A[i];

    int m = A[0];
    int M = A[0];
    for (int i = 0; i < N; i++) {
        if (A[i] < m) m = A[i];
        if (A[i] > M) M = A[i];
    }

    cout << M - m << endl;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#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++)
using namespace std;

int main() {
  long long a=0, b=0, x=0, ans=0;
  long long one = 0;
  cin >> a >> b >> x;
  if (a-1 < 0 ) ans = (b/x + 1);
  else ans = (b/x - (a-1) / x);
  cout << ans << endl;
}

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

#define ll long long
#define ull unsigned long long

using namespace std;

const ull MOD = 1000000007;

// a^n mod を計算する
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

ll calc(ll a, ll b, ll p) {
    if (b == 0) {
        return 1;
    } else if (b % 2 == 0) {
        ll d = calc(a, b / 2, p);
        return (d * d) % p;
    } else {
        return (a * calc(a, b - 1, p)) % p;
    }
}

// 負の数にも対応した % 演算
long long mod(long long val, long long m) {
  long long res = val % m;
  if (res < 0) res += m;
  return res;
}

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

	ll val1 = modpow(2, n, MOD) - 1;

	ll val2 = 1;
	for (int ii = n - a + 1; ii <= n; ++ii){
		val2 = (val2 * ii) % MOD;
	}
	for (int ii = 2; ii <= a; ++ii){
		val2 = (val2 * calc(ii, MOD - 2, MOD)) % MOD;
	}

	ll val3 = 1;
	for (int ii = n - b + 1; ii <= n; ++ii){
		val3 = (val3 * ii) % MOD;
	}
	for (int ii = 2; ii <= b; ++ii){
		val3 = (val3 * calc(ii, MOD - 2, MOD)) % MOD;
	}

	// cout << val1 << endl;
	// cout << val2 << endl;
	// cout << val3 << endl;

	ll tmp = (MOD + val1 - val2) % MOD;
	// cout << tmp << endl;

	ll ans = (MOD + tmp - val3) % MOD;

	// ll tmp = mod((val1 % MOD) - (val2 % MOD), MOD);
	// ll ans = mod((tmp % MOD) - (tmp % MOD), MOD);

	cout << ans << endl;

	return 0;
}


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

template<typename T>
void fin (T a){
    cout<<a<<endl;
    exit(0);
}

template<typename S>
void print(S a){
    cout<<a<<endl;
}

template<typename U>
void pprint(U a){
    cout<<a;
}

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

    double n,x;
    int t;
    cin>>n>>x>>t;
    int ans;
    ans = ceil(n/x);
    ans *= t;

    print(ans);
    return 0;
}




Measured memory_bytes: 3732
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;

const double Pi = acos(-1);
const double EPS = 1e-9;
const int MAX_N = 55;

struct Circle
{
	double x;
	double y;
	double r;
	Circle() {}
	Circle(const double& x, const double& y, const double& r) :x(x), y(y), r(r) {}
};

struct Line
{
	double A;
	double B;
	double C;
};

double squ(const double& x);

void common_tangent(const Circle& c1, const Circle& c2);

Circle cir[MAX_N];
double mr[MAX_N];

Line checkL[17 * MAX_N * MAX_N];
int chcnt;

int C(const int& N, const Line& L);

int main()
{
	vector<int> aans;
	int N;
	while (true)
	{
		cin >> N;
		if (!N) break;

		chcnt = 0;

		for (int i = 0; i < N; ++i)
		{
			cin >> cir[i].x >> cir[i].y >> cir[i].r >> mr[i];
			
			Line& cur = checkL[chcnt++];
			cur.A = -1.0;
			cur.B = 0.0;
			cur.C = cir[i].x + cir[i].r + mr[i] * 0.5;
		}

		for (int i = 1; i < N; ++i)
		{
			for (int j = 0; j < i; ++j)
			{
				const Circle& curi = cir[i];
				const Circle& curj = cir[j];

				common_tangent(curi, curj);
				common_tangent(Circle(curi.x, curi.y, curi.r + mr[i]), curj);
				common_tangent(curi, Circle(curj.x, curj.y, curj.r + mr[j]));
				common_tangent(Circle(curi.x, curi.y, curi.r + mr[i]), Circle(curj.x, curj.y, curj.r + mr[j]));
			}
		}

		int ans = 0;
		for (int i = 0; i < chcnt; ++i)
		{
			int m = C(N, checkL[i]);
			if (m > ans)
			{
				ans = m;
			}
		}

		//cout << ans << '\n';
		aans.push_back(ans);
	}

	for (int i = 0; i < aans.size(); ++i)
	{
		cout << aans[i] << '\n';
	}
	
	return 0;
}

double squ(const double& x)
{
	return x * x;
}

void common_tangent(const Circle& c1, const Circle& c2)
{
	double tA = c1.x - c2.x;
	double tB = c1.y - c2.y;

	double m = sqrt(squ(tA) + squ(tB));

	for (int i = -1; i <= 1; i += 2)
	{
		for (int j = -1; j <= 1; j += 2)
		{
			double tC = i * c1.r + j * c2.r;
			double k = tC / m;
			if (-1.0 <= k && k <= 1.0)
			{
				double arcs = asin(k);
				double test = m * sin(arcs) - tC;
				double th = arcs - atan2(tA, tB);

				Line& cur = checkL[chcnt++];
				cur.A = c1.r * cos(th);
				cur.B = c1.r * sin(th);
				cur.C = i * squ(c1.r) - c1.x * cur.A - c1.y * cur.B;
			}
		}
	}

}

int C(const int& N, const Line& L)
{
	int res = 0;
	for (int i = 0; i < N; ++i)
	{
		const Circle& cur = cir[i];

		double d2 = squ(L.A * cur.x + L.B * cur.y + L.C) / (squ(L.A) + squ(L.B));
		if (squ(cur.r * (1 - EPS)) <= d2 && d2 <= squ((cur.r + mr[i]) * (1 + EPS)))
		{
			++res;
		}
	}
	return res;
}




Measured memory_bytes: 4060