akhauriyash/Code-Regression huggingface dataset:
use std::io::*;
use std::str::FromStr;

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

fn reverse_index(dice_index: usize) -> usize {
    match dice_index {
        0 => return 5,
        1 => return 4,
        2 => return 3,
        3 => return 2,
        4 => return 1,
        5 => return 0,
        _ => return 0,
    }
}

fn update_dice_index(
    dice_top: usize,
    dice_front: usize,
    dice_right: usize,
    direct: char,
) -> (usize, usize, usize) {
    match direct {
        'N' => return (dice_front, reverse_index(dice_top), dice_right),
        'W' => return (dice_right, dice_front, reverse_index(dice_top)),
        'S' => return (reverse_index(dice_front), dice_top, dice_right),
        'E' => return (reverse_index(dice_right), dice_front, dice_top),
        _ => return (0, 0, 0),
    }
}

fn main() {
    let mut dice: Vec<u8> = vec![];
    let mut last_dice_top: usize = 0;
    let mut last_dice_front: usize = 1;
    let mut last_dice_right: usize = 2;

    for _ in 0..6 {
        let number: u8 = read();
        dice.push(number);
    }

    let directs: String = read();
    for direct in directs.chars() {
        let (dice_top, dice_front, dice_right) =
            update_dice_index(last_dice_top, last_dice_front, last_dice_right, direct);
        last_dice_top = dice_top;
        last_dice_front = dice_front;
        last_dice_right = dice_right;
    }
    println!("{}", dice[last_dice_top]);
}



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

const int Max1 = 10005;
const int Max2 = 505;
int S[Max1], T[Max2];
vector<int> a;

void Linear(int S[], int T[], int ns, int nt)
{
    for(int i=0; i<nt; i++)
    {
        /*
        for(int j=0; j<ns; j++)
        {
            if(S[j]==T[i])
            {
                a.push_back(S[j]);
                break;
            }
        }
        */
        int j=0;
        while(T[i]!=S[j] && j<ns) j++;
        if(j!=ns) a.push_back(S[j]);
    }
}

int main()
{
    int ns, nt;
    cin >> ns;
    for(int i=0; i<ns; i++)
        cin >> S[i];
    cin >> nt;
    for(int i=0; i<nt; i++)
        cin >> T[i];
    Linear(S, T, ns, nt);
    cout << a.size() << endl;
    return 0;
}



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

#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl
#define rep(i, n) for (int i = (int)(0); i < (int)(n); i++)
#define repp(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define all(v) v.begin(), v.end()
#define dump(v)                  \
    cerr << #v ":[ ";            \
    for (auto macro_vi : v) {    \
        cerr << macro_vi << " "; \
    }                            \
    cerr << "]" << endl;
using lint       = long long;
const int INF    = 1e9;
const lint LINF  = 1e18;
const lint MOD   = 1e9 + 7;
const double EPS = 1e-10;

const int mod = 1000000007;
struct mint {
    long long x;
    mint(long long x = 0) : x((x % mod + mod) % mod) {}
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(long long t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const { return pow(mod - 2); }
    mint& operator/=(const mint a) { return (*this) *= a.inv(); }
    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};

struct combination {
    vector<mint> fact, ifact;
    combination(int n) : fact(n + 1), ifact(n + 1) {
        assert(n < mod);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i)
            fact[i] = fact[i - 1] * i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i)
            ifact[i - 1] = ifact[i] * i;
    }
    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n - k];
    }
    mint operator()(int n) { return fact[n]; }
};

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n, 1);
    rep(i, n) { cin >> a[i]; }
    sort(all(a));
    vector<mint> A(n, mint(0));
    rep(i, n) { A[i] = mint(a[i]); }

    combination comb(n + 10);
    mint ans = 0;
    for (int i = 0; i < A.size(); i++) {
        ans += A[i] * comb(i, k - 1);
    }
    for (int i = 0; i < A.size(); i++) {
        ans -= A[i] * comb(n - (i + 1), k - 1);
    }
    cout << ans.x << endl;
    return 0;
}

Measured memory_bytes: 2944
#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    assert_eq!(!0usize, std::usize::MAX); //🙊
    assert!(0 == 0); //😇
    let mut c = vec![INF; 26];

    let n = io.read::<usize>();
    for _ in 0..n {
        let s = io.chars();
        let mut cs = vec![0; 26];
        for &c in &s {
            let cti = (c as u8 - b'a') as usize;
            cs[cti] += 1;
        }
        for i in 0..26 {
            c[i] = min(c[i], cs[i]);
        }
    }

    for i in 0..26 {
        if c[i] > 0 {
            for j in 0..c[i] {
                io.write((b'a' + i as u8) as char);
            }
        }
    }
    io.writeln("");
}

