akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  int a[N];
  for(int i=0;i<N;i++) {
    cin>>a[i];
  }
  string s="APPROVED";
  for(int i=0;i<N;i++) {
    if(a[i]%2==0) {
      if(a[i]%3!=0&&a[i]%5!=0){
        s="DENIED";
          break;
      }
    }
  }
  cout<<s<<endl;
  return 0;
}


Measured memory_bytes: 256
a,b = map(int, input().split(' '))
if a > b:
    r = a % b
    b_ = b
    while r != 0:
        temp = b % r
        b = r
        r = temp
    print(b_ * a // b)
elif a < b:
    r = b % a
    a_ = a
    while r != 0:
        temp = a % r
        a = r
        r = temp
    print(a_ * b // a)
else:
    print(b)

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

typedef long long ll;
const ll MOD = 1e9+7;
const int N = 105;

int n,k,sz;
vector<int>v[N];

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

    if(k>(n-1)*(n-2)/2){
        cout<<-1;
        return 0;
    }

    for(int i=2;i<=n;i++){
        v[1].push_back(i);
        sz++;
    }
    int tmp=(n-1)*(n-2)/2;

    int cur=2;
    int nxt=3;

    while(tmp>k){
        v[cur].push_back(nxt);
        sz++;
        nxt++;
        if(nxt>n){
            cur++;
            nxt=cur+1;
        }
        tmp--;
    }

    cout<<sz<<"\n";
    for(int i=1;i<=n;i++){
        for(auto e:v[i]){
            cout<<i<<" "<<e<<"\n";
        }
    }
    return 0;
}


Measured memory_bytes: 384
import math

N = int(input())

M = math.ceil(math.sqrt(N)) + 1

f_list = [0] * (N + 1)

for x in range(1, M):
	for y in range(1, M):
		for z in range(1, M):
			f = x * x + y * y + z * z + x * y + y * z + z * x
			if f >= 1 and f <= N:
				f_list[f] += 1

for i in range(1, N + 1):
	print(f_list[i])


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

int main(void) {
    int A, B, H, M;
    
    scanf("%d %d %d %d", &A, &B, &H, &M);

    double h = (double)(H * 60 + M) * 0.5;
    double m = (double)M * 6;
    double hTheta = (90 - h) * (atan(1.0) * 4.0 / 180);
    double mTheta = (90 - m) * (atan(1.0) * 4.0 / 180);
    
    // printf("%f %f \n", h, m);
    // printf("%f %f\n", cos(hTheta), cos(mTheta));

    double a = fabs(A * cos(hTheta) - B * cos(mTheta));
    double b = fabs(A * sin(hTheta) - B * sin(mTheta));

    // printf("%f %f\n", a, b);
    
    double c = sqrt(pow(a, 2.0) + pow(b, 2.0));

    printf("%.16f\n",c);
    return 0;
}

Measured memory_bytes: 2728
#include<stdio.h>
#include<math.h>
int main()
{
	int n,d,ans=0;
	float a[15][15];
	scanf("%d%d",&n,&d);
	for(int i=0;i<n;i++)for(int j=0;j<d;j++)
	{
		scanf("%f",&a[i][j]);	
	}
	for(int i=0;i<n-1;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			float sum=0;
			for(int k=0;k<d;k++)
			{
				sum+=(a[i][k]-a[j][k])*(a[i][k]-a[j][k]);
			}
			sum=sqrt(sum);
			if((int)(sum*10000)%10000==0)ans++;
		}
	}
	printf("%d\n",ans);
}

Measured memory_bytes: 128
import java.util.Scanner;
import java.io.*;

// public class Main {
//     public static void main(String[] args){
//         Scanner sc = new Scanner(System.in);
//     }
// }

public class Main {
    //B Buffet
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int sum = 0;
        int[] A = new int[n]; 
        int[] B = new int[n]; 
        int[] C = new int[n-1]; 
        for(int i = 0; i < n; i++) A[i] = Integer.parseInt(sc.next());
        for(int i = 0; i < n; i++) sum += Integer.parseInt(sc.next());
        for(int i = 0; i < n-1; i++) C[i] = Integer.parseInt(sc.next());

        int a1 = A[0];
        for(int i = 1; i < n; i++){
            if(a1 + 1 == A[i]) sum += C[a1 - 1];
            a1 = A[i];
        }

        System.out.print(sum);
    }
}

Measured memory_bytes: 23764
#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <climits>
#define int int64_t
#define endl "\n"
#define mod 1000000007
using namespace std;

void io()
{
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
}

string s;
int d;

int dp[10002][102][2];

int solve(int pos,int sum,int tight){
    if(pos == s.length()+1){
        return (sum == 0);
    }

    if(dp[pos][sum][tight]!=-1){
        return dp[pos][sum][tight];
    }

    int end = ((tight ? (s[pos-1]-'0') : 9));
    int ans=0;
    for (int i = 0; i <= end; i++)
    {
        ans = (ans + solve(pos+1,(sum+i)%d,tight&(i == end)))%mod;
    }
    return dp[pos][sum][tight]=ans;
    
}

void Solution()
{
    cin >> s >> d;
    memset(dp,-1,sizeof dp);
    cout << (solve(1,0,1)-1+mod)%mod;

}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    //io();
    Solution();
}


Measured memory_bytes: 17024
#include<iostream>
#include<vector>
#include<string>
#include <climits>

int main()
{
    int a;
    std::cin>> a;
    
    long double b = 0;
    double c;
    
    for( int i = 0; i < a; i++ )
    {
        std::cin>> c;
        b += 1 / c;
    }

    std::cout<< 1 / b;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define for_int(i,a,b) for(int i=(a);i<=(b);++i)
#define rep_int(i,a,b) for(int i=(a);i>=(b);--i)
#define for_ll(i,a,b) for(ll i=(a);i<=(b);++i)
#define rep_ll(i,a,b) for(ll i=(a);i>=(b);--i)
#define ull unsigned long long
#define ll long long
#define db double
#define HPMAX 1005
#define KMP_MAX 1005
#define prime_MAX 1e6+5
#define quick_pow_mod 1e9+7
#define PII pair<int,int>
const int factor_N = 1e7 + 5;
const int tree_arr_N = 1e6 + 5;
using namespace std;
//快读
int read() {
	char c = getchar();
	int x = 0, f = 1;
	for (; !isdigit(c); c = getchar())
		if (c == '-') f = -1;
	for (; isdigit(c); c = getchar()) x = x * 10 + c - 48;
	return x * f;
}
int a, b, c, k;
int main() {
	a = read(); b = read(); c = read(); k = read();
	while (k && a >= b) {
		b *= 2;
		k--;
	}
	while (k && b >= c) {
		c *= 2;
		k--;
	}
	if (a < b && b < c) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Measured memory_bytes: 3620
using System;
using System.Linq;
using System.Collections.Generic;

class P
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int[] b = Console.ReadLine().Split().Select(int.Parse).ToArray();
        long diff = 0;
        for (int i = 0; i < a.Length; i++)
        {
            int d = b[i] - a[i];
            if (d <= 0)
            {
                diff -= d;
            }
            else
            {
                if(d % 2 == 1)
                {
                    d++;
                    diff++;
                }
                diff -= (d / 2);
            }
            //Console.WriteLine(diff);
        }
        Console.WriteLine(diff <= 0 ? "Yes" : "No");
    }
}

