akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define erep(i, n) for (ll i = 0; i <= (ll)(n); ++i)
#define FOR(i,a,b) for (ll i = (a); i < (ll)(b); ++i)
#define EFOR(i,a,b) for (ll i = (a); i <= (ll)(b); ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } }

using Graph = vector<vector<int>>;
using P = pair<int, int>;
using Tuple = tuple<int, int, int>;

int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }

int main() {
    int k; cin >> k;
    int sum = 0;
    EFOR(a,1, k) EFOR(b,1, k) EFOR(c,1, k) {
        sum += GCD(GCD(a,b), c);
    }

    cout << sum << endl;

    return 0;

}


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

using namespace std;
typedef long long ll;

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repr(i,n) for(int i=n;i>=0;i--)
#define FOR(i,m,n) for(int i=m;i<(int)(n);i++)
#define INF 999999999
#define MAX_V 100010
#define MAX_E 2019

    /*Solve*/

int main(){
    int n;
    cin >> n;
    int keta[3];
    int ans;
    keta[0]=n/100;
    keta[1]=(n%100)/10;
    keta[2]=(n%100)%10;
    
    if(keta[0]*10+keta[0]<keta[1]*10+keta[2]){
        keta[0]++;
    }
    ans=keta[0]*100+keta[0]*10+keta[0];
    cout << ans;
}

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

int main(){
    int n;
    cin >> n;
    int A[n];
    for(int i = 0; i < n; i++){
        cin >> A[i];
    }
    vector<int> B;
    if(n % 2){
        for(int i = n - 1; i >= 0; i -= 2){
            B.push_back(A[i]);
        }
        for(int i = 1; i < n; i += 2){
            B.push_back(A[i]);
        }
    }else{
        for(int i = n - 1; i >= 0; i -= 2){
            B.push_back(A[i]);
        }
        for(int i = 0; i < n; i += 2){
            B.push_back(A[i]);
        }
    }

    for(int i = 0; i < B.size(); i++){
        if(i) cout << " " << B[i];
        else cout << B[i];
    }
    cout << endl;
    
    return 0;
}

Measured memory_bytes: 3828
N,C = map(int, input().split())
L = [[int(l) for l in input().split()] for _ in range(N)]

right = [0]*N
right[0] = L[0][1] - L[0][0]
for i in range(N-1):
    right[i+1] = right[i] + L[i+1][1] - (L[i+1][0] - L[i][0])

left = [0]*N
left[N-1] = L[N-1][1] - (C - L[N-1][0])
for i in range(N-1, 0, -1):
    left[i-1] = left[i] + L[i-1][1] - (L[i][0] - L[i-1][0])

Right = [0]*(N+1)
for i in range(N):
    Right[i+1] = max(right[i], Right[i])
Left = [0]*(N+1)
for i in range(N, 0, -1):
    Left[i-1] = max(left[i-1], Left[i])

ans = max(0, max(right), max(left))
for i in range(N-1, -1, -1):
    ans = max(ans, Right[i] + left[i] - (C - L[i][0]))
for i in range(N):
    ans = max(ans, Left[i+1] + right[i] - L[i][0])

print(ans)

Measured memory_bytes: 31732
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		int flag = 0;
		
		int n = sc.nextInt();
		int y = sc.nextInt();
		
		int i,j,k;
		
		for(i=0;i<=n && flag == 0;i++) {
			for(j=0;j<=n-i && flag == 0 ;j++) {
					if (10000*i+5000*j+1000*(n-i-j) == y) {
						System.out.printf("%d %d %d\n",i,j,n-i-j);
						flag = 1;
					}
				}
			}
		
		if(flag == 0) System.out.printf("-1 -1 -1\n");
	}
}


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

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;

template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;

template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }

template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
	os << v[0];
	for (int i = 1; i < v.size(); i++) os << " " << v[i];
	return (os);
}

template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
	for (auto &u : v) is >> u; return (is);
}

template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
	return (is >> p.first >> p.second);
}

struct Unionfind {
	vector<int> data;

	Unionfind(int n) { data.assign(n, -1); }

	int root(int n) {
		if (data[n] < 0) return (n);
		return (data[n] = root(data[n]));
	}

	int size(int n) { return (-data[root(n)]); };
	bool same(int x, int y) { return (root(x) == root(y)); }

	void unite(int x, int y) {
		x = root(x), y = root(y);
		if (x == y) return;
		if (data[x] > data[y]) swap(x, y);
		data[x] += data[y];
		data[y] = x;
	}
};



void Main() {
	int N, M, K; cin >> N >> M >> K;
	vint deg(N, 0), ans(N);
	Unionfind tree(N);
	for (int i = 0; i < M; i++) {
		int A, B;
		cin >> A >> B; --A, --B;
		deg[A]++, deg[B]++;
		tree.unite(A, B);
	}
	for (int i = 0; i < N; i++) {
		ans[i] = tree.size(i) - deg[i] - 1;
	}
	for (int i = 0; i < K; i++) {
		int C, D;
		cin >> C >> D; --C, --D;
		if (tree.same(C, D)) {
			ans[C]--, ans[D]--;
		}
	}
	cout << ans << endl;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout << fixed << setprecision(20);
	Main();
	return (0);
}

Measured memory_bytes: 2048
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define rep2(i,a,n) for(int i=(a); i<(n); i++)
#define all(vec) vec.begin(),vec.end()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;

int main(){
  int N; cin >> N;
  vvi s(N,vi(2));
  rep(i,N) cin >> s[i][0] >> s[i][1];
  sort(all(s)); 
  reverse(all(s));
  cout << s[0][0]+s[0][1] << endl;
  
  return 0;
}

