akhauriyash/Code-Regression huggingface dataset:
import java.util.*;

public class Main {

    static int DAT_SIZE = (1<<24)-1;

    static long[] data = new long[DAT_SIZE];
    static long[] datb = new long[DAT_SIZE];

    static void add(int a, int b, long x, int k, int l, int r) {
        if (a<=l && r<=b) {
            data[k] += x;
        } else if (l<b && a<r) {
            datb[k] += (Math.min(b, r) - Math.max(a, l))*x;
            add(a, b, x, k*2+1, l, (l+r)/2);
            add(a, b, x, k*2+2, (l+r)/2, r);
        }
    }

    static long sum(int a, int b, int k, int l, int r) {
        if (b<=l || r<=a) {
            return 0;
        } else if (a<=l && r<=b) {
            return data[k]*(r-l)+datb[k];
        } else {
            long res = (Math.min(b, r) - Math.max(a, l)) * data[k];
            res += sum(a, b, k*2+1, l, (l+r)/2);
            res += sum(a, b, k*2+2, (l+r)/2, r);
            return res;
        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int D = Integer.parseInt(sc.next());
        int A = Integer.parseInt(sc.next());
        Long[] X = new Long[N];
        ArrayList<Long[]> list = new ArrayList<Long[]>();
        for (int i=0;i<N;i++) {
            X[i] = Long.parseLong(sc.next());
            long H = Integer.parseInt(sc.next());
            Long[] add = {X[i], (H+A-1)/A};
            list.add(add);
        }
        Collections.sort(list, (o1, o2)->Long.compare(o1[0], o2[0]));
        for (int i=0;i<N;i++) {
            add(i, i+1, list.get(i)[1], 0, 0, N);
        }
        Arrays.sort(X);
        int[] index = new int[N];
        long ans = 0;
        Comparator<Long[]> comparator = new Comparator<Long[]>() {
            @Override
            public int compare(Long[] o1, Long[] o2) {
                if (o1[0]>=o2[0]) {
                    return 1;
                } else {
                    return -1;
                }
            }
        };
        for (int i=0;i<N;i++) {
            // index[i] = ~Arrays.binarySearch(X, X[i]+2*D+1, (o1, o2)->o1>=o2?1:-1);
            // index[i] = ~Collections.binarySearch(list, list.get(i)[0]+2*D+1, (o1, o2)->o1[0]>=o2[0]?1:-1);
            Long[] obj = {list.get(i)[0]+2*D+1, 0L};
            index[i] = ~Collections.binarySearch(list, obj, comparator);
            long cnt = sum(i, i+1, 0, 0, N);
            if (cnt<=0) continue;
            add(i, index[i], -cnt, 0, 0, N);
            ans += cnt;
        }
        System.out.println(ans);
    }
}

Measured memory_bytes: 371076
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <stack>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <cfloat>
#include <math.h>


#define fs first
#define sc second

using namespace std;

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

vector<int> e[2100];

int dfs(int s, int prev, int k, int d){
    int res = 0;
    if(d > k){
        res++;
    }
    for(auto v: e[s]){
        if(v == prev){
            continue;
        }
        res += dfs(v, s, k, d+1);
    }
    return res;
}

int main(){
    int N, K;
    cin >> N >> K;
    for(int i = 0; i < N-1; i++){
        int a, b;
        cin >> a >> b;
        a--; b--;
        e[a].push_back(b);
        e[b].push_back(a);
    }

    int res = INT32_MAX;
    for(int i = 0; i < N; i++){
        if(K % 2 == 0){
            res = min(res, dfs(i, -1, K/2, 0));
        }
        else{
            for(auto v: e[i]){
                if(i > v){
                    continue;
                }
                int res1 = dfs(i, v, (K-1)/2, 0);
                int res2 = dfs(v, i, (K-1)/2, 0);
                res = min(res, res1+res2);
            }
        }
    }

    cout << res << endl;



    return 0;
}


Measured memory_bytes: 512
{-# LANGUAGE FlexibleInstances    #-}
{-# LANGUAGE TypeSynonymInstances #-}

import           Control.Applicative
import           Control.DeepSeq
import           Control.Monad
import           Control.Monad.ST
import qualified Data.Array                    as A
import qualified Data.Array.IArray             as IA
import qualified Data.Array.IO                 as AI
import qualified Data.Array.MArray             as MA
import qualified Data.Array.ST                 as STA
import qualified Data.Array.Unboxed            as AU
import           Data.Bits
import qualified Data.ByteString.Char8         as BS
import           Data.Char
import qualified Data.Graph                    as G
import           Data.Int
import qualified Data.IntMap                   as IM
import qualified Data.IntSet                   as IS
import           Data.List
import qualified Data.Map.Strict               as M
import           Data.Maybe
import           Data.Ord
import qualified Data.Sequence                 as SQ
import qualified Data.Set                      as S
import           Data.Time
import qualified Data.Tree                     as T
import qualified Data.Vector                   as V
import qualified Data.Vector.Mutable           as VM
import qualified Data.Vector.Unboxed           as VU
import qualified Data.Vector.Unboxed.Mutable   as VUM

readInt :: IO [Int]
readInt = map (fst . fromJust . BS.readInt) . BS.words <$> BS.getLine

readInts :: Int -> IO [[Int]]
readInts n = replicateM n readInt

readInteger :: IO [Integer]
readInteger = map (fst . fromJust . BS.readInteger) . BS.words <$> BS.getLine

readIntegers :: Int -> IO [[Integer]]
readIntegers n = replicateM n readInteger

readString :: IO [String]
readString = map BS.unpack . BS.words <$> BS.getLine

readStrings :: Int -> IO [[String]]
readStrings n = replicateM n <$> readString

toPair :: [a] -> (a, a)
toPair [x, y] = (x, y)

count :: Eq a => a -> [a] -> Int
count a as = length $ filter (== a) as

put :: Show a => a -> IO ()
put = putStr . show

putList :: Show a => [a] -> IO ()
putList [n     ] = put n
putList (n : ns) = do
  put n
  putStr " "
  putList ns

putStrList :: [String] -> IO ()
putStrList [n     ] = putStr n
putStrList (n : ns) = do
  putStr n
  putStr " "
  putStrList ns

yesNoUpper b | b         = putStrLn "YES"
             | otherwise = putStrLn "NO"

yesNo b | b         = putStrLn "Yes"
        | otherwise = putStrLn "No"

main = do
  [a,b,c]<-readString
  print $ length $ group $ sort [a,b,c]

Measured memory_bytes: 380
#include <iostream>
#include <algorithm>
#include <cmath>
#include <iomanip>

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

    while(true){
        int n;
        std::cin >> n;
        if(n==0) break;
        double s = 0;
        double sum = 0;
        for(int i=0; i<n; ++i){
            double si;
            std::cin >> si;
            s += si*si;
            sum += si;
        }
        s /= n;
        sum /= n;
        s -= sum*sum;
    std::cout << std::fixed << std::setprecision(6) << std::sqrt(s) << "\n";
    }
    return 0;
}

Measured memory_bytes: 3252
#include <functional>
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <queue>
#include <string>
#include <cstring>
#include <math.h>
using namespace std;


int main() {
   int n;
 
   cin >> n;
  
   cout << n*n << endl;
   
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
 
const double pi = 3.141592653589793238462643383279;
using namespace std;
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
 
 
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define SQ(a) ((a)*(a))
#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())
 
 
//repetition
//------------------------------------------
#define FOR(i,s,n) for(int i=s;i<(int)n;++i)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007
 
 
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
 
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
 
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)

//ここから編集 

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

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


Measured memory_bytes: 3572
#include<set>
#include<map>
#include<cmath>
#include<deque>
#include<stack>
#include<ctime>
#include<queue>
#include<vector>
#include<cstdio>
#include<cstring>
#include<climits>
#include<iostream>
#include<algorithm>
#define LL long long
#define ULL unsigned long long
using namespace std;
int read(){
	int f=1,x=0;char c=getchar();
	while(c<'0'||'9'<c){if(c=='-')f=-1;c=getchar();}
	while('0'<=c&&c<='9') x=(x<<3)+(x<<1)+(c^48),c=getchar();
	return f*x;
}
#define MAXN 2000
#define INF 0x3f3f3f3f
int a[MAXN+5];
int main(){
	int n=read();
	for(int i=1;i<=n;i++)
		a[i]=read();
	sort(a+1,a+n+1);
	int ans=0;
	for(int i=1;i<=n;i++)
		for(int j=i+1;j<=n;j++){
			int x=a[i]+a[j],L=j,R=n+1;
			while(L+1<R){
				int Mid=(L+R)>>1;
				if(a[Mid]<x) L=Mid;
				else R=Mid;
			}
			ans+=L-j;
		}
	printf("%d\n",ans);
	return 0;
}

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

#define REP(i, s, n) for(int i = s; i < n; ++i)
#define rep(i, n)		 REP(i, 0, n)
#define SORT(c)			 sort((c).begin(), (c).end())
#define IINF					INT_MAX
#define LLINF					LLONG_MAX
#define DEBUG					false

int main(){
    int n;
    vector<int> a(3);
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>a[0]>>a[1]>>a[2];
        SORT(a);
        if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]){
            cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }
    return 0;
}