Measured memory_bytes: 13152
#include<stdio.h>

int main(){
  long x[5], N;
  int i;
  scanf("%ld", &N);

  long min = N;
  for(i = 0; i < 5; i++){
    scanf("%ld", &x[i]);
    if(min > x[i]) min = x[i];
  }
  long T;

  if(N % min == 0) T = N / min;
  else T = N / min + 1;

  printf("%ld\n", 4 + T);

  return 0;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
/*#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
/*template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
*/typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll,ll> pl;
typedef pair<int,int> pii;

#define int ll
#define LOCAL 0
#define dbg(x) cout << #x << " is " << x << "\n"
#define gll(x) scanf("%d",&x)
#define gll2(x,y) scanf("%d%d",&x,&y)
#define gll3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define gllarr(arr,n) f(i,n) gll(arr[i]);
#define sz(x) ((int)x.size())
#define s(x) sort(x.begin(),x.end())
#define all(v) v.begin(),v.end()
#define rs(v) { s(v) ; r(v) ; }
#define r(v) {reverse(all(v));}
#define pb push_back
#define f(i,n) for(int i=0;i<n;i++)
#define fr(i,n) for(int i=n-1;i>=0;i--)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define repr(i,a,b) for(int i=a;i>=b;i--)

const ll mod = (ll)1e9 + 7;
const ll inf = (ll)1e16;
const ld eps = 1e-12;
const ll N = (int)1e5 + 5;
const ll LOGN = 19;
const ld PI = 3.14159265358979323846;
inline ll mul(ll a, ll b, ll m = mod) { return (ll)(a * b) % m;}
inline ll add(ll a, ll b, ll m = mod) { a += b; if(a >= m) a -= m; if(a < 0) a += m; return a;}
inline ll power(ll a, ll b, ll m = mod) { if(b == 0) return 1; if(b == 1) return (a % m); ll x = power(a, b / 2, m); x = mul(x, x, m); if(b % 2) x = mul(x, a, m); return x;}

int n, W;
int w[105], v[105];
int dp[105][N];

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    if (LOCAL) {
        //freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\input.txt", "r", stdin);
        freopen("C:\\Users\\Dishant\\Desktop\\Collection-DEV c++\\CLion\\in.txt", "w", stdout);
    }
    cin>>n>>W;
    f(i, n) cin>>w[i]>>v[i];
    f(i, n) {
        f(j, N) dp[i][j] = LLONG_MAX;
    }
    dp[0][v[0]] = w[0];
    for(int i = 1; i < n; i++) {
        for(int j = 0; j < N; j++) {
            if(v[i] > j) dp[i][j] = dp[i - 1][j];
            else if(v[i] == j) dp[i][j] = min(dp[i - 1][j], w[i]);
            else {
                if(dp[i - 1][j - v[i]] != LLONG_MAX) dp[i][j] = min(dp[i - 1][j], dp[i - 1][j - v[i]] + w[i]);
                else dp[i][j] = dp[i - 1][j];
            }
        }
    }
    int ans = -1;
    f(i, N) {
        if(dp[n - 1][i] <= W) ans = i;
    }
    cout<<ans;
    return 0;
}

Measured memory_bytes: 80128
using System;
using System.Collections.Generic;
using System.Deployment.Internal;
using System.Linq;

namespace ABC123_B
{
	internal class Program
	{
		public static void Main(string[] args)
		{
			List<int> list = new List<int>();
			for(int i = 0; i < 5; i++)
				list.Add(int.Parse(Console.ReadLine()));
			
			int time = 0;
			int minOneValue = 10000;
			int minOneValueIndex = 10;
			for (int i = 0; i < 5; i++)
			{
				if (list[i] % 10 == 0)
					time += list[i];
				else if (minOneValue > list[i] % 10)
				{
					minOneValue = list[i] % 10;
					minOneValueIndex = i;
				}
					
			}

			if(minOneValueIndex != 10)
				time += list[minOneValueIndex];
			for (int i = 0; i < 5; i++)
			{
				if (list[i] % 10 != 0)
				{
					if (i != minOneValueIndex)
					{
						time += (list[i] / 10 + 1) * 10;
					}
						
				}
			}
			
			Console.WriteLine(time);
		}
	}
}

Measured memory_bytes: 13140
#include <iostream>

using namespace std;

int main() {
  char s[1001];
  int w;
  cin >> s;
  cin >> w;

  for(int i=0; i<1001; i++) {
    if(s[i] == '\0') break;
    if(i%w == 0) {
      cout << s[i];
    }
  }
  cout << endl;
  
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long  long int 
#define pb push_back
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);



int main()
{

 int n;
 cin>>n;
 if(n>=400 && n<=599)
 	cout<<8;
 if(n>=600 && n<=799)
 	cout<<7;
  if(n>=800 && n<=999)
 	cout<<6;
  if(n>=1000 && n<=1199)
 	cout<<5;
 if(n>=1200 && n<=1399)
 	cout<<4;
  if(n>=1400 && n<=1599)
 	cout<<3;
  if(n>=1600 && n<=1799)
 	cout<<2;
  if(n>=1800 && n<=1999)
 	cout<<1;
return 0;
}



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

using namespace std;

void hawawa()
{
  string str[3];
  for (auto&& i : str) {
    cin >> i;
    cout << static_cast<char>(i[0] - 'a' + 'A');
  }
  cout << "\n";
}

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

Measured memory_bytes: 256
// Aizu Vol-5 0524: Searching Constellation
// 2017.8.30 bal4u@uu

#include <stdio.h>

typedef struct { int x, y; } T;
T goal[202], star[1002];
int m, n;

