akhauriyash/Code-Regression huggingface dataset:
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func intScanner() int {
	n, _ := strconv.Atoi(Scanner())
	return n
}

func floatScanner() float64 {
	n, _ := strconv.ParseFloat(Scanner(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func stringSliceScanner(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scanner()
	}
	return a
}
func intSliceScanner(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = intScanner()
	}
	return a
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	n := intScanner()
	fmt.Println(n / 3)
}


Measured memory_bytes: 1772
#include <iostream>
using namespace std;
int main(){
    int n;
    cin >> n;
    
    int s = 1;
    int sum = 0;
    
    for (int i = 0; i < 9; i++) {
        sum += n / s % 10;
        s *= 10;
    }
    
    if (n % sum == 0) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;
    }
    
}


Measured memory_bytes: 256
using System;

public class Program
{
    public void Solve()
    {
        var sc = new Scanner();
        int N = sc.NextInt();
        int K = sc.NextInt();
        int[] H = sc.IntArray();

        if (N <= K)
        {
            Console.WriteLine(0);
            return;
        }

        long ans = 0;
        Array.Sort(H);
        for (int i = 0; i < N - K; i++)
        {
            ans += H[i];
        }
        
        Console.WriteLine(ans);
    }

    public static void Main(string[] args)
    {
        new Program().Solve();
    }
}

class Scanner
{
    public Scanner()
    {
        _pos = 0;
        _line = new string[0];
    }

    const char Separator = ' ';
    private int _pos;
    private string[] _line;

    #region スペース区切りで取得

    public string Next()
    {
        if (_pos >= _line.Length)
        {
            _line = Console.ReadLine().Split(Separator);
            _pos = 0;
        }

        return _line[_pos++];
    }

    public int NextInt()
    {
        return int.Parse(Next());
    }

    public long NextLong()
    {
        return long.Parse(Next());
    }

    public double NextDouble()
    {
        return double.Parse(Next());
    }

    #endregion

    #region 型変換

    private int[] ToIntArray(string[] array)
    {
        var result = new int[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = int.Parse(array[i]);
        }

        return result;
    }

    private long[] ToLongArray(string[] array)
    {
        var result = new long[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = long.Parse(array[i]);
        }

        return result;
    }

    private double[] ToDoubleArray(string[] array)
    {
        var result = new double[array.Length];
        for (int i = 0; i < array.Length; i++)
        {
            result[i] = double.Parse(array[i]);
        }

        return result;
    }

    #endregion

    #region 配列取得

    public string[] Array()
    {
        if (_pos >= _line.Length)
            _line = Console.ReadLine().Split(Separator);

        _pos = _line.Length;
        return _line;
    }

    public int[] IntArray()
    {
        return ToIntArray(Array());
    }

    public long[] LongArray()
    {
        return ToLongArray(Array());
    }

    public double[] DoubleArray()
    {
        return ToDoubleArray(Array());
    }

    #endregion
}

Measured memory_bytes: 30720
// Computes time difference of two time period
// Time periods are entered by the user

#include <iostream>
using namespace std;




int main()
{
    int a,b,c,d,k;
    cin>>a>>b>>c>>d>>k;
    cout<<(c*60+d)-(a*60+b)-k<<endl;
    return 0;
}



Measured memory_bytes: 3584
package main

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

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	A, B, C := sc.nextInt(), sc.nextInt(), sc.nextInt()
	ans := 0
	for i := 0; i < C; i++ {
		if B < A {
			break
		}
		B -= A
		ans++
	}
	fmt.Println(ans)
}


Measured memory_bytes: 640
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int n = sc.nextInt();
		int tmp = (int)Math.sqrt(n);
		System.out.println(tmp*tmp);
	}
}

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

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

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

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

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}

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

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

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

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

}


Measured memory_bytes: 21332
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;

typedef long long ll;

struct edge
{
  ll to, cap, rev;
};

const int MAX_N = 100;
// const int MAX_M = 1000;
const int MAX_L = 1000;
const int MAX_V = MAX_L + MAX_L + 2;
const int INF = 1 << 29;

vector< edge > G[MAX_V];
bool used[MAX_V];

void init_G()
{
  for (int v = 0; v < MAX_V; v++)
    G[v].clear();
}

void add_edge(int from, int to, ll cap)
{
  G[from].push_back((edge){to, cap, G[to].size()});
  G[to].push_back((edge){from, 0, G[from].size() - 1});
}

ll dfs(int v, int t, ll f)
{
  if (v == t)
    return f;

  used[v] = true;

  for (int i = 0; i < (int)G[v].size(); i++)
  {
    edge &e = G[v][i];

    if (!used[e.to] && e.cap > 0)
    {
      ll d = dfs(e.to, t, min(e.cap, f));

      if (d > 0)
      {
        e.cap -= d;
        G[e.to][e.rev].cap += d;
        return d;
      }
    }
  }

  return 0;
}

ll max_flow(const int s, const int t)
{
  ll flow = 0;

  for (;;)
  {
    memset(used, false, sizeof used);
    ll f = dfs(s, t, INF);

    if (f == 0)
      return flow;
    else
      flow += f;
  }
}

int dist[MAX_N][MAX_N];

void init_dist()
{
  for (int n1 = 0; n1 < MAX_N; n1++)
    for (int n2 = 0; n2 < MAX_N; n2++)
      dist[n1][n2] = n1 == n2 ? 0 : INF;
}

void warshall_floyd(int N)
{
  for (int k = 0; k < N; k++)
    for (int i = 0; i < N; i++)
      for (int j = 0; j < N; j++)
        dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);
}

int N, M, L;
int ps[MAX_L], ts[MAX_L];

