akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;


const int M_S = 305;

int dp[M_S][M_S][M_S];

string reverse ( string s ) {
  string res = "";
  for ( int i = s.length() - 1 ; i >= 0 ; i-- )
    res += s[i];
  return res;
}

int main() {
  
  string s;
  int k;
  cin >> s;
  cin >> k;
  int n = s.length();
  
  string t = reverse ( s );
  
  
  int ans = 0;
  
  memset ( dp , 0 , sizeof dp );
  
  for ( int i = 1 ; i <= n ; i++ ) {
    for ( int j = 1 ; j <= n ; j++ ) {
      for ( int v = 0 ; v <= k ; v++ ) {
        if ( i < ( n + 1 ) - j ) {
          
          // if same 
          if ( s[i-1] == t[j-1] ) {
            dp[i][j][v] = dp[i-1][j-1][v] + 2;
          }
          else {
            dp[i][j][v] = max ( dp[i][j][v] , dp[i-1][j][v] );
            dp[i][j][v] = max ( dp[i][j][v] , dp[i][j-1][v] );
            if ( v > 0 )
              dp[i][j][v] = max ( dp[i][j][v] , dp[i-1][j-1][v-1] + 2 );
          }
          
        }
        else if ( i == ( n + 1 ) - j ) {
          dp[i][j][v] = dp[i-1][j-1][v] + 1;
        }
        
        /*if ( dp[i][j][v] > 0 )
          cout << "dp[" << i << "][" << j << "][" << v << "] = " << dp[i][j][v] << endl;
        */
        ans = max ( ans , dp[i][j][v] );
      }
    }
  }
  
  cout << ans << endl;


  return 0;
}


Measured memory_bytes: 111104
//****************************//
/**********  main *************/
//****************************//
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
typedef long long ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define REP(i, n) for(i = 0; i < n; i++)
#define FOR(i, a, b) for(i = a; i < b; i++)
#define ALL(x) (x).begin(), (x).end()
#define SIZE(x) ((ll)(x).size())

double pi = 3.141592653589793;

int gcd(int a, int b) {
    if(a % b == 0) {
        return (b);
    } else {
        return (gcd(b, a % b));
    }
}

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

    int d, t, s;
    cin >> d >> t >> s;

    if(d <= t * s) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

    return 0;
}


Measured memory_bytes: 3648
#include <bits/stdc++.h>
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;

int main() {
  string S;
  int s;
  cin >> S;
  s=S.size();
  if (s==1) {
    cout << 'x' << endl;
  }
  else {
    for (int i=0; i<s-1; i++) {
      cout << 'x';
    }
    cout << 'x' << endl;
  }
}

Measured memory_bytes: 3624
main :: IO ()
main = getLine >>= putStrLn . edit

edit :: String -> String
edit = reverse . foldl f ""
  where
    f acc '0' = '0':acc
    f acc '1' = '1':acc
    f acc 'B' = safeTail acc

safeTail :: [a] -> [a]
safeTail [] = []
safeTail xs = tail xs

Measured memory_bytes: 380
#include <iostream>
#include <algorithm>
#include <set>
using namespace std;
#define FOR(i,a,b) for(int i=a;i<b;++i)
#define REP(i,n) FOR(i,0,n)
typedef long long ll;

