akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include<queue>
#include<stack>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cstring>
#include<string>
#include<cassert>
#include<cmath>
#include<climits>
#include<iomanip>
#include<bitset>
#include<unordered_map>

using namespace std;

#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define rep(i,j,n) for(ll (i)=(j);(i)<(n);(i)++)
#define FOR(i,c) for(decltype((c).begin())i=(c).begin();i!=(c).end();++i)
#define ll long long
#define ull unsigned long long
#define all(hoge) (hoge).begin(),(hoge).end()
typedef pair<ll, ll> P;
const long long INF = 1LL << 60;
const long long MOD = 1e9 + 7;
typedef vector<ll> Array;
typedef vector<Array> Matrix;


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

//グラフ関連
struct Edge {//グラフ
	ll to, cap, rev;
	Edge(ll _to, ll _cap, ll _rev) {
		to = _to; cap = _cap; rev = _rev;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;

void add_edge(Graph& G, ll from, ll to, ll cap, bool revFlag, ll revCap) {
	G[from].push_back(Edge(to, cap, (ll)G[to].size()));
	if (revFlag)G[to].push_back(Edge(from, revCap, (ll)G[from].size() - 1));
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	ll n;
	cin >> n;

	vector<P> a(n);
	REP(i, n) {
		cin >> a[i].first >> a[i].second;
	}

	vector<P> b(n);
	REP(i, n) {
		cin >> b[i].first >> b[i].second;
	}

	sort(all(b));
	ll ans = 0;
	Array used(n, false);
	REP(i, n) {
		ll max = -1;
		REP(j, n) {
			if (!used[j] && a[j].first < b[i].first && a[j].second<b[i].second) {
				if (max == -1) {
					max = j;
				}else if (a[max].second < a[j].second) max = j;
			}
		}
		if (max != -1) {
			ans++;
			used[max] = true;
		}
	}

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <vector>
#include <numeric>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9+7))
#define REP(i, n) for(int i=0;i<int(n);++i)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define ALL(v) v.begin(),v.end()
#define FIND(v,x) (binary_search(ALL(v),(x)))
#define SORT(v) sort(ALL(v))
#define RSORT(v) sort(ALL(v));reverse(ALL(v))
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define pb push_back
#define fi first
#define se second
using namespace std;
template<class A>void pr(A a){cout << (a) << endl;}
template<class A,class B>void pr(A a,B b){cout << a << " "  ;pr(b);}
template<class A,class B,class C>void pr(A a,B b,C c){cout << a << " " ;pr(b,c);}
template<class A,class B,class C,class D>void pr(A a,B b,C c,D d){cout << a << " " ;pr(b,c,d);}
template<class T> inline bool chmin(T& a, T b){return a>b ? a=b, true : false;}
template<class T> inline bool chmax(T& a, T b){return a<b ? a=b, true : false;}
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

int main(void)
{
    int N;
    cin >> N;
    vector<int> a(N), b(N), c(N);
    REP(i, N){
        cin >> a[i] >> b[i] >> c[i];
    }
    vector<vector<int>> dp(N+1, vector<int>(3, 0));

    REP(i, N){
        chmax(dp[i+1][0], dp[i][1] + a[i]);
        chmax(dp[i+1][0], dp[i][2] + a[i]);

        chmax(dp[i+1][1], dp[i][0] + b[i]);
        chmax(dp[i+1][1], dp[i][2] + b[i]);

        chmax(dp[i+1][2], dp[i][0] + c[i]);
        chmax(dp[i+1][2], dp[i][1] + c[i]);
    }

    pr(max({dp[N][0], dp[N][1], dp[N][2]}));
}

Measured memory_bytes: 6912
#include <cstdio>
#include <algorithm>
#include <vector>

int n;
std::vector<std::pair<int, int>> v;

int main(){
	scanf("%d", &n);
	for(int i=0; i<n; ++i){
		int a, b;
		scanf("%d %d", &a, &b);
		v.push_back(std::make_pair(b, a));
	}
	std::sort(v.begin(), v.end());
	printf("%d\n", v[0].second+v[0].first);
}

Measured memory_bytes: 1400
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n) ;i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
using ll=long long;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define MOD  1000000007
const ll INF=1e18;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b){ a = b; return 1; } return 0; }