static MX: usize = 1010101;
static MOD: i64 = 1000000007;
static INF: i64 = std::i64::MAX >> 1;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn chari(&mut self) -> Vec<i64> {
        self.chars()
            .iter()
            .map(|&c| (c as u8 - b'0') as i64)
            .collect::<Vec<i64>>()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


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


int main()
{
    int A, B;
    cin >> A >> B;

    int count = 0;
    for (int i = A; i <= B; i++) {
        string str = to_string(i);
        string reStr = to_string(i);
        reverse(reStr.begin(), reStr.end());
        if (str == reStr) {
            count++;
        }
    }
    
    cout << count << endl;
    
    return 0;
}

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

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

	int ncp = n;
	int sum = 0;
	while (ncp)
	{
		sum += ncp % 10;
		ncp = ncp / 10;
	}

	if (n % sum == 0)
	{
		cout << "Yes";
	}
	else
	{
		cout << "No";
	}
	cout << "\n";
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define repA(i, a, n) for(ll i = a; i <= (n); ++i)
#define repD(i, a, n) for(ll i = a; i >= (n); --i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (long long) (x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
#define endl '\n'
#define MAXN 5000000
const long double PI = 3.141592653589793238462643383;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long int> vll;
typedef vector<double> vd;
typedef vector<pii> vii;
const long long mod = 1000000007;
int Ceil(int a, int b){
    if(a%b==0) return a/b;
    else return (a/b)+1;
}

int main(){
 
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);   
    freopen("output.txt", "w", stdout);
    #endif
    cin.sync_with_stdio(0); cin.tie(0);
    cin.exceptions(cin.failbit);
    ll n,m;
    cin>>n>>m;
    for(int i = 0;i<m;i++){
        ll x;
        cin>>x;
        n-= x;
    }
    if(n>=0)
        cout<<n;
    else
        cout<<-1;
    return 0;
}

Measured memory_bytes: 3640
x = int(input())
y = input().split()
z = input().split()
a = input().split()

point = 0
tmp = 100

for i in y:
  point += int(z[int(i)-1])
  if tmp == (int(i)-2):
    point += int(a[int(i)-2])
  tmp = int(i)-1
print(point)


Measured memory_bytes: 3060
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int m = sc.nextInt();
    int k = sc.nextInt();
    String ans = "No";
    for(int i = 0; i <= n; i++) {
      for(int j = 0; j <= m; j++) {
        if(((n - i) * j + (m - j) * i) == k) {
          ans = "Yes";
          break;
        }
      }
    }
    System.out.println(ans);
  }
}

Measured memory_bytes: 22608
#include "iostream"
#include "algorithm"
#include "string"
#include "vector"
#include "cmath"
using namespace std;
int main() {
	int x, a, b;
	cin >> x >> a >> b;
	if (abs(x - a) < abs(x - b))
		cout << 'A' << endl;
	else cout << 'B' << endl;
	return 0;
}

Measured memory_bytes: 256
#include <array>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>
using namespace std;


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

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
	stringstream ss;
	ss << f;
	ss >> t;
}


#define REP(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define RALL(v) (v).rbegin(),(v).rend()
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define PB push


#define MOD 1000000007LL
#define EPS 1e-10

int main()
{
    int N;
    cin >> N;
    int four = 0;
    int two = 0;
    int other = 0;
    int a;
    REP(i, N)
    {
        cin >> a;
        if (a % 4 == 0)
        {
            ++four;
        }
        else if (a % 2 == 0)
        {
            ++two;
        }
        else
        {
            ++other;
        }
    }
    bool yes = four >= (other + (two > 0 ? 1 : 0) - 1);
    cout << (yes ? "Yes" : "No") << endl;
    return 0;
}


Measured memory_bytes: 256
#!/usr/bin/python3
# -*- coding: utf-8 -*-


Likes = set()


def check(n):
  global Likes
  while n > 0:
    if n%10 not in Likes:
      return False
    else:
      n //= 10
  return True    

def main():
  global Likes
  N,K = map(int, input().split())
  Dn = list(map(int, input().split()))
  Likes = set(range(10))-set(Dn)
  while True:
    if check(N):
      return N
    else:
      N += 1

if __name__ == "__main__":
  print(main())

Measured memory_bytes: 3064
#include <iostream>
#include <string>

void solve() {
    std::string s, t;
    std::cin >> s >> t;
    t.pop_back();
    std::cout << (s == t ? "Yes" : "No") << std::endl;
}

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

    solve();

    return 0;
}


Measured memory_bytes: 3616
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)

int main(){
    ll a, b;
    cin >> a >> b;
    rep(i, 0, max(a,b)) cout << min(a,b);
    cout << endl;
    return 0;   
}

Measured memory_bytes: 256
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
}
for (int i=n-1; i>0; i--) {
    System.out.print(a[i] + " ");
}
System.out.println(a[0]);
sc.close();
}
}


Measured memory_bytes: 26332
#include<cstdio>
#include<cmath>
#include<vector>
#include<algorithm>
#include<numeric>
int main() {
	using i64 = long long int;
	i64 n, q;
	scanf("%lld%lld", &n, &q);
	std::vector<i64> a(n), x(q), ans(q),index(q);
	i64 sum = 0;
	for (i64 i = n;i--;) {
		scanf("%lld", &a[i]);
	}
	for (i64 i = 0;i < n;i += 2) {
		sum += a[i];
	}
	for (auto &e : x) {
		scanf("%lld", &e);
	}
	std::iota(index.begin(), index.end(), 0);
	std::sort(index.begin(), index.end(),
		[&x](i64 l, i64 r) {return x[l] > x[r];});
	i64 l = 0, r = 0;
	for (const auto i : index) {
		while (r < n&&std::abs(a[l] - x[i]) >= std::abs(a[r] - x[i])) {
			sum -= a[r];
			sum += a[l];
			l += 1;
			r += 2;
		}
		ans[i] = sum;
	}
	for (const auto &e : ans) {
		printf("%lld\n", e);
	}
	return 0;
}