int main(void){
	int a[3][3], c[3][3];
	int n, tmp;
	set<int> b;
	REP(i, 3){
		REP(j, 3){
			cin >> a[i][j];
		}
	}
	cin >> n;
	REP(i, n){
		cin >> tmp;
		b.insert(tmp);
	}
	REP(i, 3){
		REP(j, 3){
			decltype(b)::iterator it = b.find(a[i][j]);
			if(it != b.end()){
				c[i][j] = 0;
			}else{
				c[i][j] = 1;
			}
		}
	}
	REP(i, 3){
		if (c[i][0] + c[i][1] + c[i][2] == 0){
			cout << "Yes" << endl;
			return 0;
		}
		if (c[0][i] + c[1][i] + c[2][i] == 0){

			cout << "Yes" <<endl;
			return 0;
		} 
	}
	if (c[0][2] + c[1][1] + c[2][0] == 0 || c[0][0] + c[1][1] + c[2][2] == 0){
		cout << "Yes" << endl;
		return 0;
	}

	cout << "No" << endl;

	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<map>
using namespace std;
#define ll long long
#define pb push_back
#define pll pair<ll,ll> 
#define mll map<ll,ll>
#define pii pair<int,int>
#define rep(i,n) for(int i=0; i<n; i++)
#define All(x,v) for(auto x:v)
#define arrin(a,n) ll a[n]; rep(i,n) cin>>a[i]
#define vi vector<int>
#define nl "\n"
#define print(arr) All(x,arr) cout<<x<<" "; cout<<nl
#define sz(x) (int)x.size()
#define all(v) v.begin(),v.end()
#define ing(m,ad) rep(i,m){ int u,v; cin>>u>>v; u--;v--; ad[u].pb(v); ad[v].pb(u);}
#define vdsort(v) sort(v.begin(),v.end(),greater<int>())
#define F first
#define S second
#define mod 1000000007
const int MAXN=100005;
int spf[MAXN];
ll fac1[MAXN],fac2[MAXN],inv[MAXN];
ll gcd(ll x, ll y){ return y?gcd(y,x%y):x; }

void sieve(){  
    spf[1] = 1; 
    for (int i=2; i<MAXN; i++)  spf[i] = i; 
    for (int i=4; i<MAXN; i+=2) spf[i] = 2; 
    for (int i=3; i*i<MAXN; i++) { 
        if (spf[i] == i) 
            for (int j=i*i; j<MAXN; j+=i) 
                if (spf[j]==j)  spf[j] = i; 
    } 
} 
vector<int> getFactorization(int x){
    vector<int> ret; 
    while (x != 1) { 
        ret.push_back(spf[x]); 
        x = x / spf[x]; 
    } 
    return ret; 
}

ll exp(ll n, ll m){
    ll a = 1;
    while (m){
        if (m & 1) a = (a * n % mod) % mod;
        m /= 2;
        n = (n*n) % mod;
    }
    return a;
}

void pre(){
    fac1[0]=fac2[0]=inv[1]=1;
    for(int i=1;i<MAXN;i++){
        fac1[i]=(fac1[i-1]*i)%mod;
        if(i>1) inv[i]=( mod - ((ll)(mod/i)*inv[mod%i])%mod ) %mod;
    }
    for(int i=1;i<MAXN;i++) fac2[i]=(fac2[i-1]*inv[i])%mod;
}
ll C(int n,int k){
    if(n<k) return 0;
    return ((fac1[n]*fac2[n-k]%mod)*fac2[k]%mod);
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    // freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    int n,t=1;
    // cin>>t;
    while(t--){
        cin >> n;
        char c[n+1];
	    int w=0;
	    for(int i=1; i<=n ;i++){
		    cin >> c[i];
		    if(c[i]=='W') w++;
	    }
	    int ans=w;
	    for(int i=n; i>n-w ;i--){
		    if(c[i]=='W') ans--;
    	}
	    cout << ans << '\n';
    }
    return 0;
}

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

using  namespace std;

int main(){
  int n, d;

  cin >> n >> d;
  cin.ignore();

  // 一人が2D+1本の林檎の木を監視する
  // 塀区間

  int range = 2 * d + 1;


  int ans;
  ans = n / range;

  if(n % range > 0){
    ++ans;
  }

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


Measured memory_bytes: 256
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <forward_list>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

const ll MOD = 1E+09 + 7;
const ll INF = 1E18;
const int MAX_N = 1E+05;

ll H, W;

ll splitV(ll w, ll h);
ll splitVH(ll w, ll h);

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

    cin >> H >> W;

    ll ans = min(min(splitV(W, H), splitV(H, W)), min(splitVH(W, H), splitVH(H, W)));

    cout << ans << "\n";

    return 0;
}

ll splitV(ll w, ll h)
{
    if (w % 3 == 0) {
        return 0LL;
    } else {
        return h;
    }
}

ll splitVH(ll w, ll h)
{
    ll ans = INF;
    for (int i = 1; i <= h - 1; i++) {
        ll s1 = (h - i) * ((w + 1) / 2);
        ll s2 = (h - i) * (w / 2);
        ll smax = max(s1, w * i);
        ll smin = min(s2, i * w);
        ans = min(smax - smin, ans);
    }
    return ans;
}

Measured memory_bytes: 3648
#include<bits/stdc++.h>
using namespace std;
#define ll long long
 
int main()
{
  int n;
  cin>>n;
  
  ll *h=new ll[n];
  for(int i=0;i<n;i++)cin>>h[i];
  
  ll *dp=new ll[n];
  dp[0]=0;
  dp[1]=abs(h[1]-h[0]);
  for(int i=2;i<n;i++)
  {
    ll w1=abs(h[i]-h[i-1])+dp[i-1];
    ll w2=abs(h[i]-h[i-2])+dp[i-2];
    dp[i]=min(w1,w2);
  }
  
  cout<<dp[n-1];
  
  
  
}

Measured memory_bytes: 5212
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
#include<bits/stdc++.h>

using namespace std;

#define  GODSPEED       ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision(15);
#define  f              first                 
#define  s              second
#define  newl           cout<<"\n";
#define  pb             push_back  
#define  mset(a,x)      memset(a,x,sizeof(a))
#define  debv(a)        for(auto it: a)cout<<it<<" ";newl;
#define  deb1(a)        cout<<a<<"\n";
#define  deb2(a,b)      cout<<a<<" "<<b<<"\n";
#define  deb3(a,b,c)    cout<<a<<" "<<b<<" "<<c<<"\n";
#define  deb4(a,b,c,d)  cout<<a<<" "<<b<<" "<<c<<" "<<d<<"\n";
#define  uniq(a)        a.resize(unique(a.begin(), a.end()) - a.begin());
#define  all(a)         a.begin(),a.end()           
 
typedef  long long             ll;
typedef  long double           ld;
typedef  pair<ll,ll>           pll;
typedef  vector<ll>            vll;
typedef  vector<pll>           vpll;

const int  N     =  5e5+5;
const int  mod   =  998244353;
const ll   INF   =  0x7f7f7f7f7f7f7f7f;
const int  INFi  =  0x7f7f7f7f;
const int  LEVEL =  log2(N)+1;

ll test=1, n, x[N], y[N], ans[N];

ll p[N], sz[N];
 
void make(ll n){
	for(int i = 1; i <= n; i++){
		p[i] = i;
		sz[i] = 1;
	}
}

int find(ll x){
	return (p[x] == x)? x: p[x] = find(p[x]);
}

void merge(ll x, ll y){
	ll a = find(x);
	ll b = find(y);
	if(a != b){
		if(a < b) swap(a,b);
		p[a] = b;
		sz[b] += sz[a];
	}
}

void solve(){
    pll pt[N];
    cin >> n;
    make(n);
    for(int i = 1; i <= n; i++){
        cin >> x[i] >> y[i];
        pt[x[i]] = {y[i], i};
    }
    set <ll> s;
    for(int i = 1; i <= n; i++){
    	for(auto it : s){
    		if(it > pt[i].f) break;
    		merge(pt[i].f, it);
    	}
    	s.insert(pt[i].f);
    	vll er;
    	for(auto it : s){
    		if(it >= pt[i].f) break;
    		if(find(it) != it) er.pb(it);
    	}
    	for(auto it : er) s.erase(it);
    }
	for(int i = 1; i <= n; i++){
		ans[pt[i].s] = sz[find(pt[i].f)];
	}
	for(int i = 1; i <= n; i++) deb1(ans[i])
}

int main(){
	GODSPEED;
	int test = 1;
	//cin >> test;
	for(int i = 1; i <= test; i++){
		solve();
	}
	#ifndef ONLINE_JUDGE
	cout<<"\nTime Elapsed: " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n";
	#endif
}

Measured memory_bytes: 22548
#include<bits/stdc++.h>
#define Rint register int
using namespace std;
typedef long long LL;
const int N = 1 << 19, mod = 924844033, G = 5, Gi = 554906420;
int fac[N], invfac[N];
inline int kasumi(int a, int b){
	int res = 1;
	while(b){
		if(b & 1) res = (LL) res * a % mod;
		a = (LL) a * a % mod;
		b >>= 1;
	}
	return res;
}
inline void init(int m){
	fac[0] = 1;
	for(Rint i = 1;i <= m;i ++) fac[i] = (LL) i * fac[i - 1] % mod;
	invfac[m] = kasumi(fac[m], mod - 2);
	for(Rint i = m;i;i --) invfac[i - 1] = (LL) invfac[i] * i % mod;
}
int n, siz[N], A[N], B[N], head[N], to[N << 1], nxt[N << 1];
inline void add(int a, int b){
	static int cnt = 0;
	to[++ cnt] = b; nxt[cnt] = head[a]; head[a] = cnt;
}
inline void dfs(int x, int f = 0){
	siz[x] = 1;
	for(Rint i = head[x];i;i = nxt[i])
		if(to[i] != f){
			dfs(to[i], x);
			siz[x] += siz[to[i]];
		}
}
int rev[N];
inline int calrev(int len){
	int limit = 1, L = -1;
	while(limit <= len){limit <<= 1; L ++;}
	for(Rint i = 0;i < limit;i ++) rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << L);
	return limit;
}
inline void NTT(int *A, int limit, int type){
	for(Rint i = 0;i < limit;i ++)
		if(i < rev[i]) swap(A[i], A[rev[i]]);
	for(Rint mid = 1;mid < limit;mid <<= 1){
		int Wn = kasumi(type == 1 ? G : Gi, (mod - 1) / (mid << 1));
		for(Rint j = 0;j < limit;j += mid << 1){
			int w = 1;
			for(Rint k = 0;k < mid;k ++, w = (LL) w * Wn % mod){
				int x = A[j + k], y = (LL) w * A[j + k + mid] % mod;
				A[j + k] = (x + y) % mod;
				A[j + k + mid] = (x - y + mod) % mod;
			}
		}
	}
	if(type == -1){
		int inv = kasumi(limit, mod - 2);
		for(Rint i = 0;i < limit;i ++) A[i] = (LL) A[i] * inv % mod;
	}
}
int main(){
	scanf("%d", &n);
	init(n << 1);
	for(Rint i = 1;i < n;i ++){
		int x, y;
		scanf("%d%d", &x, &y);
		add(x, y); add(y, x);
	}
	dfs(1);
	for(Rint i = 2;i <= n;i ++) ++ A[siz[i]], ++ A[n - siz[i]];
	for(Rint i = 0;i <= n;i ++){
		A[i] = (LL) A[i] * fac[i] % mod;
		B[i] = invfac[n - i];
	}
	int limit = calrev(n << 1);
	NTT(A, limit, 1); NTT(B, limit, 1);
	for(Rint i = 0;i < limit;i ++) A[i] = (LL) A[i] * B[i] % mod;
	NTT(A, limit, -1);
	for(Rint i = n + 1;i <= (n << 1);i ++) printf("%d\n", ((LL) n * fac[n] % mod * invfac[i - n] % mod * invfac[(n << 1) - i] % mod - (LL) A[i] * invfac[i - n] % mod + mod) % mod);
}