int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  vector<int> v(n),c(n);
  rep(i,n) cin >> v[i];
  rep(i,n) cin >> c[i];
  int ans=0;
  rep(i,n){
    if(v[i]-c[i]>0) ans+=v[i]-c[i];
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>
#include <atcoder/all>

using i8 = std::int8_t;
using u8 = std::uint8_t;
using i16 = std::int16_t;
using u16 = std::uint16_t;
using i32 = std::int32_t;
using u32 = std::uint32_t;
using i64 = std::int64_t;
using u64 = std::uint64_t;
using i128 = __int128_t;
using u128 = __uint128_t;
using isize = std::ptrdiff_t;
using usize = std::size_t;

constexpr i64 L = 1L << 32;

char field[50][51];

auto main() -> i32 {
	i32 n, k;
	scanf("%d%d", &n, &k);
	atcoder::mcf_graph<i32, i64> graph(2 * n + 2);
	i32 s = 2 * n;
	i32 t = 2 * n + 1;

	graph.add_edge(s, t, n * k, L);

	for (i32 i = 0; i < n; ++i) {
		graph.add_edge(s, i, k, 0);
		graph.add_edge(n + i, t, k, 0);
		for (i32 j = 0; j < n; ++j) {
			i64 a;
			scanf("%ld", &a);
			graph.add_edge(i, n + j, 1, L - a);
		}
	}

	i64 flow = graph.flow(s, t, n * k).second;
	printf("%ld\n", n * k * L - flow);
	for (i32 i = 0; i < n; ++i) {
		for (i32 j = 0; j < n; ++j) {
			field[i][j] = '.';
		}
	}
	for (auto e : graph.edges()) {
		if (e.from == s || e.to == t || e.flow == 0) continue;
		field[e.from][e.to - n] = 'X';
	}
	for (i32 i = 0; i < n; ++i) {
		puts(field[i]);
	}

	return 0;
}


Measured memory_bytes: 4108
#include <bits/stdc++.h>
#include<iostream>
using namespace std;
 
int main() {
    string S,s,Ssub;
    int S_len;
    cin >> S;
    S_len = (int)(S.length());
	s = S;
    reverse(s.begin(), s.end());
  
  for(;;){
    //cout << s << "  "<< S << endl;
    if(s != S){
            cout << "No";
            break;
        }
    Ssub = S.substr(0,(S_len-1)/2);
  	s = Ssub;
    reverse(s.begin(), s.end());
   // cout << s <<"  " << Ssub << endl;
    if(s != Ssub){
        cout << "No";
        break;
    }
    Ssub = S.substr((S_len+2)/2,S_len);
    s = Ssub;
    reverse(s.begin(), s.end());   
    //  cout << s <<"  " << Ssub << endl;
     if(s != Ssub){
        cout << "No";
        break;
    }
    cout << "Yes";
    break;
  }
    

    }
   



Measured memory_bytes: 256
h,w = map(int,input().split())
ans = 0
c = [list(map(int,input().split()))for i in range(10)]
a = [list(map(int,input().split()))for _ in range(h)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            c[j][k] = min(c[j][k],c[j][i]+c[i][k])
for i in range(h):
    for j in range(w):
        if a[i][j] != -1:
            ans+= c[a[i][j]][1]
print(ans)
        

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

int main(){
    int a,b,c,d;    cin>>a>>b>>c>>d;
    int d_ab=abs(a-b);
    int d_ac=abs(a-c);
    int d_bc=abs(b-c);
    
    if(d_ac<=d||(d_ab<=d&&d_bc<=d)) cout<<"Yes"<<endl;
    else    cout<<"No"<<endl;
}


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

typedef long long   signed int LL;
typedef long long unsigned int LU;

#define incID(i, l, r) for(int i = (l)    ; i <  (r); i++)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); i--)
#define inc( i, n) incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec( i, n) decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)

#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))

#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define UB upper_bound
#define LB lower_bound
#define PQ priority_queue

#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
#define  FOR(i, v) for(auto i =  v.begin(); i !=  v.end(); ++i)
#define RFOR(i, v) for(auto i = v.rbegin(); i != v.rend(); ++i)

template<typename T> bool setmin(T & a, T b) { if(a <= b) { return false; } else { a = b; return true; } }
template<typename T> bool setmax(T & a, T b) { if(b <= a) { return false; } else { a = b; return true; } }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

template<typename T> ostream & operator<<(ostream & os, const vector<T> & v) {
	os << "[";
	FOR(it, v) {
		if(it != v.begin()) { os << ", "; }
		os << *it;
	}
	os << "]";
	return os;
}
template<typename F, typename S> ostream & operator<<(ostream & os, const pair<F, S> & p) {
	os << "<" << p.FI << ", " << p.SE << ">";
	return os;
}

// ---- ----

int sx, sy, tx, ty;

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


Measured memory_bytes: 256
defmodule Main do
  def main do
    n = IO.gets("") |> String.trim() |> String.to_integer()

    list_of_lists =
      1..n
      |> Enum.map(fn _ ->
        IO.gets("") |> String.trim() |> String.split(" ") |> Enum.map(&String.to_integer/1)
      end)

    count_median(list_of_lists, n) |> IO.puts()
  end

  @doc """
  count median

  ## Examples

      iex> CountMedian.count_median([[1, 2], [2, 3]], 2)
      3
      iex> CountMedian.count_median([[100, 100], [10, 10000], [1, 1000000000]], 3)
      9991

  """
  def count_median(list_of_lists, n) do
    list_of_a =
      list_of_lists
      |> Enum.map(fn [a, _] -> a end)
      |> Enum.sort()

    list_of_b =
      list_of_lists
      |> Enum.map(fn [_, b] -> b end)
      |> Enum.sort()

    do_count_median(list_of_a, list_of_b, n)
  end

  defp do_count_median(list_of_a, list_of_b, n) when rem(n, 2) == 1 do
    i = div(n, 2)
    Enum.at(list_of_b, i) - Enum.at(list_of_a, i) + 1
  end

  defp do_count_median(list_of_a, list_of_b, n) do
    i = div(n, 2)

    Enum.at(list_of_b, i - 1) + Enum.at(list_of_b, i) -
      (Enum.at(list_of_a, i - 1) + Enum.at(list_of_a, i)) + 1
  end

  def permutation(_, 0), do: [[]]

  def permutation(list, n) do
    for x <- list, rest <- permutation(list -- [x], n - 1), do: [x | rest]
  end
end


Measured memory_bytes: 126248
#include<iostream>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;

int main(){
    int n, Q;
    cin >> n >> Q;
    vector<int> v[n];
    for(int i = 1; i < n; i++){
        int a, b;
        cin >> a >> b;
        a--, b--;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    vector<ll> add(n, 0);
    while(Q-- > 0){
        int p, x;
        cin >> p >> x;
        p--;
        add[p] += x;
    }
    vector<bool> visit(n, 0);
    queue<int> q;
    visit[0] = true;
    for(int j : v[0])   q.push(j), visit[j] = true, add[j] += add[0];
    while(!q.empty()){
        int now = q.front();    q.pop();
        for(int child : v[now]){
            if(!visit[child]){
                q.push(child);
                visit[child] = true;
                add[child] += add[now];
            }
        }
    }
    for(int i = 0; i < n; i++)  cout << add[i] << " \n"[i+1==n];
    return 0;
}

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

int main(void) {
	string S;
	cin >> S;

	int len = S.length();
	int d = len / 2;
	int ans = 0;
	for (int i = 0; i < d; ++i) {
		if (S[i] != S[len - i - 1])
			++ans;
	}

	cout << ans << '\n';
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
#define MOD1 1000000007;
#define MOD2 1000007
using namespace std;
  
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
/* ここからが本編 */
/*  */
  
ull pow(ull x,ull n) {
  ull res = 1;
  while(n > 0) {
    if(n&1) res = res * x;
    x = x * x;
    n >>= 1;
  }
  return res;
}
int dic_op(char str[14])
{
  int j;
  register int f = 1;
  register int g = 0;
  for(j = 0;;j++) {
    if(str[j] == 'A')
      g += f * 1;
    else if(str[j] == 'C')
      g += f * 2;
    else if(str[j] == 'G')
      g += f * 3;
    else if(str[j] == 'T')
      g += f * 4;
    else break;
    f *= 5;
  }
  return g; 
}
  
int main()
{
  register int i;
  register int n;
  static char dic[10000000];
  char opstr[7];
  char str[13];
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%s %s",opstr,str);
    if(opstr[0] == 'i') {
      dic[dic_op(str)] = 1;
    }
    else if(opstr[0] == 'f') {
      if(dic[dic_op(str)] == 1)
        puts("yes");
      else
        puts("no");
    }
  }
  return 0;
}

Measured memory_bytes: 9496
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pii pair<int,int>
#define mx INT_MAX
#define mn INT_MI#de
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define itr set<int> :: iterator
#define map_it map<int,int> :: iterator
const int mod = 1e9+7;

vector<int> adj[100001];

// int dp1[100001];

int mdfs(int v, int par){
    
    // if(dp1[v]!=-1)
    //   return dp1[v];

	int msize = 0;
	for(int u=0; u<adj[v].size(); u++){
        int x = adj[v][u];
        if(x == par) continue;
		msize= msize +  1 + mdfs(x, v);
	//	cout<<msize<<" ";
	}
    
    //cout<<" end of msdfs "<<endl;
    if(msize == 0){
  //  	dp1[v] = 0;
    	return 0;
    }

//    dp1[v] = msize;
	return msize;
}

int dfs(int v, int par){
 
    int mxx = INT_MIN;
   // int mxsize = 0;
	for(int u=0; u<adj[v].size(); u++){
        int x = adj[v][u];
		if(x == par) continue;
        int temp = 1 +  mdfs(x, v);
      //  cout<<"Value of temp "<<x<<" "<<v<<" "<<temp<<" ";
        mxx  = max(mxx, temp);
	}
	//cout<<endl;

	if(mxx == INT_MIN)
		return 0;
   
	return mxx;
}

int main()
{   
  
  int a, b, c, d;
  cin>>a>>b>>c>>d;
  
  ll maxx = 1ll*b*d;
  maxx = max(maxx, 1ll*a*d);
  maxx = max(maxx, 1ll*a*c);
  maxx = max(maxx, 1ll*b*c);

  cout<<maxx<<endl;

  return 0;

}


Measured memory_bytes: 5972
#include<bits/stdc++.h>
#include<ctype.h>
# define pb push_back
#define fst first
#define sec second
#define For(i,a,b) for(int i=a;i<b;i++)
#define ll long long int
#define ull unsigned long long int
#define mod 1000000007
#define fo(i,n) for(ll i=0;i<n;i++)
#define endl "\n"
#define rev(i,n) for(ll i=n-1;i>=0;i--)
#define fo1(i,n) for(ll i=1;i<=n;i++)
#define boolsize 1000001
#define pi pair<ll,ll>
#define vi vector<ll>
#define vii vector<pi>
using namespace std;
template<typename T>
void showvector(vector <T> v)
{
    for(T x:v)
        cout<<x<<" ";
    cout<<endl;

}
template<typename T>
void showvector1(vector <T> v)
{
    ll n=v.size();
    fo1(i,n-1)
        cout<<v[i]<<endl;

}
template<typename T>
void showset(set <T> s)
{
    for(T x: s)
        cout<<x<<" ";
    cout<<endl;
}
template<class T>
void showvectorpair(vector<T> v)
{
    for(auto it=v.begin();it!=v.end();it++)
        cout<<it->first<<" "<<it->second<<endl;
    cout<<endl;
}
template<typename T,typename P>
void showmap(map <T,P> m)
{
    for(auto it=m.begin();it!=m.end();it++)
        cout<<it->first<<" "<<it->second<<endl;
    cout<<endl;
}
template<typename T>
bool comp(T a,T b)
{
    return (a>b);
}
template<class T>
bool comppair(T a,T b)
{
    if(a.first==b.first)
        return(a.second>b.second);
    return (a.first>b.first);
}
bool sameparity(ll a,ll b)
{
    return (a%2==b%2);
}
bool difparity(ll a,ll b)
{
    return !(a%2==b%2);
}
bool isprime(ll x)
{   if(x<=1)
     return false;
    for(ll i=2;i<=sqrt(x);i++)
    {
        if(x%i==0)
            return false;
    }
    return true;
}
bool iseven(ll x)
{
    return !(x%2);
}
bool isodd(ll x)
{
    return (x%2);
}
//vector <bool> prime(boolsize,1);
//void seive()
//{
//    ll n=boolsize;
//    prime[0]=prime[1]=0;
//    for(ll i=2;i<=sqrt(boolsize);i++)
//    {
//        if(prime[i]==1)
//        {
//            for(ll j=i*i;j<=n;j+=i)
//            {
//                prime[j]=0;
//            }
//        }
//    }
//}

/// check for test case before submitting
void vfun()
{
    ll n;
    cin>>n;
    vi v(n);
    fo(i,n)
    {
            cin>>v[i];
    }
    ll sum=0;
    sort(v.begin(),v.end());
    fo1(i,n-1)
    sum+=v[i]-v[i-1];
    cout<<sum<<endl;

}

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    ios_base::sync_with_stdio(0); ///cant use scanf, printf
    cin.tie(0);cout.tie(0); /// no longer auto flush cout before each cin, remove for interactive
    //cout << fixed << setprecision(11); /// no scientific output
    ll test=1;
    //cin>>test;
    while(test--)
    {

        //fun();
        vfun();
//         if(vfun())
//            cout<<"YES\n";
//         else
//            cout<<"NO\n";
    }
}
///before sub
/// check for value of zero and single input in array
///loop vars,1LL in mult, equal, one, bounds, int v ll, endl, finish taking inputs
/// check whether test cases are given or not




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

#define int long long
#define ll long long
#define pb push_back
#define mp make_pair
#define f(i,a,n) for(int i=a ; i<n ; i++)
#define rf(i,n,a) for(int i=n ; i>=a ; i--)
#define F first
#define S second
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)

typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<pii,int> ppi;
typedef vector<pii> vpi;

const int inf = 1e9;
const int inf64 = 1e18;
const int MOD = inf + 7;

int32_t main(){
   fast;
   int n,k;
   cin >> n >> k;

   vi a(2*n,0);
   f(i,1,n+1)  cin >> a[i];

   while(k--){
      vi p(2*n,0);
      f(i,1,n+1){
         int l = max(1LL , i - a[i]);
         int r = min(n , i + a[i]);
         p[l]++;
         p[r+1]--;
      }

      f(i,1,n+1) p[i] += p[i-1];
      int ok = 1;
      f(i,1,n+1){
         a[i] = p[i];
         if(a[i] < n)  ok = 0;
      }

      if(ok){
         break;
      }
   }

   f(i,1,n+1) cout << a[i] << " ";
}


Measured memory_bytes: 9536
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << '\n'

typedef int64_t Int;
const double pi = M_PI;

using namespace std;

int main() {
    string S;
    cin >> S;
    int ans = INT32_MAX;

    for (int i = 0; i < S.size() - 2; i++) {
        ans = min(ans, abs((S[i] - '0') * 100 + (S[i + 1] - '0') * 10 + (S[i + 2] - '0') - 753));
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
a,b,c,d=map(int,input().split());x,y=c-a,d-b;u,d,l,r="UDLR";print(u*y+r*x+d*y+l*x+l+u*(y+1)+r*(x+1)+d+r+d*(y+1)+l*(x+1)+u)

Measured memory_bytes: 3060
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC085A
{
    class Program
    {
        static void Main(string[] args)
        {
            string s;
            s = Console.ReadLine();
            char[] cs = s.ToCharArray();
            cs[3] = '8';
            Console.WriteLine(cs);
            Console.ReadKey();
        }
    }
}


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

using namespace std;

using ll = long long;
using pii = pair<int, int>;
using ld = long double;

template <typename T>
int sz(T &x) {
  return (int)(x.size());
}


const int mod = 998244353;
const int inf = 1'000'000'007;


void solve() {
  int n;
  cin >> n;
  vector<int> b(n + 1);
  vector<int> p(n + 1);
  for (int i = 1; i <= n; ++i) {
    cin >> p[i];
    b[p[i]] += i;
  }
  for (int i = 1; i <= n; ++i) {
    cout << i * 20001 << " ";
  }
  cout << "\n";
  for (int i = 1; i <= n; ++i) {
    cout << (n - i + 1) * 20001 + b[i] << " ";
  }
  cout << "\n";
}

int main() {
  #ifndef LOCAL58
    // don't forget to remove if interactive
    ios_base :: sync_with_stdio(false);
    cin.tie(nullptr);
  #endif

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

  return 0;
}


Measured memory_bytes: 3804
#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;

template<typename T>
using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

const int infI=1e9+5;
const long long infL=1e16;
const int MOD=1e9+7;
const int MAX=2e5+5;

#define mp make_pair
#define in &
#define pb push_back
#define ii pair<int,int>
#define iii pair<ii,int>
#define ll long long
#define pll pair<ll,ll>
#define vvl vector<vector<ll> >
#define vi vector<int>
#define vvi vector<vector<int> >
#define vl vector<ll>
#define eb emplace_back
#define forn(i,a,b) for(ll i=a;i<b;i++)
#define fastio ios_base::sync_with_stdio(0);cin.tie(0)
#define endl '\n'
#define popb pop_back()
#define se second
#define fi first
#define test(t) int t;cin>>t;while(t--)
#define debug(x) cerr<<"=>"<<#x<<" = "<<x<<endl

ll power(ll a,ll b){
    if(b==0){
        return 1;
    }
    if(b==1){
        return a;
    }
    ll temp=power(a,b/2);
    temp=(temp*temp)%MOD;
    if(b%2){
        temp=(temp*a)%MOD;
    }
    return temp;
}

//only use if mod is prime
ll mod_inv(ll a,ll mod){
    a%=mod;
    return power(a,mod-2);
}

void extended_gcd(ll a,ll b,ll &x,ll &y){
    if(b==0){
        x=1;
        y=0;
        return;
    }
    ll x1,y1;
    extended_gcd(b,a%b,x1,y1);
    x=y1;
    y=x1-((a/b)*y1);
    return;
}

//TLE can also occur if vectors are not passed by reference
//priority_queue implements max heap by default

ll a[MAX],bits[20];

bool check(){
    forn(i,0,20){
        // cerr<<bits[i]<<" ";
        if(bits[i]>1){
            // cerr<<endl;
            return false;
        }
    }
    // cerr<<endl;
    return true;
}

void f(ll a){
    forn(i,0,20){
        if(a&(1LL<<i)){
            bits[i]++;
        }
    }
    return;
}

void rem(ll a){
    forn(i,0,20){
        if(a&(1LL<<i)){
            bits[i]--;
        }
    }
    return;
}

int main(){
    fastio;
    int n;
    cin>>n;
    forn(i,1,n+1){
        cin>>a[i];
    }
    ll ans = 0;
    int l=1,r=1;
    while(r<=n){
        f(a[r]);
        while(!check() and l<r){
            rem(a[l]);
            ++l;
        }
        ans += (r-l+1);
        // debug(r);
        // debug(r-l+1);
        ++r;
    }
    cout<<ans;
    return 0;
}

Measured memory_bytes: 1792
#include <iostream>
#include <cstdio>
#include <vector>
#include <cmath>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <functional>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#define rep(i,s,n) for(int i = (s); (n) > i; i++)
#define REP(i,n) rep(i,0,n)
#define RANGE(x,a,b) ((a) <= (x) && (x) < (b))
#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))
#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))
#define PW(x) ((x)*(x))
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MODU 1000000007
#define bitcheck(a,b)   ((a >> b) & 1)
#define bitset(a,b)      ( a |= (1 << b))
#define bitunset(a,b)    (a &= ~(1 << b))
#define MP(a,b) make_pair((a),(b))
#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))
#define pritnf printf
#define scnaf scanf
#define itn int
#define PI 3.141592653589


#define izryt bool
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename A, size_t N, typename T>
void Fill(A(&array)[N], const T &val) {
	std::fill((T*)array, (T*)(array + N), val);
}
pii Dir[8] = { //移動
	{ 0 ,1 },{ -1 ,0 },{ 1 ,0 },{ 0 ,-1 },
	{ 1 ,1 },{ 1 ,-1 },{ -1 ,1 },{ -1 ,-1 }
};

unsigned long xor128() {
	static unsigned long x = 123456789, y = 362436069, z = 521288629, w = 88675123;
	unsigned long t = (x^(x << 11));
	x = y; y = z; z = w;
	return (w = (w^(w >> 19))^(t^(t >> 8)));
}

int main(void) {
	ll n, p;
	cin >> n >> p;

	ll ans = 1;

	ll i = 2;

	while (i*i <= p) {
		int cou = 0;

		while (p % i == 0) {
			p /= i;
			cou++;
		}

		REP(j, cou / n) {
			ans *= i;
		}

		i++;
	}
	if(n == 1)
		ans *= p;

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


Measured memory_bytes: 256
s = list(input())
t = list(input())
tmp = s[:]
ans = 'No'
for i in range(len(s)):
    _tmp = list(tmp.pop(-1))
    for j in range(len(tmp)):
        _tmp.append(tmp[j])
    if _tmp == t: ans = 'Yes'
    tmp = _tmp[:]
print(ans)


Measured memory_bytes: 2940
#include <stdio.h>
#include <string>
#include <iostream>
#include <iomanip>
#include <map>
#include <algorithm>
#include <vector>
#include <math.h>
#define MOD 1000000007
using namespace std;

int main(void){
    long long n,k;
    cin >> n >> k;
    vector<long long> a(n);
    for(int i=0; i<n; i++)cin >> a[i];
    long long x=0,count=0,sum=0,base=1;
    while(base*2<=k)base*=2;
    for(long long j=base; j>0; j/=2){
        if(x+j>k)continue;
        count=0;
        for(long long i=0; i<n; i++){
            if(a[i]&j)count++;
        }
        if(count*2<n)x+=j;
    }
    cerr << x << endl;
    for(int i=0; i<n; i++)sum+=a[i]^x;
    cout << sum << endl;
    return 0;
}


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

bool is_MM (int i) {
  if (0 < i && i <= 12) {
    return true;
  }
  return false;
}

int main() {
  string s;

  cin >> s;
  string first = s.substr(0, 2);
  string second = s.substr(2, 4);

  string ans;
  // MM, MM
  if (is_MM(atoi(first.c_str())) &&
      is_MM(atoi(second.c_str()))) {
    ans = "AMBIGUOUS";
  } else if(is_MM(atoi(first.c_str())) &&
            !is_MM(atoi(second.c_str()))) {
    ans = "MMYY";
  } else if(!is_MM(atoi(first.c_str())) &&
            is_MM(atoi(second.c_str()))) {
    ans = "YYMM";
  } else if(!is_MM(atoi(first.c_str())) &&
            !is_MM(atoi(second.c_str()))) {
    ans = "NA";
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
typedef long long li;

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

    li n;
    cin >> n;
    vector<li> ans(n + 1);
    for (li x = 1; x <= 100; ++x) {
        for (li y = 1; y <= 100; ++y) {
            for (li z = 1; z <= 100; ++z) {
                const li v = x * x + y * y + z * z + x * y + y * z + z * x;
                if (1 <= v && v <= n) {
                    ans[v]++;
                }
            }
        }
    }
    for (int i = 0; i < n; ++i) {
        cout << ans[i + 1] << '\n';
    }


    return 0;
}

Measured memory_bytes: 3648
import java.util.Scanner;

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

    while (in.hasNext()) {
      long N = in.nextLong();
      long ceilSqrtN = ceilSqrt(N);
      long minMove = 0;

      for (long i = ceilSqrtN; i > 0; --i) {
        if (N % i == 0) {
          minMove = (i - 1) + (N / i) - 1;
          break;
        }
      }

      System.out.println(minMove);
    }
  }

  private static long ceilSqrt (long N) {
    long sqrtN = 1;

    while (sqrtN * sqrtN <= N) {
      ++sqrtN;
    }

    return sqrtN - 1;
  }
}

Measured memory_bytes: 23124
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("[^-0-9.]+");

		while (scan.hasNext()) {
			int x = scan.nextInt();
			int y = scan.nextInt();
			int s = scan.nextInt();

			switch(s){
			case 3:
				color(x+2,y);
				color(x,y+2);
				color(x-2,y);
				color(x,y-2);
			case 2:
				color(x+1,y+1);
				color(x+1,y-1);
				color(x-1,y+1);
				color(x-1,y-1);
			case 1:
				color(x,y);
				color(x+1,y);
				color(x,y+1);
				color(x-1,y);
				color(x,y-1);
			}
		}
		
		int max=0;
		int count=0;
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				if(a[i][j]==0)
					count++;
				
				max = Math.max(a[i][j], max);
			}
		}
		System.out.println(count);
		System.out.println(max);
	}

	static int[][] a = new int[10][10];

	static void color(int i, int j) {
		if (i < 0 || j < 0) {
			return;
		}
		if (i > 9 || j > 9) {
			return;
		}
		a[i][j]++;
	}

}

