akhauriyash/Code-Regression huggingface dataset:
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
	"strings"

)


func main() {
	solve(os.Stdin, os.Stdout)
}

type ReaderEx struct {
	baseScanner *bufio.Scanner
	words       []string
	nextWordIdx func() int
	initWordIdx func(int)
}

func NewScannerEx(stdin io.Reader) *ReaderEx {
	var this ReaderEx
	var idx int
	var wordsCnt int
	this.baseScanner = bufio.NewScanner(stdin)
	this.baseScanner.Buffer(make([]byte, 0), 1E+11)
	this.nextWordIdx = func() int {
		cur := idx
		idx = (idx + 1) % wordsCnt
		return cur
	}
	this.initWordIdx = func(wc int) {
		idx = 0
		wordsCnt = wc
	}
	return &this
}

func (me *ReaderEx) Scan(doSplit bool) (isScanned bool) {
	isScanned = me.baseScanner.Scan()
	if doSplit {
		me.words = strings.Fields(me.baseScanner.Text())
	} else {
		me.words = []string{me.baseScanner.Text()}
	}
	me.initWordIdx(len(me.words))
	return
}

func (me *ReaderEx) nextBytes() []byte {
	return []byte(me.words[me.nextWordIdx()])
}
func (me *ReaderEx) nextString() string {
	return me.words[me.nextWordIdx()]
}

type StringArray []string

func (me *ReaderEx) nextStringArray() StringArray {
	return me.words[me.nextWordIdx():]
}

func (me StringArray) toStrings() []string {
	return me
}

func (me StringArray) toInts() []int {
	strValues := me.toStrings()
	values := make([]int, len(strValues))
	for i, v := range strValues {
		n, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		values[i] = n
	}
	return values
}
func (me *ReaderEx) nextInt() int {
	n, err := strconv.Atoi(me.words[me.nextWordIdx()])

	defer func() {
		if err != nil {
			panic(fmt.Sprintf("getInt(%d)", n))
		}
	}()
	return n
}

func pow(x, y, mod int) (ans int) {

	ans = 1
	for bit := 1 << uint(math.Floor(math.Log2(float64(y)))); ; bit >>= 1 {
		if y&bit != 0 {
			ans *= x
			if mod > 0 {
				ans %= mod
			}
		}
		if bit <= 1 {
			return
		}
		ans *= ans
		if mod > 0 {
			ans %= mod
		}
	}
}

type factType struct {
	prime int
	count int
}

func fact(n int) (facts []*factType) {

	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			fa := factType{prime: i}
			for n%fa.prime == 0 {
				n /= fa.prime
				fa.count++
			}
			facts = append(facts, &fa)
		}
	}
	if n > 1 {
		facts = append(facts, &factType{prime: n, count: 1})
	}
	return facts
}
func dec2bin(n int) (ret []bool) {
	for bit := 1 << uint(math.Floor(math.Log2(float64(n)))); ; bit >>= 1 {
		ret = append(ret, n&bit != 0)

		if bit <= 1 {
			return
		}
	}

}

func abs(v int) int {
	if v < 0 {
		v = -v
	}
	return v
}

func b2i(b bool) (i int) {
	if b {
		i = 1
	} else {
		i = 0
	}
	return
}

func solve(stdin io.Reader, stdout io.Writer) {

	r := NewScannerEx(stdin)
	r.Scan(true)
	n, a, b := r.nextInt(), r.nextInt(), r.nextInt()

	minInt := func(a int, vs ...int) int {
		for i := range vs {
			v := &vs[i]
			if a > *v {
				a = *v
			}
		}
		return a
	}

	fmt.Fprintln(stdout, minInt(n%(a+b), a)+n/(a+b)*a)
}


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

int main() {
  long long N;
  cin >> N;
  
  vector<long long> H;
  H.reserve(N);
  for (int i = 0; i < N; i++) {
    long long h;
    cin >> h;
    H.push_back(h);
  }
  
  long long max_count = 0;
  long long tmp_count = 0;
  for (int i = 1; i < N; i++) {
    if (H[i-1] >= H[i]) {
      tmp_count++;
      max_count = max(max_count, tmp_count);
    } else {
      tmp_count = 0;
    }
  }
  cout << max_count << endl;
  
  return 0;
}

Measured memory_bytes: 1024
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import bisect



def main():
    a, b, c = map(int, input().split())
    if a + b == c or a + c == b or b + c == a:
        print('Yes')
    else:
        print('No')





if __name__ == '__main__':
    main()

Measured memory_bytes: 38256
n = int(input())
d_lis = list(map(int, input().split()))
ans = 0
tmp = 0
for i in range(n):
    for v in range(n):
        if i == v:
            pass
        else:
            tmp = d_lis[i] * d_lis[v]
            ans += tmp
print(ans//2)

Measured memory_bytes: 3060
import java.util.Scanner;
import java.util.Stack;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		Stack st = new Stack();
		char[] ch = s.toCharArray();
		for (int i=0;i<ch.length;i++){
			if (st.isEmpty()){
				if (ch[i]=='S'){
					st.push("S");
				}
				else{
					st.push("T");
				}
			}
			else{
				if (ch[i]=='S'){
					st.push("S");
				}
				else if (ch[i]=='T'&& st.peek()=="S"){
						st.pop();
				}
				else{
					st.push('T');
				}
			}			
		}
		System.out.println(st.size());
	}

}

Measured memory_bytes: 18080
#include<bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
#include <algorithm> 
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repR(i,n) for(ll i=n;i>=0;i--)
#define all(v)(v).begin(),(v).end()
#define rall(v)(v).rbegin(),(v).rend()
#define F first
#define S second
#define pb push_back
#define pu push
#define COUT(x) cout<<(x)<<endl
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,vector<ll>,greater<ll>>
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define mp make_pair
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define sz(x) (ll)(x).size()
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD = 998244353;
const ll INF = 1LL << 60;
using vll = vector<ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pll = pair<ll, ll>;
using vc = vector<char>;
using vvc = vector<vc>;
template<class T> inline bool chmax(T& a, T b) { 
 if (a < b) { a = b; return true; } return false; 
}
template<class T> inline bool chmin(T& a, T b) {
 if (a > b) { a = b; return true; } return false; 
}
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
//二項係数 nCr
const int MAX = 700000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
int main(){
  COMinit();
  ll n,m,k;
  cin>>n>>m>>k;
  vll t(n);
  t[0]=m;
  rep(i,n){
    if(i==0)continue;
    t[i]=t[i-1]*(m-1)%MOD;
  }
  ll ans=0;
  rep(i,k+1){
    ans+=t[n-1-i]*COM(n-1,i);
    ans%=MOD;
  }
  COUT(ans);
}