void solve()
{
  init_G();

  warshall_floyd(N);

  const int s = L + L, t = s + 1;

  for (int i = 0; i < L; i++)
    add_edge(s, i, 1);

  for (int i = 0; i < L; i++)
    add_edge(i + L, t, 1);

  for (int i = 0; i < L; i++)
    for (int j = 0; j < L; j++)
      if (i != j && dist[ps[i]][ps[j]] + ts[i] <= ts[j])
        add_edge(i, j + L, 1);

  printf("%lld\n", L - max_flow(s, t));
}

int main()
{
  while (true)
  {
    scanf("%d%d%d", &N, &M, &L);
    if (N == 0 && M == 0 && L == 0)
      break;

    init_dist();

    for (int m = 0; m < M; m++)
    {
      int u, v, d;
      scanf("%d%d%d", &u, &v, &d);
      dist[u][v] = d;
      dist[v][u] = d;
    }

    for (int l = 0; l < L; l++)
      scanf("%d%d", ps + l, ts + l);

    solve();
  }
  return 0;
}



Measured memory_bytes: 49448
#include <stdio.h>
#include <iostream>
#include <string>
using namespace std;

int main()
{
   int result = 0;
   string str;
   cin >> str;

   for(int i=0; i<4;i++){
        if(str[i] == '+') result++;
        else               result--;
   }
   printf("%d\n", result);
}

Measured memory_bytes: 256
n=int(input())
a=[int(j) for j in input().split()]
t=1
mod=10**9+7
def gcd(x,y):
    if y==0:
        return x
    else:
        return gcd(y,x%y)
for i in a:
    t*=i//gcd(t,i)
