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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define each(i,a) for (auto&& i : a)
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define chmin(x,v) x = min(x, v)
#define chmax(x,v) x = max(x, v)

const ll linf = 1e18;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    each(x,vec) is >> x;
    return is;
}
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
    rep(i,vec.size()) {
        if (i) os << " ";
        os << vec[i];
    }
    return os;
}
template<typename T>
ostream& operator<<(ostream& os, const vector< vector<T> >& vec) {
    rep(i,vec.size()) {
        if (i) os << endl;
        os << vec[i];
    }
    return os;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll h;
    const ll w = 5;
    while (cin >> h, h) {
        vector<vector<ll>> m(h, vector<ll>(w)); cin >> m;
        reverse(all(m));
        ll ans = 0;
        function<ll(ll,ll,ll,ll)> chain = [&](ll x, ll y, ll k, ll cnt) {
            if (k < 0 || x >= w || m[y][x] != k) return cnt;
            ll c = chain(x+1, y, k, cnt+1);
            if (c >= 3) {
                ans += m[y][x];
                m[y][x] = -1;
            }
            return c;
        };
        auto fall = [&]() {
            rep(y, h-1) rep(x, w) {
                if (m[y][x] < 0) {
                    m[y][x] = m[y+1][x];
                    m[y+1][x] = -1;
                }
            }
        };
        while (true) {
            bool is_updated = false;
            rep(y, h) rep(x, w) {
                if (chain(x, y, m[y][x], 0) >= 3) {
                    is_updated = true;
                }
            }
            if (!is_updated) break;
            rep(i, h) fall();
        }
        cout << ans << endl;
    }
}


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

using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;

#define ALL(x) x.begin(), x.end()

const llong inf = 1100100100100100ll;
const llong mod = 1e9+7;

int main() {
	string S;
	vector<llong> v(26, 0);
	cin >> S;
	for (auto x : S)
		v[x-'A']++;

	llong check = 0;
	for (auto x : v)
		check += x == 2;

	if (check == 2)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a), i##_max = (b); i < i##_max; ++i)
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()

using namespace std;

constexpr int INF = 1 << 30;
constexpr int MOD = 1000000007;

int main() {
  int N, R;
  int maxv = -INF;
  int minv;
  cin >> N >> minv;
  REP(i, N - 1) {
    cin >> R;
    maxv = max(maxv, R - minv);
    minv = min(minv, R);
  }

  cout << maxv << endl;
}



Measured memory_bytes: 3096
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
static const int INF (1<<30);

int main() {
  int N, K; cin >> N >> K;
  vector<int> h(N);

  int ans = 0;
  rep(i, N) {
    int x; cin >> x;
    if (x >= K) ans++;
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 640
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <utility>
#include <numeric>

using namespace std;

using ll = long long;
using ull = unsigned long long;

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

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


	int n;
	cin >> n;

	cout << double(((n + 1) / 2)) / n << endl;
}


Measured memory_bytes: 892
import numpy as np
N = int(input())
T,A = map(int, input().split())
Hs = input().split()
for i in range(N):
  Hs[i] = int(Hs[i])
Hs = np.array(Hs)

Ts = T - Hs*0.006

Ts_A = np.abs(Ts - A)

print(np.argmin(Ts_A)+1)

Measured memory_bytes: 14428
<?php
fscanf(STDIN, "%d%d", $H, $W);
for($y = 0; $y < $H; $y++){
    $map[$y] = str_split(fgets(STDIN));
    for($x = 0; $x < $W; $x++){
        if($map[$y][$x] == "#"){
            $list[$y][$x] = 1;
        }
    }
}
$count = 0;
$HM = $H - 1;
$WM = $W - 1;
while($list){
    $nextList = [];
    foreach($list as $y => $xs)foreach($xs as $x => $_){
        if($x && $map[$y][$x-1] == ".")$nextList[$y][$x-1] = $map[$y][$x-1] = 1;
        if($y && $map[$y-1][$x] == ".")$nextList[$y-1][$x] = $map[$y-1][$x] = 1;
        if($x < $WM && $map[$y][$x+1] == ".")$nextList[$y][$x+1] = $map[$y][$x+1] = 1;
        if($y < $HM && $map[$y+1][$x] == ".")$nextList[$y+1][$x] = $map[$y+1][$x] = 1;
    }
    $list = $nextList;
    if($list)$count++;
}
echo $count;


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

int main()
{
    int a,b,x,y,z,t;
    while(~scanf("%d%d",&a,&b))
    {
        x=a+b;
        y=a-b;
        z=a*b;
        if(x>y)
        {
            t=y;
            y=x;
            x=t;
        }
        if(y>z)
        {
            t=z;
            z=y;
            y=t;
        }
        printf("%d\n",z);
    }
    return 0;
}


Measured memory_bytes: 128
use std::cmp;
use std::io::{ self, Read };

fn main() {
    let mut input = String::new();
    io::stdin().read_to_string(&mut input).unwrap();
    let mut tokens = input.split_whitespace();

    let a: i64 = tokens.next().unwrap().parse().unwrap();
    let b: i64 = tokens.next().unwrap().parse().unwrap();
    let c: i64 = tokens.next().unwrap().parse().unwrap();

    let cands = [
        a + 10*cmp::max(b,c) + cmp::min(b,c),
        b + 10*cmp::max(c,a) + cmp::min(c,a),
        c + 10*cmp::max(a,b) + cmp::min(a,b),
    ];
    let ans = cands.iter().max().unwrap();

    println!("{}", ans);
}


Measured memory_bytes: 4352
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		int n = scan.nextInt();
		int m = scan.nextInt();
		int[] s = new int[m];
		int[] c = new int[m];

		for(int i=0;i<m;i++) {
			s[i] = scan.nextInt();
			c[i] = scan.nextInt();
		}


		for(int i=0;i<Math.pow(10, n);i++) {


			String g = String.valueOf(i);
			boolean flg = true;


			if(g.length() != n) {
				flg = false;
			}


			for(int j=0;j<m;j++) {

				if(g.length() < s[j]) {
					flg = false;
				}else {
				if(Integer.valueOf(g.substring(s[j]-1,s[j])) != c[j]) {
					flg = false;
				}
			}
		}

		if(flg) {
			System.out.println(i);
			return;
		}
		}
		System.out.println(-1);

		scan.close();

	}

}


