akhauriyash/Code-Regression huggingface dataset:
using System;

namespace _126A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] NM = Console.ReadLine().Split(' ');
            int N = int.Parse(NM[0]);
            int K = int.Parse(NM[1]);

            string S = Console.ReadLine();

            string SF;
            string SE;

            SF = S.Substring(0, K - 1);
            SE = S.Substring(K, N - K);
            String SC = S.Substring(K - 1, 1);


            Console.WriteLine("{0}{1}{2}",SF,SC.ToLower(),SE);


        }
    }
}


Measured memory_bytes: 13140
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
using pi=pair<int,int>;
#define int long
signed main(){
  int n;
  cin>>n;
  vector<int> a(n),b(n);
  for(int i=0;i<n;++i)cin>>a[n-1-i]>>b[n-1-i];
  int r=0;
  for(int i=0;i<n;++i)r+=(b[i]-(a[i]+r)%b[i])%b[i];
  cout<<r;
}

Measured memory_bytes: 1792
import Control.Applicative
import Control.Monad

main :: IO ()
main = do
  n <- readLn
  unless (n == 0) $ do
    solve <$> replicateM n (length <$> getLine) >>= print
    main

solve :: [Int] -> Int
solve = f 1
  where
    f i ls
      | isTanku ls = i
      | otherwise = f (i + 1) (tail ls)

isTanku :: [Int] -> Bool
isTanku = f 0 0
  where
    f _ _ [] = False
    f 0 cw (c:cs)
      | cw + c < 5 = f 0 (cw + c) cs
      | cw + c > 5 = False
      | otherwise = f 1 0 cs
    f 1 cw (c:cs)
      | cw + c < 7 = f 1 (cw + c) cs
      | cw + c > 7 = False
      | otherwise = f 2 0 cs
    f 2 cw (c:cs)
      | cw + c < 5 = f 2 (cw + c) cs
      | cw + c > 5 = False
      | otherwise = f 3 0 cs
    f 3 cw (c:cs)
      | cw + c < 7 = f 3 (cw + c) cs
      | cw + c > 7 = False
      | otherwise = f 4 0 cs
    f 4 cw (c:cs)
      | cw + c < 7 = f 4 (cw + c) cs
      | cw + c > 7 = False
      | otherwise = True



Measured memory_bytes: 4096
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<list>
#include<set>
#include<string>
using namespace std;
int gcd(int a, int b) {
	int c = a % b;
	while (c != 0) {
		a = b;
		b = c;
		c = a % b;
	}
	return b;
}
struct UnionFind {
	vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

	UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
		for (int i = 0; i < N; i++) par[i] = i;
	}

	int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
		if (par[x] == x) return x;
		return par[x] = root(par[x]);
	}

	void unite(int x, int y) { // xとyの木を併合
		int rx = root(x); //xの根をrx
		int ry = root(y); //yの根をry
		if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
		par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
	}

	bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
		int rx = root(x);
		int ry = root(y);
		return rx == ry;
	}
};
typedef long long ll;

ll M = 1000000007;

vector<ll> fac(300001); //n!(mod M)
vector<ll> ifac(300001); //k!^{M-2} (mod M)

ll mpow(ll x, ll n) {
	ll ans = 1;
	while (n != 0) {
		if (n & 1) ans = ans * x % M;
		x = x * x % M;
		n = n >> 1;
	}
	return ans;
}
ll comb(ll a, ll b) {
	if (a == 0 && b == 0)return 1;
	if (a < b || a < 0)return 0;
	ll tmp = ifac[a - b] * ifac[b] % M;
	return tmp * fac[a] % M;
}
// mod. m での a の逆元 a^{-1} を計算する
long long modinv(long long a) {
	long long b = M, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= M;
	if (u < 0) u += M;
	return u;
}
vector<vector<ll>> mul(vector<vector<ll>> a, vector<vector<ll>> b, int n) {
	int i, j, k, t;
	vector<vector<ll>> c(n);
	for (i = 0; i < n; i++) {
		for (j = 0; j < n; j++) {
			t = 0;
			for (k = 0; k < n; k++)
				t = (t + a[i][k] * b[k][j] % M) % M;
			c[i].push_back(t);
		}
	}
	return c;
}

template< typename Monoid >
struct SegmentTree {

	int sz;
	vector< Monoid > seg;

	const Monoid M1;

	SegmentTree(int n,  const Monoid &M1) :  M1(M1) {
		sz = 1;
		while (sz < n) sz <<= 1;
		seg.assign(2 * sz, M1);
	}

	void set(int k, const Monoid &x) {
		seg[k + sz] = x;
	}

	void build() {
		for (int k = sz - 1; k > 0; k--) {
			seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
		}
	}

	void update(int k, const Monoid &x) {
		k += sz;
		seg[k] = x;
		while (k >>= 1) {
			seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
		}
	}

	Monoid query(int a, int b) {
		Monoid L = M1, R = M1;
		for (a += sz, b += sz; a < b; a >>= 1, b >>= 1) {
			if (a & 1) L = f(L, seg[a++]);
			if (b & 1) R = f(seg[--b], R);
		}
		return f(L, R);
	}

	Monoid value(const int &k) const {
		return seg[k + sz];
	}

	Monoid f(Monoid a, Monoid b) {
		return a + b;
	}
};

int main() {
	ll n, a, b, i,t = 0;
	cin >> n;
	vector<pair<ll, ll>> v;
	for (i = 0; i < n; i++) {
		cin >> a >> b;
		v.push_back(make_pair(b, a));
	}
	sort(v.begin(), v.end());
	for (i = 0; i < n; i++) {
		t += v[i].second;
		if (t > v[i].first) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
}

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

#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = (int)(x); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> P;
const int inf = INT_MAX;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
const double EPS = 1e-10;
const double PI = acos(-1.0);
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; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill( (T*)array, (T*)(array+N), val ); }


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin >> N;
    int ma = inf, cnt = 0;
    rep(i, N) {
        int a; cin >> a;
        if (ma > a) {
            cnt++;
            ma = a;
        }
    }
    cout << cnt << endl;
}

