akhauriyash/Code-Regression huggingface dataset:
/* ****GT_18**** */

#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define	endl		'\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)	for(ll int i=a;i<b;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
using namespace std;

#define N  100005

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int TESTS=1;
//	cin>>TESTS;
	while(TESTS--)
	{
		int x,prod=1,max=0,i	;
		cin>>x;
		for(i=2;i<32;i++)
		{
			while(prod<=x)
			{
				if(prod>max && prod!=i)
					max=prod;
				prod=prod*i;

			}
			prod=1;
		}
		if(x==1)
			cout<<x;
		else
			cout<<max;
	}
	return 0;
}

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

int cnt;
string s;
void dfs(int i, int c3, int c5, int c7, long long sum){
  if(i>s.size()) return;
  if(c3!=0 && c5!=0 && c7!=0 && sum<=stoi(s)) cnt++;
  dfs(i+1, c3+1, c5, c7, sum*10+3);
  dfs(i+1, c3, c5+1, c7, sum*10+5);
  dfs(i+1, c3, c5, c7+1, sum*10+7);
}

int main(){
  cin>>s;
  cnt=0;
  dfs(0,0,0,0,0);
  cout<<cnt<<endl;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;

using namespace std;
const ll LINF = LLONG_MAX;
const int INF = INT_MAX;
const int MOD = 998244353;

template <typename T>
void read(vector<T>& a) {
    for (auto &v : a)
        cin >> v;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie();
    int n, k;
    cin >> n >> k;
    cout << max((int)ceil(log(n) / log(k)), 1);
}

Measured memory_bytes: 512
#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,m;
    cin >> n >> m;
    vector<int> s(m);
    REP(i, m){
        int k;
        cin >> k;
        REP(j, k){
            int si; cin >> si; si--;
            s[i] |= 1 << si;
        }
    }
    vector<int> p(m);
    REP(i, m){
        cin >> p[i];
    }
    int ans = 0;
    REP(i, 1<<n){
        bool flag = true;
        REP(j, m){
            if(__builtin_popcount(i & s[j]) % 2 != p[j]){
                flag = false;
                break;
            }
        }
        if(flag == true) ans++;
    }
    pr(ans);
}

Measured memory_bytes: 256
#define TEST_MODE true

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep2(i, a, b) for (int i = (a); i < (int)(b); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rrep2(i, a, b) for (int i = (a)-1; i >= (int)b; --i)
#define range(i, a, b, c) for (int i = a;             \
                                   c > 0 ? i < b : i > b; \
                                   i += c)
#define chmax(a, b) (a = (a) < (b) ? (b) : (a))
#define chmin(a, b) (a = (a) > (b) ? (b) : (a))
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define all(a) begin(a), end(a)
#define ifnot(a) if (not(a))
#define int long long

#ifdef LOCAL_ENV

#if TEST_MODE == true
const bool test = true;
#define dump(x) cerr << #x << " = " << (x) << " "
#define dumpl(x) dump(x) << endl
#else
const bool test = false;
#define dump(x) 
#define dumpl(x)
#endif

#else
const bool test = false;
#define dump(x) 
#define dumpl(x)
#endif

int dx[] = { 1, 0, -1, 0 };
int dy[] = { 0, 1, 0, -1 };
const int INF = (int)1 << 60;
const ll INFL = (ll)1 << 60;
ll mod_n = (int)1e9 + 7;
const double eps = 1e-10;
typedef long double Real;
// return -1, 0, 1
int sgn(const Real &r) { return (r > eps) - (r < -eps); }
int sgn(const Real &a, const Real &b) { return sgn(a - b); }

//.....................
const int MAX = (int)2e5 + 5;

vector<string> split(const string &str, char sep)
{
	vector<string> v;
	stringstream ss(str);
	string buffer;
	while (getline(ss, buffer, sep))
	{
		v.push_back(buffer);
	}
	return v;
}

template <class InputIterator>
int sum(InputIterator begin, InputIterator end)
{
	return accumulate(begin, end, 0ll);
}

template<typename T>
T gcd(T a, T b)
{
	T c;
	while (a != 0) {
		c = a; a = b%a;  b = c;
	}
	return b;
}

template<typename T>
T bit_count(T N) {
	T cnt = 0;
	while (N) {
		if (N & 1) cnt++;
		N >>= 1;
	}
	return cnt;
}

template<typename T>
void print_vec(ostream& ostream, vector<T> a) {
	rep(i, a.size() - 1) ostream << a[i] << " ";
	ostream << a.back() << endl;
}

struct Point {
	int y, x;
	bool operator < (const Point& r) {
		if (x < r.x) return true;
		else return false;
	}
};

class Solver {
public:
	int H, W;
	int N, M, X;
	vector<int> B;


	bool grid_ok(int y, int x) {
		return 0 <= y && y < H && 0 <= x && x < W;
	}

	int f1() {
		int res = 0;
		rep(i, X) {
			if (B[i] == true) res += 1;
		}
		return res;
	}

	int f2() {
		int res = 0;
		rep2(i, X, N) {
			if (B[i] == true) res += 1;
		}
		return res;
	}

	void solve() {
		cin >> N >> M >> X;
		B.resize(N);
		rep(i, M) {
			int a; cin >> a;
			B[a] = true;
		}
		cout << min(f1(), f2()) << endl;
	}

};