Measured memory_bytes: 26200
#include <bits/stdc++.h>
using namespace std;
using Int = long long int;
template<typename T> void swap(T *t1, T *t2){ T* tmp=t1; t1=t2; t2=tmp;}


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

    double n;
    vector<double> v;
    double tmp;
    cin >> n;
    for(int i=0; i<n; i++){
        cin >> tmp;
        v.push_back(tmp);
    }
    while(v.size() > 1){
        sort(v.begin(), v.end());
        double a, b;
        a = v[0];
        b = v[1];
        v.erase(v.begin(), v.begin()+2);
        v.push_back((a+b)/2);
    }
    printf("%.6lf\n", v[0]);
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <iostream>
#include <queue>
#include <string>
#include <algorithm>
#include <cstdio>
#include <stack>
#include <vector>
#include <string.h>
#define inf 0x7fffffff
using namespace std;
// 1692 1684 1234
long long a,b,c,n,i,m,k,l[100100],o[100010]={0,1,1},d,e[102000],dx[10]={0,-1,1,0,0,-1,-1,1,1},dy[10]={0,0,0,-1,1,-1,1,-1,1};
long long x,y,z;
stack<int> s;
struct P
{
    int x,y;
    bool operator<(const P &a)const
    {
        return y>a.y;
    }
};
queue<int> q;
string r[200],r2,p,h;
vector<int> v[50010];

