akhauriyash/Code-Regression huggingface dataset:
// -*- coding:utf-8-unix -*-

#[macro_use]
extern crate lazy_static;

// use proconio::derive_readable;
use proconio::fastout;
use proconio::input;
// use std::convert::TryInto;
use libm::*;
use std::cmp::*;
use std::io::*;
use std::str::FromStr;
use superslice::*;

pub 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")
}

//abc042-C
#[fastout]
fn main() {
    let mut n: u64 = read();
    let k = read();

    let mut d = Vec::new();
    for _ in 0..k {
        d.push(read());
    }

    loop {
        let mut mid = n;
        let mut is_ok = true;
        while mid > 0 {
            let remaind = mid % 10;
            if d.contains(&remaind) {
                is_ok = false;
                break;
            }

            mid /= 10;
        }

        if is_ok {
            println!("{}", n);
            return;
        }
        n += 1;
    }
}

fn go(mid: usize, d: usize, use_num: usize, num753_cand: &mut Vec<usize>, n: usize) {}


Measured memory_bytes: 2180
#include<bits/stdc++.h>
using namespace std;
int main() {
	int n; cin >> n;
	int cnt[4] = {};
	for (int i = 0; i < n; i++)
	{
		string s; cin >> s;
		if(s == "AC") cnt[0]++;
		else if(s == "WA") cnt[1]++;
		else if(s == "TLE") cnt[2]++;
		else cnt[3]++;
	}

	cout << "AC x " << cnt[0] << endl;
	cout << "WA x " << cnt[1] << endl;
	cout << "TLE x " << cnt[2] << endl;
	cout << "RE x " << cnt[3] << endl;

	return 0;
}


Measured memory_bytes: 3592
# row = [int(x) for x in input().rstrip().split(" ")]
# n = int(input().rstrip())
# s = input().rstrip()
# row = [int(input().rstrip()) for _ in range(n)]

def resolve():
    import sys
    input = sys.stdin.readline

    word_dict = {}
    n = int(input().rstrip())
    for i in range(n):
        s = input().rstrip()
        if s not in word_dict:
            word_dict[s] = 0
        word_dict[s] += 1

    m = int(input().rstrip())
    for i in range(m):
        s = input().rstrip()
        if s not in word_dict:
            word_dict[s] = 0
        word_dict[s] -= 1

    ans = max(word_dict.values())
    print(ans if ans > 0 else 0)

if __name__ == "__main__":
    resolve()


