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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define all(x) (x).begin(),(x).end()
using ll = long long;
string char_to_string(char val) {
  return string(1, val);
}
int char_to_int(char val) {
  return val - '0';
}
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;
}
int vector_finder(std::vector<ll> vec, int number) {
  auto itr = std::find(vec.begin(), vec.end(), number);
  size_t index = std::distance( vec.begin(), itr );
  if (index != vec.size()) { // 発見できたとき
    return 1;
  }
  else { // 発見できなかったとき
    return 0;
  }
}

int main() {
  int n; cin >> n;
  vector<int> S(n); REP(i, n) cin >> S[i];
  int q; cin >> q;
  vector<int> T(q); REP(i, q) cin >> T[i];
  int ans = 0;
  REP(i, q) {
    int ng = -1;
    int ok = n; // 配列Sの末尾
    while(abs(ok - ng) > 1) {
      int mid = (ok + ng) / 2;
      if(T[i] <= S[mid]) ok = mid;
      else ng = mid;
    }
    //cout << ok << " " << S[ok] << endl;
    if(S[ok] == T[i]) ans++;
  }
  cout << ans << endl;
}


Measured memory_bytes: 3268
#! /usr/bin/env perl

use strict;
use warnings;
use POSIX qw(floor ceil);

my $n = <>;
chomp $n;
my $nedann = ceil($n/1.08);
my $ans = floor($nedann * 1.08);

if($ans == $n){
    print("$nedann\n");
}
else{
    print(":(\n")
}



Measured memory_bytes: 1792
def read_input():
    return list(input())


def maximize_point(against):
    """Calc max point.

    >>> maximize_point(list("gpg"))
    0
    >>> maximize_point(list("ggppgggpgg"))
    2
    """
    cash = 0
    point = 0
    for hand in against:
        if hand == "g":
            if cash > 0:
                point += 1
                cash += -1
                # print("p")
            else:
                point += 0
                cash += 1
                # print("g")

        if hand == "p":
            if cash > 0:
                point += 0
                cash += -1
                # print("p")
            else:
                point += -1
                cash += 1
                # print("g")

    return point

if __name__ == "__main__":
    # import doctest

    # doctest.testmod()

    print(maximize_point(read_input()))


Measured memory_bytes: 4084
N, K = map(int, input().split())
p = list(map(int, input().split()))

max_val = 0
max_idx = 0
tmp = 0
for i in range(1,N-K+2):
  if i == 1:
    tmp = sum(p[i-1:i-1+K])
  else:
    tmp = tmp - p[i-2] + p[i-2+K]
  if tmp > max_val:
    max_val = tmp
    max_idx = i

p = p[max_idx-1:max_idx-1+K]
p.sort()
prev_tmp = 0.0
expect = 0.0
for i in range(len(p)):
  tmp = 0.0
  if i == 0:
    for j in range(1,p[i]+1):
      tmp += j
    expect += tmp/p[i]
    prev_tmp = tmp
  else:
    tmp = prev_tmp
    for j in range(p[i-1]+1,p[i]+1):
      tmp += j
    expect += tmp/p[i]
    prev_tmp = tmp
print(expect)


Measured memory_bytes: 24804
/*
1≦H, W≦100
Ci, j.または * である。
入力
入力は以下の形式で標準入力から与えられる。

H W
C1, 1…C1, W
:
CH, 1…CH, W
*/

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cassert>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define rep(i,n) FOR(i,0,n)
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define vint vector<int>
#define vdouble vector<double>
#define vstring vector<string>
using namespace std;

#include<map>
#include<set>
#include<queue>

typedef long long ll;
typedef unsigned long long ull;

int main() {

	int H, W;
	cin >> H >> W;

	vstring vs;
	rep(i, H){ string s; cin >> s; vs.push_back(s); }

	rep(i, H){ cout << vs[i] << endl << vs[i] << endl; }
}

Measured memory_bytes: 256
#include<cstdio>
using namespace std;
int k;
long long l,r,ans1,ans2,a[100010];
long long check(long long x)
{
	long long res=x;
	for (int i=1;i<=k;i++)
	{
		res-=res%a[i];
	}
	return res;
}
int main()
{
	scanf("%d",&k);
	for (int i=1;i<=k;i++) scanf("%lld",&a[i]);
	l=2;r=1e15;ans1=-1;ans2=-1;
	while (l<=r)
	{
		long long mid=(l+r)/2;
		long long tmp=check(mid);
		if (tmp==2) 
		{
			if (ans1==-1) ans1=mid;
			else if (ans1>mid) ans1=mid;
		}
		if (tmp>=2) r=mid-1;
		else l=mid+1;
	}
	l=2;r=1e15;
	while (l<=r)
	{
		
		long long mid=(l+r)/2;
		long long tmp=check(mid);
		if (tmp==2) 
		{
			if (ans2==-1) ans2=mid;
			else if (ans2<mid) ans2=mid;
		}
		if (tmp<=2) l=mid+1;
		else r=mid-1;
	}
	if (ans1==-1||ans2==-1) printf("-1\n");
	else printf("%lld %lld\n",ans1,ans2);
}

Measured memory_bytes: 896
N = int(input())
arr = list(map(int, input().split()))
 
ans = []
 
for idx1 in range(1, N+1):
	for idx2 in range(len(arr), 0, -1):
		if arr[idx2-1] == idx2:
			tmp = arr.pop(idx2-1)
			ans.append(tmp)
			break
		elif idx2 == 1:
			print(-1)
			exit()

for idx in range(0, N):
	tmp = ans.pop(-1)
	print(tmp)

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

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

using namespace std;

using ll = long long;
using P = pair<int, int>;

vector<int> dx = {1, 0, -1, 0, 1, -1, 1, -1};
vector<int> dy = {0, 1, 0, -1, 1, 1, -1, -1};

int main() {
  int h, w;
  cin >> h >> w;
  vector<string> s(h);
  rep(i, h) cin >> s[i];

  rep(i, h) {
    rep(j, w) {
      int cnt = 0;
      rep(k, 8) {
        int ii = i + dy.at(k);
        int jj = j + dx.at(k);
        if (ii < 0 || ii >= h) {
          continue;
        }
        if (jj < 0 || jj >= w) {
          continue;
        }
        if (s.at(ii).at(jj) == '#') {
          cnt++;
        }
      }
      if (s.at(i).at(j) == '.') {
        s.at(i).at(j) = '0' + cnt;
      }
    }
  }
  rep(i, h) {
    rep(j, w) {
      cout << s[i][j];
    }
    cout << endl;
  }

  return 0;
}