Measured memory_bytes: 28212
//	ZapZu's code hohoho
//	#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define dfs_black 1
#define dfs_white -1
#define pr pair
#define vt vector
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());

typedef double db;
typedef long long li;
typedef long double ld;

typedef pr<int, int> ii;
typedef pr<ld,ld> dd;

typedef vt<int> vi;
typedef vt<li> vli;
typedef vt<ld> vld;
typedef vt<ii> vii;

typedef map<int, int> mii;
typedef map<int, bool> mib;
typedef map<int, char> mic;

typedef set<int> s_i;
typedef set<char> s_c;

const int MOD = 1e9+7;
const li INF = 1e18;
const ld PI = 4*atan((ld)1);

#define iii pr<int, ii> 
mii fp, cnt, ans; 
signed main()
{
//	freopen(".inp", "r", stdin);
//	freopen(".out", "w", stdout);
	int n;
	cin>>n;
	for(int i=1, t; i<=n; i++)
	{
		cin>>t;
		if(!fp.count(t)) fp[t] = i;
		cnt[t]++;
	}
	vt<iii> A(1);
	for(auto tmp: cnt)
	{
		int t = tmp.fi;
		A.pb({t, {fp[t], cnt[t]}});
//		cout<<t<<" "<<fp[t]<<" "<<cnt[t]<<endl;
	}
	int lastid = n+1;
	for(int i=A.size()-1; i>=1; i--)
	{
//		cout<<A[i].fi<<" "<<A[i].se.fi<<" "<<A[i].se.se<<endl;
		lastid = min(lastid, A[i].se.fi);
		ans[lastid]+=(A[i].fi-A[i-1].fi)*A[i].se.se;
		A[i-1].se.se+=A[i].se.se;
	}
	for(int i=1; i<=n; i++)
	{
		cout<<ans[i]<<endl;
	}
}




Measured memory_bytes: 24400
<?php
fscanf(STDIN, "%d %d %d", $n, $a, $b);
$v = explode(' ', trim(fgets(STDIN)));
rsort($v);
$f = $v[$a-1];
$s = $x = 0;
for ($i = 0; $i < $a; $i++) {
	$s += $v[$i];
	if ($v[$i] == $f) $x++;
}
echo $s / $a, "\n";
$c = array_count_values($v);
$ans = 0;
for ($i = $a - 1; $i <= $b - 1; $i++) {
	if ($v[$i] != $f) break;
	$ans += ncr($c[$f], $i - $a + $x + 1);
	if ($f != $v[0]) break;
}
echo $ans;

function ncr($n, $r) {
	if ($r == 0) {
		return 1;
	}
	return ncr($n, $r - 1) * ($n - $r + 1) / $r;
}

Measured memory_bytes: 4604
N, M = map(int, input().split())
list1 = list(map(int, input().split()))
list2 = [list(map(int, input().split())) for _ in range(M)]
dict1 = {i+1:[] for i in range(N)}
#print(dict1)
for l in list2:
    dict1[l[1]].append(l[0])
    dict1[l[0]].append(l[1])
res = 0
for i in range(N):
    a =  1
    if dict1 == []:
        res += 1
        continue
    for j in dict1[i+1]:
        if list1[i] <= list1[j-1]:
            a = 0
    if a == 1:
        res+=1
print(res)

Measured memory_bytes: 49828
# -*- coding: utf-8 -*-

import sys
import os

for s in sys.stdin:
    lst = list(map(int, s.split(',')))
    L = lst[:-2]
    v1 = lst[-2]
    v2 = lst[-1]

    l = sum(L)
    t = l / (v1 + v2)

    x = v1 * t
    len_sum = 0
    for i, l in enumerate(L):
        len_sum += l
        if x <= len_sum:
            print(i+1)
            break

        

Measured memory_bytes: 7508
n=int(input());l=list(map(int,input().split()));p=[0]*n;d=[0]*n;p[0]=l[0]
for i in range(1,n):p[i]=l[i]+p[i-2];d[i]=max(p[i-1]if(i&1)else d[i-1],l[i]+(d[i-2]if i>1else 0))
print(d[-1])