signed main()
{
	srand((unsigned int)time(NULL));
	cout << fixed << setprecision(20);
	auto ptr = new Solver();
	ptr->solve();
	delete ptr;
	//while (true) {
	//	if (cin.eof() == true) break;
	//	auto ptr = new Solver();
	//	ptr->solve();
	//	delete ptr;
	//}
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define P pair<ll, ll>
#define Graph vector<vector<ll>>
#define fi first
#define se second
constexpr ll mod = 998244353;
constexpr ll INF = (1ll << 60);
constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}

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

    ll ans = 0;

    for (ll a = 1; a <= n; a++) {
        if ((n / a) * a != n)
            ans += n / a;
        else
            ans += (n / a - 1);
    }

    cout << ans << "\n";

    return 0;
}

Measured memory_bytes: 3628
#include <iostream>
#include<string>
using namespace std;
int main(void){
    // Your code here!
    int n,flag=1,count=0;
    string A[36]={},B[36]={},C[36]={};
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>A[i];
        B[i]=A[i];
        C[i]=A[i];
    }
    int i=0;
    while(flag){
        flag=0;
        for(int j=n-1;j>=i+1;j--){
            string x=A[j],y=A[j-1];
            if(x[1]<y[1]){
                string tmp=A[j-1];
                A[j-1]=A[j];
                A[j]=tmp;
                flag=1;
            }
        }
        i+=1;
    }
    for(int i=0;i<n;i++){
        int minj=i;
        for(int j=i;j<=n-1;j++){
            string x=B[j],y=B[minj];
            if(x[1]<y[1]){
                minj=j;
            } 
        }
        string tmp=B[i];
        B[i]=B[minj];
        B[minj]=tmp;
        
    }
    for(int i = 0; i< n; i++) {
		if (i > 0) cout << " ";
		cout << A[i];
	}cout << endl;
	cout<<"Stable"<<endl;
	
	for(int i= 0; i< n; i++){
		if (i > 0) cout << " ";
		cout << B[i];
	}cout << endl;
	for(int i=0;i<n;i++){
	    for(int j=i+1;j<n;j++){
	        for(int v=0;v<n;v++){
	                for(int w=v+1;w<n;w++){
	                    string a=B[v],b=B[w];
	                    if(a[1]==b[1] && C[i]==b && C[j]==a) count+=1;
	                }
            }
	        
	    }
	}
	if(count>0) cout<<"Not stable"<<endl;
	else cout<<"Stable"<<endl;
	return 0;
    
}



Measured memory_bytes: 3232
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <fstream>

using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REPR(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase( unique(ALL(v)) , v.end());

typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<bool> vb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);

template<typename T>vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T, typename... Ts>auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value != 0>::type
fill_v(U & u, const V... v) { u = U(v...); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value == 0>::type
fill_v(U & u, const V... v) { for (auto& e : u) fill_v<T>(e, v...); }
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; }

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	vector<vector<char> > C;
	C.push_back({ '.',',','!','?',' ' });
	C.push_back({ 'a','b','c' });
	C.push_back({ 'd','e','f' });
	C.push_back({ 'g','h','i' });
	C.push_back({ 'j','k','l' });
	C.push_back({ 'm','n','o' });
	C.push_back({ 'p','q','r','s' });
	C.push_back({ 't','u','v' });
	C.push_back({ 'w','x','y','z' });
	int N;
	cin >> N;
	REP(i, N) {
		string S;
		cin >> S;
		int ind = 0;
		string ans = "";
		while (ind < SZ(S)) {
			char c = S[ind];
			ind++;
			if (c == '0') {
				continue;
			}
			int cnt = 0;
			while (S[ind] != '0') {
				ind++;
				cnt++;
			}
			ans += C[c - '1'][cnt % SZ(C[c-'1'])];
		}
		cout << ans << endl;
	}
	return 0;
}



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

int main(int argc, char *argv[]) {
  int n;
  std::cin >> n;
  std::vector<int> d(n);
  for (int i = 0; i < n; ++i)
    std::cin >> d[i];
  int ans = 0;
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      ans += d[i] * d[j];

  std::cout << ans << std::endl;
}


Measured memory_bytes: 3176
//#include<i_am_noob_orz>
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define ull unsigned long long
#define pii pair<int,int>
#define X first
#define Y second
#define mod ((ll)1e9+7)
#define pb push_back
#define mp make_pair
#define abs(x) ((x)>0?(x):(-(x)))
#define F(n) Fi(i,n)
#define Fi(i,n) Fl(i,0,n)
#define Fl(i,l,n) for(int i=l;i<n;i++)
#define memres(a) memset(a,0,sizeof(a))
#define all(a) a.begin(),a.end()
#define sz(a) ((int)a.size())
#define ceiling(a,b) (((a)+(b)-1)/(b))
#define endl '\n'
#define bit_count(x) __builtin_popcount((x))
#define ykh mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//#define LOCAL
#ifdef LOCAL
#define debug(a) cerr<<#a<<" "<<a<<endl;
#else
#define debug(a)
#endif
int gcd(int a,int b){if(b==0)return a;return gcd(b,a%b);}