Measured memory_bytes: 256
#!/usr/bin/env python3
import sys


def solve(s: str, t: str):
    N = len(s)
    W = len(t)
    dp = [[0] * (W+1) for i in range(N+1)]

    for i in range(N):
        for j in range(W):
            if(s[i] == t[j]):
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j]) 

    ans = []
    while N > 0 and W > 0:
        if(dp[N][W] == dp[N-1][W]):
            N -= 1
        elif(dp[N][W] == dp[N][W-1]):
            W -= 1
        elif(dp[N][W] == dp[N-1][W-1]+1):
            ans = [s[N-1]] + ans
            N -= 1
            W -= 1


    print(''.join(ans))

    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    s = next(tokens)  # type: str
    t = next(tokens)  # type: str
    solve(s, t)

if __name__ == '__main__':
    main()


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

int main() {
    int N;
    cin>>N;
    long c[10][10];
    for(int i=0;i<10;++i){
        for(int j=0;j<10;++j){
            c[i][j] = 0;
        }
    }
    long top, bottom;
    for(int i=0;i<=N;++i){
        if(i<10){
            top = i;
            bottom = i;
        }
        else if(i<100){
            top = i/10;
            bottom = i%10;
        }
        else if(i<1000){
            top = i/100;
            bottom = i%10;
        }
        else if(i<10000){
            top = i/1000;
            bottom = i%10;
        }
        else if(i<100000){
            top = i/10000;
            bottom = i%10;
        }
        else {
            top = i/100000;
            bottom = i%10;
        }
        c[top][bottom]++;
    }
    long ans = 0;
    for(int i=1;i<10;++i){
        for(int j=1;j<10;++j){
            ans += c[i][j] * c[j][i];
        }
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 256
# -*- coding: utf-8 -*-
# 整数の入力
n=int(input())
a=input().split()
b=a[:]
c=a[:]
# a[0]の符号をそのままにした場合の計算
counter_1=0
S=int(a[0])
for i in range(1,n):
  if S<0 and S+int(a[i])<=0:
    counter_1+=-S-int(a[i])+1
    a[i]=-S+1
  elif S>0 and S+int(a[i])>=0:
    counter_1+=S+int(a[i])+1
    a[i]=-S-1
  S+=int(a[i])
# a[0]を1に変えた場合の計算
counter_2=abs(int(b[0])-1)
b[0]=1
S=b[0]
for i in range(1,n):
  if S<0 and S+int(b[i])<=0:
    counter_2+=-S-int(b[i])+1
    b[i]=-S+1
  elif S>0 and S+int(b[i])>=0:
    counter_2+=S+int(b[i])+1
    b[i]=-S-1
  S+=int(b[i])
# a[0]を-1に変えた場合の計算
counter_3=abs(int(c[0])+1)
c[0]=-1
S=c[0]
for i in range(1,n):
  if S<0 and S+int(c[i])<=0:
    counter_3+=-S-int(c[i])+1
    c[i]=-S+1
  elif S>0 and S+int(c[i])>=0:
    counter_3+=S+int(c[i])+1
    c[i]=-S-1
  S+=int(c[i])
print(min(counter_1,counter_2,counter_3))

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

int main() {
	int n, d, x,A;
	cin >> n >> d >> x;
	int count = x;
	rep(i, n) {
		cin >> A;
		int tmp=1;
		int j = 0;
		while (true)
		{
			tmp = j * A + 1;
			if (tmp > d)break;
			count++;
			j++;
		}
	}
	cout << count << endl;
}

Measured memory_bytes: 3632
#include<iostream>
int main() {
  int W, a, b;
  std::cin >> W >> a >> b;

  int bigger = a >= b ? a : b;
  int smaller = a > b ? b : a;

  if(bigger - (smaller + W) <= 0){
    std::cout << 0;
  }else{
    std::cout << bigger - (smaller + W);
  }
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
	int n;
	int c, a, na, t;
	int i;
	
	scanf("%d", &n);
	
	for (i = 0; i < n; i++){
		scanf("%d %d %d", &c, &a, &na);
		t = 0;
		while  (1 <= c && 1 <= a && 1 <= na){
			t++;
			c--;
			a--;
			na--;
		}
		while (2 <= c && 1 <= a){
			t++;
			c -= 2;
			a--;
		}
		while (3 <= c){
			t++;
			c -= 3;
		}
		
		printf("%d\n", t);
	}
	
	return (0);
}

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

using ll = long long;

constexpr ll MOD = 1e9+7;
constexpr ll INF = 1ll<<60;

#define FOR(i,a,b) for (ll i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()

ll modPow(ll a, ll n)
{
	if (n == 1) return a%MOD;
	if (n&1) return (a*modPow(a, n-1)) % MOD;
	ll tmp = modPow(a, n/2);
	return (tmp*tmp) % MOD;
}

ll fac(ll n, ll a)
{
	ll res{1};
	for (ll i = n; i >= a; --i)
		(res *= i) %= MOD;
	return res;
}

int main(int argc, char **argv)
{
	ll N, A, B; cin >> N >> A >> B;

	ll npow = modPow(2, N);
	ll Xa = fac(N, N-A+1);
	ll Ya = fac(A, 1);
	ll Xb = fac(N, N-B+1);
	ll Yb = fac(B, 1);

	ll subA = (Xa * modPow(Ya, MOD-2)) % MOD;
	ll subB = (Xb * modPow(Yb, MOD-2)) % MOD;

	// std::cout << "subA : " << subA << std::endl;
	// std::cout << "subB : " << subB << std::endl;

	std::cout << (MOD*2 + npow - subA - subB - 1) % MOD << std::endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<cmath>
int main(){
	int x,y;
	std::cin>>x>>y;
	int k=std::pow(100,x);
	if(x==2 && y==100)std::cout<<(k*(y+1))<<std::endl;
	else if(x==1 && y==100)std::cout<<(k*(y+1))<<std::endl;
	else if(x==0 && y==100)std::cout<<(k*(y+1))<<std::endl;
	else std::cout<<(k*y)<<std::endl;
}

Measured memory_bytes: 892
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define se second
#define mp make_pair
#define fi first
#define del(a,vec) vec.erase(std::remove(vec.begin(), vec.end(), a), vec.end());
#define search(f,l,v) binary_search(f,l,v)
#define iter(a,b) vector<int>::iterator a,b
#define lower(v,num) lower_bound (v.begin(), v.end(), num);
#define upper(v,num) upper_bound (v.begin(), v.end(), num); 
#define removecopy(a) unique(a.begin(), a.end()); 
#define ll long long int
namespace Rahul{
    bool isPrime(int n) 
    {if (n <= 1)  return false; if (n <= 3)  return true; 
    if (n%2 == 0 || n%3 == 0) return false; 
    for (int i=5; i*i<=n; i=i+6) 
        if (n%i == 0 || n%(i+2) == 0) 
           return false; 
    return true; }
    ll pow (ll x, ll n,ll mod) {//calculate x^n
    if (n == 0) return 1;

    ll res = pow (x, n / 2,mod);

    res = (res * res) % mod;
    if (n % 2) res = (res * x ) % mod;

    return res;
    }
    ll _gcd(ll a,ll b)
    {
        if(a==0)
            return b;
        else    
            return _gcd(b%a,a);
    }
    //s.erase(s.find(2)) where s={1,2,3,3,2}; 
};

using namespace Rahul;
int main()
{
     ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
     unordered_map<string,int>cn;
  	 cn["SUN"]=7;
  	  cn["MON"]=6;
  cn["TUE"]=5;
  cn["WED"]=4;
  cn["THU"]=3;

 	cn["FRI"]=2;
  cn["SAT"]=1;
              
  string s;
  cin>>s;
  cout<<cn[s]<<endl;
  
  
}


Measured memory_bytes: 256
use std::io::*;
use std::str::FromStr;

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

use std::cmp::{max, min};

fn main() {
  let s = read::<String>();

  let s_char = s.chars().collect::<Vec<char>>();
  let mut ans = 0;

  for i in s_char {
    if i == '+' {
      ans += 1;
    } else {
      ans -= 1;
    }
  }

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



Measured memory_bytes: 4352
module.exports=function(r){var e={};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=r,t.c=e,t.d=function(r,e,n){t.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:n})},t.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,e){if(1&e&&(r=t(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var o in r)t.d(n,o,function(e){return r[e]}.bind(null,o));return n},t.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(e,"a",e),e},t.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},t.p="",t(t.s=0)}([function(r,e,t){t(1)(t(2).readFileSync("/dev/stdin","UTF-8").split("\n"))},function(r,e,t){"use strict";function n(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,e){var t=[],n=!0,o=!1,u=void 0;try{for(var i,f=r[Symbol.iterator]();!(n=(i=f.next()).done)&&(t.push(i.value),!e||t.length!==e);n=!0);}catch(r){o=!0,u=r}finally{try{n||null==f.return||f.return()}finally{if(o)throw u}}return t}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}r.exports=function(r){for(var e=Number(r[0]),t=new Array(e),o=0;o<e;o++)t[o]=[];for(var u=n(r[e].split(" ").map(function(r){return Number(r)}),2),i=u[0],f=u[1],a=0;a<e-1;a++){var l=n(r[a+1].split(" ").map(function(r){return Number(r)}),3),c=l[0],p=l[1],s=l[2];p!=f&&t[c-1].push({v:p-1,c:s}),c!=f&&t[p-1].push({v:c-1,c:s})}for(var v=new Array(e).fill(-1),d=[{v:f-1,s:0}];d.length>0;)for(var y=d.pop(),b=t[y.v].length,m=0;m<b;m++){var h=t[y.v][m];if(-1==v[h.v]){var g=y.s+h.c;v[h.v]=g,d.push({v:h.v,s:g})}}for(var x=0;x<i;x++){var j=n(r[x+e+1].split(" ").map(function(r){return Number(r)}),2),O=j[0],S=j[1],w=v[O-1]+v[S-1];console.log(w)}}},function(r,e){r.exports=require("fs")}]);