Measured memory_bytes: 39312
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
#define int ll
#define double long double
void YN(bool flg){cout<<(flg?"YES":"NO")<<endl;}
void Yn(bool flg){cout<<(flg?"Yes":"No")<<endl;}
void yn(bool flg){cout<<(flg?"yes":"no")<<endl;}
#define SORT(a) sort(a.begin(),a.end())
#define REVERSE(a) reverse(a.begin(),a.end())
#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 out(n) cout << n << endl;
typedef vector<int> VI;
typedef vector<VI> VVI;
const int MOD = 1000000007;
const long long INF = 10e10;
const double PI = acos(-1.0);
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
int POW(int a, int n) { int r = 1; while (n > 0) { if (n & 1)r *= a; a *= a; n /= 2; }return r; }
int isPrime(int n){if(n<2){return 0;}for(int i=2; i*i<=n; i++){if(n%i==0){return 0;}}return 1;}
/*素因数分解*/map< int64_t, int >prime_factor(int64_t n){map< int64_t, int > ret;for(int64_t i = 2; i * i <= n; i++) {while(n % i == 0) {ret[i]++;n /= i;}}if(n != 1) ret[n] = 1;return ret;}
/*約数列挙*/vector<int> getDivisor(int n){vector<int> v; for(int i=1; i*i<=n; i++){if(n%i==0){v.push_back(i);if(i!=n/i){v.push_back(n/i);}}}sort(v.begin(),v.end()); return v;}
//----------------ライブラリとか----------------

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(15);

    string s; cin >> s;
    if(s=="SUN") out(7);
    if(s=="MON") out(6);
    if(s=="TUE") out(5);
    if(s=="WED") out(4);
    if(s=="THU") out(3);
    if(s=="FRI") out(2);
    if(s=="SAT") out(1);

    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int main(void) {
	int n, v[20], c[20], cost = 0;
	
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &v[i]);
	}
	for (int i = 0; i < n; i++) {
		scanf("%d", &c[i]);
	}
	for (int i = 0; i < n; i++) {
		if (v[i] > c[i])
			cost += v[i] - c[i];
	}
	
	printf("%d\n", cost);
	
	return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>
#include <tuple>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = 1e12;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define rep(i,N) for(ll i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1

ll sq(ll num) { return num*num; }
ll mod_pow(ll x, ll n) {
	if (n == 0)return 1;
	if (n == 1)return x%MOD;
	ll res = sq(mod_pow(x, n / 2));
	res %= MOD;
	if (n % 2 == 1) {
		res *= x;
		res %= MOD;
	}
	return res;
}
ll mod_add(ll a, ll b) { return (a + b) % MOD; }
ll mod_sub(ll a, ll b) { return (a - b + MOD) % MOD; }
ll mod_mul(ll a, ll b) { return a*b % MOD; }

ll n;
vector<ll> vl;
ll dp[100100];

int main() {
	cin >> n;
	vl.push_back(1);
	ll num = 6;
	while (num <= 100000) {
		vl.push_back(num);
		num *= 6;
	}
	num = 9;
	while (num <= 100000) {
		vl.push_back(num);
		num *= 9;
	}
	fill(dp, dp + 100100, INF);
	dp[0] = 0;
	rep(i, vl.size()) {
		rep(j, 100100 - vl[i]) {
			dp[j + vl[i]] = min(dp[j + vl[i]], dp[j] + 1);
		}
	}
	cout << dp[n] << endl;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans=1e9+1,N;
int m[111111],A,B;
signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin>>N>>A>>B;
    for(int i=0;i<N;i++)cin>>m[i];
    int a=1,b=1e9+1;
    while(a<b){
        int c=(a+b)/2;
        int sum=0;
        for(int i=0;i<N;i++){
            sum+=(max(m[i]-c*B,0LL)+A-B-1)/(A-B);
        }
        if(sum<=c){
            ans=min(ans,c);
            b=c;
        }
        else{
            a=c+1;
        }
    }
    cout<<ans<<endl;
    return 0;
}


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

int main() {
    int N, K;
    cin >> N >> K;
    vector<int> l(N);
    rep(i, N) {
        cin >> l[i];
    }
    sort(l.begin(), l.end(), greater<int>());
    int ans = 0;
    rep(i, K) ans += l[i];
    cout << ans << endl;
    return 0;
}

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

long long int gcd(long long int l, long long int r) {
	assert(l > 0 && r > 0);
	if (l > r)return gcd(r, l);
	else {
		const long long int num = r%l;
		if (num) {
			return gcd(l, num);
		}
		else {
			return l;
		}
	}
}
long long int lca(long long int l, long long int r) {
	return l / gcd(l, r)*r;
}
int getans(const int num, const int rest) {
	if (rest) {
		int ans = 0;
		for (int i = 0; i <= 9; ++i) {
			if (num >= i) {
				ans += getans(num - i, rest - 1);
			}
		}
		return ans;
	}
	else {
		return num == 0;
	}
}
int main() {
	int N;
	while (cin >> N) {
		cout << getans(N, 4) << endl;
	}
	return 0;
}



Measured memory_bytes: 3020
#!/usr/bin/python3

from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def main():
    A, B = map(int, input().split())
    if A <= 8 and B <= 8:
        print("Yay!")
    else:
        print(":(")


if __name__ == '__main__':
    main()


Measured memory_bytes: 3960
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stdio.h>
#include <cmath>
#include <cctype>
#include <map>

const int INT_INF = 1e9;
const long long LONG_INF = 1e18;
const long long MOD = 1e9 + 7;

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<vector<int>> dp(n, vector<int>(3, 0));
    vector<vector<int>> a(n, vector<int>(3));

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            cin >> a[i][j];
        }
    }

    dp[0][0] = a[0][0];
    dp[0][1] = a[0][1];
    dp[0][2] = a[0][2];

    for (int i = 1; i < n; i++)
    {
        for (int j = 0; j < 3; j++)
        {
            for (int k = 0; k < 3; k++)
            {
                if (j == k)
                    continue;

                dp[i][j] = max(dp[i][j], dp[i - 1][k] + a[i][j]);
            }
        }
    }

    int ans = max(dp[n - 1][0], max(dp[n - 1][1], dp[n - 1][2]));

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 11136
#include<stdio.h>
#include<string>
#include<iostream>
#include<math.h>
#include<vector>
#include<set>
#include<algorithm>
using namespace std;

