akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(),a.end()
#define sz(x) (int)(x).size()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define EPS (1e-10)
#define equals(a, b) (fabs((a)-(b)) < EPS)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
typedef set<int> S;
typedef queue<int> Q;
typedef queue<P> QP;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;
  
int main() {
  int A,B,M;
  cin >> A >> B >> M;
  vi a(A),b(B);
  rep(i,A) {
    cin >> a[i];
  }
  rep(i,B) {
    cin >> b[i];
  }
  int ans = INF;
  rep(i,M) {
    int x,y,c;
    cin >> x >> y >> c;
    x--;
    y--;
    chmin(ans,a[x]+b[y]-c);
  }
  sort(rng(a));
  sort(rng(b));
  chmin(ans,a[0]+b[0]);
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 4024
package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024*1024), bufio.MaxScanTokenSize)
}

func nextString() string {
	sc.Scan()
	return sc.Text()
}

func nextFloat() float64 {
	sc.Scan()
	f, e := strconv.ParseFloat(sc.Text(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func scanInts(n int) []int {
	is := make([]int, n)
	for i := 0; i < n; i++ {
		is[i] = nextInt()
	}
	return is
}

func main() {
	N := nextInt()
	IS := scanInts(N)
	sort.Sort(sort.IntSlice(IS))
	if len(IS) > 5 {
		IS = IS[0:4]
	}
	for {
		if len(IS) == 1 {
			fmt.Println(IS[0])
			return
		}
		if IS[0] == IS[1] {
			IS = IS[1:]
			continue
		} else if IS[0] == 1 {
			fmt.Println(1)
			return
		}
		a := IS[1] - IS[0]
		b := IS[0]
		IS[1] = max(a, b)
		IS[0] = min(a, b)
	}
}

func min(a, b int) int {
	if a < b {
		return a
	} else {
		return b
	}
}

func max(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}


Measured memory_bytes: 5264
/*
        |___Arshit Mangukiya___|
        |___DA-IICT____|
        |___201801173____|
*/
        //__WRITE  YOUR  CODE  HERE___//
#include<bits/stdc++.h>
using namespace std;
typedef long long int  ll;            
typedef long double ld;
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppl;
typedef vector<pll> vpl;
#define ff first
#define ss second
#define pi acos(-1)
#define mr_ad_0501 ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define pb push_back
#define all(a)      a.begin(),a.end()
#define f(i,a,n) for(ll i=a;i<n;i++)
#define MOD 1000000007
#define MAX 200007
#define LM LLONG_MAX
#define sz size()
#define p(x)        cout<< x << " ";
#define pe(x)       cout<< x << endl ;
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
const int N=1e5+5;

/*  bool fun(pair<int,int>a , pair<int,int>b)
            {
                if(a.ff == b.ff)    return a.ss < b.ss;
                else            return a.ff < b.ff;
            }*/
           
 /*void bfs(ll x)
 {
    queue<ll> q;
    q.push(x);
    while(!q.empty())
    {
        ll k=q.front();
        q.pop();
        for(auto X:v[k])
        {
            if(!vis[X])
            {
                l[X]=l[k]+1;
                vis[X]=1;
                q.push(X);
            }
        }
    }
 }*/
//ll i,j;
/*void dfs(ll v) {
    visited[v] = true;
    for (auto u : adj[v]) {
        if (!visited[u])
            dfs(u);
    }
}*/

bool prime(ll n)
{
    if(n==1) return false;
    for(ll i=2;i*i<=n;i++)
        if(n%i==0) return false;
    return true;
}

ll getSetBitsFromOneToN(ll N)
{
    ll two = 2, ans = 0;
    ll n = N;
 
    while (n) {
        ans += (N / two) * (two >> 1);
 
        if ((N & (two - 1)) > (two >> 1) - 1)
            ans += (N & (two - 1)) - (two >> 1) + 1;
 
        two <<= 1;
        n >>= 1;
    }
    return ans;
}

ll power(ll a, ll b) {
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}

ll mod_pow(ll a,ll b,ll m)
{
    ll res = 1;
    while(b)
    {
        if(b&1)
        {
        res=(res*a) % m;
        }
        a=(a*a) % m;
        b>>=1;
    }
    return res;
}
 
ll gcd(ll a,ll b){if(a==0)return b;return gcd(b%a,a);}
ll lcm(ll a,ll b){return (max(a,b)/gcd(a,b))*min(a,b);}

ll mod_inverse(ll a)
{
	return mod_pow(a , MOD-2 , MOD);
}


void solve()
{
	string s;
     cin>>s;
       ll cnt=0;
       for(auto y:s)
       {
           cnt=(cnt+(y-'0'))%9;
       }
       if(cnt==0)
       {
           cout<<"Yes"<<endl;
       }
       else
       cout<<"No";
}

int32_t main(){
    mr_ad_0501;
    ll t=1;
    //cin >> t;
    while(t--)
    {
        solve();
    }	
}

Measured memory_bytes: 3760
#include <list>
#include <map>
#include <set>
#include <bitset>
#include <deque>
#include <stack>
#include <queue>
#include <algorithm>
#include <functional> 
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <bitset>
#include <string.h>
#include <stdio.h>
#include <limits.h>
//#include <unordered_map>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned int UNI;
typedef unsigned char UC;

#define STR(X) #X

#define ABS(a)      ((a>0)?a:-(a))
#define MIN(a,b)    ((a<b)?(a):(b))
#define MAX(a,b)    ((a<b)?(b):(a))
#define FOR(i,a,n)    for ( int i = (a); i < (n); ++i)
#define FOR_(i,a,n)		for ( int i = (a); i >= (n); --i)
#define FORI(n)        for(int i = 0; i < n; ++i)
#define MEMS(a,b)    memset(a,b,sizeof(a))

#define MP(p1, p2)      std::make_pair(p1, p2)
#define VI              std::vector<int>
#define SI              std::set<int>
#define PI				std::pair<int, int>
#define PL				std::pair<LL, LL>
#define PUI				std::pair<UNI, UNI>
#define RNG(container)  container.begin(), container.end()
#define endl			"\n"

const LL		MOD = 1000000007;
const double    EXP = 2.7182818284590452;
const double    Pi = 3.1415926535;
const long double    EPS = 1e-4;
const int		INF = 1000 * 1000 * 1001;
const long long	INFL = (LL)INF * (LL)INF;

LL gcd(LL a, LL b)
{
	if (a < b) swap(a, b);

	while (b != 0)
	{
		a %= b;
		swap(a, b);
	}

	return a;
}

LL lcm(LL a, LL b)
{
	return (a / gcd(a, b)) * b;
}

LL extgcd(LL a, LL b, LL & x, LL & y)
{
	if (a == 0)
	{
		x = 0; y = 1;
		return b;
	}

	LL x11, y11;
	LL d = extgcd(b % a, a, x11, y11);
	x = y11 - (b / a) * x11;
	y = x11;
	return d;
}

ULL poww(ULL v, ULL p, ULL mod)
{
	if (p == 0) return 1;

	if (p & 1)
	{
		return (poww(v, p - 1, mod) * v) % mod;
	}
	else
	{
		ULL t = poww(v, p / 2, mod);
		return (t * t) % mod;
	}
}

const ULL L31018 = 3000000000000000000L;
const ULL L1018 = 1000000000000000000L;

//////////////////
//////////////////
#define MAXN 200005

int n, x, t, b;

bool was[MAXN];
int p[MAXN];

void accept()
{
	cin >> n >> x;

	if (x == 2*n - 1 || x == 1)
		cout << "No";
	else
	{
		printf("Yes\n");
		
		p[n] = x; was[x] = true;
		p[n - 1] = x - 1; was[x - 1] = true;
		p[n + 1] = x + 1; was[x + 1] = true;
		
		if (n > 2)
		{
			if (x < n - 1)
			{
				p[n - 2] = x + 2;
				was[x + 2] = true;
			}
			else
			{
				p[n + 2] = x - 2;
				was[x - 2] = true;
			}
		}
		
		int cur = 1;

		FOR(i, 1, 2*n)
		{
			if (p[i] == 0)
			{
				while (was[cur]) ++cur;
				p[i] = cur++;
			}

			printf("%d\n", p[i]);
		}
	}
}



//		||
//		||
//     \||/
//    \\||//
//   \\\\////
//    \\\///
//     \\//
//      \/

int main(void)
{

#if Debug
	LL startTime = clock();
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#else
	//	freopen("I.in", "r", stdin);
	//	freopen("cinema.out", "w", stdout);
#endif

	accept();
	//	build();

#if Debug
	printf("\n\n\t TIME: %.5lf", double((clock() - startTime)) / 1000.0f); /// CLOCKS_PER_SEC));
	int l;
	cin >> l;
#endif
	return 0;
}

Measured memory_bytes: 2304
//============================================================================
// Author       : Sun YaoFeng
//============================================================================

//#pragma 	comment(linker, "/STACK:100240000,100240000")
//#include	<cstdio>
//#include	<cstdlib>
//#include	<cstring>
//#include	<algorithm>

#include	<bits/stdc++.h>

using	namespace	std;

#define DB		double
#define	lf		else if
#define I64		long long
#define	Rd()	(rand()<<15|rand())
#define For(i,a,b)	for(int i=a,lim=b;i<=lim;i++)
#define Rep(i,a,b)	for(int i=a,lim=b;i>=lim;i--)

#define	fi	first
#define se	second
#define MK	make_pair
#define PA	pair<I64, I64>

//#define	min(a,b)	((a)<(b)?(a):(b))
//#define	max(a,b)	((a)<(b)?(b):(a))

#define	CH	(ch=getchar())
int		IN()	{
		int x= 0, f= 0, ch;
		for	(; CH < '0' || ch > '9';)	f= (ch == '-');
		for	(; ch >= '0' && ch <= '9'; CH)	x= x*10 + ch -'0';
		return	f? -x : x;
}

#define	n	150005

int		N, A[n][2], B[n][2];

vector<PA>	S[n];

bool	DFS(int i, I64 Mid)	{
		if	(! A[i][0])	{
			S[i].push_back(MK(0, 0));
			return	1;
		}
		
		int j= A[i][0], k= A[i][1];
		if	(! DFS(j, Mid))	return	0;
		if	(! DFS(k, Mid))	return	0;
		
		For(u, 0, S[j].size()-1)	S[j][u]= MK(S[j][u].fi + B[i][0], S[j][u].se + B[i][0]);
		For(v, 0, S[k].size()-1)	S[k][v]= MK(S[k][v].fi + B[i][1], S[k][v].se + B[i][1]);
		
		static	vector<PA>	H1, H2, G;
		H1.clear();
		H2.clear();
		G.clear();
		
		for (int u= 0, v= 0; u < S[j].size(); u++)	{
			for (; v < S[k].size() && S[j][u].se + S[k][v].fi <= Mid; v++);
			if	(v && S[j][u].se + S[k][v-1].fi <= Mid)	H1.push_back(MK(S[j][u].fi, S[k][v-1].se));
		}
		
		for (int u= 0, v= 0; u < S[j].size(); u++)	{
			for (; v < S[k].size() && S[k][v].se + S[j][u].fi > Mid; v++);
			if	(v == S[k].size())	break;
			H2.push_back(MK(S[k][v].fi, S[j][u].se));
		}
		
		for (int u= 0, v= 0; u < H1.size() || v < H2.size(); )	{
			if	(u == H1.size())	G.push_back(H2[v++]);
			lf	(v == H2.size())	G.push_back(H1[u++]);
			lf	(H1[u].fi < H2[v].fi)	G.push_back(H1[u++]);
				else	G.push_back(H2[v++]);
		}
		
		for (int u= 0; u < G.size(); u++)
			if	(S[i].size() == 0 || G[u].se < S[i][S[i].size()-1].se)	S[i].push_back(G[u]);
		
		/* puts("------");
		printf("%d\n", i);
		For(t, 1, H1.size())	printf("(%d , %d) ", H1[t-1].fi, H1[t-1].se);
		puts("");
		
		For(t, 1, H2.size())	printf("(%d , %d) ", H2[t-1].fi, H2[t-1].se);
		puts(""); */
		
		return	S[i].size() > 0;
}

int		main(int argc, char* argv[]){
		N= IN();
		For(i, 2, N)	{
			int j= IN(), v= IN();
			
			if	(! A[j][0])	A[j][0]= i, B[j][0]= v;
				else	A[j][1]= i, B[j][1]= v;
		}
		
	 	I64 l= -1, r= 1ll << 35;
		for (; l+1 < r;)	{
			I64	Mid= (l + r) >> 1;
			For(i, 1, N)	S[i].clear();
			
			if	(DFS(1, Mid))	r= Mid;
				else	l= Mid;
		}
		
		cout << r << endl;
	
	// 	printf("%d\n", DFS(1, 6));
	 
		return	0;
}

Measured memory_bytes: 31076
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <functional>
#include <list>
#include <numeric>
#include <math.h>
#include <cstdlib>
#include <queue>
#include <iterator>
#include <limits>
#include <string>
#include <sstream>
#include <iomanip>
#include <bitset>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <stack>
#include <memory>
#include <deque>
#include <string_view>
#include <random>
#include <chrono>
#include <cstring>

using namespace std;

static int my_speed_up = []() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 0; }();
using ll = long long; using ull = unsigned long long;
template<class T> using v = vector<T>;
template<class T> using vv = vector<vector<T>>;
template<class T> using vvv = vector<vector<vector<T>>>;
template<class T> using vvvv = vector<vector<vector<vector<T>>>>;
#define for_b(i, b) for (int i = 0; i < (b); ++i)
#define for_ab(i, a, b) for (int i = a; i < (b); ++i)
#define what_is(x) cout << #x << " = " << x << endl;
#define what_are(x,y) cout << #x << " = " << x << ", " << #y << " = " << y << endl;
#define pad(x) for_b(i, x) cout << "  ";
#define show_1d(___x) cout << #___x << " = "; for (auto& ___num : ___x) cout << ___num << ", "; cout << endl;
#define show_2d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto ___num : ___row) cout << ___num << ", "; cout << endl; }
#define show_3d(___x) cout << #___x << endl; for (auto& ___row : ___x) { for (auto& ___row2 : ___row) { for (auto ___num : ___row2) cout << ___num << ", "; cout << endl; }cout << endl; }


int main()
{
    int k;
    cin >> k;
    
    int base = k % 10;
    
    v<int> tb (10, -1);
    for_b(i,tb.size())
    {
        for_b(j,10)
        {
            if ( (i + base * j) % 10 == 7)
            {
                tb[i] = j;
                break;
            }
        }
    }

    int res = 0;
    int cur_k = k;
    while (cur_k > 0)
    {
        int mul = tb[cur_k % 10];
        if (mul == -1)
        {
            cout << "-1" << endl;
            return 0;
        }
        cur_k += k * mul;
        cur_k /= 10;
        ++res;
    }
    cout << res << endl;
    
    return 0;
}

Measured memory_bytes: 3644
using System;
using System.Collections.Generic;

namespace diverta2019_b
{
  class Program
  {
    static void Main(string[] args)
    {
      var rgb = CIn.ReadIntArray(3);
      var n = CIn.ReadInt();

      var dp = new int[4, n + 1];

      for (var i = 1; i <= 3; i++)
      {
        for (var j = 0; j <= n; j++)
        {
          if (j == 0)
          {
            dp[i, j] = 1;
            continue;
          }

          dp[i, j] = dp[i - 1, j] + (j >= rgb[i - 1] ? dp[i, j - rgb[i - 1]] : 0);
        }
      }

      Console.WriteLine(dp[3, n]);
    }
  }

  class CIn
  {
    private static readonly Queue<string> fieldBuffer = new Queue<string>();

    public static string Read()
    {
      if (fieldBuffer.Count == 0)
      {
        foreach (var field in Console.ReadLine().Split())
        {
          fieldBuffer.Enqueue(field);
        }
      }

      return fieldBuffer.Dequeue();
    }

    public static int ReadInt() => int.Parse(Read());
    public static long ReadLong() => long.Parse(Read());
    public static double ReadDouble() => double.Parse(Read());

    public static string[] ReadStringArray(long n)
    {
      var array = new string[n];

      for (var i = 0; i < n; i++)
      {
        array[i] = Read();
      }

      return array;
    }

    public static int[] ReadIntArray(long n)
    {
      var array = new int[n];

      for (var i = 0; i < n; i++)
      {
        array[i] = ReadInt();
      }

      return array;
    }

    public static long[] ReadLongArray(long n)
    {
      var array = new long[n];

      for (var i = 0; i < n; i++)
      {
        array[i] = ReadLong();
      }

      return array;
    }
    public static double[] ReadDoubleArray(long n)
    {
      var array = new double[n];

      for (var i = 0; i < n; i++)
      {
        array[i] = ReadDouble();
      }

      return array;
    }
  }
}

Measured memory_bytes: 11324
import numpy as np
b,c,H,M=map(int, input().split())
h=H/12 * 360 + (360 / 12) * M/60
#print(h)
m=M/60 * 360
#print(m)
A=abs(m-h)
#print(A)
if A > 180:
    A = 360 - A
#print(A)
AR = A * np.pi / 180
#print(AR)
#print(np.cos(AR))
ans2 = b*b+c*c - 2*b*c*np.cos(AR)
#print(ans2)
ans = np.sqrt(ans2)
print(ans)


Measured memory_bytes: 27184
N,M = map(int, input().split())

appear_list = [[]for i in range(N)]
flag = 0
ans = ""
for i in range(M):
  s,c = map(int, input().split())
  if len(appear_list[s-1]) == 0:
    appear_list[s-1].append(str(c))
  if len(appear_list[s-1]) ==1 and appear_list[s-1][0] != str(c):
    flag = 1
    break

for i in range(len(appear_list)):
  if i == 0:
    if len(appear_list[i]) == 0 and i != N-1:
      ans += "1"
    elif len(appear_list[i]) == 0 and i == N-1:
      ans += "0"
    elif appear_list[i][0] == "0" and i != N-1:
      flag = 1
      break
    else:
      ans += appear_list[i][0]
  else:
    if len(appear_list[i]) == 0:
      ans += "0"
    else:
      ans += appear_list[i][0]
if flag == 0:
  print(int(ans))
else:
  print(-1)
  
    
      

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

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

  if (((n / 10) % 111) == 0) {
    cout << "Yes" << endl;
  }
  else if (((n % 1000) % 111) == 0) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 3516
using System;
using System.Linq;

class A {
    public long calc(long v, long rst, long nv){
        long ans = 0;
        if(v<10){ 
            ans = nv + 10*rst + v;
        } else {
            long rv = (v%10) + 10*rst;
            ans = calc(v/10, 0, nv + rv) + calc(v/10, rv, nv);
        }
        return ans;
    }
}

class Program{
    static void Main(string[] args){
        A a = new A();
        char[] s = Console.ReadLine().ToArray();
        Array.Reverse(s);
        Console.WriteLine( a.calc( long.Parse(new string(s)), 0, 0  ) );
    }
}

Measured memory_bytes: 2776
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B , C = MAP()

if A<= C <= B or B<=C<=A:
	print("Yes")
else:
	print('No')

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

#ifdef DEBUG
#define NDEBUG
#include "cout11.h"
#endif
#undef NDEBUG
#include <cassert>

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> ii;
typedef pair<ll,ll> llll;
typedef pair<double,double> dd;

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<ii> vii;
typedef vector<vector<ii>> vvii;
typedef vector<ll> vll;

#define sz(a)  int((a).size())
#define pb  push_back
#define FOR(var,from,to) for(int var=(from);var<=(to);++var)
#define rep(var,n)  for(int var=0;var<(n);++var)
#define rep1(var,n)  for(int var=1;var<=(n);++var)
#define repC2(vari,varj,n)  for(int vari=0;vari<(n)-1;++vari)for(int varj=vari+1;varj<(n);++varj)
#define ALL(c)  (c).begin(),(c).end()
#define RALL(c)  (c).rbegin(),(c).rend()
#define tr(i,c)  for(auto i=(c).begin(); i!=(c).end(); ++i)
#define found(s,e)  ((s).find(e)!=(s).end())
#define mset(arr,val)  memset(arr,val,sizeof(arr))
#define mid(x,y) ((x)+((y)-(x))/2)
#define IN(x,a,b) ((a)<=(x)&&(x)<=(b))

#define INTSPACE 12
char _buf[INTSPACE*1000000 + 3];

int loadint() {
    if (fgets(_buf, INTSPACE+3, stdin)==NULL) return 0;
    return atoi(_buf);
}
int loadvec(vector<int>& v, int N=-1) {
    if (N == -1) {
        N = loadint();
        if (N==0) return 0;
    }
    int bufsize = INTSPACE*N + 3;
    if (fgets(_buf, bufsize, stdin)==NULL) return 0;
    v.resize(N);

    int i=0;
    bool last = false;
    for (char *p=&_buf[0]; ;) {
        char *q = p;
        while (*q > ' ') ++q;
        if (*q == 0x0D || *q == 0x0A) last = true;
        *q = 0;
        v[i++] = atoi(p);
        if (last || i == N) break;
        p = q+1;
    }
    // assert(i <= N);
    return i;
}

// eg. 110100
// 110100
// 011111
// 101111
// 110011

int N, K;
vector<int> A, B;

ll sub(int y) {
    int _y = ~y;
    ll sum = 0LL;
    rep(i, N) {
        if (A[i] & _y) continue;
        sum += B[i];
    }
    return sum;
}

ll solve(){
    ll best = sub(K);

    for (int b=0,m=1; m<=K; ++b,m<<=1) {
        if (K & m) {
            int y = (K - m) | (m - 1);
            best = max(best, sub(y));
        }
    }
    return best;
}

int main() {
    vector<int> tmp(2);
    loadvec(tmp, 2);
    N = tmp[0]; K = tmp[1];
    A.resize(N); B.resize(N);
    rep(i, N) {
        loadvec(tmp, 2);
        A[i] = tmp[0], B[i] = tmp[1];
    }
    ll ans = solve();
    cout << ans << endl;
    return 0;
}


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

int main() {
    string S;
    int Q;
    cin >> S >> Q;
    string begin = "", end = ""; // 先頭、末尾に追加する文字列
    int num_of_reverse = 0;
    for (int i = 0; i < Q; i++) {
        int T;
        cin >> T;
        if (T == 1) {
            num_of_reverse++;
        }
        if (T == 2) {
            int F;
            char C;
            cin >> F >> C;
            if (num_of_reverse % 2 == 0) {
                if (F == 1) {
                    begin += C;
                }
                if (F == 2) {
                    end += C;
                }
            }
            if (num_of_reverse % 2 == 1) {
                if (F == 1) {
                    end += C;
                }
                if (F == 2) {
                    begin += C;
                }
            }
        }
    }
    string nigeb = "";
    int begin_size = begin.size();
    for (int i = begin_size - 1; i >= 0; i--) {
        nigeb += begin[i];
    }

    string dne = "";
    int end_size = end.size();
    for (int i = end_size - 1; i >= 0; i--) {
        dne += end[i];
    }

    string S2 = "";
    for (int i = 0; i < S.size(); i++) {
        S2 += S[i];
    }
    int S2_size = S2.size();

    string ans = "";

    if (num_of_reverse % 2 == 0) {
        ans += nigeb + S + end;
    }

    if (num_of_reverse % 2 == 1) {
        for (int i = S2_size - 1; i >= 0; i--) {
            S[S2_size - i - 1] = S2[i];
        }
        ans += dne + S + begin;
    }
    cout << ans << endl;
}

Measured memory_bytes: 1664
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define all(x) (x).begin(), (x).end()
void make_unique(vector<ll> vec)
{
sort(all(vec));
vec.resize(unique(all(vec)) - vec.begin());
}

int main() 
{   //int t;
    //cin>>t;
    //while(t--)
    //{ll k,n,m,i,j,flag=0,count=0,s=0;
    // cin>>n;
     //vector<ll> v(n);
      
    //  for(auto &i: v)
     // cin>>i;
     ld n,d,c=0;
     cin>>n>>d;
     while(n--)
     {
      ld a,b;
      cin>>a>>b;
      ld dist=sqrt(a*a+b*b);
      if(dist<=d)
       c++;
      
      
     }
     cout<<c<<endl;
   // }
    
    
	return 0;
}


Measured memory_bytes: 3812
#include <iostream>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <algorithm>
#include <cmath>

#include <cstdio>

using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repc(i, s, n) for (int i = (s); i <= (n); i++)
#define rrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define rrepc(i, s, n) for (int i = (s); i >= (n); i--)
typedef long long ll;
typedef unsigned long long ull;

struct Point { double x, y; };
#define EPS (1e-10)

int main()
{
	int q;
	Point p[4];
	double s1m, s2m;
	int ans = 0;

	cin >> q;
	rep(i, q) {
		cin >> p[0].x >> p[0].y >> p[1].x >> p[1].y >> p[2].x >> p[2].y >> p[3].x >> p[3].y;
		if (p[1].x - p[0].x == 0 && p[3].x - p[2].x == 0) ans = 2;
		else if (p[1].x - p[0].x == 0 && p[3].y - p[2].y == 0) ans = 1;
		else if (p[3].x - p[2].x == 0 && p[1].y - p[0].y == 0) ans = 1;
		else {
			s1m = (p[1].y - p[0].y) / (p[1].x - p[0].x);
			s2m = (p[3].y - p[2].y) / (p[3].x - p[2].x);
			if (abs(s1m - s2m) < EPS) ans = 2;
			else if (abs(s1m * s2m + 1) < EPS) ans = 1;
			else ans = 0;
		}

		cout << ans << endl;
	}

	return 0;
}


Measured memory_bytes: 3216
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(n) begin(n), end(n)
using ll = long long;
using namespace std;

int main(){
  int w, h, n;
  cin >> w >> h >> n;
  int l = 0, r = w, d = 0, u = h;
  rep(i, n){
    int x, y, a;
    cin >> x >> y >> a;
    if(a == 1){
      l = max(l, x);
    }else if(a == 2){
      r = min(r, x);
    }else if(a == 3){
      d = max(d, y);
    }else{
      u = min(u, y);
    }
  }
  if(l >= r || d >= u) cout << "0" << endl;
  else cout << (r-l)*(u-d) << endl;
  return 0;
}

Measured memory_bytes: 256
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class A {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            // 入力
            int a = Integer.parseInt(in.next());
            boolean ok = false;
            if (a >= 30) ok = true;

            out.println(ok ? "Yes" : "No");

        }

    }
}



