akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define int long long int
#define pb push_back
#define MAX 100005
#define mod (int)(1e18+7)
#define sp fixed<<setprecision(12)
using namespace std;

/*
vector<int> primes;
bool is_prime[MAX];
void sieve(){
    is_prime[0]=is_prime[1]=true;
    for(int i=4;i<MAX;i+=2){
        is_prime[i]=true;
    }
    for(int i=3;i*i<MAX;i+=2){
        if(!is_prime[i]){
            for(int j=i*i;j<MAX;j+=i){
                is_prime[j]=true;
            }
        }
    }
    
}

int power(int a,int n,int p){
    int res=1;
    while(n){
        if(n&1){
            res=(res*a)%p;
            n--;
        }else{
            a=(a*a)%p;
            n/=2;
        }
    }
    return res;
}

const int N=(1e4)+7;
vector<int> graph[N];
bool vis[N];
bool col[N];
bool dfs(int cur,int c){
    vis[cur]=1;
    col[cur]=c;
    for(auto x:graph[cur]){
        if(!vis[x]){
            if(dfs(x,c^1)==false)
                return false;
        }else if(col[x]==col[cur]) return false;
    }
    return true;
}
*/
struct Cmp { 
    bool operator()(pair<int,int> const& p1, pair<int,int> const& p2) 
    { 
        // return "true" if "p1" is ordered  
        // before "p2", for example: 
        return min(p1.first,p1.second) < min(p2.first,p2.second);
    } 
}; 

int32_t main(){

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    //double    pi=3.14159265358979323846;

    int t=1;
    //cin>>t;
    //int it=1;
    while(t--){
        int n;
        cin>>n;
        int a[n];
        priority_queue<pair<int,int>, vector<pair<int,int>>,Cmp> p;
        priority_queue<int> pq;
        int ans=0;
        for(int i=0;i<n;i++){
            cin>>a[i];
            pq.push(a[i]);
        }
        int mn=pq.top();
        pq.pop();
        p.push({mn,mn});
        while(!pq.empty()){
            pair<int,int> pok=p.top();
            //cout<<pok.first<<" "<<pok.second<<"\n";
            int la=pq.top();
            pq.pop();
            p.pop();
            ans+=min(pok.first,pok.second);
            p.push({pok.first,la});
            p.push({pok.second,la});
        }
        cout<<ans<<"\n";

    }

    return 0;
    
}

Measured memory_bytes: 10528
#include "bits/stdc++.h"
#define ALL(x) x.begin(), x.end()
#define LEN(x) (int)x.size()
#define iostreamBooster() do{ cin.tie(nullptr); ios_base::sync_with_stdio(false); }while(0)
using namespace std;
typedef int64_t i64;
typedef pair<int,int> pii;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF = 0x3f3f3f3f;

int slv(int n) {
  if (n & 1) return 0;
  return 1 + slv(n/2);
}

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

  int ans = 1;
  int maxv = 0;
  for (int i = 1; i <= n; ++i) {
    if (chmax(maxv, slv(i))) {
      ans = i;
    }
  }
  cout << ans << endl;

  return 0;
}