Measured memory_bytes: 21216
list_a = [[int(n) for n in input().split()] for m in range(0, 3)]
n = int(input())
list_b = [int(input()) for k in range(0, n)]

if (list_a[0][0] in list_b and list_a[0][1] in list_b and list_a[0][2] in list_b) or\
    (list_a[1][0] in list_b and list_a[1][1] in list_b and list_a[1][2] in list_b) or\
    (list_a[2][0] in list_b and list_a[2][1] in list_b and list_a[2][2] in list_b) :
    print('Yes')

elif (list_a[0][0] in list_b and list_a[1][0] in list_b and list_a[2][0] in list_b) or\
    (list_a[0][1] in list_b and list_a[1][1] in list_b and list_a[2][1] in list_b) or\
    (list_a[0][2] in list_b and list_a[1][2] in list_b and list_a[2][2] in list_b) :
    print('Yes')

elif (list_a[0][0] in list_b and list_a[1][1] in list_b and list_a[2][2] in list_b) or\
    (list_a[2][0] in list_b and list_a[1][1] in list_b and list_a[0][2] in list_b):
    print('Yes')

else:
    print('No')

Measured memory_bytes: 9292
#include <algorithm>
#include <cstdlib>
#include <iostream>
int main(int argc, char *argv[]) {
  int N, T, A, X;
  std::cin >> N >> T >> A;
  int res = 0, cc = 1 << 30;
  for (int i = 1; i <= N; ++i) {
    std::cin >> X;
    int d = (T * 1000 - X * 6) - A * 1000;
    if (d < 0)
      d = -d;
    if (cc > d) {
      cc = d;
      res = i;
    }
  }
  std::cout << res << std::endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define owo(i,a, b) for(int i=(a);i<(b); ++i)
#define uwu(i,a, b) for(int i=(a)-1; i>=(b); --i)
#define senpai push_back
#define ttgl pair<int, int>
#define ayaya cout<<"ayaya~"<<endl
 
using namespace std;
/*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
gp_hash_table<int, int> mp;*/
using ll = long long;
using ld = long double;
const ll MOD = 1000000007;
const ll root = 62;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
ll binpow(ll a,ll b){ll res=1;while(b){if(b&1)res=(res*a)%MOD;a=(a*a)%MOD;b>>=1;}return res;}
ll modInv(ll a){return binpow(a, MOD-2);}
const double PI = acos(-1);
const double eps = -1e6;
const int INF = 0x3f3f3f3f;
const int NINF = 0xc0c0c0c0;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll NINFLL = 0xc0c0c0c0c0c0c0c0;
const int mxN = 100001;
vector<ttgl> ans;
bool one[mxN];
int two[20];
int n;
int main() {
    //freopen("file.in", "r", stdin);
    //freopen("file.out", "w", stdout);
    mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
    cin.tie(0)->sync_with_stdio(0);
    cin>>n;
    two[0] = 1;
    owo(i, 1, 20) {
        two[i] = two[i-1]*2;
    }
    owo(i, 0, 20) {
        if(n==two[i]) {
            cout<<"No\n";
            exit(0);
        }
    }
    ans.senpai({1, 2});
    one[2] = true;
    ans.senpai({2, 3});
    ans.senpai({3, 1+n});
    ans.senpai({1+n, 2+n});
    ans.senpai({2+n, 3+n});
    for(int i=4; i<n; i+=2) {
        ans.senpai({1, i});
        one[i] = true;
        ans.senpai({i, i+1});
        ans.senpai({1, i+n+1});
        ans.senpai({i+n+1, i+n});
    }
    cout<<"Yes\n";
    if((n&1)==0) {
        int k = n-1;
        int lowest = 0;
        while(k&(two[lowest]))lowest++;
        int add = two[lowest];
        if(one[n-add+1]) {
            ans.senpai({n, n-add+1});
        }else {
            ans.senpai({n, n-add+1+n});
        }
        if(one[add]) {
            ans.senpai({n+n, add});
        }else {
            ans.senpai({n+n, add+n});
        }
    }
    for(auto p: ans) {
        cout<<p.first<<" "<<p.second<<"\n";
    }
    return 0;
}


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

int main()
{
    //自作関数の宣言
    vector<unsigned long long> next_p_mod(unsigned, long long);
    unsigned long long modpow(unsigned long long , unsigned long long , unsigned long long);
    void comb(vector<vector<long long int>>, unsigned long long);
    unsigned long long modinv(unsigned long long , unsigned long long);
    //
    ll N,sum;
  sum=0;
  string S;
  cin>>N;
  vector<unsigned long long> L(N);
  for(int i=0;i<N;i++){
  cin>>L.at(i);
  }
  sort(L.begin(), L.end());
	ll a,b,c;
 for(int i=0;i<N-2;i++){
	a=L.at(i);
   for(int j=i+1;j<N-1;j++){
     b=L.at(j);
   	for(int k=j+1;k<N;k++){
		c=L.at(k);
      if(c>a+b){
        break;
      }
      if(b<a+c&&c<a+b){
            sum++;
      }
    }
   }
  }
	cout<<sum<<endl;
    return 0;
}

vector<unsigned long long> next_p_mod(unsigned N, long long mod)
{ //next_permutation
    vector<unsigned long long> Next_p(N);
    unsigned long long Next_p_buff = 1;
    for (int i = 0; i < N; i++)
    {
        Next_p_buff *= (i + 1) % mod;
        Next_p.at(i) = Next_p_buff % mod;
    }
    return Next_p;
}
unsigned long long modpow(unsigned long long a, unsigned long long n, unsigned long long mod)
{
    unsigned long long res = 1;
    while (n > 0)
    {
        if (n & 1)
            res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
void comb(vector<vector<long long int>> &v, unsigned long long mod)
{
    //vector<入れたい型> v(配列の個数(x),vector<入れたい型> (配列の個数,初期値));
    for (int i = 0; i < v.size(); i++)
    {
        v[i][0] = 1;
        v[i][i] = 1;
    }
    for (int k = 1; k < v.size(); k++)
    {
        for (int j = 1; j < k; j++)
        {
            v[k][j] = (v[k - 1][j - 1] + v[k - 1][j]) % mod;
        }
    }
}
// a^{-1} mod を計算する
unsigned long long modinv(unsigned long long a, unsigned long long mod)
{
    return modpow(a, mod - 2, mod);
}

// modinv
/*void modinv(unsigned long long N, unsigned long long mod,unsigned long long *inv) {
 // unsigned long long inv[N] ;
  for (unsigned long long i = 1; i < N; i++) {
    inv[i] = (i == 1) ? 1 : (mod - (mod / i) * inv[mod % i] % mod);
    assert(inv[i] * i % mod == 1);
  }
  //return 0;
}*/




Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <queue>
#define MOD (1000000007l)
#define rep(i, n) for(long i = 0; i < (n); i++)

using namespace std;

void solve() {
  long N;
  cin >> N;

  vector<long> foo(N+1);
  rep(i, N+1) foo[i] = i;
  rep(i, N+1) {
    {
      long next = i + 1;
      if (next < N+1) foo[next] = min(foo[next], foo[i] + 1);
    }
    {
      long next = 6;
      while (i + next < N+1) {
        foo[i + next] = min(foo[i + next], foo[i] + 1);
        next *= 6;
      }
    }
    {
      long next = 9;
      while (i + next < N+1) {
        foo[i + next] = min(foo[i + next], foo[i] + 1);
        next *= 9;
      }
    }
  }
  cout << foo[N] << endl;
}

int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout.precision(12);
  solve();
  return 0;
}


Measured memory_bytes: 1024
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int x1=sc.nextInt();
        int y1=sc.nextInt();
        int x2=sc.nextInt();
        int y2=sc.nextInt();
        int x3,y3,x4,y4;
        int dx=x2-x1; int dy=y2-y1;
        x4=x1+y1-y2; y4=y1+x2-x1;
        x3=x4+dx; y3=y4+dy;
        System.out.println(x3+" "+y3+" "+x4+" "+y4);
    }
}