print(sum(t//i for i in a)%mod)

Measured memory_bytes: 4084
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e18;
constexpr long long MOD = 1e9 + 7;

signed main() {
    int n, q;
    cin >> n >> q;
    ll a[n];
    rep(i, n) {
        cin >> a[i];
    }
    ll x[q];
    rep(i, q) {
        cin >> x[i];
    }
    reverse(a, a + n);
    ll sum[n + 1] = {}, sumeven[n + 1] = {};
    rep(i, n) {
        sum[i + 1] = sum[i] + a[i];
        sumeven[i + 1] = sumeven[i] + (i % 2 == 0 ? a[i] : 0);
    }
    rep(i, q) {
        auto isOK = [&](int w) {
            return (2 * w < n ? 2 * x[i] - a[w] - a[2 * w] > 0 : true);
        };
        int ng = 0, ok = INF;
        while (abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (isOK(mid)) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        cout << sum[ok] + (2 * ok < n ? sumeven[n] - sumeven[2 * ok] : 0)
             << endl;
    }
    return 0;
}

Measured memory_bytes: 5760
#include <bits/stdc++.h>
using namespace std;
#define ALL(a) (a).begin(),(a).end()
#define rALL(a) (a).rbegin(),(a).rend()
typedef pair<int, int> Pint;
typedef pair<int64_t, int64_t> Pll;


int main() {
    int64_t N;
    cin >> N;
    Pll ans = make_pair(1, 1);
    for (int i = 0; i < N; i++) {
        int64_t a, b;
        cin >> a >> b;
        int64_t j = max(ans.first / a, ans.second / b);
        if (j == ans.first / a && ans.first % a != 0) {
            j++;
        }
        if (j == ans.second / b && ans.second % b != 0) {
            j++;
        }
        ans = make_pair(a * j, b * j);
    }
    cout << ans.first + ans.second << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define FOR(i, x, y) for (decay<decltype(y)>::type i = (x), _##i = (y); i < _##i; ++i)
#define FORD(i, x, y) for (decay<decltype(x)>::type i = (x), _##i = (y); i > _##i; --i)
#ifdef zerol
#define dbg(x...) do { cout << "\033[32;1m" << #x << " -> "; err(x); } while (0)
void err() { cout << "\033[39;0m" << endl; }
template<template<typename...> class T, typename t, typename... A>
void err(T<t> a, A... x) { for (auto v: a) cout << v << ' '; err(x...); }
template<typename T, typename... A>
void err(T a, A... x) { cout << a << ' '; err(x...); }
#else
#define dbg(...)
#endif


const LL MOD = 1e9+7;

const int N = 1e5+50;

int mu[N], prime[N], pcnt;
int minp[N];

int smu[N];

void init() {
    mu[1] = 1;
    for (int i=2; i<N; ++i) {
        if (!minp[i]) {
            minp[i] = i;
            prime[pcnt++] = i;
            mu[i] = -1;
        }
        for (int j=0; j<pcnt; ++j) {
            LL nextp = 1LL * i * prime[j];
            if (nextp >= N)
                break;
            if (!minp[nextp])
                minp[nextp] = prime[j];
            if (i % prime[j] == 0) {
                mu[nextp] = 0;
                break;
            } else {
                mu[nextp] = -mu[i];
            }
        }
    }
    for (int i=1; i<N; ++i)
        smu[i] = smu[i-1] + mu[i];
}

LL bin(LL a, LL b, LL p) {
    LL res = 1;
    a = (a%MOD+MOD)%MOD;
    for (; b; b>>=1, a=a*a%p)
        if (b & 1)
            res = res * a % p;

    return res;
}

LL s(LL x) {
    return 1LL * x * (x + 1) / 2 % MOD;
}

int n, k;
LL f(int nn) {
    LL ans = 0;
    for (int l=1, r, v; l<=nn; l=r+1) {
        v = nn / l;
        r = nn / v;
        // printf("f2: %d %lld\n", smu[r] - smu[l-1], bin(v, n, MOD));
        ans = (ans + (smu[r] - smu[l-1]) * bin(v, n, MOD)) % MOD;
    }
    // printf("f: %d %lld\n", n, ans);
    return ans;
}

int main() {
    // int t;
    // scanf("%d%d", &n, &k);
    n = 3;
    cin >> k;
    init();
    
    LL ans = 0;
    for (int l=1, r, v; l<=k; l=r+1) {
        v = k / l;
        r = k / v;
        r = min(r, k);
        LL del = 0;
        // printf("%d %d %d\n", l, r, v);
        // for (int j=1; j<=v; ++j) {
        //     del = (del + mu[j] * bin(v/j, n, MOD)) % MOD;
        // }

        ans = (ans + f(v) * (s(r) - s(l-1))) % MOD;
    }
    cout << (ans % MOD + MOD) % MOD;
    return 0;
}

Measured memory_bytes: 4804
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {

	/**
	 * Q1
	 * @param args
	 * @throws Exception
	 */
	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String hoge = br.readLine();
		hoge = hoge.substring(0, 4)+" "+hoge.substring(4,12);

		System.out.println(hoge);

	}

}


Measured memory_bytes: 8148
#include <bits/stdc++.h>
#include <iostream>
#include <numeric>
#include <string>
#include <list>
#include <limits>
#include <type_traits>
#include <vector>

using namespace std;

int main(void) {

    int n;

    cin >> n;

    std::map<std::string, int> goods;
    string s;

    for (int i = 0 ; i < n; i++ ) {
        cin >> s;
        goods[s]++;
    }

    cout << goods.size();
    
}

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

map<vector<pair<long long int,int> >,int> m;

map<long long int,int> ps;

vector<int> p;

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	for(int i=2;i<=3000;i++){
		bool ok=true;
		for(int j=2;j<i;j++)
			if(i%j==0)
				ok=false;
		if(ok)	p.emplace_back(i);
	}
	for(long long int i=1;i<=100000;i++)
		ps[i*i]=i;
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		long long int x;
		cin>>x;
		vector<pair<long long int,int> > v;
		for(int it:p){
			if(x%it==0){
				int cnt=0;
				while(x%it==0){
					x/=it;
					cnt++;
				}
				cnt%=3;
				if(cnt!=0)
					v.emplace_back(it,cnt);
			}
			if(x==1)	break;
		}
		if(x!=1){
			if(ps.count(x))
				v.emplace_back(ps[x],2);
			else
				v.emplace_back(x,1);
		}
		m[v]++;
	}
	int ans1=0,ans2=0;
	vector<pair<long long int,int> > null;
	for(auto it:m){
		if(it.first==null){
			ans1++;
			continue;
		}
		auto now=it.first;
		for(auto &itt:now)
			itt.second=3-itt.second;
		if(m.count(now))
			ans2+=max(m[now],it.second);
		else
			ans1+=it.second;
	}
	cout<<ans1+ans2/2<<endl;
}


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

# dp[i][j]
# 上からi桁目まで見たとき、
# j=0:XがK未満であることが未確定である場合の、f(X)の最大値
# j=1:XがK未満であることが確定である場合の、f(X)の最大値
#
# XがK未満であることが確定->確定の遷移
#  Xiは0でも1でも可なので、Aiの0と1の個数のうち多い方を足せばよい。
# XがK未満であることが未確定->確定の遷移
#  Kiが1でXiを0としたとき、未確定->確定となる。
#  Xiを0にするということは、Aiの1の個数を足すことになる。
# XがK未満であることが未確定->未確定の遷移
#  (1)Kiが1でXiを1としたとき(2)Kiが0でXiを0としたときの2パターンがある。
#  (1)の場合はAiの0の個数、(2)の場合はAiの1の個数を足すことになる。

MAX_DIGIT = 42
dp = [[-1 for _ in range(2)] for _ in range(MAX_DIGIT+1)]
dp[MAX_DIGIT][0] = 0
for i in range(MAX_DIGIT-1,-1,-1):
  c0 = c1 = 0
  for a in A:
    if (a>>i)&1 == 1:
      c1 += 1
    else:
      c0 += 1
  if dp[i+1][1] >= 0:
    # 確定->確定
    dp[i][1] = max(dp[i][1], dp[i+1][1] + max((c1<<i),(c0<<i)))
  if dp[i+1][0] >= 0:
    if (K>>i)&1 == 1:
      # 未確定->未確定でKi=1&Xi=1
      dp[i][0] = max(dp[i][0], dp[i+1][0] + (c0<<i))
      # 未確定->確定(つまりKi=1&Xi=0) 
      dp[i][1] = max(dp[i][1], dp[i+1][0] + (c1<<i))
    else:
      # 未確定->未確定でKi=0&Xi=0
      dp[i][0] = max(dp[i][0], dp[i+1][0] + (c1<<i))
# dp[0][0]:最後まで XがK未満であることが未確定、つまりK=Xの場合の最大値
# dp[0][1]:XがK未満である場合の最大値
print(max(dp[0][0],dp[0][1]))
#print(dp)

Measured memory_bytes: 68696
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cctype>
#define len length()
#define sz size()
#define rng(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) rng(i, 0, n)
#define srt(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define vi(a, n) vector<int> a(n)
#define vs(a, n) vector<string> a(n)
#define vc(a, n) vector<char> a(n)
#define psb(a) push_back(a)
#define ppb pop_back()
#define erc(S, i) S.erase(S.begin() + i)
#define ers(S, i, j) S.erase(S.begin() + i, S.begin() + j)
#define sp(n) cout << setprecision(n) << fixed
#define fst(s) s.at(0)
#define lst(s) s.at(s.len - 1)
using namespace std;

long long comb(int n, int r){
    r = min(r,n-r);
    vector<vector<long long> > v(n+1,vector<long long>(r+1,0));
    rep(i,n+1){
        v[i][0]=1;
    }
    rep(i,r+1){
        v[i][i]=1;
    }
    rng(i,1,n+1){
        rng(j,1,r+1){
            v[i][j]=v[i-1][j]+v[i-1][j-1];
        }
    }
    return v[n][r];
}

int main(){
    int N, P;
    cin >> N >> P;
    int A[N];
    int evn=0, odd=0;
    rep(i,N){
        cin >> A[i];
        if(A[i]%2==0) evn++;
        else odd++;
    }
    long long pe=pow(2,evn), po=0;
    if(P==0){
        rep(i, (odd)/2+1){
            po += comb(odd,2*i);
        }
    }
    else{
        rep(i, (odd+1)/2){
            po += comb(odd,2*i+1);
        }
    }
    cout << pe * po << endl;
    return 0;
}


Measured memory_bytes: 256
n,m=io.read():match("(.+)%s(.+)")
c={}
for i=1,m do
  c[i]=0
end
for i=1,n do
  l=1
  for f in io.read():gmatch("%d+") do
    if l>1 then
      c[f*1]=c[f*1]+1
    end
    l=l+1
  end
end
ans=0
for k,i in pairs(c) do
  if i==n*1 then
    ans=ans+1
  end
end
print(ans)


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Data.SqlTypes;
using System.Linq;
using System.Text;
using System.Threading;

class Program
{
    static public int A;
    static public int B;
    static public int C;
    static public int N;
    static public int min = 1000000000;
    static public List<int> list = new List<int>();
    
    static void Main(string[] args)
    {
        int[] arr = Console.ReadLine().Split(' ').Select(v => int.Parse(v)).ToArray();
        N = arr[0];
        A = arr[1];
        B = arr[2];
        C = arr[3];
        for(int i = 1; i <= N; i++)
        {
            list.Add(int.Parse(Console.ReadLine()));
        }
        checkMP(0, 0, 0, 0, 0);
        Console.WriteLine(min);
    }

    static void checkMP(int ind , int a , int b , int c , int sumMP)
    {
        if(ind == N)
        {
            if (a == 0 || b == 0 || c == 0) return;
            int mp = Math.Abs(A - a) + Math.Abs(B - b) + Math.Abs(C - c) + sumMP;
            if (mp < min) min = mp;
            return;
        }
        checkMP(ind + 1, a, b, c, sumMP);
        checkMP(ind + 1, a + list[ind], b, c, (a==0)?sumMP:sumMP + 10);
        checkMP(ind + 1, a , b + list[ind], c, (b == 0) ? sumMP : sumMP + 10);
        checkMP(ind + 1, a, b, c + list[ind], (c == 0) ? sumMP : sumMP + 10);

    }



}

   

Measured memory_bytes: 28284
#include <iostream>
#include <cstdio>
#include <algorithm>
#define N 100005
using namespace std;

typedef long long ll;
ll n, s, a[N], b[N];
int main()
{
	ll i;
	cin >> n;
	for (i = 1; i <= n; i++) scanf("%lld %lld", &a[i], &b[i]);
	sort(a, a + n + 1);
	sort(b, b + n + 1);
	for (i = 0; i <= n; i++) s += max(0LL, a[i] - b[n - i]) * 2;
    cout << s << endl;
    return 0;
}

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

void Main()
{
    int x;
    cin >> x;
    int c500 = x / 500;
    x = x - c500 * 500;
    int c5 = x / 5;
    int p = c500 * 1000 + c5 * 5;    
    cout << p << endl;
}

int main(int argc, char **argv)
{
    Main();
    return 0;
}


Measured memory_bytes: 256
/*
 * main.c
 *
 *  Created on: 2020/07/27
 *      Author: 113896
 */
#include <stdio.h>

int max(int x, int y) {
	if (x > y) return x;
	else return y;
}

int main() {

	int n;
	scanf("%d", &n);

	int arr[4][3][10];
	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 3; j++) {
			for (int k = 0; k < 10; k++) {
				arr[i][j][k] = 0;
			}
		}
	}

	int b, f, r, p;
	for (int t = 0; t < n; t++) {
		scanf("%d%d%d%d", &b, &f, &r, &p);
		arr[b-1][f-1][r-1] = max(0, arr[b-1][f-1][r-1] + p);
	}

	for (int b = 0; b < 4; b++) {
		for (int f = 0; f < 3; f++) {
			for (int r = 0; r < 10; r++) {
				printf(" %d", arr[b][f][r]);
			}
			printf("\n");
		}
		if (b != 3) {
			printf("####################\n");
		}
	}

	return 0;
}