Measured memory_bytes: 256
w, h = list(map(int, input().split()))
def solve(a, b):
  ret = float("INF")
  for i in range(a):
    s1 = b*i
    s2 = (b//2)*(a-i)
    s3 = (b-b//2)*(a-i)
    ret = min(ret, max(s1, s2, s3)-min(s1, s2, s3))
    s2 = b*((a-i)//2)
    s3 = b*((a-i)-(a-i)//2)
    ret = min(ret, max(s1, s2, s3)-min(s1, s2, s3))
  return ret
print(min(solve(w, h), solve(h, w)))

Measured memory_bytes: 3064
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<map>
#include<set>
#include<vector>
#include<queue>
#include<list>
#include<stack>
using namespace std;
#define ll long long 
#define dd cout<<endl
const int mod=1e9+7;
const int inf=1e9+7;
    
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    
    int n;
    string str;
    while(cin>>n>>str)
    {
    	n>=3200?cout<<str<<endl:cout<<"red"<<endl;
	}
    
    return 0;
}

Measured memory_bytes: 256
import java.util.*;

class Main{
	public static void main(String[]args){
    	Scanner sc = new Scanner(System.in);
    	int N = sc.nextInt();
      	Set<Integer> moti = new HashSet<>();
      	
      	for(int i = 0; i < N; i++){
        	int di = sc.nextInt();
        	moti.add(di);
        }
      	System.out.println(moti.size());
    }
}


Measured memory_bytes: 22736
#include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <cmath>
#include <iomanip>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <deque>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <bitset>
#include <sstream>
#define mop 1000000007
using namespace std;


struct Point{
    int x,y;
};

bool ascb( const Point& left, const Point& right){
    return left.x == right.x ? left.y < right.y : left.x < right.x;
}
bool ascr(const Point& left, const Point& right){
    return left.y == right.y ? left.x > right.x : left.y > right.y;
}

int main() {
    
    vector <Point> r,b;
    int n;
    cin >> n;
    for (int i =0;i<n;i++){
        Point p;
        cin >> p.x >> p.y;
        r.push_back(p);
    }
    for (int i =0;i<n;i++){
        Point p;
        cin >> p.x >> p.y;
        b.push_back(p);
    }
    sort(r.begin(),r.end(),ascr);
    sort(b.begin(),b.end(),ascb);
    int ans = 0;
    for (int i=0;i<n;i++){
        int x = r[i].x;
        int y = r[i].y;
        for (auto itr = b.begin();itr != b.end();itr++){
            if((*itr).y > y and (*itr).x > x){
                ans += 1;
                b.erase(itr);
                break;
            }
        }
    }
    cout << ans << endl;



}

Measured memory_bytes: 256
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
typedef long long ll;
ll n,m;
ll solve(ll x,ll y)
{
	if(x==y) return x;
	if(x<y) swap(x,y);
	return solve((x-1)%y+1,y)+(x-1)/y*y*2;
}
int main()
{
	scanf("%lld%lld",&n,&m);
	printf("%lld",solve(m,n-m)+n);
	return 0;
}

Measured memory_bytes: 1688
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		int b = sc.nextInt();
		// 文字列の入力
		if (a != 1 && b != 1) {
			System.out.println("1");
		} else if (a != 2 && b != 2) {
			System.out.println("2");
		} else {
			System.out.println("3");
		}
	}

}

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

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn readc() -> char {
    let s: String = read();
    return s.chars().nth(0).unwrap();
}

fn read_vec<T: FromStr>(n: usize) -> Vec<T> {
    return (0..n).map(|_| read()).collect();
}

fn main() {
    let s: String = read();
    let ci: Vec<char> = s.chars().collect();

    let ans;
    if ci[2] == ci[3] && ci[4] == ci[5] {
        ans = "Yes";
    } else {
        ans = "No";
    }

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


Measured memory_bytes: 4352
#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int main(){
    int N,L;
    cin>>N>>L;
    int ans=N*L+((N-1)*N)/2;
    if(L<=0&&0<=L+N-1){

    }
    else if(L+N-1<0){
        ans-=L+N-1;
    }
    else if(0<L){
        ans-=L;
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 3184
#include<iostream>

using namespace std;

int main(void){
  int n,prime[1000000],ans[1000000];


  for(int i=0;i<1000000;i++)prime[i]=ans[i]=0;
  prime[0]=prime[1]=1;

  for(int i=2;i*i<1000000;i++)
    if(prime[i]==0)
      for(int j=2*i;j<1000000;j+=i)
	prime[j]=1;
  
  int cnt=0;
  for(int i=0;i<1000000;i++){
    if(prime[i]==0)cnt++;
    ans[i]=cnt;
  }

  while(cin >> n)
    cout << ans[n] << endl;
  
  return 0;
}

Measured memory_bytes: 8968
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define DUMP(x)  cout << #x << " = " << (x) << endl;
#define FOR(i, m, n) for(ll i = m; i < n; i++)
#define IFOR(i, m, n) for(ll i = n - 1; i >= m; i-- )
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
#define FOREACH(x,a) for(auto& (x) : (a) )
#define ALL(v) (v).begin(), (v).end()
#define SZ(x) ll(x.size())

ll bpow(ll a , ll b){
  if (b == 0) return 1;
  ll ret;
  if (b%2 == 0){
    ll  t = bpow(a, b/2);
    ret = t*t;
  }else{
    ll t = bpow(a, (b-1)/2);
    ret = a*t*t;
  }
  return ret;
}

void no(){
  cout << -1 << endl;
  exit(0);
}

int main(){
  ll M, K; cin >> M >> K;
  ll N = bpow(2,M);
  if(K>N-1) no();
  if(M==1){
    if(K==1) no();
    else if(K==0) cout << "0 0 1 1" << endl;
    return 0;
  }
  cout << K << " ";
  IREP(i,N){
    if(i==K) continue;
    cout << i << " ";
  }
  cout << K << " ";
  REP(i,N){
    if(i==K) continue;
    cout << i;
    if(i==N-1) cout << endl;
    else cout << " ";
  }
}

Measured memory_bytes: 1792
X, Y = map(int, input().split())
mod = 10 ** 9 + 7
if (X + Y) % 3 != 0:
    print(0)
    exit()
    
n = (2 * Y - X) // 3
m = (2 * X - Y) // 3
if n < 0 or m < 0:
    print(0)
    exit()    

ans = 1
for i in range(1, n+1):
    ans *= (n+m+1-i) * pow(i, mod-2, mod)
    ans %= mod
    
print(ans)

Measured memory_bytes: 40300
# coding: utf-8
# Here your code !

import math

def func():
    try:
        line = input().rstrip()
        numbers = line.split(" ")
        for i,item in enumerate(numbers):
            numbers[i]=int(item)
    except:
        print("input error")
        return -1

    minimum=numbers[0]
    maximum=numbers[1]
    number=numbers[2]
    
    count=0
    devs = devisor(number)
    
    while(True):
        try:
            num=devs.pop()
            if( (num >= minimum) and (num <= maximum) ):
                count+=1
        except:
            break
    
    print(count)
    

def devisor(num):
    '''
    num????´???°???????????¨????????????
    loop?????°??????num????´??????°????§£???????????????????????§????´???°?????????????¨???????????????????
    '''
    
    result=set()

    for i in range(2,int(math.sqrt(num))+2):
        if(num % i == 0):
            subdevisor = devisor(int(num/i))        #num/i????´???°????±???????
            result.update(subdevisor)               #num/i????´???°???result?????????
            while(True):
                try:
                    result.add(i*subdevisor.pop())  #i??¨(num/i????´???°)?????????result?????????
                except:
                    break
            break
        elif(i==int(math.sqrt(num))+1):
            result.update({1,num})                  #num?????????????????§??§?´???°??????????????????????????°???1??¨num???result????????? (num????´???°)
    
    return result
    
func()
    

Measured memory_bytes: 7816
module Main (main) where

import Data.Functor ((<$>))

main :: IO ()
main = do
  [w,h,x,y,r] <- map read . words <$> getLine :: IO [Int]
  if 0 <= x-r && x+r <= w && 0 <= y-r && y+r <= h
    then putStrLn "Yes"
    else putStrLn "No"



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

using namespace std;

#define forn(i, n) for (int i = 0; i < n; i++)
#define sz(a) (int)a.size()
#define re return
#define fi first
#define se second
#define mp(a, b) make_pair(a, b)

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

const ll ma = 131072, inf = 10LL * ((ll)1e9);
ll n, L, sum[ma], qq[ma];
pll trmin[2 * ma];
vector<ll> a;
vector<int> ans;

pll get_min(int l, int r) {
	if (l > r)
		re mp(inf, 0);
	if (l % 2)
		re min(get_min(l + 1, r), trmin[l]);
	if (r % 2 == 0)
		re min(get_min(l, r - 1), trmin[r]);
	re get_min(l / 2, r / 2);
}

bool get_ans(int l, int r) {
	if (l + 1 >= r) {
		re true;
	}
	int nu = get_min(l + ma, r - 1 + ma).se;
	if (sum[nu] - sum[l] >= L && get_ans(l, nu - 1)) {
		qq[nu] = 1;
		re true;
	}
	if (sum[r] - sum[nu - 1] >= L && get_ans(nu, r)) {
		qq[nu] = 2;
		re true;
	}
	re false;
}

bool get_(int l, int r) {
	if (l + 1 >= r) {
		re true;
	}
	int nu = get_min(l + ma, r - 1 + ma).se;
	if (qq[nu] == 1) {
		for (int i = r - 1; i >= nu - 1; i--)
			if (i >= l + 1) cout << i << "\n";
		get_(l, nu - 1);
		re true;
	}
	for (int i = l + 1; i <= nu; i++)
		if (i < r) cout << i << "\n";
	get_(nu, r);
	re false;
}

int main() {
	iostream::sync_with_stdio(0), cin.tie(0);
	//freopen("a.in", "r", stdin);
	//freopen(".out", "w", stdout);
	cin >> n >> L;
	a.resize(n);
	sum[0] = 0;
	forn (i, n) {
		cin >> a[i];
		sum[i + 1] = sum[i] + a[i];
		trmin[i + ma] = mp(a[i], i + 1);
	}
	for (int i = ma - 1; i; i--)
		trmin[i] = min(trmin[2 * i], trmin[2 * i + 1]);
	if (!get_ans(0, n)) {
		cout << "Impossible\n";
		re 0;
	}
	cout << "Possible\n";
	get_(0, n);
	re 0;
}




Measured memory_bytes: 11520
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cassert>
#define bogo_sort   std::sort
#define bozo_sort   std::stable_sort
#define alles(obj)  obj.begin(), obj.end()
#define elif        else if
#define unless(flg) if(!(flg))
#define elless(flg) else if(!(flg))
#define echo        std::cout <<
#define read        std::cin >>
#define endl        std::endl
#define fin         << '\n'
#define bash        push_back
#define makePair    std::make_pair
#define _           << ' ' <<
// type-define
#define Stack       std::stack
#define Queue       std::queue
#define Set         std::set
#define PQueue      std::priority_queue
#define Vector      std::vector
#define Pair        std::pair
#define Map         std::map
#define UMap        std::unordered_map
#define Greater     std::greater
using String  =     std::string;
using llong   =     long long;
using boolean =     bool;
using Pii     =     Pair<int, int>;
using Vi      =     Vector<int>;
using Vii     =     Vector<Pii>;
// utils
constexpr int   dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int   dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
constexpr int   INF  = 0x3f3f3f3f;
constexpr llong LINF = 0x3f3f3f3f3f3f3f3fLL;

namespace {
    llong power ( llong x, llong n, llong mod ) {
        llong ans = 1;
        while ( n > 0 ) {
            if ( n & 1 ) ans = ( ans * x ) % mod;
            x = ( x * x ) % mod;
            n >>= 1;
        }
        return ans;
    }
    llong power ( llong x, llong n ) { return power( x, n, 1000000007 ); }
    llong gcd   ( llong x, llong y ) { return x % y ? gcd( y, x % y ) : y; }
    llong lcm   ( llong x, llong y ) { return ( x / gcd(x, y) * y ); }
    llong abs   ( llong n )          { return ( n < 0 ) ? -n : n; }
    boolean chmax ( llong &a, llong b ) { return a<b ? a=b, true : false; }
    boolean chmin ( llong &a, llong b ) { return b<a ? a=b, true : false; }
    boolean isMovable ( int x, int y, int w, int h ) {
        return ( x >= 0 && y >= 0 && x < w && y < h );
    }
}

namespace Rlyeh {

    signed call_of_Cthulhu( signed datum ) {

        int n, a, b;
        read n >> a >> b;
        echo std::min(a, b) _ std::max(0, a+b-n) fin;

        return 0;
    }
}

signed main(){std::cin.tie(0); std::ios::sync_with_stdio(false); int main_result = Rlyeh::call_of_Cthulhu(114514); return 0;}


Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
using namespace std;
int n, ans, tot, to[1000005], u[1000005], v[1000005];
char S[1000005], T[1000005];
bool check(int x) {
	for (int i = 1; i <= tot - x; ++i)
		if (u[i + x] - x < v[i])
			return false;
	return true;
}
int main() {
    scanf("%d", &n);
    scanf("%s", S + 1);
    scanf("%s", T + 1);
	int ptr = n;
	for (int i = n; i >= 1; --i) {
		ptr = min(ptr, i);
		while (ptr > 0 && S[ptr] != T[i]) --ptr;
		if (ptr == 0) {
			puts("-1");
			return 0;
		}
		if (to[ptr] == 0) to[ptr] = i;
	}
	for (int i = 1; i <= n; ++i)
		if (to[i] != 0) {
			++tot;
			u[tot] = i;
			v[tot] = to[i];
		}
	int L = 0, R = n, mid;
	while (L < R) {
		mid = (L + R) >> 1;
		if (check(mid)) R = mid;
		else L = mid + 1;
	}
	printf("%d\n", R);
    return 0;
}


Measured memory_bytes: 13824
#include <iostream>
#include <stdio.h>
#include <cstring>
#include <map>
//Problem C

using namespace std;

int main()
{
    map <string, int> mp;
    long long n;
    int i;
    
    scanf("%lld", &n);
    for (i = 1; i <= n; i++)
    {
        string s;
        cin >> s;
        mp[s] += 1;
    }
    
    int maxv = 0;
    for (const auto& m : mp)
    {
        if (m.second > maxv)
        {
            maxv = m.second;
        }
    }
    
    //定义迭代器
    for (auto iter = mp.begin(); iter != mp.end(); iter++)
    {
        if (iter -> second == maxv)
        {
            cout << iter -> first << endl;
        }
    }
    return 0;
}


Measured memory_bytes: 25216
import sys
input = sys.stdin.readline
n, m = map(int, input().split())
cities = []
for _ in range(m):
  cities.append(list(map(int, input().split())))
sort_cities = sorted(cities, key=lambda x:x[1])
pre = [0 for _ in range(n)]
ans = {}
for city in sort_cities:
  pre[city[0]-1]+=1
  st_city = str(city[0])
  st_pre = str(pre[city[0]-1])
  len_0 = (6-len(st_city))*'0'
  ans[len_0+st_city+str(city[1])] = len_0+st_city+(6-len(st_pre))*'0'+st_pre
for a in cities:
  print(ans[(6-len(str(a[0])))*'0'+str(a[0])+str(a[1])])

Measured memory_bytes: 49424
#include<stdio.h>

int a,b;
int sum,kake,hiki;

int main(){


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

sum = a+b;
hiki = a-b;
kake = a * b;

if(sum >= hiki && sum >= kake ){
    printf("%d",sum);
}else if(hiki >= sum && hiki >= kake){
    printf("%d",hiki);
}else if(kake >= sum && kake >= hiki){
    printf("%d",kake);
}

return 0;
}


Measured memory_bytes: 128
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>

int main(){
	int h, w;
	char *c, *c_org;
	bool *bh, *bw;
	scanf("%d %d\n", &h, &w);
	c = (char*)calloc(sizeof(char), h*w);
	c_org = c;
	bh = (bool*)calloc(sizeof(bool), h);
	bw = (bool*)calloc(sizeof(bool), w);
	for(int i=0; i<h; i++){
		scanf("%s\n", c);
		c+=w;
	}
	for(int i=0; i<h; i++){
		for(int j=0; j<w; j++){
			if(*(c_org + i*w +j) == '#') {
				bh[i] = true;
				bw[j] = true;
			}
		}
	}
	for(int i=0; i<h; i++){
		if(bh[i]){
			for(int j=0; j<w; j++){
				if(bw[j]) {
					printf("%c", *(c_org + i*w +j));
				}
			}
			printf("\n");
		}
	}
	return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
 
#define pb push_back
#define ll long long
#define fr(i,j,k) for(int i=j;i<k;i++)
#define f(n) fr(i,0,n)
#define f1(n) fr(i,1,n+1)
#define ms(i) memset(i,0,sizeof(i));
#define ms1(i) memset(i,-1,sizeof(i));
#define pll pair<ll,ll>
#define pii pair<int,int>
#define F first
#define S second
const int maxn = 2e5 + 5;
const double eps = 1e-9;
ll solve(ll a) {
    if (a == -1) {
        return 0;
    }
    if (a % 4 == 1) {
        return 1;
    }
    else if (a % 4 == 2){
        return a + 1;
    }
    else if (a % 4 == 3) {
        return 0;
    }
    else {
        return a;
    }
}
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ll n, k;
    cin >> n >> k;
    cout << (solve(n-1) ^ solve(k)) << '\n';
}


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

int main(){
    int n;
    cin >> n;
    vector<int> x(n),y(n);
    for(int i=0; i<n; i++){
        cin >> x[i];
    }
    for(int i=0; i<n; i++){
        cin >> y[i];
    }
    double D;
    
    //p=1
    D=0;
    for(int i=0; i<n; i++){
        D+=fabs(x[i]-y[i]);
    }
    printf("%.12lf\n",D);

    //p=2
    D=0;
    for(int i=0; i<n; i++){
        D+=(x[i]-y[i])*(x[i]-y[i]);
    }
    D=sqrt(D);
    printf("%.12lf\n",D);

    //p=3
    D=0;
    for(int i=0; i<n; i++){
        D+=fabs((x[i]-y[i])*(x[i]-y[i])*(x[i]-y[i]));
    }
    D=pow(D,1.0/3.0);
    printf("%.12lf\n",D);

    //p=inf
    D=0;
    int max;
    max=abs(x[0]-y[0]);
    for(int i=1; i<n; i++){
        if(max<abs(x[i]-y[i]))
            max=abs(x[i]-y[i]);
    }
    printf("%.12lf\n",(double)max);
    return 0;
    
}



Measured memory_bytes: 3360
/*
    @uthor: Varun Mishra
    "varun21999" ->  Codechef, Codeforce, Hackerrank, Hackerearth;
*/
//#include<boost/multiprecision/cpp_int.hpp>
//using boost::multiprecision::cpp_int;
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds;
using namespace std;
#define int            long long int
#define ull            unsigned int
#define ld             long double
#define pb             push_back
#define pa             pair<int,int>
#define ppa            pair<pair<int,int>,int>
#define pap            pair<int,pair<int,int>>
#define v1d            vector<int>
#define v2d            vector<vector<int> >
#define vpa            vector<pair<int,int>>
#define M              1000000007
#define MN             LLONG_MIN
#define MX             LLONG_MAX
#define ff             first
#define ss             second
#define endl           "\n"
#define v1s            vector<string>
#define all(v)         v.begin(),v.end()
#define S(v)           sort(v.begin(),v.end())
#define RS(v)          sort(v.rbegin(),v.rend())
#define R(v)           reverse(v.begin(),v.end())
#define mxpq(T)        priority_queue <T>
#define mnpq(T)        priority_queue<T,vector<T>,greater<T>>
#define T              int tc;cin>>tc;while(tc--)
#define p2d(v)         for(auto a:v){for(auto b:a)cout<<b<<" ";cout<<endl;}
#define p1d(v)         for(auto a:v)cout<<a<<" ";cout<<endl;
#define ppd(v)         for(auto a:v)cout<<a.ff<<" "<<a.ss<<endl;
#define forIloop(i,n)  for(auto i=0;i<n;i++);
#define forDloop(i,n)  for(auto i=n-1;i>=0;i--);
#define qqq 400005
#define isEven(n)  (!n & 1);
const int MOD = 1e9 + 7;
// bool isEven(int n){
//     return (!(n & 1));
// }
// int popcount(int num){
//     num = num - ((num >> 1) & 0x55555555);
//     num = (num & 0x33333333) + ((num >> 2) & 0x33333333);
//     return ((num + (num >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
// }
// int powerOfTwo(int n){
//     return 1 << n;
// }

// int arr[1000001];
// bool temet = false;


void codeforce2(){
    int n; cin>>n;
    string a,b; cin>>a>>b;
    string ans;
    for(int i=0; i<n; i++){
        ans = ans + a[i];
        ans = ans + b[i];
    }
    //ans = ans + '\0';
    cout << ans << endl;
}




int32_t main(){

    cout<<fixed<<setprecision(16);
    cin.sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    
    /*#ifndef _DEBUG
     freopen("input.txt",  "r",  stdin);
     freopen("output.txt", "w", stdout);
    #endif*/
    //auto start = high_resolution_clock::now();

    // Lucario();
    //codeforceContest();
    //hackerEarth();
    //codeChef();
    codeforce2();

   /* auto stop = high_resolution_clock::now();
    auto duration = duration_cast<seconds>(stop - start);
    cout << "Time: "<<duration.count()<<endl;*/
    return 0;
}

Measured memory_bytes: 3636
#include<stdio.h>
#define MOJI 1200
 
int main()
{
  char str[MOJI];
  int i, count=0;
 
  while(1){
    scanf("%c", &str[count]);
 
    if('A' <= str[count] && str[count] <= 'Z'){
      str[count] += 'a' - 'A';
    }
    else if('a' <= str[count] && str[count] <= 'z'){
      str[count] -= 'a' - 'A';
    }
 
    if(str[count] == '\n')break;
    count++;
  }
 
  for(i=0; i < count ;i++)
    printf("%c",str[i]);
  printf("\n");
  return 0;
}

Measured memory_bytes: 524
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

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

        vector<int> c(n);
        vector<vector<int>> p(n);
        rep(i,n){
            cin.ignore();
            string s;
            getline(cin, s);

            cin >>c[i];
            vector<int> tt(3);
            rep(j,3) cin >>tt[j];
            p[i] = tt;
        }

        int ans = 0;
        rep(x,3){
            vector<int> dp(m+1);
            rep(i,n)rep(j,m+1){
                int nj = j+c[i];
                if(nj>m) continue;
                dp[nj] = max(dp[nj], dp[j]+p[i][x]);
            }
            ans = max(ans, *max_element(all(dp)));
        }
        cout << ans << endl;
    }
    return 0;
}



Measured memory_bytes: 3180
import copy

n = int(input())

a_i = list(map(int, input().split()))

down_max = [0 for i in range(n + 1)]

for i in range(n + 1):
    if i == 0:
        down_max[0] = 1
    else:
        down_max[i] = 2 * (down_max[i - 1] - a_i[i - 1])

answer = 0
now_point_number = 0
before_point_number = 0
cant_make = False

for i in range(n + 1):
    depth_index = - i - 1
    if i == 0:
        now_point_number = a_i[depth_index]
    else:
        if before_point_number // 2 + before_point_number % 2 + a_i[depth_index] > down_max[depth_index]:
            cant_make = True
            break
        else:
            now_point_number = min(down_max[depth_index], before_point_number + a_i[depth_index])
    answer += now_point_number
    before_point_number = copy.copy(now_point_number)

if n == 0 and a_i[0] != 1:
    cant_make = True

if cant_make:
    print(-1)
else:
    print(answer)


Measured memory_bytes: 674412
// Author: Amey Bhavsar
// IDE: Geany/Ubuntu
// Platform: ---

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef vector<pll> vll;

#define bpc __builtin_popcount
#define bpcl __builtin_popcountll
#define bpr __builtin_parity
#define bprl __builtin_parityll
#define ctz __builtin_ctz
#define ctzl __builtin_ctzll
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define repD(i,a,b) for(auto i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define ff first
#define ss second


// to be used with algorithms that processes a container Eg: find(all(c),42)
#define all(x) (x).begin(), (x).end() //Forward traversal
#define rall(x) (x).rbegin, (x).rend() //reverse traversal
// traversal function to avoid long template definition
#define tr(c,i) for(__typeof__((c)).begin() i = (c).begin(); i != (c).end(); i++)
//find version works for all containers. This is present in std namespace.
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define uint32 int64_t
int main() {
	ios_base::sync_with_stdio(false);cin.tie(NULL);
	uint32 k;
	cin >> k;
	
	queue<uint32> a;
	rep(i,(uint32)1,10) a.push(i);
	uint32 x = a.front();
	rep(i,(uint32)0,k) {
		x = (uint32)a.front();
		a.pop();
		if (x%10 != 0) {
			a.push(10*x + (x%10) - 1);
		}
		a.push(10*x + (x%10));
		if (x%10 != 9) {
			a.push(10*x+ (x % 10) + 1);
		}
	}
	cout << x << "\n";
	
	return 0;
}


Measured memory_bytes: 1792
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#define mxn 15
using namespace std;
char s[mxn][mxn];
bool e[mxn][mxn],f[1<<mxn];
int n,m,p[mxn],a[mxn];
string t[mxn];
bool mirror(int l,int r) {
	for(int i=0;i<n;i++)
		if(s[i][l]!=s[p[i]][r])
			return 0;
	return 1;
}
void dpcol(bool b) {
	for(int i=0;i<m;i++)
		for(int j=i;j<m;j++)
			e[i][j]=mirror(i,j);
	memset(f,0,sizeof(f)),f[0]=1;
	for(int k=0;k<1<<m;k++)	if(f[k])
		for(int i=0;i<m;i++)
			for(int j=i+1;j<m;j++)
				if(!(1<<i&k)&&!(1<<j&k)&&e[i][j])
					f[k|(1<<i)|(1<<j)]=1;
	bool chk=0;	if(!b)	chk=f[(1<<m)-1];
	else for(int i=0;i<m;i++)	chk|=e[i][i]&&f[(1<<m)-1-(1<<i)];
	if(chk) {	puts("YES");	exit(0);	}
}
void dfsrow(int d,bool b) {
	if(d==n) {	dpcol(m&1);	return;	}
	if(~p[d]) {	dfsrow(d+1,b);	return;	}
	for(int i=d+1;i<n;i++)
		if(p[i]==-1&&t[d]==t[i]) {
			p[d]=i,p[i]=d;
			dfsrow(d+1,b);
			p[d]=-1,p[i]=-1;
		}
	if(b)	p[d]=d,dfsrow(d+1,0),p[d]=0;
}
int main() {
	memset(p,-1,sizeof(p));
	memset(a,-1,sizeof(a));
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++) {
		scanf("%s",s[i]);
		for(int j=0;j<m;j++)
			t[i]+=s[i][j];
		sort(t[i].begin(),t[i].end());
	}
	dfsrow(0,n&1);
	puts("NO");
	return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            var input = ReadArrayInt();
            var N = input[0];
            var X = input[1];
            var L = ReadArrayInt();
            var ans = 1;
            var sum = 0;
            for (int i = 0; i < N; i++)
            {
                sum += L[i];
                if (sum <= X) ans++;
            }

            Console.WriteLine(ans);
            Console.ReadLine();
        }

        static string Read() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Read()); }
        static long ReadLong() { return long.Parse(Read()); }
        static int[] ReadArrayInt() { return Read().Split(' ').Select(s => int.Parse(s)).ToArray(); }
        static long[] ReadArrayLong() { return Read().Split(' ').Select(s => long.Parse(s)).ToArray(); }
    }
}

