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

//--MAIN-----------------------------------
void Main() {
    ll N,Q; cin>>N>>Q;
    string S; cin>>S;
    vector<char> t(Q);
    vector<char> d(Q);

    rep(i,Q){
        cin>>t[i]>>d[i];
    }

    /*bis*/ ll low= -1 , high= N ; // min-1, max+1
    while( abs(high-low)>1 ){ ll mid=(high+low)/2;
        ll now=mid;
        bool flag=true;
        rep(i,Q){
            if(S[now]==t[i]){
                if(d[i]=='L') --now;
                else ++now;
            }
            if(now==N){
                break;
            }
            if(now==-1){
                flag =false; break;
            }
        }

        ( flag ? high : low ) = mid;
    }// if ok, okdir = mid

    /*bis*/ ll low2= -1 , high2= N ; // min-1, max+1
    while( abs(high2-low2)>1 ){ ll mid=(high2+low2)/2;
        ll now=mid;
        bool flag=true;
        rep(i,Q){
            if(S[now]==t[i]){
                if(d[i]=='L') --now;
                else ++now;
            }
            if(now==N){
                flag =false; break;
            }
            if(now==-1){
                break;
            }
        }

        ( flag ? low2 : high2 ) = mid;
    }// if ok, okdir = mid

    cout<< low2-high+1<<"\n";

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


Measured memory_bytes: 976
N = int(input())
W = list(int(i) for i in input().split())


for T in range(N-1):
  S1 = 0
  S2 = 0
  S  = 0
  for i in range(T+1):
    S1 += W[i]
  for j in range(T+1,N):
    S2 += W[j]
  
  S = abs(S1-S2)
  
  if T==0:
   	Smin = S
  
  if Smin > S:
    Smin = S
    
print(Smin)

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<db, db> pdd;


const int maxn = 1e5+5;
const int Mod=1000000007;
const int INF = 0x3f3f3f3f;
const ll LL_INF = 0x3f3f3f3f3f3f3f3f;
const double e=exp(1);
const db PI = acos(-1);
const db ERR = 1e-10;

int main()
{
	int n;
	scanf("%d", &n);
	int a[n], b[n], c[n];
	for(int i = 0; i < n; i++)
		scanf("%d %d %d",&a[i], &b[i], &c[i]);
	int dp[n + 1][3];
	dp[0][0] = 0;
	dp[0][1] = 0;
	dp[0][2] = 0;

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

	}
	cout << max(dp[n][0], max(dp[n][1], dp[n][2]));



	return 0;
}

Measured memory_bytes: 2560
#include <cstdio>
#include <algorithm>
#include <string>
#include <map>
using namespace std;

int N; char S[12];

int main()
{
	scanf ("%d", &N);
	map<string, int> cnt;
	long long ans = 0;
	while (N--){
		scanf ("%s", S);
		sort(S, S + 10);
		ans += cnt[S]++;
	}
	printf ("%lld\n", ans);
	return 0;
}

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

using namespace std;

int main() {
    int N;
    vector<int> nums;
    cin >> N;
    for (int i = 0; i < N; i++) {
        int inp;
        cin >> inp;
        nums.push_back(inp);
    }
    int count = 0;
    sort(nums.begin(), nums.end());
    for (int i = 2; i < N; i++) {
        int left = 0;
        int right = i - 1;
        while (left != right) {
            if (nums[i] < nums[left] + nums[right]) {
                count += right - left;
                right--;
            } else {
                left++;
            }
        }
    }
    cout << count << endl;
}

Measured memory_bytes: 256
import math

N, D = map(int, input().split())
X = []
for i in range(N):
    X.append(list(map(int, input().split())))

count = 0
for i in range(N):
    for j in range(i+1, N):
        total = 0
        for k in range(D):
            total = total + (X[i][k] - X[j][k]) ** 2
        if (math.sqrt(total) == round(math.sqrt(total))):
            count += 1
print(count)


Measured memory_bytes: 3064
line = input()
x, k = line.split(" ")

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

ans = Base_10_to_n(int(x), int(k))
str_num = str(ans)
print(len(str_num))

Measured memory_bytes: 3060
#include<stdio.h>
int R,r;
char s[111];
int main(){
	scanf("%*d%s",s);
	for(int i=0; s[i]; i++)
		if(s[i] == ')'){
			if(r==0)R++;else
				r--;
		}else
			r++;
	for(int i=0; i<R; i++)printf("(");
	printf("%s",s);
	for(int i=0; i<r; i++)printf(")");
	return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<numeric>
#include<map>
#include<unordered_map>
#include<queue>
#include<deque>
 
using namespace std;
using ll=long long;
#define rep(i,n)  for(ll i=0;i<n;++i)
#define all_map(itr,mp) for(auto itr=mp.begin();itr!=mp.end();itr++)
#define ALL(a) (a).begin(),(a).end()
 
int main(){
    ll a[5];
    rep(i, 5)cin >> a[i];
    ll k;
    cin >> k;

    rep(i, 5){
        rep(j, 5)if(abs(a[i]-a[j]) > k){
            cout << ":(" << endl;
            return 0;
        }
    }
    cout << "Yay!"  << endl;
}

Measured memory_bytes: 256
package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a)
	fmt.Scan(&b)
	answer := (a * b) / gcd(a, b)
	fmt.Println(answer)
}

func gcd(x, y int) int {
	for y != 0 {
		r := x % y
		x = y
		y = r
	}
	return x
}