Measured memory_bytes: 36124
#include <iostream>
#include <string>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <utility>
#include <functional>
#include <deque>
#include <cctype>
#include <stack>
#include <bitset>

using ll = long long;
using namespace std;
typedef unsigned long long ull;
typedef std::pair<ll, ll>P;

ll min(ll a, ll b) {
	if (a >= b)return b;
	else return a;
}
ll max(ll a, ll b) {
	if (a >= b)return a;
	else return b;
}
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}

const ll Z = 1000000007;
const ll INF = 1 << 30;
const ll INF2 = 9000000000000000000LL;
bool flag = true;
bool fl = true;
bool f = true;
int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };
std::string abc = "abcdefghijklmnopqrstuvwxyz";
struct edge { ll to, cost; };
std::vector<edge>v[1000];

int main() {
	int n, m, ans = 0;
	cin >> n;
	std::string s[1000], t[1000];
	for (int i = 0;i < n;i++) {
		cin >> s[i];
	}
	cin >> m;
	for (int i = 0;i < m;i++) {
		cin >> t[i];
	}
	for (int i = 0;i < n;i++) {
		int sum = 1;
		for (int j = 0;j < n;j++) {
			if (i == j)continue;
			if (s[i] == s[j])sum++;
		}
		for (int k = 0;k < m;k++) {
			if (s[i] == t[k])sum--;
		}
		ans = max(ans, sum);
	}
	if (ans < 0)ans = 0;
	cout << ans << endl;
}

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