Measured memory_bytes: 256
lst = input().split()

L = int(lst[0])
R = int(lst[1])
d = int(lst[2])

if L % d != 0:
   L = L + d - (L % d)

if R % d != 0:
   R = R - (R % d)

result = int(((R - L) / d) + 1)

print(result)

Measured memory_bytes: 9188
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stdio.h>
#include<cstring>
#include<math.h>
#include<map>
#include<bitset>
#include<iomanip>
#include<queue>
#include<functional>
#include<stack>
#include<tuple>
#include<cassert>
using namespace std;

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

long long N;
long long a[100001];
long long b[100000];

int main() {
  cin >> N;
  rep(i, N+1) {
    cin >> a[i];
  }
  rep(i, N) {
    cin >> b[i];
  }
  
  long long ans = 0;
  rep(i, N) {
    long long temp = min(a[i], b[i]);
    ans += temp;
    long long minus = b[i] - temp;
    if(minus > a[i+1]) {
      ans += a[i+1];
      a[i+1] = 0;
    } else {
      ans += minus;
      a[i+1] -= minus;
    }
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 5172
# coding: utf-8
# Your code here!

a = int(input())

list = [a]

n=1
k=0

while k == 0:
    if a % 2 == 0:
        b = a/2
        if b in list:
            break
    else:
        b = 3*a + 1
        if b in list:
            break
    list = list + [b]
    a = b
    n = n +1
    

print(n+1)

    

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

using namespace std;

using int64 = long long;

constexpr int64 P = 1000000007;

// Verified: ABC133E, ABC132D, ABC130E
struct FiniteField {
 private:
  int64 x;
 public:
  FiniteField(int64 x) : x(x) {}
  FiniteField() : x(0) {}
  int64 Value() { return x; }
  inline FiniteField operator+(FiniteField o) {
    FiniteField r(*this); r += o; return r;
  }
  inline FiniteField operator-(FiniteField o) {
    FiniteField r(*this); r -= o; return r;
  }
  inline FiniteField operator* (FiniteField o) {
    FiniteField r(*this); r *= o; return r;
  }
  inline FiniteField operator/ (FiniteField o) {
    FiniteField r(*this); r /= o; return r;
  }
  inline void operator+= (FiniteField o) { x = (x + o.x) % P; }
  inline void operator-= (FiniteField o) { x = (x + P - o.x) % P; }
  inline void operator*= (FiniteField o) { x = (x * o.x) % P; }
  void operator/=(FiniteField o) {
    int64 p = P - 2; while (p) { if (p % 2) { *this *= o; } o *= o; p /= 2; }
  }
};

vector<FiniteField> MakeFactorialTable(int n) {
  vector<FiniteField> values(n + 1);
  values[0] = 1;
  for (int i = 1; i <= n; i++) {
    values[i] = values[i - 1] * i;
  }
  return values;
}

FiniteField Power(FiniteField x, int p) {
  if (p < 0) return FiniteField(1) / Power(x, -p);
  FiniteField value = 1;
  while (p) {
    if (p % 2) value *= x;
    x *= x;
    p /= 2;
  }
  return value;
}

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

  int n, k;
  cin >> n >> k;

  auto factorials = MakeFactorialTable(n + k + 1);
  auto c_fn = [&factorials](int x, int y) {
    return factorials[x] / factorials[y] / factorials[x - y];
  };
  FiniteField value = c_fn(n + k - 1, k - 1);
  cout << value.Value() << endl;
}



Measured memory_bytes: 3192
#include<iostream>
#include <vector> 
#include <algorithm>
#include<iomanip>
#include<math.h>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
using namespace std;

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

Measured memory_bytes: 3636
#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

// -----------------------------------------------
// Framework <https://github.com/vain0x/procon>
// -----------------------------------------------

#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($t:ty) =>
        (rl().parse::<$t>().unwrap());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($arg:expr),*) => {
        #[cfg(debug_assertions)]
        $(writeln!(stderr(), "{} = {:?}", stringify!($arg), $arg).unwrap());*
    };
}

#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();
    buf.trim_right().to_owned()
}

trait IteratorExt: Iterator + Sized {
    fn vec(self) -> Vec<Self::Item> {
        self.collect()
    }
}

impl<T: Iterator> IteratorExt for T {}

// -----------------------------------------------
// Solution
// -----------------------------------------------

const P: i64 = 1_000_000_007;

fn pow(mut x: i64, mut n: i64) -> i64 {
    let mut y = 1_i64;
    while n > 0 {
        if n % 2 != 0 {
            y = (y * x) % P;
            n -= 1;
        }

        x = (x * x) % P;
        n /= 2;
    }
    y
}