Measured memory_bytes: 512
import math
X=int(input())
a=pow(10,9)
c=math.ceil(a**0.3)
answers=[]
for a in range(-c,c+1):
    for b in range(-c,c+1):
        if pow(a,5)-pow(b,5)==X:
            answers.append(a)
            answers.append(b)
            break
print(answers[0],answers[1])


Measured memory_bytes: 65996
#include<iostream>
#include<vector>
#include<string>
#include<math.h>
#include<algorithm>
typedef long long LL;
typedef unsigned long long ULL;
using namespace std;

int main() {
	LL r, D, r2000, ans = 0, num = 0;
	cin >> r >> D >> r2000;
	num = r2000;
	for (int i = 0; i < 10; i++) {
		ans = r * num - D;
		cout << ans << endl;
		num = ans;
	}

	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef vector<int>V;
typedef priority_queue<int,V>PQ;
int main(void){
	int n,q;
	int i;
	int com,m,x;
	int ans;
	PQ que[1001];
	cin>>n>>q;
	for(i=0;i<q;i++){
		cin>>com;
		if(com==0){
			cin>>m>>x;
			que[m].push(x);
		}
		else if(com==1){
			cin>>m;
			if(!que[m].empty()){
				ans=que[m].top();
				cout<<ans<<endl;
			}
		}
		else{
			cin>>m;
			if(!que[m].empty()){
				que[m].pop();
			}
		}
	}
	return 0;
}
	


Measured memory_bytes: 4024
#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool isev(string &s,ll x)
{
    if(x&1) return 0;
    for(int i=0;i<x/2;i++)
    {
        if(s[i]!=s[x/2+i])
        {
            return 0;
        }
    }
    return 1;
}
int main()
{
    string s;
    cin>>s;
    ll n=s.size();
    n--;
    while(isev(s,n)==0)
    {
        n--;
    }
    cout<<n<<endl;

}


Measured memory_bytes: 3596
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    REP(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    REP(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

int main()
{
	int N = inputValue();
	int K = inputValue();
	int A[2000];
	int L[2000];
	int R[2000];
	
	REP(i, N){
		A[i] = inputValue();
		L[i] = 0;
		R[i] = 0;
	}
	REP(i, N-1){
		FOR(j, i+1, N){
			if(A[i] > A[j]){
				R[i]++;
			}
			else if(A[i] < A[j]){
				L[j]++;
			}
		}
	}
	ll a = 0;
	REP(i, N){
        ll nk = (long long)K * (K-1);
        nk = (nk / 2) % (1000000000 + 7);
		ll s = nk * (L[i] + R[i]) + (long long)K * R[i];
		a += s;
		a = a % (1000000000 + 7);
	}
	
	cout << a << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define pi 3.141592653589793238
#define int long long
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;



signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);  
cout.tie(0);   

#ifndef ONLINE_JUDGE
    if(fopen("INPUT.txt","r"))
    {
    freopen ("INPUT.txt" , "r" , stdin);
    freopen ("OUTPUT.txt" , "w" , stdout);
    }
#endif  

    int x,y;
    cin>>x>>y;
    for(int i=0;i<=x;i++)
    {
        int z=i*2+(x-i)*4;
        if(z==y)
        {
            cout<<"Yes";
            return 0;
        }
    }
    cout<<"No";
} 

 


Measured memory_bytes: 3652
#include <bits/stdc++.h>
 
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
 
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)
 
#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define bit(n) (1LL<<(n))
 
// #define DEBUG
 
#ifdef DEBUG
    #define dump(...) fprintf(stderr, __VA_ARGS__)
#else
    #define dump(...)
#endif
 
template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}
 
using namespace std;
using ll=long long;
using vi=vector<int>;
using vll=vector<ll>;
 
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int inf = INT_MAX;
const ll INF = LLONG_MAX;
const ll MOD = 1000000007LL;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
 
ll extgcd(ll a,ll b,ll& x,ll& y){x=1,y=0;ll g=a;if(b!=0) g=extgcd(b,a%b,y,x),y-=a/b*x;return g;}
ll ADD(const ll &a, const ll &b, const ll mod=MOD) { return (a+b)%mod;}
ll SUB(const ll &a, const ll &b, const ll mod=MOD) { return (a-b+mod)%mod;}
ll MUL(const ll &a, const ll &b, const ll mod=MOD) { return (1LL*a*b)%mod;}
ll DIV(const ll &a, const ll &b, const ll mod=MOD) {ll x,y; extgcd(b,mod,x,y);return MUL(a,(x+mod)%mod,mod);}
 
int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n; cin >> n;
    vll hist(n);
    vi a(n); for(auto& e : a) cin >> e, e--, hist[e]++;

    ll B = 0LL;
    for(auto& e : hist){
        B += e * (e - 1) / 2;
    }

    for(auto& e : a){
        ll res = B - hist[e] * (hist[e] - 1) / 2;
        res += (hist[e] - 1) * (hist[e] - 2) / 2;
        cout << res << endl;
    }

    return 0;
}


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

using namespace std;

int main()
{
	int K, A, B;
	cin >> K >> A >> B;

	for (int i = A; i <= B; i++) {
		if (i % K == 0) {
			cout << "OK" << endl;
			return 0;
		}
	}

	cout << "NG" << endl;
	return 0;
}