int check(int dx, int dy)
{
	int i, j, x, y;

	for (i = 0; i < m; i++) {
		x = goal[i].x + dx, y = goal[i].y + dy;
		for (j = 0; j < n; j++) {
			if (star[j].x == x && star[j].y == y) break;
		}
		if (j >= n) return 0;
	}
	return 1;
}

int main()
{
	int i, dx, dy;

	while (scanf("%d", &m) && m) {
		for (i = 0; i < m; i++) scanf("%d%d", &goal[i].x, &goal[i].y);
		scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d%d", &star[i].x, &star[i].y);
		for (i = 0; i < n; i++) {
			dx = star[i].x - goal[0].x, dy = star[i].y - goal[0].y;
			if (check(dx, dy)) break;
		}
		printf("%d %d\n", dx, dy);
	}
	return 0;
}

Measured memory_bytes: 604
#include <bits/stdc++.h>
  using namespace std;
  #define int long long int
  #define loop(i,a,b) for(int i=a;i<b;i++)
  #define vi vector<int>
  #define pb push_back
  int32_t main()
  {
    //write your code here
    
         int n;cin>>n;
         int a=0,t=0,r=0,w=0;
         while(n--)
         {
         	string s;
         	cin>>s;
         	if(s[0]=='A')
         	a++;
         	else if(s[0]=='W')
         	w++;
         	else if(s[0]=='T')
         	t++;
         	else
         	r++;
         }
         cout<<"AC x "<<a<<endl;
         cout<<"WA x "<<w<<endl;
         cout<<"TLE x "<<t<<endl;
         cout<<"RE x "<<r<<endl;
    return 0;
  }

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

const string dot_and_sharp[2] = {".", "#"};

int main(){
    int N;
    cin >> N;
    string space[2] = {"", ""};
    bool if_push_right = true;
    while(space[0].size() != N){
        bool if_input_true = false;
        for(int i = 0; i < 4; i++){
            if(if_push_right){
                cout << space[0] + dot_and_sharp[i % 2] << endl;
                cout << space[1] + dot_and_sharp[i / 2] << endl;
            }else{
                cout << dot_and_sharp[i % 2] + space[0] << endl;
                cout << dot_and_sharp[i / 2] + space[1] << endl;
            }
            string if_right;
            cin >> if_right;
            if(if_right == "end"){
                return 0;
            }else if(if_right == "T"){
                if(if_push_right){
                    space[0] += dot_and_sharp[i % 2];
                    space[1] += dot_and_sharp[i / 2];
                }else{
                    space[0] = dot_and_sharp[i % 2] + space[0];
                    space[1] = dot_and_sharp[i / 2] + space[1];
                }
                if_input_true = true;
                break;
            }
        }
        if(!if_input_true){
            if_push_right = false;
        }
    }
}


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

ll sum[501][501];
int n,m,q;


int main()
{
	cin >> n >> m >> q;
	for(int i = 0;i<m;i++)
	{
		int x,y;
		cin >> x >> y;
		sum[x][y]++;
	}

	for(int i = 0;i<500;i++)
	{
		for(int j = 0;j<501;j++)
		{
			sum[i+1][j]+=sum[i][j];
		}
	}
	for(int i = 0;i<500;i++)
	{
		for(int j = 0;j<501;j++)
		{
			sum[j][i+1]+=sum[j][i];
		}
	}
	for(int i = 0;i<=n;i++)
	{
		for(int j=0;j<=n;j++)
		{
			//cout<<sum[i][j]<<' ';
		}
		//cout<<endl;
	}
	for(int i = 0;i<q;i++)
	{
		int p,q;
		cin >>p>> q;
		p--;
		cout<<sum[q][q]-sum[p][q]-sum[q][p]+sum[p][p]<<endl;
	}
}

Measured memory_bytes: 2944
#define _USE_MATH_DEFINES
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#include <limits>
#include <vector>
#include <algorithm>
#include <functional>
#include <cctype>
#include <sstream>

typedef long long lint;

using namespace std;
#define rep(i, n) for(lint i = 0; i < (lint)(n); i++)
#define repi(i,a,b) for(lint i=lint(a);i<lint(b);++i)
#define all(x) (x).begin(),(x).end()
#define sl(c) (('a')<=(c)&&(c)<=('z'))
#define ll(c) (('A')<=(c)&&(c)<=('Z'))
#define makeupper(t) transform(all(t),t.begin(),::toupper);
#define makelower(t) transform(all(t),t.begin(),::tolower);
lint* arr1(lint x) {
	lint *array = new lint[x];
	rep(i, x)array[i] = 0;
	return array;
}
lint** arr2(lint x, lint y) {
	lint **array = new lint*[x];
	rep(i, x)array[i] = new lint[y];
	rep(i, x)rep(j, y)array[i][j] = 0;
	return array;
}
vector<string> split(const string &s, char delim) {
	vector<string> elems;
	stringstream ss(s);
	string item;
	while (getline(ss, item, delim)) {
		if (!item.empty()) {
			elems.push_back(item);
		}
	}
	return elems;
}

int main() {
	string text,output;
	int n, m;
	while (1) {

		getline(cin, text);
		if (text=="-")break;
		cin >> n;
		rep(i, n) {
			cin >> m;
			text = text.substr(m) + text.substr(0,m);
		}
		cout << text<<"\n";
		cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
	}
}