Measured memory_bytes: 21844
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>


int main(void) {

    char buf[8];
    uint64_t N;
    uint64_t div3,div5,div15;
    uint64_t sum3,sum5,sum15;
    uint64_t sum;
    char *p;
    p = fgets(buf, 8, stdin);

    N = strtoul(p,0,0);

    sum = ((1+N)*N)/2;

    div3 = N /3;
    div5 = N/5;
    div15 = N/15;
    sum3 = (((1+div3) * div3) /2) * 3;
    sum5 = (((1+div5) * div5) /2) * 5;
    sum15 = (((1+div15) * div15) /2) * 15;
    
    printf("%lu\n", sum - sum3 - sum5 + sum15);

    return 0;
}


Measured memory_bytes: 1708
#[allow(unused_macros)]
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)*}
    };
}

#[allow(unused_macros)]
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)*}
    };
}

#[allow(unused_macros)]
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, bytes) => {
        read_value!($next, String).into_bytes()
    };

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

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

fn main() {
    input! {
        a: u64,
        b: u64,
    }

    let ans = ((f(a) ^ f(b) ^ a) & !1) ^ (((a + 1) / 2) % 2) ^ (((b + 1) / 2) % 2) ^ (a & 1);

    println!("{}", ans);
}

fn f(a: u64) -> u64 {
    let mut ret = 0;
    for i in 0..60 {
        let t = (a & !((1 << i) - 1)) | (1 << i);
        if a >= t {
            ret |= ((a - t + 1) % 2) << i;
        }

        // println!("{}: {}", i, t);
    }
    ret
}


Measured memory_bytes: 4352
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18+7;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    ll a,v,b,w,t;
    cin>>a>>v>>b>>w>>t;
    cout<<((v-w)*t>=abs(a-b)?"YES":"NO")<<endl;
    return 0;
}

Measured memory_bytes: 3640
N = int(input())
"""
dp[i][j] -> i番目の人間までみる。j人が積むときの最小値。

"""
HP = [list(map(int,input().split())) for _ in range(N)]
HP.sort(key=lambda x:x[0]+x[1])
dp = [float("INF")]*(N+1)
dp[0] = 0
for i in range(1,N+1):
    for j in range(N,0,-1):
        if dp[j-1] <= HP[i-1][0]:
            dp[j] = min(dp[j],dp[j-1]+HP[i-1][1])
for j in range(N,-1,-1):
    if dp[j] != float("INF"):
        print(j)
        break


Measured memory_bytes: 70480
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long ;
using P = pair<int,int> ;
using pll = pair<long long,long long>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e17;
constexpr int MOD = 1000000007;