Measured memory_bytes: 13396
x,y = map(int,input().split())

if x == y:
    print (0)

elif abs(x) < abs(y):
    ans = 0

    if x < 0:
        ans += 1

    ans += abs(y) - abs(x)

    if y < 0:
        ans += 1

    print (ans)

else:
    ans = 0

    if x > 0:
        ans += 1

    ans += abs(x) - abs(y)

    if y > 0:
        ans += 1

    print (ans)


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

#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 28;
const ll INF64 = 1ll << 60;
const int mod = 1000000007;
//const int mod = 998244353;

template <class T>inline bool chmin(T &a, const T b)
{
  if (a > b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline bool chmax(T &a, const T b)
{
  if (a < b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline void line_out(const vector<T> vec) {
  int n = SZ(vec);
  rep(i, n) {
    cout << vec[i];
    if(i < n-1) cout << " ";
  }
  cout << endl;
  return;
}

struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint &operator++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};
  

int main()
{
  int x; cin >> x;
  if(x < 600) cout << 8 << endl;
  else if(x < 800) cout << 7 << endl;
  else if(x < 1000) cout << 6 << endl;
  else if(x < 1200) cout << 5 << endl;
  else if(x < 1400) cout << 4 << endl;
  else if(x < 1600) cout << 3 << endl;
  else if(x < 1800) cout << 2 << endl;
  else cout << 1 << endl;
}

Measured memory_bytes: 3632
#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<set>
#include<queue>
#include<list>
#include<stdio.h>
#include<stdlib.h>
#include<map>
#include<cstdio>
#include <iomanip>

#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()

using namespace std;
typedef long long ll;
using P = pair<ll, ll>;
using R = double;

ll dist[201][201];
ll INF = 1LL << 30;

int main() {

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

	vector<int> r(R);

	for (int i = 0; i < R; i++) {
		cin >> r[i];
		r[i]--;
	}

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

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			dist[i][j] = (i == j ? 0 : INF);
		}
	}
	
	for (int i = 0; i < m; i++) {
		int a, b;
		ll c;
		cin >> a >> b >> c;
		a--, b--;
		dist[a][b] = dist[b][a] = c;
	}

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

	ll ans = INF;

	do {
		ll dist_sum = 0;

		for (int i = 0; i < R - 1; i++) {
			dist_sum += dist[r[i]][r[i + 1]];
		}
		ans = min(ans, dist_sum);

	} while (next_permutation(r.begin(), r.end()));

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 512
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>

using namespace std;

#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n); i++)
#define rrep(i, n) for (int64_t i = (n)-1; i >= 0; i--)
#define rirep(i, n) for (int64_t i = n; i >= 0; i--)

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

  vector<int> digit(N, -1);
  rep(i, M) {
    int s, c;
    cin >> s >> c;
    s--;
    if ((digit[s] >= 0 && digit[s] != c) || (s == 0 && c == 0 && N != 1)) {
      cout << -1 << endl;
      return 0;
    }
    digit[s] = c;
  }

  int result = 0;
  rep(i, N) {
    result *= 10;
    if (digit[i] < 0) {
      if (i == 0 && N > 1) {
        result += 1;
      }
    } else {
      result += digit[i];
    }
  }
  cout << result << endl;
  return 0;
}

Measured memory_bytes: 384
S=input()
n=len(S)-1
comb=[[[] for i in range(n+1)] for j in range(n+1)]
for i in range(1,n+1):
    for j in range(1,n+1):
        if i>=1 and j==1:
            comb[i][j]=[[k] for k in range(1,i+1)]
        elif i==j:
            comb[i][j]=[[k for k in range(1,i+1)]]
        elif i>j:
            for m in range(len(comb[i-1][j-1])):
                comb[i][j]+=[comb[i-1][j-1][m]+[i]]
            comb[i][j]+=comb[i-1][j]
s=0
for i in range(1,n+1):
    cut_l=comb[n][i]
    for j in range(len(cut_l)):
        cut=[0]+cut_l[j]+[n+1]
        lis=[]
        for k in range(len(cut)-1):
            lis.append(int(S[cut[k]:cut[k+1]]))
        s+=sum(lis)
print(s+int(S))

Measured memory_bytes: 3064
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int n,k,h,ans;
int main()
{
	scanf("%d%d",&n,&k);
	for(int i=1;i<=n;i++)
	{
		scanf("%d",&h);
		if(h>=k)
			ans++;
	}
	printf("%d",ans);
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
  int n=100005;
  int dp[100005][4];
 
   vector<int> v(n);

int main()
{
  
    cin>>n;
  int a[n],b[n],c[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i]>>b[i]>>c[i];

    }
   dp[0][1]=a[0];
   dp[0][2]=b[0];
   dp[0][3]=c[0];
   for(int i=1;i<n;i++)
   {
       //for(int j=1;j<=3;j++)
       {
           dp[i][1]=max(dp[i-1][2],dp[i-1][3])+a[i];
           dp[i][2]=max(dp[i-1][1],dp[i-1][3])+b[i];
           dp[i][3]=max(dp[i-1][1],dp[i-1][2])+c[i];
       }
   }
   
  

cout<<max(dp[n-1][3],max(dp[n-1][2],dp[n-1][1]));

}

Measured memory_bytes: 3328
#include<bits/stdc++.h>
#define ll long long
#define endl '\n'
#define rep(i,l,r) for(int i=l;i<=r;i++)
#define per(i,r,l) for(int i=r;i>=l;i--)
const int MX=4e2+7;
const int mod=9901;
using namespace std;
int p[MX],k[MX];
ll qpow(ll a,ll b,ll MOD=mod){for(ll ans=1;;a=a*a%MOD,b>>=1){if(b&1)ans=ans*a%MOD;if(!b)return ans;}}
ll inv(ll a,ll MOD=mod){return qpow(a,MOD-2,MOD);}
ll __gcm(ll a,ll b){return a*b/__gcd(a,b);}
int main()
{
  ios::sync_with_stdio(0),cin.tie(0);
  string s;
  cin>>s;
  int n=s.length();
  for(int i=0;i<n;i++)cout<<'x';
  cout<<endl;
}


Measured memory_bytes: 256
import java.awt.Point;
import java.util.ArrayDeque;
import java.util.Scanner;
import java.util.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Collection;


 
public class Main{
	
        static final Scanner sc=new Scanner(System.in);
        static String S=sc.next();
        
        
        
        
        
        public static void main(String[]args){
                int x=0;
                for(int i=0;i<S.length();i++){
                        x+=Integer.parseInt(""+S.charAt(i));

                }
                int y=Integer.parseInt(S);
                if(y%x==0){
                        System.out.println("Yes");
                }else{
                        System.out.println("No");
                }

                
                

        }
        
        
        

		
	
}


Measured memory_bytes: 23252
#include <bits/stdc++.h>
template<class T> inline bool chmin(T&a, T b){if(a > b){a = b; return true;}else{return false;}}
template<class T> inline bool chmax(T&a, T b){if(a < b){a = b; return true;}else{return false;}}
#define ll long long
#define double long double
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
#define mod (ll)(1e9+7)
#define inf (ll)(3e18+7)
#define pi (double) acos(-1.0)
#define P pair<int,int>
#define PiP pair<int,pair<int,int>>
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using namespace std;

struct mint {
	ll x; // typedef long long ll;
	mint(ll x = 0) :x((x%mod + mod) % mod) {}
	mint operator-() const { return mint(-x); }
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod - a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) {
		(x *= a.x) %= mod;
		return *this;
	}
	mint operator+(const mint a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint a) const {
		mint res(*this);
		return res *= a;
	}
	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}
	mint inv() const {
		return pow(mod - 2);
	}
	mint& operator/=(const mint a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint a) const {
		mint res(*this);
		return res /= a;
	}
	bool operator==(const mint a) const {
		return x == a.x;
	}
	bool operator!=(const mint a) const {
		return x != a.x;
	}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x; }