fn main() {
    let (N, M) = read!(usize, i64);

    let r = (M as f64).sqrt() as i64 + 2;

    let mut qs = vec![];
    {
        let mut x = M;
        for p in 2..r as i64 {
            let mut k = 0;
            while x >= p && x % p == 0 {
                x /= p;
                k += 1;
            }
            if k > 0 {
                qs.push(k);
            }
        }
        if x > 1 {
            qs.push(1);
        }
    }

    let M = qs.iter().max().cloned().unwrap_or(1) + N + 1;

    let mut fact = vec![1_i64; M];
    for i in 2..M {
        fact[i] = i as i64 % P * fact[i - 1] % P;
    }

    let inv_fact = fact.iter().map(|&x| pow(x, P - 2)).vec();

    let mut s = 1_i64;
    for q in qs {
        let c = fact[q + N - 1] * inv_fact[q] % P * inv_fact[N - 1] % P;
        s = s * c % P;
    }

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


Measured memory_bytes: 6396
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>       // for next_permutation
#include <vector>
#include <cstdlib>
#define INF 998244353

using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pi;

const ll MOD = 1e9+7;

static long gcd(long a, long b) {
    if (b == 0) {
        return a;
    }
    return gcd(b, a % b);
}
/*
long long int facctorialMethod(int k){//階乗
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}*/

long long int tousasum(long long int n){//等差数列
    return n*(n+1)/2;
}

unsigned GetDigit(unsigned num){//桁数
    unsigned digit=0;
    while(num!=0){
        num /= 10;
        digit++;
    }
    return digit;
}

bool is_prime(const unsigned n){
    switch(n){
        case 0: // fall-through
        case 1: return false;
        case 2: // fall-through
        case 3: return true;
    } // n > 3 が保証された

    if(n%2 == 0) return false;
    if(n%3 == 0) return false;
    // 2と3の倍数でないので6の倍数ではないことが保証された

    if(n%6 != 1 && n%6 != 5) return false;
    // 6の倍数前後の数(素数かもしれない数)であることが保証された

    // 6の倍数前後の数を使って試し割りをする
    for(unsigned i=5;i*i<=n;i+=6){
        if(n%i     == 0) return false; // 6n-1
        if(n%(i+2) == 0) return false; // 6n+1
    }

    return true;
}

map< ll, ll > prime_factor(ll n) {//素因数分解
    map< ll, ll > ret;
    for(ll i = 2; i * i <= n; i++) {
        while(n % i == 0) {
            ret[i]++;
            n /= i;
        }
    }
    if(n != 1) ret[n] = 1;
    return ret;
}

ll calcNumOfCombination(ll n, ll r){
    ll num = 1;
    for(ll i = 1; i <= r; i++){
        num = num * (n - i + 1) / i;
    }
    return num;
}

int bubblesort(vector<int> array,int size){//バブルソート　転倒数
    int kaisu = 0;
    for(int i = 0; i < size; i++){
        for(int j = i + 1; j < size; j++){
            if(array[i] > array[j]){
                int number = array[i];
                array[i] = array[j];
                array[j] = number;
                kaisu++;
            }
        }
    }
    return kaisu;
}

ll facctorialMethod(ll k){
    ll sum = 1;
    for (ll i = 1; i <= k; ++i)
    {
        sum = (sum * i)%MOD;
    }
    return sum;
}

// nPnの順列に対して処理を実行する
void foreach_permutation(int n, std::function<void(int *)> f) {
    int indexes[n];
    for (int i = 0; i < n; i++) indexes[i] = i;
    do {
        f(indexes);
    } while (std::next_permutation(indexes, indexes + n));
}





int main() {
  int N;
  cin >> N;
  ll p[N];
  ll min = LONG_LONG_MAX;
  ll del = 0;
  for(int i=0;i<N;i++){
     cin >> p[i];
     if(p[i]<min){
         min=p[i];
     }else{
         del++;
     }
  }

  cout << N-del << endl;


}











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

int main() {
    string s;
    long long result = 0, k, front = 0, back = 1;
    cin >> s >> k;
    for (int i = 1; i < s.size(); i++) {
        if (s[i] == s[i - 1]) {
            back++;
        } else {
            if (front == 0) {
                front = back;
            }
            result += back / 2;
            back = 1;
        }
    }
    if (back == s.size()) {
        cout << s.size() * k / 2;
    } else {
        result += back / 2;
        if (front == 0) {
            front = back;
        }
        result *= k;
        if (s.front() == s.back()) {
            result -= (front / 2 + back / 2 - (front + back) / 2) * (k - 1);
        }
        cout << result;
    }
    return 0;
}


Measured memory_bytes: 256
n,m = map(int,input().split())
ls = []
if m == 0:
    if n == 1:
        print(0)
    else:
        print("1"+"0"*(n-1))
    exit()
ss = []
cc = []
for i in range(m):
    s,c = map(int,input().split())
    if s in ss:
        if cc[ss.index(s)] != c:
            print(-1)
            exit()
    ss.append(s)
    cc.append(c)
    ls.append([s,c])
    
S = list("0"*n)

for i in ls:
    S[i[0]-1] = str(i[1])

if n != 1:
  for i in ls:
    if i[0] == 1 and i[1] == 0:
      print(-1)  
      exit()
      
if S[0] == "0":
  S[0] = "1"
  
if n == 1 and m == 1 and ls[0][1] == 0:
  print(0)
  exit()
  
for i in S:
  print(i,end="")

Measured memory_bytes: 3064
#![allow(unused_imports)]
#![allow(unused_variables)]
use proconio::input;
use proconio::marker::*;
use std::cmp::{min, max};
use std::collections::{HashSet, HashMap, BinaryHeap};

fn main() {
    input! {
        s: Chars,
    }
    let mut m = vec![0; 2019];
    m[0] = 1;
    let mut k = 1;
    let mut t = 0;
    let p = 2019;
    let mut ans = 0;
    for (i, c) in (0..s.len()).zip(s.iter().rev()){
        t += c.to_digit(10).unwrap() as usize * k;
        t %= p;
        ans += m[t];
        m[t] += 1;
        k *= 10;
        k %= p;
    }
    println!("{}", ans);
}


Measured memory_bytes: 3004
N  = int (input())
S = input()

#.#
b = S.count("#")
w = S.count(".")

cotB = 0
cotW = 0
ans = w
for i,s in enumerate(S):
    if s ==".":
        cotW+= 1
    else:
        cotB+=1
    if ans >=  cotB + (w - cotW):
        ans = cotB + (w - cotW)
print(ans)

Measured memory_bytes: 3500
#include<iostream>
#include<cstring>
#include<string>
#include<cmath>
#include<vector>
#include<algorithm>

#define range(i, n) for (int i = 0; i < n; i++) 
#define rrange(i, n) for(int i = n-1; i>=0; i--)

typedef long long int ll;


using namespace std;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

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

	ll N, M;
	ll A, B;

	cin >> A >> B;

	ll max = std::max(A, B);
	ll bit = log2(max) + 1;


	ll ret = 0;
	ll countA = 0;
	ll countB = 0;
	ll count = 0;

	ll mask = 1;
	ll maskn = 0;

	range(i, bit) {
		count = 0;
		// あといくつで該当bitが変わるか(正)
		if ((mask & A)) {

			count += mask - (maskn & A);
		}
		// (負)
		if ((mask & B)) {
			count += (maskn & B) + 1;
		}


		// 1の位だけ特殊
		if (mask == 1) {
			if ((B - A + 1 + ((A & 1) | (B & 1))) & 2) {
				ret |= 1;
			}
		}else if ((count) % 2) {
			ret |= mask;
		}
		//}
		//else {
		//	if ((countA + countB) % 2) {
		//		ret |= mask;
		//	}
		//}

		mask = mask << 1;
		maskn = maskn << 1;
		maskn += 1;
		

	}



	cout << dec << ret;

	


	return 0;
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
typedef vector<pi> vii;
const ll INF = 12345678910;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;
  cin>>n;

  ll moves[n+1] ;
  for(int i=0; i<=n; ++i){ moves[i] = INF; }
  moves[0] = 0;
  moves[1] = 1;
  // find the powers less than it.
  vi data;
  ll p = 1;
  while( true ){
    ll d = pow(6,p);
    if( d > n ){ break; }
    else{
      moves[d] = 1;
      data.push_back(d);
    }
    p++;
  }
  p = 1;
  while( true ){
    ll d = pow(9,p);
    if( d > n ){ break; }
    else{
      moves[d] = 1;
      data.push_back(d);
    }
    p++;
  }
  data.push_back(1);
  sort(data.begin(),data.end());
  for( int i = 2; i<=n; ++i){
    for( auto j : data){
      if( j > i ){ break; }
      else{
        moves[i] = min( moves[i] , moves[i-j] + 1 );
      }
    }
  }
  cout<<moves[n]<<"\n";
  return 0;
}