Measured memory_bytes: 21460
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

#define ll long long
#define ull unsigned long long
#define REP(i, n) for(int i=0; i<n; i++)

int c[3][3];
int main(){
    REP(i,3) REP(k,3) cin >> c[i][k];

    for(int a1 = -100000; a1 <= 100000; a1++){
        int b1 = c[0][0] - a1;
        int b2 = c[0][1] - a1;
        int b3 = c[0][2] - a1;
        int a2 = c[1][0] - b1;
        int a3 = c[2][0] - b1;
        if(a2+b2 != c[1][1]) continue;
        if(a2+b3 != c[1][2]) continue;
        if(a3+b2 != c[2][1]) continue;
        if(a3+b3 != c[2][2]) continue;
        cout << "Yes" << endl;
        return 0;
    }
    cout << "No" << endl;
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
typedef long long ll;
int a[110];
int main()
{
    int n;
    cin >> n;
    for(int i=1;i<=n;i++)
    {
        cin >> a[i];
    }
    sort(a+1,a+1+n);
    int cnt=0;
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            for(int k=j+1;k<=n;k++)
            {
                if(a[i]+a[j]>a[k]&&(a[i]!=a[j])&&(a[j]!=a[k])&&(a[i]!=a[k]))
                {
                    cnt++;
                    //cout << a[i] << " " << a[j] << " " << a[k] << endl;
                }
            }
        }
    }
    cout << cnt;
    return 0;
}

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

int K;

int main(){
  cin >> K;
  if(K == 1) cout << 1;
  if(K == 2) cout << 1;
  if(K == 3) cout << 1;
  if(K == 4) cout << 2;
  if(K == 5) cout << 1;
  if(K == 6) cout << 2;
  if(K == 7) cout << 1;
  if(K == 8) cout << 5;
  if(K == 9) cout << 2;
  if(K == 10) cout << 2;
  if(K == 11) cout << 1;
  if(K == 12) cout << 5;
  if(K == 13) cout << 1;
  if(K == 14) cout << 2;
  if(K == 15) cout << 1;
  if(K == 16) cout << 14;
  if(K == 17) cout << 1;
  if(K == 18) cout << 5;
  if(K == 19) cout << 1;
  if(K == 20) cout << 5;
  if(K == 21) cout << 2;
  if(K == 22) cout << 2;
  if(K == 23) cout << 1;
  if(K == 24) cout << 15;
  if(K == 25) cout << 2;
  if(K == 26) cout << 2;
  if(K == 27) cout << 5;
  if(K == 28) cout << 4;
  if(K == 29) cout << 1;
  if(K == 30) cout << 4;
  if(K == 31) cout << 1;
  if(K == 32) cout << 51;
}

Measured memory_bytes: 256
n = gets.chomp.to_i
a, b = gets.chomp.split.map(&:to_i)
ary = gets.chomp.split.map(&:to_i)
count1 = 0
count2 = 0
count3 = 0

ary.each do |item|
    if a >= item
        count1 += 1
    elsif b >= item
        count2 += 1
    else
        count3 += 1
    end
end
ans = [count1,count2, count3]
puts ans.sort![0]

Measured memory_bytes: 1788
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args)throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] str = br.readLine().split(" ");
		int[] side = new int[6];

		for(int i = 0; i < 6; i++){
			side[i] = Integer.parseInt(str[i]);
		}
		Dice dice = new Dice(side);
		char[] ca = br.readLine().toCharArray();
		for(char c : ca){
			switch(c){
			case 'N':
				dice.N();
				break;
			case 'E':
				dice.E();
				break;
			case 'W':
				dice.W();
				break;
			case 'S':
				dice.S();
				break;
			default:
				break;
			}
		}
		System.out.println((dice).getside(0));
	}
}
class Dice {
	private int[] side = new int[6];
	Dice(int[] side){
		this.side = side;
	}
	public void N(){
		int temp = side[0];
		side[0] = side[1];
		side[1] = side[5];
		side[5] = side[4];
		side[4] = temp;
 	}
	public void E(){
		int temp = side[0];
		side[0] = side[3];
		side[3] = side[5];
		side[5] = side[2];
		side[2] = temp;
	}
	public void W(){
		int temp = side[0];
		side[0] = side[2];
		side[2] = side[5];
		side[5] = side[3];
		side[3] = temp;
	}
	public void S(){
		int temp = side[0];
		side[0] = side[4];
		side[4] = side[5];
		side[5] = side[1];
		side[1] = temp;
	}
	public int getside(int i){
		return  side[i];
	}
}