Measured memory_bytes: 3172
/**
 * Millennium
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

import static java.lang.Integer.parseInt;

public class Main {

	static final int millennium = days(1000, 1, 1);

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;

		while ((line = br.readLine()) != null && !line.isEmpty()) {
			int n = Integer.parseInt(line);

			for (int i = 0; i < n; i++) {
				StringTokenizer st = new StringTokenizer(br.readLine());
				int y, m, d;
				y = parseInt(st.nextToken());
				m = parseInt(st.nextToken());
				d = parseInt(st.nextToken());
				System.out.println(millennium - days(y, m, d));
			}
		} //end while
	} //end main

	static int days(int y, int m, int d) {
		int days = 0;
		days += (y - 1) * 195;
		days += ((y - 1) / 3) * 5;
		for (int i = 0; i < m - 1; i++) {
			if (i % 2 == 0 || y % 3 == 0) {
				days += 20;
			} else {
				days += 19;
			}
		}
		days += d;
		return days;
	}
}

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

#define ln '\n'
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for(int i = (a); i <= (int)(b); ++i)
#define FORR(i, a, b) for(int i = (a); i >= (int)(b); --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<P> VP;
typedef vector<PL> VPL;
typedef vector<string> VS;

const int MOD = (int)1e9 + 7;

VPL prime_factorize(ll n) {
    VPL res;  // first: prime, second: count
    for(ll p = 2; p * p <= n; p++) {
        if(n % p != 0) continue;
        int cnt = 0;
        while(n % p == 0) {
            cnt++;
            n /= p;
        }
        res.push_back(PL(p, cnt));
    }
    if(n != 1) res.push_back(PL(n, 1));
    return res;
}


class Combination {
private:
    VL _fact;
    VL _invfact;

    ll power(ll x, ll n) {
        if(n == 0) return 1;
        else if(n == 1) return x % MOD;
        else if(n % 2 == 0) {
            ll buf = power(x, n / 2);
            return buf * buf % MOD;
        } else {
            ll buf = power(x, n / 2);
            return buf * buf % MOD * x % MOD;
        }
    }

public:
    Combination(int n) : _fact(n + 1), _invfact(n + 1) {
        // init fact
        _fact[0] = 1;
        REP(i, n) _fact[i + 1] = _fact[i] * (ll)(i + 1) % MOD;
        // init invfact
        REP(i, n + 1) _invfact[i] = power(_fact[i], MOD - 2);
    }

    ll operator() (int n, int k) {
        return _fact[n] * _invfact[n - k] % MOD * _invfact[k] % MOD;
    }
};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m;
    cin >> n >> m;
    VPL primes = prime_factorize(m);
    Combination comb(n + 100);

    ll ans = 1;
    for(auto pc : primes) ans = ans * comb(pc.second + n - 1, pc.second) % MOD;
    cout << ans << ln;
    return 0;
}


Measured memory_bytes: 1792
from decimal import Decimal

a, b, x = input().split()


a_deci = Decimal(a)
b_deci = Decimal(b)
x_deci = Decimal(x)

count = int(b_deci/x_deci)
count = count -int(a_deci/x_deci)
if a_deci%x_deci==0:
    count = count+1


print(count)

Measured memory_bytes: 5076
#include <stdio.h>
int main(){
  int i,k,s,ans=0;
  
  scanf("%d%d",&k,&s);
  
  for(int x = 0; x <= k; x++){
    for(int y = 0; y <= k; y++){
      
      int z=s-x-y;
      if(0<=z && z<=k)
       ans=ans+1;
    }
  }
printf("%d",ans);
  return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
#include <random>
#include <ctime>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//#pragma GCC optimize("-O3")
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")
#define ll long long
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define pll pair<ll,ll>
#define ld double
#define pld pair<ld,ld>
#define pii pair<int,int>
#define sqr(a) ((a)*(a))
#define all(v) v.begin(),v.end()

using namespace std;
//using namespace __gnu_pbds;

const ll MOD = 998244353;
const ll INF = 1e18;
const ld E = 1e-12;
const ld PI=acos(-1);
mt19937_64 rnd(time(0));
ll p1 = 31, p2 = 37, p3 = 7, p4 = rnd() % 100 + 1, md1 = MOD, md2 = 998244353, md3 = 998244357, md4 = rnd() % 1000000000;

//using ord_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;

ll n, m, a[1000001];

ll binpow(ll h, ll r, ll md = MOD)
{
    ll l = 1;
    while (r)
    {
        if (r & 1) l *= h, l %= md;
        h *= h;
        h %= md;
        r /= 2;
    }
    return l;
}

ll gcd(ll x, ll y)
{
    if (x < y) swap(x, y);
    while (x && y)
    {
        x %= y;
        swap(x, y);
    }
    return x + y;
}

#define dies_from_cringe exit(0)

void solve()
{
    ll n;
    cin >> n;
    cout << n+n*n+n*n*n << "\n";
}

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    //freopen("capitals.in","r",stdin);
    //freopen("capitals.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll t=1;
    //cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}

/*
1
3 3
10 1 2
5 1 1
*/


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

int main(){
  int N,a=0,mx=0;
  cin>>N;
  vector<int> A(N);
  for(int i=0;i<N;i++){
    cin>>A[i];
    if(i){
      if(A[i-1]>=A[i]){
        a++;
      }
      else{
        mx=max(a,mx);
        a=0;
      }
    }
  }
  mx=max(a,mx);
  cout<<mx<<endl;
}


Measured memory_bytes: 640
#include <cstdio>
#include <iostream>


int main() {
    
    int n;
    std::cin >> n;
    
    int min = 1000000;
    int max = -1000000;
    long sum = 0;
    
    while (n--) {
        int a;
        std::cin >> a;
        
        if (a < min) {
            min = a;
        }
        
        if (a > max) {
            max = a;   
        }
        
        sum += a;
    }
    
    printf("%d %d %ld\n", min, max, sum);
    return 0;
}

Measured memory_bytes: 1140
#if !defined(__clang__) && defined(__GNUC__)
#include <bits/stdc++.h>
#else
#include <cstdlib>
#include <climits>
#include <iostream>
#include <cstdint>
#include <vector>
#include <string>
#include <complex>
#include <bitset>
#include <queue>
#include <deque>
#include <stack>
#include <utility>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <regex>
#endif //  !defined(__clang__) && defined(__GNUG__)
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/multi_array.hpp>
#include <boost/optional.hpp>
#include <boost/math/common_factor_rt.hpp>

using namespace std;

int main()
{
    int64_t N, Y;
    std::cin >> N >> Y;

    for (int64_t m = 0; m <= N; ++m) {
        for (int64_t g = 0; g <= N - m; ++g) {
            auto s = N - (m + g);
            auto sum = m * 10000 + g * 5000 + s * 1000;

            if (sum == Y) {
                std::cout << m << " " << g << " " << s << std::endl;
                return 0;
            }
        }
    }
    std::cout << "-1 -1 -1"  << std::endl;

    return 0;
}


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


class Program
{