Measured memory_bytes: 87792
use superslice::Ext;
fn main() {
    proconio::input! {
        (n,m): (usize,usize),
        abc: [(i64,i64,i64);n],
        def: [(i64,i64,i64);m],
    }
    let mut xs = Vec::with_capacity(n*2+m);
    let mut ys = Vec::with_capacity(n+m*2);
    for &(a,b,c) in &abc {
        xs.push(a);
        xs.push(b);
        ys.push(c);
    }
    for &(d,e,f) in &def {
        xs.push(d);
        ys.push(e);
        ys.push(f);
    }
    xs.sort_unstable(); xs.dedup();
    let xs = xs;
    ys.sort_unstable(); ys.dedup();
    let ys = ys;
    let mut g = vec![vec![true;ys.len()*2];xs.len()*2];
    for (a,b,c) in abc {
        let a = xs.binary_search(&a).unwrap()*2;
        let b = xs.binary_search(&b).unwrap()*2;
        let c = ys.binary_search(&c).unwrap()*2;
        for i in a..=b {
            g[i][c] = false;
        }
    }
    for (d,e,f) in &def {
        let d = xs.binary_search(&d).unwrap()*2;
        let e = ys.binary_search(&e).unwrap()*2;
        let f = ys.binary_search(&f).unwrap()*2;
        for i in e..=f {
            g[d][i] = false;
        }
    }
    let xm = g.len();
    let ym = g[0].len();
    let mut q = Vec::with_capacity(xm*ym);
    let mut c = vec![vec![false;ys.len()];xs.len()];
    {
        let i = xs.lower_bound(&0);
        let j = ys.lower_bound(&0);
        if i<=0 || xs.len()<=i || j<=0 || ys.len()<=j {
            println!("INF");
            return;
        }
        let i = if xs[i]>0 {i-1} else {i};
        let j = if ys[j]>0 {j-1} else {j};
        q.push((i*2+1,j*2+1));
    }
    while let Some((i,j))=q.pop() {
        c[i/2][j/2]=true;
        let dxy = [0,-1,0,1,0];
        for k in 0..4 {
            let x=i as i64+dxy[k];
            let y=j as i64+dxy[k+1];
            if x<0 || xm as i64<=x || y<0 || ym as i64<=y {
                println!("INF");
                return;
            }
            let (x,y)=(x as usize, y as usize);
            if g[x][y] {
                g[x][y]=false;
                q.push((x,y));
            }
        }
    }
    let mut t=0;
    for i in 0..xs.len()-1 {
        for j in 0..ys.len()-1 {
            if c[i][j] {
                t += (xs[i+1]-xs[i])*(ys[j+1]-ys[j]);
            }
        }
    }
    println!("{}",t);
}