signed main(){
	ios_base::sync_with_stdio(0);cin.tie(0);
	int n,m;
	int ct=0;
	cin>>n>>m;
	m*=m;
	F(n){
		int a,b;
		cin>>a>>b;
		if(a*a+b*b<=m)ct++;
	}
	cout<<ct<<endl;
return 0;
}


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

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

    void Solve()
    {
        Scanner cin = new Scanner();
        int R = cin.NextInt();
        int G = cin.NextInt();
        int B = cin.NextInt();
        int N = cin.NextInt();

        int MAX = 3000;
        int count = 0;
        for (int r = 0; r <= MAX; r++)
        {
            for (int g = 0; g <= MAX; g++)
            {
                int residual = N - R * r - G * g;
                if (residual < 0)
                {
                    break;
                }
                if (residual % B == 0)
                {
                    count++;
                }
            }
        }
        Console.WriteLine(count);
    }
}


class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string Next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return Next();
        i = 0;
        return s[i++];
    }

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

    public char[] ArrayChar()
    {
        return Next().ToCharArray();
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = NextInt() + add;
        }
        return Array;
    }

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

    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = NextLong() + add;
        }
        return Array;
    }

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


    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = NextDouble() + add;
        }
        return Array;
    }
}

Measured memory_bytes: 13140
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <queue>

#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;


int main(){
    long long n,m; cin >> n >> m;
    // corner -> 4 flip -> no count
    // edge ->6 flip -> no count
    // center -> need to count
    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 << (n-2)*(m-2) << endl;
    }
}




Measured memory_bytes: 256
#include<stdio.h>
#include<string.h>
int main(void){
int A,B,C,D,E,N,M,x,y,cou=0,cou2,v[1000000],w[1000000],min_i,en=0;
    char S[10],W[10],s[10],X,Y;
   scanf("%d %d %d %d",&A,&B,&C,&D);
   if(A*B>C*D){
       printf("%d",A*B);
   }else{
       printf("%d",C*D);
   }
    return 0;
}

Measured memory_bytes: 128
using System;
using System.Text;
using System.Linq;

class Program
{
    static void Main(string[] args) {
        //System.Diagnostics.Debug.WriteLine("-----TextFile1");
        //System.Diagnostics.Debug.WriteLine(process("../TextFile1.txt"));

        //System.Diagnostics.Debug.WriteLine("-----TextFile2");
        //System.Diagnostics.Debug.WriteLine(process("../TextFile2.txt"));

        String ret = process(new System.IO.StreamReader(Console.OpenStandardInput()));
        Console.WriteLine(ret);
    }

    static string processText(string input) {
        return process(new System.IO.StringReader(input));
    }

    static string process(string filePath) {
        using (var input = new System.IO.StreamReader(filePath)) {
            return process(input);
        }
    }

    static string process(System.IO.TextReader input) {
        var s     = input.ReadLine();
        var spl   = s.Split(' ');
        int n     = int.Parse(spl[0]);
        int a     = int.Parse(spl[1]);
        int b     = int.Parse(spl[2]);

        int tra = a * n;
        int tac = b;

        return Math.Min(tra,tac).ToString();
    }
}

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

#define mp make_pair
#define pb push_back
#define REP(i,a,n) for(int i = a;i < (n);i++)
#define RREP(i,a) for(int i = a;i >= 0;i--)
#define rep(i,n) for(int i = 0;i < (n);i++)
#define rrep(i,n) for(int i = n - 1;i >= 0;i--)
#define all(s) s.begin(), s.end()
#define rall(s) s.rbegin(), s.rend()
#define range(x,min,max) ((min) <= (x) && (x) <= (max))
#define xyrange(x, minX, maxX, y, minY, maxY) (range(x, minX, maxX) && range(y, minY, maxY))

using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<vector<int> > VVI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef pair<int,int> PII;
typedef vector<PII> VPII;

const int DX[]={1,0,-1,0},DY[]={0,-1,0,1};
const int INF = 0x3f3f3f3f;

int n;
VI as;

VI solve() {
	VI res;
	if (as.size() % 2) {
		for (int i = as.size() - 1;i >= 0;i -= 2) {
			res.pb(as[i]);
		}
		for (int i = 1;i < as.size();i += 2) {
			res.pb(as[i]);
		}
	} else {
		for (int i = as.size() - 1;i >= 0;i -= 2) {
			res.pb(as[i]);
		}
		for (int i = 0;i < as.size();i += 2) {
			res.pb(as[i]);
		}
	}
	return res;
}

int main(){
	cin.tie(0);
   	ios::sync_with_stdio(false);
	cin >> n;
	rep (i, n) {
		int a;
		cin >> a;
		as.pb(a);
	}
	VI ans = solve();
	rep (i, ans.size()) {
		cout << ans[i];
		if (i == ans.size() - 1) {
			cout << endl;
		} else {
			cout << " ";
		}
	}
		
	return 0;
}



Measured memory_bytes: 3956
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repr(i,n) for(int i = (int)(n); i >= 0; i--)
#define all(v) v.begin(),v.end()
typedef long long ll;

int main(){
    int N;
    cin >> N;
    vector<int> vec(N);
    rep(i,N){
        cin >> vec[i];
    }
    int lowest = vec[0];
    int ans = 1;
    for (int i = 1; i < N; i++){
        if (vec[i] < lowest){
            ans++;
            lowest = vec[i];
        }
    }
    cout << ans << endl;
}