    static void Main(string[] args)
    {

        char[] cs = new char[] { ' ', ',' };
        //int val = int.Parse(Console.ReadLine());
        //int[] vals = parseAry(Console.ReadLine().Split(cs));
        //string str = Console.ReadLine();
        //string[] strs = Console.ReadLine().Split(cs);

        //string res="";
        //int res = 0; ;
        //int t = int.Parse(Console.ReadLine());
        //string str = Console.ReadLine();
        ///int[] vals = parseAry(Console.ReadLine().Split(cs));
        //int n = int.Parse(Console.ReadLine());

        string res ="NO";

		int[] p = new int[5];
		int[] vals = parseAry(Console.ReadLine().Split(cs));
		p[vals[0]]++;
		p[vals[1]]++;
		vals = parseAry(Console.ReadLine().Split(cs));
		p[vals[0]]++;
		p[vals[1]]++; ;
		vals = parseAry(Console.ReadLine().Split(cs));
		p[vals[0]]++;
		p[vals[1]]++;
		int test1 = 0;
		int test2=0;
		foreach ( int a in p ) {
			if ( a == 1 ) { test1++; }
			if ( a == 2 ) { test2++; }
		}

		if ( test1 == 2 && test2 == 2 ) { res = "YES"; }

        Console.WriteLine(res);

        return;
    }

    //　String[]  ----->  int[]
    static int[] parseAry(string[] str)
    {
        int[] nums = new int[str.Length];
        for (int i = 0; i < str.Length; i++) { nums[i] = int.Parse(str[i]); }
        return nums;
    }
    //　String[]  ----->  long[]
    static long[] parseAryL(string[] str)
    {
        long[] nums = new long[str.Length];
        for (int i = 0; i < str.Length; i++) { nums[i] = long.Parse(str[i]); }
        return nums;
    }

    //文字列を1文字ずつString[]に入れる
    static string[] strAry(String str)
    {
        string[] re = new string[str.Length];
        for (int i = 0; i < str.Length; i++) { re[i] = str[i].ToString(); }
        return re;
    }

}