int main()
{
  int N;
  cin >> N;
  int A[2][110];
  for (int i = 0; i < N; i++) {
    cin >> A[0][i];
  }
  for (int i = 0; i < N; i++) {
    cin >> A[1][i];
  }
  int smax = 0;
  for (int i = 0; i < N; i++) {
    int s = 0;
    for (int j = 0; j <= i; j++) {
      s += A[0][j];
    }
    for (int k = i; k < N; k++) {
      s += A[1][k];
    }
    if (s > smax)
      smax = s;
  }
  cout << smax << endl;
  return 0;
}


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

using namespace std;
using ll =long long;

#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
void coY() {cout <<"Yes"<<endl;}
void coN(){cout <<"No"<<endl;}

const ll INF = 1LL << 60;

//Write From this Line

const int mod = 1e9+7;
int main()
{
	ll n ;
	cin >> n ;
	ll ans = 0 ;
	ll m = INF;
	rep(i,n){
		ll a ;
		cin >> a ;
		if( a<= m){
			ans ++ ; 
			m = a; 
		}
	}
	cout << ans << endl;

}


Measured memory_bytes: 256
import java.util.*;
import java.lang.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int K = sc.nextInt();
		int A = sc.nextInt();
		int B = sc.nextInt();
		for( int i=A; i<=B; i++ ){
			if( i%K==0 ){
				System.out.println("OK");
				break;
			}
			if( i==B ){
				System.out.println("NG");
			}
		}
	}
}