Measured memory_bytes: 1024
// inputに入力データ全体が入る
function Main(input) {
    var n = input[3];
    var ansmap = [
        [false,false,false],
        [false,false,false],
        [false,false,false]];
    var chk = [];
    for(var i=4;i<n+4;i++){
        chk.push(input[i]-0);
    }
    var map = [
        input[0].split(" ").map(v=>chk.indexOf(v-0)>=0),
        input[1].split(" ").map(v=>chk.indexOf(v-0)>=0),
        input[2].split(" ").map(v=>chk.indexOf(v-0)>=0),
    ];
    var flg = false;
    if(map[0][0]&&map[0][1]&&map[0][2]) flg = true;
    if(map[1][0]&&map[1][1]&&map[1][2]) flg = true;
    if(map[2][0]&&map[2][1]&&map[2][2]) flg = true;
    if(map[0][0]&&map[1][0]&&map[2][0]) flg = true;
    if(map[0][1]&&map[1][1]&&map[2][1]) flg = true;
    if(map[0][2]&&map[1][2]&&map[2][2]) flg = true;
    if(map[0][0]&&map[1][1]&&map[2][2]) flg = true;
    if(map[0][2]&&map[1][1]&&map[2][0]) flg = true;
    console.log(flg?"Yes":"No");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n"));

Measured memory_bytes: 21064
/*
    Problem 53
    https://onlinejudge.u-aizu.ac.jp/problems/DPL_1_D
*/
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
/* function */
/* main */
int main(){
    int N;
    cin >> N;
    vector<int> a(N);
    for (int i = 0; i < N; i++) cin >> a[i];
    vector<int> lis(N+1, INF);
    for (int i = 0; i < N; i++) {
        *lower_bound(lis.begin(), lis.end(), a[i]) = a[i];
    }
    cout << lower_bound(lis.begin(), lis.end(), INF) - lis.begin() << '\n';
}


Measured memory_bytes: 3624
n = int(input())
link = [[] for _ in range(n)]
for i in range(n-1):
    tmp = list(map(int,input().split()))
    link[tmp[0]-1].append(tmp[1]-1)
    link[tmp[1]-1].append(tmp[0]-1)
 
from collections import deque
Q = deque()
Q.append(0)
visited=[-1]*n
visited[0]=1
prev=[-1]*n
 
while Q:
    now = Q.popleft()
    for nxt in link[now]:
        if visited[nxt]!=-1:
            continue
        visited[nxt]=1
        Q.append(nxt)
        prev[nxt]=now
 
rt=[n-1]
now=n-1
while prev[now]!=-1:
    now=prev[now]
    rt.append(now)
rt.reverse()
cut= -(-len(rt)//2)
f_node=rt[cut-1]
s_node=rt[cut]
 
Q = deque()
Q.append([0,0]) # 0 is f, 1 if s
visited=[-1]*n
visited[0]=0
 
while Q:
    now,fs = Q.popleft()
    for nxt in link[now]:
        nxt_fs=fs
        if now==f_node and nxt==s_node:
            nxt_fs=1
        if visited[nxt]!=-1:
            continue
        visited[nxt]=nxt_fs
        Q.append([nxt,nxt_fs])
s_score = sum(visited)
f_score = n-s_score
if s_score >= f_score:
    print("Snuke")
else:
    print("Fennec")

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

int main(void){
    int siz,time;
    string name;
    while(true){
        cin >> name;
        if(name[0] == '-')break;
        cin >> time;
        for(int abc=0;abc<time;abc++){
            cin >> siz;
            name = name.substr(siz) + name.substr(0,siz);
        }
        cout << name << endl;
    }
}


Measured memory_bytes: 3136
x, y = gets.split.map(&:to_i)
v = 0
case x
when 1
  v += 300000
when 2
  v += 200000
when 3
  v += 100000
end
case y
when 1
  v += 300000
when 2
  v += 200000
when 3
  v += 100000
end
v += 400000 if x == 1 && y == 1
puts v


Measured memory_bytes: 1788
import java.io.InputStream;
import java.io.PrintStream;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
  public static void main(String[] args) throws Exception {
    solve(System.in, System.out);
  }

  static void solve(InputStream is, PrintStream os) {
    // Your code here!
    Scanner scan = new Scanner(is);
    int H = scan.nextInt();
    int W = scan.nextInt();
    int K = scan.nextInt();

    int c[] = new int[H*W];
    int blacks = 0;
    for(int i = 0; i < H; i++) {
      String S = scan.next();
      for(int j = 0; j < W; j++) {
        if(S.charAt(j) == '.')
          c[i*W+j] = 0;
        else {
          c[i * W + j] = 1;
          blacks++;
        }
      }
    }
    int ans = 0;
    int allH = (int)Math.pow(2.0, H);
    int allW = (int)Math.pow(2.0, W);

    for(int i = 0; i < allH; i++) {
      for(int j = 0; j < allW; j++) {
        Set<Integer> set = new HashSet<>();
        for(int k = 0; k < H; k++) {
          if(((i >> k) & 1) == 1){
            for(int t = k*W; t < k*W+W; t++) {
              if(c[t] == 1)
                set.add(t);
            }
          }
        }
        for(int k = 0; k < W; k++) {
          if(((j >> k) & 1) == 1){
            for(int t = 0; t < H; t++) {
              if(c[k+W*t] == 1)
                set.add(k+W*t);
            }
          }
        }
        if(blacks-set.size() == K)
          ans++;
      }
    }

    os.println(ans);
  }
}


Measured memory_bytes: 34348
#include <climits>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <functional>
#define fi first
#define se second
#define FO(x, n) for (int x = 0; x < n; ++x)
#define FOR(x, a, b) for (int x = a; x < b; ++x)
#define RFO(x, n) for (int x = n - 1; x >= 0; --x)
#define RFOR(x, a, b) for (int x = b - 1; x >= a; --x)
using namespace std;
typedef unsigned char byte;
typedef long long llong;
typedef unsigned long long ullong;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<string, string> pss;
typedef pair<llong, llong> pll;
inline bool feq(const double& a, const double& b) { return fabs(a - b) < 1e-10; }

int N;
llong nums[300300];
llong l[300300];
llong r[300300];

int main()
{
    while (cin >> N)
    {
        FO (i, 3 * N)
            cin >> nums[i];
        priority_queue<llong, vector<llong>, greater<llong> > ql;
        llong lsum = 0, rsum = 0;
        FO (i, N)
        {
            ql.push(nums[i]);
            lsum += nums[i];
        }
        l[0] = lsum;
        FO (i, N)
        {
            lsum += nums[N + i];
            ql.push(nums[N + i]);
            lsum -= ql.top();
            ql.pop();
            l[i + 1] = lsum;
        }
        priority_queue<llong> qr;
        FO (i, N)
        {
            qr.push(nums[3 * N - 1 - i]);
            rsum += nums[3 * N - 1 - i];
        }
        r[N] = rsum;
        FO (i, N)
        {
            rsum += nums[2 * N - 1 - i];
            qr.push(nums[2 * N - 1 - i]);
            rsum -= qr.top();
            qr.pop();
            r[N - 1 - i] = rsum;
        }
        llong res = LLONG_MIN;
        FO (i, N + 1)
            res = max(res, l[i] - r[i]);
        cout << res << endl;
    }
    return 0;
}

Measured memory_bytes: 7668
#include <stdio.h>
#include <string.h>

int main() {
    char weather[10];
    scanf("%s", &weather[0]);
    if(strcmp(weather, "Sunny") == 0){
        printf("Cloudy\n");
    }
    else if(strcmp(weather, "Cloudy") == 0) {
        printf("Rainy\n");
    }
    else if(strcmp(weather, "Rainy") == 0) {
        printf("Sunny\n");
    }

    return 0;
}

Measured memory_bytes: 128
#include <stdio.h>

#define MAX 45

int res[MAX];


main()
{
    int n;        
    int i;
    scanf("%d", &n);

    res[0] = 1;
    res[1] = 1;

    for (i = 2; i <= n; i++)
        res[i] = res[i - 1] + res[i - 2];

    printf("%d\n", res[n]);

    return 0;

}

Measured memory_bytes: 596
n = gets.chomp.to_i
a = []
for i in 0..n-1
    a[i]=gets.chomp.to_i
end
sum=0
a.map{|x| sum+=x}
a.sort!
for i in 0..a.length-1
    if sum%10!=0
        puts sum
        exit
    end 
    sum -= a[i] if a[i]%10!=0
end

if sum%10!=0
    puts sum 
else
    puts 0
end


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

int fact (int x);
int main()
{
    int n,i,u,j,x,cou=0,in,k;
    double sum=0,l,res=0;
    cin>>n>>x;
    int arr[n][x];
    for(i=0;i<n;i++)
    {
        for(j=0;j<x;j++)
        {
            cin>>arr[i][j];
        }
    }


    for(k=0;k<n;k++)
    {
    for(i=0;i<n;i++)
    {
        sum=0;

        for(j=0;j<x;j++)
        {
            if(k<i){
            l=abs(arr[k][j]-arr[i][j]);
            sum+=l*l;
            }
        }

        res=sqrt(sum);
        in=res;

        if(in == res && res !=0)
        {
            cou++;
        }

    }
    }

    cout<<cou<<endl;

    return 0;
}



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

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <math.h>
#include <map>

typedef long long ll;
typedef unsigned long long ull;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define RFOR(i,a,b) for(int i=(b-1);i>=(a);--i)
#define REP(i,n)   FOR(i,0,n)
#define RREP(i,n)   RFOR(i,0,n)

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

using namespace std;

template <typename _Ty>
ostream& operator << (ostream& ostr, const vector<_Ty>& v) {if (v.empty()) {ostr << "{ }"; return ostr;}
    ostr << "{" << v.front(); for (auto itr = ++v.begin(); itr != v.end(); itr++) {ostr << ", " << *itr;}
    ostr << "}";
    return ostr;}

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


int main(void){
  ios::sync_with_stdio(false);

  string S;
  cin >> S;
  if (S == "Sunny"){cout << "Cloudy" << endl;}
  else if (S == "Cloudy") {cout << "Rainy" << endl;}
  else if (S == "Rainy") {cout << "Sunny" << endl;}




  return 0;
}



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


int main(){
   
    long long N;
    long long a[100009];
    long long cnt = 0;
    cin >> N;
    for(int i = 0; i < N; i++){
        cin >> a[i];
        if(a[i]==0){
            cnt++;
        }
    }

    if(cnt == N){
        cout << "Yes" << endl;
    }else if((N%3) != 0){
        cout << "No" << endl;
    }else{
        sort(a, a + N, greater<int>());
        int tmp = 0;
        int cnt2 = 0;
        int tmpi[100009];
        int k = 0;
        for(int i = 0; i < N; i++){
            if(a[i] != tmp){
                cnt2++;
                tmp = a[i];
                tmpi[k] = i;
                k++;
            }
        }
        if(!((cnt2==3&&(tmpi[1] == N/3 && tmpi[2] == N*2/3)) || (cnt2==2&&(tmpi[1] == N*2/3 || tmpi[1] == N*1/3)))){
            cout << "No" << endl;
        }else if((a[0] ^ a[(N/3)]) == a[N*2/3]){
            cout << "Yes" << endl;
            //cout << a[N*2/3] << endl;
        }else{
            cout << "No" << endl;
        }
        
    }
    

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

Measured memory_bytes: 1152
#include <cstdio>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <set>
#include <limits.h>
#include <queue>

#define rep(i,N) for(int (i)=0;(i)<(N);(i)++)
#define MOD 1000000007

using ll = long long;

using namespace std;

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

ll sum_digit(ll N) {
	int ans = 0;
	for (; N != 0;) {
		ans += N % 10;
		N /= 10;
	}
	return ans;
}

ll gcd(ll a,ll b) {
	if (!b)return a;
	return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}

int N;
string w[110];
int len[110];

int main(){
	scanf("%d", &N);
	rep(i, N)cin >> w[i];
	rep(i, N) {
		len[i] = w[i].size();
	}
	rep(i, N) {
		for (int j = i + 1; j < N; j++)if (w[i] == w[j]) {
			printf("No");
			return 0;
		}
	}
	for (int i = 0; i < N - 1; i++) {
		if (w[i][len[i] - 1] != w[i + 1][0]) {
			printf("No");
			return 0;
		}
	}
	printf("Yes");
	return 0;
}

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

#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define REP2(i,n) for(int i=0;i<(int)(n);i++)
#define REP3(i,m,n) for(int i=m;i<(int)(n);i++)
#define REP4(i,m,n,s) for(int i=m;(s>0 and i<(int)(n)) or (s<0 and i>(int)(n));i+=s)
#define REP(...) GET_MACRO(__VA_ARGS__, REP4, REP3, REP2)(__VA_ARGS__)
#define REPIT(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define PIS(x) printf("%d ",x)
#define PN() putchar('\n')
#define PRINTARR(a,b) for(int i=0;(a+i)!=(b);i++){cout << *(a+i) << " ";}PN();
#define MP make_pair
#define PB push_back
#define EB emplace_back

typedef pair<int,int> PII;
typedef long long LL;
typedef unsigned long long ULL;

void RI() {}
template<typename... T>
void RI( int& head, T&... tail ) {
    scanf("%d", &head);
    RI(tail...);
}
void RLL() {}
template<typename... T>
void RLL( LL& head, T&... tail ) {
    scanf("%lld", &head);
    RLL(tail...);
}
void print() {putchar('\n');}
template<typename T, typename... U>
void print(T head, U... tail) {
    cout << head << " ";
    print(tail...);
}

const int MOD = 1000000007;
#define MAX_N 100005


int main()
{
    int a, b, c, d;
    LL n;
    RI(a, b, c, d);
    RLL(n);
    n *= 4;
    int p[4] = {a, b, c, d};
    int ppi[4] = {a*8, b*4, c*2, d};
    int q[4] = {1, 2, 4, 8};
    int idx[4] = {0, 1, 2, 3};
    sort(idx, idx + 4, [&ppi](const int i, const int j) {
        return ppi[i] < ppi[j];
    });
    LL ans = 0;
    REP(i, 4) {
        LL m = n / q[idx[i]];
        //print(idx[i], p[idx[i]], q[idx[i]], n, m);
        ans += m * p[idx[i]];
        n -= m * q[idx[i]];
    }
    printf("%lld\n", ans);
    return 0;
}


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

int main(){
	int n;
    cin >> n;
    string s;
    vector<ll> march(5,0);
    rep(i,n){
        cin >> s;
        switch (s[0])
        {
        case 'M':
            march[0]++;
            break;
        case 'A':
            march[1]++;
            break;
        case 'R':
            march[2]++;
            break;
        case 'C':
            march[3]++;
            break;
        case 'H':
            march[4]++;
            break;
        default:
            break;
        }
    }

    // for(auto x : march){
    //     cout << x << endl;
    // }

    ll ans=0;
    rep(a,3)rep2(b,a+1,4)rep2(c,b+1,5){
        ans += march[a]*march[b]*march[c];
    }

    cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <numeric>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <cstdarg>
#include <sys/time.h>
#include <fstream>
//#include "cout.h"

using namespace std;

#define SZ(x) ((int)x.size())
#define MSET(x,a) memset(x, a, (int)sizeof(x))
#define PB push_back
#define VI vector < int >
#define PII pair < int, int >
#define 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 FIT(it,v) for (__typeof((v).begin()) it = (v).begin(); it != (v).end(); it++)
#define OUT(A) cout << #A << " = "<< (A) << endl
#define OUT2(A, B) cout << "(" << #A << ", " << #B << ") = (" << (A) << ", "<< (B) << ")" << endl
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }

#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(ALL(c), (e)) != (c).end())

int n;
LL a[100010], b[100010];

bool pairCompare(const pair<int, int> firstElof, const pair<int, int> secondElof)
{
    return firstElof.second > secondElof.second;
}

void init() {

}

void input() {
}

void solve() {
  cin >> n;
  vector<pair<int, int> > v;
  REP(i , n) {
    cin >> a[i] >> b[i];
    v.push_back(make_pair(i, a[i]+b[i]));
  }
  sort(v.begin(), v.end(), pairCompare);
  LL res = 0;
  REP(i, n) {
    if (i%2 == 0) {
      res += a[v[i].first];
    } else {
      res -= b[v[i].first];
    }
  }
  cout << res << endl;
}

int main() {
	init();
	input();
	solve();
	return 0;
}


Measured memory_bytes: 2676
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<ll,ll>;
const ll mod = 1e9+7;
#define ALL(x) (x).begin(),(x).end()
#define pow(x,y) modpow(x,y)
#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define REPS(i,n) for(ll (i)=1;(i)<=(n);(i)++)
#define RREP(i,n) for(ll (i)=(n-1);(i)>=0;(i)--)
#define RREPS(i,n) for(ll (i)=(n);(i)>0;(i)--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());

template <class T = int>T in(){
    T x;
    cin >> x;
    return (x);
}

template<class T> inline void chmin(T& a, T b){
    if (a > b){
        a = b;
    }
}

template<class T> inline void chmax(T& a, T b){
    if (a < b){
        a = b;
    }
}

/* 最大公約数 */
int gcdx(int a, int b) {
    return b ? gcdx(b, a%b) : a;
}


signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(10);
    int N = in();
    vector<int> A(N);
    vector<int> mae(N);
    vector<int> ushi(N);
    REP(i,N)A[i] = in();
    REP(i,N){
        if(i == 0){
            mae[i] = A[i];
            ushi[i] = A[N-1];
        }else{
            mae[i] = gcdx(mae[i-1] , A[i]);
            ushi[i] = gcdx(ushi[i-1] , A[N-i-1]);
        }
    }
    int answer = 0;
    REP(i,N){
        if(i == 0){
            chmax(answer,ushi[N-2]);
        }else if(i == N-1){
            chmax(answer,mae[N-2]);
        }else{
            chmax(answer,gcdx(mae[i-1],ushi[N-2-i]));
        }
    }
    cout << answer << "\n";
}

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

int main(){
    int n,m;
    cin>>n>>m;
    int a[m];
    for(int i=0;i<m;i++){
        cin>>a[i];
    }
    int dp[60000]={};
    for(int i=0;i<=n;i++) dp[i]=1e9;
    dp[0]=0;

    for(int i=0;i<=n;i++){
        
        for(int j=0;j<m;j++){
            if(i-a[j]>=0){
                dp[i]=min(dp[i],dp[i-a[j]]+1);
            }
        }
    }
    cout<<dp[n]<<endl;

}


Measured memory_bytes: 3336
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#define ll long long int
#define lim 100010
#define mod 1e9+7
#define INF 1e9
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define ABS(x) ((x)>0?(x):-(x))

int main(void){
	int N;
	scanf("%d",&N);
	int a[N+1],b[N+1];
	for(int i=1;i<=N;i++){
		scanf("%d",&a[i]);
		b[i] = 0;
	}
	int M = 0;
	for(int i=N;i>0;i--){
		int sum=0;
		for(int j=2;i*j<=N;j++){
			sum += b[i*j];
		}
		if(sum%2!=a[i]){
			b[i] = 1;
			M++;
		}
	}
	
	printf("%d\n",M);
	for(int i=1;i<=N;i++){
		if(b[i]>0)printf("%d ",i);
	}
	
	return 0;
}

Measured memory_bytes: 2432
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int inf=0x3f3f3f3f;
const int MOD=1e9+7;
int a[50005],b[50005],c[50005]; 
int main()
{
	string s;
	cin>>s;
	if(s[0]==s[1]&&s[1]==s[2])
	cout<<"No"<<endl;
	else
	cout<<"Yes"<<endl;
	
}


Measured memory_bytes: 256
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        n: usize,
        m: usize,
        c: i32,
        b: [i32; m],
    };

    let mut count = 0;
    for _ in 0..n {
        input! {
            a: [i32; m],
        };

        let a: Vec<i32> = a;

        let mut sum: i32 = 0;
        for (ai, bi) in a.iter().zip(b.iter()) {
            sum += ai * bi;
        }
        sum += c;

        if sum > 0 {
            count += 1;
        }
    }

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