Measured memory_bytes: 13140
#include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define X first
#define Y second
#define y0 y12
#define y1 y22
#define INF 987654321
#define PI 3.141592653589793238462643383279502884
#define fup(i,a,b,c) for(int (i)=(a);(i)<=(b);(i)+=(c))
#define fdn(i,a,b,c) for(int (i)=(a);(i)>=(b);(i)-=(c))
#define MEM0(a) memset((a),0,sizeof(a));
#define MEM_1(a) memset((a),-1,sizeof(a));
#define ALL(a) a.begin(),a.end()
#define SYNC ios_base::sync_with_stdio(false);cin.tie(0)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef double db;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;
typedef pair<ld, ld> Pd;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<db> Vd;
typedef vector<Pi> VPi;
typedef vector<Pll> VPll;
typedef vector<Pd> VPd;
typedef tuple<int, int, int> iii;
typedef tuple<int, int, int, int> iiii;
typedef tuple<ll, ll, ll> LLL;
typedef vector<iii> Viii;
typedef vector<LLL> VLLL;
typedef complex<double> base;
const int MOD = 1000000007;
ll POW(ll a, ll b, ll MMM = MOD) { ll ret = 1; for (; b; b >>= 1, a = (a*a) % MMM)if (b & 1)ret = (ret*a) % MMM; return ret; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { if (a == 0 || b == 0)return a + b; return a*(b / gcd(a, b)); }
int dx[] = { 0,1,0,-1,1,1,-1,-1 }, dy[] = { 1,0,-1,0,1,-1,1,-1 };
int ddx[] = { -1,-2,1,-2,2,-1,2,1 }, ddy[] = { -2,-1,-2,1,-1,2,1,2 };

char s[50][51];
int a[50][50];
const int S = 2500, T = 2501;
int n, m, k;
struct Edge {
	int to, r, c;
	Edge* ori;
	Edge* rev;
	Edge(int T, int R, int C)
	{
		to = T, r = R, c = C;
	}
};
vector<Edge *> v[2502];
inline int z(int x, int y)
{
	return x*m + y;
}
void addedge(int f, int t, int r,int c)
{
	Edge* ori = new Edge(t, r, c);
	Edge* rev = new Edge(f, 0, -c);
	ori->rev = rev;
	rev->rev = ori;
	v[f].push_back(ori);
	v[t].push_back(rev);
}
bool inQ[2502];
int dist[2502];
Pi p[2502];
int main() {
	scanf("%d%d",&n,&m);
	fup(i,0,n-1,1)scanf("%s",s[i]);
	fup(i,0,n-1,1){
		fup(j,0,m-1,1){
			if(i<n-1 && s[i+1][j]!='#')addedge(z(i,j),z(i+1,j),INF,-1);
			if(j<m-1 && s[i][j+1]!='#')addedge(z(i,j),z(i,j+1),INF,-1);
			if(s[i][j]!='#')addedge(z(i,j),T,1,0);
			if(s[i][j]=='o')addedge(S,z(i,j),1,0);
		}
	}
	int ans = 0;
	while (1)
	{
		MEM0(inQ);
		fill(dist, dist + 2502, INF);
		fill(p, p + 2502, Pi(-1, -1));
		queue<int> q;
		q.push(S);
		dist[S] = 0;
		inQ[S] = 1;
		while (!q.empty())
		{
			int x = q.front();
			q.pop();
			inQ[x] = 0;
			for (int i = 0; i < v[x].size(); i++)
			{
				int next = v[x][i]->to;
				if (dist[next]>dist[x]+v[x][i]->c && v[x][i]->r > 0)
				{
					dist[next] = dist[x] + v[x][i]->c;
					p[next] = Pi(x, i);
					if (!inQ[next])
					{
						q.push(next);
						inQ[next] = 1;
					}
				}
			}
		}
		if (p[T].X == -1)break;
		int flow = INF;
		for (int i = T; i != S; i = p[i].X)
		{
			flow = min(flow, v[p[i].X][p[i].Y]->r);
		}
		for (int i = T; i != S; i = p[i].first)
		{
			v[p[i].X][p[i].Y]->r -= flow;
			v[p[i].X][p[i].Y]->rev->r += flow;
			ans += v[p[i].X][p[i].Y]->c * flow;
		}
	}
	printf("%d\n", -ans);
}

Measured memory_bytes: 4708
#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<set>
#include<vector>
#include <iomanip>
using namespace std;

int main(){
  int N; cin>>N;
  int a[110000];
  int b[110000];
  for(int i=0;i<N;i++){
    cin>>a[i];
    b[a[i]-1]=i+1;
  }
  for(int i=0;i<N;i++){
    cout<<b[i]<<" ";
  }
  cout<<endl;
  return 0;
}


Measured memory_bytes: 1664
n = int(input())
a = list(map(int,input().split()))

a.sort()
a.reverse()

t = 'A'
alice = []
bob = []
while(True):
    if t == 'A':
        t = 'B'
        x = a.pop(0)
        alice.append(x)
    elif t == 'B':
        t = 'A'
        x = a.pop(0)
        bob.append(x)

    if len(a) == 0:
        break

print(sum(alice)-sum(bob))


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

string FILENAME = "filename";
#define io ifstream fin(FILENAME + ".in"); ofstream fout(FILENAME + ".out")
#define fwrite(X) fout << X;
#define fwriteln(X) fout << X << endl;

#define forl(V, N) for(int V = 0; V < N; V++)
#define fore(E, X) for(auto &E:X)
#define println(X) cout << X << endl
#define printe(X) for(auto &E:X) cout << E << " "; cout << endl
#define rem(X) X.top(); X.pop()
#define setmin(A, B) A = min(A, B)
#define setmax(A, B) A = max(A, B)
#define graph unordered_map<int, unordered_set<int>>
#define vi vector<int>
#define pb push_back
#define ll long long

int main() {
    ll N, A, B;
    cin >> N >> A >> B;
    if(abs(A-B)%2 == 0) println(abs(A-B)/2);
    else {
        ll diff = (B-A-1) / 2;
        println(min(diff+N-B+1, diff+A));
    }
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Caddi2018
{
    class Program
    {
        static void Main(string[] args)
        {
            var obj = new Q2();
            obj.Solver();
        }
    }
    class Q2
    {

        class AB
        {
            public int A { get; set; }
            public int B { get; set; }
        }
        public void Solver()
        {
            var buf = Console.ReadLine().Split().Select(int.Parse).ToArray();

            var N = buf[0];
            var H = buf[1];
            var W = buf[2];

            var AB = new List<AB>();
            for (int i = 0; i < N; i++)
            {
                buf = Console.ReadLine().Split().Select(int.Parse).ToArray();
                AB.Add(new AB { A = buf[0], B = buf[1] });
            }

            var count = AB.Count(x => x.A >= H && x.B >= W);
            Console.WriteLine(count);

        }
    }

    //class Q1
    //{
    //    public void Solver()
    //    {
    //        var str = Console.ReadLine();

    //        Console.WriteLine(str.Count(s => s == '2'));

    //    }
    //}
}


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

using namespace std;

const int N = 1e5 + 10;
typedef long long ll;




int x,y;




int main()
{

    scanf("%d %d",&x,&y);
    ll ans = x*500;
    if(ans >= y)
        puts("Yes");
    else
        puts("No");








    return 0;
}


Measured memory_bytes: 256
#include<set>
#include<map>
#include<deque>
#include<queue>
#include<stack>
#include<cmath>
#include<ctime>
#include<bitset>
#include<string>
#include<vector>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<complex>
#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;

inline void down(int &x,const int &y){if(x>y)x=y;}
const int maxn = 110000;

int n,m;
struct edge{int y,nex;}a[maxn<<1]; int len,fir[maxn];
inline void ins(const int x,const int y){a[++len]=(edge){y,fir[x]};fir[x]=len;}

int q[maxn<<1],head,tail;
bool v[maxn];
void dfs(const int x)
{
	v[x]=true;
	for(int k=fir[x],y=a[k].y;k;k=a[k].nex,y=a[k].y) if(!v[y])
	{
		q[++tail]=y; dfs(y);
		break;
	}
}

int main()
{
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)
	{
		int x,y; scanf("%d%d",&x,&y);
		ins(x,y); ins(y,x);
	}
	q[head=tail=1]=1;
	dfs(1);
	for(int i=1;i*2<=tail;i++) swap(q[i],q[tail-i+1]);
	dfs(1);
	printf("%d\n",tail);
	for(int i=1;i<=tail;i++) printf("%d ",q[i]);
	
	return 0;
}


Measured memory_bytes: 3200
import java.util.*;

public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		int[][] c = new int[10][10];
		for(int i=0; i<10; i++) {
			for(int j=0; j<10; j++) {
				c[i][j] = sc.nextInt();
			}
		}
		int[][] A = new int[h][w];
		for(int i=0; i<h; i++) {
			for(int j=0; j<w; j++) {
				A[i][j] = sc.nextInt();
			}
		}
		
		for(int k=0; k<10; k++) {
			for(int i=0; i<10; i++) {
				for(int j=0; j<10; j++) {
					c[i][j] = Math.min(c[i][j], c[i][k]+c[k][j]);
				}
			}
		}
		
		long ans = 0;
		for(int i=0; i<h; i++) {
			for(int j=0; j<w; j++) {
				if(A[i][j] == -1) continue;
				ans += c[A[i][j]][1];
			}
		}
		System.out.println(ans);
	}
	
	static int binarySearch(int[] A, int x) {
		int l = 0;
		int r = A.length;
		while(l<r) {
			int mid = (l+r)/2;
			if(A[mid] == x) return mid;
			else if(x<A[mid]) r = mid;
			else l = mid+1;
		}
		return -1;
	}
	
	static long upper_bound(int[] A, int b) {
		// bよりおおきい値がはじめて出てくるindexを返す
		return lower_bound(A, b+1);
	}

	static long lower_bound(int[] A, int b) {
		// b以上の値がはじめて出てくるindexを返す
		int lb=0;
		int ub=A.length;
		while(ub>lb) {
			int mid = (lb+ub)/2;
			if(A[mid]>=b) ub = mid;
			else lb = mid+1;
		}
		return lb;
	}
	
	// union find lib
	// usage:
	// 最初にinitを呼ぶ
	// root: 直接は呼ばないで
	// unite: まとめる
	// same: グループ判定
	static void init(int par[], int N) {
		for(int i=0; i<N; i++) {
			par[i] = i;
		}
	}
	
	static int root(int x, int [] par) {
		if(par[x] == x) {
			return x;
		} else {
			return (par[x] = root(par[x], par));
		}
	}
	
	static boolean same(int x, int y, int[] par) {
		return root(x, par) == root(y, par);
	}
	
	static void unite(int x, int y, int[] par) {
		x = root(x, par);
		y = root(y, par);
		if(x == y) return;
		par[x] = y;
	}
	
	// end union find lib
	
	// number lib
	
	static int max(int...ls) {
		int ans = Integer.MIN_VALUE;
		for(int i=0; i<ls.length; i++) {
			ans = Math.max(ans, ls[i]);
		}
		return ans;
	}
	
	static int min(int...ls) {
		int ans = Integer.MAX_VALUE;
		for(int i=0; i<ls.length; i++) {
			ans = Math.min(ans, ls[i]);
		}
		return ans;
	}
	
	static long lcm(long a, long b) {
		return a*(b/gcd(a, b));
	}
	
	static long gcd(long a, long b) {
		long ta = Math.max(a, b);
		long tb = Math.min(a, b);
		long tmp;
		while((tmp = ta%tb) != 0) {
			ta = tb;
			tb = tmp;
		}
		return tb;
	}
	
	static long modcomb(long n, long k, long mod) {
		if(k==1) {
			return n;
		}
		
		long ans = 1;
		for(long i=n; i>=n-k+1; i--) {
			ans = (ans * i)%mod;
		}
		for(long i=k; 0<i; i--) {
			ans = (ans * modpow(i, mod-2, mod)) % mod;
		}
		return ans;
	}
	
	static long modpow(long a, long b, long mod) {
		if(b==0) return 1;
		if(b%2==0) {
			long d = modpow(a, b/2, mod);
			return (d*d)%mod;
		} else {
			return (a*modpow(a, b-1, mod))%mod;
		}
	}
	
	static int disit(long a, long d) {
		int count = 0;
		while(a!=0) {
			a = a/d;
			count++;
		}
		return count;
	}
	
	// end number lib
}