Measured memory_bytes: 4864
'''
n = int(input())
n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [int(input()) for i in range n]
p = [list(map(int, input().split()))]

a = input()
a, b = input().split()
a = [input() for i in range n]
'''
n = int(input())
a = [input() for i in range(n)]

ans = []

import collections
counter = collections.Counter(a)

max_h = max(counter.values())


for i in counter.items():
    #print(i)
    if i[1] == max_h:
        ans.append(i[0])
    else:
        pass

ans.sort()

[print(i) for i in ans]


Measured memory_bytes: 35472
/*You must start someday...*/

#include <bits/stdc++.h>
using namespace std;

#define EPS (1e-9)
#define ll long long int
#define ull unsigned long long
#define pi (acos(-1.0))
#define endl "\n"
#define all(v) v.begin(),v.end()
#define printa(a,L,R) for(int i=L;i<R;i++) cout<<a[i]<<(i==R-1?'\n':' ')
#define precise(n) cout << fixed << setprecision(n)
#define show(a) cout << (#a) << " is " << (a) << endl;
#define pcase cout<<"Case "<<++cs<<": "
#define FAST ios_base::sync_with_stdio(0); cin.tie(0);
const int mod=1e9+7;
const int mx=1e5+10;


int main(int argc, char const *argv[])
{
    FAST
    int n,k;
    cin >> n >> k;
    std::vector<int> arr(n);
    int dp[k+10]={0};
    for (int i = 0; i < n; ++i)
    {
    	cin >> arr[i];
    }
   	//dp[i]=true if the first person turn is in i
   	for (int stones = 0; stones <=k; ++stones)
   	{
   		//show(stones);
   		for(int x: arr)
   		{
   			if(stones>=x && !dp[stones-x])
   			{
   				//show(stones-x);
   				dp[stones]=1;

   			}
   		}

   		//printa(dp,0,k+2);

   	}
   	cout << (dp[k]==1?"First\n":"Second\n");
    

    return 0;
}

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

#define ALL(obj) (obj).begin(),(obj).end()
#define SPEED cin.tie(0);ios::sync_with_stdio(false);

template<class T> using PQ = priority_queue<T>;
template<class T> using PQR = priority_queue<T,vector<T>,greater<T>>;

constexpr long long MOD = (long long)1e9 + 7;
constexpr long long MOD2 = 998244353;
constexpr long long HIGHINF = (long long)1e18;
constexpr long long LOWINF = (long long)1e15;
constexpr long double PI = 3.1415926535897932384626433L;

template <class T> vector<T> multivector(size_t N,T init){return vector<T>(N,init);}
template <class... T> auto multivector(size_t N,T... t){return vector<decltype(multivector(t...))>(N,multivector(t...));}
template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) {o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o;}
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const multiset<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) {o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o;}
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) {o << "{" << obj.first << ", " << obj.second << "}"; return o;}
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
void print(void) {cout << endl;}
template <class Head> void print(Head&& head) {cout << head;print();}
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) {cout << head << " ";print(forward<Tail>(tail)...);}
template <class T> void chmax(T& a, const T b){a=max(a,b);}
template <class T> void chmin(T& a, const T b){a=min(a,b);}
void YN(bool flg) {cout << (flg ? "YES" : "NO") << endl;}
void Yn(bool flg) {cout << (flg ? "Yes" : "No") << endl;}
void yn(bool flg) {cout << (flg ? "yes" : "no") << endl;}

int main() {
    string N; cin >> N;
    Yn(N[0]=='7'||N[1]=='7'||N[2]=='7');
    
    return 0;
}


Measured memory_bytes: 3628
#include <iostream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <regex>
#include <stack>
#include <queue>
#include <vector>
#include <iomanip>
#define MAX_N 100
#define INF 10000000

using namespace std;

string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int n,a,b,c;
string s,t;

void solve(){
	if (a%b==0) cout << 0 << endl;
	else cout << 1 << endl;
}

int main() {
	cin >> a >> b;
	solve();
	return 0;
}

Measured memory_bytes: 256
N, T = map(int, input().split())
t_l = list(map(int, input().split()))

tn = 0
ans = T
for i in range(N):
    t = t_l[i] - tn
    if t <= T:
        ans += t
    else:
        ans += T
    tn = t_l[i]
print(ans)

Measured memory_bytes: 103888
#![allow(non_snake_case, dead_code)]

use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

struct Scanner<'a> {
    cin : StdinLock<'a>,
}

impl<'a> Scanner<'a> {
    fn new(cin : StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }

    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }

    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }
}


fn main(){
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);
    let m = 250000;
    let mut g = vec![1; m+1];
    for i in 2..m+1 {
        if g[i] > 0 {
            for j in i..m/i+1 {
                g[i*j] = 0;
            }
        }
        g[i] += g[i-1];
    }
    loop {
        let n: usize = sc.read();
        if n == 0 { break; }
        println!("{}", g[n * 2] - g[n]);
    }
}



Measured memory_bytes: 5028
#include<bits/stdc++.h>
using namespace std;
int main(){
	char a[4] = {0};
	scanf("%s", a);
	bool b = false;
	for(int i = 0; i <= 3; i++)
		if (a[i] == '7')
		{
			b = true;
		}
	puts(b ? "Yes" : "No");
	return 0;
}