int main(){
    vector<int> coin = {10,50,100,500};
    vector<int> a(4);
    bool firstdetection = true;
    while(1){
        int n;
        cin >> n;
        if(n==0) break;
        if(firstdetection){
            firstdetection = false;
        }else{
            cout << endl ;
        }
        rep(i,4) cin >> a[i];
        vector<int> ans(4);
        int rest = 0;
        rep(i,4) rest += a[i] * coin[i];
        rest -= n;

        vector<int> have(4);
        for(int i=3;i>=0;i--){
            have[i] = rest / coin[i];
            rest -= coin[i] * have[i];
        }

        rep(i,4){
            if(have[i] <= a[i]) ans[i] = a[i] - have[i] ;
            else ans[i] = 0;
        }

        rep(i,4){
            if(ans[i]==0) continue;
            cout << coin[i] <<" " << ans[i] << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 2992
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[][] a = new int[N][2];
		for(int i = 0;i < N;i ++) {
			for(int k = 0;k < 2;k ++) {
				a[i][k] = sc.nextInt();
			}
		}
		int sum = 0;
		for(int i = 0;i < N;i ++) {
			sum += a[i][1] - a[i][0] + 1;
		}
		System.out.print(sum);
	}
}

Measured memory_bytes: 24148
#pragma region
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue> 
#include <stack>
#include <set>
#include <list>

using namespace std;
typedef long long ll;
//#define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i))
#define rep(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define rrep(i, s) for (int(i) = (s) - 1; (i) >= 0; --(i))
#define all(x) x.begin(),x.end()
#pragma endregion

#pragma region GCD
ll gcd(ll a, ll b)
{
	if (a%b == 0)return b;
	return gcd(b, a%b);
}
#pragma endregion
#pragma region LCM
ll lcm(ll a, ll b)
{
	return (a*b) / gcd(a, b);
}
#pragma endregion

int main()
{
	ll n, m; cin >> n >> m;
	string s, t; cin >> s >> t;
	if (s[0] != t[0])
	{
		cout << -1 << endl;
	}
	else
	{
		int nd = n / gcd(n, m);
		int md = m / gcd(n, m);
		string a = "", b = "";
		for (int i = nd; i < n; i += nd)a += s[i];
		for (int i = md; i < m; i += md)b += t[i];
		if (a == b)cout << lcm(n, m) << endl;
		else cout << -1 << endl;
	}
}

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

int main() {
    int n;
    scanf("%d", &n);
    vector<int> m(n);
    for (int i=0; i<n; i++) {
        int a;
        scanf("%d", &a);
        m[a-1] = i;
    }
    //for (int i: m) printf("%d ", i);
    //printf("\n");
    set<int> s;
    long long ans = 0ll;
    for (int i=n-1; i>=0; i--) {
        int a, b, c, d, e;
        c = m[i];
        auto bt = s.lower_bound(c);
        if (bt==s.begin()) {
            b = -1;
            a = -1;
        } else {
            bt--;
            b = *bt;
            if (bt==s.begin()) {
                a = -1;
            } else {
                bt--;
                a = *bt;
            }
        }
        bt = s.upper_bound(c);
        if (bt==s.end()) {
            d = n;
            e = n;
        } else {
            d = *bt;
            bt++;
            if (bt==s.end()) {
                e = n;
            } else {
                e = *bt;
            }
        }
        //printf ("for i = %d, a = %d b = %d c = %d d = %d e = %d\n", (i+1), a, b, c, d, e);
        ans += (i+1)*(1ll*(b-a)*(d-c)+1ll*(e-d)*(c-b));
        //printf("ans = %lld\n", ans);
        s.insert(c);
    }
    printf("%lld\n", ans);
}

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

using namespace std;
// ascending order
#define vsort(v) sort(v.begin(), v.end())
// descending order
#define vsort_r(v) sort(v.begin(), v.end(), greater<int>())
#define vunique(v) unique(v.begin(), v.end())
#define mp make_pair
#define ts(x) to_string(x)
#define rep(i, a, b) for(int i = (int)a; i < (int)b; i++)
#define repm(i, a, b) for(int i = (int)a; i > (int)b; i--)
#define bit(a) bitset<8>(a)
#define des_priority_queue priority_queue<int, vector<int>, greater<int> >
#define all(v) (v).begin(), (v).end()
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1e18;

int N, A, B;
int h[100010];

bool C(ll T) {
	ll cnt = 0;
	rep(i, 0, N) {
		ll tmp = 1ll * h[i] - 1ll * B * T;
		if(tmp <= 0) continue;
		cnt += tmp / A;
		if(tmp % A) cnt++;
	}
	return cnt <= T;
}

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

	cin >> N >> A >> B;
	A -= B;
	rep(i, 0, N) cin >> h[i];

	int left = 0, right = 1e9;
	while(left + 1 != right) {
		ll mid = (left + right) / 2;
		if(C(mid)) right = mid;
		else left = mid;
	}

	cout << right << endl;
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
#define rep_i(i, n) for (int i = 0; i < (n); ++i)
#define rep_ll(i, n) for (long long i = 0; i < (n); ++i)
#define r_rep_i(i, start, end) for (int i = (start); i < (end); ++i)
#define r_rep_ll(i, start, end) for (long long i = (start); i < (end); ++i)
#define debug_vi(v) copy((v).begin(), (v).end(), ostream_iterator<int>(cout, " "));
#define debug_vll(v) copy((v).begin(), (v).end(), ostream_iterator<long long>(cout, " "));
#define debug_vd(v) copy((v).begin(), (v).end(), ostream_iterator<double>(cout, " "));
#define sort_v(v) sort((v).begin(), (v).end()); //昇順
#define d_sort_vi(v) sort((v).begin(), (v).end(), greater<int>()); //降
#define d_sort_vd(v) sort((v).begin(), (v).end(), greater<double>()); //昇順
#define say(t) cout << (t) << endl;
#define sum_vi(v) accumulate((v).begin(), (v).end(), 0);
#define sum_vll(v)accumulate((v).begin(), (v).end(), 0LL);

int main(){
  int n;cin >> n;
  vector<int> A(n);
  rep_i(i, n){
    cin >> A[i];
  }
  int m;cin >> m;
  vector<int> B(m);
  rep_i(i, m){
    cin >> B[i];
  }
  vector<int> C;

  set_difference(begin(A), end(A), begin(B), end(B), inserter(C, end(C)));
  rep_i(i, C.size()){
    say(C[i]);
  }
}


Measured memory_bytes: 5496
import java.util.*

fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

object Problem {
    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val L = sc.next().toInt()
        val R = sc.next().toInt()
        val d = sc.next().toInt()
        pw.println((R / d - (L-1) / d))
    }
}


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

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef set<int> si;
typedef map<string, int> msi;

#define rep(i, n) \
for(int i = 0; i <n; i++)
#define REP(i, a, b) \
for(int i = int(a); i <= int(b); i++)
#define TRvi(c, it) \
for(vi::iterator it = (c).begin(); it != (c).end(); it++)
#define TRvii(c, it) \
for(vii::iterator it = (c).begin(); it != (c).end(); it++)
#define TRmsi(c, it) \
for(msi::iterator it = (c).begin(); it != (c).end(); it++)

#define INF 2000000000

#define MEMSET_INF 127
#define MEMSET_HALF_INF 63

void solve(){
    int a;
    cin>>a;
    cout<<a+a*a+a*a*a<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}


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

using namespace std;
int main(){
  int d,e;
  while(1){
    cin>>d>>e;
    if(d+e==0)break;
    double a,min=1000000;
    for(int i=0;i<=d/2;i++){
      a=sqrt((d-i)*(d-i)+i*i);
      if(min>abs(e-a))min=abs(e-a);
    }
   cout<<min<<endl;
  }
  return 0;
}

Measured memory_bytes: 3204
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <queue>
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const LL INF = 1LL << 60;
const LL MaxN = 1e18;

LL x, y;

int main()
{
	//printf("%d\n", (int)log2(8));
	while(scanf("%lld %lld", &x, &y) != EOF)
	{
		int cnt = 0;
		while(x <= y && x <= MaxN) {
			x = x * 2;
			cnt++;
		}
		printf("%d\n", cnt);
	}
	return 0;
}

Measured memory_bytes: 128
def gcd(x, y):
	if x < y:
		x, y = y, x
	if y == 0:
		return x
	z = x % y
	return gcd(y, z) 
	
N=int(input())
prenum = 1
for i in range(N):
	T = int(input())
	lcm = prenum // gcd(prenum, T) * T
	prenum = lcm
print(lcm)