Measured memory_bytes: 3124
import sys
lines = sys.stdin.readlines()
R, C = tuple(int(i) for i in lines[0].split(' '))
lines = ''.join(i.strip() for i in lines[1:])


def doD(cs):
    d = {}
    for c in cs:
        if c not in d: d[c] = 0
        d[c] += 1
    return d

def doAns(b):
    print('Yes' if b else 'No')
    sys.exit(0)

def meme(d, rem, val):
    remc = []
    d2 = {}
    for k,v in d.items():
        count = v % val
        remc += [k]*count
        rem -= count
        d2[k] = v - count
    if rem > 0:
        for k,v in d2.items():
           while v >= val and rem > 0:
               v -= val
               rem -= val
               remc += [k]*val
    return (rem, ''.join(remc))

if R == 1 and C == 1:
    doAns(True)
elif R == 1 or C == 1:
    rem = (R + C + 1)%2
    doAns(meme(doD(lines), rem, 2)[0] == 0)
elif R % 2 == 0 and C % 2 == 0:
    doAns(meme(doD(lines), 0, 4)[0] == 0)

rem = (R%2) * C + (C%2)*R
if R % 2 + C % 2 == 1:
    rem, remc = meme(doD(lines), rem, 4)
    if rem != 0: doAns(False)
    rem, remc = meme(doD(remc), len(remc)%2, 2)
    doAns(rem == 0)
    
if R%2 and C%2:
    rem -= 1
    rem, remc = meme(doD(lines), rem, 4)
    if rem != 0: doAns(False)
    rem, remc = meme(doD(remc), C-(R+1)%2, 2)    
    if rem != 0: doAns(False)
    rem, remc = meme(doD(remc), C%2, 2)
    doAns(rem == 0)


Measured memory_bytes: 3316
#include<iostream>
using namespace std;
int main(){
	char N[3];
	cin>>N;
	if(N[0]=='1')cout<<9;
	if(N[0]=='9')cout<<1;
	if(N[1]=='1')cout<<9;
	if(N[1]=='9')cout<<1;
	if(N[2]=='1')cout<<9;
	if(N[2]=='9')cout<<1;
	cout<<endl;
	return 0;
}

Measured memory_bytes: 256
/*
    Author : Pranav_Raut.
*/

#include<bits/stdc++.h>
using namespace std;
#define input(arr,n) for(ll i=0;i<n;i++){cin>>arr[i];}
typedef long long int ll;
ll MOD = 1000000007;
ll MAXN = 100005;

ll dp[100005];
ll n,W;
ll v[100005];
ll w[100005];