Measured memory_bytes: 3576
//#pragma GCC optimize("-Ofast","unroll-loops","omit-frame-pointer","inline") //Optimization flags
//#pragma GCC option("arch=native","tune=native","no-zero-upper") //Enable AVX
//#pragma GCC target("avx2")  //Enable AVX
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
//order_of_key(x) : number of items less than x
//find_by_order(x) : iterator to x

#define mem(dp,a)           memset(dp,a,sizeof dp)
#define rep(i,a,b)          for(ll i=a;i<b;i++)
#define pb(x)               push_back(x)
#define mp(x,y)             make_pair(x,y)
#define fastio              ios_base::sync_with_stdio(false);cin.tie(NULL)
#define F                   first
#define S                   second
#define all(v)              (v).begin(),(v).end()

const ld pi=3.14159265359;
ll INF=1e18+10;
ll MOD=998244353;
ll mod=1e9+7;

inline ll add(ll a,ll b,ll m){
    if((a+b)>=m)return (a+b)%m;
    return a+b;
}

inline ll mul(ll a,ll b,ll m){
    if((a*b)<m)return a*b;
    return (a*b)%m;
}

int main(){
    ll n;cin>>n;
    string ans="";
    while(n>0){
        ans+=('a'+(n%26+25)%26);
        n=(n+26-1)/26;n--;
    }
    reverse(all(ans));
    cout<<ans;
}


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

int main() {
  int a,b,c,d,e,k;
  cin>>a>>b>>c>>d>>e>>k;
  if(e-a<=k){
    cout<<"Yay!"<<endl;
  }else{
    cout<<":("<<endl;
  }
}

Measured memory_bytes: 256
#include<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
#include<cassert>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
//問題文および制約はちゃんと確認しよう！
//サイズは10^5じゃなくて2×10^5とかかもしれないし、重要な制約・条件を見落としているかも
//とりあえずサンプルを読んでから解法を考えよう？
int main()
{
	int a,s=0,s2=0,mx=0;
	rep(i,5){
		cin>>a;
		s+=a;
		int mo=a%10;mo=10-mo;mo%=10;
		s2+=mo;mx=max(mx,mo);
	}
	cout<<s+s2-mx<<endl;
}


Measured memory_bytes: 256
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


h,w,n = list(map(int, input().split()))
h -= 1
w -= 1
rc = [None]*n
for i in range(n):
    rc[i] = tuple(map(lambda x: int(x)-1, input().split()))
rc.sort()

M = 10**9+7 # 出力の制限
N = h+w+10 # 必要なテーブルサイズ

g1 = [None] * (N+1) # 元テーブル
g2 = [None] * (N+1) #逆元テーブル
inverse = [None] * (N+1) #逆元テーブル計算用テーブル
g1[0] = g1[1] = g2[0] = g2[1] = 1
inverse[0], inverse[1] = [0, 1] 

for i in range( 2, N + 1 ):
    g1[i] = ( g1[i-1] * i ) % M 
    inverse[i] = ( -inverse[M % i] * (M//i) ) % M # ai+b==0 mod M <=> i==-b*a^(-1) <=> i^(-1)==-b^(-1)*aより
    g2[i] = (g2[i-1] * inverse[i]) % M 

def cmb(n, r, M):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return (g1[n] * g2[r] * g2[n-r]) % M

dp = [0]*(n) # iに初めてぶつかり、ゴールまで移動する
def f(x,y):
    return cmb(x+y, x, M)
for i in range(n):
    r,c = rc[i]
    val = f(r,c)
    for j in range(i):
        val -= dp[j]*f(r-rc[j][0], c-rc[j][1])
        val %= M
    dp[i] = val
ans = 0
for i in range(n):
    r,c = rc[i]
    ans += dp[i] * f(h-r, w-c)
    ans %= M
ans = f(h,w) - ans
ans %= M
print(ans%M)

Measured memory_bytes: 83916
import java.util.*;
import java.io.*;
import java.math.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        FastScanner sc = new FastScanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        long n = sc.nextLong();
        HashMap<Long,Integer> map = getPrimeFactorizationMap(n);
        ArrayList<Integer> li = new ArrayList<Integer>();
        for(Map.Entry<Long,Integer> e : map.entrySet()){
            li.add(e.getValue());
        }
        long ans = 0;
        Integer[] arr = li.toArray(new Integer[li.size()]);
        for(int i = 0; i < arr.length; i++){
            for(int j = 1 ;; j++){
                if(arr[i] >= j){
                    arr[i] -= j;
                    ans++;
                }else{
                    break;
                }
            }
        }
        out.println(ans);
        out.close();
    }
    
    static HashMap<Long,Integer> getPrimeFactorizationMap(long x) {
        HashMap<Long,Integer> result = new HashMap<Long,Integer>();
        int cnt = 0;
        while (x >= 2L && x % 2L == 0) {
            cnt++;
            x /= 2;
        }
        if(cnt > 0){
            result.put(2L,cnt);
            cnt = 0;
        }
        long d = 3;
        long q = x / d;
        while (q >= d) {
            cnt = 0;
            while (x % d == 0) {
                cnt++;
                x /= d;
            }
            if(cnt > 0){
                result.put(d,cnt);
            }
            d += 2;
            q = x / d;
        }
        if(x != 1){
            result.put(x,result.getOrDefault(x,0)+1);
            //result.put(x,1);
        }
        
        return result;
    }
}