Measured memory_bytes: 3060
n = int(input())
lis = [1, 6, 36, 216, 1296, 7776, 46656,9, 81, 729, 6561, 59049]
lis.sort(reverse=True)
dp = [10 ** 10 for i in range(n+1)]
dp[0] = 0
for i in range(n):
  for num in lis:
    try:
      dp[i+num] = min(dp[i+num],dp[i]+1)
    except:
      continue
print(dp[n])

Measured memory_bytes: 3864
#include <bits/stdc++.h>
using namespace std;
#define rep(i,cc,n) for(int i=cc;i<n;i++)

int main() {
  long long int n,y;
  bool chk=false;

  cin >> n >> y;
  
  rep(i,0,n+1){
    rep(j,0,n-i+1){
      rep(k,0,n-i-j+1){
        if(y==(10000*i)+(5000*j)+(1000*k)){
          if(i+j+k!=n){break;}
          cout << i << " "<< j << " " << k << endl;
          chk = true;          
        }
      if(chk==true){break;}
      }
    if(chk==true){break;}  
    }
  if(chk==true){break;}  
  }
    
  if(chk==false){cout << -1 << " "<< -1 << " " << -1 << endl;}
  
  return 0;

}


Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <string>
using namespace std;
//
const int inf=1e9+7;
//
int GCD(int a,int b){
	return (b==0)?(a):(GCD(b,a%b));
}
int main(){
	int N,S;
	cin>>N>>S;
	if(N==1){
		int x;
		cin>>x;
		cout<<abs(S-x)<<endl;
		return 0;
	}
	vector<int> X(N+1);
	for(int i=0;i<N;i++){
		cin>>X[i];
	}
	X[N]=S;
	sort(X.begin(),X.end());
	int gcd=GCD(X[1]-X[0],X[2]-X[1]);
	for(int i=3;i<=N;i++){
		gcd=GCD(gcd,X[i]-X[i-1]);
	}
	cout<<gcd<<endl;
	return 0;
}

Measured memory_bytes: 640
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A, B, C, K, D, E, max = 0, max1;
		A = sc.nextInt();
		B = sc.nextInt();
		D = Math.max(A, B);
		C = sc.nextInt();
		E = Math.max(D, C);
		K = sc.nextInt();
		for (int i = 0; i < K; i++) {
			max = E * 2;
		}
		max1 = A + B + C - E;
		max1 += E * Math.pow(2.0, (double) K);
		System.out.println(max1);
		sc.close();
	}

}


Measured memory_bytes: 23764
import bisect


def put(a, b):  # 結果の表示
    l = max(len(a), len(b))  # aとbの長さが違うときに壊れるので以下で十分な長さの0を結合しておく
    a = "0" * l + a
    b = "0" * l + b
    s = ""
    for i in range(-1, -l-1, -1):  # 長さの偶奇を考えたくないので逆順に生成してあとで反転
        s += a[i] + b[i]
    s = s[-1::-1]  # 反転
    print(s[s.find("1"):])  # 頭にたくさんついている0を除いて表示


def quad(i):  # 数値を4進数表記の文字列に直す。16→"100"など。
    s = ""
    while i > 0:
        s += str(i % 4)
        i //= 4
    return s[-1::-1]


l = [0, 1]
for i in range(1, 20):  # 候補の生成。最長で20ビット。
    l += [4 ** i + j for j in l]

n = int(input())
if n == 0:  # n==0は出力が空文字になってしまうので別に扱う
    print("0")
else:
    for i in range(len(l)):
        ind = bisect.bisect_left(l, (l[i] - n) // 2)
        if l[i] - 2 * l[ind] == n:
            put(quad(l[i]), quad(l[ind]))
            break

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

#define rep(i,n) for(int i=0;i<n;i++)
typedef long long ll;
typedef pair<int,int> P;

int main(){
    int n;
    cin >> n;
    int a[n],b[n],c[n];
    rep(i,n) cin >> a[i] >> b[i] >> c[i];

    int dp[100005][3];
    dp[0][0] = a[0];
    dp[0][1] = b[0];
    dp[0][2] = c[0];

    for(int i=1;i<n;i++){
        dp[i][0] = max(dp[i-1][1]+a[i], dp[i-1][2]+a[i]);
        dp[i][1] = max(dp[i-1][0]+b[i], dp[i-1][2]+b[i]);
        dp[i][2] = max(dp[i-1][0]+c[i], dp[i-1][1]+c[i]);
    }

    int ans;
    ans = max( max(dp[n-1][0],dp[n-1][1]), dp[n-1][2]);
    cout << ans << endl;

}

Measured memory_bytes: 2560
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int d=sc.nextInt();
		int t=sc.nextInt();
		int s=sc.nextInt();
		int a=d/s;
		int b=d%s;
		if(a==t&&b==0) {
			System.out.println("Yes");
		}
		else if(a<t) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		sc.close();
	}
}

Measured memory_bytes: 35720
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using ll = long long;
const ll MOD = 1e9+7; int INF=INT_MAX; ll LLINF = 1LL << 60;
const vector<int> d8x = {1, 0, -1, 0, 1, -1, -1, 1}; vector<int> d8y = {0, 1, 0, -1, 1, 1, -1, -1};
const vector<int> d4x = {1, 0, -1, 0}; vector<int> d4y = {0, 1, 0, -1};

//

int main(){
    int n; cin>>n;
    vector<int> d(n);
    rep(i,n) cin>>d[i];
    int sum=0;
    for (int i = 0; i < n-1; i++)
    {
        for (int j = i+1; j < n; j++)
        {
            sum+=d[i]*d[j];
        }
        
    }
    cout<<sum<<endl;
}

Measured memory_bytes: 256
#include <stdio.h>
int main(void){
    // Your code here!
    int n,i;
    scanf("%d",&n);
    double g;
    for(i=1;i<50000;i++){
        g = i*1.08;
        if((int)g==n){
            printf("%d",i);
            return 0;
        }
    }
    printf(":(");
    return 0;
}