int main()
{
    memset(dp,MOD,sizeof(dp));
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    cin>>n>>W;
    for(ll i=1;i<=n;i++)
    {
        cin>>w[i]>>v[i];
    }
    ll ans=0;
    dp[0]=0;
    for(ll i=1;i<=n;i++)
    {
        for(ll j=1e5;j>=v[i];--j)
        {
            dp[j]=min(dp[j],dp[j-v[i]]+w[i]);
            if(dp[j]<=W)
                ans=max(ans,(ll)(j));
        }
    }
    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;
//using P = pair<int,int>;

int main(){
    int n;
    cin >> n;
    char E;
    int N;

    vector<vector<int> > M(4, vector<int>(14, 0));
    for (int i=0; i<n; i++){
      cin >> E >> N;
      if (E == 'S') M.at(0).at(N-1) = 1;
      if (E == 'H') M.at(1).at(N-1) = 1;
      if (E == 'C') M.at(2).at(N-1) = 1;
      if (E == 'D') M.at(3).at(N-1) = 1;
    }
    for (int i=0;i<4;i++){
      for (int j=0;j<13;j++){
        if (M.at(i).at(j)==0){
          if (i==0) cout << "S " << j+1;
          if (i==1) cout << "H " << j+1;
          if (i==2) cout << "C " << j+1;
          if (i==3) cout << "D " << j+1;
          cout << endl;
        }
      }
    }
  return 0;
}


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

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl





using ll = long long;


const int maxn = 1e6 + 5;

ll divceil(ll x, ll y) {
    assert(y!=0);
    return (x+y-1)/y;
}

ll K, X, Y;

ll xx = 1, yy = 1;

vector<pair<ll,ll>> ans;

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

    cin>>K>>X>>Y;

    if ((X+Y)%2) {
	if (K%2==0) out(-1);
    }

    if (X<0) {
	X = -X;
	xx = -1;
    }

    if (Y<0) {
	Y = -Y;
	yy = -1;
    }

    
    ll N = divceil(X+Y, K);
    while (N*K-X-Y < 0) N++;
    if (N==1 && X+Y!=K) N++;
    while ((N*K+X+Y)%2!=0) N++;

    ll B = (N*K-X-Y)/2;
    //ll A = (N*K+X+Y)/2;

    ll x = 0;
    ll y = 0;

    while (B>0) {
	if (B-K >= 0) {
	    if (abs(x-X) < abs(y-Y)) {
		x -= K;
	    } else {
		y -= K;
	    }
	    ans.push_back({x,y});
	    B -= K;
	} else {
	    ll rest = B;
	    ll rem = K - rest;
	    if (abs(x-X) < abs(y-Y)) {
		x -= rest;
		y += rem;
	    } else {
		y -= rest;
		x += rem;
	    }
	    ans.push_back({x,y});
	    B -= rest;
	}
    }

    while (x < X) {
	ll go = min(X-x, K);
	ll rest = K - go;
	x += go;
	y += rest;
	ans.push_back({x,y});
    }

    assert(abs(Y-y)%K == 0);
    while (y < Y) {
	y += K;
	ans.push_back({x,y});
    }


    assert((int)ans.size() == N);
    cout<<N<<"\n";
    for (auto p: ans) {
	cout<<(xx*p.first)<<" "<<(yy*p.second)<<"\n";
    }

    
    return 0;
}


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

int main(){
  string s;
  cin >> s;
  int ans=0;
  
  for(int i=0;i<16;i++){
    string t;
    if(i%2) t+='A';
    t+="KIH";
    if(i/2%2) t+='A';
    t+='B';
    if(i/4%2) t+='A';
    t+='R';
    if(i/8%2) t+='A';
    
    if(s==t) ans++;
  }
  
  if(ans) cout << "YES" << endl;
  else cout << "NO" << endl;
}

Measured memory_bytes: 3604
#include <iostream>
using namespace std;
int main(){
	int n;
	cin >> n;
	int buf;
	int ans[200000] = {0};
	for(int i = 1;i <= n-1;i++){
		cin >> buf;
		ans[buf - 1]++;
	}
	for(int i = 0;i < n - 1;i++){
		cout << ans[i] << endl;
	}
	cout << 0 << endl;
	return 0;
}


Measured memory_bytes: 4380
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def pow(a, b):
    if b == 1:return a
    if b%2 == 0: return pow(a*a, int(b/2))
    return a*pow(a*a, int(b/2))

def binaryOne(n, multi):
    l, r = 0, n
    mid = (l + r)/2    
    while r - l > 1:
        if pow(mid, multi) >= n:
            r = mid
        else:
            l = mid
        mid = (r + l)/2
    return r;


def binaryTwo(n, maxi, multi):
    l, r = 0, multi
    mid = (l + r)/2
    while r - l > 1:
        if pow(maxi, (multi - mid))*pow(maxi - 1, mid) >= n:
            l = mid
        else:
            r = mid
        mid = (r + l)/2;
    return l

n, a = map(int,raw_input().split(" "))
ans = 1e18
for i in xrange(0, 40):
    maxi = binaryOne(n, i + 1);
    subt = binaryTwo(n, maxi, i + 1)
    ans = min(ans, a*i + maxi*(i + 1) - subt)
    
print ans


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

using namespace std;

#define INF 100000000
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL 9223372036854775
#define INF_LL_MAX 9223372036854775807
#define EPS 1e-10
#define MOD 1000000007
#define MOD9 998244353
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long
#define LD long double

#define int long long

using II = pair<int, int>;

int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int extgcd(int a, int b, int &x, int &y) { int g = a; x = 1; y = 0; if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x; return g; }

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(a)  begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())

signed main()
{
  int N; cin >> N;
  vector<int> A(N);
  REP(n,N) {
    cin >> A[n];
  }

  int money = 1000;
  int stock = 0;

  REP(i,N) {
    money += stock * A[i];
    stock = 0;

    if (stock == 0 && i < N-1) {
      if (A[i] < A[i+1]) {
        stock += money / A[i];
        money -= stock * A[i];
      }
    }
  }

  cout << money << endl;

  return 0;
}


