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

public class Main {
	static int mod = (int) 1e9 + 7;
	static int DX[] = { -1, 0, 1, 0 }, DY[] = { 0, -1, 0, 1 };
	static int n , k ,d[],min;
	static Set<Integer> set;
	public static void main(String[] args) {
		FastScanner fs = new FastScanner(System.in);
		n = fs.nextInt();
		k = fs.nextInt();
		d = fs.nextIntArray(k);
		set = new HashSet<>();
		for(int i=0;i<10;i++) {
			set.add(i);
		}
		for(int t:d)set.remove(t);
		min = Integer.MAX_VALUE/2;
		dfs(0);
		System.out.println(min);
		
	}
	
	static void dfs(int t) {
		if(t>=n) {
			min = Math.min(min,t);
			return;
		}
		t *= 10;
		for(int s:set) {
			if(t+s==0)continue;
			dfs(t+s);
		}
	}
	
}

//高速なScanner
class FastScanner {
	private BufferedReader reader = null;
	private StringTokenizer tokenizer = null;

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

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

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

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

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

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

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

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

Measured memory_bytes: 22740
n, m, k = map(int, input().split())
alst = list(map(int, input().split()))
blst = list(map(int, input().split()))

asum = [0]
bsum = [0]

for i, new in enumerate(alst):
    if asum[i] + new <= k:
        asum.append(asum[i] + new)
    else:
        break
for i, new in enumerate(blst):
    if bsum[i] + new <= k:
        bsum.append(bsum[i] + new)
    else:
        break

bmax = len(bsum)-1
ans = 0

for i, atime in enumerate(asum):
    while atime + bsum[bmax] > k:
        bmax -= 1
    ans = max(ans, i+bmax)

print(ans)

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


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;
}
ll modinv(ll a, ll m){
    ll b = m, u = 1, v = 0;
    while(b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if(u < 0) u += m;
    //cout << u << endl;
    return u;
}

ll paty_counter(ll level, ll x){
    ll size = pow(2, level+2) - 3;
    ll pmi = pow(2, level) - 1;
    if(x == 0){
        return 0;
    }else if(level == 0){    
        return 1;
    }else{
        if(x <= (size - 1)/2){
            return paty_counter(level-1, x-1);
        }else{
            return pmi + 1 + paty_counter(level-1, x - pow(2, level+1) + 3 - 2);
        }
    }

}
 
using namespace std;
using Graph = vector<vector<int>>;

// 深さ優先探索
vector<bool> seen;
static ll x;
void dfs(const Graph &G, int v) {
    seen[v] = true;
    for (auto next_v : G[v]) { 
        if (seen[next_v]) continue;
        dfs(G, next_v); // 再帰的に探索
        x ++;
    }
}

ll fr(ll n){
    ll ans = 1;
    REP(i, n){
        ans *= i+1;
        ans %= MOD;
    }
    return ans;
}

ll conb(ll n, ll k){
    return fr(n)% MOD * modinv(fr(k) * fr(n-k) % MOD, MOD) % MOD;
}




int main() {
    string ans;
    int k;
    cin >> k;
    REP(i, k) ans += "ACL";
    cout << ans << endl; 
}



Measured memory_bytes: 3508
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;cin>>N;
  string ans="No";
  while(N>0){
    if(N%4==0)ans="Yes";
    if(N%7==0)ans="Yes";
    N-=7;
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<cmath>
using namespace std;
typedef unsigned long long ullong;

ullong GCD(ullong a, ullong b){
  if(b == 0)
    return a;
  return GCD(b, a % b);
}

ullong LCM(ullong a, ullong b){
  if(a > b)
    return a * b / GCD(a, b);
  else
    return a * b / GCD(b, a);
}

int main(){
  int n;
  cin >> n;
  ullong result, a, b;
  cin >> a >> b;
  result = LCM(a, b);
  for(int i = 0; i < n - 2; i++){
    cin >> a;
    result = LCM(result, a);
  }
  cout << result << endl;
}

Measured memory_bytes: 1168
#include <bits/stdc++.h>
using namespace std;
struct Fast { Fast() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20);} } fast;


int main() {
    string s;
    cin >> s;
    for (int i = 0; i < 4; i++){
        if ( s[i] == s[i + 1]){
            cout << "Bad" << endl;
            return 0;
        }
    }
    cout << "Good" << endl;
}


Measured memory_bytes: 256
import java.util.*;
public class Main { 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int len = sc.nextInt();
        int k = sc.nextInt();
        String str = sc.next();
        int leftIdx = 0;
        int cnt = 0;
        int maxLen = 0;
        for(int i = 0; i < len; i++) {
          char ch = str.charAt(i);
          if(ch == '0') {
            cnt++;
            while(i < len - 1 && str.charAt(i+1) == '0') {
              i++;
            }
          }
          while(cnt > k) {
            if(str.charAt(leftIdx) == '0') {
              cnt--;
              while(leftIdx < i && str.charAt(leftIdx) == '0') {
                leftIdx++;
              }
            } else {
              leftIdx++;
            }
          }
          maxLen = Math.max(maxLen, i - leftIdx + 1);
        }
        System.out.println(maxLen);
    }
}

Measured memory_bytes: 24740
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define rep(i,n) for(ll i=0;i<n;++i)
#define ocut cout
#define ouct cout
#define itn int