Measured memory_bytes: 35816
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<vector>
#include<bitset>
using namespace std;
typedef long long ll;
#define N 600006
vector<int>v[2002];
int n,m,a[N][2],id[2002][2002],id1[2002],id2[2002];
bool vis[2002],to[2002][2002],ao[2002][2002];
void df5(int anc,int te)
{
    for(int i=0;i<v[te].size();i++)
    {
        int j=v[te][i];to[anc][j]=1;
        if(!vis[j])
        {
            vis[j]=1;df5(anc,j);
        }
    }
}
void dfs(int anc,int te,int wh)
{
    for(int i=0;i<v[te].size();i++)
    {
        int j=v[te][i];if(te==anc)wh=i+1;
        if(!vis[j])
        {
        if(id1[j]&&id1[j]!=wh)ao[anc][j]=1;id1[j]=wh;
            vis[j]=1;dfs(anc,j,wh);
        }
    }
}
void dfss(int anc,int te,int wh)
{
    for(int i=((int)v[te].size())-1;~i;i--)
    {
        int j=v[te][i];if(te==anc)wh=i+1;
        if(!vis[j])
        {
        if(id1[j]&&id1[j]!=wh)ao[anc][j]=1;id1[j]=wh;
            vis[j]=1;dfss(anc,j,wh);
        }
    }
}
int main()
{
    scanf("%d%d",&n,&m);
    for(int i=1;i<=m;i++)
    {
        int x,y;scanf("%d%d",&x,&y);
        v[x].push_back(y);a[i][0]=x,a[i][1]=y,id[x][y]=i;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)vis[j]=0;vis[i]=1;
        df5(i,i);
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=n;j++)vis[j]=id1[j]=id2[j]=0;
        vis[i]=1;dfs(i,i,0);
        for(int j=1;j<=n;j++)vis[j]=0;
        vis[i]=1;dfss(i,i,0);
    }
    for(int i=1;i<=m;i++)
    {
        if(to[a[i][1]][a[i][0]]^ao[a[i][0]][a[i][1]])puts("diff");
        else puts("same");
    }
}