int main(void) {
	int A, B, num = 0;
	cin >> A >> B;
	string a,b;
	for (int i = 0;i < B-A+1;i++) {
		a = to_string(A + i);
		b = to_string(A + i);
		reverse(a.begin(), a.end());
		if (a == b)num++;
	}
	cout << num << endl;
	
	return 0;
}

Measured memory_bytes: 256
N, D = gets.split.map(&:to_i)

x = []
N.times do
  x << gets.split.map(&:to_i)
end

r = 0
0.upto(N - 1) do |i|
  (i + 1).upto(N - 1) do |j|
    d1 = x[i]
    d2 = x[j]

    s = 0
    d1.each_with_index do |d, i|
      s += ((d - d2[i]).abs) ** 2
    end

    if (Math.sqrt(s).to_i ** 2) == s
      r += 1
    end
  end
end

puts r

Measured memory_bytes: 1788
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9+7;

bool hantei(long long n){
	for(long long i=2; i*i<=n; i++){
		if(n%i==0) return 0;
	}
	return n>1;
}

map<ll,ll> bunkai(ll n){
	map<ll,ll> m;
	if(n==1){
		m[n]++;
		return m;
	}
	int b{2};
	if(hantei(n)) {
		m[n]++;
		return m;
	}
	while(1){
		if(n%b==0){
			m[b]++;
			n/=b;
			if(hantei(n)){
				m[n]++;
				break;
			}
		}
		else b += b%2+1;
	}
	return m;
}

int main(){
	ll n; cin>>n;
	if(hantei(n)){
		cout << 1 << endl;
		return 0;
	}
	else if(n==1){
		cout << 0 << endl;
		return 0;
	}
	auto m = bunkai(n);
	vector<ll> a(10);
	for(int i=1; i<10; i++){
		a.at(i)=a.at(i-1)+i;
	}
	ll ans{};
	for(auto i:m){
		ll e = i.second;
		auto it = upper_bound(a.begin(),a.end(),e);
		ans += it - a.begin()-1;
	}
	cout << ans << endl;
	
}


Measured memory_bytes: 3636
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
using namespace std;

int main(int argc, const char * argv[]) {

    // cinを高速にするためのおまじない
    cin.tie(0);
    ios::sync_with_stdio(false);

    /////////////////////
    // Write code below /
    /////////////////////
    int h,w;
    string aij;
    cin >> h >> w;
    vector<string> vec(h);
    for(int i=0; i<w+2; i++){
        cout << "#";
    }
    cout << endl;
    for(int i=0; i<h; i++){
        string ret = "#";
        cin >> aij;
        ret += aij;
        ret += "#";
        cout << ret << endl;
    }
    for(int i=0; i<w+2; i++){
        cout << "#";
    }
    cout << endl;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		long result =0;
		for (int i=0;i<N;i++) {
			result +=sc.nextLong()-1;
		}
		System.out.println(result);
	}
}

Measured memory_bytes: 40728
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cctype>
 
#include <algorithm>
#include <random>
#include <bitset>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <vector>
#include <chrono>
#include <iostream>
#include <limits>
#include <numeric>
 
#define LOG(FMT...) fprintf(stderr, FMT)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 100010;

int n;
pair<int, int> cnt[2][N];

int main() {
  scanf("%d", &n);
  int sv = n;
  while (n--) {
    int x;
    scanf("%d", &x);
    ++cnt[n & 1][x].first;
  }
  for (int i = 1; i <= 100000; ++i)
    cnt[0][i].second = cnt[1][i].second = i;
  sort(cnt[0] + 1, cnt[0] + 100001);
  sort(cnt[1] + 1, cnt[1] + 100001);
  int ans = 0;
  if (cnt[0][100000].second == cnt[1][100000].second)
    ans = max(cnt[0][99999].first + cnt[1][100000].first,
              cnt[1][99999].first + cnt[0][100000].first);
  else
    ans = cnt[0][100000].first + cnt[1][100000].first;
  printf("%d\n", sv - ans);
  return 0;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#include<math.h>
#include<queue>
#include<cstdio>
#include<set>
#include<map>
using namespace std;
using ll = long long;

int main(){
    int X;
    cin >> X;
    if(400<=X && X<600) cout << 8 << endl;
    if(600<=X && X<800) cout << 7 << endl;
    if(800<=X && X<1000) cout << 6 << endl;
    if(1000<=X && X<1200) cout << 5 << endl;
    if(1200<=X && X<1400) cout << 4 << endl;
    if(1400<=X && X<1600) cout << 3 << endl;
    if(1600<=X && X<1800) cout << 2 << endl;
    if(1800<=X && X<2000) cout << 1 << endl;
    return 0;
}

Measured memory_bytes: 3632
#!/usr/bin/env python3
import sys
def comp_begin_end(a):
    if int(str(n)[0]) >= int(str(n)[-1]): return 1
    else:   return 0

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
#解説AC
# calcurate Cij
c = [[0]*10 for _ in range(10)] #これだと１つ足すと全てのc[i][0]に加算される
for k in range(1,n+1):
    i = int(str(k)[0]) 
    j =  int(str(k)[-1])
    c[i][j] += 1
#print(c)
ans = 0
for i in range(10):
    for j in range(10):
        ans += c[i][j] * c[j][i]
print(ans)
"""
ans = 0
for i in range(1,n+1):
    if comp_begin_end(i): ans += 1
    if 10 <= n < 100:
        if int(str(n)[0]) == int(str(n)[-1]): ans += 1
    if 100 <= n < 1000:
        ans += 1
        if int(str(n)[0]) == int(str(n)[-1]): ans += 1
    if 1000 <= n < 100000:
        ans += 11
        if int(str(n)[0]) == int(str(n)[-1]): ans += 1
    if 10000 <= n:
        ans += 111
        if int(str(n)[0]) == int(str(n)[-1]): ans += 1
print(ans)"""


Measured memory_bytes: 3064
s = input()
t = input()
r = 0
p = 0
x = 0
for i in t:
    if s.find(i) == -1:
        print(-1)
        exit()
    if p > s.find(i):
        if s[p:].find(i) == -1:
            x += 1
            p = s.find(i) + 1
        else:
            p = p + s[p:].find(i) + 1
    else:
        p = s.find(i) + 1
print(x * len(s) + p)



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

#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define popcount(x) __builtin_popcount(x)
#define popcountll(x) __builtin_popcountll(x)
#define uniq(x) x.erase(unique(x.begin(), x.end()), x.end())
#define F first
#define S second
#define mp make_pair
#define eb emplace_back
#define pii pair<int, int>
#define pll pair<ll, ll>

using namespace std;

typedef long long ll;

/* --- INFやMODの値が適切か確認する --- */
// const int INF = 1 << 30;
// const ll INF = 1LL << 60;
// const ll MOD = 1000000007;

int main() {
  string s;
  cin >> s;
  rep(i, s.size()) if (s[i] == '9') {
    cout << "Yes" << endl;
    return 0;
  }
  cout << "No" << endl;
}


Measured memory_bytes: 256
/*#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <array>
#include <vector>
#include <deque>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
*/

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

#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort((c).begin(),(c).end())

typedef long long ll;
const ll INF = LLONG_MAX - 100;
const ll mod = 1e9 + 7;
const int MAX_N = 5e5 + 5;
int dx[] = { -1LL,0,1LL,0 }, dy[] = { 0,1LL,0,-1LL };
vector<ll> prime;

ll inv[MAX_N], fac[MAX_N];

template <class T = ll> T in() { T x; cin >> x; return (x); }
inline ll GCD(ll a, ll b) { ll c; while (b != 0) { c = a % b; a = b; b = c; }return a; }
inline ll LCM(ll a, ll b) { return a * b / GCD(a, b); }
inline ll POW(ll a, ll b) { ll c = 1LL; while (b > 0) { if (b & 1LL) { c = a * c%mod; }a = a * a%mod; b >>= 1LL; }return c; }
inline void _nCr() { fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) { fac[i] = fac[i - 1LL] * i%mod; }for (int i = 0; i < MAX_N; i++) { inv[i] = POW(fac[i], mod - 2); } }
inline ll nCr(ll n, ll r) { return (fac[n] * inv[r] % mod)*inv[n - r] % mod; }
inline void PRI(ll n) { bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) { a[i] = 1LL; }for (int i = 2; i < n + 1LL; i++) { if (a[i]) { prime.pb(i); ll b = i; while (b <= n) { a[b] = 0; b += i; } } } }