Measured memory_bytes: 1024
#include <math.h>

#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using P = pair<int, int>;

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

  map<string, ll> mp;

  rep(i, n) {
    string s;
    cin >> s;
    mp[s]++;
  }

  cout << "AC x " << mp["AC"] << endl;
  cout << "WA x " << mp["WA"] << endl;
  cout << "TLE x " << mp["TLE"] << endl;
  cout << "RE x " << mp["RE"] << endl;
  return 0;
}


Measured memory_bytes: 3628
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using ll = long long;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repk(i, k, n) for (int i = k; i < n; i++)
#define MOD 1000000007
#define INF 1e9
#define PIE 3.14159265358979323

template <class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template <class T>
T GCD(T a, T b) {
    if (b == 0)
        return a;
    else
        return GCD(b, a % b);
}
template <class T>
inline T LCM(T a, T b) {
    return (a * b) / GCD(a, b);
}

using namespace std;
//#inculude <bits/stdc++.h>
#define int long long

signed main() {
    string s;
    cin >> s;
    if (s.size() == 1) {
        cout << 0 << endl;
        return 0;
    }
    bool b = true;
    if (s[s.size() - 1] == 'W')
        b = false;
    int cnt = 0;
    for (int i = s.size() - 2; i >= 0; i--) {
        if (b && s[i] == 'W') {
            cnt++;
            b = false;
        }
        else if (!b && s[i] == 'B') {
            cnt++;
            b = true;
        }
        else
            continue;
    }
    cout << cnt << endl;
}


Measured memory_bytes: 512
#include <iostream>
#include <cmath>
// #include<bits/stdc++.h>

using namespace std;

int main() {
	const string ABC = "ABC";
	const string ARC = "ARC";

	string S;
	cin >> S;
	if (S == ABC) {
		cout << ARC << endl;
	} else {
		cout << ABC << endl;
	}
}


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

int main(){
	int n, t = 0, h = 0;
	string taro, hanako;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> taro >> hanako;
		if(taro > hanako)
			t += 3;
		else if(taro < hanako)
			h += 3;
		else{
			t++;
			h++;
		}	
	}
	cout << t << ' ' << h << endl;
	return 0;
}


Measured memory_bytes: 3216
#include <iostream>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>

using namespace std;

typedef long long ll;

const ll INF = 1e9;

vector < pair <ll, ll> > v;

ll n, sz[1000000], r[1000000], sum;

bool ans = true;

vector <ll> g[1000000];

ll dfs (ll x, ll p)
{
	ll sum = sz[x] - 1;

	for (ll to : g[x])
		if (to != p)
			sum += dfs (to, x);

	return sum;
}

int main () 
{
    cin >> n;
    
    for (ll i = 0; i < n; i++)
    {
		ll d;
		scanf ("%lld", &d);
		
		v.emplace_back (d, i);

		r[i] = d;
    }
    
    sort (v.begin (), v.end ());
    
    for (ll i = n - 1; i > 0; i--)
    {
		ll x = v[i].second, d = v[i].first;
		
		sz[x] = 1;
		
		for (ll to : g[x])
		    sz[x] += sz[to];

		sum += sz[x];

		ll k = lower_bound (v.begin (), v.end (), make_pair (d + 2 * sz[x] - n, -1LL)) - v.begin ();
		
		if (k >= i || v[k].first != d + 2 * sz[x] - n)
		{
		    cout << -1;
		    return 0;
		}
		
		g[v[k].second].push_back (x);
    }

    if (sum != v[0].first)
    {
		cout << -1;
		return 0;
    }
    
    for (ll i = 0; i < n; i++)
		for (ll to : g[i])
		{
		    printf ("%lld %lld\n", i + 1, to + 1);
		}
}