Measured memory_bytes: 198876
// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define Graph vector<vector<int>>
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1000000007;

// #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
// using Bint = mp::cpp_int;
// using Real = mp::number<mp::cpp_dec_float<1024>>;

int main(){
    int N;
    cin >> N;
    vector<int> A(N), B(N);
    rep(i, N) cin >> A[i] >> B[i];
    sort(all(A));
    sort(all(B));
    if(N % 2 == 1){
        int a_med = A[(N - 1)/2], b_med = B[(N - 1)/2];
        cout << b_med - a_med + 1 << endl;
    } else {
        int a_med_2 = A[N/2] + A[N/2 - 1];
        int b_med_2 = B[N/2] + B[N/2 - 1];
        cout << b_med_2 - a_med_2 + 1 << endl;
    }

}

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

using namespace std;

typedef long long ll;
typedef vector<ll> vl;

ll x,y,s;

int main(){
  while(cin >> x >> y >> s){
    if(x == 0 && y == 0 && s == 0) return 0;
    ll ans = 0;
    for(ll i = 1;i <= s-1;i++){
      ll cost = i*(100+x)/100;
      for(ll j = 1;j <= s-1;j++){
        ll cost2 = j*(100+x)/100;
        if(cost+cost2 == s){
          ans = max(ans,i*(100+y)/100+j*(100+y)/100);

        }
      }
    }
    cout << ans << endl;
  }
}



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

#define ed cout << "\n";
#define speed                         \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define ll long long
#define ffor(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(i, n) ffor(i, 0, n)
#define All(obj) (obj).begin(), (obj).end()
#define INF ((ll)1e9 + 7)
#define c(a) cout << a << "\n";
using namespace std;
const int N = 100005;

int main()
{
    speed;
    cout << fixed << setprecision(6);
    /*start*/
    int a, b;
    cin >> a >> b;
    c(a * b);
    return 0;
}


Measured memory_bytes: 3660
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <numeric>
#include <ctime>
#include <complex>
#include <bitset>
#include <random>

using namespace std;

typedef long long ll;
typedef long double ld;

#define int ll
#define double ld
#define loop(i, n) for(int i = 0; i < (int)n; ++i)
#define loop1(i, n) for(int i = 1; i <= (int)n; ++i)
#define F first
#define S second
#define pb push_back
#define pi pair <int, int>
#define all(x) begin(x), end(x)
#define ti tuple <int, int, int>
#define Point Vect
#define no {cout << -1; return;}
#define mkp make_pair
#define cerr if (0) cerr

const int INF = 1e18;

void solve() {
    int n; cin >> n;
    map <int, int> d;
    for (int i = 2; i * i <= n; ++i)
        while (n % i == 0) {
            ++d[i]; n /= i;
        }
    if (n > 1)
        ++d[n];
    int ans = 0;
    for (auto it : d) {
        int x = it.S, cnt = 0;
        for (int i = 1;; ++i) {
            x -= i;
            if (x < 0)
                break;
            ++cnt;
        }
        ans += cnt;
    }
    cout << ans;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //int t; cin >> t; loop(i, t)
    solve();
    return 0;
}


Measured memory_bytes: 3660
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i,n) for(long long i = 0; i < (n); ++i)
#define ll long long
#define P pair<ll,ll>
#define all(v) (v).begin(),(v).end()

const ll mod = 1e9+7;
const ll INF = 1e18;
const double pi = acos(-1.0);

int main(void)
{
    ll n,k,cnt=0; cin>>n>>k;
    vector<ll> h(n);
    rep(i,n){
        cin>>h[i];
    }
    sort(h.rbegin(),h.rend());
    for(int i=k;i<n;i++){
        cnt+=h[i];
    }
    cout<<cnt<<endl;
    return 0;
}