typedef pair<int, pair<int, int>> edge;

class UnionFind {
private:
	vector<int> par;
public:
	UnionFind(int N) { par = vector<int>(N, -1LL); }
	int find(int x);
	ll size(int x);
	void unite(int x, int y);
	bool same(int x, int y);
};



class Kruskal {
private:
	UnionFind *uf;
	vector<edge> e;
public:
	vector<edge> mst;
	Kruskal(int N) { uf = new UnionFind(N); }
	void add(int x, int y, ll z);
	void run();
};



//----UnionFind-------------------------------
int UnionFind::find(int x) {
	if (par[x] < 0) return x;
	else return par[x] = find(par[x]);
}

ll UnionFind::size(int x) {
	return -par[find(x)];
}

void UnionFind::unite(int x, int y) {
	x = find(x);
	y = find(y);

	//大きい方に小さい方をくっ付ける
	if (size(x) < size(y)) swap(x, y);
	par[x] += par[y];
	par[y] = x;
}

bool UnionFind::same(int x, int y) {
	x = find(x);
	y = find(y);
	return x == y;
}



//----Kruskal-------------------------------
void Kruskal::add(int x, int y, ll z) {
	//x < y
	if (x > y) swap(x, y);
	e.push_back({ z,{x,y} });
}

void Kruskal::run() {
	sort(e.begin(), e.end());
	e.erase(unique(e.begin(), e.end()), e.end());
	for (auto x : e) {
		if (uf->same(x.second.first, x.second.second)) {
			continue;
		}
		else {
			mst.push_back(x);
			uf->unite(x.second.first, x.second.second);
		}
	}
}

signed main() {
	int n,m;
	cin >> n >> m;
	int cnt[m];
	REP (i,m) cnt[i] = 0;
	for (int i = 0;i < n;i++) {
		int x = in();
		for (int j = 0;j < x;j++)cnt[in()-1]++;
	}
	int ans = 0;
	REP (i,m) if (cnt[i] == n) ans++;
	cout << ans << endl;
}

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

bool f(int a, int b, int c) {
	return a * a == b * b + c * c;
}

int main() {
	ios :: sync_with_stdio(false);
	int t; cin >> t;
	while(t --) {
		int a, b, c;
		cin >> a >> b >> c;
		if(f(a, b, c) || f(b, c, a) || f(c, a, b))
			cout << "YES\n";
		else
			cout << "NO\n";
	}
	return 0;
}

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

int main() {
    string a,b,c;
    cin>>a>>b>>c;

    a[0]=toupper(a[0]);
    b[0]=toupper(b[0]);
    c[0]=toupper(c[0]);

    cout<<a[0]<<b[0]<<c[0]<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i = 0; i < (n); i++)
#define INF 2 << 29
#define MOD 1000000007
#define Yes(f) puts((f)? "Yes" : "No")
#define YES(f) puts((f)? "YES" : "NO")
int gcd(int a, int b) {
	if (b != 0)return gcd(b, a % b);
	return a;
}
int lcm(int a, int b) {
	return a / gcd(a, b) * b;
}
using Graph = vector<vector<int>>;