Measured memory_bytes: 3628
#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <random>
#include <vector>
#include <tuple>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <algorithm>
using namespace std;

#define rep(i,n) for(int i = 0; i<n; ++i)
#define REP(i,n) for(int i = 1; i<=n; ++i)
#define all(x) begin(perm),end(perm)
#define showall(obj) for(auto x:obj)cout<<x<<endl;
typedef long long ll;
typedef pair<int,int> ip;
typedef pair<ll,ll> lp;
typedef vector<int> vint;
typedef vector<ll> vll;
const int inf = 100100100;
const ll INF = 1LL<<60;
const int MOD = (int)1e9 + 7;

const int MAX_H = 55,MAX_W = 55;
char m[MAX_H][MAX_W];
int ans[MAX_H][MAX_W];

int d4x[4] = {0,1,0,-1};
int d4y[4] = {1,0,-1,0};

int main(){
    int H,W; cin>>H>>W;
    int cnt = 0;
    REP(i,H)REP(j,W){
        cin>>m[i][j];
        if(m[i][j] == '#')cnt++;
        ans[i][j] = inf;
    }
    
    queue<ip> Q;
    Q.push(make_pair(1,1));
    ans[1][1] = 0;
    while(!Q.empty()){
        int y = Q.front().first, x = Q.front().second;
        Q.pop();
        rep(i,4){
            int dy = y+d4y[i], dx = x+d4x[i];
            if(ans[dy][dx] == inf && m[dy][dx] == '.'){
                ans[dy][dx] = ans[y][x] +1;
                Q.push(make_pair(dy,dx));
            }
        }
    }
    cout<<((ans[H][W] == inf)?-1:H*W-1-cnt-ans[H][W])<<endl; return 0;
}


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

int main(){
    string n,a,b;
    cin >> n;
    if(n.substr(0,4)=="YAKI") cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
using namespace std;
void File(){
	freopen("C.in","r",stdin);
	freopen("C.out","w",stdout);
}
#define REP(i,a,b) for(register int i=a;i<=b;++i)
#define DREP(i,a,b) for(register int i=a;i>=b;--i)
const int maxn=1000+10;
int n,a[maxn],bb[maxn],c[maxn],d[maxn];
int m,e,beg[maxn],len,b[maxn],cnt;
bool vis[maxn];
struct edge{
 	int to;
 	int last;
 }E[maxn*maxn];
 void add(int u,int v){
 	len++;
 	E[len].to=v;
 	E[len].last=beg[u];
 	beg[u]=len;
 }
 bool find(int u){
 	for(register int i=beg[u];i;i=E[i].last){
	 	int v=E[i].to;
	 	if(vis[v])continue;
	 	vis[v]=1;
	 	if(b[v]==0  || find(b[v])){
	 		b[v]=u;
	 		return true;
	 	}
	}
	return false;
 }
int main(){
	//File();
	scanf("%d",&n);
	REP(i,1,n)scanf("%d%d",&a[i],&bb[i]);
	REP(i,1,n)scanf("%d%d",&c[i],&d[i]);
	REP(i,1,n)REP(j,1,n)if(c[j]>a[i] && d[j]>bb[i]){
		add(i,j);
	}
	for(int i=1;i<=n;i++){
		memset(vis,0,sizeof(vis));
		if(find(i))cnt++;
	}
	cout<<cnt<<endl;
	return 0;
}


Measured memory_bytes: 256
/* {{{ */
use std::io::*;
use std::str::FromStr;

struct Scanner<R: Read> {
    reader: R,
}

impl<R: Read> Scanner<R> {
    fn new(r: R) -> Scanner<R> {
        Scanner { reader: r }
    }
    fn read<T: FromStr>(&mut self) -> T {
        let token = self
            .reader
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok().unwrap()
    }
}
/* }}} */

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);
    let n: usize = sc.read();
    let mut g = vec![vec![false;n];n];
    for _ in 0..n {
        let u: usize = sc.read();
        let m: usize = sc.read();
        for _ in 0..m {
            let v: usize = sc.read();
            g[u-1][v-1] = true;
        }
    }

    let mut stack = Vec::new();
    let mut visit = vec![false;n];
    let mut dd = vec![0;n];
    let mut ff = vec![0;n];
    let mut t = 0;

    for p in 0..n {
        if visit[p] { continue; }
        stack.push(p);
        t += 1;
        dd[p] = t;
        while let Some(&u) = stack.last() {
            t += 1;
            visit[u] = true;
            let v = g[u].iter().enumerate()
                        .find(|&(i,b)| *b && !visit[i]);
            if let Some((v,_)) = v {
                stack.push(v);
                dd[v] = t;
            } else {
                stack.pop();
                ff[u] = t;
            }
        }
    }

    for i in 0..n {
        println!("{} {} {}", i+1, dd[i], ff[i]);
    }
}
/* vim:set foldmethod=marker: */



Measured memory_bytes: 5028
from collections import defaultdict
N, M = map(int,input().split())
submit = defaultdict(list)
for i in range(M):
    problem_num, S = input().split()
    problem_num = int(problem_num)
    if S == "AC":
        S = 1
    else:
        S = 0
    submit[problem_num].append(S)
# print(submit)

ac = 0
penalty = 0
for l in submit.values():
    if 1 in l:
        ac += 1
        for i in range(len(l)):
            if l[i] == 0:
                penalty +=1
            elif l[i] == 1:
                break
print(str(ac)+" "+str(penalty))


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

int main() {
    int64_t X;
    cin >> X;

    int64_t money=100;
    int64_t year = 0;
    while(1) {
        money = (money/100) + money;
        year += 1;
        if(money >= X) {
            printf("%ld\n",year);
            break;
        }
    }

    return 0;
}

Measured memory_bytes: 3752
#include <stdio.h>

int main() {
	int inptan = 0;
	scanf("%d", &inptan);
	int angkaproses = 0;
	double pembagi = inptan, output = 0.0;
	if (inptan&1) {
	angkaproses = inptan/2 + 1; 
	output = angkaproses/pembagi;
	}
	else {
	output = 0.5;
	}
	printf("%lf\n", output);
	return 0;
}