struct Union{
  vector<ll> par;
  Union(ll a){
  par=vector<ll>(a,-1);
  }
  ll find(ll a){
    if(par[a]<0){
      return a;
    }
    else{
      return par[a]=find(par[a]);
    }
  }
  bool same(ll a,ll b){
    return (find(a)==find(b));
  }
  ll size(ll a){
    return -par[find(a)];
  }
  void unite(ll a,ll b){
    ll c=find(a),d=find(b);
    if(c==d)
      return;
    if(size(c)<size(d)){
      swap(c,d);
    }
    par[c]+=par[d];
    par[d]=c;
  }
};
ll Nagaemon1;
void swap(ll i,ll j){
  Nagaemon1=i;
  i=j;
  j=Nagaemon1;
}
ll euclidean_gcd(ll a, ll b) {
  if(a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
int main(void){
  char s;
  cin >> s;
  if('a'<=s&&s<='z')cout << 'a';
  else cout << 'A';
}

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

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

    ll ans = k;
    for(int i = 0; i < n-1; i++){
        ans *= k - 1;
    }

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


Measured memory_bytes: 256
H,W = map(int, raw_input().split())
c = [map(int, raw_input().split()) for _ in range(10)]
A = [map(int, raw_input().split()) for _ in range(H)]

for i in range(10):
  for j in range(10):
    for k in range(10):
      c[j][k] = min(c[j][k], c[j][i]+c[i][k])
print sum(sum(c[a][1] if a>=0 else 0 for a in aa) for aa in A)


Measured memory_bytes: 2948
#include <algorithm>
#include <cstring>
#include <cstdio>

using namespace std ;

const int N=1e6+10 ;

char s[N] , t[N] ;
int n ;

int main ()
{
	int i ;
	scanf(" %d %s %s ",&n,s+1,t+1);
	for ( i=1 ; i<=n ; i++ )
		putchar(s[i]),
		putchar(t[i]);
	putchar('\n');
	return 0 ;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int n;
int main() {
	cin >> n;
	if (n % 2 == 0)
		cout <<  fixed << setprecision(10) << double(n / 2) / n;
	else
		cout <<  fixed << setprecision(10) << double((n + 1) / 2) / n;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; 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 each(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define df(x) int x = in()
#define dame { puts("-1"); return 0;}
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,vector<T>,greater<T> >
#define bn(x) ((1<<x)-1)
#define newline puts("")
#define v(T) vector<T>
#define vv(T) vector<vector<T>>
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() { int x; scanf("%d",&x); return x;}
inline void priv(vi a) { rep(i,sz(a)) printf("%d%c",a[i],i==sz(a)-1?'\n':' ');}
template<typename T>istream& operator>>(istream&i,vector<T>&v)
{rep(j,sz(v))i>>v[j];return i;}
template<typename T>string join(const vector<T>&v)
{stringstream s;rep(i,sz(v))s<<' '<<v[i];return s.str().substr(1);}
template<typename T>ostream& operator<<(ostream&o,const vector<T>&v)
{if(sz(v))o<<join(v);return o;}
template<typename T1,typename T2>istream& operator>>(istream&i,pair<T1,T2>&v)
{return i>>v.fi>>v.se;}
template<typename T1,typename T2>ostream& operator<<(ostream&o,const pair<T1,T2>&v)
{return o<<v.fi<<","<<v.se;}
const int MX = 2005, INF = 1001001001;
const ll LINF = 1e18;
const double eps = 1e-10;

const int M = MX*MX;

int main() {
  int n;
  scanf("%d",&n);
  vi a(n);
  cin>>a;
  int sum = 0;
  rep(i,n) sum += a[i];
  bitset<M> dp;
  dp[0] = 1;
  rep(i,n) dp |= dp<<a[i];
  for (int i = (sum+1)/2; i < M; ++i) {
    if (dp[i]) {
      cout<<i<<endl;
      return 0;
    }
  }
  return 0;
}






















Measured memory_bytes: 1664
//%std
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define y1 ysgh
inline int read()
{
	int out = 0, fh = 1;
	char jp = getchar();
	while ((jp > '9' || jp < '0') && jp != '-') jp = getchar();
	if (jp == '-')
	   fh = -1, jp = getchar();
	while (jp >= '0' && jp <= '9') out = out * 10 + jp - '0', jp = getchar();
	return out * fh;
}
void print(int x)
{
	if (x >= 10)
	   print(x / 10);
	putchar('0' + x % 10);
}
void write(int x, char c = '\n')
{
	if (x < 0)
	   putchar('-'), x = -x;
	print(x);
	putchar(c);
}
const int inf = 0x7fffffff;
const int N = 2e5 + 10, K = 32;
int n, T, a[N], b[N], p[N], k;
bool cmp(const int &i, const int &j)
{
	ll A = 1LL * (b[i] + 1) * a[j], B = 1LL * (b[j] + 1) * a[i];
	return A == B ? b[i] < b[j] : A < B;
}
int dp[2][K];
int main()
{
//	freopen("1.in", "r", stdin);
//	freopen("eriri.out", "w", stdout);
	n = read(), T = read();
	for (int i = 1; i <= n; ++i)
		a[i] = read(), b[i] = read();
	iota(p + 1, p + 1 + n, 1);
	sort(p + 1, p + 1 + n, cmp);
	k = 0;
	for (int i = 1; i <= n; ++i)
	{
		if (a[p[i]] == 0)
			break;
		k = i;
	}
	int id = 0;
	for (int j = 0; j < K; ++j)
		dp[id][j] = T + 1;
	dp[id][0] = 0;
	for (int i = 1; i <= k; ++i)
	{
		for (int j = 0; j < K; ++j)
			dp[id ^ 1][j] = dp[id][j];
		for (int j = 0; j < K - 1; ++j)
			if (dp[id][j] < T)
			{
				ll t = 1 + 1LL * a[p[i]] * (1 + dp[id][j]) + b[p[i]];
				if (t + dp[id][j] <= T)
					dp[id ^ 1][j + 1] = min(dp[id ^ 1][j + 1], (int)(t + dp[id][j]));				
			}
		id ^= 1;
	}
	int ans = 0;
	for (int j = 0; j < K; ++j)
		if (dp[id][j] <= T)
		{
			int s = j, cur = dp[id][j];
			for (int i = k + 1; i <= n; ++i)
			{
				int t = 1 + b[p[i]];
				if (t + cur > T)
					break;
				cur += t, ++s;
			}
			ans = max(ans, s); 
		}
	write(ans);
	return 0;
}


Measured memory_bytes: 5920
n,k=map(int,input().split())
p=list(map(int,input().split()))
M=sum(p[0:k])
if(n>k):
  m=M
  for i in range(1,n-k+1):
    m=m+p[i+k-1]-p[i-1]
    M=max(M,m)
print((M+k)/2)


Measured memory_bytes: 24556
#include <iostream>
#include <string>
#define MAX 30
#define rep(i,p) for(int i=0;i<p;i++)
using namespace std;
int W,H,count,yoko,tate;
int person_now_x,person_now_y;
char input;
bool masu[MAX][MAX];
bool visit[MAX][MAX];
// ?§???? {?????????????????????}
const int dx[] = {1,0,-1,0};
const int dy[] = {0,-1,0,1};
void dfs (int x, int y) {
  // start : (x y)
  visit[x][y] = true;
  count++;
  rep(i,4) {
    yoko = x+dx[i];
    tate = y+dy[i];
    if ( masu[yoko][tate] and !visit[yoko][tate] ) dfs(yoko,tate);
  }
}
int main(){
  while(1) {
    // W ?¨?
    // H ???
    cin >> W >> H;
    if (W==0 and H==0) break;
    // ?????????
    count = 0;
    rep(i,MAX) rep(j,MAX) masu[i][j] = false;
    rep(i,MAX) rep(j,MAX) visit[i][j] = false;
    // . true  black
    // # false red
    // @ true  person on black
    // ????????????????????????????????????????????´????????????????????¨????????±???
    for (int i=1; i<=H; i++)
      for (int j=1; j<=W; j++) {
        cin >> input;
        if (input == '.') masu[i][j] = true;
        else if (input == '#') masu[i][j] = false;
        else {
          person_now_x = i;
          person_now_y = j;
          masu[i][j] = true;
        }
      }
    dfs(person_now_x,person_now_y);
    cout << count << endl;
  }
  return 0;
}

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

#ifdef LOCAL 
string to_string(char a) { return string(1,a); }
string to_string(bool a) { return a ? "1" : "0"; }
string to_string(const char* a) { return (string)a; }
string to_string(string a) { return a; }
string to_string(vector<bool> v) {
	string s = "["; for(unsigned i=0;i<v.size();i++){ s += ((i>0)?" ":"");
    s += char('0'+v[i]); } 	s += "]"; return s; }
template<class A, class B> string to_string(pair<A,B> p);
template<class T> string to_string(T v) {
	bool b = 1; string s = "["; for (const auto& x: v) {
		if (!b) {s += ", ";} b = 0; s += to_string(x); } s += "]"; return s; }
template<class A, class B> string to_string(pair<A,B> p) {
	return "("+to_string(p.first)+", "+to_string(p.second)+")"; }
void dbgf() { cerr << endl; }
template<class H, class... T> void dbgf(H h, T... t) {
	cerr << to_string(h); if (sizeof...(t)) cerr << ", ";
	dbgf(t...); }
#define dbg(...) cerr << #__VA_ARGS__ << " = ", dbgf(__VA_ARGS__)
#else
#define dbg(...) 0
#endif
#define boolout(x) cout<<(x?"YES":"NO")<<endl;
typedef long long ll;

const int mod = 1e9+7;

void add_self(int &a, int b){
    a+=b;
    if (a>=mod) {
        a-=mod;
    }
}

vector<ll> dp;
vector<ll> pre;

void rec(int i, const vector<int> &not_taken, ll score_so_far, int mask, int group){
    if (i == (int) not_taken.size()) {
        dp[mask] = max(score_so_far + pre[group], dp[mask]);
        return;
    }
    rec(i+1, not_taken, score_so_far, mask, group);
    rec(i+1, not_taken, score_so_far, mask|(1<<not_taken[i]), group | (1<<not_taken[i]));
}

void solve()
{
    int n;
    cin >> n;
    vector<vector<ll>> a(n, vector<ll>(n));
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < n; ++j) {
            cin >> a[i][j];
        }
    }

    pre.resize(1<<n);
    for (int mask = 0; mask < (1<<n); ++mask) {
        for (int i = 0; i < n; ++i) {
            if (mask & (1<<i)) {
                for (int j = i+1; j < n; ++j) {
                    if (mask & (1<<j)) {
                        pre[mask] += a[i][j]; 
                    }
                }
            }
        }
    }
    dbg(pre);

    ll INF = 1e18 + 123;;
    dp.resize(1 << n, -INF);
    dp[0]=0;
    for (int mask = 0; mask < (1<<n); ++mask) {
        vector<int> not_taken;
        for (int i = 0; i < n; ++i) {
            if (!(mask & (1<<i))) {
                not_taken.push_back(i);
            }
        }
        rec(0, not_taken, dp[mask], mask, 0);
    }

    
    dbg(dp);
    cout << dp[(1<<n)-1] << endl;


}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t=1;
    //cin >> t; // read t. cin knows that t is an int, so it reads it as such.
    for (int i = 1; i <= t; ++i) {
        solve();
    }
    return 0;
}



Measured memory_bytes: 4240
import java.util.ArrayDeque

data class Edge(val to: Int)

fun main(args: Array<String>){
    val (N, Q) = readLine()!!.split(" ").map(String::toInt)
    val neighbors = Array(N){ mutableListOf<Edge>() }
    repeat(N - 1){
        val (A, B) = readLine()!!.split(" ").map(String::toInt)
        neighbors[A - 1].add(Edge(B - 1))
        neighbors[B - 1].add(Edge(A - 1))
    }
    
    val points = IntArray(N)
    repeat(Q) {
        val (P, X) = readLine()!!.split(" ").map(String::toInt)
        points[P - 1] += X
    }

    val queue = ArrayDeque(listOf(0))
    val visited = BooleanArray(N){ false }
    while(queue.isNotEmpty()){
        val cur = queue.poll()
        visited[cur] = true
        neighbors[cur].forEach {
            if(!visited[it.to]){
                points[it.to] += points[cur]
                queue.add(it.to)
            }
        }
    }
    println(points.joinToString(separator = " "))
}

Measured memory_bytes: 148600
#include <iostream>
#include <stack>
using namespace std;
int main(void){
  stack<int> s;
  int n;
  while(cin>>n){
    if(n)
      s.push(n);
    else{
      cout<<s.top()<<endl;
      s.pop();
    }
  }
  return 0;
}

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

int main(){
  int N, ans = 0;
  cin >> N;
  
  vector<int> A(N);
  
  for (int i = 0; i < N; i++){
    cin >> A.at(i);
  }
  
  for (int i = 0; i < N; i++){
    if (i % 2 == 0 && A.at(i) % 2 == 1){
      ans++;
    }
  }

  cout << ans << endl;
}

Measured memory_bytes: 3596
A_cards = list(input())
B_cards = list(input())
C_cards = list(input())
who = "a"
while(True):
    if(who == "a"):
        if(len(A_cards)==0):
            print("A")
            exit()
        else:
            who = A_cards[0]
            del A_cards[0]
    if(who == "b"):
        if(len(B_cards)==0):
            print("B")
            exit()
        else:
            who = B_cards[0]
            del B_cards[0]
    if(who == "c"):    
        if(len(C_cards)==0):
            print("C")
            exit()
        else:
            who = C_cards[0]
            del C_cards[0]



Measured memory_bytes: 3064
package main

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

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

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

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	s := scanRunes()

	st := []rune{}
	ans := 0
	for i := 0; i < len(s); i++ {
		now := s[i]
		if len(st) != 0 && st[len(st)-1] != now {
			ans += 2
			st = st[0 : len(st)-1]
		} else {
			st = append(st, now)
		}
	}

	fmt.Fprintln(wr, ans)
}


Measured memory_bytes: 3712
import math

a, b, c = map(int, input().split())

if 4 * a * b < (c - a - b) ** 2:
    if c - a - b < 0:
        if 2 * math.sqrt(a * b) < c - a - b:
            print('Yes')
        else:
            print('No')
    else:
        print('Yes')
else:
    print('No')


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

int main() {
  string n;
  cin >> n;
  int l = n.size();
  l--;
  
  if(n.at(l) == '2' || n.at(l) == '4' || n.at(l) == '5' || n.at(l) == '7' || n.at(l) == '9')
    cout << "hon" << endl;
  else if(n.at(l) == '0' || n.at(l) == '1' || n.at(l) == '6' || n.at(l) == '8')
    cout << "pon" << endl;
  else if(n.at(l) == '3')
    cout << "bon" << endl;
  
}

Measured memory_bytes: 3600
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define MAX 1001
#define ll long long
#define dmp make_pair
#define dpb push_back
#define P pair<int,int>
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);
const int inf = 1e9;
const ll INF = 1e18;
const int size = 6002;
#define B 100