Measured memory_bytes: 2136
#include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(),x.end()
//map<key,value>


int main(){
  int a,b,c;
  cin >> a >> b >> c ;
  if(a <= c  && c <= b || b <=c && a >= c)cout << "Yes";
  else cout << "No";
}

Measured memory_bytes: 256
#include <iostream>
#include <string.h>
#include <stdio.h>
#include <math.h>
#include <list>
#include <set>
#include <queue>
#include <iterator>
#include <bitset>
#include <bits/stdc++.h>
#include <vector>
#include <cctype>
#include <algorithm>
#define ll             long long
#define _              ios_base::sync_with_stdio(0);cin.tie(0);
#define loop           for(i=0;i<n;i++)
#define pb             push_back
#define tc()           int t;cin>>t;while(t--) 
#define pi             acos(-1)         
 
using namespace std;
 
ll i,j,temp;

 
int main(){_

	bool contain = false;
	char number[4];
	cin>>number;
	for(i=0;i<3;i++){
		if(number[i]=='7'){
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;

	return 0;

}

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

using namespace std;

const int M = 1000005;

int main(void) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        int t;
        cin >> t;
        a[i] = t;
    }

    vector<int> cnt(M);
    for (int x : a) {
        if (cnt[x] != 0) {
            cnt[x] = 2;
            continue;
        }
        for (int i = x; i < M; i += x) cnt[i]++;
    }
    int ans = 0;
    for (int x : a) {
        if (cnt[x] == 1) ans++;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 7968
#include <bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
using namespace std;
const ll mod=998244353;
const ll inf = (ll)1e17;
const ld eps = 1e-12;
const ld PI = 3.14159265358979323846;
ll mul(ll a, ll b, ll m = mod) { return (ll)(a * b) % m;}
ll add(ll a, ll b, ll m = mod) { a += b; if(a >= m) a -= m; if(a < 0) a += m; return a;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
ll powmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res%mod;}
long modInverse(long a) {return powmod(a, mod-2);}

bool isp(string s){

    bool test=true;
    for(int i=0;i<s.size()/2;i++){
        if(s[i]!=s[s.size()-1-i]){
            test=false;
            break;
        }
    }
    return test;
    }
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin>>s;
    bool test=isp(s);
    int n=s.size();
    string s1="";
    for(int i=1;i<=(n-1)/2;i++){
        s1+=s[i-1];
    }
    string s2="";
    for(int i=(n+3)/2;i<=n;i++){
        s2+=s[i-1];
    }
    bool test1=isp(s1);
    bool test2=isp(s2);
    if(test==false || test1==false || test2==false)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
    return 0;
    }


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

int main()
{
	int N, Q, M, day;
	while (cin >> N >> Q, N || Q) {
		vector<int> date(100,0);
		for (int i = 0; i < N; i++) {
			cin >> M;
			for (int j = 0; j < M; j++) {
				cin >> day;
				date[day]++;
			}
		}
		int max = 0, maxi = 0;
		for (int i = 0;i < 100;i++) {
			if (date[i] >= Q && date[i] > max) {
				max = date[i];
				maxi = i;
			}
		}
		cout << maxi << endl;
	}
	return 0;
}

Measured memory_bytes: 1196
def f(ans, n):
    if ans > 21:
        return 0
    if n == 0:
        if ans + 11 <= 21:
            return ans + 11
        elif ans + 1 > 21:
            return 0
        else:
            return ans + 1
    else:
        return max(f(ans+1, n-1), f(ans+11, n-1))



while True:
    S = input()
    if S == "0":
        break

    N = [int(i) for i in S.split()]
    N.sort()
    N.reverse()

    ans = 0
    for i in range(len(N)):
        if N[i] == 1:
            ans = f(ans, len(N)-i-1)
            break
        elif N[i] >= 10:
            ans += 10
        else:
            ans += N[i]
    if ans > 21:
        print(0)
    else:
        print(ans)



Measured memory_bytes: 5604
#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); i >= (b); i--)
#define LFOR(i, a, b) for (long long int i = (a); i <= (b); i++)
#define LRFOR(i, a, b) for (long long int i = (a); i >= (b); i--)
#define MOD 1000000007
#define INF 1000000000           // 2000000000
#define LINF 1000000000000000000 // 9000000000000000000
#define DINF 1000000000000000.0
#define PI 3.14159265358979

//.size()はunsigned int　0-1をするとオーバーフローする

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

int dy[5] = {-1, 0, 1, 0, 0};
int dx[5] = {0, -1, 0, 1, 0};

int main(void) {
    int n,k;

    cin>>n>>k;

    n-=k;
    if(k==1){
        cout<<0<<endl;
    }else{
        cout<<n<<endl;
    }

}


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

int main(){
    long double l;
    cin >> l;
    long double a = l/3;
    long double ans = a*a*a;
    cout << fixed;
    cout << setprecision(12) << ans << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <array>
#include <algorithm>

const int size = 1005;
using matrix = std::array<std::array<int, size>, size>;

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


  matrix a;
  std::for_each(a.begin(), a.end(), [](auto x){x.fill(0);});

  auto nn = n;
  while (nn != 0)
    {
      int i, k;
      std::cin >> i >> k;
      while (k != 0)
        {
          int j;
          std::cin >> j;
          a[i-1][j-1] = 1;
          --k;
        }
      --nn;
    }

  for (int i=0; i<n; ++i)
    {
      for (int j=0; j<n; ++j)
        {
          if (j) std::cout << ' ';
          std::cout << a[i][j];
        }
      std::cout << std::endl;
    }
}



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

ll mod = 1000000007;

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

  ll ans = 1;
  for (int i = 1; i <= N; i++) {
    ans *= i;
    ans %= mod;
  }

  cout << ans << endl;
}