//packing  NUMB3RS


int main()
{
    scanf("%lld %lld",&a,&b);
    for(int t=1;t<=a;t++)
    {
        scanf("%lld",&o[t]);
        if(o[t]>0)
            l[t]=l[t-1]+o[t];
        else
            l[t]=l[t-1];
        e[t]=e[t-1]+o[t];
    }
    long long k=0;
    for(long long t=1;t<=a-b+1;t++)
    {
        long long h=max(c,e[t+b-1]-e[t-1]);
        k=max(k,h+l[t-1]+l[a]-l[t+b-1]);
    }
    printf("%lld",k);
    return 0;
}

Measured memory_bytes: 3712
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>
#include <queue>

#define MAXCHAR 255
#define ll unsigned long long

using namespace std;

ll funcComb(int n, int k) // nCk
{
	ll output = 1;
	for (int i = 0; i < k; i++)
	{
		output *= n - i;
	}
	for (int i = 0; i < k; i++)
	{
		output /= k - i;
	}

	return output;
}

ll calc(int log10N, int k)
{
	return funcComb(log10N, k) * pow(9, k);
}

int main()
{
	string N;	
	ll output = 0;
	int k;
	cin >> N >> k;
	int length = N.size();

	for (; k >= 0; k--)
	{
		if (N == string(length, '0') && k == 0)
		{
			output++;
			break;
		}
		int n = 0;
		for (int i = 0; i < length; i++)
		{
			if (N[i] != '0')
			{
				n = length - i-1;
				break;
			}
		}
		output += calc(n, k);
		int index = length - n - 1;
		int leftmostDigit = N[index]-'0';
		output += (leftmostDigit - 1) * calc(n, k - 1);
		N[index] = '0';
	}

	cout << output << endl;
	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define show(x) cout << #x << " = " << (x) << endl;
using namespace std;
using ll = long long;
using pii = pair<int,int>;
int main(){
    int a,b;
    cin >> a >> b;
    string s;
    cin >> s;
    bool flag = true;
    rep(i,a){
        if(!isdigit(s[i]))flag = false;
    }
    rep(i,b){
        if(!isdigit(s[a+b-i]))flag = false;
    }
    if(s[a]!='-')flag = false;
    if(flag){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
}

Measured memory_bytes: 256
A=int(input().strip())
B=int(input().strip())
C=int(input().strip())
X=int(input().strip())
ct=0
for a in range(A+1):
    for b in range(B+1):
        rest=X-(a*500+b*100)
        if rest>=0 and rest/50<=C:
            ct+=1
print(ct)

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

int main() {
    int N, M;
    map<string, int> mp;
    cin >> N;
    rep(i, N) {
        string s;
        cin >> s;
        mp[s]++;
    }
    cin >> M;
    rep(i, M) {
        string s;
        cin >> s;
        mp[s]--;
    }

    int ans = 0;
    for (auto p : mp) {
        ans = max(ans, p.second);
    }

    cout << ans << endl;

    return 0;
}

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

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


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


typedef long long ll;
using namespace std;
const int maxn=1007;
int a[maxn],b[maxn];
 

 
int main() 
{
	int n;
	cin>>n;
	int ans=( 1000-(n%1000))==1000 ? 0 : 1000-(n%1000);
	cout<<ans<<endl;
}

Measured memory_bytes: 3632
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <algorithm>
#include <iomanip>
#include <functional>
#include <numeric>
#include <sstream>

#define REP(i, n) for(int i = 0;i < (n); i++)
#define REP2(i, x, n) for(int i = (x); i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1;i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

#define LL long long int
#define LD long double

#define PI 3.14159265358979

using namespace std;

//================================================

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

	int N, maxValue, minValue;
	cin >> N;

	string S, descS;
	REP(i, N) {
		cin >> S; SORT(S);
		descS = S; DESCSORT(S);

		int max = stoi(S), min = stoi(descS);
		cout << max - min << "\n";
	}
	return 0;
}

Measured memory_bytes: 3124
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
int n,k;
long long arr[100005];
int main(){
    memset(arr,127,sizeof(arr));
    scanf("%d%d",&n,&k);
    arr[0]=0;
    int v;
    long long w;
    for (int x=1;x<=n;x++){
        scanf("%lld%d",&w,&v);
        for (int y=100005;y>=v;y--){
            arr[y]=min(arr[y],arr[y-v]+w);
        }
    }
    int ans=0;
    for (int x=0;x<100005;x++){
        if (arr[x]<=k) ans=x;
    }
    printf("%d\n",ans);
}


Measured memory_bytes: 896
#include<iostream>
#include<algorithm>
using namespace std;
const int M=100;
int main() {
	int n,m;cin>>n>>m;
	int v[M],w[M],c[M+1][10001];
	bool G[M][10001];
	for(int i=0;i<n;i++)cin>>v[i]>>w[i];
	for(int i=0;i<n;i++)for(int j=0;j<=m;j++)c[i][j]=0,G[i][j]=false;
	for(int i=0;i<n;i++)
	{
		for(int j=1;j<=m;j++)
		{
			c[i][j]=c[i-1][j];
			if(w[i]>j)continue;
			if(v[i]+c[i-1][j-w[i]]>c[i][j])
			{
				c[i][j]=c[i-1][j-w[i]]+v[i];
				G[i][j]=true;
			}
		}
	}
	
	vector<int> sel;
	for(int i=n-1,ww=m;i>=0;i--)
	{
		if(G[i][ww])
		{
			sel.push_back(i);
			ww-=w[i];
		}
	}
	reverse(sel.begin(),sel.end());
	cout<<c[n-1][m]<<endl;
	//for(auto it:sel)cout<<it+1<<endl;
	return 0;
}

Measured memory_bytes: 7948
#pragma GCC optimize("O2,Ofast,inline,unroll-all-loops,-ffast-math")
#include <bits/stdc++.h>
#define pb(X) push_back(X)
#define x first
#define y second
#define INIT std::ios::sync_with_stdio(false);std::cin.tie(0);
using namespace std;

typedef pair<int, int> pii;

int n, a, b, c, d, q, ans, cnt;

int main() {
	INIT
	string s;
	int n, q;
	cin >> n >> q >> s;
	vector<int> C(n + 1);
	for (int i = 1; i < n; ++i) {
		if (s[i] == 'C' && s[i - 1] == 'A') {
			++cnt;
		}
		C [i + 1] = cnt;
	}
	//for (int i = 0; i < n; ++i) cout << C[i + 1] <<' ';
	while (q--) {
		cin >> a >> b;
		cout << int(C[b] - C[a]) << endl;
	}
	return 0;
}

Measured memory_bytes: 1488
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e3+5;
int a[N];
int main() {
    //freopen("in.txt","r",stdin);
	int n,x,y;
	scanf("%d%d%d",&n,&x,&y);
	for(int i=1;i<=n;i++) {
		for(int j=i+1;j<=n;j++) {
			int t=min(j-i,abs(i-x)+abs(j-y)+1);
			a[t]++;
		}
	}
	for(int i=1;i<n;i++) {
		printf("%d\n",a[i]);
	}
    return 0;
}

Measured memory_bytes: 256
def gcd(x, y):
    while y != 0:
        x, y = y, x%y
    return x

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

left = [0 for _ in range(n)]
right = [0 for _ in range(n)]
ans = [0 for _ in range(n)]

for i in range(1, n):
    left[i] = gcd(left[i-1], a[i-1])

for i in range(n-2, -1, -1):
    right[i] = gcd(right[i+1], a[i+1])

for i in range(n):
    ans[i] = gcd(left[i], right[i])

print(max(ans))

Measured memory_bytes: 14076
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define rREP(i,m,n) for(ll i = (m); i >= (n); i--)
#define ALL(c) (c).begin(), (c).end()
#define print(x) cout << (x) << endl;
#define printa(x,n) for(ll i = 0; i < n; i++){ cout << (x[i]) << " ";} cout<<endl;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n,k;
    cin >> n >> k;
    bool ary[n];
    rep(i,n) ary[i] = false;
    rep(i,k)
    {
        int d;
        cin >> d;
        rep(j,d)
        {
            int a;
            cin >> a;
            a--;
            ary[a] = true;
        }
    }
    int ans = 0;
    rep(i,n) if (ary[i]==false) ans++;
    cout << ans << endl;
    
}




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