Measured memory_bytes: 32752
#include<iostream>
#include<cstdio>
#include<cmath>
#include<map>
#include<cctype>
#include<cstring>
#include<algorithm>
using namespace std;
long long a,b,c;
int main()
{
	cin>>a>>b>>c;
	cout<<a+b+c-max(a,max(b,c))<<endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for(int i=int(m); i<int(n); ++i)
#define drep2(i, m, n) for(int i=int(m-1); i>=int(n); --i)
#define rep(i, n) rep2(i, 0, n)


char s[100001];

int main() {
  scanf("%s", s);
  int n = strlen(s);
  
  for (int i = (n+1)>>1; i < n; ++i) {
    if (s[i-1] != s[i] || s[n-i-1] != s[n-i]) {
      printf("%d\n", i);
      return 0;
    }
  }

  printf("%d\n", n);
  return 0;
}


Measured memory_bytes: 892
#include<iostream>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<cmath>
#include<map>

using namespace std;

#define rep(i,N) for(int i=0;i<N;i++) //0から


typedef long long ll;




ll binary_search(vector<ll> a, ll n, ll key){
    ll right = n, left = -1;
    ll md = (right + left) / 2;

    while(right - left > 1){
        if(a[md] <= key){
            right = md;
        }else{
            left = md;
        }
        md = (right + left) / 2;
    }
    if(left == -1) return -1; //無い場合
    return right;
}

vector<ll> prime;
void Prime(ll n){ //線形篩,素数列挙
    vector<ll> p(n,0);
    p[0]=1;
    p[1]=1;
    for(ll i=2;i<n;i++){
        if(p[i]==0){
            prime.push_back(i);
            p[i]=i;
        }
        ll k=prime.size();
        for(ll j=0;j<k && i*prime[j]<n && prime[j]<=p[i];j++){
            p[i*prime[j]]=prime[j];
        }
    }
}

ll gcd(ll a,ll b){
    if(a<b){
        swap(a,b);
    }
    //a>=b
    ll r=a%b;
    while(r!=0){
        a=b;
        b=r;
        r=a%b;
    }
    return b;
}

#define MOD ((ll)1e+9 + 7)



//cout<<fixed<<setprecision(10);
int main(){
    ll n;
    cin>>n;
    if(n==1){
        cout<<0<<endl;
        return 0;
    }
    vector<ll> cnt;
    ll m=n;
    for(long long int i=2;i*i<=m && n>1;i++){
        if(n%i==0){
            ll tmp=0;
            while(n%i==0){
                tmp++;
                n/=i;
            }
            cnt.push_back(tmp);
        }
    }
    ll ans=0;
    if(n!=1) ans++;
    n=cnt.size();
    
    rep(i,n){
        ll k=0;
        while(((k+1)*(k+2))/2 <= cnt[i]){
            k++;
        }
        ans+=k;
    }
    if(ans==0) ans++;

    cout<<ans<<endl;
    

    return 0;
}



Measured memory_bytes: 3624
#include <bits/stdc++.h>
//#include <boost/algorithm/string.hpp>
using namespace std;


void init(){
    cin.tie(0);
    cin.sync_with_stdio(0);
}


#define Vec(a) vector<a>

#define ll long long
#define ld long double
#define ull unsigned long long
#define ull unsigned long long
#define mod 1000000007
#define pi (3.1415926)

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))

#define scd(a)  scanf("%lld",&a)
#define scdd(a,b)	scanf("%lld%lld",&a,&b)
#define scddd(a,b,c)	scanf("%lld%lld%lld",&a,&b,&c)
#define ptab(a)	printf("%lld ",a)
#define pdn(a)	printf("%lld\n",a)
#define pddn(a,b)	printf("%lld %lld\n",a,b)
#define pdddn(a,b,c)	printf("%lld %lld %lld\n",a,b,c)

#define Filein(N) freopen("N", "r", stdin);
#define Fileout(N) freopen("N", "w", stdout);

#define forr(n) for(ll i=0;i<n;i++)
#define rev(n) for(ll i=n-1;i>=0;i--)
#define forp(x, y) for(ll i=x;i<y;i++)
#define loop( j, k, in) for (ll i=j ; i<k ; i+=in)

#define in  cin>>
#define out cout<<
#define en "\n"
#define sp " "
#define eps 1.0E-14
#define l length()
#define preci(x) cout << fixed<<setprecision(x)
#define inf LONG_LONG_MAX
#define ninf LONG_LONG_MIN


void odd(int n)
    {
    bool b=1;
        int x = sqrt(n);
    for (int i=2 ; i<=x ; ++i)

    {
        if(n%i == 0) {cout << "NO" << sp; b = 0;  break;}
    }
    if (b)
    cout << "Yes" << sp;
    b=1;
    }

ll sum (int n ){return ((n*(n+1)) / 2) ;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

int a[4];

int main()
{
    init();

    set <string>s; int n ; cin>>n;

    for (int i=0 ; i<n ;++i){
        string k ; cin>>k;

        s.insert(k);
    }

    cout << s.size();
}



Measured memory_bytes: 19044
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
const int INF = 100010001;
const ll LINF = (ll)INF*INF*10;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int q;
    cin >> q;
    deque<int> dq;
    while(q--) {
        string s;
        cin >> s;
        if(s.size() == 6) {
            if(s[0] == 'i') {
                int x;
                cin >> x;
                dq.push_front(x);
            } else {
                int x;
                cin >> x;
                auto itr = find(all(dq), x);
                if(itr != dq.end()) {
                    dq.erase(itr);
                }
            }
        } else {
            if(s.size() == 11) {
                dq.pop_front();
            } else {
                dq.pop_back();
            }
        }
    }

    while(!dq.empty()) {
        cout << dq.front() << (dq.size() == 1?'\n':' ');
        dq.pop_front();
    }
}


Measured memory_bytes: 6872
import math
from operator import itemgetter
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
s = S()

a = s.count("#")
b = s.count(".")
cnta = 0
cntb = 0
ans = MAX_INT
for i in range(N):
	if s[i] == "#":
		ans = min(ans,cnta + (b-cntb))
		cnta += 1
	else:
		cntb += 1
if ans == MAX_INT:
	print(0)
else:
	print(min(ans,a,b))