Measured memory_bytes: 8784
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }

    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        long N = scan.nextLong();
        long K = scan.nextLong();
        long t = N / K;
        long ans = N - t * K;
        ans = Math.min(ans, Math.abs(ans - K));
        System.out.println(ans);
    }
}


Measured memory_bytes: 21972
#include"bits/stdc++.h"
#define int long long
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(a);i<(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define itr(i,x) for(auto i=(x).begin();i!=(x).end();++i)
#define All(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int,int> P;
const int mod=1000000007;
int gcd(int x,int y){return y?gcd(y,x%y):x;}
int lcm(int x,int y){return x*y/gcd(x,y);}

signed main(){
	string s;
	cin>>s;
	rep(i,2) s.pop_back();
	while(s.substr(0,s.size()/2)!=s.substr(s.size()/2)){
		rep(i,2) s.pop_back();
	}
	cout<<s.size()<<endl;
}

Measured memory_bytes: 256
#include <cstring>
#include <cassert>
#include <utility>
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <bitset>
#include <chrono>
#include <cstdlib>
#include <functional>
#include <tuple>
#include <climits>
#include <limits>
#include <deque>
#include <list>
#include <array>
#include <stack>
#include <queue>
#include <random>
#include <complex>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define ll              long long
#define pi              pair<int,int>
#define pll             pair<ll,ll>
#define pb              push_back
#define F               first
#define S               second
#define vi              vector<int>
#define vll             vector<ll>
#define endl            '\n'
#define all(v)          (v).begin(),(v).end()
#define MP(a,b)         make_pair(a,b)
#define debug(x)        cerr<< #x << " : " << x << endl;
#define debugp(p)       cerr<< #p << " : " << "(" << (p).first << "," << (p).second << ")\n";
#define debugv(v)       cerr<< #v << " : " << "["; for(int i = 0; i < (v).size(); i++) cerr << v[i] << " "; cerr<<"]\n";
#define debugs(m)       cerr<< #m << " : [ "; for(auto itr = m.begin(); itr != m.end(); itr++) cerr <<*itr << " "; cerr << "]\n";
#define debugm(m)       cerr<< #m << " : [ "; for(auto itr = m.begin(); itr != m.end(); itr++) cerr <<"(" << itr->first << "," << itr->second << ") "; cerr << "]\n";

/* ordered set: 
tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update>
member functions :
1. order_of_key(k) : number of elements strictly lesser than k
2. find_by_order(k) : k-th element in the set
*/

inline ll modexp(ll x, ll ex , ll md) {
    ll ans = 1ll;
    while (ex > 0) {
        if (ex & 1ll) ans = (ans * x) % md;
        ex >>= 1ll;
        x = (x * x) % md;
    }
    return ans;
}

const int inf = 1e9 + 7;

void Solve(){
    ll a;
    cin >> a ;
    cout << a + a * a + a * a * a << endl;
}
int main(){
    ios :: sync_with_stdio(false); 
    cin.tie(nullptr); 
    cout.tie(nullptr);
    
    int T = 1;
    // cin >> T;
    for(int tc = 1; tc <= T; tc++){
        // cout << "Case #" << tc << ": ";
        Solve();
    }
    #ifdef LOCAL
    cerr << "Time elapsed\t: " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";       
    #endif
}



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

#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = (int)(x); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define fi first
#define se second
typedef long long ll;
typedef pair<int, int> P;
const int inf = INT_MAX;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
const double EPS = 1e-10;
const double PI = acos(-1.0);
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; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill( (T*)array, (T*)(array+N), val ); }


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

    ll N;
    cin >> N;
    if (N == 0) {
        cout << 0 << endl;
        return 0;
    } else if (N % 2) {
        cout << 0 << endl;
        return 0;
    }
    ll e = 2;
    ll cnt = 0, cnt2 = 0;
    while (N / e > 0) {
        cnt += N / e;
        e *= 2;
    }

    e = 5;
    while (N / e > 0) {
        cnt2 += N / (2 * e);
        e *= 5;
    }
    cout << min(cnt, cnt2) << endl;
    return 0;
}

Measured memory_bytes: 256
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskC solver = new TaskC();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskC {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int[] x = new int[n];
            for (int i = 0; i < n; i++)
                x[i] = in.nextInt();
            int ans = Integer.MAX_VALUE;
            for (int pos = 1; pos <= 100; pos++) {
                int curVal = 0;
                for (int j = 0; j < n; j++)
                    curVal += (pos - x[j]) * (pos - x[j]);
                ans = Math.min(ans, curVal);
            }
            out.println(ans);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}