int n, dy[4] = {0, -1, 1, 0}, dx[4] = {-1, 0, 0, 1};
queue<P> q;
int X1[MAX], X2[MAX], Y1[MAX], Y2[MAX];
bool a[size][size];
int compress1(int w){
	vector<int> xs;
	for(int i = 0;i < n;i++){
		for(int j = -1;j <= 1;j++){
			int t1 = X1[i]+j, t2 = X2[i]+j;
			if(0 <= t1 && t1 <= w)xs.push_back(t1);
			if(0 <= t2 && t2 <= w)xs.push_back(t2);
		}
	}
	sort(xs.begin(), xs.end());
	xs.erase(unique(xs.begin(), xs.end()), xs.end());
	for(int i = 0;i < n;i++){
		X1[i] = find(xs.begin(), xs.end(), X1[i])-xs.begin()+1;
		X2[i] = find(xs.begin(), xs.end(), X2[i])-xs.begin()+1;
	}
	return xs.size()-1;
}

int compress2(int h){
	vector<int> xs;
	for(int i = 0;i < n;i++){
		for(int j = -1;j <= 1;j++){
			int t1 = Y1[i]+j, t2 = Y2[i]+j;
			if(0 <= t1 && t1 <= h)xs.push_back(t1);
			if(0 <= t2 && t2 <= h)xs.push_back(t2);
		}
	}
	sort(xs.begin(), xs.end());
	xs.erase(unique(xs.begin(), xs.end()), xs.end());
	for(int i = 0;i < n;i++){
		Y1[i] = find(xs.begin(), xs.end(), Y1[i])-xs.begin()+1;
		Y2[i] = find(xs.begin(), xs.end(), Y2[i])-xs.begin()+1;
	}
	return xs.size()-1;
}