Measured memory_bytes: 3764
#include <iostream>

using namespace std;

//Aoj 0033

int ball[15], l[15],r[15];

bool res= false;

void dfs(int i,int j,int k){//i 为当年需要落下的球,j 表示左边最上面球的上一位置，k 表示最右边球的上一位置
    if(i>=10){
        res=true;
        return;
    }
//    if(res){
//        return;
//    }
    if(ball[i]>l[j-1]){
        l[j]=ball[i];
        dfs(i+1,j+1,k);
    }
    if(ball[i]>r[k-1]){
        r[k]=ball[i];
        dfs(i+1,j,k+1);
    }

}

int main(){
    int n;
    cin>>n;
    while(n--){
        res= false;
        for(int i=0;i<10;i++){
            cin>>ball[i];
        }
        dfs(0,1,1);
        if(res){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }

    }
    return 0;
}


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

using ll=long long;
ll n,ans,M=10000000LL;

int main(){
  cin>>n;
  for(int i=2;i<=min(n,M);i++){
    int j=i;
    while(!(n%j))ans++,n/=j,j*=i;
    while(!(n%i))n/=i;
  }
  cout<<ans+(n>=M)<<endl;
}


Measured memory_bytes: 3616
#include <iostream>
#include <algorithm>
#include <vector>


int main()
{
    long long  n,m,k; std::cin >> n >> m >> k;
    //long long  a[n+1], b[m+1];
    std::vector<long long>  a(n+1), b(m+1);
    a[0]=0; b[0]=0;
    for (int i=1;i<n+1;i++)
        std::cin >> a[i];
    for (int i=1; i<m+1; i++)
        std::cin >> b[i];
    
    for (int i=1; i<n+1; i++)
        a[i]+=a[i-1];
    for (int i=1; i<m+1; i++)
        b[i]+=b[i-1];

    long long ans=0, r=m;
    for (int i=0; i<n+1; i++)
    {
        if(a[i]>k) break;
        while (a[i]+b[r]>k)
            r--;
        ans = std::max({ans, i+r});
    }
    
    std::cout << ans;

    return 0;
}


Measured memory_bytes: 6432
"use strict";

function Main(input) {
    input=input.split("\n");
    var sum=0,line=input[1].split(" ").map(Number);
    for(var value in line)
        sum+=line[value];
    console.log(Math.min.apply(null,line)+" "+Math.max.apply(null,line)+" "+sum);
}
    
function debug(){
	var input = document.getElementById("input").value;
	Main(input);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 18156
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using static System.Console;

class Program
{
    static void Main(string[] args)
    {
        var S = ReadLine();

        var ok1 = S[0] == 'A';
        var ok2 = S.Count(c => c == 'C') == 1 && S.Select((c, i) => (c, i)).Where(x => x.c == 'C').All(x => 2 <= x.i && x.i <= S.Length - 2);
        var ok3 = S[1..].Replace("C", "").All(c => char.IsLower(c));
        var ok = ok1 && ok2 && ok3;

        WriteLine(ok ? "AC" : "WA");
    }
}

static class ArrayDeconstructExtensions
{
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2) => (i1, i2) = (a[0], a[1]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3) => (i1, i2, i3) = (a[0], a[1], a[2]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3, out T i4) => (i1, i2, i3, i4) = (a[0], a[1], a[2], a[3]);
    public static void Deconstruct<T>(this T[] a, out T i1, out T i2, out T i3, out T i4, out T i5) => (i1, i2, i3, i4, i5) = (a[0], a[1], a[2], a[3], a[4]);
}


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

#define FOR(i,a,b) for (int i=(a); i<(b); ++i)
typedef vector<int> vi;
typedef vector<vi> vvi;
inline int in() { int x; cin >> x; return x; }
#define chmax(x,y) x=max(x,y)

int n;
int count(int x) {
    int ans = 0;
    FOR(i,0,n) ans += (x>>i)&1;
    return ans;
}

void solve() {
  n = in();
  vvi h(n, vi(n, -1));
  FOR(i,0,n) {
    int a = in();
    FOR(j,0,a) {
      int x = in()-1, y = in();
      h[i][x] = y;
    }
  }
  int ans = 0;
  FOR(i,1,1<<n) {
    int ok = 1;
    vi pattern(n); FOR(j,0,n) pattern[j] = (i>>j)&1;
    FOR(j,0,n) {
      if (!pattern[j]) continue;
      FOR(k,0,n) {
        if (h[j][k]==-1) continue;
        if (h[j][k]!=pattern[k]) ok = 0;
      }
    }
    if (ok) chmax(ans, count(i));
  }
  cout << ans << endl;
}

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

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

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int A[3][3];
int N;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	FOR(y,3) FOR(x,3) cin>>A[y][x];
	cin>>N;
	FOR(i,N) {
		cin>>r;
		FOR(y,3) FOR(x,3) if(A[y][x]==r) A[y][x]=-1;
	}
	
	int ok=0;
	FOR(y,3) {
		{
			int cnt=0;
			FOR(x,3) cnt+=A[y][x]==-1;
			if(cnt==3) return _P("Yes\n");
		}
		{
			int cnt=0;
			FOR(x,3) cnt+=A[x][y]==-1;
			if(cnt==3) return _P("Yes\n");
		}
	}
	{
		int cnt=0;
		FOR(x,3) cnt+=A[x][x]==-1;
		if(cnt==3) return _P("Yes\n");
	}
	{
		int cnt=0;
		FOR(x,3) cnt+=A[x][2-x]==-1;
		if(cnt==3) return _P("Yes\n");
	}
	cout<<"No"<<endl;
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	cout.tie(0); solve(); return 0;
}