Measured memory_bytes: 128
#include<stdio.h>
int main()
{

    int N,i;
    double s,c=0;
    scanf("%d",&N);
    if(1<=N<=100)
    {
        for(i=1; i<=N; i++)
        {
            if(i%2!=0)
                c++;

        }
        s=(c/N);
        printf("%.10lf\n",s);
    }
}


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

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

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

  vector<vector<int>> v(n, vector<int>(2));
  rep(i, n){
    cin >> v.at(i).at(0) >> v.at(i).at(1);
  }

  double sum = 0;
  rep(i, n){
    rep(j, n){
      sum += sqrt((v.at(i).at(0)-v.at(j).at(0))*(v.at(i).at(0)-v.at(j).at(0)) + (v.at(i).at(1)-v.at(j).at(1))*(v.at(i).at(1)-v.at(j).at(1)));
    }
  }

  int p = n;
  int q = 1;
  while(p>0){
    q *= p;
    p--;
  }
  
  if(n!=1) q = q/(n-1);
  
  //cout << sum << endl;
  cout << fixed << setprecision(10);
  cout << double(sum/n);
}

Measured memory_bytes: 256
package main

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

func main() {
	resolve(parseProblem(os.Stdin))
}

func parseProblem(r io.Reader) (int, *bufio.Scanner) {
	const (
		initialBufSize = 100000
		maxBufSize     = 1000000
	)
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines

	return scanInt(sc), sc
}

func resolve(q int, sc *bufio.Scanner) {
	n := int(1e5)
	primes := eratosthenes(n + 2)
	acc := make([]int, n+2)
	sum := 0
	for i := 1; i <= n+1; i++ {
		acc[i] = sum
		if primes[i] && primes[(i+1)/2] {
			sum++
		}
	}
	res := []int{}
	for i := 0; i < q; i++ {
		l, r := scanInt(sc), scanInt(sc)
		res = append(res, acc[r+1]-acc[l])
	}
	for _, r := range res {
		fmt.Println(r)
	}
	return
}

func eratosthenes(n int) []bool {
	t := make([]bool, n)
	for i := 2; i < len(t); i++ {
		t[i] = true
	}
	for i := 2; i < len(t); i++ {
		if !t[i] {
			continue
		}
		for j := 2; j*i < len(t); j++ {
			t[j*i] = false
		}
	}
	return t
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}


Measured memory_bytes: 7704
# include "iostream"
# include "cstdio"

using namespace std;

const int maxm=1e5+10;

int N,A[maxm];

int main(){
	register int i,Ans=0;
	scanf("%d",&N);
	for(i=1;i<=N;i++) scanf("%d",A+i);
	for(i=1;i<=N;i++){
		if(A[i]<A[i-1]) continue;
		Ans+=(A[i]-A[i-1]);
	}
	printf("%d",Ans);
	return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){
  int a[3],b[3],c[3],d[3],e[3],max;
  scanf("%d\n%d\n%d\n%d\n%d",&a[0],&b[0],&c[0],&d[0],&e[0]);
  a[1]=((a[0]-1)/10+1)*10;
  b[1]=((b[0]-1)/10+1)*10;
  c[1]=((c[0]-1)/10+1)*10;
  d[1]=((d[0]-1)/10+1)*10;
  e[1]=((e[0]-1)/10+1)*10;
  a[2]=(a[0]-1)%10+1;
  b[2]=(b[0]-1)%10+1;
  c[2]=(c[0]-1)%10+1;
  d[2]=(d[0]-1)%10+1;
  e[2]=(e[0]-1)%10+1;
  if(a[2]>b[2]){
    max=b[2];
  }else{
    max=a[2];
  }
  if(max>c[2]){
    max=c[2];
  }
  if(max>d[2]){
    max=d[2];
  }
  if(max>e[2]){
    max=e[2];
  }
  printf("%d",a[1]+b[1]+c[1]+d[1]+e[1]+max-10);
  return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<cstdint>
using namespace std;

const uint64_t kP = 1000000007;

int main()
{
  string s;
  uint64_t dp[100100][13];

  cin >> s;
  const uint64_t n = s.size();

  dp[n][0] = 1;
  uint64_t d = 1;
  for (int64_t i = n-1; i >= 0; --i) {
    const uint64_t c = (s[i] == '?') ? 100 : (s[i] - '0');
    for (uint64_t j = 0; j < 10; ++j) {
      if (c != 100 && c != j) continue;
      for (uint64_t k = 0; k < 13; ++k) {
        dp[i][(j * d + k) % 13] += dp[i+1][k];
        dp[i][(j * d + k) % 13] %= kP;
      }
    }
    d *= 10;
    d %= 13;
  }

  cout << dp[0][5] << endl;

  return 0;
}




Measured memory_bytes: 10624
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 62;
const long long MOD = 1e9+7;
char arr[4][MAXN];
int grid[4][MAXN];
long long ans;
long long mx;
long long res;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin>>n;
    for(int i=1;i<=2;i++){
        for(int j=1;j<=n;j++){
            cin>>arr[i][j];
        }
    }
    long long ans = 3;
    for(int i=1;i<=2;i++){
        for(int j=1;j<=n;j++){
            if(arr[i][j] == arr[i+1][j]){
                
                grid[i][j] = 0;
                grid[i+1][j] = 0;
            }
            if(arr[i][j] == arr[i][j+1]){
                
                grid[i][j] = 1;
                grid[i][j+1] = -1;
            }
        }
    }
   if(arr[1][1] == arr[2][1]){
       //cout<<grid[1][1]<<" "<<grid[2][1]<<endl;
       ans = 3;
   }else{
       ans = 6;
   }
    int i = 1;
        for(int j=2;j<=n;j++){
            if(grid[i][j] == 0 && grid[i][j-1] == 0){
                
                ans*=1LL*2;
                ans%=MOD;
            }else if(grid[i][j] == 1){
                if(grid[i][j-1] == 0){
                   
                    ans*=1LL*2;
                    ans%=MOD;
                    continue;
                }
                
                ans*=1LL*3;
                ans%=MOD;
            }
        }
        cout<<ans<<endl;
    
}