Measured memory_bytes: 128
import java.util.Scanner;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
        // 天気
        String s = sc.next();
		//連続最大日数
        int max=0;
      	//現在何連続目か
      	int now=0;
      
      	for(int i=0;i<s.length();i++){
          if(s.charAt(i)=='R'){
            now+=1;
          }else{
            now=0;
          }
          if(now>=max){
            max=now;
          }
        }
      System.out.println(max);
    }
}

Measured memory_bytes: 35588
#include<bits/stdc++.h>
using namespace std;
int main(){
  long N;cin>>N;string T;cin>>T;
  long ans=0;
  for(int s=0;s<N;s++){
    string S=T.substr(s);
    vector<long>A(S.size());
    A[0] = S.size();
    int i = 1, j = 0;
    while (i < S.size()) {
      while (i+j < S.size() && S[j] == S[i+j]) ++j;
      A[i] = j;
      if (j == 0) { ++i; continue;}
      int k = 1;
      while (i+k < S.size() && k+A[k] < j) {
        A[i+k] = A[k], ++k;
      }
      i += k; j -= k;
    }
    for(int i=0;i<S.size();i++)if(A[i]<=i)ans=max(ans,A[i]);    
  }
 
  cout<<ans;
}

Measured memory_bytes: 256
import java.util.HashSet;
import java.util.Set;

public class Main {

  private static void solve() {
    int n = ni();
    Set<Character> set = new HashSet<>();
    for (int i = 0; i < n; i ++) {
      char c = ns()[0];
      set.add(c);
    }
    if (set.size() == 4) {
      System.out.println("Four");
    } else if (set.size() == 3) {
      System.out.println("Three");
    }
  }

  public static void main(String[] args) {
    new Thread(null, new Runnable() {
      @Override
      public void run() {
        long start = System.currentTimeMillis();
        String debug = System.getProperty("debug");
        if (debug != null) {
          try {
            is = java.nio.file.Files.newInputStream(java.nio.file.Paths.get(debug));
          } catch (Exception e) {
            throw new RuntimeException(e);
          }
        }
        reader = new java.io.BufferedReader(new java.io.InputStreamReader(is), 32768);
        solve();
        out.flush();
        tr((System.currentTimeMillis() - start) + "ms");
      }
    }, "", 64000000).start();
  }

  private static java.io.InputStream is = System.in;
  private static java.io.PrintWriter out = new java.io.PrintWriter(System.out);
  private static java.util.StringTokenizer tokenizer = null;
  private static java.io.BufferedReader reader;

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

  private static double nd() {
    return Double.parseDouble(next());
  }

  private static long nl() {
    return Long.parseLong(next());
  }

  private static int[] na(int n) {
    int[] a = new int[n];
    for (int i = 0; i < n; i++)
      a[i] = ni();
    return a;
  }

  private static char[] ns() {
    return next().toCharArray();
  }

  private static long[] nal(int n) {
    long[] a = new long[n];
    for (int i = 0; i < n; i++)
      a[i] = nl();
    return a;
  }

  private static int[][] ntable(int n, int m) {
    int[][] table = new int[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[i][j] = ni();
      }
    }
    return table;
  }

  private static int[][] nlist(int n, int m) {
    int[][] table = new int[m][n];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        table[j][i] = ni();
      }
    }
    return table;
  }

  private static int ni() {
    return Integer.parseInt(next());
  }

  private static void tr(Object... o) {
    if (is != System.in)
      System.out.println(java.util.Arrays.deepToString(o));
  }
}


Measured memory_bytes: 21332
#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
using namespace std;

struct S_info{
    long long int a, b;
};

int compare(const void* pEle1, const void* pEle2){
    const S_info* pmem1 = (const S_info*)pEle1;
    const S_info* pmem2 = (const S_info*)pEle2;
    return (pmem1->a - pmem2->a);
}

int main(){
    long long int n, m;
    cin >> n >> m;
    
    S_info info[n];
    for(int i = 0; i < n; i++){
        cin >> info[i].a >> info[i].b;
    }
    qsort(info, n, sizeof *info, compare);

    long long int m_sum = 0;
    long long int tmp = 0;
    int index;
    for(int i = 0; i < n; i++){
        tmp += info[i].b;
        if(tmp >= m){
            tmp -= info[i].b;
            index = i;
            break;
        }
        m_sum += info[i].a * info[i].b;
    }

    if(tmp == m){
        cout << m_sum << endl;
    }
    else{
        cout << m_sum + (m - tmp) * info[index].a << endl;
    }

    return 0;
}

Measured memory_bytes: 3324
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<ll, ll>;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
template<typename T> void chmin(T &a, const T &b) { a = min(a, b); }
template<typename T> void chmax(T &a, const T &b) { a = max(a, b); }
struct FastIO {FastIO() { cin.tie(0); ios::sync_with_stdio(0); }}fastiofastio;
#ifdef DEBUG_ 
#include "../program_contest_library/memo/dump.hpp"
#else
#define dump(...)
#endif
const ll INF = 1LL<<60;

int main(void) {
    ll h, a;
    cin >> h >> a;
    cout << (h+a-1)/a << endl;

    return 0;
}

Measured memory_bytes: 256
import math

n = int(input())
xy = [list(map(int, input().split())) for _ in range(n)]

test_case = []
for i in range(n):
    x, y = xy[i]
    test_case.append((y, -x))
    test_case.append((-y, x))

ret = 0
for nx, ny in test_case:
    sx, sy = 0, 0
    for j in range(n):
        x, y = xy[j]
        if nx * x + ny * y > 0 or (nx * x + ny * y == 0 and -ny * x + nx * y >= 0):
            sx += x
            sy += y
    ret = max(ret, math.hypot(sx, sy))
print(ret)

Measured memory_bytes: 39408
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a,b,c;
  cin >> a >> b >> c;
  b = b-a;
  c = c-a;
  if (b < 0) {
    b *= -1;
  }
  if (c < 0) {
    c *= -1;
  }
  if (c > b) {
    cout << "A" << endl;
  } else {
    cout << "B" << endl;
  }
}