Measured memory_bytes: 4732
#include <bits/stdc++.h>
#define vc vector<int>
#define um unordered_map<int,int>
#define ll long long 
#define rep(i,a,b) for(__typeof(a) i=a; i<b; i++)
#define si(a) a.size()
#define all(a) a.begin(),a.end()
#define ss(a) a.second
#define ff(a) a.first
#define M 1000000
#define pb push_back
#define repit(i,a) for(auto i=a.begin(); i!=a.end(); i++)
#define take(arr,n) for(int i=0;i<n;i++)cin>>arr[i]
#define out(arr,n) for(int i=0;i<n;i++)cout<<arr[i]<<' '
#define yes cout<<"Yes"<<endl
#define no cout<<"No"<<endl
#define reprev(i,b,a) for(__typeof(b) i=b; i>=a; i--)
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL)
#define doublearray vector<vector<int>>
#define mod 1000000007 
using namespace std;
ll max(ll a, ll b){ return a>b?a:b; }
ll min(ll a, ll b){ return a<b?a:b; }
ll gcd(ll a, ll b){
    if(b==0) return a;
    return gcd(b,a%b);
}
ll lcm(ll a, ll b){
    return (a*b)/gcd(a,b);
}
int binaryS(int x, int sb[], int m){
    int l = 0, r=m;
    int mid = (l+r)/2;
    while(l<r){
        mid = (l+r)/2;
        if(sb[mid]<x) l= mid+1;
        else if(sb[mid]>x) r = mid-1;
        else return mid;
    }
    return l;
}
int main(){
    fastio;
    // int t; cin>>t;
    // while(t--){
      ll n; cin>>n;
      ll arr[n]; take(arr,n);
      ll su[n+1]; su[n]=0;
      reprev(i,n-1,0){
          su[i] = (su[i+1]+arr[i])%mod;
      }
      ll ans = 0;
      rep(i,0,n-1){
          ans = (ans+(su[i+1]*arr[i])%mod)%mod;
      }
      cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 6780
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
char a[1919][1919];
ll dp[1919][1919];
signed main() {
	ll h, w;
	cin >> h >> w;
	rep(i, h) { rep(j, w)cin >> a[i][j]; }
	dp[0][0] = 1;
	rep(i, h) {
		rep(j, w) {
			if (a[i][j] == '#')dp[i][j] = 0;
			else if (i == 0 && j != 0)dp[i][j] = dp[i][j - 1];
			else if (j == 0 && i != 0)dp[i][j] = dp[i - 1][j];
			else if (i != 0 || j != 0)dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
			dp[i][j] %= 1000000007;
		}
	}
	cout << dp[h - 1][w - 1] << endl;
	getchar(); getchar(); return 0;
}

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

int main(){
	int N, i, j, k, l, wnum = 0;
	scanf("%d", &N);
	char **A = (char **)malloc(sizeof(char *) * (N + 2));
	A[0] = (char *)malloc(sizeof(char) * (N + 2));
	for(i = 1; i <= N; i++){
		A[i] = (char *)malloc(sizeof(char) * (N + 2));
		scanf("%s", &A[i][1]);
	}
	A[N + 1] = (char *)malloc(sizeof(char) * (N + 2));
	for(i = 0; i <= N + 1; i++){
		A[i][0] = 'x';
		A[i][N + 1] = 'x';
		A[0][i] = 'x';
		A[N + 1][i] = 'x';
	}
/*	printf("test\n");
	for(i = 0; i <= N + 1; i++){
		for(j = 0; j <= N + 1; j++){
			printf("%c", A[i][j]);
		}
		printf("\n");
	}
*/	for(i = 1; i <= N; i++){
		for(j = 1; j <= N; j++){
			if(A[i][j] == 'o'){
				for(k = i; A[k][j] == 'o'; k++){
					for(l = j; A[k][l] == 'o'; l++){
						A[k][l] = 'x';
					}
				}
				wnum++;
			}
		}
	}
	printf("%d\n", (wnum - 1) / 3);
	return 0;
}

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

int main() {
  int a,b,c[15];
  cin >>a>>b;
  
  c[0] = 1;
  
  for(int i=1; i<= a;i++){
    
    if(2*c[i-1] >(c[i-1]+b))
      c[i] = c[i-1]+ b;
    
    if(2*c[i-1] <= (c[i-1]+b))
      c[i] = 2*c[i-1];
  }
  
  cout << c[a] << endl;
}

Measured memory_bytes: 256
#include<stdio.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include <string.h>
int main(void) {
	int x, y, z,i,ans = 0;
	char op;
	char p[5][2] = { "+","-","*","/" ,"?"};

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	scanf("%d %c %d",&x, &op,&y);
	while(op != p[4][0]){
		if (op == p[0][0]) {
			//("plus");
			printf("%d\n", x + y);
		}
		else if (op == p[1][0]) {
			printf("%d\n", x - y);
		}
		else if (op == p[2][0]) {
			printf("%d\n", x * y);
		}
		else if (op == p[3][0]) {
			printf("%d\n", x / y);
		}
		scanf("%d %c %d", &x, &op, &y);
	}


	
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	return 0;
}


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

int main()
{
  string s;
  cin >> s;
  if(s == "AAA" || s == "BBB")
    cout << "No";
  else
  {
    cout << "Yes";
  }
  
}


Measured memory_bytes: 3600
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  int ans = 1, cnt = a;
  if (b == 1) {
    cout << 0 << endl;
    return 0;
  }
  while (cnt < b) {
    ans++;
    cnt--;
    cnt += a;
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <queue>
#include <map>
#include <numeric>
#include <unordered_map>
#include <iomanip>
#include <functional>
#include <bitset>
#include <complex>
#include <stack>
#include <cstdint>



#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rrep(i, n) for(ll i = (ll)(n-1); i >= 0; i--)
#define repi(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rrepi(i,a,b) for(ll i=(ll)(b);i>=(ll)(a);i--)

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

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

typedef long long ll;

using namespace std;


int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n;cin>>n;
  vector<ll>a(n);
  rep(i,n)cin>>a[i];
  vector<vector<vector<ll>>>memo(n,vector<vector<ll>>(n+1,vector<ll>(2,-1e18)));
  function<ll(ll,ll,bool)>dfs=[&](ll l,ll r,bool f){
    ll res;
    if(memo[l][r][f]>-1e18)return memo[l][r][f];
    if(r-l==1){
      if(f)return memo[l][r][f]=a[l];
      return memo[l][r][f]=-a[l];
    }
    if(f){//maximize
      res=-1e18;
      chmax(res,dfs(l,r-1,!f)+a[r-1]);
      chmax(res,dfs(l+1,r,!f)+a[l]);
    }
    else{
      res=1e18;
      chmin(res,dfs(l,r-1,!f)-a[r-1]);
      chmin(res,dfs(l+1,r,!f)-a[l]);
    }
    return memo[l][r][f]=res;
  };
  cout<<dfs(0,n,1)<<endl;

  return 0;

}


Measured memory_bytes: 493312
# Aizu Problem CGL_2_C: Cross Point
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")



n = int(input())
for k in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = [int(_) for _ in input().split()]
    x = ((x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4)) / \
        ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4))
    y = ((x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4)) / \
        ((x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4))
    print("%.10f %.10f" % (x, y))

Measured memory_bytes: 7772
n = int(input())
strings = [[] for _ in range(n)]
for i in range(n):
    if not i:
        strings[i].append("a")
        continue
    for s in strings[i-1]:
        for j in range(ord("a"),ord(max(s))+2):
            c = chr(j)
            strings[i].append(s+c)
print(*strings[-1])
        

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

#define rep(i, n) for (Int i = 0; i < (Int)n; i++)
#define rep2(i, s, n) for (Int i = s; i < (Int)(n); i++)
#define rep3(i, n, s) for (Int i = n - 1; i >= s; i--)
#define dump(x) cout << (x) << '\n'
#define Int int64_t
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).end()
 
double EPS = 1e-10;
Int INF = 1e18;
int inf = 1e9;
Int mod = 1e9+7;

// 0-indexed Graph class
class Graph {
    typedef struct {
        Int to, weight, cap, rev;
    } edge;
public:
    vector<vector<edge>> G;
    Int node_num;
    Graph(Int in) : node_num(in) {
        G.resize(in);
    }
    void add_edge(Int s, Int t, Int c) {
        edge add = {t, c, c, 0};
        G[s].push_back(add);
    }
};