Measured memory_bytes: 2168
#include <iostream>
#include <cstring>
#include<vector>
#include <algorithm>
#include<cstdlib>
#include<set>
#include<math.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;i++)

int main()
{
	int n, d;
	cin >> n >> d;
	int ans;
	ans = (n - n % (2 * d + 1)) / (2 * d + 1);
  if(n%(2*d+1)!=0) ans++;
    cout << ans << "\n";
	return 0;
}

Measured memory_bytes: 3624
#![allow(unused_imports)]
use std::cmp::*;
use std::collections::*;
use itertools::Itertools;
use num::clamp;
use proconio::{input, marker::*, fastout};
use superslice::*;

#[fastout()]
fn main() {
    input! {
        h: usize, w: usize, d: usize,
        a: [[usize; w]; h],
        q: usize,
        lr: [(usize, usize); q],
    }

    let mut i2pos = vec![(0, 0); h*w + 1];
    for y in 0..h {
        for x in 0..w {
            let i = a[y][x];
            i2pos[i] = (x as i64, y as i64);
        }
    }

    let mut cost = vec![vec![0; h*w + 1]; 20];
    for i in 1..=h*w - d{ 
        let (x1, y1) = i2pos[i];
        let (x2, y2) = i2pos[i+d];
        cost[0][i] = (x1 - x2).abs() + (y1 - y2).abs();
    }

    for exp in 1..cost.len() {
        let factor = min(h*w, (1<<exp) * d);
        for i in 1..=h*w - factor {
            cost[exp][i] = cost[exp-1][i] + cost[exp-1][i+factor/2];
        }
    }

    for (mut l, r) in lr {
        let mut count = (r - l) / d;
        let mut ans = 0;
        let mut exp = 0;
        while count > 0 {
            while count % 2 == 0 {
                exp += 1;
                count /= 2;
            }
            ans += cost[exp][l];
            l += (1<<exp) * d;
            count -= 1;
        }
        println!("{}", ans);
    }
}