Measured memory_bytes: 24400
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr long long MOD = 1000000007;
constexpr long long INF = 1LL << 60;
const long double PI = acosl(-1.0);
constexpr long double EPS = 1e-11;
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 main(){
string s;
deque<char> que;
cin >> s;
for (ll i = 0; i < s.size();i++){
    if (s[i] == '0') que.push_back('0');
    else if(s[i]=='1')
        que.push_back('1');
    else{
        if (que.empty()) continue;
        else que.pop_back();
    }
}
while(!que.empty()){
    cout << que.front();
    que.pop_front();
}
cout << endl;
}

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

int main(void) {
  string S;
  cin >> S;
  set<char> se;
  for (int i = 0; i < 3; i++) {
    se.insert(S[i]);
  }
  cout << (se.size() == 1 ? "No" : "Yes") << endl;
  return 0;
}

Measured memory_bytes: 256
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    A = list(map(int,input().split()))
    num = [-1 for _ in range(N)]
    for i in range(N):
        num[A[i]-1] = i+1

    print(*num)

if __name__ == "__main__":
    main()

Measured memory_bytes: 13388
#include <bits/stdc++.h>
using namespace std;
 
long long n,k,a[100010],f[100010],m=1;
main()
{
    cin>>n>>k;
    for(int i=1;i<=n;i++) cin>>a[i];
	for(int i=2;i<=n;i++) f[i]=1e10;
    for(int i=2;i<=n;i++)
	for(int j=i-1;j>=max(i-k,m); j--) 
      f[i]=min(f[i],f[j]+abs(a[i]-a[j]));
    cout<<f[n];
}

Measured memory_bytes: 1792
import java.util.*;

public class Main {

  public static void main(String[] args) {
   Scanner sc = new Scanner(System.in);
   String s = sc.next();
   String t = sc.next();
   int ans = 0;
   for(int i = 0; i < 3 ; i++){
     if(s.charAt(i)==t.charAt(i)){
       ans++;
     }
   }
   System.out.print(ans);
  }
}


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

void Main()
{
	int H, W; cin >> H >> W;
	vector<string> table(H);
	vector<vector<int>> row_sharp_idx(H, vector<int>(1, -1));
	vector<vector<int>> column_sharp_idx(W, vector<int>(1, -1));
	queue<pair<int, int>> search_q;
	rep(i,H) {
		string str; cin >> str;
		table[i] = str;
		rep(j,W) {
			if (str[j] == '#') {
				row_sharp_idx[i].push_back(j);
				column_sharp_idx[j].push_back(i);
			} else {
				search_q.push(make_pair(i, j));
			}
			if (i == H - 1) {
				column_sharp_idx[j].push_back(H);
			}
		}
		row_sharp_idx[i].push_back(W);
	}
	// for (auto vec : column_sharp_idx) {
	// 	for (auto v : vec) {
	// 		cout << v << " ";
	// 	}
	// 	cout << endl;
	// }
	int res = -1;
	while (!search_q.empty()) {
		auto p = search_q.front(); search_q.pop();
		auto row_it = lower_bound(row_sharp_idx[p.first].begin(), row_sharp_idx[p.first].end(), p.second);
		int row_num = *row_it - row_it[-1] - 1;
		auto column_it = lower_bound(column_sharp_idx[p.second].begin(), column_sharp_idx[p.second].end(), p.first);
		int column_num = *column_it - column_it[-1] - 1;
		// cout << row_num << " " << column_num << endl;
		res = max(res, column_num + row_num - 1);
	}
	cout << res << endl;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
}


Measured memory_bytes: 49936
YEARS = ["{:02d}".format(x) for x in range(100)]
MONTHS = ["{:02d}".format(x) for x in range(1, 13)]

S = input()

left, right = S[:2], S[2:]

types = 0x0

# YYMM
if left in YEARS and right in MONTHS:
    types += 0x01
# MMYY
if left in MONTHS and right in YEARS:
    types += 0x10

if types == 0x00:
    print("NA")
elif types == 0x01:
    print("YYMM")
elif types == 0x10:
    print("MMYY")
else:
    print("AMBIGUOUS")


Measured memory_bytes: 3064
#include <bits/stdc++.h>
#define err(args...) {}
#ifdef DEBUG
#include "_debug.cpp"
#endif
using namespace std;
using ll = long long;
using ld = long double;
template <typename T> using lim = numeric_limits<T>;
template <typename T> istream& operator>>(istream& is, vector<T>& a) { for(T& x : a) { is >> x; } return is; }
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    cin >> a;
    vector<int> win(k + 1);
    for(int i = 0; i <= k; i++) {
        for(int j : a) {
            win[i] |= i >= j and not win[i - j];
        }
    }
    cout << (win[k] ? "First" : "Second") << endl;
    return 0;
}


Measured memory_bytes: 640
#include <cstdio>
#include <bitset>

using namespace std;

const int MAXN = 2001, MAXV = 2001 * 1001;

int n, arr[MAXN];
bitset<MAXV> dp;

int main() {
	scanf("%d", &n);
	int s = 0;
	for (int i = 0; i < n; i++) {
		scanf("%d", arr + i);
		s += arr[i];
	}
	int maxv = s / 2 + 1;
	dp.set(0);
	for(int i = 0; i < n; i++)
	    dp |= dp << arr[i];
	for (int i = maxv-1; i >= 0; i--) {
		if (dp[i]) {
			printf("%d\n", s - i);
			return 0;
		}
	}
}

Measured memory_bytes: 768
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in);) {
            new Main().solve(sc);
        }
    }

    void solve(Scanner sc) {
        int n = sc.nextInt();
        int m = sc.nextInt();

        if (Math.abs(n - m) >= 2) {
            System.out.println(0);
            return;
        }

        long ans = (m == n) ? 2 : 1;
        for (int i = 1; i <= n; i++) {
            ans = (ans * i) % (1_000_000_000 + 7);
        }

        for (int i = 1; i <= m; i++) {
            ans = (ans * i) % (1_000_000_000 + 7);
        }

        System.out.println(ans);
    }
}