Measured memory_bytes: 21896
#include <bits/stdc++.h>
#define rt "\n"
#define sp " "
#define test1 cout << "test1" << endl;
#define test2 cout << "test2" << endl;
#define fixprecision(n) fixed; cout << setprecision(n)
#define kyopro ios::sync_with_stdio(false);cin.tie(NULL)
#define MOD 1000000007
#define rep(i, s, N) for(ll i{s}; i < N; i++)
#define rem(i, s, N) for(ll i{N - 1}; i > s - 1; i--)
#define iikae auto&
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll,ll>;

ll gcd(ll a, ll b){
  return b != 0 ? gcd(b, a % b) : a;
}

int main(){
  kyopro;
  ll N;
  cin >> N;
  vector<ll> A(N);
  for(auto&& i : A){
    cin >> i;
  }
  vector<ll> saisho(N + 1), saigo(N + 1);
  saisho.at(0) = 0;
  saigo.at(0) = 0;
  rep(i, 0, N){
    saisho.at(i + 1) = gcd(saisho.at(i), A.at(i));
  }
  rep(i, 0, N){
    saigo.at(i + 1) = gcd(saigo.at(i), A.at(N - 1 - i));
  }
  //0 N-1 1 N-2 ... N-1 0
  ll ans{};
  rep(i, 0, N){
    ans = max(ans, gcd(saisho.at(i), saigo.at(N - 1 - i)));
  }
  cout << ans << rt;
}

Measured memory_bytes: 2560
typedef long unsigned int size_t;
extern int printf (const char *__restrict __format, ...);
extern int scanf (const char *__restrict __format, ...) ;
extern int getchar (void);
extern int putchar (int __c);
int nextInt(){int f=0;char s=0;char c=getchar();while((c<48)||(57<c)){if(c==45){s=1;c=getchar();break;}c=getchar();}while((48<=c)&&(c<=57)){f=f*10+(c-48);c=getchar();}return s?-f:f;}
char nextChar(){char f=0;char s=0;char c=getchar();while((c<48)||(57<c)){if(c==45){s=1;c=getchar();break;}c=getchar();}while((48<=c)&&(c<=57)){f=f*10+(c-48);c=getchar();}return s?-f:f;}
short int nextShort(){short f=0;char s=0;char c=getchar();while((c<48)||(57<c)){if(c==45){s=1;c=getchar();break;}c=getchar();}while((48<=c)&&(c<=57)){f=f*10+(c-48);c=getchar();}return s?-f:f;}
long long int nextLong(){long long int f=0;char s=0;char c=getchar();while((c<48)||(57<c)){if(c==45){s=1;c=getchar();break;}c=getchar();}while((48<=c)&&(c<=57)){f=f*10+(c-48);c=getchar();}return s?-f:f;}
void println(){putchar(10);}
void print(char *f){while(*f){putchar(*f);f++;}}
void printInt(int f){char c[10];if(!f){putchar(48);return;}if(f<0){f=-f;putchar(45);}char i=0;while(f){c[++i]=(f%10)+48;f/=10;}while(i){putchar(c[i--]);}}
void printLong(long long int f){char c[19];if(!f){putchar(48);return;}if(f<0){f=-f;putchar(45);}char i=0;while(f){c[++i]=(f%10)+48;f/=10;}while(i){putchar(c[i--]);}}
int n, a, b, c, d, e, i;
char s[200002];
int main(void){
 scanf("%d%d%d%d%d\n", &n, &a, &b, &c, &d);
 scanf("%s", s+1);
 for(i=a; i<c; i++){
  if(s[i]=='#'&&s[i+1]=='#'){
   print("No\n"); return 0;
  }
 }
 for(i=b; i<d; i++){
  if(s[i]=='#'&&s[i+1]=='#'){
   print("No\n"); return 0;
  }
 }
 if(c<d){
  print("Yes\n"); return 0;
 }
 for(i=b-1; i<d; i++){
  if(s[i]=='.'&&s[i+1]=='.'&&s[i+2]=='.'){
   print("Yes\n"); return 0;
  }
 }
 print("No\n"); return 0;
}


Measured memory_bytes: 384
N,Y = list(map(int,input().split()))

for a in range(N+1):
  for b in range(N+1-a):
    if 10000*a + 5000*b + 1000*(N-a-b) == Y and N-a-b >= 0:
      print("{} {} {}".format(a,b,N-a-b))
      quit()

print("-1 -1 -1")

Measured memory_bytes: 3060
#include <iostream>
//#include <string>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    if((a+b)%2 == 0){
        cout << (a+b)/2 << endl;
    }
    else{
        cout << 1 + ((a+b)/2) << endl;
    }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0,i##_len=(int)(n);i<i##_len;i++)
#define rep1(i,n)for(int i=1,i##_len=(int)(n);i<=i##_len;i++)
#define rrep(i,n) for(int i=(int)(n)-1;0<=i;i--)
#define rrep1(i,n) for(int i=(int)(n);1<=i;i--)

#define each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define all(obj) (obj).begin(),(obj).end() 

#define pcount __builtin_popcount
#define SZ(x) ((int)(x).size())
#define LEN(x) ((int)(x).length())

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define endl "\n"

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;}

typedef long long lint;

using namespace std;
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,ans=0;
	cin>>n;
	rep1(i,n){
		if(i%2==0)continue;
		int div=0;
		rep1(j,i){
			if(i%j==0)div++;
		}
		if(div==8)ans++;
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 256
// https://atcoder.jp/contests/abc100/tasks/abc100_a
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) FOR(i, 0, n)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)

int main(void) {
    int a, b;
    cin >> a >> b;
    if (b >= 100)
        b++;
    cout << (int)pow(100, a) * b << endl;

    return 0;
}


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

#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define fi first
#define se second
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

typedef long long ll;

const ll MOD=1000000007ll;
const int MAX=5100000;