Measured memory_bytes: 18416
<?php /*atcoder.php*/

$at = new Atcoder();
$at->main();
unset($at);

class Atcoder{
	private function arrayIn(){
		$buf = explode(" ", fgets(STDIN));
		return $this->killNewLine($buf);
	}
	private function killNewLine($buf = null){
		$buf = str_replace("\r\n", "", $buf);
		$buf = str_replace("\n", "", $buf);
		$buf = str_replace("\r", "", $buf);
		return $buf;
	}

	public function main(){
		$t = $this->arrayIn();
		
		sort($t);
		
		$ans = 0;

		$ans = $t[2] - $t[1];
		$ans += $t[1] - $t[0];

		echo $ans . "\n";
	}
}
?>


Measured memory_bytes: 4732
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <tuple>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <numeric>
#include <string.h>
#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define repn(i, x) for (int i = 1; i <= (int)(x); i++)
#define repr(i, x) for (int i = ((int)(x) - 1); i >= 0; i--)
#define reprn(i, x) for (int i = ((int)(x)); i > 0; i--)
#define all(x) (x).begin(),(x).end()
typedef long long int64;
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const long long INFL = 1e18;
const int MOD = 1000000007;
const int MAX = 210000;
struct Edge {
	int to;
	int id;
};
vector<vector<Edge>> g;
vector<int> ans;