int main(){
	ll n; cin >> n;
	ll ans = 1000000000000;
	for(int i = 1; i <= sqrt(n); i++){
		if(n % i == 0) ans = min(ans, n / i + i); 
	}
	cout << ans - 2 << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cmath>
#include <set>
#include <queue>
#include <vector>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
using namespace std;

int main()
{
	int N, K;
	cin >> N >> K;
	vector<int> l(N);
	for (auto i = 0; i < N; ++i)
	{
		cin >> l[i];
	}

	sort(l.begin(), l.end(), greater<int>());

	auto sum = 0;
	for (auto i = 0; i < K; ++i)
	{
		sum += l[i];
	}

	cout << sum << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define f(i,j,k) for(int i=j;i<k;i++)
using namespace std;
int main(){
    long long n,min,ans=0;
    cin>>n;
    long long a[n];
    f(i,0,n){
        cin>>a[i];
        if(i==0){
            ans++;
            min=a[i];
        }
        else{
            if(a[i]<min){
                ans++;
                min=a[i];
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 5204
#include <bits/stdc++.h>
#include <vector> 
# include <cstdint>
#define FOR(i,l,r) for(int i=(l);i<(r);++i)
#define RFOR(i,l,r) for(int i=(l);i>=(int)(r);i--)
#define rep(i,n)  FOR(i,0,n)
#define rrep(i,n)  RFOR(i,n-1,0)

#define int long long
using namespace std;
const int MX = 1e6;
const int inf = 1e13;
const int mod = 1e9+7;
#define ll long long
signed main() {
    int a,b,c;
    cin >> a >> b >> c;
    int k;
    cin >> k;
    int cnt = 0;
    while(a>=b) {
        b*=2;
        cnt++;
    }
    while(b>=c) {
        c*=2;
        cnt++;
    }
    if(cnt<=k) cout << "Yes" << endl;
    else cout << "No" << endl;
  return 0;
}



Measured memory_bytes: 3620
#include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<string>
#include<cstring>
using namespace std;
int main(){
	string a;
	cin>>a;
	int len=a.length();
	for(int i=0;i<len;i++){
		if(i%2==0)cout<<a[i];
	}
	cout<<endl;

return 0;
}

Measured memory_bytes: 512
fn main() { 
    let stdin = std::io::stdin(); 
    let mut buf = String::new(); 
    stdin.read_line(&mut buf).ok();
    let n: usize = buf.trim().parse().unwrap_or(0);

    let mut buf = String::new(); 
    stdin.read_line(&mut buf).ok(); 
    let vec: Vec<&str> = buf.split_whitespace().collect();
    let a: Vec<f64> = vec.iter().map(|&x| x.parse().unwrap_or(0.0)).collect();

    let mut buf = String::new(); 
    stdin.read_line(&mut buf).ok(); 
    let vec: Vec<&str> = buf.split_whitespace().collect();
    let b: Vec<f64> = vec.iter().map(|&x| x.parse().unwrap_or(0.0)).collect();

    let mut diff: Vec<f64> = vec![0.0_f64; n];
    for i in 0..n {
        diff[i] = (a[i] - b[i]).abs();
    }
    println!("{}", diff.iter().sum::<f64>());
    
    let mut diff: Vec<f64> = vec![0.0_f64; n];
    for i in 0..n {
        diff[i] = ((a[i] - b[i]).abs()).powf(2.0);
    }
    println!("{}", (diff.iter().sum::<f64>()).powf(0.5));
    
    let mut diff: Vec<f64> = vec![0.0_f64; n];
    for i in 0..n {
        diff[i] = ((a[i] - b[i]).abs()).powf(3.0);
    }
    println!("{}", (diff.iter().sum::<f64>()).powf(1.0 / 3.0));
    
    let mut diff: Vec<f64> = vec![0.0_f64; n];
    for i in 0..n {
        diff[i] = (a[i] - b[i]).abs();
    }
    let mut max = diff[0];
    for e in diff {
        if max < e {
            max = e;
        }
    }

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



Measured memory_bytes: 5200
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        //入力準備
       Scanner sc = new Scanner(System.in);
       
       //入力値の受け取り
       int a = sc.nextInt();
       int b = sc.nextInt();
       
       //計算して出力
        if (a < b){
            System.out.println("a < b");
        }else if (a > b){
            System.out.println("a > b");
        }else{
            System.out.println("a == b");
        }
    }
}


Measured memory_bytes: 26372
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
int main()
{
    int a,b,ans;
    cin>>a>>b;
    if(a!=3 && b!=3)ans=3;
    else if(a!=2 && b!=2)ans=2;
    else ans=1;
    cout<<ans<<endl;



    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b){return (1ll*a*b)/gcd(a, b);}
#define MOD 100000000;
#define EPS 0.001
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    int n; cin>>n;
    stack < char> q;
    string s;
    cin>>s;
    for(int i=0;i<n;++i)
    {
        if(q.empty())
        {
            q.push(s[i]);
        }
        else
        {
            if(s[i]==q.top()) q.pop(),q.push(s[i]);
            else q.push(s[i]);
        }
    }
    cout<<q.size();
}


Measured memory_bytes: 512
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; ++i) cin >> a[i];
	vector<int> seq;
	while (!a.empty()) {
		bool done = false;
		for (int i = a.size() - 1; i >= 0; --i) {
			if (a[i] == i + 1) {
				a.erase(a.begin() + i);
				seq.push_back(i + 1);
				done = true;
				break;
			}
		}
		if (!done) break;
	}
	if (!a.empty()) cout << -1 << endl;
	else {
		reverse(seq.begin(), seq.end());
		for (int i : seq) cout << i << endl;
	}
	return 0;
}

Measured memory_bytes: 256
_counts = [0 for i in range(100001)]
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
  _counts[a[i]] += 1
_sum = sum(a)
q = int(input())

for i in range(q):
  b, c = map(int, input().split())
  _sum += (c - b) * _counts[b]
  print (_sum)
  _counts[c] += _counts[b]
  _counts[b] = 0

Measured memory_bytes: 21748
#include <bits/stdc++.h>
#define int long long
#define INT_MAX INT64_MAX
#define INT_MIN INT64_MIN
#define PI 3.14159265358979323846
#define CLK clock_t clk = clock();//Start of main
#define OCLK cerr << "Time (in ms): " << (double)(clock() - clk) * 1000.0 / CLOCKS_PER_SEC << '\n';//End of main
#define MOD 1000000007
/* DEFINE cout */
#define pln cout << "===============================\n"
#define on cout<<"\n"
#define os cout<<" "
#define o2(a,b) cout<<a<<" "<<b
#define o(a) cout << a
#define bitcount __builtin_popcountll
/* DEFINE cout */
#define endl "\n"
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);//fastio
using namespace std;
struct hash_pair { // use pair as key in unordered_map<pair<int,int>,int,hash_pair>;
    template <class T1, class T2>
    size_t operator()(const pair<T1, T2>& p) const
    {
        auto hash1 = hash<T1>{}(p.first);
        auto hash2 = hash<T2>{}(p.second);
        return hash1 ^ hash2;
    }
};
bool prime[10000001];
int P=MOD-2;
int factorial[10000001]={0};
int powerFunction(int x,int y){
    int res = 1;
    int p = MOD;
    x = x % p;
    while (y > 0){
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
void sieveFunction(int maxLimit){
    memset(prime, true, sizeof(prime));
    prime[0] = prime[1]=false;
    for(int i=2; maxLimit >= i ; i++){
        if(prime[i]){
            for(int j=2*i ; maxLimit >= j ; j+=i)
                prime[j]=false;
        }
    }
}
void factorialFunction(int maxLimit){
    factorial[0]=1;
    for(int i=1 ; i <= maxLimit ; i++)
        factorial[i]=(factorial[i-1]*i)%MOD;
    return;
}
int gcd(int a, int b){
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
signed main(){
    int n;
    cin >> n;
    int num = 7;
    int id = 1;
    int cnt = 1000005;
    while(cnt--){
        if(num % n == 0){
            cout << id << endl;
            break;
        }
        int temp = 10*num + 7;
        temp %= n;
        num = temp;
        id++;
    }
    
    if(cnt == -1){
        cout << -1 << endl;
    }
}






Measured memory_bytes: 3632
#include<stdio.h>
 
int main (void)
{
  int N[3];
  int i;
  int flag = 0;
  
  for(i=0;i<3;i++)
    scanf("%d",&N[i]);
  for(i = 0;i<3;i++)
  {
    if(N[i%3] == N[(i+1)%3] && N[(i+1)%3] != N[(i+2)%3])
      flag = 1;
  }
  
  if(flag == 1)
    printf("Yes\n");
  else
    printf("No\n");
 
  return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
using Graph = vector<vector<int>>;
using Graphl = vector<vector<ll>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, k, n) for (int i = k; i < (int)(n); i++)
#define RRep(i, k, n) for (int i = k; i > (int)(n); i--)
#define FOR(itr, v) for (auto itr = (v).begin(); itr != (v).end(); ++itr)
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define ALL(a)  (a).begin(),(a).end()
#define rALL(a)  (a).rbegin(),(a).rend()
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<class T> void PrintVector(const vector<T> &vec) {for (auto val : vec) cout << val << " "; cout << endl;}
const long long INF = 1LL << 60;
const long long minusINF = -(1LL << 40);
const int MOD = 1000000007;
const double PI = acos(-1); //3.14~
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

int main()
{
    string s; cin >> s;
    int f = 1;
    if (s[0] != 'A')
    {
        puts("WA");
        return 0;
    }
    Rep(i, 2, s.size() - 1)
    {
        if (s[i] == 'C')
        {
            f = 1;
            break;
        }
        f = 0;
    }
    int cnt = 0;
    rep(i, s.size())
    {
        if (s[i] >= 'A' && s[i] <= 'Z') cnt++;
    }
    if (cnt != 2)
    {
        f = 0;
    }
    if (f) puts("AC");
    else puts("WA");
}

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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    for(int i=1;i<=9;i++)
    {
        for(int j=i;j<=9;j++)
        {
            ll req=i*j;
            if(req==n)
            {
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No"<<endl;
    return 0;
}


Measured memory_bytes: 256
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<string> vstring;
typedef vector<pint> vpint;
typedef stringstream SS;

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 rep(i,n) for(int i=0;i<(n);++i)
#define repn(i,m,n) for(int i=(m);i<(n);++i)
#define repd(i,n) for(int i=(n)-1;i>=0;--i)
#define repnd(i,m,n) for(int i=(n)-1;i>=(m);--i)
#define rep0(i,n) for(i=0;i<(n);++i)
#define repn0(i,m,n) for(i=(m);i<(n);++i)
#define repd0(i,n) for(i=(n)-1;i>=0;--i)
#define repnd0(i,m,n) for(i=(n)-1;i>=(m);--i)
#define repc(i,n) for(int i=0;i<=(n);++i)
#define repcn(i,m,n) for(int i=(m);i<=(n);++i)
#define repcd(i,n) for(int i=(n);i>=0;--i)
#define repcnd(i,m,n) for(int i=(n);i>=(m);--i)
#define repc0(i,n) for(i=0;i<=(n);++i)
#define repcn0(i,m,n) for(i=(m);i<=(n);++i)
#define repcd0(i,n) for(i=(n);i>=0;--i)
#define repcnd0(i,m,n) for(i=(n);i>=(m);--i)
#define all(n) n.begin(),n.end()
#define sz(n) ((int)(n).size())
#define IL for(;;)
#define MP make_pair
#define PB push_back
#define X second
#define Y first
#define p_queue(n) priority_queue<n,vector<n>,greater<n> >
#define PUTLINE cout<<"LINE:"<<__LINE__<<endl;

const int INF = 2147483647/3;
const double EPS = 1e-10;
const double PI = acos(-1.0);

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



int main() {
	int n;
	cin >> n;
	rep (iii, n) {
		int x = 0, y = 0;
		int resx = 0, resy = 0, dis = 0;
		int dx, dy;
		IL {
			cin >> dx >> dy;
			if (dx == 0 && dy == 0) break;
			x += dx;
			y += dy;
			if (dis < x * x + y * y || dis == x * x + y * y && resx < x) {
				resx = x;
				resy = y;
				dis = x * x + y * y;
			}
		}
		cout << resx << " " << resy << endl;
	}
	return 0;
}

Measured memory_bytes: 0
h, w = [int(i) for i in input().split()]

s = ["." * (w + 2)]
for i in range(h):
    s.append("." + input() + ".")
s.append("." * (w + 2))

for i in range(1, h + 1):
    for j in range(1, w + 1):
        if s[i][j]=="#" and s[i][j+1] != "#" and s[i+1][j] != "#" and s[i-1][j] != "#" and s[i][j-1] != "#":
            print("No")
            exit()
else:
    print("Yes")


Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
const int maxn=2e5+5;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int k,n,ans=0;
    cin>>k>>n;
    int a[maxn];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];

    }
    for(int i=1;i<n;i++)
    ans=max(ans,a[i]-a[i-1]);

    ans=max(ans,k-a[n-1]+a[0]);
    cout<<k-ans;
}


Measured memory_bytes: 1024
N = int(input())
costs = list(map(int, input().split())) + [0]*10000


def chmin(i, j, dp, costs):
    if dp[i+j] > dp[i] + abs(costs[i] - costs[i+j]):
        dp[i+j] = dp[i] + abs(costs[i] - costs[i+j])
        return True
    return False


dp = [float('inf')] * 100010
dp[0] = 0
for i in range(N):
    chmin(i, 1, dp, costs)
    chmin(i, 2, dp, costs)

print(dp[N-1])

Measured memory_bytes: 13928
#include <bits/stdc++.h>
using namespace std;
 
int N,Q;
string S;
int ans[110000]; // 1文字目からi文字目に現れるACの数
 
int main(){
 
    cin >> N >> Q >> S;
 
    for(int i=0;i<S.size();++i){
        if(S[i]=='A' && S[i+1]=='C'){
            ans[i+1] = ans[i] + 1;
        } else {
            ans[i+1] = ans[i];
        }
    }
 
    for(int i=0;i<Q;++i){
        int l,r;
        cin >> l >> r;
        cout << ans[r-1] - ans[l-1] << endl; 
    }
 
 
    
    
    return 0;
}

Measured memory_bytes: 1408