Measured memory_bytes: 23508
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi=vector<int>;using vvi=vector<vi>;using vl=vector<ll>;
using P=pair<int,int>;using PL=pair<ll,ll>;using vp=vector<P>;
const int INF=1<<30,MOD=1000000007;const ll LINF=1ll<<60;
#define _ol3(_1,_2,_3,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(int i=a,i##_l=(b);i<i##_l;++i)
#define REP(...) _ol3(__VA_ARGS__,_repi,_rep,)(__VA_ARGS__)
#define REPR(i,n) for(int i=n-1;i>=0;--i)
#define REPA(i,v) REP(i,v.size())
#define all(v) (v).begin(),(v).end()
#define bit(n) (1ll<<(n))
#define clamp(n,mi,ma) max(min(n,ma),mi)
#define uniq(v) sort(all(v));v.erase(unique(all(v)),v.end())
#define pb push_back
#define F first
#define S second
#define endl '\n'
#ifndef LOCAL
struct ostdmy{template<class T>ostdmy&operator<<(const T&t){return*this;}};ostdmy cer_;
#define cerr cer_
#endif
#define cho(n,a,b) cout<<((n)?a:b)<<endl
#define YES(n) cho(n,"YES","NO")
#define Yes(n) cho(n,"Yes","No")
#define Poss(n) cho(n,"Possible","Impossible")
template<class T>bool chmax(T&a,const T&b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T&a,const T&b){if(a>b){a=b;return 1;}return 0;}
template<class T>ostream&operator<<(ostream&o,const vector<T>&v){for(const T&i:v)o<<i<<' ';return o;}
template<class T>istream&operator>>(istream&i,vector<T>&v){for(T&j:v)i>>j;return i;}
template<class T,class U>ostream&operator<<(ostream&o,const pair<T,U>&p){return o<<p.F<<' '<<p.S;}
template<class T,class U>istream&operator>>(istream&i,pair<T,U>&p){return i>>p.F>>p.S;}
template<class T>ostream&operator<<(ostream&o,const set<T>&v){for(const T&i:v)o<<i<<' ';return o;}
bool is_acgt(const string&s){
    const string acgt="ACGT";
    REPA(i,s){
        if(acgt.find(s[i])==string::npos)return false;
    }
    return true;
}
int main(){
    cin.tie(0);ios::sync_with_stdio(0);
    string s;
    cin>>s;
    int ma=0;
    REPA(i,s){
        REP(j,s.size()-i+1){
            const string a=s.substr(i,j);
            if(is_acgt(a)){
                chmax(ma,(int)a.size());
            }
        }
    }
    cout<<ma<<endl;

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
//大きい順にソート
int c[51];
void merge(int i,int j,int *s){
  if(i!=j){
    merge(i,(i+j)/2,s);
    merge((i+j)/2+1,j,s);
    int a=i,b=(i+j)/2+1;
    int d;
    for(d=i;d<=j;d++){
      if((i+j)/2<a){
        c[d]=s[b];
        b++;
      }
      else if(j<b){
        c[d]=s[a];
        a++;
      }
      else if(s[a]>s[b]){
        c[d]=s[a];
        a++;
      }
      else{
        c[d]=s[b];
        b++;
      }
    }
    for(d=i;d<=j;d++)
      s[d]=c[d];
  }
}

int main(){
  int n,k;
  scanf("%d%d",&n,&k);
  int l[n+1],i;
  for(i=1;i<=n;i++)
    scanf("%d",&l[i]);
  merge(1,n,l);
  int count=0;
  for(i=1;i<=k;i++)
    count+=l[i];
  printf("%d\n",count);
  return 0;
}

Measured memory_bytes: 1708
#include <stdio.h>
#include <cmath>
#include <bits/stdc++.h>



using namespace std;

typedef vector<int> VI;
typedef vector<string> VS;


//container util
#define SORT(c) sort((c).begin(),(c).end())

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



int main(void){

	string S; cin >> S;

	int red = 0;
	int blue = 0;
	REP(i,S.length()){
		if(S[i] == '0') red++;
		else if(S[i] == '1') blue++;
	}

	cout << min(red, blue)*2 << endl;

	return 0;

}


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

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

template <typename T> T inf;
template <> constexpr int inf<int> = 1e9;
template <> constexpr ll inf<ll> = 1e18;

int main() {
    int N;
    cin >> N;
    vector<double> x(N);
    for(int i = 0; i < N; ++i) {
        cin >> x[i];
    }
    vector<double> y(N - 1);
    for(int i = 0; i + 1 < N; ++i) {
        y[i] = x[i + 1] - x[i];
    }
    ll M, K;
    cin >> M >> K;
    vector<int> a(M);
    for(int i = 0; i < M; ++i) {
        cin >> a[i];
        a[i]--;
    }

    vector<int> sw(N - 1);
    for(int i = 0; i < N - 1; ++i) {
        sw[i] = i;
    }
    auto res = sw;
    for(int i = 0; i < M; ++i) {
        swap(sw[a[i] - 1], sw[a[i]]);
    }
    while(K > 0) {
        if(K & 1) {
            auto nxt = res;
            for(int i = 0; i < N - 1; ++i) {
                nxt[i] = res[sw[i]];
            }
            res = move(nxt);
        }

        auto nxt_sw = sw;
        for(int i = 0; i < N - 1; ++i) {
            nxt_sw[i] = sw[sw[i]];
        }
        //for(auto s : sw) {
        //    cout << s << ' ';
        //}
        //cout << endl;
        sw = move(nxt_sw);
        K >>= 1;
    }

    vector<double> pos(N);
    pos[0] = x[0];
    for(int i = 1; i < N; ++i) {
        pos[i] = pos[i - 1] + y[res[i - 1]];
    }

    for(auto p : pos) {
        cout << fixed << setprecision(12) << p << endl;
    }
}


Measured memory_bytes: 6504
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class Main {

	public static void main(String[] args) throws IOException {
		final Scanner sc = new Scanner(System.in);
		
		final long a = sc.nextLong();
		final long b = sc.nextLong();
		
		final long max = Math.max(a, b);
		final long min = Math.min(a, b);
		
		if(max < 0){
			System.out.println((max - min + 1) % 2 == 0 ? "Positive" : "Negative");
		}else if(min > 0){
			System.out.println("Positive");
		}else{
			System.out.println("Zero");
		}
	}

	public static class Scanner implements Closeable {
		private BufferedReader br;
		private StringTokenizer tok;

		public Scanner(InputStream is) throws IOException {
			br = new BufferedReader(new InputStreamReader(is));
		}	

		private void getLine() throws IOException {
			while (!hasNext()) {
				tok = new StringTokenizer(br.readLine());
			}
		}

		private boolean hasNext() {
			return tok != null && tok.hasMoreTokens();
		}

		public String next() throws IOException {
			getLine();
			return tok.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

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

		public void close() throws IOException {
			br.close();
		}
	}
}

Measured memory_bytes: 7892
#include <bits/stdc++.h>
using ll = long long;
#define FOR(i, k, n) for(ll i = (k); i < (n); i++)
#define FORe(i, k, n) for(ll i = (k); i <= (n); i++)
#define FORr(i, k, n) for(ll i = (k)-1; i > (n); i--)
#define FORre(i, k, n) for(ll i = (k)-1; i >= (n); i--)
#define REP(i, n) FOR(i, 0, n)
#define REPr(i, n) FORre(i, n, 0)
#define ALL(x) (x).begin(), (x).end()
#define ALLr(x) (x).rbegin(), (x).rend()
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;

const int INF = 1001001001;

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

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

int main() {
  ll a, b, x;
  cin >> a >> b >> x;
  ll c;
  if (a > 0) c = b / x - (a-1) / x;
  else c = b / x + 1;
  cout << c << endl;
  return 0;
}

Measured memory_bytes: 3632
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    a = S()
    if a in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
        print("A")
    else:
        print("a")
        return


main()



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

using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;

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

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

int main(){
	llong N;
	vector<vector<llong> > s;

	cin >> N;
	s.resize(N);
	llong M;
	for(int i = 0; i < N; i++){
		cin >> M;
		s[i].resize(M);
		for(int j = 0; j < M; j++)
			cin >> s[i][j];
	}

	llong ans = 0;
	priority_queue<llong> q;
	for(int i = N-1; i >= 0; i--){
		for(auto x: s[i])
			q.push(x);
		ans += q.top();
		q.pop();
	}

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 19192
#include<iostream>
#include<vector>
#include<cstdlib>
#include <cmath>

#define INF 100000000
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; }

using namespace std;

void swap (int *x, int *y) {
  int temp;
  temp = *x;
  *x = *y;
  *y = temp;
}

int partition (int array[], int left, int right) {
  int i, j, pivot;
  i = left;
  j = right + 1;
  pivot = left;

  do {
    do { i++; } while (array[i] < array[pivot]);
    do { j--; } while (array[pivot] < array[j]);
    if (i < j) { swap(&array[i], &array[j]); }
  } while (i < j);
  swap(&array[pivot], &array[j]);
  return j;
}

void quick_sort (int array[], int left, int right) {
  int pivot;

  if (left < right) {
    pivot = partition(array, left, right);
    quick_sort(array, left, pivot-1);
    quick_sort(array, pivot+1, right);
  }
}

int main(){
  int i,j,k,n,d, a[100];
  double x=0,b[100];

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

  quick_sort(a,0,n-1);


  for(i=0;i<n-1;i++){
    if(i==0)b[1]=(a[0]+a[1]) /2.0;
    else{
      b[i+1]=double((b[i]+a[i+1])/2.0);
    }
  }
  if(n==2)cout << double((a[0]+a[1])/2.0)<<endl;
  else cout << b[n-1]<<endl;

  return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <ctype.h>
#include <limits.h>	
#define inf (INT_MAX-1)
#define INF 9223372036854775807
#define sq(n) ((n)*(n))
#define rep(i,n) for(i=0;i<n;i++)
#define rev(i,n) for(i=n-1;i>=0;i--)
#define sort(a,n) qsort(a,n,sizeof(TYPE),cmp)
#define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r);
#define chsort(s,n) qsort(s,n,sizeof(char),cmp)
#define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r);
#define TYPE long long
#define MEMSET(a) memset(a,0,sizeof(a))
const int mod=(int)1e09+7;

int in(void){
	int i;scanf("%d",&i);
	return i;
}
long long llin(void){
	long long i;scanf("%lld",&i);
	return i;
}
double din(void){
	double i;scanf("%lf",&i);
	return i;
}
void chin(char s[]){
	scanf("%s",s);
}
void print(int a){
	printf("%d\n",a);
}
void llprint(long long a){
	printf("%lld\n",a);
}
void dprint(double a){
	printf("%.10f\n",a);
}
void print2(int a,int b){
	printf("%d %d\n",a,b);
}
long long max(long long a,long long b){
	return a>b?a:b;
}
long long min(long long a,long long b){
	return a<b?a:b;
}
long long llabs(long long a){
	return a>0?a:-a;
}
double dmax(double a,double b){
	return a>b?a:b;
}
int cmp(const void *a,const void *b){
	return *(TYPE *)a-*(TYPE *)b;
}
int cmp_r(const void *a,const void *b){
	return *(TYPE *)b-*(TYPE *)a;
}
int char_cmp(const void *a,const void *b){
	return strcmp((char *)a,(char *)b);
}
int char_cmp_r(const void *a,const void *b){
	return strcmp((char *)b,(char *)a);
}
void swap(int *a,int *b){
	int t=*a;
	*a=*b;
	*b=t;
}
long long gcd(long long x,long long y){
	return x%y?gcd(y,x%y):y;
}
long long lcm(long long x,long long y){
	return x/gcd(x,y)*y;
}

int main(void){
	int n=in(),a=in(),b=in();
	if((b-a)%2)puts("Borys");
	else puts("Alice");
	return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		for(int c=1;;c++){
			int W = scan.nextInt();
			if(W==0)
				break;
			int N = scan.nextInt();
			int[] v = new int[N];
			int[] w = new int[N];
			for(int i=0;i<N;i++){
				String[] t = scan.next().split(",");
				v[i]=Integer.parseInt(t[0]);
				w[i]=Integer.parseInt(t[1]);
			}

			int[][] dp = new int[N+1][W+1];

			for (int i = 0; i < N; i++) {
				for (int j = 0; j <= W; j++) {
					dp[i+1][j] = Math.max(dp[i][j], dp[i+1][j]);
					if(j+w[i]<=W){
						dp[i+1][j+w[i]]=dp[i][j]+v[i];
					}
				}
			}

			int p=0;
			for(int j=0;j<=W;j++){
				if(dp[N][j]>dp[N][p])
					p=j;
			}

			System.out.println("Case "+c+":");
			System.out.println(dp[N][p]);
			System.out.println(p);
		}
	}

}

Measured memory_bytes: 28760
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N; string S;
  cin >> N >> S;

  int cnt = 1;
  for (int i=1; i<N; i++){
    if (S[i] != S[i-1]){
      cnt++;
    }
  }

  cout << cnt << endl;
}

Measured memory_bytes: 512
#pragma gcc optimize("Ofast")
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(V) (V).begin(),(V).end()
#define SORT(V) sort(ALL(V)) //小さい方からソート
#define REV(V) reverse(ALL(V)) //リバース
#define RSORT(V) SORT(V);REV(V) //大きい方からソート
#define NPN(V) next_permutation(ALL(V)) //順列
#define pb(n) push_back(n)
#define endl '\n'
#define Endl '\n'
#define DUMP(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define yes(n) cout << ((n) ? "yes" : "no"  ) << endl
#define Yay(n) cout << ((n) ? "Yay!": ":(") << endl
#define RAPID cin.tie(0);ios::sync_with_stdio(false)
#define VSUM(V) accumulate(ALL(V), 0)
#define MID(a,b,c) (a) < (b) && (b) < (c)
#define MIDe(a,b,c) (a) <= (b) && (b) <= (c)
#define IN(n) cin >> n
#define IN2(a,b) cin >> a >> b
#define IN3(a,b,c) cin >> a >> b >> c 
#define IN4(a,b,c,d) cin >> a >> b >> c >> d
#define VIN(V) for(int i = 0; i < (V).size(); i++) {cin >> (V).at(i);}
#define OUT(n) cout << n << endl
#define VOUT(V) REP(i, (V).size()) {cout << (V)[i] << endl;}
#define VOUT2(V) REP(i, (V).size()) {cout << (V)[i] << " ";} cout<<endl;
#define FIX cout << fixed << setprecision(15)

// 型マクロ定義
#define int long long
#define P pair<ll,ll>
#define Vi vector<ll>
#define VVi vector<vector<ll>>
#define Vd vector<double>
#define Vb vector<bool>
#define Vs vector<string>
#define Vc vector<char>
#define M map<ll,ll>
#define S set<ll>
#define PQ priority_queue<ll>
#define PQG priority_queue<ll,V,greater<ll>
//

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

const int MOD = 1000000007;
const int INF = 1061109567;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

int gcd(int a,int b){return b != 0 ? gcd(b, a % b) : a;} //最大公約数
int lcm(int a, int b){return a * b / gcd(a, b);}
string toStrUp(string str){char diff = 'A'-'a';REP(i,str.size()) str[i] += diff;return str;}
string gCh(string str, int key){return str.substr(key,1);}

signed main() {
  RAPID;
  // デフォルト変数定義
  int n=0,m=0,a=0,b=0,c=0,d=0,x=0,y=0,z=0;
  string s="",t="";
  //

  // ここから
  IN2(a,b);
  REP(i,a+1){
    REP(j,a+1){
      z = b-i-j;
      if(MIDe(0,z,a)) x++;
    }
  }
  OUT(x);
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <set> 
#include <map>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstring>
#include <iomanip>
#define REP(i,n) for(int i=0; i<(n); ++i)
#define FOR(i,a,b) for(int i=(a); i<(b); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const ll INFLL = 1001001001001001001;  // > 10^18
const int MOD = (int)1e9 + 7;
const ll MODLL = (ll)1e9 + 7;
const double EPS = 1e-9;

int main () {
    
    int n; cin >>n;
    vector<ll> a(n); REP(i,n) cin >> a[i];
    sort(a.begin(), a.end());

    int count = 0;
    for (int i = 0; i < n;) {
        int j = i;
        while (j < n && a[i] == a[j]) {
            j++;
        }
        if ((j - i) % 2 == 1) {
            count++;
        } 
        i = j;
    }

    cout << count << endl;
    return 0;
}



Measured memory_bytes: 1024
package main
 
import "fmt"
 
func main(){
	var A, B int
	var N int
	var a int
 
	fmt.Scan(&N, &A, &B)
	ab := A + B 
	syo := N / ab * A
	amari := N % ab
 
	if A <= amari {
		a = A
	} else {
		a = amari
	}
	ans := syo + a
 
	fmt.Println(ans)
}

Measured memory_bytes: 512
#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<ctime>
#include<set>
#include<map>
#include<queue>
#include<stack>
#define sqr(x) ((x)*(x))
#define fz1(i,n) for ((i)=1;(i)<=(n);(i)++)
#define fd1(i,n) for ((i)=(n);(i)>=1;(i)--)
#define fz0g(i,n) for ((i)=0;(i)<=(n);(i)++)
#define fd0g(i,n) for ((i)=(n);(i)>=0;(i)--)
#define fz0k(i,n) for ((i)=0;(i)<(n);(i)++)
#define fd0k(i,n) for ((i)=(long long)((n)-1);(i)>=0;(i)--)
#define fz(i,x,y) for ((i)=(x);(i)<=(y);(i)++)
#define fd(i,y,x) for ((i)=(y);(i)>=(x);(i)--)
#define fzin fz1(i,n)
#define fzim fz1(i,m)
#define fzjn fz1(j,n)
#define fzjm fz1(j,m)
#define ff(c,itr) for (__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
#define rdst(st,len){static char ss[len];scanf(" %s",ss);(st)=ss;}
#define inc(x,y) {x+=(y);if(x>=mod)x-=mod;}
#define dec(x,y) {x-=(y);if(x<0)x+=mod;}
using namespace std;
int n,m,i,j,a[100005],d[100005],ans;
vector<int> bi[100005];
void dfs(int x)
{
	ff(bi[x],it){
		dfs(*it);
		d[x]=max(d[x],d[*it]+1);
	}
	if(a[x]!=1&&d[x]==m-1){
		d[x]=-1;
		ans++;
	}
}
int main()
{
	scanf("%d%d",&n,&m);
	fz1(i,n){
		scanf("%d",&a[i]);
		if(i==1) ans+=(a[i]!=1); else bi[a[i]].push_back(i);
	}
	a[1]=1;
	dfs(1);
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 9600
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

typedef long long ll;

bool is_prime(int n);

int main(){
    int Q;
    cin >> Q;
    vector<int> l(Q), r(Q);
    int limit = 0;
    for(int i = 0; i < Q; ++i){
        cin >> l[i] >> r[i];
        limit = max(limit, r[i]);
    }
    
    vector<bool> prime_number(limit + 1, false);
    for(int i = 2; i <= limit; ++i){
        if(is_prime(i))     prime_number[i] = true;
    }
    
    vector<int> dp(limit + 1, 0);
    
    for(int i = 2; i <= limit; ++i){
        if(prime_number[i] && prime_number[(i + 1) / 2]){
            dp[i] = dp[i - 1] + 1;
        }
        else{
            dp[i] = dp[i - 1];
        }
    }
    
    for(int i = 0; i < Q; ++i){
        cout << dp[r[i]] - dp[l[i] - 1] << endl;
    }
}

bool is_prime(int n){
    if(n <= 3){
        return n > 1;
    }
    else if(n % 2 == 0 || n % 3 == 0){
        return false;
    }
    else{
        for(int i = 5; i * i <= n; i += 6){
            if(n % i == 0 || n % (i + 2) == 0){
                return false;
            }
        }
    }
    
    return true;
}

Measured memory_bytes: 1792
#include <iostream>
#include <cmath>
#include <climits>
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <string.h>
#include <iomanip>
#include <ctype.h>

#define ll          long long int
#define ull         unsigned long long int
#define pb          push_back
#define pii         pair<int,int>
#define F           first
#define S           second
#define vi          vector<int>
#define vli          vector<ll>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define M_PI        3.14159265358979323846
#define mp          make_pair
#define sz(x)       (int)x.size()
//#define hell        1000000007
#define matrix      vector<vector<ll>>
#define forn(i,a,b)  for(int i=a;i<b;i++)
#define eps 0.000000001
#define all(a)      (a).begin(),(a).end()
const long long INF = (long long) 1e7+1;
const long long mod = (long long) 998244353;
const long long hell = (long long) 1000000007;

using namespace std;
#include <stdio.h>

ll power(ll x,ll y)
{
  ll res=1;
  while(y>0)
  {
    if(y%2) res=(x*res);
    x=(x*x);
    y=y/2;
  }
  return res;
}

ll modinv(ll x){
  return power(x,hell-2);
}

void solve();


void fastIO() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}

int main(){
   fastIO();
    solve();
}
//void sieve();
ll pw(ll k,ll x);
ll gcd(ll x,ll y);
/*
void sieve(){

  for(int i=2;i<=500000;i++){
    if(prime[i]==true){
      for(int j=i*i;j<=500000;j+=i)
      prime[j]=false;
    }
  }

}*/


bool comp(pair<int,int> a,pair<int,int> b){
  if(a.F!=b.F)
  return (a.F<b.F);
  else
  return a.S<b.S;
}

void solve(){
  int test;
  //cin>>test;
  test=1;
  while(test--){
    int n;
    cin>>n;
    string a,b;
    cin>>a>>b;
    //cout<<(6-(a+b));
    for(int i=0;i<n;i++){
      cout<<a[i]<<b[i];
    }
  }
}




/*bool issafe(int x,int y){
  return (x>=0 && y>=0 && x<n && y<m);
}*/

///Before submit=>
///    *check for integer overflow,array bounds
///    *check for n=1

ll gcd(ll x,ll y){
  if(x==0)
  return y;
  else
  return gcd(y%x,x);
}


ll pw(ll k,ll x){
  if(x==0)
  return 1;
  if(x&1)
  return ((pw(k,x-1))*k);
  else
  return ((pw(k,x/2))*(pw(k,x/2)));
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  int total = 0;
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    total += A.at(i);
  }
  double average = (double)total / N;
  double min_diff = 100;
  int answer;
  for (int i = 0; i < N; i++) {
    int x = A.at(i);
    double d = abs(x - average);
    if (d < min_diff) {
      min_diff = d;
      answer = i;
    }
  }
  cout << answer << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	if(a==1&&b==2) cout<<"3";
	if(a==1&&b==3) cout<<"2";
	if(a==2&&b==1) cout<<"3";
	if(a==2&&b==3) cout<<"1";
	if(a==3&&b==1) cout<<"2";
	if(a==3&&b==2) cout<<"1";
	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <chrono>
#include <climits>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

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

template <class T1, class T2>
istream& operator >> (istream& in, pair<T1, T2> &p)
{
	in >> p.first >> p.second;
	return in;
}

template <class T>
istream& operator >> (istream& in, vector<T> &v)
{
	for (T &x : v)
		in >> x;
	return in;
}

template <class T>
ostream& operator << (ostream& out, const vector<vector<T>> &v)
{
	for (const vector<T> &x : v)
		out << x << '\n';
	return out;
}

template <class T>
ostream& operator << (ostream& out, const vector<T> &v)
{
	for (const T &x : v)
		out << x << ' ';
	return out;
}

long long gcd (long long a, long long b)
{
	if (b > a)
		swap(a, b);
	return (b ? gcd(b, a % b) : a);
}

using ll   = long long;
using pii  = pair<int, int>;
using pll  = pair<long long, long long>;
using tiii = pair<pair<int, int>, int>;
using vi   = vector<int>;
using vl   = vector<long long>;
using vvi  = vector<vector<int>>;
using vvl  = vector<vector<long long>>;

#define F          first
#define S          second
#define First      first.first
#define Second     first.second
#define Third      second
#define mp         make_pair
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define per(i,b,a) for (int i = (b); i > (a); i--)
#define all(x)     x.begin(), x.end()
#define ret(x)     return cout << x, 0;
#define throwex    throw runtime_error ("Found the error.");

const int h = 1000000007;

signed main()
{
	ios::sync_with_stdio(false);
	#ifdef ONLINE_JUDGE
	cin.tie(nullptr);
	cout.tie(nullptr);
	cerr.setstate(ios::failbit);
	#endif

	int k, a, b;
	cin >> k >> a >> b;
	rep(i,a,b+1)
	{
		if(i % k == 0)
			ret("OK");
	}
	ret("NG");
}


Measured memory_bytes: 3640
import collections

X = int(input())

def soin(x):
    li = []
    a = 2
    while x >= a * a:
        if x % a == 0:
            li.append(a)
            x //= a
        else:
            a += 1

    li.append(x)
    return(li)


for i in range(X + 1)[::-1]:
    li = soin(i)
    c = list(collections.Counter(li).values())
    if list(set(c)) == [1]:
        continue
    if len(list(set(c))) == 1:
        print(i)
        break

else:
    print(1)

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

int main() {
  int N;
  cin>>N;
  int a=N%100;
  int b=(N-a)/100;
  if((0<a&&a<=12)&&(0<b&&b<=12)){
    
    cout<<"AMBIGUOUS"<<endl;
  }
  else if((0<a&&a<=12)&&(0==b||b>12)){
    cout<<"YYMM"<<endl;
  }
  else if((0<b&&b<=12)&&(0==a||a>12)){
    cout<<"MMYY"<<endl;
  }
  else{
    cout<<"NA"<<endl;
  }
  
  
}


Measured memory_bytes: 256
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>

using namespace std;
typedef long long ll;
const ll mod = 1e9 + 7;

int main(int argc, const char * argv[]) {
  int n;
  string S;
  cin >> n >> S;
  
  string ans;
  vector<string> c = {"SS", "SW", "WS", "WW"};
  for (auto x : c) {
    ans = x;
    for (int i = 1; i < n; i++) {
      if (ans[i] == 'S') {
        if (S[i] == 'o') {
          ans += (ans[i - 1] == 'S' ? 'S' : 'W');
        } else {
          ans += (ans[i - 1] == 'S' ? 'W' : 'S');
        }
      } else {
        if (S[i] == 'x') {
          ans += (ans[i - 1] == 'S' ? 'S' : 'W');
        } else {
          ans += (ans[i - 1] == 'S' ? 'W' : 'S');
        }
      }
    }
    
    if (ans[0] == 'S') {
      if (S[0] == 'o') {
        if(ans[1] != ans[n - 1]) {
          continue;
        }
      } else {
        if(ans[1] == ans[n - 1]) {
          continue;
        }
      }
    } else {
      if (S[0] == 'x') {
        if(ans[1] != ans[n - 1]) {
          continue;
        }
      } else {
        if(ans[1] == ans[n - 1]) {
          continue;
        }
      }
    }
    if (ans[0] == ans[n]) {
      for (int i = 0; i < n; i++) {
        cout << ans[i];
      }
      cout << endl;
      return 0;
    }
  }
  cout << -1 << endl;
  return 0;
}


Measured memory_bytes: 776
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define is(a, b) a == b
#define len(v) ll(v.size())

const ll mod=1e9+7;

//vector書き出し
template <class T>
void cout_vec(const vector<T> &vec1){
  rep(i,len(vec1)){
    cout<<vec1[i]<<' ';
  }
  cout<<'\n';
}

typedef pair<int,int> P;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll x,t;
    cin>>x>>t;
    cout<<max((ll)0,x-t)<<endl;
}

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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]B - Bitter Alchemy
            var line = ReadLine();
            int n = line[0];
            int x = line[1];

            var m = ReadLines(n);
            int sum = m.Sum();
            int min = m.Min();

            int count = (x - sum) / min;
            Console.WriteLine(n + count);
        }

        static List<int> ReadLine()
        {
            var line = Console.ReadLine();
            var array = line.Split(' ');

            return array.Select(x => int.Parse(x)).ToList();
        }

        static List<int> ReadLines(int count = 0)
        {
            //[summary]コンソールの値を読み込む
            var lines = new List<int>();
            string s;

            //読み込む行数が未指定のときは、1行目の値を"count"とみなす
            if (count == 0)
            {
                s = Console.ReadLine().TrimEnd();
                count = int.Parse(s);
            }

            for (int i = 0; i < count; i++)
            {
                s = Console.ReadLine().TrimEnd();
                lines.Add(int.Parse(s));
            }

            return lines;
        }
    }
}

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

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