int main() {
    Int n, m;
    cin >> n >> m;
    vector<bool> use(m, true);
    vector<bool> node(n, true);
    vector<Int> a(m), b(m);
    rep(i, m) {
        cin >> a[i] >> b[i];
        a[i]--, b[i]--;
    }
    bool update = true;
    while (update) {
        update = false;
        vector<Int> in(n, 0), out(n, 0);
        rep(i, m) {
            if (use[i]) {
                in[a[i]]++;
                out[b[i]]++;
            }
        }
        rep(i, n) {
            if (in[i] == 0 or out[i] == 0) {
                node[i] = false;
            }
        }
        rep(i, m) {
            if (use[i]) {
                if (not node[a[i]] or not node[b[i]]) {
                    use[i] = false;
                    update = true;
                }
            }
        }
    }
    bool check = true;
    rep(i, n) if (node[i]) check = false;
    if (check) {
        dump(-1);
        return 0;
    }
    Graph G(n);
    rep(i, m) {
        if (use[i]) G.add_edge(a[i], b[i], 1);
    }
    vector<bool> visited(n, false);
    vector<Int> v;
    queue<tuple<Int, vector<bool>, vector<Int>>> q;
    rep(i, n) {
        if (node[i]) {
            q.push(make_tuple(i, visited, v));
        }
    }
    while (true) {
        Int x = get<0>(q.front());
        vector<bool> visited = get<1>(q.front());
        vector<Int> v = get<2>(q.front());
        q.pop();
        visited[x] = true;
        v.push_back(x);
        bool check = false;
        rep(i, G.G[x].size()) {
            Int to = G.G[x][i].to;
            if (visited[to]) {
                Int index = 0;
                while (v[index] != to) index++;
                dump(v.size() - index);
                rep2(i, index, v.size()) dump(v[i] + 1);
                check = true;
                break;
            } else {
                q.push(make_tuple(to, visited, v));
            }
        }  
        if (check) break;
    }
    return 0;
}

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

int main() {
  int A,B,C,D;
  cin >> A >> B;
  
  if(A>=B){
    C = A;
    A--;
  }
  else{
    C = B;
      B--;
  }
  
  D=max(A,B);
  
  cout << C+D << endl;
}



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

using namespace std;

typedef long long ll;

#define MOD 1000000007
#define MAX 2005

vector<vector<ll>> dp(MAX, vector<ll>(MAX, 0));
vector<vector<ll>> sm(MAX, vector<ll>(MAX, 0));

ll getVal(int i, int j){
    if( i >= 0 && j >= 0 )
        return sm[i][j];

    return 0;
}

void updateVal(int i, int j){
    int im = i-1, jm = j-1;
    ll vl = dp[i][j];
    if( im >= 0 )
        vl += sm[im][j];
    if( jm >= 0 )
        vl += sm[i][jm];
    if( im >= 0 && jm >= 0 )
        vl -= sm[im][jm];
    vl = vl%MOD;
    if( vl < 0 )
        vl += MOD;
    sm[i][j] = vl;
}

ll getTot(vector<vector<ll>> &dp, int x, int y){
    ll ans = 0;
    for(int i = 0; i < x; i++)
        for(int j = 0; j < y; j++)
            ans += dp[i][j];

    return ans;
}

int main(){

    int n, m;
    cin >> n >> m;

    vector<int> an(n), am(m);

    for(int i = 0; i < n; i++)
        cin >> an[i];

    for(int i = 0; i < m; i++)
        cin >> am[i];

    for(int i = 0; i < n; i++)
        for(int j = 0; j < m; j++){
            if( an[i] == am[j] ){
                dp[i][j] = (getVal(i-1, j-1) + 1)%MOD;
            }
            updateVal(i, j);
        }

    cout << (getVal(n-1, m-1)+1)%MOD << endl;
    return 0;
}

Measured memory_bytes: 65280
/*  3_2
    Y_Aizaki    */

#include <stdio.h>

int main(void){
    int pencil; // 本数

    scanf("%d", &pencil);

    int first = pencil % 10; // first place
    if(first == 2 || first == 4 || first == 5 || first == 7 || first == 9){
        printf("hon\n");
    }else if(first == 3){
        printf("bon\n");
    }else{
        printf("pon\n");
    }
    
}

Measured memory_bytes: 1632
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define rep(i,N) for(ll (i)=0;(i)<(N);(i)++)
const int mod = 1000000007;

int main(){
  int k;
  cin >> k;
  vector<int> a ={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};
  cout << a[k - 1] << endl;
}

Measured memory_bytes: 256
S=input()
N=len(S)
S1=S[0:(N-1)//2]
S2=S[(N+3)//2-1:]
ans=False
if S1==S1[::-1] and S2==S2[::-1] and S==S[::-1]:
    ans=True
print('Yes' if ans else 'No')

Measured memory_bytes: 38336
fn main(){
  let mut s = String::new();
  std::io::stdin().read_line(&mut s).ok();
  let s : Vec<u32> = s.trim().split_whitespace().map(|e| e.parse::<u32>().ok().unwrap() ).collect();
  
  println!("{}", s[0] + s[1] / 2);
  
}

Measured memory_bytes: 4352
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <fstream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <assert.h>

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define ALL(s) (s).begin(),(s).end()
#define ITE(c) typeof((c).begin())

#define clr(a) memset((a),0,sizeof(a))
#define nclr(a) memset((a),-1,sizeof(a))
#define pb push_back
#define INRANGE(x,s,e) ((s)<=(x) && (x)<(e))
#define MP(a,b) make_pair((a),(b))

#define MAX 20

using namespace std;

int Map[MAX][MAX];

int w, h;
int sx, sy;

int cou;
int d_x[4]={-1,0,1,0};
int d_y[4]={0,-1,0,1};
void dfs(int x,int y){
	Map[x][y]=0;
	for(int i=0;i<4;i++){
		int nx=x+d_x[i];
		int ny=y+d_y[i];
		if(nx>=0&&nx<w&&ny>=0&&ny<h&&Map[nx][ny]){
			dfs(nx,ny);
			cou++;
		}
	}
}		

void setMap(int i,int j,char s){
	switch(s){
		case '.':Map[i][j]=1;break;
		case '#':Map[i][j]=0;break;
		case '@':sx=i;sy=j;Map[i][j]=0;break;
	}
}


char getMap(int i,int j){
	if(Map[i][j]){
		return '.';
	}else{
		return '#';
	}
}


int main(){
	char s;
	while(cin>>w>>h&&w||h){
		rep(i,h){
			rep(j,w){
				cin>>s;
				setMap(j,i,s);
			}
		}
		cou=1;
		dfs(sx,sy);
		cout<<cou<<endl;
	}
	return 0;
}

Measured memory_bytes: 1168
import java.util.HashMap;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();

		HashMap<Integer, Integer> hMap = new HashMap<Integer, Integer>();
		for (int i=0; i<N; i++) {
			hMap.put(sc.nextInt(), 1) ;
		}
		System.out.println(hMap.size());


	}

}


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

const int mod = 1000000000 + 7;

int ar[3 * 100005];