int64 gcd(int64 a, int64 b) {
    return b != 0 ? gcd(b, a % b) : a;
}

int64 lcm(int64 a, int64 b) {
		return a / gcd(a, b) * b;
}

//逆元を求める関数
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++) {
      fac[i] = fac[i-1] * i % MOD;
      inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
      finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
//組み合わせ
long long COM (int n, int k) {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n-k] % MOD) % MOD;
}

void dfs(int p, int c = -1, int q = -1) {
	int k = 1;
	rep (i, g[p].size()) {
		int np = g[p][i].to; int ni = g[p][i].id;
		if (np == q) continue;
		if (c == k) k++;
		ans[ni] = k; k++;
		dfs(np, ans[ni], p);
	}
}

void solve() {
		int n; cin >> n;
		g.resize(n);
		ans = vector<int>(n - 1);
		rep (i, n - 1) {
			int a, b; cin >> a >> b;
			a--; b--;
			g[a].push_back({b, i});
			g[b].push_back({a, i});
		}
		dfs(0);
		int output = -1;
		rep (i, n - 1) {
			output = max(output, ans[i]);
		}
		cout << output << endl;
		rep (i, n - 1) {
			cout << ans[i] << endl;
		}
    return;
}

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



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

int main() {
  string N;
  cin>>N;
  if(N.at(0)==N.at(1) && N.at(1)==N.at(2)) cout<<"Yes"<<endl;
  else if(N.at(1)==N.at(2) && N.at(2)==N.at(3)) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

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

using namespace std;

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

int main() {
  
  int N;
  while(cin >> N && N) {
    string s; cin >> s;
    vector<int> player(N);
    int const size = s.size();
    int onfield = 0;
    int turn = 0;
    rep(i, size) {
      if(s[i] == 'M') {
        player[turn] ++;
      }
      if(s[i] == 'L') {
        player[turn] += onfield + 1;
        onfield = 0;
      }
      if(s[i] == 'S') {
        player[turn] ++;
        onfield += player[turn];
        player[turn] = 0;
      }
      (++turn) %= N;
    }
    sort(player.begin(), player.end());
    rep(i, N) {
      cout << player[i];
      cout << " ";
    }
    cout << onfield << endl;
  }
  
  return 0;
}

Measured memory_bytes: 1224
using System;

namespace Welcome_to_AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            string firstLine = Console.ReadLine();
            var firstLineArray = firstLine.Split(' ');
            var numberOfPoint = int.Parse(firstLineArray[0]);
            var dimension = int.Parse(firstLineArray[1]);

            var pointArray = new int[numberOfPoint + 1, dimension];

            for (int i = 0; i < numberOfPoint; i++)
            {
                string line = Console.ReadLine();
                var lineArray = line.Split(' ');
                for (int j = 0; j < lineArray.Length; j++)
                {
                    pointArray[i, j] = int.Parse(lineArray[j]);
                }
            }

            //先頭の点の情報を最後の点のあとに挿入
            for (int i = 0; i < dimension; i++)
            {
                pointArray[numberOfPoint, i] = pointArray[0, i];
            }

            var numberOfInteger = 0;
            for (int i = 0; i < numberOfPoint; i++)
            {
                for (int j = i + 1; j < numberOfPoint; j++)
                {
                    double result = 0;
                    for (int k = 0; k < dimension; k++)
                    {
                        result += Math.Pow(pointArray[i, k] - pointArray[j, k], 2);
                    }

                    var sqrt = Math.Sqrt(result);
                    if (sqrt == (int)sqrt)
                    {
                        numberOfInteger++;
                    }
                }
            }

            Console.WriteLine(numberOfInteger);
        }
    }
}