using namespace std;

using ll = long long;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vd = vector<double>;
using vs = vector<string>;
using vb = vector<bool>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using vvb = vector<vb>;

const int INF = 1e9;
const int MOD = 1e9+7;

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

signed main()
{
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    ll N; cin >> N;
    vl A(N); REP(i, N) cin >> A[i];
    sort(ALL(A));
    ll M = 0;
    vpl ans;
    if(A[0] >= 0)
    {
        M -= A[0];
        for(int i = 1; i < N; i++) M += A[i];
        ll tmp = A[0];
        REP(i, N-2)
        {
            ans.push_back(pl(tmp, A[i+1]));
            tmp -= A[i+1];
        }
        ans.push_back(pl(A[N-1], tmp));
    }
    else if(A[N-1] <= 0)
    {
        M += A[N-1];
        for(int i = 0; i < N-1; i++) M -= A[i];
        ll tmp = A[N-1];
        for(int i = N-1; i > 0; i--)
        {
            ans.push_back(pl(tmp, A[i-1]));
            tmp -= A[i-1];
        }
    }
    else
    {
        REP(i, N) M += abs(A[i]);
        int j = upper_bound(ALL(A), -1) - A.begin() - 1;
        ll tmp = A[j];
        for(int i = j; i < N-2; i++)
        {
            ans.push_back(pl(tmp, A[i+1]));
            tmp -= A[i+1];
        }
        ans.push_back(pl(A[N-1], tmp));
        tmp = A[N-1] - tmp;
        REP(i, j)
        {
            ans.push_back(pl(tmp, A[i]));
            tmp -= A[i];
        }
    }
    cout << M << endl;
    REP(i, ans.size()) cout << ans[i].first << " " << ans[i].second << endl;
}