void paint(){
	for(int i = 0;i < n;i++){
		for(int y = Y1[i];y < Y2[i];y++){
			for(int x = X1[i];x < X2[i];x++){
				a[y][x] = 1;
			}
		}
	}
}

int bfs(int w, int h){
	int ans = 0, tx, ty, yy, xx;
	for(int y = 1;y <= h;y++){
		for(int x = 1;x <= w;x++){
			if(a[y][x])continue;
			q.push(dmp(y, x));
			ans++;
			while(!q.empty()){
				P p = q.front();q.pop();
				yy = p.fi;xx = p.se;
				a[yy][xx] = true;
				for(int i = 0;i < 4;i++){
					ty = yy+dy[i];tx = xx+dx[i];
					if(!a[ty][tx]){
						a[ty][tx] = true;
						q.push(dmp(ty, tx));
					}
				}
			}
		}
	}
	return ans;
}

int main(){
	int w, h;
	while(1){
		scanf("%d%d", &w, &h);
		if(!w)break;
		scanf("%d", &n);
		fill((bool*)a, (bool*)(a+size), true);
		rep(i,n){
			scanf("%d%d%d%d", &X1[i], &Y1[i], &X2[i], &Y2[i]);
		}
		
		w = compress1(w);
		h = compress2(h);
		rrep(i,h)rrep(j,w)a[i][j] = false;
		paint();
		int ans = bfs(w, h);
		
		printf("%d\n", ans);
	}
	return 0;
}

Measured memory_bytes: 38412
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <limits>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//math
//-------------------------------------------
template<class T> inline T sqr(T x) { return x * x; }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//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 EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXISTch(s,c) ((((s).find_first_of(c)) != std::string::npos)? 1 : 0)//cがあれば1 if(1)
#define SORT(c) sort((c).begin(),(c).end())

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int INF = (int)1000000007;
const LL MOD = (LL)1000000007;//10^9+7
const LL INF2 = (LL)100000000000000000;//10^18