int main()
{
	
	int N;

	scanf("%d", &N);

	ll sum = 0;

	for(int i = 0; i < 3 * N; i++)
	{
		scanf("%d", &ar[i]);
	}

	sort(ar, ar + 3 * N);
	reverse(ar, ar + 3 * N);

	for(int i = 1; i < 2 * N; i = i + 2)
	{
		sum = sum + ar[i];
	}
	cout<<sum<<endl;

	

	return 0;
}

Measured memory_bytes: 1408
import java.util.*;

public class Main {
    public static int solve(int N, int M, int[] x, int[] y) {
        List<Integer>[] adj = new List[N];
        for (int i = 0; i < N; i++) adj[i] = new ArrayList<>();
        for (int i = 0; i < M; i++) adj[x[i]-1].add(y[i]-1);

        int[] longest = new int[N];
        Arrays.fill(longest, -1);

        int  maxLength = -1;
        for (int from = 0; from < N; from++)
            if (longest[from] == -1)
                maxLength = Math.max(maxLength, dfs(from, adj, longest));

        return maxLength;
    }

    private static int dfs(int from, List<Integer>[] adj, int[] longest) {
        if (longest[from] != -1) return longest[from];

        int currentLongest = 0;
        for (int to: adj[from])
            currentLongest = Math.max(currentLongest, 1 + dfs(to, adj, longest));

        longest[from] = currentLongest;
        return currentLongest;
    }

    public static void main(String[] args) {
        int N, M;
        int[] x, y;

        try (Scanner scanner = new Scanner(System.in)) {
            N = scanner.nextInt();
            M = scanner.nextInt();
            x = new int[M];
            y = new int[M];
            for (int i=0; i < M; i++) {
                x[i] = scanner.nextInt();
                y[i] = scanner.nextInt();
            }
        }

        int result = solve(N, M, x, y);
        System.out.println(result);

        //Tests.run();
    }
}

class Tests {
    public static void run() {
        testCase(4, 5, new int[] {1,1,3,2,3}, new int[] {2,3,2,4,4}, 3);
        testCase(6, 3, new int[] {2,4,5}, new int[] {3,5,6}, 2);
        testCase(5, 8, new int[] {5,2,2,5,5,1,4,1}, new int[] {3,3,4,2,1,4,3,3}, 3);
        System.out.println("DONE");
    }

    private static void testCase(int N, int M, int[] x, int[] y, int expected) {
        int result = Main.solve(N, M, x, y);
        if (result != expected) System.out.println("N=" + N + " M=" + M + " x=" + Arrays.toString(x) + " y=" + Arrays.toString(y) + " was " + result + " expected " + expected);
    }
}


Measured memory_bytes: 73720
#include<stdio.h>

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	
	while(scanf("%lf %lf %lf %lf %lf %lf ",&a,&b,&c,&d,&e,&f)==6){
		x=(c*e-f*b)/(a*e-d*b);
		if(x==-0.0)x=0.0;
		y=(a*f-d*c)/(a*e-d*b);
		if(y==-0.0)y=0.0;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

Measured memory_bytes: 0
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String O = sc.next();
		String E = sc.next();
		String ans = "";
		boolean b = true;
		int cnt = 0;
		int len = O.length()+E.length();
		int i = 0;
		int j = 0;

		while(b) {
            if(cnt >= len) {
                break;
            }
			if(cnt%2 == 0) {
				ans += O.charAt(i);
				i++;
			} else if(cnt%2 != 0) {
				ans += E.charAt(j);
				j++;
			}
			cnt++;
		}

		System.out.println(ans);
	}

}


Measured memory_bytes: 21972
#include <bits/stdc++.h>
#define rep(i,s,n) for (int i = s; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

int main() {
  vector<bool> prime(100010,true);
  prime[1] = false;
  for(int i = 2; i*i <= 100010; i++) {
    if (!prime[i]) continue;
    for(int j = i*2; j <= 100010; j += i) {
      prime[j] = false;
    }
  }
  int x;
  cin >> x;
  int ans = 0;
  while(ans == 0) {
    if (prime[x]) {
      ans = x;
    }
    x++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3636
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long sum = 0;
                long ans = 1;
		for(int i = 0; i < n; i++) {
			sum += sc.nextInt();
		}
                //System.out.println(sum);
		long key = 0;
		for(int i = n - 1; i >= 1; i -= 2) {
			key += i;
		}
		key *= 2;
                //System.out.println(key);
		if(sum == key) {
			for(int i = 0; i < n / 2; i++) {
                              ans = ans *  2 % 1000000007;
                              //System.out.println(ans); 
                        }
		}
		else ans = 0;
		System.out.println(ans);
	}
}


Measured memory_bytes: 47624
#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/math/common_factor.hpp>

#define rep_ui(k,n)      for(ui  i = (k); i < (n); ++i)
#define rep_si(k,n)      for(int i = (k); i < (n); ++i)
#define rep_ul(k,n)      for(ul  i = (k); i < (n); ++i)
#define rep_sl(k,n)      for(ll  i = (k); i < (n); ++i)
#define rep_ui_down(k,n) for(ui  i = (k); i > (n); --i)
#define rep_si_down(k,n) for(int i = (k); i > (n); --i)
#define rep_ul_down(k,n) for(ul  i = (k); i > (n); --i)
#define rep_sl_down(k,n) for(ll  i = (k); i > (n); --i)

#define rep_uj(k,n)      for(ui  j = (k); j < (n); ++j)
#define rep_sj(k,n)      for(int j = (k); j < (n); ++j)
#define rep_uj_down(k,n) for(ui  j = (k); j > (n); --j)
#define rep_sj_down(k,n) for(int j = (k); j > (n); --j)

#define rep(k,n)         rep_ui(k,n)

typedef uintmax_t    ull;
typedef intmax_t     ll;
typedef uint64_t     ul;
typedef uint32_t     ui;
typedef uint8_t      uc;