Measured memory_bytes: 256
N, M, X = map(int, input().split())
CAAA = [input().split() for i in range(N)]

ans=100000000000

for i in range(1, 2**N):
  price=0
  rikaido = [0]*M
  for j in range(N):
    if i>>j & 1:
      price += int(CAAA[j][0])
      for k in range(M):
        rikaido[k] += int(CAAA[j][k+1])
  for l in rikaido:
    if l < X:
      break
  else:
    ans = min(ans, price)
if ans == 100000000000:
  print(-1)
else:
  print(ans)
    

Measured memory_bytes: 9120
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,r,n) for(ll i=(ll)(r);i<(ll)(n);++i)
#define RFOR(i,r,n) for(ll i=(ll)(n-1);i>=r;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(x) x.begin(),x.end()
#define RALL(x) x.rbegin(),x.rend()
#define SORT(c) sort(ALL((c)))
#define RSORT(c) sort(RALL((c)))
#define PB(n) push_back(n)
#define endl '\n'
#define DOUT(x) cout << #x << " = " << (x) << endl
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c
#define VIN(V) for(ll ii = 0; ii < (ll)(V).size(); ii++) {cin >> (V).at(ii);}
#define OUT(n) cout << n << endl
#define OUT2(n1,n2) cout << n1 << " " << n2 << endl
#define OUT3(n1,n2,n3) cout << n1 << " " << n2 << " " << n3 << endl
#define VOUT(V) REP(ii,(V).size()){cout << (V)[ii] << " ";} cout<<endl;
#define VOUT2(V) REP(jj,(V).size()){VOUT(V[jj])}
typedef long long int ll;
typedef vector<ll> vi;
typedef vector<vi > vvi;
typedef vector<pair<ll, ll> > vp;
typedef vector<string> vs;
typedef vector<char> vc;
typedef list<ll> lst;
typedef pair<ll, ll> P;
const long long INF = numeric_limits<ll>::max();
constexpr long long MOD = 1000000007;
constexpr long double PI = 3.1415926;
template <class T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <class T> T &chmax(T &a, const T &b) { return a = max(a, b); }
ll n, m, k, ans, sum, cnt = 0; string s; char c; bool flg;

int main(){
  cin.tie(0);ios::sync_with_stdio(false);
  // cout << fixed << setprecision(numeric_limits<double>::max_digits10);
  ll x,y;
  IN2(x,y);

  ans = 0;
  while (x <= y) {
    x *= 2;
    ans++;
  }

  OUT(ans);
}


Measured memory_bytes: 3652
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <bitset>
#include <cmath>
#include <set>

#define INF 1000000000000
#define MOD 1000000007 //10^9+7:合同式の法

using namespace std;
typedef long long ll;

//マクロ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)

long long n = 1;

long long Xsum(ll x){
    long long wa = 0;
    while(wa < x){
        wa += n;
        if(wa >= x)
            break;
        n++;
    }

    return wa;

}


int main(){
    long long X;
    cin >> X;

    long long t=X,box=0,nt=0;

    box = Xsum(X);

    nt = n;


    if(nt < t)
        cout << nt <<endl;
    else
    {
        cout << t << endl;
    }
    
    

}

Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#define F first
#define S second
#define vec vector
#define pb push_back
#define pll pair<ll,ll>
#define pdd pair<ld, ld>
#define umap unordered_map
#define uset unordered_set
#define pii pair<int, int>
#define pnn pair<Node*, Node*>
#define all(m) m.begin(), m.end()
#define uid uniform_int_distribution
#define init(m, x) memset(m, x, sizeof(m));
#define FILE ifstream in("input.txt");ofstream out("output.txt");
#define fast cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0);
using namespace std;
typedef string str;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

int main() {
    fast;
    ll x; cin>>x;
    cout<<(x<30 ? "No" : "Yes");
}

Measured memory_bytes: 3656
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<queue>
#include<climits>
#include<cmath>
#include<sstream>
#include<iomanip>
#include <map>
#include <stack>

struct max_min
{
    int64_t max = 0;
    int64_t min = 0;
};

const int64_t cc = pow( 10, 9 ) + 7;
//std::cout<< std::fixed << std::setprecision(10) << ( double )( max ) / 2;
bool sort_pair( std::pair< int64_t, int64_t > origin, std::pair< int64_t, int64_t > another )
{
    return origin.first < another.first;
}