Measured memory_bytes: 20848
a, b, k = map(int, input().split())
if b - a + 1 >= 2 * k:
    for i in range(k):
        print(a + i)
    for i in range(k):
        print(b - k  + 1 + i)
else:
    for i in range(a, b + 1):
        print(i)

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

using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod= int(1e9)+7;
using P = pair<ll,ll>;
using ld=long double;

int main(){
   string s,t;
   cin >>s>>t;
   cout <<t+s<<endl;
    return 0;
}

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

int main() {
    unordered_map<string, int> c;

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

    int m;
    cin >> m;
    for (int i = 0; i < m; i++) {
        string s;
        cin >> s;
        c[s]--;
    }

    int max = 0;
    for (auto& itr : c) {
        if (max < itr.second) {
            max = itr.second;
        }
    }
    cout << max;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define pp pop_back
#define in insert
#define ff first
#define ss second
#define e endl
#define MOD 998244353
int main()
{
    ll n,i,ans=0;
    cin>>n;
    if(n%2==1)
        cout<<0<<e;
    else
    {
        for(i=10;i<=1000000000000000000;i*=5)
            ans+=n/i;
        cout<<ans<<e;



    }

}


Measured memory_bytes: 256
from pprint import pprint as pp
import collections
import math

n,h = map(int, input().split())

a_l = []
b_l = []
for _ in range(n):
  ab = list(map(int, input().split()))
  a_l.append(ab[0])
  b_l.append(ab[1])
a = max(a_l)
b_l = sorted(b_l)

i = 0
while h > 0:
  if b_l and b_l[-1] > a:
    h -= b_l.pop()
    i += 1
  else:
    i += math.ceil(h / a)
    break
print(i)

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

typedef long long int ll; 
#define MOD 1000000007
#define ON 200000
#define rep(i,n) fp(i,0,n)  
#define fp(i,a,b) for(ll i=(a);i<(b);++i)
#define fn(i,a,b) for(ll i=(a);i>(b);i--)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define FF first
#define SS second
typedef pair<ll, ll> pll; 
typedef vector<pll> vpll;
typedef vector<ll> vll;
#define rs(t) string t;cin>>t
#define ri(t) int t;cin>>t
#define rll(t) long long int t;cin>>t
#define MK make_pair
#define PB push_back
#define PO pop_back
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
///// This part below is only for debug, not used /////
template<typename T> ostream &operator<<(ostream &os, const vector<T> &vec){ os << "["; for (auto v : vec) os << v << ","; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const deque<T> &vec){ os << "deq["; for (auto v : vec) os << v << ","; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const set<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_set<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa){ os << "(" << pa.first << "," << pa.second << ")"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }
#define dbg(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ") " << __FILE__ << endl;
///// END /////



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

  vll v(m);
  cin >> v;

  ll ma = 0;
  rep(i,m){
  	ma += v[i];
  }	

  if(ma>n){
  	cout << -1 << endl;
  }
  else{
  	cout << n - ma << endl;
  }
  return 0;
  
}