Measured memory_bytes: 21844
/*
ABHIJEET BISWAS
CSE 4th SEM 
MNNIT ALLAHBAD
https://atcoder.jp/contests/dp/tasks/dp_m
*/

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 1e18
#define ll long long
#define ld long double
#define pii pair<int,int>
#define pli pair<long long,int>
#define pll pair<long long,long long>
#define MAX 1000009
#define pb push_back
#define mp map<int,int>
#define f first
#define s second
#define fastIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
ld pi=2.0*acos(0.0);
ll dp[101][100008];
int main() {
	fastIO
	ll n,k;
	cin>>n>>k;
	
	ll arr[n+1];
	for(int i=1;i<=n;i++)
	cin>>arr[i];
	dp[0][0]=1;
	for(int i=1;i<=n;i++)
	{
		for(int j=0;j<=k;j++)
		{
			dp[i][j]=(dp[i-1][j]);
			if(arr[i]<j)
			{
				int y= dp[i-1][j-arr[i]-1];
				dp[i][j]=(dp[i][j]-y+MOD)%MOD;
			}
		}
		for(int j=1;j<=k;j++)
		dp[i][j]=(dp[i][j-1]+dp[i][j])%MOD;
	}
/*	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=k;j++)
		cout<<dp[i][j]<<" ";
		cout<<endl;
	}*/
	cout<<dp[n][k]%MOD<<endl;
	
	return 0;
}

Measured memory_bytes: 78336
from functools import reduce
N, M, C = map(int, input().split())
*B, = map(int, input().split())
count = 0
for _ in range(N):
	if 0 < C + reduce(lambda acc, p: acc + p[0]*p[1], zip(map(int, input().split()), B), 0):
		count += 1
print(count)


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

int main(){
	int L;
	cin >> L;
	
	bool has[101];
	for(int i=1; i<=100; ++i){has[i] = false;}
	
	int hole[2000];
	int n=0;
	
	for(int i=1; i<=L; ++i){
		int cat; cin>>cat;
		if(cat < 0){
			cat = -cat;
			if( n == 0 || !has[cat]){
				cout<<i<<endl;
				return 0;
			}else if( hole[n-1] == cat ){
				has[cat] = false;
				n--;
			}else{
				cout<<i<<endl;
				return 0;
			}
		}else{
			if( has[cat] ){
				cout<<i<<endl;
				return 0;
			}
			has[cat] = true;
			hole[n] = cat;
			n++;
		}
	}
	cout << "OK\n";
}


Measured memory_bytes: 3096
import copy


def main():
    height, width, leave_black = [int(x) for x in input().split()]
    table = [list(input()) for _ in range(height)]
    ans = 0
    for num_h in range(2 ** height):
        for num_w in range(2 ** width):
            tmp = copy.deepcopy(table)
            for bit_h in range(height):
                if num_h >> bit_h & 1:
                    tmp[bit_h] = ['r'] * width
            for bit_w in range(width):
                if num_w >> bit_w & 1:
                    for row in tmp:
                        row[bit_w] = 'r'
            # print(num_h, num_w, tmp)
            if sum(c == '#' for row in tmp for c in row) == leave_black:
                ans += 1
    print(ans)


if __name__ == '__main__':
    main()


Measured memory_bytes: 9344
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <stdlib.h>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <float.h>
using namespace std;

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

	ans = n / 3;

	cout << ans << endl;
 
	return 0;
}


Measured memory_bytes: 256
import math

# inputList=[]
# for i in range(6):
#     inputNum = input()
#     inputList.append(inputNum)
inputa = input().split("/")
# inputb = input().split()

a = int(inputa[0])
b = int(inputa[1])
c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

if b < 5:
    print("Heisei")
else:
    print("TBD")



Measured memory_bytes: 38256
#pragma GCC optimize ("O3")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	int pn = 0;
	if (*ci == '-') {
		pn = 1;
		ci++;
	}
	ll tmp = *(ll*)ci;
	int dig = ((tmp & ma0) ^ ma0) ? 68 - __builtin_ctzll((tmp & ma0) ^ ma0) : 0;
	tmp = tmp << dig & ma1;
	tmp = tmp * 10 + (tmp >> 8) & ma2;
	tmp = tmp * 100 + (tmp >> 16) & ma3;
	tmp = tmp * 10000 + (tmp >> 32) & ma4;
	ci += (64 - dig >> 3);
	while ((ct = *ci++) >= '0') tmp = tmp * 10 + ct - '0';
	if (pn) tmp = -tmp;
	return tmp;
}

ll A[200001];
void pakuri_sort(int N, ll A[]) {
	const int b = 8;
	ll tmp[200001];
	rep(k, 4) {
		int kazu[1 << b] = {}, kazu2[1 << b] = {};
		rep(i, N) kazu[A[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu[i + 1] += kazu[i];
		for (int i = N - 1; i >= 0; i--) tmp[--kazu[A[i] >> k * b & ((1 << b) - 1)]] = A[i];
		k++;
		rep(i, N) kazu2[tmp[i] >> k * b & ((1 << b) - 1)]++;
		rep(i, (1 << b) - 1) kazu2[i + 1] += kazu2[i];
		for (int i = N - 1; i >= 0; i--) A[--kazu2[tmp[i] >> k * b & ((1 << b) - 1)]] = tmp[i];
	}
}

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


	int N = getint();
	rep1(i, N) {
		A[i] = getint() + A[i - 1];
	}

	pakuri_sort(N + 1, A);

	ll kotae = 0;
	ll mae = 1e18;
	int kazu = 0;
	rep(i, N + 1) {
		if (mae != A[i]) {
			mae = A[i];
			kazu = 0;
		}
		kotae += kazu++;
	}

	printf("%lld\n", kotae);

	Would you please return 0;
}

Measured memory_bytes: 6472
// In the name of GOD
#include<bits/stdc++.h>
using namespace std;

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     IOS         ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	setprecn(x) cout<<fixed<<setprecision(x);
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	mod         1000000007
#define 	inf         10000000000000007
#define 	rep(i,n)    for(ll i=0;i<n;i++)
#define 	repe(i,a,b) for(ll i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search

ll power(ll a,ll b,ll m=mod)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2,m);
	if(b%2==0)
		return((c%m)*(c%m))%m;
	return ((((c%m)*(c%m))%m)*(a%m))%m;
}