Measured memory_bytes: 256
def get_prime(x):
    l = [True] * (x + 1)
    l[0] = False
    l[1] = False
    for i in range(2,int(x**0.5) + 1):
        if not l[i]:
            continue
        for j in range(i * 2, x + 1, i):
            l[j] = False
    return l        
q=int(input())
table = get_prime(100000)
s=[0]*(100001)

for i in range(100000):
    if table[i] and table[(i+1)//2]:
        s[i] = 1

for i in range(100000):        
    s[i+1] += s[i]

for i in range(q):
    l,r=map(int,input().split())
    print(s[r]-s[l-1])

Measured memory_bytes: 7156
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cmath>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
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; }

int main() {
  int n;
  cin >> n;
  vector<int> a(n), b(n);
  ll asum = 0, bsum = 0;
  rep(i, n) {
    cin >> a[i];
    asum += a[i];
  }
  rep(i, n) {
    cin >> b[i];
    bsum += b[i];
  }
  if (asum < bsum) {
    cout << -1 << endl;
    return 0;
  }
  ll diff = 0;
  vector<ll> rem;
  int ans = 0;
  rep(i, n) {
    if (a[i] < b[i]) {
      diff += b[i]-a[i];
      ans++;
    }
    else if (a[i] > b[i])
      rem.push_back(a[i]-b[i]);
  }
  if (diff) {
    sort(rem.rbegin(), rem.rend());
    rep(i, rem.size()-1)
      rem[i+1] += rem[i];
    rep(i, rem.size()) {
      if (rem[i] >= diff) {
        ans += i+1;
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 1660
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

int main() {
    int n, k, c; cin >> n >> k >> c;
    string s; cin >> s;
    if (n == 200000) s[-1];
    vector<int> dp(n, 0), dp2(n, 0); // i日目までで働く日数の最大値
    dp[0] = (s[0] == 'o' ? 1 : 0);
    dp2[n - 1] = (s[n - 1] == 'o' ? 1 : 0);
    for (int i = 1; i < n; i++) {
        dp[i] = dp[i - 1];
        if (s[i] == 'o') {
          if (i >= c + 1) dp[i] = max(dp[i], dp[i - c - 1] + 1);
          else dp[i] = (s[i] == 'o' ? 1 : 0);
        }
    }
    for (int i = n - 2; i >= 0; i--) {
        dp2[i] = dp2[i + 1];
        if (s[i] == 'o') {
          if (i + c + 1 < n) dp2[i] = max(dp2[i], dp2[i + c + 1] + 1);
          else dp2[i] = (s[i] == 'o' ? 1 : 0);
        }
    }
    vector<int> ans;
    for (int i = 0; i < n; i++) {
        int sum = 0;
        if (i >= 1) sum += dp[i - 1];
        if (i + 1 < n) sum += dp2[i + 1];
        if (sum < k) {
            ans.push_back(i);
        }
    }
    //dump(dp);
    //dump(dp2);
    for (int i = 0; i < ans.size(); i++) {
        cout << ans[i] + 1 << endl;
    }
    return 0;
}


Measured memory_bytes: 4216
n = gets.to_i
t = [0]
x = [0]
y = [0]
n.times do |i|
  args = gets.split(' ').map(&:to_i)
  t[i+1] = args[0]
  x[i+1] = args[1]
  y[i+1] = args[2]
end

enable = true
n.times do |i|
    dt = (t[i + 1] - t[i]).abs
    dest = (x[i + 1] - x[i]).abs + (y[i + 1] - y[i]).abs
    if dest > dt || (dest % 2 != dt % 2) 
      enable = false
      break
    end
end

puts enable ? 'Yes' : 'No'


Measured memory_bytes: 4200
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#define DIVCEIL(A,B) ((A+(B-1))/B)
using namespace std;

const long long MOD = 1000000007;

void solve(long long N, std::vector<long long> A){
    vector<long long> cnts(N);
    for(auto a:A)cnts[a]++;
    auto ans= 1ll;
    if(N%2==1){
        if(cnts[0]!=1)ans=0;
        for(int i=1; i<N; i++){
            if(i%2==0 && cnts[i]!=2)ans*=0;
            if(i%2==1 && cnts[i]!=0)ans*=0;
            if(i%2==0)ans = (2*ans)%MOD;
        }
    }else{
        if(cnts[0]!=0)ans=0;
        for(int i=1; i<N; i++){
            if(i%2==0 && cnts[i]!=0)ans*=0;
            if(i%2==1 && cnts[i]!=2)ans*=0;
            if(i%2==1)ans = (2*ans)%MOD;
        }
    }
    cout << ans << endl;
}

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


Measured memory_bytes: 1792
#include<bits/stdc++.h>
#define ll long long
#define pii pair<ll,ll> 
#define mp make_pair
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fi first
#define se second
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
int n;
pii x[100005];
int rit[100005];
ll dp[100005];
priority_queue<pii,vector<pii>,greater<pii> > pq;
int main(){
    scanf("%d",&n);
    for(int i=1;i<=n;i++) scanf("%I64d %I64d",&x[i].fi,&x[i].se),pq.push(mp(x[i].fi+x[i].se,i));
    int maxr=-1000000007,num=0;
    while(!pq.empty()){
        pii now=pq.top();
        pq.pop();
        if(x[now.se].fi-x[now.se].se<maxr) continue;
        num++;
        maxr=now.fi;
    }
    cout<<num<<endl;
    return 0;
}

Measured memory_bytes: 3444
n = int(input())
aa = list(map(int,input().split())) #順番
a = list(x - 1 for x in aa) 
b = list(map(int,input().split())) #点
c = list(map(int,input().split())) #追加点

ans = 0
for i in range(n):
    ans += b[a[i]] 

for i in range(1,n):
    
    if (a[i] == a[i-1] + 1): #今回と前回+1
        ans += c[a[i-1] ]
    
print(ans)

Measured memory_bytes: 38256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define rREP(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,n) for(ll i = 0; i < n; i++){ cout << (x[i]) << " ";} cout<<endl;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int sx, sy, tx, ty; cin >> sx >> sy >> tx >> ty;
    string string01 = string(tx-sx, 'R') + string(ty-sy, 'U');
    string string02 = string(tx-sx, 'L') + string(ty-sy, 'D');
    cout << string01<<string02<<'D'<<'R'<<string01 << 'U' << 'L' << 'U' << 'L' <<string02<<'D'<<'R'<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0;i<int(N);++i)
using ll = long long;
const int INF = 2147483647;
const ll MOD = 1e9+7;
// const ll INF = 1000000000000000000LL;

 // 素因数分解
 // 素因数(1は含まない)の値と数をペア型のvectorに入れる
 vector<pair<long long, long long> > prime_factorize(long long n) {
     vector<pair<long long, long long> > res;
     for (long long p = 2; p * p <= n; ++p) {
         if (n % p != 0) continue;
         int num = 0;
         while (n % p == 0) { ++num; n /= p; }
         res.push_back(make_pair(p, num));
     }
     if (n != 1) res.push_back(make_pair(n, 1));
     return res;
 }

 //使い方
 int main() {
     ll n;
     cin >> n;
		 ll ans = 1;
		 vector<int> array(1000);
			while(n){
     		auto pf = prime_factorize(n);
				rep(i,pf.size()){
					array[pf[i].first-1] += pf[i].second;
				}
				n--;
				if(n==1) break;
		}
		rep(i,1000){
			if(array[i]!=0){
				ans *= array[i]+1;
				ans %= MOD;
			}
		}
	cout << ans << endl;
 }

Measured memory_bytes: 3596
/* author: rennan rocha
 * time: $%y%$-$%m%$-$%d%$ $%h%$:$%m%$:$%s%$
**/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define f first
#define s second
#define pb push_back
#define mp make_pair

#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define pi pair<int,int>
#define pll pair<ll, ll>
#define vpi vector<pi>
#define vpll vector<pll>

#define inf 1e18
#define mod 1000000007

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//*find_by_order(); order_of_key();

int main() {
    ios_base::sync_with_stdio(false);

    int k;
    cin >> k;
    int a, b;
    cin >> a >> b;

    for(int i = a; i <= b; i++) {
        if(i%k==0) {
            cout << "OK\n";
            return 0;
        }
    }
    cout << "NG\n";
}


Measured memory_bytes: 3640
#include<bits/stdc++.h>
using namespace std;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pl;

#define sl(x) scanf("%lld",&x)
#define pl(x) printf("%lld\n",x)
#define sz(x) ((int)x.size())
#define s(x) sort(x.begin(),x.end())
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define f(i,n) for(int i=0;i<n;i++)
#define rep(i,a,b) for(int i=a;i<=b;i++)

const ll mod = 1000000007;
const ll inf = (ll)5e16;
const ld eps = 1e-12;
const ll N = 1000005;
const ll LOGN = 19;
const ld PI = 3.14159265358979323846;
ll mul(ll a, ll b, ll m) { return (ll)(a * b) % m;}
ll add(ll a, ll b, ll m) { a += b; if(a >= m) a -= m; if(a < 0) a += m; return a;}
ll power(ll a, ll b, ll m) { if(b == 0) return 1; if(b == 1) return (a % m); ll x = power(a, b / 2, m); x = mul(x, x, m); if(b % 2) x = mul(x, a, m); return x;}

int main()
{
    ios_base::sync_with_stdio(0);
    ll a, b, c;
    cin >> a >> b >> c;
    if(c >= a && c <= b)
    {
        cout << "Yes\n";
        return 0;
    }
    cout << "No\n";
    return 0;
}


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


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

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();

        // ビジネスロジックここから
        int x = scanner.nextInt();
        int a = scanner.nextInt();
        
        if (x < a) {
        	System.out.println(0);
        }
        else {
        	System.out.println(10);
        }
        
        // ビジネスロジックここまで

    }

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

Measured memory_bytes: 20564
#include "bits/stdc++.h"
using namespace std;

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

    const auto tax_a = 0.08;
    const auto tax_b = 0.1;

    const auto min_a = 13;
    const auto min_b = 10;
    const auto max_a = 1300;
    const auto max_b = 1000;

    auto ans = -1;

    for (auto i = 1; i < max_a; i++)
    {
        auto aw = floor(i * tax_a);
        auto bw = floor(i * tax_b);
        if (aw == a && bw == b)
        {
            ans = i;
            break;
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define mem(i, j) memset(i, j, sizeof(i))
#define rep(i, j, k) for(int i = j; i <= k; i++)
#define dep(i, j, k) for(int i = k; i >= j; i--)
#define pb push_back
#define make make_pair
#define INF INT_MAX
#define inf LLONG_MAX
#define PI acos(-1)
using namespace std;

const int N = 1e6 + 5;

const LL mod = 1e9 + 7;

LL ksm(LL a, LL b) { LL ans = 1LL; while(b) { if(b & 1) ans = ans * a % mod; a = a * a % mod; b >>= 1; }  return ans; }

char a[N];

void solve() {

    int n;
    scanf("%d", &n);

    printf("%.12f\n", (double)(n * n * n) / 27.0);

}


int main() {
//    int _; scanf("%d", &_);
//    while(_--) solve();

    solve();

    return 0;
}


Measured memory_bytes: 384
#include <algorithm>
#include <cmath>
#include <vector>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <ctype.h>
#include <climits>
#include <queue>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i = 0; i < (ll)(n); ++i)
template<class T> inline bool chmax(T& a, T b) { if(a < b){ a=b; return 1; } return 0;}
template<class T> inline bool chmin(T& a, T b) { if(a > b){ a=b; return 1; } return 0;}

int D[1000005];
int prime[1000005];

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


int main(){
	int n;
	cin >> n;
	vector<int> a(n);
	int wholegcd=0,maxA=0;
	REP(i,n){
		cin >> a[i];
		chmax(maxA, a[i]);
		if(i==0) wholegcd = a[i];
		else wholegcd = GCD(wholegcd, a[i]);
	}
	
	
	for(int i=0; i<=maxA; i++){
		D[i] = 0;
		prime[i] = 0;
	}
	
	D[1] = 1;
	for(int i=2; i<=maxA; i++){
		if(D[i]!=0) continue;
		D[i] = i;
		for(int j=i; (ll)i*j<=maxA; j++){
			if(D[i*j]==0) D[i*j] = i;
		}
	}
	
	bool pairwise=true;
	REP(i,n){
		if(a[i]==1) continue;
		int now = a[i];
		bool exitloop=false;
		
		set<int> p;
		while(D[now]!=now){
			p.insert(D[now]);
			now /= D[now];
		}
		if(now != 1)p.insert(now);
		
		for(int x:p){
			if(prime[x]==1){
				exitloop = true;
				break;
			}else{
				prime[x] = 1;
			}
		}
		
		if(exitloop){
			pairwise = false;
			break;
		}
	}
	
	
	if(pairwise){
		cout << "pairwise coprime" << endl;
	}else if(wholegcd==1){
		cout << "setwise coprime" << endl;
	}else{
		cout << "not coprime" << endl;
	}
		
	
	return 0;
}

Measured memory_bytes: 14880
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const LL INF = 1LL << 60;

int a[7];

int main()
{
	for(int i = 1; i <= 3; i++)
		scanf("%d", &a[i]);
	sort(a + 1, a + 4);
	//for(int i = 1; i <= 3; i++)
	//	printf("%d ", a[i]);
	int X = a[3] - a[1];
	int Y = a[3] - a[2];
	int ans = 0;
	ans = (Y + ((X - Y + 1) / 2));
	if(((X - Y) % 2) == 1) ans++;
	printf("%d\n", ans);
	return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
#define rep(i,n) for(int i=0;i<n;i++)
#define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; 
#define INF 1000000000
#define mod 1000000007
typedef long long ll;
const ll LINF = 1001002003004005006ll;
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
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; }
#define int ll

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

    vector<pair<int,int>> ans;
    ll n;cin>>n;
    vector<ll> a(n);
    ll M=-LINF,m=LINF,Midx,midx;
    rep(i,n){
        cin>>a[i];
        if(M<a[i]){
            Midx=i;
            M=a[i];
        }
        if(m>a[i]){
            midx=i;
            m=a[i];
        }
    }
    bool p=true;
    if(M>=0&&m>=0){
        
    }
    else if(M<=0&&m<=0){
        p=false;
    }
    else{
        if(abs(M)>=abs(m)){
            rep(i,n){
                if(a[i]<0){
                    a[i]+=M;
                    ans.push_back(make_pair(Midx,i));
                }
            }
        }
        else{
            p=false;
            rep(i,n){
                if(a[i]>0){
                    a[i]+=m;
                    ans.push_back(make_pair(midx,i));
                }
            }
        }
    }
    //debug(a);
    //全部正
    if(p){
        for(int i=1;i<n;i++){
            if(a[i]>=a[i-1]) continue;
            bool f=false;
            for(int j=0;j<=i;j++){
                if(a[i]+a[j]>=a[i-1]){
                    f=true;
                    ans.push_back(make_pair(j,i));
                    a[i]+=a[j];
                    break;
                }
            }
            assert(f);
        }
    }
    //全部負
    else{
        for(int i=n-2;i>=0;i--){
            if(a[i+1]>=a[i]) continue;
            bool f=false;
            for(int j=n-1;j>=i;j--){
                if(a[i]+a[j]<=a[i+1]){
                    f=true;
                    ans.push_back(make_pair(j,i));
                    a[i]+=a[j];
                    break;
                }
            }
            assert(f);
        }
    }
    //debug(a);
    cout<<ans.size()<<endl;
    for(auto x:ans){
        cout<<x.first+1<<' '<<x.second+1<<endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include<vector>
#include<map>
using namespace std;
int main(void){
    // Your code here!
   int r,c,k, count=0,ans=0;
   cin>>r>>c>>k;
   
   vector<vector<char>> vec(r, vector<char>(c));
   char ch;
   for(int i=0;i<r;i++)
    for(int j=0;j<c;j++){
        cin>>ch;
        vec[i][j]=ch;
    }
            

    for(int i=0;i<(1<<r);i++)
        for(int j=0;j<(1<<c);j++){
            count=0;
            for(int ir=0;ir<r;ir++){
                for(int ic=0;ic<c;ic++){
                    if(i>>ir&1) continue;
                    if(j>>ic&1) continue;
                    if(vec[ir][ic]=='#') count++;
                                        
                }
            }
                if(count==k)
                    ans++;
        }
    cout<<ans;
}


Measured memory_bytes: 3192
#include<stdio.h>

int main(void){
    int i,cnt = 0,max = 0;
    char s[4];

    scanf("%s",s);

    if(s[0] == 'R' && s[1] == 'R' && s[2] == 'R')
        printf("3\n");
        else if(s[0] == 'R' && s[1] == 'R')
            printf("2\n");
            else if(s[1] == 'R' && s[2] == 'R')
                printf("2\n");
            else if(s[0] == 'R' || s[1] == 'R' || s[2] == 'R')
                printf("1\n");
                else printf("0\n"); 

    return 0;

}

Measured memory_bytes: 1640