int main()
{
    std::string word;
    std::string w = "Yes";
    int64_t a,b,c,d,e,f;
    std::cin>> a;
    std::cin>> b;
    std::cin>> c;

    d = a;
    a = b;
    b = d;

    d = a;
    a = c;
    c = d;

    std::cout<< a << " " << b << " " << c;
    
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long  l;
typedef pair<ll,ll> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const double PI=3.14159265358979;
const int INF=1<<30;
const ll LMAX=1000000000000000001;
const ll mod=1000000007;
ll gcd(ll a,ll b){if(a<b)swap(a,b);while((a%b)!=0){a=b;b=a%b;}return b;}
int dx[]={-1,0,1,0};
int dy[]={0,1,0,-1};

const int MAX_N=1<<20;

//data:その節点の区間全体に一様に加えられた値
//datb:その節点の区間に一様でなく加えられた値の和
ll data[MAX_N],datb[MAX_N];

//[a,b)にxを加算
void add(int a,int b,int x,int k,int l,int r){
  if(a<=l&&r<=b) data[k]+=x;
  else if(l<b&&a<r){
    datb[k]+=(min(r,b)-max(l,a))*x;
    add(a,b,x,k*2+1,l,(r+l)/2);
    add(a,b,x,k*2+2,(r+l)/2,r);
  }
}

//[a,b)の和を計算
ll sum(int a,int b,int k,int l,int r){
  if(r<=a||b<=l) return 0;
  else if(a<=l&&r<=b) return data[k]*(r-l)+datb[k];
  else{
    ll res=(min(r,b)-max(l,a))*data[k];
    res+=sum(a,b,k*2+1,l,(r+l)/2);
    res+=sum(a,b,k*2+2,(r+l)/2,r);
    return res;
  }
}

int main(){
  int N,D,A; cin>>N>>D>>A;
  vector<P> p(N);
  rep(i,N) cin>>p[i].fs>>p[i].sc;
  sort(ALL(p));
  rep(i,N){
    add(i,i+1,p[i].sc,0,0,N);
  }
  ll ans=0;
  rep(i,N){
    ll m=sum(i,i+1,0,0,N);
     // cout<<"i "<<i<<" m "<<m<<endl;
    if(m<0) continue;
    ll k=(m+A-1)/A;
    ans+=k;
    int id=(upper_bound(p.begin(),p.end(),P(p[i].fs+2*D,INF))-p.begin());
    // cout<<"id k "<<id<<" "<<k<<endl;
    add(i,id,-k*A,0,0,N);
  }
  cout<<ans<<endl;


  return 0;
}


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

int max_syoujiki = 0;
int N;

void dfs(vector<vector<int>> edge, vector<int> katei, int ininme) {
    // i人目がN人目の場合
    if (ininme >= N) {
        // kateiが正しいか確認、正しければ、max_syoujikiを更新
        bool tadasi = true;
        int syoujikimono = 0;
        /*
        cout << "仮定" << endl;
        rep(i, N) {
            cout << katei[i];
        }
        cout << endl;
        */

        rep(i, N) {
            // 仮定での正直者カウント
            if (katei[i] == 1) {
                // 正直ものか確認
                rep(j, N) {
                    if (i==j) {
                        continue;
                    }
                    if (edge[i][j]==-1) {
                        continue;
                    }
                    if (edge[i][j]==katei[j]) {
                        continue;
                    }
                    tadasi = false;
                }
                syoujikimono += 1;
            }
            /*
            // i番目の仮定が正しいか、をedgeから確認
            rep(j, N) {
                // 自分についてはなし
                if (i == j) {
                    cout << "自分について" << endl;
                    continue;
                }
                // j人目がiについて、何もいっていない
                if (edge[j][i] == -1) {
                    cout << "何も行っていない" << endl;
                    continue;
                }
                // j人目がiについて、仮定を満たす
                if (edge[j][i] == katei[i]) {
                    cout << "仮定は正しい" << endl;
                    continue;
                }
                // 仮定を満たさない場合
                cout << "仮定は正しくない" << endl;
                tadasi = false;
            }
            */
        }

        if (tadasi) {
            max_syoujiki = max(syoujikimono, max_syoujiki);
        }
        return;
    }
    // i人目が1の場合 正直者
    katei[ininme] = 1;
    dfs(edge, katei, ininme+1);

    // i人目が0の場合 
    katei[ininme] = 0;
    dfs(edge, katei, ininme+1);
}


int main() {
    cin >> N;
    vector<int> A(N);
    // edgeを-1で初期化
    vector<vector<int>> edge(N, vector<int>(N, -1));
    rep(i, N) {
        int nb_syou;
        cin >> nb_syou;
        rep(j, nb_syou) {
            int xi, yi;
            cin >> xi >> yi;
            // nb番目の証人のxi番目に関しての証言を収納
            edge[i][xi-1] = yi;
        }
    }
    /*
    cout << "edge" << endl;
    rep(i, N) {
        rep(j, N) {
            cout << edge[i][j];
        }
        cout << endl;
    }
    */
   
    vector<int> katei(N, -1);

    dfs(edge, katei, 0);

    cout << max_syoujiki << endl;
    return 0;
}

Measured memory_bytes: 256
import sys
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())


M = I()
digit = 0  # 桁数
digit_sum = 0  # 桁和
for i in range(M):
    d,c = MI()
    digit += c
    digit_sum += d*c