using namespace std;

int main() {
  int N, M, a, b;
  scanf("%d%d", &N, &M);
  vector<int> v1;
  vector<int> vn;
  while (M--) {
    scanf("%d%d", &a, &b);
    if (a == 1) {
      v1.push_back(b);
    } else if (b == N) {
      vn.push_back(a);
    }
  }
  sort(vn.begin(), vn.end());
  for (int i = 0; i < (int)v1.size(); i++) {
    if (binary_search(vn.begin(), vn.end(), v1[i])) {
      puts("POSSIBLE");
      return 0;
    }
  }
  puts("IMPOSSIBLE");
}


Measured memory_bytes: 1276
#include <bits/stdc++.h>
#define SORT(x) sort((x).begin(), (x).end())
#define ALL(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define reps(i, m, n) for (ll i = m; i < n; i++)
#define repr(i, m, n) for (ll i = m; i >= n; i--)
template <class T> bool maxi(T &a, const T &b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> bool mini(T &a, const T &b) {
    if (b < a) {
        a = b;
        return 1;
    }
    return 0;
}
#define dame {cout<< "-1" <<"\n"; return;}
#define INF2 1000000000000000037
#define INF  1000000007
#define MOD  1000000007
#define PI (acos(-1))
using namespace std;
using ll = long long;
using ld = long double;
using P  = pair<ll,ll>;
//--GLOBAL---------------------------------

//--MAIN-----------------------------------
void Main() {
    ll N; cin>>N;
    string s,t,x; cin>>s>>t;
    rep(i,N){
        x+=s[i];
        x+=t[i];
    }
    cout<< x <<"\n";
}

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


Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

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

		int m = getInt(sc);

		System.out.println(48 - m);

	}

	/**
	 * *汎用メソッド<br>
	 * 入力した配列に対する順列を取得
	 *
	 * @param numArray
	 * @return
	 */
	private static List<Integer[]> getPermutation(int[] numArray) {
		List<Integer[]> permutation = new ArrayList<>();
		Integer[] ans = new Integer[numArray.length];
		boolean[] used = new boolean[numArray.length];

		return buildPermutaion(permutation, numArray, ans, used, 0);
	}

	/**
	 * *汎用メソッド(内部)<br>
	 * 入力した配列に対する順列を作成
	 *
	 * @param list
	 * @param numArray
	 * @param ans
	 * @param used
	 * @param depth
	 * @return
	 */
	private static List<Integer[]> buildPermutaion(List<Integer[]> list, int[] numArray, Integer[] ans, boolean[] used,
			int depth) {

		// 全部使い切った時=>できた順列を返す
		if (depth == numArray.length) {
			list.add(ans.clone());
			return list;
		}
		// 使い切っていない場合

		for (int i = 0; i < numArray.length; i++) {
			if (used[i]) {
				continue;
			}
			ans[depth] = numArray[i];
			used[i] = true;
			list = buildPermutaion(list, numArray, ans, used, depth + 1);

			used[i] = false;
		}

		return list;
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をlongで返却
	 *
	 * @return
	 */
	public static long getLong(Scanner sc) {

		return Long.parseLong(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をintで返却
	 *
	 * @return
	 */
	public static int getInt(Scanner sc) {

		return Integer.parseInt(sc.next());
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をStringで返却
	 *
	 * @return
	 */
	public static String getString(Scanner sc) {

		return sc.next();
	}

	/**
	 * *汎用メソッド <br>
	 * スキャナーからの入力値をint配列で返却
	 *
	 * @return
	 */
	public static int[] getIntArray(Scanner sc) {
		String line = "";
		// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策
		while (line.equals("")) {
			line = sc.nextLine();
		}

		String[] strArray = line.split(" ");
		int[] intArray = new int[strArray.length];
		for (int i = 0; i < strArray.length; i++) {
			intArray[i] = Integer.parseInt(strArray[i]);
		}
		return intArray;
	}

}

class Status {
	long x;
	long tmpCoins;

	public Status(long x, long tmpCoins) {
		this.x = x;
		this.tmpCoins = tmpCoins;
	}
}


Measured memory_bytes: 23636
import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum mod = 10L^^9 + 7;
enum inf = 10^^9;

void main() {
    int n, m;
    scan(n, m);

    auto c = new int[][](n, n);
    foreach (i ; 0 .. n) {
        foreach (j ; 0 .. n) {
            if (i != j) {
                c[i][j] = inf;
            }
        }
    }

    foreach (i ; 0 .. m) {
        int ai, bi, ci;
        scan(ai, bi, ci);
        ai--, bi--;
        c[ai][bi] = c[bi][ai] = ci;
    }

    auto dist = new int[][](n, n);
    foreach (i ; 0 .. n) {
        foreach (j ; 0 .. n) {
            dist[i][j] = c[i][j];
        }
    }

    foreach (k ; 0 .. n) {
        foreach (i ; 0 .. n) {
            foreach (j ; 0 .. n) {
                dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);
            }
        }
    }

    int ans;
    foreach (i ; 0 .. n) {
        foreach (j ; i + 1 .. n) {
            if (c[i][j] == inf) continue;
            if (c[i][j] > dist[i][j]) {
                ans++;
            }
        }
    }

    writeln(ans);
}























void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

Measured memory_bytes: 380
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <deque>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cassert>
#include <chrono>
#include <random>
#include <limits>
#include <iterator>
#include <functional>
#include <sstream>
#include <complex>
using namespace std;

using ll = long long;
using ull = uint64_t;
using P = pair<int, int>;
constexpr double EPS = 1e-9;
constexpr int INF = 1001001001;
constexpr int mod = 1000000007;
// constexpr int mod = 998244353;

template<class T>
inline bool chmax(T& x, T y){
    if(x < y){
        x = y;
        return true;
    }
    return false;
}
template<class T>
inline bool chmin(T& x, T y){
    if(x > y){
        x = y;
        return true;
    }
    return false;
}

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

    int N, W;
    cin >> N >> W;
    vector<int> dp(W + 1, -1);
    dp[0] = 0;
    for(int i = 0; i < N; ++i){
        int v, w;
        cin >> v >> w;
        for(int j = 0; j <= W - w; ++j){
            if(dp[j] == -1) continue;
            chmax(dp[j + w], dp[j] + v);
        }
    }
    cout << *max_element(dp.begin(), dp.end()) << endl;
}


Measured memory_bytes: 3248
import java.util.Scanner;

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

		String S = scan.nextLine();
		int length = 0;
		int max = 0;

		for (int i = 0; i < S.length(); i++) {
			if (S.charAt(i) == 'A' || S.charAt(i) == 'C' || S.charAt(i) == 'G' || S.charAt(i) == 'T') {
				length++;
				if (max < length) {
					max = length;
				}
			} else {
				length = 0;
			}
		}
		System.out.println(max);
		scan.close();
	}
}