int main() {
	int n; cin >> n;
	vector<int> v(n);

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

	vector<int> c(n);

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

	int ans = 0;
	for (int i = 0; i < n; i++) {
		if (v[i] - c[i] > 0)ans += v[i] - c[i];
	}

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

Measured memory_bytes: 384
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long ll;

ll a[100010],b[100010];

int main() {
    cin.tie(0); ios_base::sync_with_stdio(false);
    int N; cin >> N;
    for(int i=0;i<N;++i) cin >> a[i] >> b[i];
    ll ans = 0;
    for(int i=N-1;i>=0;--i){
        a[i] += ans;
        if(a[i]==0) continue;
        ans += (a[i]+b[i]-1) / b[i] * b[i] - a[i];
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 1792
#include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <list>
#include <map>
#include <deque>
#include <algorithm>
#include <utility>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
#define for1(i,n) for (ll i=0;i<(n);i++)
#define for2(i,m,n) for (ll i=(m);i<(n);i++)
#define for3(i,m,n,d) for (ll i=(m);i<(n);i+=(d))
#define DEBUG 0
template <class T>
void dumplist(T list)
{
    for (auto item : list) {
        cout << item << " ";
    }
    cout << endl;
}

void solve()
{
    string S;
    cin >> S;
    ll len = S.length();
    ll cnt = 0;
    for1(i,len) {
        if (S[i]=='x') {
            cnt++;
        }
    }
    if (cnt >= 8) {
        cout << "NO" << endl;
        return;
    }
    cout << "YES" << endl;
}

int main()
{
    do {
        solve();
    } while (DEBUG);
}


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

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define deg_to_rad(deg) (((deg) / 360) * 2 * M_PI)
#define rad_to_deg(rad) (((rad) / 2 / M_PI) * 360)

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

typedef long long ll;

void solve(string S) {
  string ans = "Good";
  char prev = 0;
  rep(i, S.size()) {
    if (prev != S[i])
      prev = S[i];
    else
      ans = "Bad";
  }
  cout << ans << endl;
}

int main() {
  string S;
  cin >> S;
  solve(S);
  return 0;
}


Measured memory_bytes: 256
from collections import deque

H, W, K = map(int, input().split())
A = [list(input()) for _ in range(H)]

Si, Sj = (0, 0)
for i, a in enumerate(A):
	if "S" in a:
		Si, Sj = (i, a.index("S"))
		break

dist = float("inf")

Q = deque([(0, Si, Sj)])
while Q:
	cnt, i, j = Q.popleft()

	dist = min(dist, i, j, H - i - 1, W - j - 1)
	if dist == 0:
		break

	if cnt >= K:
		continue

	for ni, nj in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
		if 0 <= ni < H and 0 <= nj < W and A[ni][nj] == ".":
			A[ni][nj] = "#"
			Q.append((cnt + 1, ni, nj))

print(-(-dist // K) + 1)

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

int main()
{
  int N,W;
  int v[101],w[101],T[101][10001];

  cin>>N>>W;
  for(int i=1;i<N+1;i++)cin>>v[i]>>w[i];

  for(int i=0;i<W+1;i++)T[0][i]=0;
  for(int i=1;i<N+1;i++)T[i][0]=0;

  for(int i=1;i<=N;i++){
    for(int j=1;j<=W;j++){
      if(j>=w[i]){
	if(T[i-1][j]<=(T[i-1][j-w[i]]+v[i]))T[i][j]=(T[i-1][j-w[i]]+v[i]);
	else T[i][j]=T[i-1][j];
      }
      else T[i][j]=T[i-1][j];
    }
  }
  cout<<T[N][W]<<endl;
  return 0;
}

Measured memory_bytes: 5104
#include<cstdio>
#include<iostream>
#include<string>
#include <algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<set>
using namespace std;
using ll = long long;

int n, r, a, b;
int t[100];
int u[100], size;
int main() {
	while (cin >> n >> r && n&&r) {
		for (int i = 0; i<n; i++)t[i] = n - i;
		for (int i = 0; i<r; i++) {
			cin >> a >> b;
			for (int j = 0; j<b; j++)u[j] = t[j + a - 1];
			for (int j = a - 2; j >= 0; j--)t[j + b] = t[j];
			for (int j = 0; j<b; j++)t[j] = u[j];
		}
		cout << t[0] << endl;
	}
	return 0;
}


Measured memory_bytes: 3080
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cstring>
#include<math.h>
#include<bitset>
#include<queue>
#include<set>
#include<iomanip>
#include<math.h>
#include<assert.h>
#include<string>
#include<cstdlib>
#include<cctype>
#include<unordered_map>
#include<sstream>
// #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
constexpr ll INF = 1LL << 40;
const double INFD = 1e100;
const ll mod = 1000000007;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
};
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
};

// intやllをstringに変換
template<typename T> inline string toString(const T &a){
  ostringstream oss;
  oss << a;
  return oss.str();
};
// ----------------------------------------------------------------------------
int main(){
  int K,X;
  cin >> K >> X;
  if(K*500 >= X){
    cout << "Yes" << endl;
  }else{
    cout << "No" << endl;
  }
  return 0;
}


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

int main()
{
    int low,i, flag;
    int high=1000000;

    cin >> low;

    while (low < high)
    {
        flag = 0;

        for(i = 2; i <= low/2; ++i)
        {
            if(low % i == 0)
            {
                flag = 1;
                break;
            }
        }

        if (flag == 0)
        {
            cout << low <<endl;
            break;
        }
        else
            ++low;
    }

    return 0;
}


Measured memory_bytes: 3576
#include<iostream>
#include<vector>
using namespace std;

int main(){
    int n, m, x;
    cin >> n >> m >> x;
    vector<vector<int>> a(n, vector<int>(m));
    vector<int> c(n);
    for(int i = 0; i < n; i++){
        cin >> c[i];
        for(int j = 0; j < m; j++)cin >> a[i][j];
    }
    int ans = 12345678;
    int all = 1<<n;
    for(int mask = 0; mask < all; mask++){
        vector<int> level(m);
        int cost = 0;
        for(int i = 0; i < n; i++){
            if((mask>>i)&1){
                cost += c[i];
                for(int j = 0; j < m; j++){
                    level[j] += a[i][j];
                }
            }
        }
        bool ok = true;
        for(int j = 0; j < m; j++){
            if(level[j] < x) ok = false;
        }
        if(ok) ans = min(ans,cost);
    }
    if(ans == 12345678) cout << -1 << endl;
    else cout << ans << endl;
}


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

int n, m, sum;

int main() {
	cin >> n >> m;
	for (int i = 0, a; i < m; i++) {
		cin >> a;
		sum += a;
	}
	cout << (sum <= n ? n - sum : -1) << endl;
}


Measured memory_bytes: 3620
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    while(true){
        int n; cin >> n;
        if(n == 0)break;
        int sum = 0;
        int a[n];
        rep(i,n){
            cin >> a[i];
            sum += a[i];
        }
        int avg = sum / n;
        int ans = 0;
        rep(i,n)if(a[i] <= avg)ans++;
        cout << ans << endl;
    }
    
    return 0;
}
 
 



Measured memory_bytes: 3092
#include <iostream>
using namespace std;
#define MAX 100005
#define NIL -1

struct Node { int p, r, l; };

Node T[MAX];
int n, D[MAX];

void print(int u) {
	int i, c;
	cout << "node " << u << ": ";
	cout << "parent = " << T[u].p << ", ";
	cout << "depth = " << D[u] << ", ";

	if (T[u].p == NIL) cout << "root, ";
	else if (T[u].l == NIL) cout << "leaf, ";
	else cout << "internal node, ";

	cout << "[";

	for (i = 0, c = T[u].l; c != NIL; ++i, c = T[c].r) {
		if (i) cout << ", ";
		cout << c;
	}
	cout << "]" << endl;
}

void rec(int u, int p) {
	D[u] = p;
	if (T[u].r != NIL) rec(T[u].r, p);
	if (T[u].l != NIL) rec(T[u].l, p + 1);
}

int main() {
	int i, j, d, v, c, l, r;
	cin >> n;
	for (i = 0; i < n; ++i) T[i].p = T[i].l = T[i].r = NIL;

	for (i = 0; i < n; ++i) {
		cin >> v >> d;
		for (j = 0; j < d; ++j) {
			cin >> c;
			if (!j) T[v].l = c;
			else T[l].r = c;
			l = c;
			T[c].p = v;
		}
	}
	for (i = 0; i < n; ++i) {
		if (T[i].p == NIL) r = i;
	}

	rec(r, 0);

	for (i = 0; i < n; ++i) print(i);
}


Measured memory_bytes: 7676
bingo = []
for i in range(3):
  bingo.append(input().split(' '))
  
n = int(input())

for j in range(n):
  b = input()
  for s in range(3):
    for t in range(3):
      if bingo[s][t] == b:
        bingo[s][t] = 'hit'
        
tenchi = [[0,0,0],[0,0,0],[0,0,0]]
for s in range(3):
  for t in range(3):
    tenchi[s][t] = bingo[t][s]
    
times = 0
for a in range(3):
  if bingo[a] == ['hit', 'hit', 'hit'] or tenchi[a] == ['hit', 'hit', 'hit']:
    times = 1
if (bingo[1][1] == 'hit' and bingo[2][2] == 'hit' and bingo[0][0] == 'hit') or (bingo[0][2] == 'hit' and bingo[1][1] == 'hit' and bingo[2][0] == 'hit'):
  times = 1

if times == 0:
  print('No')
else:
  print('Yes')

Measured memory_bytes: 3064
using System;

namespace ABC148A
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, h;
            a = int.Parse(Console.ReadLine());
            h = int.Parse(Console.ReadLine());

            if (a == 1 && h == 2 || a == 2 && h == 1)
                Console.WriteLine(3);
            else if (a == 1 && h == 3 || a == 3 && h == 1)
                Console.WriteLine(2);
            else if (a == 2 && h == 3 || a == 3 && h == 2)
                Console.WriteLine(1);
        }
    }
}