Measured memory_bytes: 11092
s=0
primes=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]

def warimakuri(N,a,s):
  if N==0:
    return s
  else:
    N=N//a
    s+=N
    return warimakuri(N,a,s)
N=int(input())
mod=1000000007
ans=1
for i in primes:
  if i<=N:
    s=0
    ans=ans*(warimakuri(N,i,s)+1)
    ans=ans%mod
print(ans)

Measured memory_bytes: 62412
#include<iostream>
using namespace std;
int main(){
  long A, B, K;
  cin>>A>>B>>K;
  if(A>=K){
    cout<<(A-K)<<" "<<B;
    return 0;
  }else if(B>(K-A)){
    cout<<0<<" "<<(B-(K-A));
    return 0;
  }else{
    cout<<0<<" "<<0;
    return 0;
  }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(long long i=0;i<x;i++)
#define repn(i,x) for(long long i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
vector<pair<string,P> >vec;
// vector<vector<int>> data(3, vector<int>(4));

void solve(long long N, vector<long long> A){
	ll len = 0, now = 0;
	rep(i, N) {
		len += A[i];
	}
	ll m = len;
	rep(i, N) {
		now += A[i];
		if (abs(len-2*now) <= abs(len-2*m)) m = now;
	}
	cout << abs(len-2*m) << endl;
}

int main(){	
	long long N;
	scanf("%lld",&N);
	vector<long long> A(N-1+1);
	for(int i = 0 ; i <= N-1 ; i++){
		scanf("%lld",&A[i]);
	}
	solve(N, A);
	return 0;
}



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

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    char b,c[128];
    c['A'] = 'T';
    c['T'] = 'A';
    c['C'] = 'G';
    c['G'] = 'C';
    cin >> b;
    cout << c[(int)b] << endl;
    return 0;
}


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

namespace CRectangleCutting
{
    class Program
    {
        static void Main(string[] args)
        {
            // 入力の取得
            var inputs = Console.ReadLine().Split().Select(long.Parse).ToArray();
            var width = inputs[0];
            var height = inputs[1];
            var x = inputs[2];
            var y = inputs[3];

            // 長方形内であれば、二等分する直線を引くことができるはず
            var rectangleSize = width * height;
            var maxSplitSize = (double)rectangleSize / 2;
            
            // 複数の二等分線を引けるのは長方形の中心点のみ
            var isCenter = false;
            if (width % 2 == 0 && height % 2 == 0)
            {
                isCenter = width / 2 == x && height / 2 == y;
            }

            // 解答の出力
            Console.WriteLine("{0} {1}", maxSplitSize, isCenter ? 1 : 0);
        }
    }
}


Measured memory_bytes: 13396
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<unordered_map>
#include<random>
#include<array>
#include<cassert>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())





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

	int n;
	cin >> n;
	cout << n * n * n << endl;



	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define endl "\n"
#define pb push_back
#define f(i,n) for(i=0;i<n;i++)
#define F(i,a,b) for(i=a;a<=b;i++)
#define arr(a,n) for( i=0;i<n;i++)cin>>a[i];
#define fi first
#define se second
#define mp make_pair
#define mod 1000000007
#define YES cout<<"YES"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define No cout<<"No"<<endl;
#define yes cout<<"yes"<<endl;
#define no cout<<"no"<<endl;
#define vi vector<ll>
#define ed end()
#define bg begin()
#define sz size()
#define ln length()
#define s() sort(a,a+n);
#define sr() sort(a,a+n,greater<ll>());
#define v()  sort(v.begin(),v.end());
#define vr() sort(v.begin(),v.end(),greater<ll>());
#define mod 1000000007
#define fast() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
ll gcd(ll a, ll b){if(!b)return a;return gcd(b, a % b);}
ll power(ll x,ll y,ll p){ll res=1;x%=p;while(y>0){if(y&1)res=(res*x)%p;y=y>>1;x=(x*x)%p;}return res;}
int main() {
	/*#ifndef ONLINE_JUDGE
	    // for getting input from input.txt
	    freopen("input.txt", "r", stdin);
	    // for writing output to output.txt
	    freopen("output.txt", "w", stdout);
	#endif*/
fast();
{
	ll n=1000000;
	 ll prime[1000000];
	 vector<ll>v;
	 for(int i=1;i<n;i++)
	 {
	 	prime[i]=1;
	 }
	 //memset(prime,1,sizeof(prime));
	 for(int i=2;i<=sqrt(n);i++)
	 {
          if(prime[i])
          {
             //prime[i]=1;
            for(int j=i*i;j<n;j+=i)
             {
             	prime[j]=0;
              }
	      }
     }
	 for(int i=2;i<n;i++)
	 {
	 	if(prime[i])
	 	{
              v.pb(i);
	 	}
	 }
	 /*for(int i=0;i<12;i++)
	 {
	 	cout<<v[i]<<" ";
	 }
	 cout<<endl;*/

     ll x;
     cin>>x;
     if(prime[x])
     {    
     	//cout<<"prime " << prime[x]<<endl;
     	cout<<x << endl;
     }
     else
     {    vector<ll>::iterator upper;
     	upper = upper_bound (v.begin(), v.end(), x);
     	int index=v[upper-v.begin()];
     	//cout<<"index "<< index << endl;
     	cout << index << endl;
     }

}
return 0;
}

Measured memory_bytes: 9208
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
  long N;
  cin>>N;
  vector<string> v;
  for(long i=0;i<N;i++){
    string x;
    cin>>x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  long cnt=1;
  for(long i=0;i<=N-2;i++){
    if(v[i]!=v[i+1]){
      cnt++;
    }
  }
  cout<<cnt;
  return 0;
}


Measured memory_bytes: 11656
N=int(input())

A=1
B=1
for _ in range(N):
    x,y=map(int,input().split())
    na=A//x if A%x==0 else A//x+1
    nb=B//y if B%y==0 else B//y+1
    n=max(na, nb)
    A=n*x
    B=n*y