Measured memory_bytes: 256
import sys
N=int(input())
A=[int(i) for i in input().split()]
Aabs = [abs(a) for a in A]
zeroarray = []
plusarray = []
minusarray =[]
for n,a in enumerate(A):
    if a==0:
        zeroarray.append(a)
    elif a>0:
        plusarray.append(a)
    else:
        minusarray.append(a)
zeros =len(zeroarray)
plus = len(plusarray)
minus = N-zeros-plus
if zeros :#どんな正負も実現可能
    firstzero = 0
    print(sum(Aabs))
    if plus:#マイナスならfirstplusから、プラスならfirstzeroから、最後にfirsrtplusからfirstzeroを引く
        firstplus = plusarray[0]
        for i in range(1,plus):
            print(firstzero, plusarray[i])
            firstzero-=plusarray[i]
        if minus:
            for m in minusarray:
                print(firstplus,m)
                firstplus-=m
        if zeros>1:
            for i in range(1,zeros):
                print(firstzero,0)
        print(firstplus,firstzero)
    else:#全部firstzeroから引く
        if zeros>1:
            for z in range(zeros-1):
                print(0,0)
        for m in minusarray:
            print(firstzero,m)
            firstzero-=m
    sys.exit()
    
if (plus and minus):#どんな正負も実現可能
    firstminus = minusarray[0]
    print(sum(Aabs))
    firstplus = plusarray[0]
    firstminus = minusarray[0]
    for i in range(1,plus):
        print(firstminus, plusarray[i])
        firstminus-=plusarray[i]
    for i in range(1,minus):
        print(firstplus,minusarray[i])
        firstplus-=minusarray[i]
    print(firstplus,firstminus)
    sys.exit()
    
    