ostream& operator<<(ostream& os, const mint& a) { return os << a.x; }

int main() {
    string l;
    cin >> l;
    vector<vector<mint>> dp(l.size()+1, vector<mint>(2, 0));
    dp[0][1] = 1;
    rep(i, l.size()){
        dp[i+1][0] += (dp[i][0] * 3);
        if(l[i] == '0'){
            dp[i+1][1] += dp[i][1];
        }else{
            dp[i+1][0] += dp[i][1];
            dp[i+1][1] += (dp[i][1] * 2);
        }
    }
    cout << dp[l.size()][0] + dp[l.size()][1] << endl;
}

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

int main(){
    ll x;
    cin >> x;
    if(x>=30){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

    return 0;
}

Measured memory_bytes: 3632
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, from, to) for (int i = from; i < (to); ++i)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
using ll = long long;
using vin=vector<int>;
using vll=vector<ll>;
using P = pair<int, int>;
const int inf=1e9+7;
const ll INF=1e18;
template <typename T> void chmin(T &a, T b) { a = min(a, b); }
template <typename T> void chmax(T &a, T b) { a = max(a, b); }

int main() {
  int a,b,c;
  cin>>a>>b>>c;
  int p,q,r;
  p=max(a,max(b,c));
  r=min(min(a,b),c);
  q=a+b+c-p-r;
  cout<<p*10+q+r<<endl;
}

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