Measured memory_bytes: 62048
{-# LANGUAGE FlexibleInstances    #-}
{-# LANGUAGE TypeSynonymInstances #-}

import           Control.Applicative
import           Control.DeepSeq
import           Control.Monad
import           Control.Monad.ST
import qualified Data.Array                  as A
import qualified Data.Array.IArray           as IA
import qualified Data.Array.IO               as AI
import qualified Data.Array.MArray           as MA
import qualified Data.Array.ST               as STA
import qualified Data.Array.Unboxed          as AU
import           Data.Bits
import qualified Data.ByteString.Char8       as BS
import           Data.Char
import qualified Data.Graph                  as G
import           Data.Int
import qualified Data.IntMap                 as IM
import qualified Data.IntSet                 as IS
import           Data.List
import qualified Data.Map.Strict             as M
import           Data.Maybe
import           Data.Ord
import qualified Data.Sequence               as SQ
import qualified Data.Set                    as S
import           Data.Time
import qualified Data.Tree                   as T
import qualified Data.Vector                 as V
import qualified Data.Vector.Mutable         as VM
import qualified Data.Vector.Unboxed         as VU
import qualified Data.Vector.Unboxed.Mutable as VUM

readInt :: IO [Int]
readInt = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

readInts :: Int -> IO [[Int]]
readInts n = replicateM n readInt

readInteger :: IO [Integer]
readInteger = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine

readIntegers :: Int -> IO [[Integer]]
readIntegers n = replicateM n readInteger

readString :: IO [String]
readString = map BS.unpack . BS.words <$> BS.getLine

readStrings :: Int -> IO [[String]]
readStrings n = replicateM n <$> readString

toPair :: [a] -> (a, a)
toPair [x, y] = (x, y)

count :: Eq a => a -> [a] -> Int
count a as = length $ filter (== a) as

put :: Show a => a -> IO ()
put = putStr . show

putLn :: Show a => a -> IO ()
putLn = print

putList :: Show a => [a] -> IO ()
putList [n] = put n
putList (n:ns) = do
  put n
  putStr " "
  putList ns

putStrList :: [String] -> IO ()
putStrList [n] = putStr n
putStrList (n:ns) = do
  putStr n
  putStr " "
  putStrList ns

main = do
  [x] <- readInt
  [a] <- readInt
  [b] <- readInt
  put $ (x - a) `mod` b


Measured memory_bytes: 380
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'

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

    int a[3];

    for(int i = 0;i  < 3;i++) cin >> a[i];

    sort(a,a+3);

    int mn = 0;
    for(int i = 0;i < 2;i++) mn +=a[i+1]-a[i];

    cout << mn;
}


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


int main(){
  ll a,b;
  cin >> a >> b;
  if( a > 0 ){
    cout << "Positive" << endl;
  }else if( a <= 0 && b >= 0 ){
    cout << "Zero" << endl;
  }else if( b < 0 ){
    if( (a-b+1)%2 == 0 ){
      cout << "Positive" << endl;
    }else{
      cout << "Negative" << endl;
    }
  }
    
  return 0;
}


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

int main(int argc, char *argv[])
{
    int X, Y, Z;
    std::cin >> X >> Y >> Z;
    int count = 0;

    while(1) {
        //X -= (Y+Z);
        
        if ((count+1) * (Y + Z) + Z > X) {
            break;
        }
      count++;
    }

    /*
    if ((X - count *(Y+Z) + Z) < 0) {
        count--;
    } else {
        ;
    }
    */
    std::cout << count << std::endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define rep(i,n) for(i=0;i<n;i++)
#define loop(i,a,n) for(i=a;i<n;i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

typedef vector<int> vi;
typedef pair<int,int> pii;

int main(void) {
  int i,j;
  int sx,sy,tx,ty;
  cin>>sx>>sy>>tx>>ty;
  int x=tx-sx;
  int y=ty-sy;
  rep(i,y)cout<<"U";
  rep(i,x)cout<<"R";
  rep(i,y)cout<<"D";
  rep(i,x)cout<<"L";
  cout<<"L";
  rep(i,y+1)cout<<"U";
  rep(i,x+1)cout<<"R";
  cout<<"DR";
  rep(i,y+1)cout<<"D";
  rep(i,x+1)cout<<"L";
  cout<<"U";
  cout<<endl;
}

Measured memory_bytes: 384
#include<iostream>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<string.h>
#include<string>
#include<set>
#include<map>
#include<vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> P;

int N;
int a[200010],b[200010];

int main(){
    cin>>N;
    int mB=2001001001;
    LL sum=0;
    for(int i=0;i<N;i++){
        cin>>a[i]>>b[i];
        if(a[i]>b[i] && b[i] < mB){
            mB = b[i];
        }
        sum += b[i];
    }
    if(mB>=2001001001){
        cout<<0<<endl;
        return 0;
    }
    cout << sum - mB <<endl;
    return 0;
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define rep(N) for (int i = 0; i < N; ++i)
#define Rep(a, b) for (int i = a; i < b; ++i)
#define For(i, N) for (int i = 0; i < N; ++i)
#define all(v) v.begin(), v.end()
#define rev(v) v.rbegin(), v.rend()
#define makei(N) int N; cin >> N;
#define makel(N) ll N; cin >> N;
#define makes(s) string s; cin >> s;
#define maked(d) double d; cin >> d;
#define makev(v, N) vi v(N); rep(N)cin >> v[i];
#define mod 1000000007
#define re return 0

using namespace std;
using ll = long long int;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vs = vector<string>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using msi = map<string, int>;

template<typename T>
void say(T s) {
	cout << s << "\n";
}

template<typename T>
void say(vector<T> s) {
	auto itr = s.begin();
	cout << *(itr++);
	while (itr != s.end()) {
		cout << " " << *(itr++);
	}
	cout << "\n";
}

void yn(bool b) {
	if (b)say("Yes");
	else say("No");
}

template<typename T>
void maxi(T &a, T &b) {
	a = max(a, b);
}

template<typename T>
void mini(T &a, T &b) {
	a = min(a, b);
}

int main() {
	makev(v, 3);
	makei(K);
	sort(rev(v));
	say((int)pow(2, K)*v[0] + v[1] + v[2]);
}

Measured memory_bytes: 512
def main():
    n = int(input())
    a = list(map(int, input().split()))
    a_s = sorted(a)
    a_set = set(a_s)
    maxv = max(a)
    res = [0] * maxv
    rep = 0
    for i in a_s:
        if res[i-1] == 0:
            for j in range(i, maxv+1, i):
                res[j-1] += 1
        else:
            res[i-1] +=1
    cnt = 0
    for i in range(n):
        if res[a[i]-1] == 1:
            cnt += res[a[i]-1]
    print(cnt)

if __name__ == '__main__':
    main()

Measured memory_bytes: 35864
#include <iostream>
#include <cmath>
#include <climits>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <numeric>
using namespace std;
// scanf
#pragma warning(disable: 4996)
// v:vector  type:型  order:greater or less
#define _sort(v,type,order) do { sort(v.begin(),v.end(),order<type>()); } while(0)
// v:vector  default_value:初期値
#define _sum(v,default_value) accumulate(v.begin(),v.end(),default_value )
// 丸め
#define _round(v) round(v)
// 2乗 / 3乗
#define _square(v) pow(v,2)
#define _cube(v)   pow(v,3)
// 大小判定
#define _max(x,y) max(x,y)
#define _min(x,y) min(x,y)
// string ⇒ int
#define _stringtoi(s) stoi(s)
// double 平方根
#define _sqrt(x) sqrt(x)
// double 引数 x 以上で最小の整数値
#define _ceil(x) ceil(x)

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

	uint32_t result = 700;
	for (uint32_t i = 0; i < 3; i++) {
		if (s[i] != 'o') { continue; }
		result += 100;
	}
	printf("%d\n", result);
	return 0;
	//	std::cout << "Hello World!\n"; 
}


Measured memory_bytes: 384
n,m = list(map(int,input().split()))
dp = [0]*(n+1)
for i in range(m):
    x = int(input())
    dp[x] = -1
dp[0] = 1
for i in range(1,n+1):
    if dp[i] == -1:continue
    elif dp[i-1] == -1:dp[i] = dp[i-2]
    elif dp[i-2] == -1:dp[i] = dp[i-1]
    elif i > 1:
        dp[i] = dp[i-2]+dp[i-1]
    else:dp[i] = dp[i-1]
print(dp[n]%(10**9+7) if dp[n] != -1 else 0)

Measured memory_bytes: 460020
mod io{
    use std::io::*;
    pub fn read<T: ::std::str::FromStr>()->T{
        let stdin=stdin();
        let ret=stdin.lock().bytes().map(|c|c.unwrap()as char)
        .skip_while(|c|c.is_whitespace())
        .take_while(|c|!c.is_whitespace())
        .collect::<String>().parse().ok().unwrap();
        ret
    }
}
use io::read;
fn main()
{
  let n=25-read::<i32>();
  print!("Christmas");
  for _ in 0..n{print!(" Eve")}
}

Measured memory_bytes: 4352
MOD = 10 ** 9 + 7


def mod_power(n, p, m):
    if p == 0: return 1
    if p % 2 == 0:
        half = mod_power(n, p // 2, m)
        return half * half % m
    else:
        return n * mod_power(n, p - 1, m)


n = int(input())
a = list(map(int, input().split()))

csum_invs = [0]
t = 0
for i in range(1, n + 1):
    t += pow(i, MOD - 2, MOD)
    t %= MOD
    csum_invs.append(t)

fact = []
t = 1
for i in range(1, n + 1):
    t *= i
    t %= MOD
    fact.append(t)

ans = 0
for i in range(n):
    t = a[i] * (csum_invs[n - i] + csum_invs[i + 1] - 1)
    t %= MOD
    ans += t

ans *= fact[-1]
ans %= MOD

print(ans)

Measured memory_bytes: 15340
<?php

$array = [0, 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51];
fscanf(STDIN, "%d", $num);

echo $array[$num];

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

class Baseball{
private:
	int point_count;
	int out_count;
	int runner;

public:
	 Baseball(int p, int o, int r);
	 void singleHit();
	 void homerun();
	 void out();
	 void newInning();
	 int now_point();
	 int now_out();
	~ Baseball();
};

Baseball::Baseball(int p, int o, int r){
	point_count = p;
	out_count = o;
	runner = r;
}

Baseball::~Baseball(){	
}

void Baseball::singleHit(){
	if(runner < 3){
		++runner;
	}else if(runner == 3){
		++point_count;
	}
}

void Baseball::homerun(){
	point_count += runner+1;
	runner = 0;
}

void Baseball::out(){
	++out_count;
}

void Baseball::newInning(){
	point_count = 0;
	out_count = 0;
	runner = 0;
}

int Baseball::now_point(){
	return point_count;
}

int Baseball::now_out(){
	return out_count;
}

int main(){
	int num;
	std::string event;
	Baseball baseball(0,0,0);

	std::cin >> num;

	for(int i=0; i<num; ++i){
		baseball.newInning();

		while(baseball.now_out() < 3){
			std::cin >> event;

			if(event == "HIT"){
				baseball.singleHit();

			}else if(event == "HOMERUN"){
				baseball.homerun();

			}else if(event == "OUT"){
				baseball.out();

			}
		}

		std::cout << baseball.now_point() << std::endl;
	}
	
}

Measured memory_bytes: 1208
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
 
int main()
{
  int N, x;
  cin >> N >> x;

  vector<int> a(N);
  REP(i, N) cin >> a[i];
  
  sort(ALL(a));
  int cnt = 0;
  int flag = 0;
  REP(i,N){
    x -= a.at(i);
    cnt++;
    if(x<0){
      cout << cnt - 1 << endl;
      flag = 1;
      break;
    }
  }
  if(flag == 0 && x != 0){
    cout << cnt - 1 << endl;
  }else if(flag == 0 && x == 0){
    cout << cnt << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FAST_IO ios::sync_with_stdio(false)
using namespace std;
typedef long long ll;
const int maxn=1e6+20;

int main()
{
	ll x,y;
	cin >> x >> y;
	if(x%y==0) cout << -1 << endl;
	else{
		cout << x << endl;
	}
	
	return 0;
}//Good luck,mate!^_^

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

void solve()
{
	int a,b,c;
	int c5 = 0,c7 = 0;
	cin >> a >> b >> c;

	if (a == 5){
		c5++;
	}
	if (b == 5){
		c5++;
	}
	if (c == 5){
		c5++;
	}
	if (a == 7){
		c7++;
	}
	if (b == 7){
		c7++;
	}
	if (c == 7){
		c7++;
	}


	if (c5 == 2 && c7 == 1){
		cout<<"YES\n";
	}else{
		cout<<"NO\n";
	}
}
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);

	solve();
	return 0;
}

Measured memory_bytes: 3604
class Solver:
    def __init__(self, n, a, b, c, d):
        self.n = n
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.dc = {}

    def coin(self, n):

        if n == 0:
            return 0
        elif n == 1:
            return self.d
        elif n == -1:
            return self.d
        elif n in self.dc.keys():
            return self.dc[n]
        else:
            coin1 = n * self.d
            coin2 = min(
                (n % 2) * self.d + self.a + self.coin((n - n % 2) // 2),
                ((-n) % 2) * self.d + self.a + self.coin((n + (-n) % 2) // 2),
            )
            coin3 = min(
                (n % 3) * self.d + self.b + self.coin((n - n % 3) // 3),
                ((-n) % 3) * self.d + self.b + self.coin((n + (-n) % 3) // 3),
            )
            coin5 = min(
                (n % 5) * self.d + self.c + self.coin((n - n % 5) // 5),
                ((-n) % 5) * self.d + self.c + self.coin((n + (-n) % 5) // 5),
            )
            result = min([coin2, coin3, coin5, coin1])
            self.dc[n] = result
            return result

    def solve(self):
        return self.coin(self.n)


# x = Solver(11, 1, 2, 4, 8).solve()
# x = Solver(29384293847243,454353412,332423423,934923490,1).solve()
# print(x)

t = int(input())
q = [map(int, input().split()) for _ in range(t)]

for n, a, b, c, d in q:
    answer = Solver(n, a, b, c, d).solve()
    print(answer)


Measured memory_bytes: 10820
#include<iostream>
#include<stdio.h>//printf("%.15f\n",*********);
#include<vector>//文字列.erase(n),vector
#include<algorithm>//next_permutation
#include<set>
#include<string>//char(小文字-32=大文字)
                //to_string,string,substr
#include<sstream>
#include<complex>
#include<time.h>
#include<random>
#include<cmath>//min,max
#include<math.h>
#include<queue>
#include<time.h>
#include<iomanip>
#include<locale>
#include<utility>//swap
#define rt "\n"
#define rep(i,n) for(int i=0;i<n;i++)
#define rop(i,n) for(int i=1;i<=n;i++)//start==1
#define drep(i,n) for(int i=n-1;0<=i;i--)
#define drop(i,n) for(int i=n;0<i;i--)//end==1
#define yes(ans) if(ans)cout<<"yes"<<rt;else cout<<"no"<<rt;
#define Yes(ans) if(ans)cout<<"Yes"<<rt;else cout<<"No"<<rt;
#define YES(ans) if(ans)cout<<"YES"<<rt;else cout<<"NO"<<rt;
#define Yay(ans) if(ans)cout<<"Yay!"<<rt;else cout<<":("<<rt;
#define sec(a,b,ans) if(ans)cout<<a<<rt;else cout<<b<<rt;
#define vcin(s,n) rep(i,n)cin>>s[i];//vcin(配列名),(繰り返し回数)
#define sort(s) sort(s.begin(),s.end())//標準=昇順
#define reve(s) reverse(s.begin(),s.end())//反転
#define str string
#define please return
#define AC 0
#define rapid_pleaseAC_fast cin.tie(0);ios::sync_with_stdio(false)
#define pi 3.1415926535897932384626//pi
#define nine 1000000000//10^9

using namespace std;
typedef vector<int> vint;
typedef long double ldouble;
typedef vector<string> vstr;
typedef vector<char> vchar;
typedef vector<double> vdou;
typedef vector<double> vdouble;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<char>> vvchar;
typedef vector<vector<double>> vvdouble;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<string>> vvstr;
typedef vector<vector<bool>> vvbool;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;

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

long long LCM(long long a, long long b) {
	return a * b / GCD(a, b);
}

unsigned GetDigit(unsigned num) {
	return std::to_string(num).length();
}

int tow(int n) {//2のn乗
	if (n == 0)return 1;
	int x = tow(n / 2);
	x *= x;
	if (n % 2 == 1)x *= 2;
	return x;//@domino
}

int KETA(int n) { //Sum of Each Digit
	int sum = 0;
	while (n > 0) {
		sum += n % 10; n /= 10;
	}
	return sum;
}

unsigned ND(unsigned num) {//Number of Digits
	return std::to_string(num).length();//outmax=10
}//stringのほうが効率よくないか？

bool KIBN(string s) {
	rep(i, s.size() / 2) {
		if (s[i] != s[s.size() - 1 - i])return false;
	}
	return true;
}

/*

 (char)toupper(a[n])=文字列のn文字目を大文字で出力

  pow(a,b)=aのb乗

  */


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

	if (a == b)cout << c << rt;
	if (b == c)cout << a << rt;
	if (a == c)cout << b << rt;

	please AC;
}
//参考：---

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep( i, n ) for (long long i = 0; i < ( long long )(n); i++)

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

int main(){
  int n,m;
  int ans=0;
  ll sum =0;
  cin>>n>>m;

  vector<int> a(n);

  rep(i,n){
    cin>>a[i];
    sum+=a[i];
  }
  sort(a.begin(),a.end());
  reverse(a.begin(),a.end());

  rep(i,m){
    if((double)a[i]<sum/(4.0*m)){
      cout<<"No";
      return 0;
    }
  }
  cout<<"Yes";
}

Measured memory_bytes: 256
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <boost/range/adaptors.hpp>
#include <iomanip>

int main() {
    std::string S;
    std::cin >> S;

    if (S[2] == S[3] && S[4] == S[5]) {
        std::cout << "Yes" << std::endl;
    } else {
                std::cout << "No" << std::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 m = sc.nextInt();

        int[] ab = new int[n+1];
        for (int i = 0; i < m; i++) {
            ab[sc.nextInt()] += 1;
            ab[sc.nextInt()] += 1;
        }

        for (int i = 1; i <= n; i++) {
            System.out.println(ab[i]);
        }
    }

}

Measured memory_bytes: 23380
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
    string a,b,c;
    cin>>a>>b>>c;
    printf("%c%c%c\n",a[0]-'a'+'A',b[0]-'a'+'A',c[0]-'a'+'A');
    return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <vector>
#include <set>

using namespace std;

using Weight=long long;
static const Weight INF=1LL<<57;

struct Edge {
    size_t src, dst;
    Weight weight;
    Edge() {}
    Edge(size_t src, size_t dst, Weight weight=1):
        src(src), dst(dst), weight(weight)
    {}
};

bool operator<(const Edge &e, const Edge &f) {
    if (e.weight != f.weight) {
        return e.weight > f.weight;
    } else {
        return e.src!=f.src? e.src<f.src : e.dst<f.dst;
    }
}

using Edges=vector<Edge>;
using Vertex=vector<Edge>;
using Graph=vector<Vertex>;

void join(Graph &g, size_t s, size_t d, Weight w=1) {
    // non-directed
    g[s].push_back(Edge(s, d, w));
    g[d].push_back(Edge(d, s, w));
}

void connect(Graph &g, size_t s, size_t d, Weight w=1) {
    // directed
    g[s].push_back(Edge(s, d, w));
}

void visit(
    const Graph &g, size_t v, size_t u, set<size_t> &artpoint,
    vector<size_t> &num, vector<size_t> &low, int &time
) {
    low[v] = num[v] = ++time;
    for (const Edge &e: g[v]) {
        size_t w=e.dst;
        if (!num[w]) {
            visit(g, w, v, artpoint, num, low, time);
            low[v] = min(low[v], low[w]);

            if (num[v]==1? num[w]!=2 : low[w]>=num[v])
                artpoint.insert(v);

        } else {
            low[v] = min(low[v], num[w]);
        }
    }
}

set<size_t> get_artpoint(const Graph &g) {
    const size_t V=g.size();

    vector<size_t> low(V), num(V);
    set<size_t> artpoint;
    for (size_t u=0; u<V; ++u) if (!num[u]) {
        int time=0;
        visit(g, u, -1, artpoint, num, low, time);
    }

    return artpoint;
}

int main() {
    size_t V, E;
    scanf("%zu %zu", &V, &E);

    Graph g(V);
    for (size_t i=0; i<E; ++i) {
        size_t s, t;
        scanf("%zu %zu", &s, &t);

        join(g, s, t);
    }

    set<size_t> artpoint=get_artpoint(g);

    for (size_t v: artpoint)
        printf("%zu\n", v);

    return 0;
}

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

using namespace std;
int main() {

	int A, B;
	cin >> A >> B;
	if (A + B >= 24) {
		(A + B) % 24;
		cout << (A + B) % 24 << endl;
	}
	else
	{
		cout << A + B << endl;
	}
	

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
typedef long long ll;
#define RP(i, f, t) for (int i = f; i < t; i++)
#define PR(i, f, t) for (int i = t - 1; i >= f; i--)
int main()
{
    ll h, w;
    cin >> h >> w;
    char s[h][w];
    ll d[h * w][h * w];
    RP(i, 0, h * w)
    {
        RP(j, 0, h * w)
        {
            d[i][j] = inf;
            if (i == j)
                d[i][j] = 0;
        }
    }
    ll dx[] = {0, 0, 1, -1}, dy[] = {1, -1, 0, 0};
    RP(i, 0, h)
    {
        RP(j, 0, w)
        {
            cin >> s[i][j];
        }
    }

    RP(i, 0, h)
    {
        RP(j, 0, w)
        {
            RP(k, 0, 4)
            {
                if (s[i][j] == '.' && i + dx[k] >= 0 && i + dx[k] < h && j + dy[k] >= 0 && j + dy[k] < w && s[i + dx[k]][j + dy[k]] == '.')
                {
                    d[w * i + j][w * (i + dx[k]) + j + dy[k]] = 1;
                    d[w * (i + dx[k]) + j + dy[k]][w * i + j] = 1;
                }
            }
        }
    }
    ll res = 0;
    RP(k, 0, h * w)
    RP(i, 0, h * w)
    RP(j, 0, h * w)
    d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
    RP(i, 0, h * w)
    {
        RP(j, 0, h * w)
        {
            if (d[i][j] != inf)
            {
                res = max(res, d[i][j]);
            }
        }
    }
    cout << res << endl;
}


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

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl




typedef long long ll;
const ll mod = 1e9+7;
const int maxn = 3003;





ll dp[maxn][maxn];
int n;
string s;


void add(ll &x, ll y) {
    x %= mod;
    y %= mod;
    x += y;
    x %= mod;
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
    cin>>n>>s;

    s="*"+s;
    dp[1][1]=1;

    for (int i=2; i<=n; i++) {
	
	for (int j=1; j<=i; j++) {
	    dp[i-1][j] += dp[i-1][j-1];
	    dp[i-1][j] %= mod;
	}

	
	for (int j=1; j<=i; j++) {
	    if (s[i-1]=='<') {
		ll acc=dp[i-1][j-1];
		dp[i][j] += acc;
	    }
	    if (s[i-1]=='>') {
		ll acc=dp[i-1][i]-dp[i-1][j-1];
		dp[i][j] += acc;
	    }
	    dp[i][j] %= mod;
	}
	// for (int b=1; b<=i; b++) {
	//     for (int a=1; a<=i-1; a++) {
	// 	//...a,b
	// 	int real_a = a;
	// 	if (a>=b) real_a++;
	// 	assert(real_a!=b);
	// 	if ((real_a<b) != (s[i-1]=='<')) {
	// 	    continue;
	// 	}
	// 	add(dp[i][b], dp[i-1][a]);
	//     }
	// }
    }


    ll res = 0;
    for (int j=1; j<=n; j++) {
	add(res, dp[n][j]);
    }
    res %= mod;
    res += mod;
    res %= mod;
    cout<<res<<endl;

    return 0;
}


Measured memory_bytes: 68992
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define f(i,l,n) for(ll i=l;i<n;i++)
#define ff first
#define ss second
#define pb push_back
#define E "\n"
#define mp make_pair
#define N (ll)pow(2,32)-1
 
const int M=1e9+7;


 int solve()
 {

  int x,y,z;
  cin >> x >> y >> z;
  cout<<z<<" "<<x<<" "<<y<<E;
  return 0;
 }
int32_t main()
{
 

  int t=1;
  //cin >> t;
  while(t--)
  {
    solve();  
  }
}

Measured memory_bytes: 256
/*
    Rem is cute :D
*/

# include <bits/stdc++.h>

using namespace std;

#define pii pair<int, int>
#define pll pair<ll, ll>

#define pb push_back
#define eb emplace_back
#define mp make_pair

#define fi first
#define se second

#define y0 asjdlksajldjals
#define y1 ajsldjalksdkjlk

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;

const int inf = (int)1e9 + 7;
const int maxn = (int)4e5 + 7;
const int lmaxn = (int)2e6 + 7;
const ll linf = (ll)1e18 + 7;

const ld eps = ld(1e-11);

const ll dx[] = {-1, 0, 0, 1};
const ll dy[] = {0, -1, 1, 0};

ll gcd(ll a, ll b){
    while(b) a %= b, swap(a, b);
    return a | b;
}

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

int n, m, k;
int u[111], a[211][211];
vector < int > g[111], vec;
char b;
string s;

int main(){
  cin >> s;
  if(s[0] == 9){
    cout << 1111;
  }
  b = *max_element(s.begin(), s.end());
  if(b > s[0]){
    k = s[0] - '0';
    k++;
    cout << k * 111;
  }
  else{
    k = s[0] - '0';
    cout << k * 111;
  }
  return 0;
}


Measured memory_bytes: 256
#include<iostream>   //AA06( 21/ 04/ 20) If u see my code, Have a Good Day! (^_^)

using namespace std;

int main()
{
    long long int N, i, sum = 0;

    cin >> N;

    for(i = 1; i <= N; ++i) {

        if(i % 3 == 0 || i % 5 == 0 || i % 15 == 0) {
            continue;
        }

        sum = sum + i;


    }

    cout << sum << endl;

    return 0;
}


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

#undef int
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
#define int long long int
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int t = 1;
	while (t--) {
		int n;
		string s, p;
		cin >> s;
		cin >> p;
		n = s.length();
		int cnt = 0;
		for (int i = 0; i < n; i++ ) {
			if (s[i] != p[i])
				cnt++;
		}
		cout << cnt << endl;
	}

	return 0;
}

Measured memory_bytes: 3820
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
#include <time.h>
using namespace std;
//#define int long long
#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
#define chmin(a,b) a=min((a),(b))
#define chmax(a,b) a=max((a),(b))
#define iif(i,j) ((i<0 && j<0) || (i>0 && j>0)) ? true : false 
typedef long long ll;
typedef pair<int, int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint, int> P1;
typedef pair<int, pint> P2;
typedef pair<pint, pint> PP;
static const ll maxLL = (ll)1 << 62;
const ll MOD = 1000000007;
const ll INF = 1e18;
int ca[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };





signed main() {
	int l, m, n, cnt = 0, maxn=-19999999, minn=199999999;
	string s;
	vector<int>list;
	vector<string>slist;
	int h, w, ha, wa;
	vector<vector<bool>>mat(33, vector<bool>(33, false));

	cin >> h >> w;
	cin >> ha >> wa;

	h--;
	w--;
	ha--;
	wa--;

	for (int j = 0; j < ha; j++) {
		for (int i = 0; i < 30; i++) {
			mat[j][i] = true;
		}
	}

	for (int j = 0; j < wa; j++) {
		for (int i = 0; i < 30; i++) {
			mat[i][j] = true;
		}
	}

	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (mat[i][j] == false) {
				cnt++;
			}
		}
	}

	cout << cnt << endl;






	return 0;
}

Measured memory_bytes: 256
//JSD
#include<iostream>
#include<vector>
#include<set>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<limits.h>
#define ll long long 
using namespace std;

int main(){
	ll n;
	cin>>n;
	ll a[n];
	ll mi=INT_MAX;
	int count=0;
	for(ll i=0;i<n;i++){
		cin>>a[i];
		if(a[i]<mi)		{
			count++;			
		}			
		mi=min(mi,a[i]);
	}
	cout<<count;
	return 0;
}

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

int main() {
    int W, H, N;
    int x;
    int y;
    int a;

    cin >> W >> H >> N;

    int xmin = 0;
    int xmax = W;
    int ymin = 0;
    int ymax = H;
    for (int i = 1; i <= N; i++) {
        cin >> x >> y >> a;
        
        if (a == 1) xmin = max(xmin, x);
        else if (a == 2) xmax = min(xmax, x);
        else if (a == 3) ymin = max(ymin, y);
        else if (a == 4) ymax = min(ymax, y); 
    }

    int xlen = xmax - xmin;
    int ylen = ymax - ymin;

    if (xlen < 0 || ylen < 0) cout << 0 << endl;
    else cout << xlen*ylen << endl;

    return 0;
}

Measured memory_bytes: 256
<?php
fscanf(STDIN, "%s", $s);
$result = '';
for($i = 0; $i < strlen($s); $i++) {
    if($s[$i] == '0') {
        $result .= '0';
    } elseif($s[$i] == '1') {
        $result .= '1';
    } else {
        if($result != '') {
            $result = substr($result, 0, strlen($result) - 1);
        }
    }
}
echo $result, PHP_EOL;

Measured memory_bytes: 4728
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
using namespace std;
typedef long long ll;
int main(){
  string s;
  cin>>s;
  if(s[0]==s[1]||s[1]==s[2]||s[2]==s[3]) cout<<"Bad"<<endl;
  else cout<<"Good"<<endl;
}


Measured memory_bytes: 764
#include<iostream>
#include<vector>

using namespace std;

int main(){
  int n,k;
  cin >> n >> k;
  vector<int> vc(n);
  for(int i=0;i<n;i++) {
    cin >> vc[i];
  }
  sort(vc.begin(),vc.end());
  long long ans=0;
  for(int i=0;i<n-k;i++){
    ans += vc[i];
  }

  cout << ans << endl;
}

Measured memory_bytes: 1656
#include <bits/stdc++.h>
    #include <cstdio>
    #include <cstring>
    #include <cmath>
    #include <cstring>
    #include <chrono>
    #include <complex>
    #define ll long long int
    #define ld long double
    #define vi vector<int>
    #define vll vector<ll>
    #define vvi vector < vi >
    #define pii pair<int,int>
    #define pll pair<long long, long long>
    #define mod 1000000007
    #define inf 1000000000000000001;
    #define all(c) c.begin(),c.end()
    #define mp(x,y) make_pair(x,y)
    #define mem(a,val) memset(a,val,sizeof(a))
    #define eb emplace_back
    #define pb push_back
    #define f first
    #define s second
    
    using namespace std;
    int main()
    {
        std::ios::sync_with_stdio(false);
        int T;
        T=1;
        // cin.ignore(); must be there when using getline(cin, s)
        while(T--)
        {
            ll n,i,j,ans=0;
            cin>>n;
            ll ar[n+1];
            for(i=1;i<=n;++i)
                cin>>ar[i];
            for(i=1;i<=n;++i)
            {
                for(j=i+1;j<=n;++j)
                    ans=ans+ar[i]*ar[j];
            }
            cout<<ans<<endl;
        }
        return 0;
    }
	

Measured memory_bytes: 256
#define _USE_MATH_DEFINES

#include <iostream>
#include <cstdio>
#include <memory>
#include <string>
#include <cstdlib>
#include <set>
#include <utility>
#include <vector>
#include <list>
#include <forward_list>
#include <algorithm>
#include <regex>
#include <cmath>
#include <map>
#include <iterator>
#include <climits>
#include <numeric>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <array>
#include <valarray>
#include <complex>
#include <random>
#include <functional>
#include <cassert>
#include <chrono>
#include <memory>

using namespace std;

#define int long long
//region TEMPLATE
////@formatter:off
#define double long double
typedef long long ll;
typedef unsigned long long ull;
template<typename T>void __read(T &a) { cin >> a; }
template<typename T, typename ... Args> void __read(T &a, Args &... args) { cin >> a;__read(args...);}
#define make(t, ...) t __VA_ARGS__; __read(__VA_ARGS__)
#define makev(a, n) VI a(n); FOR(n) cin >> a[i]
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define FORIT(p) for(auto it = p.begin(); it != p.end(); it++)
#define FOR(b) for(signed i = 0; i <(b); i++)
#define FORE(i, l, r) for(int i = (l); i < (r); i++)
#define NFOR(i, n) for(int i = (((int) n)-1); i >= 0; i--)
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef pair<pair<int, int>, int> PPII;
constexpr ll M7 = 1000000007ll;
constexpr ll M9 = 1000000009ll;
constexpr ll MFFT = 998244353ll;
template<class T> void outv(T &a) { for (auto &x : a) cout << x << ' '; }
static mt19937 rnd(static_cast<unsigned>(chrono::steady_clock::now().time_since_epoch().count())); // NOLINT(cert-err58-cpp)
auto __fast_io__ = (ios_base::sync_with_stdio(false), cin.tie(nullptr)); // NOLINT(cert-err58-cpp,cppcoreguidelines-interfaces-global-init)
////@formatter:on
//endregion



int32_t main() {
    make(int, n);
    VI ans;
    while(n > 0){
        n--;
        ans.push_back(n % 26);
        n /= 26;
    }
    reverse(ALL(ans));
    for(auto& i : ans){
        cout << (char)('a' + i);
    }

    return 0;
}

Measured memory_bytes: 3656
#include<bits/stdc++.h>
using namespace std;
template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
#define vpush(a,x) a.push_back(x);
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define INF 2e9
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll a,b;
    cin>>a>>b;
	if(a<b){
      ll tmp=a;
      a=b;
      b=tmp;
    }
  	ll x=a*b;
    ll r=a%b;
    while(r!=0){
        a=b;
        b=r;
        r=a%b;
    }
    cout<<x/b<<'\n';
    return(0);
}

Measured memory_bytes: 256
s,t = gets.chomp.split.map(&:to_s)  # スペースで区切られた複数の文字列
a,b = gets.chomp.split.map(&:to_i)  # スペースで区切られた複数の整数
wk = gets.chomp

if wk == s then
  a = a - 1
  puts a.to_s + " " + b.to_s
elsif wk == t then
  b = b - 1
  puts a.to_s + " " + b.to_s
else
end

Measured memory_bytes: 1788
function Main(input){

  input = input.split(' ').map(num => Number(num));
  
  var a = input[0];
  var b = input[1];
  var c = input[2];
  var d = input[3];

  var ab = a * b;
  var cd = c * d;

  if(ab >= cd) {
    console.log(ab);
  } else {
    console.log(cd);
  }

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

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

using namespace std;

struct proc {
    int time;
    string name;
};

int head = 0, tail = 0;
struct proc queue[1000000];

struct proc dequeue() {
    return queue[head++];
}

void enqueue(proc p) {
    queue[tail++] = p;
}

int count(){
    return tail - head;
}

int main() {
    int n, q, i;
    scanf("%d", &n);
    scanf("%d", &q);

    for(i=0;i<n;i++){
        proc p;
        cin >> p.name;
        cin >> p.time;
        enqueue(p);
    }

    int time = i = 0;
    while (count()>0) {
        proc p = dequeue();
        if(p.time<=q){
            time += p.time;
            cout << p.name << " " << time << endl;
        }else{
            p.time -= q;
            enqueue(p);
            time += q;
        }
    }

}


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

void solve()
{
	ll n;
	cin>>n;
	map<ll,ll> m;
	ll temp = 0;
	for (ll i = 2; i <= n ; ++i)
	{
		if(i>1e6)
		{
			// cout<<1<<endl;
			temp = 1;
			break;
			// return;
		}
		while(n%i==0)
		{
			m[i]++;
			n/=i;
		}
	}
	ll ans = 0;
	for(auto i: m)
	{
		ll j = 1;
		// cout<<i.second<<endl;
		while(j*(j+1)/2<=i.second)
		{
			j++;
		}
		ans += j-1;
	}
	cout<<ans+temp<<endl;
}

int main()
{
	ll t = 1;
	// cin>>t;
	while(t--)
	{
		solve();
	}
}

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

int main() {
    using namespace std;
    unsigned long N;
    cin >> N;
    vector<long> s(N);
    for(auto& i : s)cin >> i;
    long ans{0};
    for(unsigned long i = 1; i < N; ++i){
        long tmp{0};
        for(unsigned long j = 0, k = N - 1; k > i && (k % i != 0 || j < k); j += i, k -= i)ans = max(ans, tmp += s[j] + s[k]);
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 1152
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
using namespace std; using ll = long long; using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vpll = vector<pll>;
//**デバッグ準備**//
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail>
void debug_out(Head h, Tail... t) {
	cerr << " " << h;
	if (sizeof...(t) > 0) cerr << " :";
	debug_out(t...);
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> vec) {
	for (size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
	return os;
}
ll ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0;
	}
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.first > secondElof.first;
}
//**Snippetリスト**//
//rep, vin, all, iteLoop//
//gcdlcm, isPrime, eratos, Npow, divisor, modinv, bitSearch, bitList, dfs, bfs//
//dijkstra, WarshallFloyd, BellmanFord, UnionFind, COM, digitDP ,RMQ//
ll i, j, k, l; ll N, M, K, H, W, L, X, Y, Z;
ll MOD = 1000000007; ll INF = 1LL << 60; ll ans = 0; ll z = 0, o = 1;
vl flag, color, D, Ans, inter; vll path;
void bfs(ll now) {
	queue<ll> Q;
	Q.push(now);
	D[now] = 0;
	Ans[now] = 0;
	ll u;
	while (!Q.empty()) {
		u = Q.front();
		Q.pop();
		for (ll v = 0; v < path[u].size(); v++) {
			ll next = path[u][v];
			if (inter[next] == 1) {
				D[next] = D[u] + 1;
				Ans[next] = u + 1;
				inter[next]--;
				//debug("hoge");
				Q.push(next);
			}else{
				inter[next]--;
		}
		}
	}
}
int main() {
	cin >> N >> M;
	path.resize(N);
	D.resize(N);
	Ans.resize(N);
	inter.resize(N);
	for (i = 0; i < N-1+M; i++) {
		ll a, b;
		cin >> a >> b;
		a--; b--;
		path[a].push_back(b);
		inter[b]++;
	}
	ll par = 0;
	for (i = 0; i < N; i++) {
		if (inter[i] == 0) {
			par = i;
			break;
		}
	}
	bfs(par);
	for (i = 0; i < N; i++) {
		cout << Ans[i] << endl;
	}
}

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

typedef long long ll;
#define rep(i,n) for( ll (i)=0; (i)<(n); ++(i) )
#define rpi(i,n) for( int (i)=0; (i)<(n); ++(i) )
#define rpv(d) for(auto& v:d)
#if __cplusplus < 201703L
  std::ostream& co_(){ return std::cout << std::endl; }
  std::istream& cn_(){ return std::cin; }
  template<class Head, class... Args>
  std::ostream& co_( Head&& head, Args&&... args ){ std::cout << head; return co_(std::forward<Args>(args)...); }
  template<class Head, class... Args>
  std::istream& cn_( Head&& head, Args&&... args ){ std::cin >> head; return cn_(std::forward<Args>(args)...); }
#else
  template<class... Args>
  std::ostream& co_( Args... args ){ return std::cout << ... << args << std::endl; }
  template<class... Args>
  std::istream& cn_( Args... args ){ return std::cin >> ... >> args; }
#endif
#define co(...) co_(__VA_ARGS__);
#define cn(...) cn_(__VA_ARGS__);
#define all(x) (x).begin(), (x).end()
#define rgt(x,i) (x).begin(), (x).begin()+(i)

int main(){
  ll n;
  int k,ans=1;
  cn(n,k)
  while(n/=k)++ans;
  co(ans)
}

Measured memory_bytes: 256
//check violation of constraints

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.NoSuchElementException;

public class Main {

	void run() {
		FastScanner sc = new FastScanner();
		int N = sc.nextInt();
		String S = sc.next();
		if (N % 2 == 1) {
			System.out.println("No");
			return;
		}
		System.out.println(S.substring(0, N / 2).equals(S.substring(N / 2, N)) ? "Yes" : "No");
	}

	public static void main(String[] args) throws FileNotFoundException {
		new Main().run();
	}

	void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Measured memory_bytes: 23124
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')
 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

s=list(ss())
cnt=0
chk=True
if s[0]=="B":
    chk=False
for i in range(len(s)-1):
    if chk==True and s[i+1]=="B":
        chk=False
        cnt+=1
    elif chk==False and s[i+1]=="W":
        chk=True
        cnt+=1
print(cnt)
    



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

typedef long long ll;

#define F first 
#define S second 
#define PB push_back
#define MP make_pair 
#define rep(i,a,b) for (ll i=a;i<b;i++)

typedef vector<int> vi;
typedef pair<int,int> pi;


int main()
{

    ll a,b,k;
    cin>>a>>b>>k;

    if(a>k) {
        cout<<a-k<<" "<<b<<endl;
        return 0;
    }

    k = k-a;

    if(b>k) {
        cout<<0<<" "<<b-k<<endl;
        return 0;
    }

    cout<<0<<" "<<0<<endl;


    return 0; 
}



Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{
    long long arr[100001];
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> arr[i];
    int q;
    cin >> q;
    while (q--) {
        bool key;
        int trash;
        cin >> trash;
        key=binary_search(arr, arr + n, trash);
        if (key)
            cout << "1" << endl;
        else cout << "0" << endl;
    }
}


Measured memory_bytes: 3880
import sys
from heapq import heapify, heappop, heappush

n, d, a = list(map(int, input().split()))
xh = []
for line in sys.stdin:
    x, h = map(int, line.split())
    xh.append((x, 0, h))
heapify(xh)
atk_cnt = 0
ans = 0
while xh:
    x, t, h = heappop(xh)
    if t == 0:
        if atk_cnt * a >= h:
            continue
        remain = h - atk_cnt * a
        new_atk = (remain - 1) // a + 1
        heappush(xh, (x + 2 * d, 1, new_atk))
        ans += new_atk
        atk_cnt += new_atk
    else:
        atk_cnt -= h
print(ans)


Measured memory_bytes: 35652
import sys
input = lambda:sys.stdin.readline().strip()
n = int(input())
l = list(map(int,input().split()))
ans = 0
for l1 in range(n):
    for l2 in range(l1+1,n):
        for l3 in range(l2+1,n):
            if l[l1]!=l[l2] and l[l2]!=l[l3] and l[l1]!=l[l3]:
                if l[l1]+l[l2]>l[l3] and l[l2]+l[l3]>l[l1] and l[l1]+l[l3]>l[l2]:
                    # print(l1+1,l2+1,l3+1)
                    ans+=1
print(ans) 

Measured memory_bytes: 9208
#include<bits/stdc++.h>
#define int long long int
int dp[100010][3],a[100010][3],n;
using namespace std;
int solve(int i,int s)
{
  if(i==-1)
    return 0;
  if(dp[i][s]!=-1)
    return dp[i][s];
  int m=0;
  for(int j=0;j<3;j++)
  { if(j==s)
      continue;
    m=max(m,a[i][j]+solve(i-1,j));}
  return dp[i][s]=m;
}
signed main()
{
  cin>>n;
  memset(dp,-1,sizeof(dp));
  for(int i=0;i<n;i++)
    cin>>a[i][0]>>a[i][1]>>a[i][2];
  cout<<max(a[n-1][0]+solve(n-2,0),max(a[n-1][1]+solve(n-2,1),a[n-1][2]+solve(n-2,2)))<<"\n";
  return 0;
}

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

int main() {
    long X;
    cin >> X;
    long a = 100;
    long ans = 0;
    while(a < X){
        a += a/100;
        ans++;
    }
    cout << ans << endl;

}

Measured memory_bytes: 3636