Measured memory_bytes: 4336
#include<stdio.h>
int main(){
  int a,b,c,i=0;
  scanf("%d%d%d\n",&a,&b,&c);
  if(b>=a*c){
    printf("%d",c);
  }else{
    printf("%d",b/a);
  }
  return 0;
}
      
      

Measured memory_bytes: 128
#include<bits/stdc++.h>
#define forr(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = 1; i <= (n); i++)
#define ALL(a) (a.begin()),(a.end())
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll, ll> LP;
const ll LINF = 1LL<<60;
const int INF = 1001001001;
const int MOD = 1000000007;

/* --------------------------------------------------- */


int main() {
    int n, a, b;
    string s;
    cin >> n >> a >> b >> s;
    int AB = a + b, cnt = 0, bcnt = 0;
    rep(i, n) {
        if(s[i] == 'a') {
            if(cnt < AB) {
                cout << "Yes" << endl;
                cnt++;
            } else {
                cout << "No" << endl;
            }
        } else if(s[i] == 'b') {
            if(cnt < AB && bcnt < b) {
                cout << "Yes" << endl;
                cnt++;
                bcnt++;
            } else {
                cout << "No" << endl;
            }
        } else {
            cout << "No" << endl;
        }
    }
    
    return 0;
}

Measured memory_bytes: 896
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
ll N, M;
ll A[100050];
int main() {
    ll ans = 0;
    cin >> N >> M;
    priority_queue<l_l> indexes;
    priority_queue<l_l> values;
    for(int i = 0; i < N; i++) {
        cin >> A[i];
        ans += abs(i - A[i]);
        values.push({A[i], i});
        indexes.push({i, i});
    }
    values.push({-1, 0});
    indexes.push({-1, 0});
    priority_queue<ll> profit;
    priority_queue<ll, vector<ll>, greater<ll> > cost;
    for(int i = 1; i <= N; i++) {
        l_l now;
        //cerr << i << " " << values.top().first << " "<< indexes.top().first << endl;
        if(values.top() > indexes.top()) {
            now = values.top();
            values.pop();
            ll index = now.second;
            if(A[index] < index) profit.push(2 * A[index]);
        } else {
            now = indexes.top();
            indexes.pop();
            ll index = now.second;
            if(index <= A[index]) profit.push(2 * index);
        }
    }
    for(int i = 1; i <= N; i++) {
        l_l now;
        //cerr << i << " " << values.top().first << " "<< indexes.top().first << endl;
        if(values.top() > indexes.top()) {
            now = values.top();
            values.pop();
            ll index = now.second;
            if(A[index] >= index) cost.push(2 * A[index]);
        } else {
            now = indexes.top();
            indexes.pop();
            ll index = now.second;
            if(A[index] < index) cost.push(2 * index);
        }
    }
    //cerr << profit.size() << " " << cost.size() << endl;
    while(M--) {
        if(profit.empty()) break;
        ll PROFIT = profit.top();
        profit.pop();
        ll COST = cost.top();
        cost.pop();
        //cout << PROFIT << " " << COST << endl;
        ans += PROFIT - COST;
    }
    cout << ans << endl;
}


Measured memory_bytes: 7444
#include <iostream>
#include <algorithm>

using namespace std;

int main() {
  int N;
  cin >> N;
  int p[N][3];
  for(int i = 0; i < N; i++) {
    int ii[3];
    for(int j = 0; j < 3; j++) {
      cin >> ii[j];
    }
    sort(ii, ii + 3);
    for(int j = 0; j < 3; j++) {
      p[i][j] = ii[j];
    }
  }
  bool er[N];
  for(int i = 0; i < N; i++) {
    er[i] = false;
  }

  int sum = 0;
  for(int i = 0; i < N; i++) {
    if(er[i]) continue;
    for(int j = i+1; j < N; j++) {
      bool ers = true;
      if(er[j]) continue;
      for(int k = 0; k < 3; k++) {
        if(p[i][k] != p[j][k]) {
          ers = false;
          break;
        }
      }
      if(ers) {
        er[j] = true;
        sum++;
      }
    }
  }
  cout << sum << endl;


}

Measured memory_bytes: 3152