Measured memory_bytes: 47772
#include<iostream>

using namespace std;

int main(void){
  int A, B, K;
  cin >> A >> B >> K;
  int k = 0;
  int d = 101;
  while(k < K){
    d--;
    if(A % d == 0 && B % d == 0) k++;
  }
  cout << d << endl;
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

#define MAX 500000
#define SENTINEL 2000000000

int L[MAX/2+2], R[MAX/2+2];
int cnt;

void merge(int A[],int n,int left, int mid, int right) {
  int i, j, k;
  int n1 = mid -left;
  int n2 = right - mid;
  for(i=0;i<n1;i++) L[i] = A[left + i];
  for(i=0;i<n2;i++) R[i] = A[mid + i];
  L[n1] = R[n2] = SENTINEL;
  i=0, j=0;
  for(k=left; k<right; k++) {
    cnt++;
    if(L[i]<=R[j]) {
      A[k] = L[i++];
    } else {
      A[k] = R[j++];
    }
  }
}

void mergeSort(int A[],int n,int left,int right) {
  int mid;
  if(left+1 < right) {
    mid = (left+right) / 2;
    mergeSort(A,n,left,mid);
    mergeSort(A,n,mid, right);
    merge(A,n,left,mid,right);
  }
}

int main(void) {
  int A[MAX], n, i;
  cnt = 0;

  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);

  mergeSort(A, n, 0, n);
  for(i=0;i<n;i++) {
    if(i) printf(" ");
    printf("%d",A[i]);
  }
  printf("\n%d\n",cnt);

  return 0;
}


Measured memory_bytes: 5576
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n = inint()
P = inintl()

ans = 0

for i in range(n-1):
    a = P[i]
    b = P[i+1]
    if a == i+1:
        P[i] = b
        P[i+1] = a
        ans += 1

if P[-1] == n:
    ans += 1

print(ans)

Measured memory_bytes: 20728
// J'aime
// Chemise Blanche

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

#define int long long

#define ii pair<int,int>
#define fi first
#define sc second

#define all(x) (x).begin(),(x).end()
#define dbg(x) cerr << __LINE__ << " > " << #x << " = " << (x) << endl

void MAIN() {
  int n, r;
  cin >> n >> r;
  if (n >= 10) cout << r << '\n';
  else cout << r + 100 * (10 - n) << '\n';
}

signed main() {
#ifdef _DEBUG
  // freopen("in" , "r", stdin );
  // freopen("out", "w", stdout);
#endif
  ios::sync_with_stdio(0); cin.tie(0);
  int T = 1;
  // cin >> T;
  while (T--) MAIN();
}


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

int main() {
  int N;
  int i;
  cin >> N;
  int A[N];
  int count = 0;
  for(i=0;i<N;i++){
    cin >> A[i];
  }
  sort(A,A+N,greater<int>());
  for(i=0;i<N;i++){
    if(A[i]!=A[i+1]){
      count++;
    }
  }
  cout << count << endl;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if (a > b) {
            System.out.println("a > b");
        } else if (a < b) {
            System.out.println("a < b");
        } else {
            System.out.println("a == b");
        }
        sc.close();
    }
}



Measured memory_bytes: 26140
#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize ("-ffloat-store") // to restrict undesirable precision
#pragma GCC optimize ("-fno-defer-pop")// to pop argument of function as soon as it returns
#define all(a) a.begin(),a.end()
#define ll long long int
#define ld long double
ll power(ll a,ll b,ll m){ if(b==0) return 1; if(b==1) return a%m; ll t=power(a,b/2,m)%m; t=(t*t)%m; if(b&1) t=((t%m)*(a%m))%m; return t;}
ll modInverse(ll a, ll m) { return power(a, m-2, m); }
#define ps push_back
#define fs first
#define sc second
#define takeline cin.ignore();
#define iactive cout.flush();
#define N 3000005
#define endl "\n"
#define mod 1000000007
//((1.0l)*BIG MULTIPLY MAGIC?)
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
//-----------------------------------------------
int main(){

	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	
	ld a,b,c;
	cin>>a>>b>>c;
	// a+b+2sqrt(a*b)<c
	// a+b-c<-2sqrt(a*b)
	// (a+b)^2+c^2-2*(a+b)*c<4*a*b;

	if(a+b-c<-2.0*sqrt(a*b)){
		cout<<"Yes";
	}
	else cout<<"No";
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <typename Q_type>
using smaller_queue = priority_queue<Q_type, vector<Q_type>, greater<Q_type>>;

const int MOD_TYPE = 1;
const ll MOD = (MOD_TYPE == 1 ? (ll)(1e9 + 7) : 998244353);
const int INF = (int)1e9;
const ll LINF = (ll)4e18;
const ld PI = acos(-1.0);
const ld EPS = 1e-11;

#define REP(i, m, n) for (ll i = m; i < (ll)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define possible(n) cout << ((n) ? "possible" : "impossible") << endl
#define Yay(n) cout << ((n) ? "Yay!" : ":(") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x) cerr << #x << ":" << x << endl;

vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

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

  int n, x, y;
  cin >> n >> x >> y;
  x--, y--;
  int cnt[2010] = {};
  rep(i, n)
  {
    REP(j, i + 1, n)
    {
      int d = min(j - i, abs(i - x) + abs(j - y) + 1);
      cnt[d]++;
    }
  }
  for (int i = 1; i <= n - 1; ++i)
  {
    cout << cnt[i] << "\n";
  }
  return 0;
}


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