Measured memory_bytes: 256
// In the name of God

#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>

using namespace std;
#define int long long
const int N = (int) 0, mod = (int) 0;

int32_t main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n, m;
    cin >> n >> m;
    if (2 * n >= m) {
        cout << m / 2 << endl;
        return 0;
    }
    int res = n;
    m -= 2 * n;
    res += m / 4;
    cout << res << endl;
}

Measured memory_bytes: 764
import java.util.*;
import java.io.*;

class Main{
    public static void main(String[] args){
        FastScanner fsc=new FastScanner();
        int n=fsc.nextInt();
        long x[][]=new long[n][2];
        for(int i=0;i<n;i++){
            x[i][0]=fsc.nextLong();
            x[i][1]=i;
        }
        fsc.close();
        Arrays.sort(x, (u, v)->u[0]>v[0]?1:u[0]<v[0]?-1:0);
        long ans[]=new long[n];
        for(int i=0;i<n;i++) ans[(int)x[i][1]]=x[i>=n/2?n/2-1:n/2][0];
        StringBuilder sb=new StringBuilder();
        for(long l: ans) sb.append(l).append("\n");
        System.out.print(sb);
    }
    static class FastScanner {
        private final InputStream in = System.in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;
        private boolean hasNextByte(){
            if(ptr<buflen) return true;
            else{
                ptr = 0;
                try{
                    buflen = in.read(buffer);
                }
                catch(IOException e){
                    e.printStackTrace();
                }
                if(buflen<=0) return false;
            }
        return true;
        }
        private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
        private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
        public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
        public String next() {
            if (!hasNext()) throw new NoSuchElementException();
            StringBuilder sb = new StringBuilder();
            int b = readByte();
            while(isPrintableChar(b)) {
                sb.appendCodePoint(b);
                b = readByte();
            }
            return sb.toString();
        }
        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) throw new NumberFormatException();
            while(true){
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                }
                else if(b == -1 || !isPrintableChar(b)) return minus ? -n : n;
                else throw new NumberFormatException();
                b = readByte();
            }
        }
        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }
        public double nextDouble() { return Double.parseDouble(next());}
        public void close(){
            try{in.close();}
            catch(IOException e){e.printStackTrace();}
        }
    }
}


Measured memory_bytes: 45648
#include <utility>
#include <vector>
#include <set>
#include <iostream>
#include <numeric>

using namespace std;
#define REP(i, n)  for(int i=0;i<(int)(n);++i)
#define FOR(i, b, n)  for(int i=b;i<(n);++i)
#define ALL(c) (c).begin(),(c).end()
#define PB(c) push_back(c)
#define SS size()
#define ST first
#define ND second
typedef long long ll;
typedef vector<int> vi;
typedef set<int> si;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef set<int> si;
template<typename T, typename U> static void amin(T &x, U y) { if (y < x) x = y; }
template<typename T, typename U> static void amax(T &x, U y) { if (x < y) x = y; }
template<typename T> T gcd(T a, T b) {return a==0 ? b : gcd(b%a,a);}
template<typename T> void sout(T &w) { for(auto x : w) cout << x << ", "; cout << endl;}


int main() {
   int x; cin >> x;
   int xx = x, s = 0;
   while(xx>0) s += xx%10, xx/=10;
   cout << (x%s==0?"Yes":"No") << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()

using ll = long long;
using ld = long double;
using namespace std;

const ll inf = 2e18;
const ll mod = 1e9 + 7;
const ll N = 2e5 + 5;

int l, r, d;

void code() {
    cin >> l >> r >> d;

    vector<int> v;
    for (int i = d; i <= r; i += d) v.push_back(i);

    int i = lower_bound(all(v), r) - v.begin();
    if (lower_bound(all(v), r) == v.end() or * lower_bound(all(v), r) > r) i--;

    int j = lower_bound(all(v), l) - v.begin();
    i -= j;

    cout << i + 1 << "\n";
}

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

    int t = 1;
    // cin>>t;

    while (t-- > 0) {
        code();
    }
}

Measured memory_bytes: 3636
import java.util.Scanner;


public class Main {

    public static void main(String[] args) {


        Scanner myObj = new Scanner(System.in);
        Integer x = Integer.valueOf(myObj.nextLine());
        if(x==0){
            System.out.println(1);
        }else{
            System.out.println(0);
        }
    }
}

Measured memory_bytes: 26920
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n, m = map(int, input().split())
G = [[] for i in range(n)]
for i in range(m):
    x, y = map(lambda z: int(z)-1, input().split())
    G[x].append(y)

ans = [-1]*n
def dfs(i):
    if ans[i] != -1:
        return ans[i]
    if len(G[i]) == 0:
        ans[i] = 0
        return ans[i]
    res = 0
    for j in G[i]:
        res = max(res, dfs(j))
    ans[i] = res + 1
    return ans[i]

for i in range(n):
    dfs(i)

print(max(ans))


Measured memory_bytes: 118824
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=1000000007,MAX=3005,INF=1<<30;
vector<int> G[MAX];
int grundy[MAX],A[MAX];

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int N;cin>>N;
    for(int i=0;i<N;i++) cin>>A[i];
    
    for(int i=0;i<N-1;i++){
        int a,b;cin>>a>>b;
        a--;b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    
    memset(grundy,-1,sizeof(grundy));
    
    for(int i=0;i<N;i++){
        bool ok=true;
        for(int to:G[i]){
            if(A[i]>A[to]) ok=false;
        }
        if(ok) grundy[i]=0;
    }
    
    for(int t=0;t<N;t++){
        for(int i=0;i<N;i++){
            if(grundy[i]>=0) continue;
            
            set<int> SE;
            for(int to:G[i]){
                if(A[i]>A[to]){
                    SE.insert(grundy[to]);
                }
            }
            if(SE.count(-1)) continue;
            for(int j=0;j<=N;j++){
                if(SE.count(j)==0){
                    grundy[i]=j;
                    break;
                }
            }
        }
    }
    
    for(int i=0;i<N;i++){
        if(grundy[i]>0){
            cout<<i+1<<" ";
        }
        //cout<<grundy[i]<<endl;
    }
    cout<<endl;
}


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