/********************************************************/
//	d.erase(unique(all(d)), d.end());

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

int main()
{
	IOS;
	ll n,k,m,i,j,c=0,cs=0,t;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n>>j;
		// n=s.length();
		ll a[n];
		cin>>a[0];
		k=a[0];
		while(k%2==0)
		{
			k/=2;
			c++;
		}
		cs=k; // cs==rest and c==two
		m=0;
		repe(i,1,n)
		{
			cin>>a[i];
			k=a[i];m=0;
			while(k%2==0)
			{
				k/=2;
				m++;
			}

			if(m!=c)
			{
				cout<<"0\n";
				return 0;
			}
			cs=lcm(cs,k);
		}


		ll num = cs * (1LL*pow(1LL*2, 1LL*c));
		ll ans = 2*j/num;
		if(ans%2) ans = ans/2+1;
		else ans = ans/2;
		cout<<ans;

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

Measured memory_bytes: 1024
#include <cassert>
#include <cstdio>
#include <cstdlib>

int
main()
{
    long long n;
    assert(scanf("%lld", &n) == 1);

    int sum = 0;
    bool all9 = true;
    while (n >= 10) {
        sum += 9;
        if (n % 10 != 9)
            all9 = false;
        n /= 10;
    }
    sum += n - (all9 ? 0 : 1);
    printf("%d\n", sum);
    exit(0);
}


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



int main(){
    int r,D,x[11];
    cin >> r >> D >> x[0];
    for(int i=0;i<10;++i){
        x[i+1] = r*x[i] - D;
    }

    for(int i=1;i<11;++i){
    cout << x[i] << endl;
    }
}





Measured memory_bytes: 256
#include <algorithm>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <queue>
#include <stack>
#include <utility>
#include <vector>
using std::cerr;
using std::cin;
using std::cout;
using std::endl;

void OutputError(std::string s) {
  cerr << "\033[93m" << s << "\033[m" << endl;
  return;
}

int main(void) {
  cout << std::fixed << std::setprecision(10);
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  int n, x;
  cin >> n >> x;
  std::vector<int> a(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int64_t result = 0;
  for (int i = 0; i < n - 1; i++) {
    int64_t eat = a[i] + a[i + 1] - x;
    if (eat < 0) eat = 0;
    result += eat;
    if (i == n - 2) {
      if (a[i] - eat >= 0) {
        a[i] -= eat;
      } else {
        a[i + 1] -= (eat - a[i]);
        a[i] = 0;
      }
    } else {
      if (a[i + 1] - eat >= 0) {
        a[i + 1] -= eat;
      } else {
        a[i] -= (eat - a[i + 1]);
        a[i + 1] = 0;
      }
    }
  }
  cout << result << endl;

  return 0;
}


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

using namespace std;

struct Initializer {
  Initializer() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(15);
  }
} initializer;

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  cout << (a ^ b ^ c) << endl;
}



Measured memory_bytes: 256
from collections import deque


def main():
    N = int(input())
    h = list(map(int, input().split()))
    q = deque()
    q.append(h)
    ans = 0
    while len(q):
        t = q.popleft()
        if len(t) == 0:
            continue
        minimum = min(t)
        ans += minimum
        l = 0
        for i in range(len(t)):
            if t[i] == minimum:
                q.append([x-minimum for x in t[l:i]])
                l = i+1
        q.append([x-minimum for x in t[l:len(t)]])
    print(ans)


if __name__ == "__main__":
    main()


Measured memory_bytes: 39024
#include <bits/stdc++.h>
#define For(i, a, b) for(int (i)=(a); (i)<(b); ++(i))
#define rFor(i, a, b) for(int (i)=(a)-1; (i)>=(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<pii, int> ppi;
typedef complex<double> xy_t;
typedef vector<lint> poly;
template<class T>bool chmax(T &a, const T &b){if(a<b){a=b; return true;} return false;}
template<class T>bool chmin(T &a, const T &b){if(a>b){a=b; return true;} return false;}

const lint mod = 1e9+7;
const lint INF = mod;
const int MAX = 100010;

int expression(string &s, int &idx);
int term(string &s, int &idx);
int factor(string &s, int &idx);
int number(string &s, int &idx);

int expression(string &s, int &idx){
    int ret=term(s, idx);
    while(true) {
        if (s[idx]=='+') ++idx, ret+=term(s, idx);
        else if(s[idx]=='-') ++idx, ret-=term(s, idx);
        else break;
    }
    return ret;
}

int term(string &s, int &idx){
    int ret=factor(s, idx);
    while(true) {
        if (s[idx]=='*') ++idx, ret*=factor(s, idx);
        else if(s[idx]=='/') ++idx, ret/=factor(s, idx);
        else break;
    }
    return ret;
}

int factor(string &s, int &idx){
    if(s[idx]=='('){
        ++idx;
        int ret=expression(s, idx);
        ++idx;
        return ret;
    }
    else return number(s, idx);
}

int number(string &s, int &idx){
    int ret=0;
    while(0<=s[idx]-'0' && s[idx]-'0'<=9){
        ret=ret*10+(s[idx]-'0');
        ++idx;
    }
    return ret;
}

int main(){
    int q;
    scanf("%d", &q);
    while(q--){
        string s;
        cin >> s;
        int idx=0;
        printf("%d\n", expression(s, idx));
    }
}


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

/**
 * ランレングス圧縮
 */
vector<pair<char, ll>> RLE(const string &S) {
    ll cnt = 0;
    vector<pair<char, ll>> res;
    for (ll i = 0; i < (ll) S.size(); i++) {
        cnt++;
        if (i == (ll) S.size() - 1) {
            res.emplace_back(S[i], cnt);
            break;
        }
        if (S[i] != S[i + 1]) {
            res.emplace_back(S[i], cnt);
            cnt = 0;
        }
    }
    return res;
}