Measured memory_bytes: 27232
#include <iostream>
#include <math.h>
using namespace std;
int n,a,b,c,v[10];
int solve(int k,int x,int y,int z) {
    if(k==n+1) {
        int ans=abs(a-x)+abs(b-y)+abs(c-z);
        if(x==0||y==0||z==0)
            return 10000;
        return ans;
    }
    int ans=min(solve(k+1,x+v[k],y,z)+10,solve(k+1,x,y+v[k],z)+10);
    ans=min(ans,solve(k+1,x,y,z+v[k])+10);
    ans=min(ans,solve(k+1,x,y,z));
    return ans;
}
int main() {
    int i;
    cin >> n >> a >> b >> c;
    for(i=1;i<=n;i++)
        cin >> v[i];
    cout << solve(1,0,0,0)-30;
    return 0;
}

Measured memory_bytes: 256
N = input()
for i in range(2**(len(N)-1)):
    new = N[0]
    ans = int(N[0])
    for j in range(len(N)-1):
        if((i>>j) & 1):
            ans += int(N[j+1])
            new = new + '+' + N[j+1]
        else:
            ans -= int(N[j+1])
            new = new + '-' + N[j+1]
    if(ans == 7):
        new += '=7'
        print(new)
        break


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

#define CPP_STR(x) CPP_STR_I(x)
#define CPP_CAT(x,y) CPP_CAT_I(x,y)
#define CPP_STR_I(args...) #args
#define CPP_CAT_I(x,y) x ## y

using i8  = int8_t;
using u8  = uint8_t;
using i16 = int16_t;
using u16 = uint16_t;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;

using f32 = float;
using f64 = double;

#define FOR(i, start, end) for(i64 i = (start), CPP_CAT(i,xxxx_end)=(end); i < CPP_CAT(i,xxxx_end); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) for(i64 i = 1; i <= n; ++i)
#define RREP(i, n) for(i64 i = n - 1; i >= 0 ; --i)
#define RREPS(i, n) for(i64 i = n; i >= 1; --i)

#define ALL(f,c,...) (([&](decltype((c)) cccc) { return (f)(std::begin(cccc), std::end(cccc), ## __VA_ARGS__); })(c))

#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

#define pb push_back
#define mp make_pair

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