if plus:#全部プラスなのでminplusから一個以外引いた上でfirstplusから引く
    plusarray.sort()
    minplus = plusarray[0]
    firstplus = plusarray[1]
    print(sum(Aabs)-2*minplus)
    for i in range(2,plus):
        print(minplus, plusarray[i])
        minplus-=plusarray[i]
    print(firstplus,minplus)
    sys.exit()
   
else:#全部マイナスなのでmaxminusから一個以外引く
    minusarray.sort(reverse = True)
    maxminus = minusarray[0]
    print(sum(Aabs)+2*maxminus)
    for i in range(1,minus):
        print(maxminus, minusarray[i])
        maxminus-=minusarray[i]
    sys.exit()
    

Measured memory_bytes: 14136
#include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
	int n,a;
	while(cin>>n>>a) {
		int flag=0;
		for(int i=0;i<=a;i++) {
			if((n-i)%500==0) {
				cout<<"Yes"<<endl;
				flag=1;
				break;
			}
		}
		if(!flag)
			cout<<"No"<<endl;
	}
	return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main() {
	int N, X, i;
	int L[100];
	int count = 1;
	int num = 0;
	scanf("%d%d", &N, &X);
	for (i = 0; i<N; i++) {
		scanf("%d", &L[i]);
	}
	i = 0;
	while (1){
		num = num + L[i];
		if (X<num) {
			break;
		}
		else {
			count++;
		}
		i++;
	}
	printf("%d\n", count);
}

Measured memory_bytes: 128
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<iomanip>
#include<map>
#include<utility>
#include<string>

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

using namespace std;

#define min_3(a, b, c) min(a, min(b, c))
#define max_3(a, b, c) max(a, max(b, c))
typedef long long ll;


int main()
{
    ll n, m;
    cin >> n >> m;
    if(n == 1 && m == 1) cout << 1 << endl;
    else if(n == 1 && m > 1) cout << m - 2 << endl;
    else if(n > 1 && m == 1) cout << n - 2 << endl;
    else cout << (n - 2) * (m - 2) << endl;

}


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

#define ll long long
#define llu unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define pb push_back
#define pf push_front
#define pii pair<int, int>
#define pll pair<ll, ll>
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define fill(x,v) fill(all(x), v)
#define sumv(v) accumulate(all(v), 0LL)
#define bitcount(x) __builtin_popcount(x)
#define present(v,x) ((v).find(x) != (v).end())
#define cpresent(v,x) (find(all(v),x) != (v).end())
#define v2(type, v, n, m) vector<vector<type>> v(n, vector<type>(m))
#define v3(type, v, x, y, z) vector<vector<vector<type>>> v(x, vector<vector<type>>(y, vector<type>(z)))
#define unique(v) {sort(all(v)); v.resize(unique(all(v))-v.begin());}

// const int MOD = 1000000007;
const int MOD = 998244353;
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-6;

#define cerr cout
string to_string(string s) { return '"' + s + '"';}
string to_string(char s) { return string(1, s);}
string to_string(const char* s) { return to_string((string) s);}
string to_string(bool b) { return (b ? "true" : "false");}
string to_string(_Bit_reference b) { return (b ? "true" : "false");}
void debug_out() { cerr << ""; }
template <typename A> string to_string(A);
template <typename A, typename B>string to_string(pair<A, B> p) {return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}
template <typename A> string to_string(A v) {bool f = 1; string r = "{"; for (const auto &x : v) {if (!f)r += ", "; f = 0; r += to_string(x);} return r + "}";}
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {cerr << " " << to_string(H); debug_out(T...);}
#define pr(v, n) {for(int j=0; j<n; j++){debug_out(v[j]); if(j<n-1) cerr<<",";}}
#define dbg(...) {cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__); { cerr << endl; }}
#define dbg1d(v, n) {cerr << "[" << #v << "]: {"; pr(v, n); {cerr << " }" << endl;}}
#define dbg2d(v, n, m) {cerr<<"["<<#v<<"]:"<<endl;{for(int i=0; i<n; i++){cerr<<right<<setw(10)<<"["+to_string(i)+"] {";pr(v[i],m);{cerr<<" }"<<endl;}}}}
#define shout()  {cerr << "I'm Here...!!!" << endl;}

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
random_device rd; mt19937 mt(rd()); uniform_int_distribution<long long> mtrng(1,LONG_LONG_MAX);
inline long long myRand() {return mtrng(mt);}

inline ll fpow(ll n, ll k, int p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = (n%p) * (n%p) % p;} return r;}
inline int inv(ll a, int p = MOD) {return fpow(a, p - 2, p);}
inline int addmod(int a, int val, int p = MOD) {{if ((a = (a + val)) >= p) a -= p;} return a;}
inline int submod(int a, int val, int p = MOD) {{if ((a = (a - val)) < 0) a += p;}return a;}
inline int mult(int a, int b, int p = MOD) {return (ll) a * b % p;}

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

	int x, y, z;
	cin >> x >> y >> z;
	swap(x, y);
	swap(x, z);

	cout << x << " " << y << " " << z << endl;

	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <vector>