int main() {
  int n;
  string s;
  cin >> s;
  n = s.size();
  vector<int> ans(n, 0);
  vector<pair<char, ll>>  ran = RLE(s);
  ll index = -1; //なんかしらんけど-1じゃないと合わん
  for(pair<char, ll> item: ran) {
    if (item.first == 'R') {
      index += item.second;
      ans[index] += (item.second+1)/2;
      ans[index+1] += (item.second)/2;
      //cout << "R index: " << index << endl;
    } else {
      ans[index] += (item.second)/2;
      ans[index+1] += (item.second+1)/2;
      index += item.second;
      //cout << "L index: " << index << endl;
    }
  }

  rep(i,n) {
    printf("%d%c", ans[i], i==n-1?'\n':' ');
  }
  return 0;
}


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

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

int main(){
	int n,k,x,y;
	cin>>n>>k>>x>>y;
	cout<<x*min(k,n)+y*max(n-k,0)<<endl;
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<math.h>

using namespace std;

int main()
{	string a;
	cin >> a;
	int b = 700;
	if (a[0] == 'o')
		b += 100;
	if (a[1] == 'o')
		b += 100;
	if (a[2] == 'o')
		b += 100;
	cout << b;
}

Measured memory_bytes: 3116
#include <fstream>
#include <iostream>
#include <functional>
#include <algorithm>
#include <sstream>
#include <cstring>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <deque>
#include <ctime>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <iomanip>

using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define EPS 1e-8
#define LL_INF 0x3fffffffffffffff
#define INF 0x3f3f3f3f3f3f3f3f
#define MEM(a, b) memset(a, b, sizeof(a))
#define PPER(i, n, m) for (int i = n; i >= m; i--)
#define REPP(i, n, m) for (int i = n; i <= m; i++)
#define REP(i, n, m) for (int i = n; i < m; i++)
#define PER(i, n, m) for (int i = n; i > m; i--)
#define SA(n) scanf("%d", &(n))
#define SLLA(n) scanf("%lld", &(n))
#define MP make_pair
#define FF first
#define SS second
#define PB push_back
#define DE(val) cout << #val << ": " << val << endl;
 
const int dx44[6] = {0, -1, -1, 1, 1};
const int dy44[6] = {0, -1, 1, -1, 1};
const int dx4[6] = {0, 1, 0,-1};
const int dy4[6] = {1, 0, -1,0};
const int dx8[9] = {0, -1, 0, 1, 0, 1, 1, -1, -1};
const int dy8[9] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
const int dx82[9] = {0, -1, -1, 1, 1, 2, 2, -2, -2};
const int dy82[9] = {0, 2, -2, 2, -2, 1, -1, 1, -1};

void update(ll& x,ll v){
    if(x==-1)x=v;
    else if(x>v)x=v;
}
 
ll po(ll a, ll b, ll mod)
{
    ll res = 1;
    a %= mod;
    for (; b; b >>= 1)
    {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
    }
    return res;
}
ll gcd(ll a, ll b)
{
    if (a == 0)
    {
        return b;
    }
    else
    {
        return gcd(b % a, a);
    }
}
void extgcd(ll a, ll b, ll &d, ll &x, ll &y)
{
    if (!b)
    {
        d = a;
        x = 1;
    }
    else
    {
        extgcd(b, a % b, d, y, x);
        y -= x * (a / b);
    }
}
ll inverse(ll a, ll n)
{
    ll d, x, y;
    extgcd(a, n, d, x, y);
    return d == 1 ? (x + n) % n : -1;
}
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
const int maxn = 2e5 + 15;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
/*************************************************************************/

int n;
string s,t;
string ans;
void solve() {
    cin>>n>>s>>t;
    REP(i,0,s.length()) {
        ans.push_back(s[i]);
        ans.push_back(t[i]);
    }
    cout<<ans<<endl;
}
  
int main()
{   
    //freopen("i.txt", "r", stdin);
    // freopen("o.txt", "w", stdout);
    solve();
    return 0;
 
}
 

Measured memory_bytes: 256
/******************************************
* AUTHOR : RAJAGOPALAN *
* NICK : ARNO *
* INSTITUTION : VIT *
******************************************/
#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define alli(a, n, k) (a+k),(a+n+k)
#define FP(i, a, b, k) for(__typeof(a) i = a;i < b;i += k)
#define FS(i, a, b, k) for(__typeof(a) i = a;i > b;i -= k)
#define IT(it, a) for(__typeof(a.begin()) it = a.begin();it != a.end(); ++it)
#define ordered_set tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define eps 1e-6
#define pi 3.141592653589793
using namespace std;
using namespace __gnu_pbds;

template<class T> inline T gcd(T x, T y) { if (!y) return x; return gcd(y, x%y);}
typedef vector<int> VII;
typedef vector<ll> VLL;
typedef pair<int, int> PII;
typedef vector< pair<int, int> > VPII;
typedef vector< pair<int, PII > > VPPI;
const int MOD = 1e9 + 7;
const int INF = 1e9;

inline ll modulo(ll a, ll m)
{
    return (a % m + m) % m;
}

inline ll modInverse(ll a, ll m)
{
    assert(__gcd(a, m) == 1);
    ll m0 = m;
    ll y = 0, x = 1;

    if (m == 1)
        return 0;

    while (a > 1)
    {
        ll q = a / m;
        ll t = m;

        m = a % m, a = t;
        t = y;

        y = x - q * y;
        x = t;
    }

    if (x < 0)
        x += m0;

    return x;
}

inline ll modPow(ll x, ll y, ll m)
{ //x^y % m
    if (y == 0)
        return 1LL;
    else if (y == 1)
        return x;
    else
    {
        ll ans = modPow(x, y / 2, m) % m;
        if (y & 1)
        {
            return (((ans * ans) % m) * x) % m;
        }
        else
        {
            return (ans * ans) % m;
        }
    }
}

int main(int argc, char* argv[])
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;
    int ss,ps;
    cin>>n>>k>>ss>>ps;
    ll cost=min(n,k)*ss+max(0,n-k)*ps;
    cout<<cost;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef		long long       ll;
typedef         long double      dl;
typedef     unsigned long long  ull;
#define		pb              push_back
#define		PB              pop_back
#define		nn              "\n"
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define		all(p)          p.begin(),p.end()
#define		zz(v)           (ll)v.size()
#define		ss              ' '
#define	       MEM(a,b)         memset(a,(b),sizeof(a))
#define	       CLR(p)           memset(p,0,sizeof(p))
#define f0(i,b) for(int i=0;i<(b);i++)
#define f1(i,b) for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define         arrsize(a)      (sizeof(a)/sizeof(a[0]))
//#define       arrsize(a)      (sizeof(a)/sizeof(*a))
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
#define		pi              acos(-1.0)
#define	       ff               first
#define	       sc              second
typedef        pair <int, int>   pii;
typedef       pair <ll, ll>      pll;
typedef      vector< pair <ll, ll> >      vpll;
typedef		vector<ll>      vll;
typedef		map<string,ll>      msl;
typedef		map<ll,ll>      mll;
#define yes cout << "YES\n"
#define no cout<<"NO\n"
//memset(ar,-1,sizeof(ar));
//#define sort(x) sort(x.begin(), x.end())
//sort(a,a+n,greater<ll>())
//for (auto it = mp.begin(); it != mp.end(); ++it){}
// string x(w.size(),'1');
#define MAX 1000005
#define precision(a) fixed << setprecision(a)

#define mod 1000000007

 ll ar[MAX],br[MAX],cr[MAX],ar1[MAX],br1[MAX],cr1[MAX];

int main()
{
 //O_O ;
   ll n;
   cin>>n;
   for(ll i=1;i<=n;i++) cin>>ar[i],cin>>br[i],cin>>cr[i];
     ar1[n]=ar[n],br1[n]=br[n],cr1[n]=cr[n];
     for(ll i=n-1;i>=1;i--)
     {
        // cout<<"ar[i]"<<ar[i]<<nn;
         // cout<<"br1[i+1]"<<br1[i+1]<<nn;
         // cout<<"cr1[i+1]"<<cr1[i+1]<<nn;
         ar1[i]=max((ar[i]+br1[i+1]),(ar[i]+cr1[i+1]));
       //  cout<<"ar1[i]"<<ar1[i]<<nn;
         br1[i]=max((br[i]+ar1[i+1]),(br[i]+cr1[i+1]));
       //  cout<<"br1[i]"<<br1[i]<<nn;
         cr1[i]=max((cr[i]+ar1[i+1]),(cr[i]+br1[i+1]));
       //  cout<<"cr1[i]"<<cr1[i]<<nn;
    }
  /*   for(ll i=n-1;i>=1;i--)
     {
         br1[i]=max((ar[i]+ar1[i+1]),(cr[i]+cr1[i+1]));
    }
  for(ll i=n-1;i>=1;i--)
     {
         cr1[i]=max((br[i]+br1[i+1]),(ar[i]+ar1[i+1]));
    }
    */
    //ll temp=
    cout<<max(ar1[1],max(br1[1],cr1[1]))<<nn;
    return 0;
}


Measured memory_bytes: 8328
#include <stdio.h>
int main (){
  int p,q,r,x;
  scanf ("%d%d%d",&p,&q,&r);
  if (p+q < p+r) {
    if (q+r < p+q) x = q+r;
    else x = p+q;
  }
  else {
    if (q+r < p+r) x = q+r;
    else x = p+r;
  }
  
  printf("%d",x);
  
  return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h> //g++-9で実行（gcc version 9.3.0），g++だとデフォルトのclang

using namespace std;

//#define int long long                         //intでオーバフローした時の切り替え用
#define debug(x) cerr << #x << ": " << x << endl //エラー出力として変数名と変数の中身表示
#define DEBUG_VEC(v)                   \
    cerr << #v << ":";                 \
    for (int i = 0; i < v.size(); i++) \
        cerr << " " << v[i];           \
    cerr << endl;
#define DEBUG_MAT(v)                          \
    cerr << #v << endl;                       \
    for (int i = 0; i < v.size(); i++)        \
    {                                         \
        for (int j = 0; j < v[i].size(); j++) \
        {                                     \
            cerr << v[i][j] << " ";           \
        }                                     \
        cerr << endl;                         \
    }
#define Sp(p) cout << setprecision(25) << fixed << p << endl; //小数点以下を25桁で表示
#define all(obj) (obj).begin(), (obj).end()
#define pb push_back

//usingエイリアス（別名という意味，型定義のこと）
using ll = long long;
//template <class T> using Vec = std::vector<T>;//エイリアステンプレート

const ll MOD = (ll)1e9 + 7;
//const ll MOD = 998244353;
const ll INF = (ll)1e18 + 1;
const double EPS = 1e-9;
const long double pi = 3.1415926535897932384626433832795028841971L;

//マクロでintをlong longと定義したときはsinged
int main()
{
    cin.tie(0);                  //cinとcoutの同期を切る（高速化)
    ios::sync_with_stdio(false); //iostreamとstdioの同期を切る（高速化)

    double A, B, H, M;

    cin >> A >> B >> H >> M;

    double r = abs(30 * H + 30*M/60- 6 * M);
    if (r >= 180)
        r = 360 - r;

    //cout << sqrt(A * A + B * B - 2.0 * A * B * cos(r / 360.0 * 2.0* pi)) << endl;
    Sp(sqrt(A * A + B * B - 2.0 * A * B * cos(r / 360.0 * 2.0* pi)));
    return 0;
}

Measured memory_bytes: 4180
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <time.h>
#define ll long long
#define double long double
#define itn int
#define endl '\n'
#define co(ans) cout<<ans<<endl;
#define COYE cout<<"YES"<<endl;
#define COYe cout<<"Yes"<<endl;
#define COye cout<<"yes"<<endl;
#define CONO cout<<"NO"<<endl;
#define CONo cout<<"No"<<endl;
#define COno cout<<"no"<<endl;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define ALL(V) ((V).begin(),(V).end())
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define EPS 1e-10
#define PI 3.141592653589793238
#define MOD 1000000007
#define MAX 5100000
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}
using namespace std;

int main(){
  string S;
  int K;
  cin>>K>>S;
  
  if(S.size()<=K) cout<<S<<endl;
  else cout<<S.erase(K)+"..."<<endl;
}

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

ull func( ull b, ull x ){
  return b/x + 1;
}

int main(){
  ull a,b,x;
  cin >> a >> b >> x;
  if( a != 0 ){
  	cout << func(b,x) - func(a-1,x) << endl;
  }else{
    cout << func(b,x) << endl;
  }
  return 0;
}

Measured memory_bytes: 256