template<typename C>
i64 SIZE(const C& c) { return static_cast<i64>(c.size()); }

template<typename T, size_t N>
i64 SIZE(const T (&)[N]) { return static_cast<i64>(N); }


struct ProconInit {
    static constexpr int IOS_PREC = 15;
    static constexpr bool AUTOFLUSH = false;

    ProconInit() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(IOS_PREC);
        if(AUTOFLUSH)
            cout << unitbuf;
    }
} PROCON_INIT;


int main() {
    i64 X; cin >> X;
    i64 cur = 0;
    i64 t = 0;
    while (cur < X) {
        t++;
        cur += t;
    }
    cout << t << endl;

    return 0;
}


Measured memory_bytes: 3624
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef pair<ll, ll> P;
#define INF 10000000000000
#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for(ll i = 1; i < (ll)(n); i++)
#define repN_1(i, n) for(ll i = 0; i < (ll)(n - 1); i++)
#define repM(i, n) for(ll i = (ll)(n - 1); i >= 0; i--)
#define repM1(i, n) for(ll i = (ll)(n - 1); i > 0; i--)
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

int main()
{
	cout << fixed << setprecision(18);

	ll n;
	cin >> n;
	vector<ll> a(100005, 0);
	ll ans = 0;
	rep(i, n) {
		ll t;
		cin >> t;
		a[t]++;
		ans += t;
	}
	ll q;
	cin >> q;
	vector<ll> b(q), c(q);
	rep(i, q) 
		cin >> b[i] >> c[i];

	rep(i, q) {
		ll sub = c[i] - b[i];
		ans = ans + (sub * a[b[i]]);
		cout << ans << endl;
		a[c[i]] += a[b[i]];
		a[b[i]] = 0;
	}



	return 0;
}

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

int main() {
    int A1,A2,A3,juck;
    cin >> A1 >> A2 >> A3;
    juck = A1 + A2 + A3;
    if (juck >= 22) {
        cout << "bust" << endl;
    } else if (juck <= 21) {
        cout << "win" << endl;
    }
} 

Measured memory_bytes: 256
#include<stdio.h>
int main(){
double a;
while(scanf("%lf\n",&a)!=EOF){
if(a<=48.00){
printf("light fly\n");
}
else if(a<=51.00){
printf("fly\n");
}
else if(a<=54.00){
printf("bantam\n");
}
else if(a<=57.00){
printf("feather\n");
}
else if(a<=60.00){
printf("light\n");
}
else if(a<=64.00){
printf("light welter\n");
}
else if(a<=69.00){
printf("welter\n");
}
else if(a<=75.00){
printf("light middle\n");
}
else if(a<=81.00){
printf("middle\n");
}
else if(a<=91.00){
printf("light heavy\n");
}
else{
printf("heavy\n");
}
}
return 0;
}


Measured memory_bytes: 1864
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <stdio.h>
#include <iomanip>

using namespace std;

//typedefリスト
typedef vector<long long int> vint;
typedef vector<string> vstr;
typedef long long int llint;