std::string solve(
    std::vector<std::vector<int>>& card,
    int n,
    const std::vector<int>& numbers)
{
  for (auto num : numbers) {
    for (auto& cc : card) {
      for (auto& a : cc) {
        if (a == num) {
          a = 0;
          break;
        }
      }
    }
  }

  for (const auto& cc : card) {
    if (std::accumulate(cc.begin(), cc.end(), 0) == 0) return "Yes";
  }
  for (int i = 0; i < 3; ++i) {
    int sum = 0;
    for (int j = 0; j < 3; ++j) {
      sum += card[j][i];
    }
    if (sum == 0) return "Yes";
  }

  int sum = 0;
  for (int i = 0; i < 3; ++i) {
    sum += card[i][i];
  }
  if (sum == 0) return "Yes";

  sum = 0;
  for (int i = 0; i < 3; ++i) {
    sum += card[i][2 - i];
  }
  if (sum == 0) return "Yes";

  return "No";
}

int main()
{
  std::vector<std::vector<int>> card(3, std::vector<int>(3));;
  for (auto& cc : card) {
    for (auto& a : cc) {
      std::cin >> a;
    }
  }
  int n;
  std::cin >> n;
  std::vector<int> numbers(n);
  for (auto& n : numbers) {
    std::cin >> n;
  }

  std::cout << std::setprecision(20);
  std::cout << solve(card, n, numbers) << std::endl;
}


Measured memory_bytes: 384
#include <stdio.h>
#include <stdlib.h>
#define UNKNOWN_ID -1
#define DEFAULT_VARR_SIZE 8
#define EMPTY_QUEUE(q) (q->size == 0)
#define FULL_QUEUE(q) (q->size == q->max)

typedef struct { int head, tail, size, max, *arr; } queue_t;
typedef struct { int size, i, *arr; } varr_t;

static queue_t *new_queue(int size) {
  queue_t *q;
  int i;

  q = (queue_t *) malloc(sizeof(queue_t));
  q->head = q->tail = q->size = 0;
  q->max = size;
  q->arr = (int *) malloc(sizeof(int) * size);
  for (i = 0; i < size; ++i) q->arr[i] = UNKNOWN_ID;
  return q;
}

static void free_queue(queue_t *q) {
  free(q->arr);
  free(q);
}

static void enqueue(queue_t *q, int n) {
  if (FULL_QUEUE(q)) return;
  q->arr[q->tail] = n;
  q->tail = (q->tail + 1) % q->max;
  q->size--;
}

static int dequeue(queue_t *q) {
  int n;

  if (EMPTY_QUEUE(q)) return UNKNOWN_ID;
  n = q->arr[q->head];
  q->arr[q->head] = UNKNOWN_ID;
  q->head = (q->head + 1) % q->max;
  q->size++;
  return n;
}

static void topological_sort(int size, int *vt, int *ig, varr_t *ts, varr_t *g) {
  int i, j, m, n;
  queue_t *q;

  for (i = 0; i < size; ++i) {
    if (vt[i] == 0 && ig[i] == 0) {
      q = new_queue(size);
      enqueue(q, i);
      while (!EMPTY_QUEUE(q)) {
        m = dequeue(q);
        vt[m] = 1;
        ts->arr[ts->i++] = m;
        for (j = 0; j < g[m].i; ++j) {
          n = g[m].arr[j];
          if (vt[n] == 1) continue;
          if (--ig[n] == 0) enqueue(q, n);
        }
      }
      free_queue(q);
    }
  }
}

int main(int argc, char **argv) {
  int v, e, i, k, l, *vt, *ig; // visited, in-degree
  varr_t ts, *g; // topological sorted array, graph

  scanf("%d %d", &v, &e);
  vt = (int *) malloc(sizeof(int) * v);
  ig = (int *) malloc(sizeof(int) * v);
  ts.size = v;
  ts.i = 0;
  ts.arr = (int *) malloc(sizeof(int) * ts.size);
  g = (varr_t *) malloc(sizeof(varr_t) * v);
  for (i = 0; i < v; ++i) {
    vt[i] = ig[i] = 0;
    g[i].size = DEFAULT_VARR_SIZE;
    g[i].i = 0;
    g[i].arr = (int *) malloc(sizeof(int) * g[i].size);
  }
  for (i = 0; i < e; ++i) {
    scanf("%d %d", &k, &l);
    if (g[k].i == g[k].size) {
      g[k].size *= 2;
      g[k].arr = (int *) realloc(g[k].arr, sizeof(int) * g[k].size);
    }
    g[k].arr[g[k].i++] = l;
    ig[l]++;
  }
  topological_sort(v, vt, ig, &ts, g);
  for (i = 0; i < ts.i; ++i) printf("%d\n", ts.arr[i]);
  free(vt); free(ig); free(ts.arr);
  for (i = 0; i < v; ++i) free(g[i].arr);
}


Measured memory_bytes: 2572
N = int(input())