print(digit+(digit_sum-1)//9-1)

# 和が9以下の2数を選ぶ ⇒ 桁数:-1,桁和:±0
# 和が10以上の2数を選ぶ ⇒ 桁数:±0,桁和:-9


Measured memory_bytes: 73768
#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i <= (int)(n); i++)
using namespace std;
int main(){
  int h,w;cin>>h>>w;
  h++;w++;
  char c;
  rep(i,h){
    rep(j,w){
      if(i==0||i==h||j==0||j==w)cout<<'#';
      else{cin>>c;cout<<c;}
      
      if(j==w)cout<<endl;
    }
  }
}

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

#define int long long
#define For(i, a, b) for (int i = (a); i <= static_cast<int>(b); i++)
#define Forr(i, a, b) for (int i = (a); i >= static_cast<int>(b); i--)
#define rep(i, n) For(i, 0, n - 1)
#define repall(i, arr) for (auto& i : (arr))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define dump(x) cerr << #x << " = " << (x) << '\n'

template <typename T>
using pq = priority_queue<T>;
template <typename T>
using pqr = priority_queue<T, vector<T>, greater<T>>;
const int INF = INT_MAX / 2;
constexpr int MOD = 1e9 + 7;

template <typename T1, typename T2>
ostream& operator<<(ostream& stream, const pair<T1, T2>& p) {
    return stream << p.first << " " << p.second;
}
template <typename T>
void print(const vector<vector<T>> matrix) {
    repall (vec, matrix)
        print(vec);
}
template <typename T>
void print(const vector<T> vec) {
    unsigned int len = vec.size();
    rep (i, len - 1)
        cout << vec[i] << ' ';
    cout << vec[len - 1] << '\n';
}
template <typename Arg>
void print(const Arg arg) {
    cout << arg << '\n';
}
template <typename Head, typename... Args>
void print(const Head head, const Args... args) {
    cout << head << " ";
    print(args...);
}
template <typename T>
T sum_(vector<T> vec, auto init = 0) {
    return std::accumulate(all(vec), T(init));
}
// -------------------------------------------------------------------

using P = pair<int, int>;

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

    int n;
    cin >> n;
    vector<int> l(n);
    rep (i, n)
        cin >> l[i];

    sort(all(l), greater<int>());

    int sum = 0;
    repall (i, l)
        sum += i;

    bool ok = l[0] < sum - l[0];

    print(ok ? "Yes" : "No");

    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const long long M =1e3+2,MOD=1e9+7;
typedef long long ll;
#define pb push_back
#define Y printf("YES\n")
#define N printf("NO\n")
#define O printf("-1\n")
bool f_2=false,vis[M]= {false},f=false;
vector<ll>v,v_1,v_2,v_3,v_4,v_5;
string s,p,q,ok,ch;
map<ll,ll>mp,mp_2;
set<ll>st,st_1;
ll Rank[M],parent[M]= {-1};
ll cnt=0,cost=0,mx=0,NODE,t,par;
deque<ll>Q;
//vector< pair<ll,ll > >v,v_1;
struct node
{
    ll pa,ran,visit;

};
//node X[M];
int main()
{
    ios::sync_with_stdio(false);//ISHWAR
    cin.tie(0);//Tourist_Twin
   //freopen("kamona.txt","r",stdin);
    ll a,b,c=1,n,t,sum=0,mx=0,l,x,y,i=0,j=0,result=0,e,sum_2,ans=0,d,k;
    cin>>t;
    a=t;
    t++;
    while(t--)
    {
        cin>>b;
        v.pb(b);
    }
    for(i=0;i<a;i++)
    {
        cin>>b;
        if(v[i]>=b)
        {
            sum+=b;
        }
        else
        {
            sum+=v[i];
            ans=b-v[i];
            if(v[i+1]-ans<=0)
            {
                sum+=v[i+1];;
                v[i+1]=0;
            }
            else
            {
                sum+=ans;
                v[i+1]-=ans;
            }
        }
    }
    cout<<sum<<endl;

        return 0;
    }


Measured memory_bytes: 1400
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner((System.in));
		int W = sc.nextInt();
        int a = sc.nextInt();
		int b = sc.nextInt();

		if (a+W < b) {
			System.out.println((b-(a+W)));
		} else if (a <= b && b <= a+W) {
			System.out.println("0");
		} else {
			System.out.println((a-(b+W)));
		}
		
		sc.close();
	}
}


Measured memory_bytes: 21844
n, m = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
MOD = 10 ** 9 + 7

ax = 0
ay = 0

for i in range(n):
	ax = (ax + (((2 * i - n + 1) * x[i]) % MOD)) % MOD

for i in range(m):
	ay = (ay + (((2 * i - m + 1) * y[i]) % MOD)) % MOD

print(int((ax * ay) % MOD))

Measured memory_bytes: 18556
#include<cstring>
#include<iostream>
#include<string>
#include<vector>
#include<fstream>
#include<cmath>
#include<algorithm>
#define ll long long
using namespace std;
int n;
int main()
{	
    int x1,y1,x2,y2,x3,y3,x4,y4;
    cin >> x1 >> y1 >> x2 >> y2;
    x3=x2-(y2-y1);
    y3=y2+(x2-x1);
    x4=x3-(y3-y2);
    y4=y3+(x3-x2);
    printf("%d %d %d %d\n",x3,y3,x4,y4);
    return 0; 
}


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

#define ll long long

int main(){
    int N;
    cin >> N;
    int L[N],LL = 0,sum = 0;
    for(int i = 0;i < N;i++){
        cin >> L[i];
        if(L[i] > LL){
            sum += LL;
            LL = L[i];
        }else{
            sum += L[i];
        }
    }
    if(sum > LL)cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL<<((ll)n))