int main() {
    string s1,s2;
    cin >> s1 >> s2;
    if(s1[0] == s2[2] && s1[1] == s2[1] && s1[2] == s2[0]) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdlib>
#include <string>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
#include <ios> 
#include <iomanip>
using namespace std;

#define N_MAX   (100000)
#define LL_MAX_NUM (1LL<<60)
#define INF 1e7

typedef long long ll;
typedef long long int lli;

int main() {
	int r; cin >> r;
    cout << (3 * (int)pow((double)r, 2.0)) << endl;
	return 0;
}

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

int main(){
    vector<int> e(3);
    for(int i=0; i<3; i++){
        cin >> e[i];
    }

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

    cout << e[0] * e[1] / 2 << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SORT(c) sort((c).begin(),(c).end())
#define REVERSE(c) reverse((c).begin(),(c).end())
#define ALL(x) (x).begin(),(x).end()
const long long MOD = 1000000007;
const long long INF = 1LL << 60;

int main(){
	int a, b, c;
	cin >> a >> b >> c;
	int s = max({a, b, c});
	int f = min({a, b, c});
	int n = a + b + c - s - f;
	if(s == 7 & f == 5 && n == 5){
		cout << "YES" << endl;
	} else {
		cout << "NO" << endl;
	}
}

Measured memory_bytes: 256
N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = str(input())

def score(R,S,P,T):
    if T == "r":
        return P
    elif T == "s":
        return R
    else:
        return S

sum = 0
flag = [0 for i in range(K)]
for i in range(N):
    if i < K:
        sum += score(R,S,P,T[i])
    else:
        if T[i] == T[i-K]:
            if not flag[i%K]:#フラグが立っていなければ
                flag[i%K] = 1
            else:
                flag[i%K] = 0
                sum += score(R, S, P, T[i])
        else:
            flag[i % K] = 0
            sum += score(R, S, P, T[i])





print(sum)






Measured memory_bytes: 4084
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

def main():
  n = int(input())
  F = [[] for _ in range(n)]
  for _ in range(n-1):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    F[a].append(b)
    F[b].append(a)
  seenB = [False]*n
  seenW = [False]*n
  distB = [0]*n
  distW = [0]*n
  def dfs(v, seen, dist):
    seen[v] = True
    for nv in F[v]:
      if seen[nv]:
        continue
      dist[nv] = dist[v] + 1
      dfs(nv, seen, dist)
  dfs(0, seenB, distB)
  dfs(n-1, seenW, distW)
  b, w = 0, 0
  for i in range(n):
    if distB[i] <= distW[i]:
      b += 1
    else:
      w += 1
  if b > w:
    print("Fennec")
  else:
    print("Snuke")
      
if __name__ == '__main__':
  main()

Measured memory_bytes: 137652
#include<stdio.h>

int main(void) {
	double i, x, y;
	int a, b, X, Y, count = 0, ans = 0;

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

	for (int i = 0; i <=1000; i++) {
		x = i * 0.08;
		X = x;
		y = i * 0.10;
		Y = y;
		if ((a == X) && (b == Y)) {
			count = 1;
			ans = i;
			break;
		}
	}

	if (count == 1)
		printf("%d", ans);
	else
		printf("-1");

	return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;

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

        int X = sc.nextInt();
        int Y = sc.nextInt();
        int Z = sc.nextInt();

        System.out.println(solve(X, Y, Z));

        sc.close();
    }

    static int solve(int X, int Y, int Z) {
        int result = 0;
        while ((result + 1) * Y + (result + 2) * Z <= X) {
            ++result;
        }

        return result;
    }
}

Measured memory_bytes: 23764
N = int(input())
array = list(map(int, input().strip().split()))
array.sort()
ansarray = []
ansnum = 1
ans = 0
ansindex = 0
for i in range (1,N):
    for j in range(ansindex,N-1):
        if (array[j] == i):
            ans += 1
            ansindex += 1
        else:
            ansarray.append(ans)
            ans = 0
            break
        if(j == N-2):
            ansarray.append(ans)
            ansindex += 1
for i in range(N-len(ansarray)):
    ansarray.append("0")
for i in range(N):
    print(ansarray[i])

Measured memory_bytes: 32252
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

int main(){
  int N;
  cin >> N;
  long long dist[N][N];
  vector<vector<bool> > origin(N,vector<bool>(N,true));

  for(int i = 0; i < N; i++){
    for(int j = 0; j < N; j++){
      cin >> dist[i][j];
    }
  }

  for(int k = 0; k < N; k++){
    for(int u = 0; u < N; u++){
      for(int v = 0; v < N; v++){
        if(dist[u][v] > dist[u][k] + dist[k][v]){
          cout << -1 << endl;
          return 0;
        }else if(u != v && v!= k && k!= u && dist[u][v] == dist[u][k] + dist[k][v]){
          origin[u][v] = false;
        }
      }
    }
  }
  long long ans = 0;
  for(int i = 0; i < N; i++){
    for(int j = 0; j < N; j++){
      if(origin[i][j]) ans += dist[i][j];
    }
  }

  cout << ans/2 << endl;
  return 0;

}


Measured memory_bytes: 1024