def getDivisors(x):
    anss = set()
    for d in range(1, int(x**0.5)+1):
        if x%d == 0:
            anss.add(d)
            anss.add(x//d)
    return anss

divs = getDivisors(N) | getDivisors(N-1)
#print('divs:', divs)

ans = 0
for k in divs:
    if k == 1: continue
    x = N
    while x >= k:
        if x%k == 0:
            x //= k
        else:
            x %= k
    if x == 1:
        ans += 1

print(ans)


Measured memory_bytes: 40560
// problem: "https://atcoder.jp/contests/abc122/tasks/abc122_c"

#include<iostream>
#include<string>
#include<vector>

using namespace std;

int main()
{
    string s;
    int N,Q;

    cin>>N>>Q;
    cin>>s;

    vector<int>cnt(N+1);
    cnt[0] = cnt[1] = 0;
    int i;

    for(i=1;i!=N;i++)
    {
        if(s[i]=='C' && s[i-1]=='A')
            cnt[i+1] = cnt[i]+1;
        else
            cnt[i+1] = cnt[i];
    }

    int l,r;
    while(Q--)
    {
        cin>>l>>r;

        cout<<cnt[r]-cnt[l]<<'\n';
    }

    return 0;
}


Measured memory_bytes: 1408
import unittest


class TestB(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think('ip', 'cc'), 'icpc')

    def test_2(self):
        self.assertEqual(think('hmhmnknk', 'uuuuuuuu'), 'humuhumunukunuku')

    def test_3(self):
        self.assertEqual(think('aaaaa', 'aaaaa'), 'aaaaaaaaaa')


def solve():
    s, t = read()
    result = think(s, t)
    write(result)


def read():
    n = read_int(1)[0]
    buf = read_line(n=2 * n + 1)
    return buf.split(" ")


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(s, t):
    buf = ''
    for ss, tt in zip(s, t):
        buf += ss
        buf += tt
    return buf


def write(result):
    print(result)


if __name__ == '__main__':
    # unittest.main()
    solve()


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

int main() {
    int n, x;
    std::cin >> n >> x;
    std::vector<int> point(n);
    for(auto&e:point) std::cin >> e;

    auto p = 0, count = 0;
    try {
        while (p <= x) {
            p += point.at(count);
            ++count;
        }
    }
    catch (...) 
    {
        count++;
    }
    std::cout << count;

    return 0;
}

Measured memory_bytes: 384
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main(void){
    int n, ans = 0;
    long long d;
    cin >> n >> d;
    for(int i=0;i<n;i++){
        long long x, y;
        cin >> x >> y;
        if(x*x+y*y <= d*d) ans++;
    }
    cout << ans << endl;
}


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

typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
const ld PI = acos(-1);  
const ld EPS = 0.0000000001;


int main(){
    ll n, m;    cin >> n >> m;

    //cout << m << ' ' << (n*(n+1)/2) << endl;
    for(ll i=m/n; 1<=i; i--){
        if(m%i==0){
            cout << i << endl;
            return 0;
        }
    }
}

Measured memory_bytes: 256
class NormalInput{
  input: string[];
  pointer: number;
  constructor(raw:string){
    this.input=raw.split(/ |\n/);
    this.pointer=0;
  }
  int():number{
    const ret= parseInt(this.input[this.pointer], 10);
    this.pointer++;
    return ret;
  }
  str():string{
    const ret= this.input[this.pointer];
    this.pointer++;
    return ret;
  }
  strs(length:number):string[]{
    let ret:string[]=[];
    for(let i=0;i<length;i++){
      ret.push(this.str());
    }
    return ret;
  }
  ints(length:number):number[]{
    let ret:number[]=[];
    for(let i=0;i<length;i++){
      ret.push(this.int());
    }
    return ret;
  }
}

function Main(_: NormalInput) {
  const N=_.int();
  console.log((N-2)*180);
}

//DO NOT EDIT
Main(new NormalInput(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 7372
#include<bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
using namespace std;

//ループマクロ
#define FOR(i , a , b)  for(int i = (a) ; i < (b) ; i++)
#define REP(i , n)      for(int i = 0 ; i < n ; i++)
#define REPR(i , n)     for(int i = n ; 0 <= i ; i--)
#define ROP(i, n)       for(int i = 1 ; i <= n ; i++)

//入出力
#define SCOUT(x) cout << (x) << " "
#define VECCIN(x) for(auto& ele : (x) ) cin >> ele
#define VECOUT(x) for(auto& ele : (x) ) cout << ele << " "; cout << endl;

//その他
#define ALL(obj) (obj).begin() , (obj).end() 
#define SORT(obj) sort(ALL(obj))
#define GSORT(obj) sort(ALL(obj) , greater<int>())
#define P pair<int , int>
#define V vector<int>
#define VLL vector<long long>
#define M map<int, int>
#define S set<int>
#define PQ priority_queue<int>
#define PQG priority_queue<int , V , greater<int>>

int main(void) {

	ios::sync_with_stdio(false);	cin.tie(0);
    int X;  cin >> X;
    if(30 <= X)  printf("Yes\n");
    else         printf("No\n");
    
	return 0;
}


Measured memory_bytes: 3496
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
char f[110];
bool C,F;
int main()
{
    scanf("%s",&f);
    for(int i=0;i<=strlen(f)-1;i++)
    {
        if(f[i]=='C')
        {
            C=true;
        }
        if(f[i]=='F' && C==true)
        {
            F=true;
        }
    }
    if(C==true && F==true) printf("Yes");
    else printf("No");
    return 0;
}

Measured memory_bytes: 128
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <cmath>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <iostream>
#include <random>
#include <map>
#include <iomanip>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include <fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;

using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using qll = queue<ll>;
using vb = vector<bool>;
using mll = map<ll, ll>;
using sll = stack<ll>;
#define REP(i,n) for(ll i(0);(i)<(n);(i)++)
#define rep(i,n) for(ll i(0);(i)<(n);(i)++)
#define ALL(a) a.begin(), a.end()
#define enld endl //* missspell check
const ll INF = 1LL << 60;


void solve(long long A, long long B){
    if(A !=1 && B != 1){
        cout << 1 << endl; return;
    }
    if(A !=2 && B != 2){
        cout << 2 << endl; return;
    }
    if(A !=3 && B != 3){
        cout << 3 << endl; return;
    }
}

int main(){
    long long A;
    scanf("%lld",&A);
    long long B;
    scanf("%lld",&B);
    solve(A, B);
    return 0;
}


Measured memory_bytes: 256