class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;
    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

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

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken("\n");
    }

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

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

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

    public int[] nextIntArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    } 
}


Measured memory_bytes: 26068
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());

            for(int x = 1; x <= n; ++x)
            {
                if (x % 3 == 0 || x % 10 == 3 || x.ToString().Contains("3"))
                {
                    Console.Write(" {0}", x);
                }
            }

            Console.WriteLine();

        }
    }
}

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

void solve()
{
	int x;
	cin >> x;

	if(x >= 30)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}

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

	solve();
	return 0;
}


Measured memory_bytes: 3632
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif




#define int long long
#define rng(i,l,r) for(size_t i=(l);i<(r);++i)
#define rep(i,n) rng(i,0,n)
#define gnr(i,l,r) for(size_t i=(r)-1;i>=(l);i--)
#define per(i,b) gnr(i,0,b)
#define ALL(obj) (obj).begin(), (obj).end()   //1,2,3,...
#define rALL(obj) (obj).rbegin(), (obj).rend()//...,3,2,1

using namespace std;
//using ll = long long;


const int MOD = 1000000007;
const int INF = 1e18;

const int dx4[4] = {1, 0, -1, 0};
const int dy4[4] = {0, 1, 0, -1};
const int dx8[8] = {1,1,0,-1,-1,-1,0,1};
const int dy8[8] = {0,1,1,1,0,-1,-1,-1};

const double pi = acos(-1);



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


using Graph = vector<vector<int>>;
int gcd(int a,int b){return b?gcd(b,a%b):a;}
//*max_element(ALL(vector))
//count(ALL(vector),num) -> n




void solve(){
    
    // remove the bottom 3 lines when you submit this code.
    std::ifstream in("sample.txt");
    std::cin.rdbuf(in.rdbuf());

    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int x; cin >> x;
    cout << x*x*x << endl;
}



signed main() {
    solve();
    return 0;
}




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

int main() {
  string s;
  int k=0;
  int a,b,c;
  int min =999;
  cin >> s;
  for(int i =0;i<s.size() -2;i++){
    a = (int)s[i];
    b = (int)s[i+1];
    c = (int)s[i+2];
    k = (a-48)*100 + (b-48)*10 + (c-48);
    if(abs(k - 753)<min) min = abs(k - 753);
   }
  cout << min << endl;
  return 0;
}


Measured memory_bytes: 256
/*																													   
 Templatka c++ Kacper Fis																							   																											   //
*/																													  
																								   
#include <bits/stdc++.h>																							   
																													   
using namespace std; 																								   
																													   
const int INF = 1000000001;																						   
const float PI = 3.14;																								   
typedef long long LL;																								   
																													   
typedef vector<int> vi;																								   
typedef list<int> li;																								   
typedef queue<int> qi; 																								   
typedef pair<int,int> ii; 																							   
typedef map<string,int> msi; //np msi['nazwa'] = 'liczba'															   
typedef vector<ii> vii; //vector par<int>, do tworzenia tablicy dla grafów wagowych #dijkstra #Bellman_Ford			   
typedef priority_queue< ii, vector<ii>, greater<ii> > pq; //kolejka priorytetowa vectorów par(top()=min) #dijkstra	   
																													   																				   
vector<ii>::iterator iter;																							   
																													   																				   
#define print_list(x) for(it = (x).begin(); it != (x).end(); it++) {cout << *it << " ";}							   
#define print_vector(x) for(it2 = (x).begin(); it2 != (x).end(); it2++) {cout << *it2 << " ";}						   
#define search_list(x) for(it = (x).begin(); it != (x).end(); it++)													   
#define search_vector(x) for(it2 = (x).begin(); it2 != (x).end(); it2++);											   
#define pb(x) push_back(x) 																							   
#define pf(x) push_front(x)																							   
#define mp(x, y) make_pair(x, y)                                                                                       
///////////////////////////////////////////////GLOBAL DEFINITIONS////////////////////////////////////////////////////////


///////////////////////////////////////////////////FUNCTIONS/////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////MAIN////////////////////////////////////////////////////////////////
int main(int argc, char* argv[])																					 
{ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);                  												       
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    
	LL l, r;
	cin >> l >> r;
	
	LL mini = INF;
	if((r-l) > 2019){
		for(LL i = l; i <= (l + 2019); i++){
			for(LL j = l; j <= (l + 2019); j++){
				if(i != j)
				{
					if(((i * j) % 2019) < mini)
						mini = ((i * j) % 2019);
				}
			}
		}
		cout << mini << endl;
	}
	else{
		for(LL i = l; i <= r; i++){
			for(LL j = l; j <= r; j++){
				if(i != j)
				{
					if(((i * j) % 2019) < mini)
						mini = ((i * j) % 2019);
				}
			}
		}
		cout << mini << endl;
	}
	

	
	
	
	
	
	
	
	return 0;
}


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

int main()
{
    int a[3];
    for(int i = 0;i < 3;i++)
        scanf("%d",&a[i]);
    sort(a,a + 3);
    int ans = a[1] - a[0] + a[2] - a[1];
    printf("%d\n",ans);
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<int(n);i++)
#define FOR(i,n,m) for(int i=n;i<int(m);i++)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;

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

int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a*b/gcd(a,b);}	

const ll mod=1e9+7;
const int INF=INT_MAX/2;
const int N_MAX=100010;

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



Measured memory_bytes: 256
#include <stdio.h>

typedef struct { char suit, value; } Card;