Measured memory_bytes: 21844
#include <iostream>
#include <cstdio>
#include <bits/stdc++.h>
#define FOR(i, m, n) for(int i = m;i < n;i++)
using namespace std;

int main(void) {
	char s[12];
	int A,B;
	scanf("%d%d",&A,&B);
	scanf("%s",&s);
	
	FOR(i,0,A){if (!('0' <= s[i] && s[i] <= '9' )) 
		{
			printf("%s","No");
			return 0;
		} else if (s[i] == '-'){
			printf("%s","No");
			return 0;
		}
	}
		
	if (!(s[A] == '-')){
		printf("%s","No");
		return 0;
	}
	
	FOR(i,A+1,A+B-1){if (!('0' <= s[i] && s[i] <= '9' )) 
		{
			printf("%s","No");
			return 0;
		} else if (s[i] == '-'){
			printf("%s","No");
			return 0;
		}
	}
	
	printf("%s","Yes");
	return 0;
}

Measured memory_bytes: 256
package main

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

// I/O
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 (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

// Arithmetic
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
}

// Sort
type Val struct {
	id, num int
}
type ByNum []Val

func (a ByNum) Len() int           { return len(a) }
func (a ByNum) Less(i, j int) bool { return a[i].num < a[j].num }
func (a ByNum) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }

func main() {
	sc := NewScanner()
	wtr := bufio.NewWriter(os.Stdout)
	S := sc.nextStr()

	fmt.Fprintln(wtr, string(S[0])+strconv.Itoa(len(S)-2)+string(S[len(S)-1]))
	wtr.Flush()
}


Measured memory_bytes: 640