using namespace std;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    for(int i=0;i<a;i++){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    for(int i=0;i<a;i++){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

ll fact[MAX], fact_inv[MAX];

ll power(ll a, ll b){
	ll res=1;
	while(b>0){
		if(b&1) res=res*a%MOD;
		a=a*a%MOD;
		b>>=1;
	}
	return res;
}

// nCr
ll comb(ll n, ll r){
	ll t=1000000;
	fact[0]=1;
	    for(int i=0;i<t;i++){ fact[i+1]=fact[i]*(i+1)%MOD;}
	fact_inv[t]=power(fact[t], MOD-2);
	for(int i=0;i<t;i++){ fact_inv[i]=fact_inv[i+1]*(i+1)%MOD;}
	return (fact[n]*fact_inv[r])%MOD*fact_inv[n-r]%MOD;
}
  
int main()
{
	cin.tie(0);	ios::sync_with_stdio(false);

  ll A,B,C,D,N; cin >> A >> B >> C >> D >> N;
  ll tmpC = min(min(C,B*2),A*4);
  ll tmpD = min(tmpC*2,D);
  ll ans = (N/2) * tmpD + (N%2) * tmpC;
  cout << ans << endl;

  return 0;
}


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

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

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

  sort(t.begin(),t.end());

  int cur = 0;
  int answer = 1;
  while(true) {
    int i = 0;
    while(i < c && t[i + cur] <= t[cur] + k && cur + i < n)
      i++;

    if(cur + i == n) break;
    cur = cur + i;
    answer++;
  }
  cout << answer << endl;
  return 0;
}



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

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

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

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

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

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

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

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

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

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

#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
    input!{
        n: usize,
        k: usize,
        mut v: [usize; n]
    }
    if k >= n {
        println!("0");
        return;
    }
    v.sort_by(|x, y| y.cmp(x));
    println!("{}", v[k..n].iter().cloned().sum::<usize>());
}


Measured memory_bytes: 6396
import sys
from collections import defaultdict
import numpy as np
input = sys.stdin.readline


def log(*args):
    print(*args, file=sys.stderr)


def main():
    np.set_printoptions(threshold=20)
    n = int(input())
    a = [*map(int, input().rstrip().split())]
    m = defaultdict(int)
    for v in np.append(np.cumsum(a), 0):
        m[v] += 1
    ans = 0
    for key in m:
        v = m[key]
        if v > 1:
            ans += v * (v - 1) // 2
    print(ans)


if __name__ == '__main__':
    main()


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

#define rep(i, N) for (ll i = 0; i < N; i++)
#define rep1(i, N) for (ll i = 1; i <= N; i++)
#define repr(i, N) for (ll i = N-1; i >= 0; i--)
#define repr1(i, N) for (ll i = N; i > 0; i--)

#define MOD 998244353

using ll = long long;
using namespace std;

typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<P> vpi;
typedef pair<ll,ll> Pl;
typedef vector<ll> vl;
typedef vector<Pl> vpl;

int main() {
    int N;
    ll ans = MOD;
    cin >> N;
    vi a(N);
    rep(i,N) cin >> a[i];

    for(int i = -100; i <= 100; i++) {
        ll tmp = 0;
        rep(j,N) {
            tmp += (a[j]-i)*(a[j]-i);
        }
        ans = min(ans,tmp);
    }

    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
 
using namespace std;
 
#define repr(i,a,b) for (int i=a; i<b; i++)
#define rep(i,n) for (int i=0; i<  n; i++)
 
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
 
const long long INF = 1LL << 60;
#define PI 3.14159265359 
 
template<typename T>
void remove(std::vector<T>& vector, unsigned int index)
{
    vector.erase(vector.begin() + index);
}
 
int gcd(int a, int b){
    if(b == 0) return a;
    else return gcd(b, a%b);
}
 
long long lcm (int a, int b){
    return  (long long) a*b /gcd(a,b);
}




int main(){

    int X,A;
    cin >>X >> A;

    cout << ((X<A)?0:10) << endl;
    

}

Measured memory_bytes: 3660
//おまじない
#include <iostream>
#include<iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <utility>
#include <queue>
#define INF 1e9+7
#define rep(i,n) for(int i=0;i<n;i++)
#define NO cout<<"NO"<<endl;
#define YES cout << "YES"<<endl;
#define No cout << "No"<<endl;
#define Yes cout << "Yes"<<endl;
#define all(a) a.begin(),a.end()
#define P pair<int,int>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

//(int)'a'は97 (int)'A'は65 (int)'1'は49
//おまじない

const int maxn=100000;

int n;
ll num[maxn];
int binum[30]={0};

int main(){
    
    cin >> n;
    rep(i,n){
        cin >> num[i];
    }
    
    sort(num,num+n);
    reverse(num,num+n);
    
    //cout << num[0]<<endl;
    ll sub=num[0];
    ll b=1;
    int idx=0;
    
    while(b<num[0]){
        b*=2;
    }
    while(num[0]>0){
        rep(i,n){
            if(num[i]>=b){
                num[i]-=b;
                binum[idx]++;
            }
        }
        idx++;
        b=b/2;
    }
    
    bool key=true;
    rep(i,idx){
        int oddnum=binum[i];
        int evennum=n-binum[i];
        //cout << oddnum<<' '<<evennum<<endl;
        if(binum[i]>0){
            if(n%3==0){
                if(evennum!=n/3||oddnum!=(n/3)*2)key=false;
            }else if(n%3==1){
                if(evennum%3!=n/3||oddnum!=(n/3)*2+1)key=false;
            }else if(n%3==2){
                if(evennum!=n/3||oddnum!=(n/3)*2+1)key=false;
            }
        }
        
        if(!key)break;
    }
    
    if(key){
        Yes;
    }else{
        No;
    }
    
    return 0;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define all(x) (x).begin(), (x).end()
#define PI 3.14159265358979323846264338327950L
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
    int n;
    cin>>n;
    vector<int> a(n);
    rep(i,n) cin>>a[i];
    sort(all(a));
    rep(i,n-1){
        if(a[i]==a[i+1]){
            cout<<"NO";
            return 0;
        }
    }
    cout<<"YES";
}

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

int main()
{
  int H,W;

  while(1)
  {
    cin >> H >> W;
    if(H == 0 && W == 0) break;

    for(int i = 1; i <= H; i++)
    {
      for(int j = 1; j <= W; j++)
      {
        if((i % 2 != 0 && j % 2 != 0) || (i % 2 == 0 && j % 2 == 0) )
        {
          cout << "#";
        }else{
          cout << ".";
        }

      }
      cout << "\n";
    }
    cout << endl;
  }

  return 0;
}

Measured memory_bytes: 3096
#include<stdio.h>

int search(int A[], int n, int key){
	int i=0;
	A[n] = key;
	while(A[i] != key) i++;
	return i != n;
}

int main(){
	int i, n, A[10000+1], q, key, sum=0;
	
	scanf("%d",&n);
	for(i=0;i<n;i++) scanf("%d",&A[i]);
	
	scanf("%d",&q);
	for(i=0;i<q;i++){
		scanf("%d",&key);
		if(search(A, n, key)) sum++;
		}
		
		printf("%d\n",sum);
		
		return 0;
	}
	

Measured memory_bytes: 640
#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define bg begin()
#define ed end()
#define rbg rbegin()
#define red rend()
#define all(x) x.bg,x.ed
#define rall(x) x.rbg,x.red
#define pb push_back
#define pf push_front
#define eb emplace_back
using namespace std;
typedef long long ll;
template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b; return true;} return false;}
template<class t,class u> bool chmin(t&a,u b){if(a>b){a=b; return true;} return false;}
template<class t,class u> t MAX(t a,u b){if(a>=b) return a; return b;}
template<class t,class u> t MIN(t a,u b){if(a<=b) return a; return b;}
template<class t> int SIZE(t s){return (int)s.size();}
template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;
using vvi=vc<vc<int>>;
using pi=pair<int,int>;
using vi=vc<int>;
void yes(){ cout << "Yes" << endl; }
void no(){ cout << "No" << endl; }
const long long INF = 1LL << 60;