print(A+B)


Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define int long long
int n;
int a[222222];
map<int,int>mp;
signed main(){
	cin>>n;
	rep(i,n)cin>>a[i];
	for(int i=1;i<n;i++)a[i]+=a[i-1];
	rep(i,n)mp[a[i]]++;
	int ans=0;
	for(auto p:mp){
		if(p.first==0)ans+=(p.second+1)*p.second/2;
		else ans+=(p.second)*(p.second-1)/2;
	}
	cout<<ans<<endl;
	return 0;
}


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

ll m,n;
ll  a[102];

void solve(){
    cin >> n >> m;
    ll s=0;
    for(int i=0;i<n;++i) {
        cin >> a[i];
        s+=a[i];
    }
    s = (s + 4*m - 1)/(4*m);
    ll cnt=0;
    for(int i=0;i<n;++i)
        cnt += (a[i]>=s);
    cout << (cnt >= m  ?  "Yes" : "No") << "\n";
}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    while(t--)
        solve();
    return  0;
}


Measured memory_bytes: 3652
#include <stdio.h>
#include <inttypes.h>

int main(void)
{
    uint_fast8_t a[26] = { 0 };
    char s[27];
    scanf("%s", s);
    char *p = s;
    while (*p != '\0') {
        if (++a[*p++ - 'a'] > 1) {
            puts("no");
            return 0;
        }
    }
    puts("yes");
    return 0;
}


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

int main(){
  int a, b, a_c, b_c;
  
  cin >> a >> b;
  
  string c, d, as, bs;
  
  a_c = a;
  b_c = b;
  
  as = std::to_string(a);
  bs = std::to_string(b);
  
  for(int i=0; i<b_c; i++){
    c.append(as);
  }
  
  for(int i=0; i<a_c; i++){
  	d.append(bs);
  }
  
  if(c.length() > d.length() || c.length() == d.length()){
    cout << c << endl;
  }
  else{
    cout << d << endl;
  }
}


Measured memory_bytes: 256
fun main(args: Array<String>) {
    readLine()!!.toInt()
    val s = readLine()!!
    var ans = 0
    var preC = '1'
    for (c in s) {
        if (preC != c) {
            ans++
        }

        preC = c
    }

    println(ans)
}

fun readStrings() = readLine()!!.split(" ")


Measured memory_bytes: 34324
import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n=sc.nextInt();
        int[] arr=new int[n];
        int sum=0;
        for(int i=0;i<arr.length;i++) {
            arr[i] = sc.nextInt();
        }
        Arrays.sort(arr);
        
        for(int j=0;j<arr.length;j++) {
            if(j==arr.length-1) {
                sum=sum+arr[j]/2;
            } else {
                sum =sum+arr[j];
            }
            
        }
        System.out.println(sum); 
    }
}

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

// ----------- define --------------
#define int long long
#define vi vector<int>
#define vc vector<char>
#define ii pair<int,int>
#define fi first
#define sc second
#define stoi stoll
#define all(x) (x).begin(),(x).end()
#define get_bit(x, k) ((x >> k) & 1)
// ---------------------------------                             

void MAIN() {
  int s; cin >> s;
  int v = 1e9;
  int x = (v - (s % v)) % v;
  int y = (s + x) / v;
  cout << "0 0 1000000000 1 " << x << ' ' << y << '\n';
}

signed main() {
  ios::sync_with_stdio(0); cin.tie(0);
  int T = 1;
  // cin >> T;
  while (T--) MAIN();
}


Measured memory_bytes: 3652
#include<iostream>
#include<set>
using namespace std;

int nlist[1010];

int abs(int a){
  return ((a > 0) ?(a) : (-(a)));
}

int parent(int i){
  if(nlist[i] == i) return i;
  return (nlist[i]=parent(nlist[i]));
}

int main(){
  int v,d;
  int fib[1010];
  fib[0]=fib[1]=1;
  for(int i=2;i<1010;i++){
    fib[i] = (fib[i-1]+fib[i-2])%1001;
  }
  while(cin>>v>>d){
    set<int> s;
    for(int i=0;i<v;i++) nlist[i]=i;
    for(int i=0;i<v;i++){
      for(int j=i+1;j<v;j++){
	if(abs(fib[i+2]-fib[j+2]) < d){
	  nlist[parent(j)] = parent(nlist[i]);
	}      
      }
    }
    for(int i=0;i<v;i++) s.insert(parent(i));
    cout<<s.size()<<endl;
  }
  return 0;
}

Measured memory_bytes: 1204
#include <iostream>
 
#include <map>
#include <unordered_map>
#include <algorithm>
#include <vector>
 
#define int long long
 
using namespace std;
//const char a[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
const int maxN=50;
int dp[maxN+1][maxN+1][maxN*maxN+1];
 
void solver() {
    
    int n,p;
    cin>>n>>p;
    int arr[maxN];
    
    for(int i=0;i<n;i++)
    {
        cin>>arr[i];
    }
    for(int i=0;i<=n;i++)
    {
        dp[i][0][0]=1;
    }
    for(int i=1;i<=n;i++)
    {
        for(int j=1;j<=i;j++)
        {
            for(int k=0;k<=maxN*maxN;k++)
            {
                if(k<arr[i-1])
                {
                    dp[i][j][k]=dp[i-1][j][k];
                    continue;
                }
                dp[i][j][k]=dp[i-1][j-1][k-arr[i-1]]+dp[i-1][j][k];
            }
        }
    }
    int ans=0;
    for(int i=1;i<=n;i++)
    {
        ans+=dp[n][i][p*i];
    }
    cout<<ans;
    
}
 
 
int32_t main() {
    int n=1;
    //cin>>n;
    while(n--)
    {
        solver();
    }
}

Measured memory_bytes: 28528
#include <cstdio>
using namespace std;
int n,t,a,b,ans=20000000;
int main(){
	scanf("%d%d",&n,&t);
	for(int i=1;i<=n;i++){
		scanf("%d%d",&a,&b);
		if(b<=t) ans=ans<a?ans:a;
	}
	if(ans==20000000) printf("TLE\n");
	else printf("%d\n",ans);
	return 0;
}

Measured memory_bytes: 128