template<class T>
std::ostream& operator<<(std::ostream& os, const std::vector<T>& vc)
{
#ifdef BOOST_RANGE_ALGORITHM_FOR_EACH_HPP_INCLUDED
  boost::for_each(vc, [&os](T value) {
#else
  std::for_each(vc.begin(), vc.end(), [&os](T value) {
#endif
    os << value << '\n';
    });
  return os;
}

template<class T1, class T2>
inline
std::ostream& operator<<(std::ostream& os, const std::pair<T1, T2>& p)
{
  return os << p.first << ' ' << p.second;
}

void solve(void)
{
  using std::string;
  using std::vector;
  using std::map;
  using std::pair;
  using std::cin;
  //string S{}; std::cin >> S;
  //ui N{}; cin >> N;

  vector<ui> v(2);
  cin >> v[0] >> v[1];

  ull sum{};
  rep(0, 2)
  {
    auto it = boost::max_element(v);
    sum += *it;
    --(*it);
  }


  using std::cout;
  cout << sum << '\n';
  return;
}

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

  solve();

  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef pair<P,P> PP;

int w,h;
string r1[50],r2[50];

bool ch(){
  bool u[50][50][50][50]={};
  int lx,ly,rx,ry,ax,ay,bx,by;
  int dx[4]={0,0,1,-1},dy[4]={1,-1,0,0};
  for(int i=0;i<h;i++)
    for(int j=0;j<w;j++){
      if(r1[i][j]=='L')lx=j,ly=i;
      if(r2[i][j]=='R')rx=j,ry=i;
      if(r1[i][j]=='%')ax=j,ay=i;
      if(r2[i][j]=='%')bx=j,by=i;
    }
  queue<PP> q;
  q.push(PP(P(lx,ly),P(rx,ry)));
  while(!q.empty()){
    PP p=q.front();
    q.pop();
    lx=p.first.first;
    ly=p.first.second;
    rx=p.second.first;
    ry=p.second.second;
    if(lx==ax&&ly==ay&&rx==bx&&ry==by)return 1;
    if(u[lx][ly][rx][ry]||(lx==ax&&ly==ay)||(rx==bx&&ry==by))continue;
    u[lx][ly][rx][ry]=1;
    for(int i=0;i<4;i++){
      int nlx=lx+dx[i];
      int nly=ly+dy[i];
      int nrx=rx-dx[i];
      int nry=ry+dy[i];
      if(nlx<0||w<=nlx||nly<0||h<=nly||r1[nly][nlx]=='#')nlx=lx,nly=ly;
      if(nrx<0||w<=nrx||nry<0||h<=nry||r2[nry][nrx]=='#')nrx=rx,nry=ry;
      q.push(PP(P(nlx,nly),P(nrx,nry)));
    }
  }
  return 0;
}

int main(){
  while(cin>>w>>h,w){
    for(int i=0;i<h;i++)cin>>r1[i]>>r2[i];
    cout<<(ch()?"Yes":"No")<<endl;
  }
  return 0;
}


Measured memory_bytes: 12724
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.util.*;

public class Main {

    //グローバル変数を定義
    char[][] array;
    int H;
    int W;

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

    void run() {
        Scanner sc = new Scanner(System.in);
        H = sc.nextInt();
        W = sc.nextInt();
        array = new char[H][W];
        boolean ans = true;

        for(int i=0; i<H; i++){
            char[] newArray = sc.next().toCharArray();
            for(int j=0; j<W; j++){
                array[i][j] = newArray[j];
            }
        }

        loop: for(int i=0; i<H; i++){
            for(int j=0; j<W; j++){
                char s = array[i][j];
                if(s=='#'){
                    if(!checkArray(i,j)){
                        ans = false;
                        break loop;
                    }
                }
            }
        }

        if(ans) System.out.println("Yes");
        else System.out.println("No");
    }

    boolean checkArray(int x, int y){
        boolean check = false;
        if((x-1 >= 0 && array[x-1][y] == '#') ||
                (x+1<W && array[x+1][y] == '#') ||
                (y-1>=0 && array[x][y-1] == '#') ||
                (y+1<H && array[x][y+1] == '#')
                ){
            check = true;
        }
        return check;
    }
}


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

int main() {
  int x, l,r;
  cin >> x;
  l = x/1000;
  r = x%10;
  if (((x - l *1000)%111==0) || ((x-r)/10 % 111 ==0)) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <string>
#include <algorithm>
#include <math.h>
#include <numeric>
#include <iomanip>
#include <queue>
#include <functional>
#include <iso646.h>
#include <bitset>

#ifndef M_PI
#define M_PI 3.14159265358979
#endif
#define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360)

using namespace std;

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<long long> vll;
typedef pair<long long, long long> pll;

const ll INF = 1e15;
const ll MOD = 1e9 + 7;

int main()
{
	ll N, K;
	cin >> N >> K;
	vll A(N, 1);
	ll i, j;
	for (i = 0; i < K; i++)
	{
		ll d;
		cin >> d;
		for (j = 0; j < d; j++)
		{
			ll a;
			cin >> a;
			A[a - 1] = 0;
		}
	}
	cout << accumulate(A.begin(), A.end(), 0) << endl;

	return 0;
}


Measured memory_bytes: 3172
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
#define vec(s) vector

#define vvec(s) vector<vector
>
typedef vector<lli> vi;
typedef vector<vi> vvi;
typedef pair<lli,lli> pii;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define YN(x) cout<<(x?"Yes":"No")<<endl;
#define out(s) cout<<s<<endl;
#define pb(s) push_back(s);
#define sp " ";
#define INF 10000000000
#define all(s) s.begin(),s.end()
void vout(vi v){
    for(int i=0;i<v.size();i++)
    cout<<v.at(i)<<endl;
}
int main(){
    lli ma = 0;
    lli n;
    lli ans = 0;
    cin >> n;
    rep(i,n){
        lli h;
        cin >> h;
        if(ma<=h){
            ans++;
            ma = h;
        }
    }
    out(ans);
}

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

int main(){
  long long N,ans,c,d;
  cin>>N;
  int a[N];
  c=1;
  for(int i=0;i<N;i++){
    cin>>a[i];
    if(a[i]==c){
      c++;
    }
  }
  if(c==1){
    cout<<"-1"<<endl;
  }
  else{
    cout<<N-c+1<<endl;
  }
}

Measured memory_bytes: 1024
#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;
const int NMAX = 10000;

void print(int* A, int N)
{
   cout << A[0]; 
   for (int k = 1; k < N;k++) {
     cout << " " << A[k] ; 
   }
   cout << endl;
}

bool isPrime(int n)
{
  int k = 2;
  while (k * k < n + 1) {
    if (n % k == 0) {
      return false;
    }
    k += 1; 
  }
  return true;
}


int main()
{
  int n;
  cin >> n;
  int counter = 0; 
  for (int i = 0; i < n;i++) {
    int x; 
    cin >> x; 
    if(isPrime(x)) {
      counter += 1;
    }
  } 
  cout << counter << endl; 
  return 0;
}

Measured memory_bytes: 1160