Measured memory_bytes: 3740
#include<stdio.h>

int main(){
    int num1;
    int num2;
    int num3;
    int num4;

    char buf[256];
    fgets(buf,256,stdin);
    sscanf(buf,"%d %d %d",&num1,&num2,&num3);

    num4 = (num3)/num1 * num2;
    printf("%d\n",num4);

}

Measured memory_bytes: 128
#include<atcoder/all>
using namespace atcoder;

#include<bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

LL RSQ_e() { return 0; }
LL RSQ_up(LL a, LL b) { return a + b; }
using RSQ = segtree<LL, RSQ_up, RSQ_e>;

int main() {
    int N, Q; scanf("%d%d", &N, &Q);
    vector<LL> A(N); rep(i, N) { int a; scanf("%d", &a); A[i] = a; }
    RSQ G(A);

    rep(q, Q) {
        int c; scanf("%d", &c);
        if (c == 0) {
            int p, x; scanf("%d%d", &p, &x);
            G.set(p, G.get(p) + x);
        }
        if (c == 1) {
            int l, r; scanf("%d%d", &l, &r);
            printf("%lld\n", G.prod(l,r));
        }
    }

    return 0;
}

Measured memory_bytes: 16392
import java.util.*;

@SuppressWarnings("unchecked")
public class Main {
	// public static void printArray(int[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	public static String joinInt(int[] a, String separator) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < a.length; i++) {
			if (i > 0) {
				sb.append(separator);
			}
			sb.append(a[i]);
		}
		return sb.toString();		
	}

	static int[] nextIntArray(Scanner sc, int N) {
		int[] arr = new int[N];
		for (int i = 0; i < N; i++) {
			arr[i] = sc.nextInt();
		}
		return arr;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] h = nextIntArray(sc, N);
		int[] dp = new int[N];
		dp[1] = Math.abs(h[0] - h[1]);
		for (int i = 2; i < N; i++) {
			dp[i] = Math.min(
				dp[i-1] + Math.abs(h[i] - h[i-1]),
				dp[i-2] + Math.abs(h[i] - h[i-2]));
		}
		System.out.println(dp[N-1]);
	}
}


Measured memory_bytes: 50672