void bubble(Card A[], int N) {
  int i,j;
  Card t;
  for(i = 0; i<N; i++) {
    for(j = N-1; j >= i; j--) {
      if(A[j].value < A[j-1].value) {
        t = A[j]; A[j] = A[j-1]; A[j-1] = t;
      }
    }
  }
}

void selection(Card A[], int N) {
  int i,j,minj;
  Card t;
  for(i=0;i<N;i++) {
    minj = i;
    for(j=i; j<N; j++) {
      if(A[j].value < A[minj].value) minj = j;
    }
    t = A[i]; A[i] = A[minj]; A[minj] = t;
  }
}

void print(Card A[], int N) {
  int i;
  for(i=0; i<N; i++) {
    if(i>0) printf(" ");
      printf("%c%d",A[i].suit,A[i].value);
  }
  printf("\n");
}

int isStable(Card C1[], Card C2[], int N) {
  int i;
  for(i=0; i<N; i++) {
    if(C1[i].suit != C2[i].suit) return 0;
  }
  return 1;
}

/* オリジナル関数を追加 */
void str2Card(Card *t,char str[]) {
    t->suit  = str[0];
    t->value = str[1] - '0';
}

int main(void) {
  Card C1[100], C2[100];
  int N,i;
  char str[3];

  scanf("%d",&N);
  for(i=0;i<N; i++) {
    scanf("%s",str);
    str2Card(&C1[i],str);
  }

  for(i=0; i<N; i++) C2[i] = C1[i];

  bubble(C1,N);
  selection(C2,N);

  print(C1,N);
  printf("Stable\n");
  print(C2,N);
  if(isStable(C1,C2,N)) {
    printf("Stable\n");
  } else {
    printf("Not stable\n");
  }

  return 0;
}




Measured memory_bytes: 2048
fn main() {
    let (r, w) = (std::io::stdin(), std::io::stdout());
    let mut sc = IO::new(r.lock(), w.lock());
    let n: usize = sc.read();
    let q: usize = sc.read();

    let mut uf = UnionFind::new(n);
    for _ in 0..q {
        let t: usize = sc.read();
        let u: usize = sc.read();
        let v: usize = sc.read();
        if t == 0 {
            uf.unite(u, v);
        } else {
            if uf.find(u) == uf.find(v) {
                sc.write(1);
            } else {
                sc.write(0);
            }
            sc.write('\n');
        }
    }
}
pub struct UnionFind {
    parent: Vec<usize>,
    sizes: Vec<usize>,
    size: usize,
}

impl UnionFind {
    pub fn new(n: usize) -> UnionFind {
        UnionFind {
            parent: (0..n).map(|i| i).collect::<Vec<usize>>(),
            sizes: vec![1; n],
            size: n,
        }
    }

    pub fn find(&mut self, x: usize) -> usize {
        if x == self.parent[x] {
            x
        } else {
            let px = self.parent[x];
            self.parent[x] = self.find(px);
            self.parent[x]
        }
    }

    pub fn unite(&mut self, x: usize, y: usize) -> bool {
        let parent_x = self.find(x);
        let parent_y = self.find(y);
        if parent_x == parent_y {
            return false;
        }

        let (large, small) = if self.sizes[parent_x] < self.sizes[parent_y] {
            (parent_y, parent_x)
        } else {
            (parent_x, parent_y)
        };

        self.parent[small] = large;
        self.sizes[large] += self.sizes[small];
        self.sizes[small] = 0;
        self.size -= 1;
        true
    }
}

pub struct IO<R, W: std::io::Write>(R, std::io::BufWriter<W>);

impl<R: std::io::Read, W: std::io::Write> IO<R, W> {
    pub fn new(r: R, w: W) -> Self {
        Self(r, std::io::BufWriter::new(w))
    }
    pub fn write<S: ToString>(&mut self, s: S) {
        use std::io::Write;
        self.1.write_all(s.to_string().as_bytes()).unwrap();
    }
    pub fn read<T: std::str::FromStr>(&mut self) -> T {
        use std::io::Read;
        let buf = self
            .0
            .by_ref()
            .bytes()
            .map(|b| b.unwrap())
            .skip_while(|&b| b == b' ' || b == b'\n' || b == b'\r' || b == b'\t')
            .take_while(|&b| b != b' ' && b != b'\n' && b != b'\r' && b != b'\t')
            .collect::<Vec<_>>();
        unsafe { std::str::from_utf8_unchecked(&buf) }
            .parse()
            .ok()
            .expect("Parse error.")
    }
    pub fn vec<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read()).collect()
    }
    pub fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}


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

int main(){
	vector<int> A, V;
	int n, hi;
	scanf("%d", &n);
	for (int i = 0; i < n; i++){
		scanf("%d", &hi);
		A.push_back(hi);
	}
	V.push_back(0);
	V.push_back(abs(A[0] - A[1]));
	for (int i = 2; i < n; i++){
		V.push_back(min(V[i-1]+abs(A[i] - A[i-1]), V[i-2]+abs(A[i] - A[i-2])));
	}
	printf("%d\n", V[n-1]);
	return 0;
}

Measured memory_bytes: 4320
#include <iostream> // cout, endl, cin
#include <cmath> //sqrt pow
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // dequef
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower

#define rep(i,n) for(int i = 0; i < n; i++)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define all(a) (a).begin(), (a).end()
#define mod 1000000007
using ll = long long;
using namespace std;
int main(){
  ll n,k;
  cin >> n >> k;
  vector<ll> x(n), y(n);
  vector<ll> defx(n), defy(n);
  rep(i, n){
    cin >> x[i] >> y[i];
    defx[i] = x[i];
    defy[i] = y[i];
  }
  sort(all(x)); sort(all(y));
  ll ans = (x[n - 1] - x[0]) * (y[n - 1] - y[0]);
  rep(dx, n){
    for(ll ddx = dx; ddx < n; ddx++){
      rep(dy, n){
        for(ll ddy = dy; ddy < n; ddy++){
          ll num = 0;
          rep(i, n){
            if(x[dx] <= defx[i] && x[ddx] >= defx[i] && y[dy] <= defy[i] && y[ddy] >= defy[i]) num++;
          }
          if(num >= k) ans = min(ans, (x[ddx] - x[dx]) * (y[ddy] - y[dy]));
        }
      }
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const double PI=acos(-1.0);
#define t1(x)             cerr<<#x<<"="<<x<<endl
#define t2(x, y)          cerr<<#x<<"="<<x<<" "<<#y<<"="<<y<<endl
#define t3(x, y, z)       cerr<<#x<<"=" <<x<<" "<<#y<<"="<<y<<" "<<#z<<"="<<z<<endl
#define t4(a,b,c,d)       cerr<<#a<<"="<<a<<" "<<#b<<"="<<b<<" "<<#c<<"="<<c<<" "<<#d<<"="<<d<<endl
#define t5(a,b,c,d,e)     cerr<<#a<<"="<<a<<" "<<#b<<"="<<b<<" "<<#c<<"="<<c<<" "<<#d<<"="<<d<<" "<<#e<<"="<<e<<endl
#define t6(a,b,c,d,e,f)   cerr<<#a<<"="<<a<<" "<<#b<<"="<<b<<" "<<#c<<"="<<c<<" "<<#d<<"="<<d<<" "<<#e<<"="<<e<<" "<<#f<<"="<<f<<endl
#define GET_MACRO(_1,_2,_3,_4,_5,_6,NAME,...) NAME
#define t(...) GET_MACRO(__VA_ARGS__,t6,t5, t4, t3, t2, t1)(__VA_ARGS__)
//freopen("output.txt","w",stdout);
//freopen("input.txt","r",stdin);
/*-------------------------------------------------------------------------------------------------------------------------------------*/
#define MOD 1000000007
#define endl "\n" 
#define int long long // remove when constraints are tight.
#define inf 1e18
#define ld long double
/*-------------------------------------------------------------------------------------------------------------------------------------*/

int32_t main()
{
	ios::sync_with_stdio(0);cin.tie(0);
	int n,k;
	cin>>n>>k;
	int cnt=0;
	while(n>0)
	{
		n/=k;
		cnt++;
	}
	cout<<cnt<<endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 3e5 + 10;
const int MOD = 1e9 + 7;
ll d[N];
int main() {
    ll ans = 0;
    string s;
    cin >> s;
    d[0] = 1;
    for(int i = 1; i < N; i++) d[i] = d[i-1]*3%MOD;
    int n = s.length();
    ll p = 1;
    for(int i = 0; i < n; i++) {
        if(s[i] == '1') {
            ans += p*d[n-i-1]%MOD;
            ans %= MOD;
            p = p*2%MOD;
        }
    }
    ans += p;
    ans %= MOD;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 2816
#include<bits/stdc++.h>
#include<iomanip>
#define C char
#define D double
#define F float
#define LL long long
#define ULLI unsigned long long int
#define LLI long long int
#define LLD long long double
#define LD long double
#define S string
#define PI (2.0*acos(0.0))
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define READ 		freopen("input.txt","r",stdin)
#define WRITE  		freopen("output.txt","w",stdout)
using namespace std;
int main()
{
    IOS;
    int t,sum=0;
    cin>>t;

    string s;
    cin>>s;

    if((t%2)==1)
        cout<<"No"<<endl;
    else
    {
    char brr[t+1],arr[t+1];
    int j=0;

    for(int i=0;i<t/2;i++)
        arr[i]=s[i];

    for(int i=t/2;i<t;i++)
        {
            brr[j]=s[i];
            j++;
        }
    for(int i=0;i<t/2;i++)
    {
        if(arr[i]==brr[i])
            sum++;
        else
            break;
    }
    if(sum==t/2)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;

    }
    return 0;
}


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

public class Main {
    public static void main(String args[]) throws Exception{
        BufferedReader stdR = new BufferedReader(new InputStreamReader(System.in));
        int N = Integer.parseInt(stdR.readLine());
        long pow = 1;
        for(int i = 1 ; i <= N ; i++) {
            pow *= i;
            pow %= 1000000007;
        }
        System.out.println(pow);
    }
}

Measured memory_bytes: 23252
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
typedef pair<int,int> P;
#define fi first
#define se second
#define all(v) (v).begin(),v.end()
set<string> c;
const ll inf=(1e18);
const ll mod=1000000007;
const ll mod2=998244353;
ll gcd(ll a,ll b) {return b ? gcd(b,a%b):a;}
ll lcm(ll c,ll d){return c/gcd(c,d)*d;}
//ios_base::sync_with_stdio(false);
//cin.tie(NULL);
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n,k;cin>>n>>k;
    vector<int> a(n);
    for(int i=0;i<n;i++)cin>>a[i];
    int sorted_p=0,cnt=0;
    for(int i=0;i<n-1;i++){
        if(a[i]<a[i+1])cnt++;
        else cnt=0;
        if(cnt==k-1)sorted_p++;
    }
    set<int> s;
    for(int i=0;i<k;i++)s.insert(a[i]);
    int ans=1;
    for(int i=0;i<n-k;i++){
        ans++;
        int l=*s.begin(),r=*s.rbegin();
        if(a[i]==l&&a[i+k]>r)ans--;
        s.erase(a[i]);
        s.insert(a[i+k]);
    }
    if(sorted_p!=0)ans-=sorted_p-1;
    cout<<ans<<endl;
}


Measured memory_bytes: 10368
n = gets(chomp:true).to_i
s = [*gets.split]
gets
t = [*gets.split]

c = 0 # Sの中でTが含まれるものの個数C

t.each do |t_value| # Tの配列の数だけ繰り返す
  i = 0 # 繰り返しのカウンタ
  s[n] = t_value # Sの配列の最後にTの配列取り出した要素(番兵)を入れる
  while s[i] != t_value # Sの配列の要素と取り出したTの配列の要素(key)が一致するまでループする
    i += 1 # Sの配列の要素と取り出したTの配列の要素(key)が一致しない間は繰り返しカウンタに1を加算し続ける
  end

  # 繰り返しカウンタがnと等しくなければ、最後の番兵にたどり着かずに値が一致した証拠であるためcに加算する
  c += 1 if i != n 
end

puts c


Measured memory_bytes: 7140
#include<stdio.h>

int main(){
    int box[3];
    int num,a,b,c;
    scanf("%d %d %d",&a,&b,&c);
    
    box[0]=a;
    box[1]=b;
    box[2]=c;
    if(box[0] < box[1]){
        num = box[0];
        box[0] = box[1];
        box[1] = num;
    }
    
    if(box[1] < box[2]){
        num = box[1];
        box[1] = box[2];
        box[2] = num;
    }
    if(box[0] < box[1]){
        num = box[0];
        box[0] = box[1];
        box[1] = num;
    }
    
    printf("%d\n",box[0]*10+box[1]+box[2]);
    return 0;
}

Measured memory_bytes: 128
#include <iostream>

using namespace std;

int main()
{
	int n, m;
	
	cin >> n;	
  m = 100000;
	for (int i = 0; i < n; i++) {
		m = m * 1.05;
		if (m % 1000 != 0){
			m = m - (m % 1000) + 1000;
		}
	}

	cout << m << endl;
}

Measured memory_bytes: 2992
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(v) v.begin(), v.end()
#define mem(arr) memset(arr, 0, sizeof(arr))
#define ff first
#define ss second
#define int long long int
const int MOD = 1e9 + 7;
const int INF = 1e18;
const int N = 1e6 + 1;
vector<int> g[N];
vector<int> vis(N);
void solve(){
    string s;
    cin >> s;
    cout << (((s[0] == s[1] and s[1] == s[2]) || (s[1] == s[2] and s[2] == s[3])) ? "Yes\n" : "No\n");
}
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int tc = 1;
    while(tc--){
        solve();
    }
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcountll

#define INF 1e16
#define mod 1000000007

ll N;

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

  cin>>N;
  ll res=0;
  repl(i,1,N+1){
    string s=to_string(i);
    if(s.size()%2==1)res++;
  }
  cout<<res<<endl;

  return 0;
}


Measured memory_bytes: 256
h, w = map(int, input().split())
m = [list(map(int, input().split())) for _ in range(h)]
s = []
for i in range(h):
    for j in range(w-1):
        if m[i][j] & 1:
            s.append("{} {} {} {}".format(i+1, j+1, i+1, j+2))
            m[i][j+1] += 1
for i in range(h-1):
    if m[i][w-1] & 1:
        s.append("{} {} {} {}".format(i+1, w, i+2, w))
        m[i+1][w-1] += 1
print(len(s))
print("\n".join(s))


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

using namespace std;

typedef long long ll;

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<int> v(5);
	rep(i, 5) cin >> v[i];

	rep(i, 5){
		if(v[i] == 0){
			cout << i+1 << endl;
			exit(0);
 		}
	}
}


Measured memory_bytes: 3608
#include <stdio.h>

int main() {
	int a, b, c, max;

	scanf("%d%d%d", &a, &b, &c);
	max = 0;
	if (max < a)
		max = a;
	if (max < b)
		max = b;
	if (max < c)
		max = c;
	printf("%d\n", a + b + c - max);
	return 0;
}


Measured memory_bytes: 128
# ABC144d


def main():
    import sys
    import math
    #import numpy as np
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    a, b, x = map(int, input().split())
    if x > a*a*b/2:
        # print(np.rad2deg(np.arctan(2*(a*a*b-x)/(a*a*a))))
        print(math.degrees(math.atan(2*(a*a*b-x)/(a*a*a))))
        exit(0)
    print(math.degrees(math.atan(a*b*b/2/x)))
    # print(np.rad2deg(np.arctan(a*b*b/2/x)))


if __name__ == '__main__':
    main()

Measured memory_bytes: 38256
#include <iostream>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <stdio.h> 
#include <map>
#include <cmath>
#include <cstring>
#include <stack>
#include <queue>
#include <set>
#include <deque>
#include <sstream>
#include <vector>
#include <algorithm>

typedef long long ll;
using namespace std;

int main() {
	int k;
	cin>>k;
	int ar[32] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
	cout << ar[k-1];
	return 0;
}

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


int main() {

    string s;
    cin >> s;
    int cnt = 0;
    rep(i, 3) {
        if (s[i] == '1') ++cnt;
    }
    cout << cnt << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
    int n;
    string s;

    cin >> n;
    cin >> s;
    for(int i=0; i<s.size(); i++){
        s[i] = (s[i]-'A'+n)%26+'A';
    }

    cout << s << endl;

    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <bitset>
#include <iomanip>
#include <limits>
#include <chrono>
#include <random>
#include <array>
#include <unordered_map>
#include <functional>
#include <complex>
#include <numeric>
#include <cctype>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <utility>
#include <fstream>

using namespace std;
typedef long long ll;

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 T> T gcd(T a, T b) { a = abs(a), b = abs(b); while (b > 0) { tie(a, b) = make_pair(b, a % b); } return a; }
//mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());

constexpr long long INF = 1LL << 60;
constexpr int inf = 1000000007;
constexpr long long mod = 1000000007LL;
//constexpr long long mod = 998244353LL;

using Real = double;
using Point = complex<Real>;
const Real EPS = 1e-8;

using Points = vector<Point>;


int main()
{

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int n;
	string s; cin >> n >> s;
	if (n & 1) {
		cout << "No" << endl;
		return 0;
	}
	if (s.substr(0, n / 2) == s.substr(n / 2, n / 2)) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

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


int main() {
  string A, B; cin >> A >> B;
  int a=A.length(), b=B.length();
  vector<vector<int>> Dist(a+1, vector<int>(b+1,0));
  for (int i=0; i<=a; i++) Dist[i][0] = i;
  for (int i=0; i<=b; i++) Dist[0][i] = i;
  for (int i=0; i<a; i++) {
    for (int j=0; j<b; j++) {
      Dist[i+1][j+1]= min({Dist[i+1][j]+1,Dist[i][j+1]+1,Dist[i][j]+(A[i]!=B[j])});
    }
  }
  cout << Dist[a][b] << "\n";
}


Measured memory_bytes: 6904
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define FORD(i,a,b) for(int i=a;i>=b;i--)
#define FORL(i,x) for(int i=head[x];i;i=nxt[i])
#define ALL(a)  (a).begin(),(a).end()
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define PB push_back
#define MP make_pair
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }


int ans[1050][1050];

int main() {
  int h,w,a,b;
  cin >> h >> w >> a >> b;

  FOR(i,1,b){
    FOR(j,1,a){
      ++ans[i][j];
    }
  }

  FOR(i,b+1,h){
    FOR(j,a+1,w){
      ++ans[i][j];
    }
  }

  FOR(i,1,h){
    FOR(j,1,w){
      cout << ans[i][j];
      }
    cout << endl;
    }
  


}



Measured memory_bytes: 5376
#include "bits/stdc++.h"
using namespace std;

int main() {
        int n, k;
        cin >> n >> k;
        vector<int> a(n);
        for (int i = 0; i < n; i ++) cin >> a[i];
        sort(a.rbegin(), a.rend());
        int ans = 0;
        for (int i = 0; i < k; i ++) ans += a[i];
        cout << ans << endl;
        return 0;
}


Measured memory_bytes: 256
str = gets.chomp
iti = -1

if str.length == 2 and str[0] == str[1]
    puts "#{1} #{2}"
    
else
    (str.length-2).times do |i|
        flag = false
        s = str[i,3]
        if s.chars.uniq.size <= 2
            iti= i
            break
        end
    end
    puts iti != -1 ? "#{iti+1} #{iti+3}" : "-1 -1"  
end


Measured memory_bytes: 3836
#include<bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long
#define ull unsigned long long
#define db double
#define rep(i,a,b)    for(ll i=a;i<b;i++)
#define repn(i,a,b)   for(ll i=a;i>=b;i--)
#define F first
#define S second
#define qi queue<ll>
#define pii pair<ll,ll>
#define vi vector<ll>
#define si set<ll>
#define vii vector<pii>
#define mi multiset<ll>
#define mii multiset<pii>
#define MI map<ll,ll>
#define pb push_back
#define mp  make_pair
#define lb lower_bound
#define ub upper_bound
#define all(v) (v).begin(), (v).end()
#define allr(v) (v).rbegin(), (v).rend()
#define mod 998244353
#define mod2 998244353
 
const ll N=1e9+7;
 
int fexp(int a, int b){int ans = 1;while(b){if(b&1) ans = ans*a%mod2; b/=2;a=a*a%mod2;}return ans;}
int inverse(int a, int p){return fexp(a, p-2);}
 
ll solve(){
    
    return 0;
}
 
signed main(){
    IOS
// 	#ifndef ONLINE_JUDGE
//     	freopen("input.txt", "r", stdin);
// 		freopen("output.txt", "w", stdout);
// 	#endif
    ll n;
  cin>>n;
  vi v(n,0);
  ll m=0;
  ll ans=0;
  rep(i,0,n){
    ll b;
    cin>>b;
    if(b<m)ans+=m-b;
    m=max(m,b);
  }
  cout<<ans;
    return 0;
}
// size_t f= str.find(string s,0); find s in str from start
// if found then (f != string::npos)
// m.insert({x,y}); m[x]=y;

Measured memory_bytes: 4780