int main() {
  vector<vector<int>> bingo(3, vector<int>(3));
  rep(i, 3) {
    rep(j, 3) { cin >> bingo[i][j]; }
  }

  int n;
  cin >> n;
  vector<vector<bool>> hit(3, vector<bool>(3));
  rep(k, n) {
    int b;
    cin >> b;
    rep(i, 3) {
      rep(j, 3) {
        if (b == bingo[i][j]) {
          hit[i][j] = true;
        }
      }
    }
  }

  rep(i, 3) {
    if (hit[0][i] && hit[1][i] && hit[2][i]) {
      cout << "Yes" << endl;
      return 0;
    }
    if (hit[i][0] && hit[i][1] && hit[i][2]) {
      cout << "Yes" << endl;
      return 0;
    }
  }

  if (hit[0][0] && hit[1][1] && hit[2][2]) {
    cout << "Yes" << endl;
    return 0;
  }

  if (hit[0][2] && hit[1][1] && hit[2][0]) {
    cout << "Yes" << endl;
    return 0;
  }

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

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i < (int)(n); i++)
#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define MOD 1000000007
#define INF (1e9)
#define PI (acos(-1))
#define mp make_pair
#define pb push_back
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << 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; }

template <class T> inline auto __lcm(T &a, T &b)
{ return a * b / __gcd(a, b); }


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

    print(6 - A - B);

    return 0;
}


Measured memory_bytes: 256
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(){
	long long a,b,c;
	scanf("%lld%lld%lld",&a,&b,&c);
	int i=0;
	while(i<=1000000000&&(a&1)==0&&(b&1)==0&&(c&1)==0){
		long long ta=a>>1,tb=b>>1,tc=c>>1;
		a=tb+tc;
		b=ta+tc;
		c=ta+tb;
		i++;
	}
	if(i==1000000001)i=-1;
	printf("%d\n",i);
	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define END getchar();getchar();return 0
#define rep(i,n) for(int i=0;i<n;i++)
#define inf 1000000007
typedef pair<int, int> P;

bool prime(int n) {
	for (int i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
int lcm(int x, int y) {
	return x / gcd(x, y)*y;
}

int sum[250000];

signed main() {
	int n, ans = 0;
	cin >> n;
	sum[0] = 0;
	map<int, int>mp;
	mp[0]++;
	for (int i = 1; i <= n; i++) {
		int a;
		cin >> a;
		sum[i] = sum[i - 1] + a;
		mp[sum[i]]++;
	}
	for (auto i = mp.begin(); i != mp.end(); i++) {
		int x = i->second;
		x = x * (x - 1) / 2;
		ans += x;
	}
	cout << ans << endl;

	END;
}

Measured memory_bytes: 14336
#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define each(a, b) for(auto (a): (b))
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define pb push_back
#define show(x) cout <<#x<<" = "<<(x)<<endl
#define spair(p) cout <<#p<<": "<<p.fi<<" "<<p.se<<endl
#define svec(v) cout<<#v<<":";rep(i,v.size())cout<<" "<<v[i];cout<<endl
#define sset(s) cout<<#s<<":";each(i,s)cout <<" "<<i;cout<<endl

using namespace std;

typedef pair<int,int>P;

const int MAX_V = 301;

struct edge
{
	int to,cap,rev,kind;
};

vector<edge> G[MAX_V];
int level[MAX_V];
int iter[MAX_V];

void add_edge(int from,int to,int cap,int ord)
{
	G[from].push_back((edge){to,cap,G[to].size(),ord+1});
	G[to].push_back((edge){from,cap,G[from].size()-1,-ord-1});
}

void bfs(int s)
{
	memset(level,-1,sizeof(level));
	queue<int> que;
	level[s] = 0;
	que.push(s);
	while(!que.empty()){
		int v = que.front();
		que.pop();
		rep(i,G[v].size()){
			edge &e = G[v][i];
			if(e.cap > 0 && level[e.to] < 0){
				level[e.to] = level[v] + 1;
				que.push(e.to);
			}
		}
	}
}

int dfs(int v,int t,int f)
{
	if(v==t){
		return f;
	}
	for(int &i = iter[v];i<G[v].size();i++){
		edge &e = G[v][i];
		if(e.cap > 0 && level[v] < level[e.to]){
			int d = dfs(e.to,t,min(f,e.cap));
			if(d>0){
				e.cap -= d;
				G[e.to][e.rev].cap += d;
				return d;
			}
		}
	}
	return 0;
}

int max_flow(int s,int t)
{
	int flow = 0;
	for(;;){
		bfs(s);
		if(level[t]<0){
			return flow;
		}
		memset(iter,0,sizeof(iter));
		int f;
		while((f=dfs(s,t,INF)) > 0){
			flow += f;
		}
	}
}


int main()
{
    int n,m;
    cin >> n >> m;
    rep(i,m){
        int a,b;
        cin >> a >> b;
        add_edge(a-1,b-1,1,i);
    }
    int s,t;
    cin >> s >> t;
    cout << max_flow(s-1,t-1) << "\n";
    vector<int> vec;
    rep(i,n){
        rep(j,G[i].size()){
            if(G[i][j].cap == 0 && G[i][j].kind < 0){
                vec.pb(-G[i][j].kind-1);
            }
        }
    }
    sort(all(vec));
    cout << vec.size() << "\n";
    rep(i,vec.size()){
        cout << vec[i]+1 << "\n";
    }
    return 0;
}

Measured memory_bytes: 3196
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	cin>>n;
	while(n--)
	{
		int t,x,y;
		cin>>t>>x>>y;
		if(t<x+y || (t-x-y)%2){cout<<"No\n";return 0;}
	}
	cout<<"Yes\n";
}

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

using namespace std;
typedef long long ll;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); ++(i))
#define all(x) x.begin(),x.end()


int main()
{
	int n; cin >> n;
	cout << pow(n, 3) << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
const int INF = (1<<30)-1;
const long long LINF = (1LL<<62)-1;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int a[3];
  rep(i, 3) cin >> a[i];
  int ans = 0;
  if (a[0]%2 != a[1]%2 || a[1]%2 != a[2]%2) {
    rep(i, 3) {
      bool flag = false;
      rep(j, i) {
        if (a[i]%2 == a[j]%2) {
          a[i]++;
          a[j]++;
          flag = true;
          break;
        }
      }
      if (flag)
        break;
    }
    ans++;
  }
  sort(a, a+3);
  ans += (a[2]*2-a[0]-a[1])/2;
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 256