int main(void) {
	int N;
	cin >> N;
	cout << N * N*N << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <cassert>
#include <random>

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

using namespace std;
typedef long long int ll;
const int INF = 1000000000;
const double PI = acos(-1);
const ll mod = 1000000007;

int main()
{
    int n;
    string s[100000];
    cin >> n;
    rep(i, n) cin >> s[i];

    int ac = 0;
    int wa = 0;
    int tle = 0;
    int re = 0;
    rep(i, n) {
        if (s[i] == "AC") ac++;
        if (s[i] == "WA") wa++;
        if (s[i] == "TLE") tle++;
        if (s[i] == "RE") re++;
    }
    cout << "AC x " << ac << endl;
    cout << "WA x " << wa << endl;
    cout << "TLE x " << tle << endl;
    cout << "RE x " << re << endl;
    return 0;
}


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

using ll =  long long;
using pint =  pair<int,int>;
using vint = vector<int>;
using vvint = vector<vint>;
using vpint = vector<pint>;

#define repi(i,start,end) for(int (i)=(start),TemPNuM=(int)(end);(i)<TemPNuM;++(i))
#define rep(i,end) repi((i),0,(end))
#define rfor(x,v) for(auto& (x) : (v))
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fsort(v,lambda) sort(all((v)),(lambda))
#define vin(v) rep(i,(v).size())cin >> (v)[i];
#define vpin(v) rep(i,(v).size())cin>>v[i].first>>v[i].second
//#define int long long
template<class T, class U>bool chmax(T &a, const U &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T, class U>bool chmin(T &a, const U &b) { if (b<a) { a=b; return 1; } return 0; }
template<class T>void println(T a){if(cout.precision()!=12)cout<<setprecision(12);cout<<a<<endl;}
//lambda: [](int x, int y){return x<y;}

signed main(void){
    int a,b;cin>>a>>b;
    cout << 6-a-b << endl;

    return 0;
}


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

#define X first
#define Y second
#define pb push_back
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rep(i, st, n) for (int i = (st); i < (n); ++i)
#define repinv(i, st, n) for (int i = ((n)-1); i >= (st); --i)
#define MEM(a, b) memset(a, b, sizeof(a));
#ifdef LOCAL
#define debug(x) std::cerr << #x << ": " << x << endl
#else
#define debug(x) 860111
#endif
#define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define fileIO(in, out) freopen(in, "r", stdin); freopen(out, "w", stdout)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef long double ld;

//mt19937 mrand(random_device{}());
//mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
const ll mod=1e9+7;
//int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
pii operator+(const pii&x, const pii&y) { return mp(x.X+y.X, x.Y+y.Y);}
pii operator-(const pii&x, const pii&y) { return mp(x.X-y.X, x.Y-y.Y);}
//INT_MAX, ULLONG_MAX, LLONG_MAX or numeric_limits<int>::min()

inline ll read(){
	char ch=getchar();ll x=0,f=0;
	while(ch<'0' || ch>'9') f|=ch=='-',ch=getchar();
	while(ch>='0' && ch<='9') x=x*10+ch-'0',ch=getchar();
	return f?-x:x;
}

//------------------------------------------------------------------------//
int T;
const int maxn = 2e5+7;
int n;
//ll a[maxn];

bool is_p(string s)
{
  int m = s.size();
  bool flag = 1;
  rep(i, 0, m/2) flag &= s[i] == s[m-1-i];
  return flag;
}

//check T
void solve()
{
	string s;
  cin >> s;
  n = s.size();
  if(is_p(s) && is_p(s.substr(0, n/2)) && is_p(s.substr(n/2+1, n/2))) cout << "Yes" << endl;
  else cout << "No" << endl;
  return;
}


signed main()
{
  fastIO();
  T = 1;
  //cin >> T; //this
  while(T--) solve();
  return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <string.h>
#include <vector>
using namespace std;

typedef long long ll;
const ll mod = 1e9 + 7;

ll my_pow(ll x, ll n){
	ll ret = 1;
	while(n>0) {
		if(n&1) {
			ret *= x;
			ret %= mod;
		}
		x*=x;
		x%=mod;
		n>>=1;
	}
	return ret;
}


char s[5002];
int main() {
	int n;
	scanf("%d", &n);
	scanf("%s", s);
	int sl = strlen(s);

	vector<ll> dp(n+2, 0);

	dp[0] = 1;
	for(int i=1;i<=n;i++) {
		vector<ll> nxt(i+2, 0);

		nxt[0] = dp[0] + dp[1];
		for(int j=1;j<=i;j++) {
			nxt[j] = dp[j-1]*2 + dp[j+1];
			nxt[j] %= mod;
		}
		dp = nxt;
	}

	ll all = my_pow(2ll, (ll)sl);
	ll invall = my_pow(all, mod-2);

	ll ans = dp[sl]*invall%mod;
	printf("%lld", ans);
	return 0;
}

Measured memory_bytes: 384
<?php

fscanf(STDIN, '%d', $n);
$nums = explode(' ', trim(fgets(STDIN)));

$bothOddCount = 0;
$i = 0; // マスの番号は1オリジン
while ($i < $n) {
  if ($nums[$i] % 2 !== 0) {
    $bothOddCount++;
  }
  $i += 2;
}

echo $bothOddCount;


Measured memory_bytes: 16232
#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  while(cin>>a>>b,a){
    int s[1000000]={},c=0,g=__gcd(a,b);
    a/=g,b/=g;
    while(!s[a]){
      s[a]=(++c);
      a=(a*10)%b;
      if(a<0)return 0;
    }
    if(a)c++;
    cout<<s[a]-1<<' '<<c-s[a]<<endl;
  }
}

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

using Node = long long; //頂点
using Weight = long long; //重み
using Edge = pair<Node, Weight>; //辺
using Graph = vector<vector<Edge>>; //隣接リスト

Graph G;
vector<int> paint;

void bfs(Node start){
  queue<Node> que;
  que.push(start);

  while(!que.empty()){
    Node now = que.front();
    que.pop();
    //DEBUG(now);

    for(Edge next: G[now]){
      Node nextto = next.first;
      Weight nextw = next.second;
      if(paint[nextto]!=-1)continue;
      //DEBUG(nextto);
      if(nextw%2==0){
        paint[nextto] = paint[now];
      }else{
        paint[nextto] = (paint[now]+1)%2;
      }
      que.push(nextto);
    }
  }
}

int main(){
  int N;cin>>N;
  G.resize(N);
  paint.assign(N, -1);
  for(int i=0; i<N-1; i++){
    int u,v,w;cin>>u>>v>>w;
    u--;v--;
    G[u].push_back(make_pair(v,w));
    G[v].push_back(make_pair(u,w));
  }

  paint[0] = 0;
  bfs(0);

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

Measured memory_bytes: 8320
yosou = input()
yosoulist = list(yosou)
yosou2 = input()
yosoulist2 = list(yosou2)
count = 0
#はんてい
for i in range(len(yosoulist)):
  if yosoulist[i] == yosoulist2[i]:
    count += 1
print(count)

Measured memory_bytes: 3188
//ABの全探索->結果の絞り込み->結果とCの全探索の解法
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int Z = sc.nextInt();
		int K = sc.nextInt();
		long A[] = new long[X];
		long B[] = new long[Y];
		long C[] = new long[Z];
		for(int i=0;i<X;i++)A[i]=sc.nextLong();
		for(int i=0;i<Y;i++)B[i]=sc.nextLong();
		for(int i=0;i<Z;i++)C[i]=sc.nextLong();
		sc.close();
		
		long tmp[] = new long[X*Y];
 
		int cnt = 0;
		for(int i=0;i<X;i++) {
			for(int j=0;j<Y;j++) {
					tmp[cnt]=A[i]+B[j];
					cnt++;
			}
		}
		rsort(tmp);
		
		long ans[] = new long[Math.min(K,X*Y)*Z]; 
		int cnt2 = 0;
		for(int i=0;i<Math.min(K,X*Y);i++) {
			for(int j=0;j<Z;j++) {
					ans[cnt2]=tmp[i]+C[j];
					cnt2++;
			}
		}
		
		
		rsort(ans);
		StringBuilder sb = new StringBuilder();
		for(int i=0;i<K;i++) {
			sb.append(ans[i]+"\n");
		}
		System.out.println(sb.toString());
	}
 
	//long型を逆順にソートするメソッド
	static void rsort(long[] a) {
		Arrays.sort(a);
		int len = a.length;
		for (int i = 0; i < len / 2; i++) {
			long tmp = a[i];
			a[i] = a[len - 1 - i];
			a[len - 1 - i] = tmp;
		}
	}
}

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

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

  vector<int> a(A);
  vector<int> b(B);
  int min_a = INT_MAX;
  int min_b = INT_MAX;
  rep(i, A) {
    cin >> a[i];
    min_a = min(min_a, a[i]);
  }
  rep(i, B) {
    cin >> b[i];
    min_b = min(min_b, b[i]);
  }

  int ans = min_a + min_b;
  rep(i, M) {
    int x, y, c;
    cin >> x >> y >> c;
    ans = min(ans, a[x - 1] + b[y - 1] - c);
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 4020