using namespace std;

#define F first
#define S second
#define modulo ll (1e9 + 7)

typedef long long ll;
typedef pair<int,int> pii;

void init(){
    cin.tie(0);
    cin.sync_with_stdio(0);
}

const int N = 2e5 + 9, M = 1e6, OO = 0x3f3f3f3f;
const ll llOO = 0x3f3f3f3f3f3f3f3f;




int main(){
    init();

    int n;  cin >> n;
    int t[n], sum = 0;
    for(int i = 0;i < n;i++)    cin >> t[i], sum += t[i];
    int m;  cin >> m;
    for(int i = 0;i < m;i++){
        int p, x;   cin >> p >> x;  p--;
        cout << sum - t[p] + x << '\n';
    }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define repi(i, a, b) for (int i = (a); i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ull << (b))

using namespace std;
using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;
using f64 = double;
using f80 = long double;
using pii = pair<i32, i32>;
using vi32 = vector<i32>;
using vu32 = vector<u32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf64 = vector<f64>;
using vf80 = vector<f80>;
using vstr = vector<string>;
using vpii = vector<pii>;
using vvi32 = vector<vi32>;
using vvu32 = vector<vu32>;
using vvi64 = vector<vi64>;
using vvu64 = vector<vu64>;
using vvf64 = vector<vf64>;
using vvf80 = vector<vf80>;

template<typename T, typename S> bool amax(T &x, S y) { if (x < y) { x = y; return 1; } return 0; }
template<typename T, typename S> bool amin(T &x, S y) { if (y < x) { x = y; return 1; } return 0; }

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(16);
  cerr << fixed << setprecision(16);
  int n;
  cin >> n;
  vu64 a(n);
  rep(i, n) cin >> a[i];
  sort(all(a));
  u64 sum = 0;
  int ans = n;
  rep(i, n) {
    if (sum * 2 < a[i]) {
      ans = n - i;
    }
    sum += a[i];
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 1024
#include <iostream>

int main()
{
	int n, a;

	std::cin >> n;

	int min = 1000000, max = -1000000;
	long sum = 0;
	for (int i = 0; i < n; ++i)
	{
		std::cin >> a;
		if (a < min) min = a;
		if (a > max) max = a;
		sum += a;
	}

	std::cout << min << " " << max << " " << sum << std::endl;

	return 0;
}


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

int main()
{
	int64_t n;
	cin >> n;
	vector<int64_t> as(n);
	for (auto &&a : as)
	{
		cin >> a;
	}

	set<int64_t> st;
	for (auto &&a : as)
	{
		if (st.find(a) != st.end())
		{
			cout << "NO" << endl;
			return 0;
		}

		st.insert(a);
	}

	cout << "YES" << endl;

	return 0;
}

Measured memory_bytes: 11136
#include <bits/stdc++.h>
using namespace std ;
const int MAXN = 20 ;
int n , m , x ;
int c[ MAXN ] ;
int a[ MAXN ][ MAXN ] ;
int t[ MAXN ] , ans = 0x3f3f3f3f ;
inline int read () {
    int tot = 0 , f = 1 ;
    char c = getchar () ;
    while ( c < '0' || c > '9' ) {
        if ( c == '-' ) f = -1 ;
        c = getchar () ;
    }
    while ( c >= '0' && c <= '9' ) { 
        tot = ( tot << 1 ) + ( tot << 3 ) + ( c ^ 48 ) ;
        c = getchar () ;
    }
    return tot * f ;
}
inline bool check () {
    for ( int i = 1 ; i <= m ; i ++ ) if ( t[ i ] < x ) return 0 ;
    return 1 ;
}
inline void dfs ( int now , int val ) {
    if ( val >= ans ) return ;
    if ( now > n ) {
        if ( check () ) ans = min ( ans , val ) ;
        return ;
    }
    dfs ( now + 1 , val ) ;
    for ( int j = 1 ; j <= m ; j ++ ) {
        t[ j ] += a[ now ][ j ] ;
    }
    dfs ( now + 1 , val + c[ now ] ) ;
    for ( int j = 1 ; j <= m ; j ++ ) {
        t[ j ] -= a[ now ][ j ] ;
    }
}
signed main () {
    n = read () ; m = read () ; x = read () ;
    for ( int i = 1 ; i <= n ; i ++ ) {
        c[ i ] = read () ;
        for ( int j = 1 ; j <= m ; j ++ ) {
            a[ i ][ j ] = read () ;
            t[ j ] += a[ i ][ j ] ;
        }
    }
    if ( !check () ) {
        cout << -1 << endl ;
        return 0 ;
    }
    memset ( t , 0 , sizeof ( t ) ) ;
    dfs ( 1 , 0 ) ;
    printf ( "%d\n" , ans ) ;
    return 0 ;
}

Measured memory_bytes: 3740
N = list(map(int,input().split()))
sen=0
gosen=0
man = N[0]
while(N[0]+1>gosen):
    sen = 0
    while(N[0]+1>sen):
        man = N[0] - sen - gosen
        if(man < 0):
            sen += 1
            continue
        if(N[1]==(10000*man+5000*gosen+1000*sen)):
            print(str(man)+" "+str(gosen)+" "+str(sen))
            exit()
        sen += 1
    gosen += 1

print("-1 -1 -1")


Measured memory_bytes: 3064
#include <iostream>

using namespace std;

	int main () {

		int a, b;
		cin >> a >> b;
		if(a < b){
			cout << "a < b" << endl;
		}
		else if(a == b){
			cout << "a == b" << endl;
		}
		else {
			cout << "a > b" << endl;
		}

		return 0;
}

Measured memory_bytes: 1156
#include <iostream>
#include <string.h>
using namespace std;

int main(void){
    char s[19];
    cin >> s;
    int i;
    int length = strlen(s);
    //cout << s << "\n" << "length: " << length << "\n";
    for(i = 0; i < length; i++){
        if(s[i] == ',')
            s[i] = ' ';
    }
    cout << s << "\n";
    
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<cstring>
//#include<bits/stdc++.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#include<set>
#define  si(a)       scanf("%d",&a)
#define  sl(a)       scanf("%lld",&a)
#define  sii(a,b)    scanf("%d%d",&a,&b)
#define  sll(a,b)    scanf("%lld%lld",&a,&b)
#define  queues      priority_queue
#define mod 1000000007
#define mem(a)  memset(a,0,sizeof(a));
#define def(a) ((a)&(-a))
#define fi  first
#define se  second
#define mp  make_pair
#define  pb push_back
#define mem(a,b) memset(a,b,sizeof(a));
typedef long long ll;
//priority_queue<ll,vector<ll >,greater<ll > >q;
const int INF=0x3f3f3f3f;
//const double E=exp(1);
//const double PI=acos(-1);
using namespace std;
//__builtin_popcount
//priority_queue
const ll MAX=100000;
ll gcd(ll a,ll b)
{
    return b==0?a:gcd(b,a%b);
}
ll kc(ll a,ll b)
{
    ll c=1;
    while(b)
    {
        if(b&1)c=(c*a)%mod;
        a=(a*a)%mod;
        b>>=1;
    }
    return c;
}
bool cmp(double x,double y)
{
    return x>y;
}
ll F[50003*3];
ll Find(ll a)
{
    return F[a]<0?a:F[a]=Find(F[a]);
}
ll same(ll a,ll b)
{
    if(Find(a)==Find(b))return 1;
    return 0;
}
ll up1(ll a,ll b)
{
    ll x,y;
    x=Find(a);
    y=Find(b);
    if(x!=y)
        F[x]=y;
    return 0;
}
int read() {
    int x=0,f=1;char s=getchar();
    for(;s>'9'||s<'0';s=getchar()) if(s=='-') f=-1;
    for(;s>='0'&&s<='9';s=getchar()) x=x*10+s-'0';
    return x*f;
}
ll dp[100003][14];
int main()
{
   // ios::sync_with_stdio(false);
   string s;
   cin>>s;
   int a=s.size();
   dp[0][0]=1;
   for(int i=0;i<a;i++)
   {
       if(s[i]!='?')
       {
           int x=s[i]-'0';
           for(int j=0;j<=12;j++)
            dp[i+1][(j*10+x)%13]=dp[i][j];
       }
       else {
        for(int j=0;j<=9;j++)
        {
            for(int k=0;k<=12;k++)
                dp[i+1][(k*10+j)%13]=(dp[i+1][(k*10+j)%13]+dp[i][k])%mod;

        }

       }
   }
   cout<<dp[a][5]%mod<<endl;
}



Measured memory_bytes: 11392
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#include <bits/stdc++.h>
#define pll pair<ll,ll>
#define ld long double
#define ll long long
#define pb push_back
#define S second
#define F first
using namespace std;
ll n;
ll b[109];
ll x[109];
ll y[109];
ll mp[109];
ll a[9][9];
ll done[9][9];
int main(){
    for(int i=0;i<3;i++){
        for(int j=0;j<3;j++){
            cin>>a[i][j];
            x[a[i][j]] = i;
            y[a[i][j]] = j;
            mp[a[i][j]] = 1;
        }
    }
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>b[i];
        if(!mp[b[i]]) continue;
        done[x[b[i]]][y[b[i]]] = 1;
    }
    for(int i=0;i<3;i++){
        bool yes = 1;
        for(int j=0;j<3;j++){
            if(!done[i][j]) yes = 0;
        }
        if(yes){
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    for(int j=0;j<3;j++){
        bool yes = 1;
        for(int i=0;i<3;i++){
            if(!done[i][j]) yes = 0;
        }
        if(yes){
            cout<<"Yes"<<endl;
            return 0;
        }
    }
    if(done[0][0] && done[1][1] && done[2][2]){
        cout<<"Yes"<<endl; return 0;
    }
    if(done[0][2] && done[1][1] && done[2][0]){
        cout<<"Yes"<<endl; return 0;
    }
    cout<<"No"<<endl;
}


Measured memory_bytes: 256
#include<stdio.h>

using namespace std;

struct Node{
    int key;
    Node* parent;
    Node* left;
    Node* right;
};

Node* NIL;
Node* root;

void inorder(Node* current){
    if(current == NIL){
        return;
    }

    inorder(current->left);
    printf(" %d", current->key);
    inorder(current->right);
}

void preorder(Node* current){
    if(current == NIL){
        return;
    }

    printf(" %d", current->key);
    preorder(current->left);
    preorder(current->right);
}

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

    for(int i = 0; i < n; i++){
        char str[7];
        scanf("%s", str);

        if(str[0] == 'i'){
            Node* z = new Node;
            scanf("%d", &z->key);
            z->left = NIL;
            z->right = NIL;

            Node* y = NIL;
            Node* x = root;
            while(x != NIL){
                y = x;
                if(z->key < x->key){
                    x = x->left;
                }
                else{
                    x = x->right;
                }
            }
            z->parent = y;

            if(y == NIL){
                root = z;
            }
            else if(z->key < y->key){
                y->left = z;
            }
            else{
                y->right = z;
            }
        }
        else if(str[0] == 'p'){
            inorder(root);
            printf("\n");
            preorder(root);
            printf("\n");
        }
        else{
            int key;
            scanf("%d", &key);

            Node* current = root;
            
            bool flag = false;
            while(current != NIL){
                if(key < current->key){
                    current = current->left;
                }
                else if(key > current->key){
                    current = current->right;
                }
                else{
                    flag = true;
                    break;
                }
            }

            if(flag){
                printf("yes\n");
            }
            else{
                printf("no\n");
            }
        }
    }
}


Measured memory_bytes: 21372