#define SHIFT_LEFT(n) (1LL<<((ll)n))
#define SUBS(s,f,t) ((s).substr((f),(t)-(f)))
#define ALL(a) (a).begin(),(a).end()
#define Max(a) (*max_element(ALL(a)))
#define Min(a) (*min_element(ALL(a)))
using namespace std;
ll n,c,k;
vi A;
ll check(){
  ll mi = llINF;
  ll cnt = 0;
  ll ho = 0;
  for(int i=0;i<n;i++){
    if(mi == llINF){
      mi = A[i];
      cnt++;
    }else{
      if(mi+k < A[i]){
	cnt = 1;
	mi = A[i];
	ho++;
      }else{
	cnt++;
      }
    }
    if(cnt == c){
      mi = llINF;
      ho++;
      cnt = 0;
    }
  }
  if(cnt)ho++;
  return ho;
}
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin>>n>>c>>k;
  A.resize(n);
  for(auto &a:A)cin>>a;
  ll le = 0,ri=111111;
  sort(ALL(A));
  cout<<check()<<endl;
  return 0;
}



Measured memory_bytes: 1024
#Greatest Common Diveser
def gcd(x, y):
    if x >= y:
        x = x % y
        if x == 0:
            return y
        return gcd(x, y)
    else:
        y = y % x
        if y == 0:
            return x
        return gcd(x, y)

x, y = map(int, input().split())
print(gcd(x, y))

Measured memory_bytes: 7740
package main

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

var sc = bufio.NewScanner(os.Stdin)

func init() {
	const maxWord = (1 << 30)
	buf := []byte{}
	sc.Buffer(buf, maxWord)
	sc.Split(bufio.ScanWords)
}

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

func main() {
	n, _ := strconv.Atoi(input())
	q, _ := strconv.Atoi(input())
	s := input()
	cnt := make([]int, n)
	for i := 0; i < n-1; i++ {
		cnt[i+1] = cnt[i]
		if s[i:i+2] == "AC" {
			cnt[i+1]++
		}
	}

	result := make([]int, q)
	for i := 0; i < q; i++ {
		left, _ := strconv.Atoi(input())
		right, _ := strconv.Atoi(input())
		result[i] = cnt[right-1] - cnt[left-1]
	}

	for i := 0; i < q; i++ {
		fmt.Println(result[i])
	}
}


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

int main () {
  string N;
  cin >> N;
  
  if (N.at(0) == '7' || N.at(1) == '7' || N.at(2) == '7') {
    cout << "Yes";
  } else {
    cout << "No";
  }
}

Measured memory_bytes: 3628
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    s = S()
    t = S()
    if s+t == t[::-1]+s[::-1]:
        print("YES")
    else:
        print("NO")

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    A()


Measured memory_bytes: 38536
#include<iostream>
#include<string>
#include<cstdlib>
template<typename T>
void fin(T const& t){ std::cout << t << std::endl; exit(0); }

int main() {
  std::string S; std::cin >> S;
  for(int i = 0; i < S.size(); ++i) {
    if(i%2 == 0 && S[i]=='L') fin("No");
    if(i%2 == 1 && S[i]=='R') fin("No");
  }
  fin("Yes");
  return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main {
    public static void main(String[] args){
      // 入力
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      
      // 7が含まれるか判定
      int work;
      int digit100 = N / 100;
      work = N % 100;
      int digit10 = work / 10;
      int digit1 = work % 10;
      
      String result = "Yes";
      if(digit100 != 7 && digit10 != 7 && digit1 != 7){
        result = "No";
      }
      
      // 出力
      System.out.println(result);
    }

}

Measured memory_bytes: 35840
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional> // for less 
using namespace __gnu_pbds; 
#define mod 1000000007
#define int long long
#define pb push_back
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define inp(n) for(i=0;i<n;i++) cin>>A[i];
#define inz(A) memset(A,0,sizeof(A))
#define lb lower_bound
#define ub upper_bound
#define all(v) v.begin(),v.end()
#define T 1000000
#define F first
#define S second
#define pi pair<int,int>
#define vi vector<int>
#define mii map<int,int>
#define vp vector<pair< int,int> >
#define mpi map<pair<int,int> ,int>
#define mip map<int, pair<int,int> >
#define inf INT_MAX
#define inf1 LONGLONG_MAX
#define sz(v) v.size()
#define rep(i,n) for(int i=0;i<n;i++)
#define forn(i,a,b) for(int i=a;i<=b;i++)
#define deb(x) cout<<#x<<"is "<<x<<endl;
#define lower(s) transform(all(s),s.begin(),::tolower)
#define endl "\n"
typedef tree<int, null_type, less<int>, rb_tree_tag, 
         tree_order_statistics_node_update> pbds;
   
/* brownsands :Arpit */			

void solve()
{  int a,b,c,x;
   cin >> a >> b >> c;
   x=a*a + b*b + c*c -2*a*b - 2*b*c - 2*c*a;

   if((a+b)>=c)
   {
      cout<<"No"<<endl;return;
   }
   if((x) > 0)
   cout<<"Yes";
   else cout<<"No";
  
}
signed main()
{
   boost
        int test=0,t;
		//cin>>t;
		t=1;
		while(test++ <t){
            //cout<<"Case "<<test<<": ";
            solve();
            //cerr << "\nTime : " << (double)clock() / (double)CLOCKS_PER_SEC << "s\n";
               }		
} 
               
			
 

				
		
		




Measured memory_bytes: 256