int main(){
    cout << fixed << setprecision(20);
    ll num; cin >> num;
    string s = "";
    while(num){
        num--;
        s += 'a' + (num % 26);
        num /= 26;
    }
    reverse(all(s));
    cout << s << endl;
    return 0;
}


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

int main(){
    int a,b,t;
    cin >> a >> b >> t;
    int count = 0;
    int i = 1;
    while(i * a <= t + 0.5){
        count += b;
        i++;
    }

    cout << count << endl;

}

Measured memory_bytes: 256
N, K = map(int, input().split())
A = list(map(int, input().split()))
F = list(map(int, input().split()))

A.sort()
F.sort(reverse=True)

#積をx以下にするために必要な修行回数
def f(x):
    r = 0
    for i in range(N):
        a, f = A[i], F[i]
        m = a * f
        if m > x:
            r += (m - x + f - 1) // f
    return r

under = -1
r = 10**18
while r - under > 1:
    m = (under + r) // 2
    if f(m) > K: under = m
    else: r = m
print(r)

Measured memory_bytes: 119500
#include <stdio.h>

int main(void)
{
    int a, b;

    scanf("%d %d", &a, &b);

    if(a < b)
    {
        printf("a < b\n");
    }

    else if(a > b)
    {
        printf("a > b\n");
    }

    else if(a == b)
    {
        printf("a == b\n");
    }

    return 0;
}

Measured memory_bytes: 580
#include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
vector<int> ql[N], qid[N], tree(N);
int n, q;
void update(int id, int val)
{
    while (id <= n)
    {
        tree[id] += val;
        id += (id & -id);
    }
}
int query(int id)
{
    int ans = 0;
    while (id > 0)
    {
        ans += tree[id];
        id -= (id & -id);
    }
    return ans;
}
int get(int l, int r)
{
    return query(r) - query(l - 1);
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cin >> n;
    cin >> q;
    int l, r, x;
    int c[n + 1], a[n + 1] = {0}, ans[q];
    for (int i = 1; i <= n; i++)
    {
        cin >> c[i];
    }
    for (int i = 0; i < q; i++)
    {
        cin >> l >> r;
        ql[r].push_back(l);
        qid[r].push_back(i);
    }   
    for (int i = 1; i <= n; i++)
    {
        if (a[c[i]] > 0)
            update(a[c[i]], -1);
        update(i, 1);
        a[c[i]] = i;
        for (int j = 0; j < ql[i].size(); j++)
        {
            ans[qid[i][j]] = get(ql[i][j], i);
        }
    }
    for (int i = 0; i < q; i++)
        cout << ans[i] << "\n";
}

Measured memory_bytes: 53016
#pragma GCC optimize("Ofast",3,"inline")
#include<bits/stdc++.h>
using namespace std;
#define fir first
#define sec second
#define m_p make_pair
#define y1 ygftgfgcdtfgxffgx
#define y2 yfdsesgvtyghftfvv
#define x1 xvyr6cf6fgcfgf676
#define x2 xcr6rfc5r66y6r6fr
#define up_bound upper_bound
#define low_bound lower_bound
#define next_per next_permutation
#define pb push_back
#define i_to_s to_string
typedef priority_queue<int> p_queue;
typedef priority_queue<int, vector<int>, greater<int> > min_p_queue;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
int mon[20]={31,28,31,30,31,30,31,31,30,31,30,31};
ll gcd(ll x,ll y){return ((y==0)?x:gcd(y,x%y));}
ll a,b,x,y,n,ans=1,p1,p2;
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
//	freopen(".in","r",stdin);
//	freopen(".out","w",stdout);
	cin>>n;n--;cin>>a>>b;x=a,y=b;
	while(n--){
		cin>>a>>b;
		p1=(x+a-1)/a;
		p2=(y+b-1)/b;
		p1=max(p1,p2);
		x=a*p1,y=b*p1;
	}
	ans=x+y;
	cout<<ans;
	return 0;
}



Measured memory_bytes: 256