akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <queue>
#include <utility>
#include <algorithm>
#include <numeric>
#include <set>
#include <climits>
#include <map>

using namespace std;

string ans[100];
int main(){
  int A;
  int B;
  cin >> A >> B;

  for(int i = 0; i < 50; i++){
    for(int j = 0; j < 100; j++){
      ans[i].push_back('#');
    }
  }
  for(int i = 50; i < 100; i++){
    for(int j = 0; j < 100; j++){
      ans[i].push_back('.');
    }
  }

  A --;
  B --;
  for(int i = 0; 2 * i < 50; i++){
    for(int j = 0; 2 * j < 100; j++){
      if(A == 0){
        break;
      }
      ans[2 * i][2 * j] = '.';
      A--;
    }
    if(A == 0){
      break;
    }
  }

  for(int i = 50; 51 + 2 *(i -50) < 100; i++){
    for(int j = 0; 2 * j < 100; j++){
      if(B == 0){
        break;
      }
      ans[51 + 2  * (i - 50)][2 * j] = '#';
      B--;
    }
    if(B == 0){
      break;
    }
  }

  cout << 100 << " " << 100 << endl;
  for(int i = 0; i < 100; i++){
    cout << ans[i] << endl;
  }

  return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
#include<stdio.h>
#include<string.h>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<bitset>
#include<functional>
#include<iterator>
#include<complex>
#include<fstream>
#include<random>
#include<ctype.h>
#include<stdio.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define REP(i, n) FOR(i, 0, n - 1)
#define NREP(i, n) FOR(i, 1, n)
using ll = long long;
using pii = pair<int, int>;
using PII = pair<ll, ll>;
using piii = pair<pii, pii>;
using Pi = pair<int, pii>;
using Graph = vector<vector<int>>;
const int dx[4] = { 0, -1, 1, 0 };
const int dy[4] = { -1, 0, 0, 1 };
bool check(int x, int y) {
	if (0 <= x && x<55 && 0 <= y && y<55)return true;
	else return false;
}
const ll INF = 1e9 + 7;
int gcd(int x, int y) {
	if (x < y)swap(x, y);
	if (y == 0)return x;
	return gcd(y, x%y);
}
void mul(ll a, ll b) {
	a = a * b % INF;
}
using Graph = vector<vector<int>>;

//iの逆元mod inf
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}
const double PI = 3.14159265358979323846;
const int MAX = 510000;
ll fac[MAX], finv[MAX], inv[MAX];
//テーブルをつくる前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;//mod pにおける1,2,,,nの逆元
	for (int i = 2; i < MAX; ++i) {
		fac[i] = fac[i - 1] * i%INF;
		inv[i] = INF - inv[INF%i] * (INF / i) % INF;
		finv[i] = finv[i - 1] * inv[i] % INF;
	}
}

ll COM(int n, int k) {
	if (n < k)return 0;
	if (n < 0 || k < 0)return 0;
	return fac[n] * (finv[k] * finv[n - k] % INF) % INF;
}
double Euclidean_distance(double x1, double y1, double x2, double y2) {
	return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}

//素因数分解
map<int, int>prime_factor(int n) {
	map<int, int>res;
	for (int i = 2; i*i <= n; ++i) {
		while (n%i == 0) {
			++res[i];
			n /= i;
		}
	}
	if (n != 1)res[n] = 1;
	return res;
}


ll powmod(ll a, ll k, ll mod) {
	ll ap = a, ans = 1;
	while (k) {
		if (k & 1) {
			ans *= ap;
			ans %= mod;
		}
		ap = ap * ap;
		ap %= mod;
		k >>= 1;
	}
	return ans;
}
ll invi(ll a, ll mod) {
	return powmod(a, mod - 2, mod);
}
#define PI 3.14159265358979323846  // 円周率
//逆元Aを足したときのmodで割った余りは
//+=invi(A)
//Yで割ることはY^(10^9+7)-2を掛けることは同値
///////////////////////////////////////
bool is_prime(int n) {
	for (int i = 2; i*i <= n; ++i) {
		if (n%i == 0)return false;
	}
	return n != 1;
}

ll cnt[10000010] = {};
int main() {
	int n; cin >> n;
	for (int i = 2; i<=n/2; ++i) {
		int k = i;
		int x = n / k;
		for (int j = 2; j <= x; ++j) {
			cnt[k*j]++;
		}
	}
	ll ans = 1;
	for (int i = 2; i <= n; ++i) {
		ans += i*(cnt[i]+2);
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 81840
S = list(input())
T = list(input())

l = len(S)
d = {chr(_): chr(_) for _ in range(97,97+26)}
for i in range(l):
    now = d[S[i]]
    change = T[i]
    for k,v in d.items():
        if now == v:
            d[k] = T[i]
        if change == v:
            d[k] = now

ans = 'Yes'
for i in range(l):
    if d[S[i]] != T[i]:
        ans = 'No'
        break

print(ans)


Measured memory_bytes: 6704
//                                                   ¯\_(ツ)_/¯
  //#pragma GCC optimize("Ofast")
 //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>

#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define ll long long
#define pi pair<int,int>
const int N=1e6+5,MOD=1e9+7;

using namespace std;

int n,m;

double dp[3005][3005][2];

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

	scanf("%d",&n);

	std::vector<double> a(n+1);

	for(int i=1;i<=n;i++)scanf("%lf",&a[i]);

	dp[0][0][0]=dp[0][0][1]=1;

	for(int i=1;i<=n;i++){

		for(int j=1;j<i;j++){

			dp[i][j][1]=(dp[i-1][j-1][1]+dp[i-1][j-1][0])*a[i];
			dp[i][j][0]=(dp[i-1][j][0]+dp[i-1][j][1])*(1-a[i]);
		}
		dp[i][i][1]=dp[i-1][i-1][1]*a[i];
		dp[i][0][0]=dp[i-1][0][0]*(1-a[i]);
	}

	double ans = 0;
	for(int i=n/2+1;i<=n;i++)ans+=(dp[n][i][0]+dp[n][i][1]);

	printf("%.10lf\n",ans );
}

Measured memory_bytes: 139264
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <utility>
using namespace std;

int main()
{
    string s;
    cin >> s;
    if(s > "2019/04/30"){
        cout << "TBD" << endl;
    }else{
        cout << "Heisei" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
using System;

namespace AOJ0033
{
    class Program
    {
        static void Main(string[] args)
        {
            string input = Console.ReadLine();
            if (string.IsNullOrEmpty(input)) return;
            int N = int.Parse(input);

            for (int i = 0; i < N; i++)
            { 
                int left = 0;
                int right = 0;
                string output = "YES";

                input = Console.ReadLine();
                if (string.IsNullOrEmpty(input)) break;
                string[] num = input.Split(' ');
                int[] order = new int[10];

                for (int j = 0; j < 10; j++)
                {
                    order[j] = int.Parse(num[j]);
                }

                for (int j = 0; j < 10; j++)
                {
                    if (left > right)
                    {
                        int tmp = left; left = right; right = tmp;
                    }

                    if (order[j] > right)
                    {
                        right = order[j];
                    } else if (order[j] > left)
                    {
                        left = order[j];
                    } else
                    {
                        output = "NO";
                    }
                }

                Console.WriteLine(output);
            }

        }
    }
}

Measured memory_bytes: 8756
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())
#define FORV(i, v) for (auto i = v.begin(); i != v.end(); i++)
using namespace std;

using ll = long long;
using P = pair<int, int>;

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; }
template<class T> inline void dump(vector<T> v) { for (auto& x : v) cerr << x << " "; cerr << endl; }
template<class T> inline void dump(vector<pair<T, T>> v) { for (auto& p : v) cerr << p.first << " " << p.second << endl; }
template<class T> inline void dump(vector<vector<T>> vv) { for (auto& v : vv) {for (auto& x : v) cerr << x << " "; cerr << endl;} }

const ll INF = 1e9;
const long long INFL = 1LL<<60;

const double PI = acos(-1);

int main() {
  string s;
  cin >> s;

  int pos = 0;
  ll ans = 0;

  rep(i, s.size()) {
    if (s[i] == 'W') {
      ans += i - pos;
      pos++;
    }
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3724
import java.io.*;
public class Main{
    public static void main(String[] args){
        try{
        char name = (char)System.in.read();
        if(name == 'a' || name == 'e' || name == 'i' ||
                name == 'o' || name == 'u'){
            System.out.println("vowel");
                }
        else{
            System.out.println("consonant");
        }
        }
        catch(IOException e){
            System.out.println("error");
        }
    }
}


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

#define ll long long
#define pb push_back
#define vi vector<int>
#define sz(a) (int((a).size()))
#define mp make_pair
#define f first
#define s second
#define pii pair<int, int>

using namespace std;

int n;
int ans = (int)2e9;

int get(int k) {
	int res = 0;
	while (k) {
		res += k % 10;
		k /= 10;
	}
	return res;
}

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	
	cin >> n;
	for (int a = 1; a < n; a++) {
		int b = n - a;
		ans = min(ans, get(a) + get(b));
	}
	
	cout << ans << endl;
				
	return 0;
}

Measured memory_bytes: 892
n, m = map(int, input().split())
x_list = tuple(map(int, input().split()))
y_list = tuple(map(int, input().split()))
mod = 10 ** 9 + 7
x_sum = 0
for i in range(1, n + 1):
    x_sum += ((i - 1) * x_list[i - 1] - (n - i) * x_list[i - 1]) % mod
y_sum = 0
for i in range(1, m + 1):
    y_sum += ((i - 1) * y_list[i - 1] - (m - i) * y_list[i - 1]) % mod
print(x_sum * y_sum % mod )


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

#define ll long long
#define ull unsigned long long

using namespace std;

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

	if ( A == B){
		cout << C << "\n";
	} else if (A == C) {
		cout << B << "\n";
	} else {
		cout << A << "\n";
	}


	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 1, 1, -1, -1};
int dx[]={1, -1, 0, 0, 1, -1, -1, 1};

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define mp make_pair
#define fi first
#define sc second
ll n;
int main(){
	cin >> n;
	ll sum = 0;
	ll ans = 0;
	REP(i,n){
		ll a;
		cin >> a;

		if(a == 0) {
			ans += sum / 2;
			sum = 0;
		}else{
			sum += a;
		}
	}

	ans += sum / 2;

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



Measured memory_bytes: 384
#include<vector>
#include<map>
#include<climits>
#include<set>
#include<queue>
#include<algorithm>
#include<functional>
#include<numeric>
#include<utility>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<cctype>
#include<string>
#include<bitset>
#include<cstring>
#include<list>
using namespace std;
typedef vector<int>VI;
typedef vector<VI>VVI;
typedef vector<string>VS;
typedef pair<int,int>PII;
typedef long long LL;
typedef pair<LL,LL>PLL;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define PB push_back
#define EACH(i,c) for(typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define F first
#define S second

typedef string::const_iterator State;

int Number(State &Begin){
    int ret=0;
    while(isdigit(*Begin)){
        ret*=10;
        ret+=(*Begin)-'0';
        Begin++;
    }

    return ret;
}
int Expression(State&);
int Factor(State &Begin){
    if(*Begin=='('){
        Begin++;
        int ret=Expression(Begin);
        Begin++;
        return ret;
    }
    else return Number(Begin);
}

int Term(State &Begin){
    int ret=Factor(Begin);
    while(true){
        if(*Begin=='*'){
            Begin++;
            ret*=Factor(Begin);
        }
        else if(*Begin=='/'){
            Begin++;
            ret/=Factor(Begin);
        }
        else break;
    }
    return ret;
}

int Expression(State &Begin){
    int ret=Term(Begin);
    while(true){
        if(*Begin=='+'){
            Begin++;
            ret+=Term(Begin);
        }
        else if(*Begin=='-'){
            Begin++;
            ret-=Term(Begin);
        }
        else break;
    }
    return ret;
}
string temp[]={
    "(X?X)?(X?X)=",
    "(X?X)?X?X=",
    "(X?X?X)?X=",
    "((X?X)?X)?X=",
};
char op[]={'+','-','*',};
int main(){
    int perm[4];
    while(true){
        REP(i,4)cin>>perm[i];
        bool flag=false;
        REP(i,4)if(perm[i])flag=true;
        if(!flag)break;
        int cnt=0;
        sort(perm,perm+4);
        flag=false;
        do{
            REP(i,3)REP(j,3)REP(k,3){
                if(flag)break;
                REP(l,4){
                    string str=temp[l];
                    str[str.find('?')]=op[i];
                    str[str.find('?')]=op[j];
                    str[str.find('?')]=op[k];
                    REP(x,4)str[str.find('X')]=(char)(perm[x]+'0');
                    State Begin=str.begin();
                    if(Expression(Begin)==10){
                        str=str.substr(0,str.size()-1);
                        cout<<str<<endl;
                        flag=true;
                        break;
                    }
                }
            }
            if(flag)break;
        }while(next_permutation(perm,perm+4));
        if(!flag)cout<<0<<endl;
    }
    return 0;
}

Measured memory_bytes: 1224
#include <bits/stdc++.h>
#define INF 1000000000
using namespace std;

int main() {

   /* int N,M,L;
    cin >> N>>M>>L;*/
    vector<int>A(3);
    for (int i = 0; i < 3; i++) {
        cin >> A.at(i);
    }
  sort(A.begin(),A.end());
  
    cout<<A.at(2)-A.at(0)<<endl;
}


Measured memory_bytes: 256
from decimal import *

getcontext().prec = 20

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


a = Decimal(a).sqrt()
b = Decimal(b).sqrt()
c = Decimal(c).sqrt()

left = a + b
right = c


if (left < right):
    print('Yes')
else:
    print('No')

Measured memory_bytes: 5076
#include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

using namespace std;

#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i <= b; i++)
#define all(a)  begin((a)),end((a))
#define uniq(c) (c).erase(unique(all((c))), end((c)))

int main()
{
    int N, M; cin >> N >> M;
    map<int, vector<int>> map;
    rep (i, 0, M) {
        int a, b; cin >> a >> b;
        if (map.find(a) != map.end())
            map[a].push_back(b);
        else {
            vector<int> tmp = {b};
            map[a] = tmp;
        }
    }

    for (auto i : map[1]) {
        for (auto j : map[i]) {
            if (j == N) {
                cout << "POSSIBLE" << endl;
                return 0;
            }
        }
    }

    cout << "IMPOSSIBLE" << endl;
}

Measured memory_bytes: 19448
package main

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

func main() {
	N, W := ReadInt(), ReadInt()
	v := make([]int, N)
	w := make([]int, N)
	for i := 0; i < N; i++ {
		v[i], w[i] = ReadInt(), ReadInt()
	}
	fmt.Println(knapsackDP(N, W, v, w))
}

// 個数制限なしナップサック問題
func knapsackDP(N, W int, v, w []int) int {
	dp := make([][]int, N+1)
	for i := 0; i < N+1; i++ {
		dp[i] = make([]int, W+1)
	}
	for i := 0; i < N; i++ {
		for j := 1; j <= W; j++ {
			dp[i+1][j] = Max(dp[i][j], dp[i+1][j-1])
			if j >= w[i] {
				dp[i+1][j] = Max(dp[i+1][j], dp[i][j-w[i]]+v[i])
				dp[i+1][j] = Max(dp[i+1][j], dp[i+1][j-w[i]]+v[i])
			}
		}
	}
	return dp[N][W]
}

func Max(xs ...int) int {
	max := xs[0]
	for _, x := range xs[1:] {
		if max < x {
			max = x
		}
	}
	return max
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int) { Scan(&i); return }



Measured memory_bytes: 9632
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<bitset>
using namespace std;
int gi(){
	int x=0,w=1;char ch=getchar();
	while((ch<'0'||ch>'9')&&ch!='-')ch=getchar();
	if(ch=='-')w=0,ch=getchar();
	while(ch>='0'&&ch<='9')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
	return w?x:-x;
}
const int N=305;
const int mod=998244353;
int n,m,r,bin[N];bitset<N>p[N];
void insert(bitset<N>x){
	for(int j=1;j<=m;++j)
		if(x[j])
			if(p[j][j])x^=p[j];
			else{p[j]=x;++r;return;}
}
int main(){
	n=gi();m=gi();
	for(int i=1;i<=n;++i){
		bitset<N>x;x.reset();
		for(int j=1;j<=m;++j)x[j]=gi();
		insert(x);
	}
	for(int i=bin[0]=1;i<N;++i)bin[i]=(bin[i-1]<<1)%mod;
	printf("%lld\n",1ll*(bin[n]-bin[n-r]+mod)*bin[m-1]%mod);
	return 0;
}


Measured memory_bytes: 128
//smartphone
#include "bits/stdc++.h"

//#include <unordered_map>

//#include <iostream>//POJ
//#include <vector>
//#include <string>
//#include <iomanip>
//#include <math.h>
//#include <algorithm>
//#include <cstring>
using namespace std;
#define setc cin.tie(0);ios::sync_with_stdio(0)
#define dd(n) cout<<fixed<<setprecision(n)
#define inp(x) (cin>>x,x)
#define repi(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)
#define rep(i,n) repi(i,0,n)
#define repi_(i,a,b) for(int i=(a), i##_len=(b); i<=i##_len; ++i)
#define rep_(i,n) repi_(i,0,n)
#define repir(i,a,b) for(int i=(a)-1, i##_first=(b); i>=i##_first; --i)
#define repr(i,n) repir(i,n,0)
#define repir_(i,a,b) for(int i=(a), i##_first=(b); i>=i##_first; --i)
#define repr_(i,n) repir_(i,n,0)
#define all(x) (x).begin(),(x).end()
#define vsort(v) sort((v).begin(), (v).end())
#define gsort(v) tsort(v); reverse((v).begin(), (v).end())
#define vrev(v) reverse((v).begin(), (v).end())
//template<typename T> T vpop(vector<T> *v) {
//    T res = v->back();
//    v->pop_back();
//    return res;
//}
//char vpop(string *v) {
//    char res = v->back();
//    v->pop_back();
//    return res;
//}
#define siz(v) ((int)(v).size())
#define ers(v, n) (v).erase((v).begin() + n)
#define cnt(v, n) count(all(v), n)
#define vmin(v) *min_element(v.begin(), v.end())
#define vmax(v) *max_element(v.begin(), v.end())
#define contain(q) !q.empty()
#define cont(q) !q.empty()
//#define qpop(q, a, b) a=q.back().first;b=q.back().second;q.pop()
//#define pqpop(p, a, b) a=q.top().first;b=q.top().second;q.pop()
#define el "\n"
#define sp " "
#define pi 3.14159265358979
#define co(x) cout<<x<<el
#define coc(c, a, b) if(c)co((a));else co((b))
#define cosp(x) cout<<(x)<<' '
#define YES(c) coc(c,"YES", "NO")
#define Yes(c) coc(c,"Yes", "No")
#define yes(c) coc(c,"yes", "no")
#define POSSIBLE(c) coc(c, "POSSIBLE", "IMPOSSIBLE")
#define Possible(c) coc(c, "Possible", "Impossible")
#define possible(c) coc(c, "possible", "impossible")
#define inf INT_MAX
#define wildcard(T) numeric_limits<T>::min()

#define pb push_back
#define pq priority_queue
#define np next_permutation

#ifdef tqktmp_2
#define gc() getchar(); getchar()
#else
#define gc() 1
#endif
const unsigned int bf0 = (1 << 0);
const unsigned int bf1 = (1 << 1);
const unsigned int bf2 = (1 << 2);
const unsigned int bf3 = (1 << 3);
const unsigned int bf4 = (1 << 4);
const unsigned int bf5 = (1 << 5);
const unsigned int bf6 = (1 << 6);
const unsigned int bf7 = (1 << 7);

//#define lint long long
typedef long long lint;
typedef vector<int> ivec; typedef vector<string> svec;
typedef vector<lint> lvec;
typedef vector<vector<int> > ivvec;
typedef pair<int, int> P;

const int
dx8[8] ={ 0,1,1,1,0,-1,-1,-1 },
dy8[8] ={ 1,1,0,-1,-1,-1,0,1 },
dx9[9] ={ 0,1,1,1,0,0,-1,-1,-1 },
dy9[9] ={ 1,1,0,-1,0,-1,-1,0,1 },
dx4[4] ={ 0,1,0,-1 },
dy4[4] ={ 1,0,-1,0 };

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

int main(){
    setc;
    
    lint a,b,h;cin>>a>>b>>h;
    co((a+b)*h/2);
    gc();
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep2(i, x, n) for(int i = x, i##_len = (n); i < i##_len; ++i)
#define all(n) begin(n), end(n)
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
using vd = vector<double>;
vi dir = {-1, 0, 1, 0, -1, -1, 1, 1, -1};

ll f(ll n, ll x) {
  if(n == 0) return 1;
  ll d = pow(2, n + 1) - 3;
  ll a = pow(2, n) - 1;
  if(x <= 1)
    return 0;
  else if(x <= d)
    return f(n - 1, x - 1);
  else if(x == d + 1)
    return a;
  else if(x == d + 2)
    return a + 1;
  else if(x <= d * 2 + 1)
    return a + 1 + f(n - 1, x - d - 2);
  else
    return a * 2 + 1;
}

int main() {
  ll n, x;
  cin >> n >> x;
  cout << f(n, x) << endl;
}

Measured memory_bytes: 512
from decimal import Decimal

n,k = map(int,input().split())
a = list(map(lambda x:Decimal(int(x)),input().split()))

m = max(a)

for i in range(len(a)):
    a[i] = a[i]/m
temp = Decimal(1)
res = []
for i in range(k):
    temp *= a[i]

res = [temp]
for i in range(k,n):
    temp *= a[i]
    temp /= a[i-k]
    res.append(temp)
for i in range(len(res)-1):
    if(res[i] < res[i+1]):
        print('Yes')
    else:
        print('No')






Measured memory_bytes: 58216
#include <stdio.h>

int main(void)
{
	char s[200000 + 1] = {'\0'};
	long cnt_turn = 0;
	long num_b = 0;
	char *sp = &s[0];

	scanf("%s", sp);

	while (*sp != '\0') {
		if (*sp == 'B') {
			num_b++;
		}
		if (*sp == 'W') {
			cnt_turn += num_b;
		}
		sp++;
	}

	printf("%ld\n", cnt_turn);

	return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
char c[200020];
int main(){
	cin>>c;
	int n=strlen(c);
	int m=-3;
	int k=0;
	for(int i=0;i<n;i++){
		if(c[i]==c[i+1] && m<i-2){
			m=i;
			i++;
		}
		k++;
	}
	printf("%d\n",k);
}

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

const long long int MOD = 1e9+7;
bool isPrime[1005];

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

	for(int i = 0; i < 1005; i++) isPrime[i] = true;
	isPrime[0]=isPrime[1]=false;
	//sqrt of 1005 is around 32
	for(int i = 2; i < 35; i++) {
		if(isPrime[i]) {
			for(int j = 2*i; j < 1005; j+=i) {
				isPrime[j] = false;
			}
		}
	}

	int n;
	cin >> n;
	long long int ans = 1;
	for(int i = 0; i <= n; i++) {
		if(isPrime[i]) {
			int expCount = 0;
			int tmp = n;
			while(tmp) {
				expCount += tmp/i;
				tmp /= i;
			}
			ans *= (expCount+1);
			ans %= MOD;
		}
	}

	cout << ans << endl;

	return 0;
}

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


void solve(long long W, long long a, long long b){
  long long mymin = min(a,b);
  long long mymax = max(a,b);

  if(mymin+W >= mymax && mymin+W <= mymax+W){
    cout << 0 << endl;
  }
  else {
    cout << abs(mymax - (mymin+W)) << endl;
  }
}

// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    long long W;
  scanf("%lld",&W);
  long long a;
  scanf("%lld",&a);
  long long b;
  scanf("%lld",&b);
    solve(W, a, b);
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
#define REPD(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) REPD(i, 0, n)
typedef long long ll;
#define fin(ans) cout << (ans) << '\n'
/*

*/
int main()
{
    ll N;
    cin >> N;
    string test = "";
    string abc = "abcdefghijklmnopqrstuvwxyz";
    int res;
    while(N > 0){
        N -= 1;
        test += abc[N%26];
        N /= 26;
    }
    REP(i,test.length()){
        cout << test[test.length()-i-1];    
    }
    cout << endl;
    
    return 0;
}

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

using namespace std;

using ll = long long;

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

    ll n, m;
    cin >> n >> m;

    ll sum = 0;
    if (2 * n <= m) {
        sum += n;
        m -= 2 * n;
        sum += m / 4;
    }
    else sum = m / 2;

    cout << sum << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793
#define MOD 1000000007
typedef long long ll;
typedef long double ld;

int main(){
    ll ans = 0;
    ll N, C, K;
    cin >> N >> C >> K;
    vector<ll> T(N + 1,0);
    for(int i = 0; i < N; i++) cin >> T[i];
    T[N] = 10000000000;
    sort(T.begin(),T.end());
    int cnt = 1;
    int tmp = T[0];
    for (int i = 1; i <= N; i++) {
        cnt++;
        if (cnt > C || T[i] - tmp > K) {
            cnt = 1;
            tmp = T[i];
            ans++;
            }
    }

    cout << ans << endl;

}


Measured memory_bytes: 3940
#include <bits/stdc++.h>
using namespace std;
struct edge {
    int to;     // 辺の行き先
    int weight; // 辺の重み
    edge(int t, int w) : to(t), weight(w) { }
};
using Graph = vector<vector<int>>;
using dou =long double;
string Yes="Yes";
string YES="YES";
string NO="NO";
string No="No";
#define rep(i, n)         for(int i = 0; i < (int)(n); i++)
#define brep(n)           for(int bit=0;bit<(1<<n);bit++)
#define erep(i,container) for (auto i : container)
#define irep(i, n)        for(int i = n-1; i >= (int)0; i--)
#define rrep(i,m,n) for(int i = m; i < (int)(n); i++)
#define reprep(i,j,h,w) rep(i,h)rep(j,w)
#define all(x) (x).begin(),(x).end()
#define aall(x,n) (x).begin(),(x).begin()+(n)
#define VEC(type,name,n) std::vector<type> name(n);rep(i,n)std::cin >> name[i];
#define pb push_back
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define res resize
#define as assign
#define fi first
#define se second
#define itn int
#define mp make_pair
#define sum(a) accumulate(all(a),0)
#define keta fixed<<setprecision
#define vvector(name,typ,m,n,a)vector<vector<typ> > name(m,vector<typ> (n,a))
#define vvvector(name,t,l,m,n,a) vector<vector<vector<t> > > name(l, vector<vector<t> >(m, vector<t>(n,a)));
#define vvvvector(name,t,k,l,m,n,a) vector<vector<vector<vector<t> > > > name(k,vector<vector<vector<t> > >(l, vector<vector<t> >(m, vector<t>(n,a)) ));
 
typedef long long ll;
const int INF = 2000000000;
const ll INF64 = 922337203685477580ll;
const int mod = 1000000007ll;
const ll  MOD = 1000000007LL;
const double pi=3.1415926535897932384626;
int main(){
    string s,t;
    std::cin >> s>>t;
    vvector(dp,int,s.size()+1,t.size()+1,0);
    rep(i,s.size())rep(j,t.size()){
        if(s[i]==t[j])dp[i+1][j+1]=max(dp[i][j]+1,dp[i+1][j+1]);
        dp[i+1][j+1]=max(dp[i+1][1+j],dp[i][j+1]);
        dp[i+1][j+1]=max(dp[i+1][j+1],dp[i+1][j]);
    }
   // std::cout << dp[s.size()][t.size()] << std::endl;
    int i=s.size(),j=t.size();
    string ans;
    while(i>0&&j>0){
        if(dp[i][j]==dp[i-1][j]){
            i--;
        }
        else if(dp[i][j]==dp[i][j-1]){
            j--;
        }
        else{
            ans=s[i-1]+ans;
            i--;j--;
        }
    }
    std::cout << ans << std::endl;
}

Measured memory_bytes: 35584
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <iostream>
#include <queue>
#include <unordered_map>
#include <cmath>
#include <queue>
#include <string>
#include <random>
#include <stack>
#include <set>
#include <unordered_set>

#define bug(x) cout<<"zdongdebug: "<<x<<endl;
#define bug2(x, y) cout<<"zdongdebug: "<<x<<" "<<y<<endl;
using namespace std;
typedef long long ll;
const int maxn = 100005;
const int mod = 1000000007;

int main() {
#ifdef suiyuan2009
  freopen("/Users/suiyuan2009/CLionProjects/icpc/input.txt", "r", stdin);
  //freopen("/Users/suiyuan2009/CLionProjects/icpc/output.txt", "w", stdout);
#endif
  int x,y;
  cin>>x>>y;
  if(x>=1&&x<=9&&y>=1&&y<=9)cout<<x*y<<endl;
  else cout<<-1<<endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
#define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
#define rreps(i, n) for(int i=((int)(n)); i>0; --i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((int)(x).size())
#define pl(s) cout << (s) << "\n";
#define pls(...) {bool space = false; for(auto i : __VA_ARGS__) (cout << (space?" ":"") << i), space = true; cout << "\n";}
#define plexit(s) {cout << (s) << "\n"; exit(0);}
#define yes(s) cout << ((s)?"Yes":"No") << "\n";
template<typename T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using ll = long long; using ull = unsigned long long; using ld = long double;
template<typename T = int> using V = vector<T>; template<typename T = int> using P = pair<T, T>;
using Vi = V<int>; using Vl = V<ll>; using Vd = V<ld>; using VVi = V<Vi>; using VVl = V<Vl>; using Pi = P<int>; using Pl = P<ll>; using Pd = P<ld>;
constexpr ll MOD = 1000000007; constexpr int INF = (1 << 30) - 1; constexpr ll INFL = 1LL << 60; constexpr ld EPS = 1e-12; constexpr ld PI = 3.141592653589793238462643383279;

int main(void) {
  int n; cin >> n;
  map<int, int> mp;
  int x = 0;
  rep(i,n) {
    int a; cin >> a;
    mp[min(8, a/400)]++;
  }
  int mi = sz(mp) - ((mp.count(8) ? 1 : 0));
  int ma = mi + mp[8];
  if (mi == 0) mi = 1;
  cout << mi << " " << ma << endl;
  return 0;
}


Measured memory_bytes: 3600
w,a,b=map(int,input().split())
if a<b:
  if a+w<b:
    print(b-a-w)
  else:
    print(0)
elif a>b:
  if b+w<a:
    print(a-b-w)
  else:
    print(0)
else:
  print(0)

Measured memory_bytes: 8996
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define repd(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
const ll INF = 1LL << 60;
const int INF32 = 1 << 29;
const ll MOD = 1000000007;
using Graph = vector<vector<int>>; // グラフ型
using pint = pair<int, int>;

int main()
{
    int N, A, B;
    cin >> N >> A >> B;
    string S;
    cin >> S;

    int Gen = 0;
    int Kai = 0;
    rep(i, N)
    {
        if (S[i] == 'c')
        {
            cout << "No" << endl;
            continue;
        }
        if (S[i] == 'a')
        {
            if (Gen < A + B)
            {
                Gen++;
                cout << "Yes" << endl;
            }
            else
            {
                cout << "No" << endl;
            }
            continue;
        }
        if (S[i] == 'b')
        {
            if (Gen < A + B && Kai < B)
            {
                Kai++;
                Gen++;
                cout << "Yes" << endl;
            }
            else
            {
                cout << "No" << endl;
            }
        }
    }
}

Measured memory_bytes: 896
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> i_i;

#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define ALL(v) v.begin(), v.end()
#define SZ(x) ((int)(x).size())

const double PI  = acos(-1.0);
const double EPS = 1e-9;
const ll INF = 1e9+10;
const ll mod = 998244353;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define print(x) cerr << #x << " is " << x << endl;
//#define print(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; 
int main()
{
    
    ll N, K, ans = 0;
    cin >> N >> K;
    vector<ll> H(N);
    
    K = min(N, K);
    rep(i, N)cin >> H[i];
    sort(ALL(H)); //, greater<ll>());
    
    //ll x = H[N - K];
    
    
    rep(i, N - K){
        ans += H[i];
    }
    cout << ans;
    return 0;    
}


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

char s[500001];
int nxt[500000][27], go[500000][20];

int main(){
	scanf("%s", s);
	int n = strlen(s);
	f(i, 0, n)f(j, 0, 27)nxt[i][j] = 1e6;
	f(i, 0, n)f(j, 0, 20)go[i][j] = 1e6;
	for (int i = n - 1; i >= 0; --i){
		nxt[i][s[i] - 'a'] = i + 1;
		int t;
		f(j, s[i] - 'a' + 1, 27)if ((t = nxt[i][j - 1]) < n)nxt[i][j] = nxt[t][j - 1]; else break;
		f(j, 0, s[i] - 'a')if ((t = nxt[i][26]) < n)nxt[i][j] = nxt[t][j]; else break;
		go[i][0] = nxt[i][26];
		f(j, 1, 20)if ((t = go[i][j - 1]) < n)go[i][j] = go[t][j - 1]; else break;
	}
	int q;
	scanf("%d", &q);
	while (q--){
		int l, r;
		scanf("%d%d", &l, &r);
		--l;
		int z = l;
		for (int i = 19; i >= 0; --i){
			if (z < n && go[z][i] <= r)z = go[z][i];
		}
		printf("%s\n", z == r ? "Yes" : "No");
	}
}


Measured memory_bytes: 92928
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
#define rep(i, x, n) for(int i = x; i < n; i++)
using namespace std;
const long long INF = 1LL << 60;
bool compare_by_a(pair<int, int> a, pair<int, int> b) {
    if(a.first != b.first) {
        return a.first < b.first;
    } else {
        return a.second < b.second;
    }
}
const int ININF = 1000000;
long long longPow(int n) {
    long long res = 1;
    rep(i, 0, n) { res *= 10; }
    return res;
}
unsigned GetDigit(unsigned num) { return log10(num) + 1; }
int main() {
    long long N;
    cin >> N;
    vector<int> dp(N + 1);
    dp[0] = 0;
    rep(i, 1, N + 1) {
        string s = to_string(i);
        int keta = s.length();
        int a = s[0] - '0';
        int b = s[keta - 1] - '0';
        //cout << a << "," << b << "," << keta << endl;
        if(b == 0) {
            dp[i] = dp[i - 1];

            continue;
        }
        long long sum = 0;
        rep(i, 1, keta + 1) {
            if(i == 1) {
                if(a == b) {
                    sum += 2;
                }
            } else if(i != keta) {
                sum += 2 * longPow(i - 2);
            } else {
                // cout << "a" << endl;
                if(b < a) {
                    sum += 2 * longPow(i - 2);
                } else if(b > a) {
                } else {
                    //cout << "b" << endl;
                    int naka = atoi(s.substr(1, keta - 2).c_str());
                    naka++;
                    sum += 2 * naka;
                }
            }
        }
        if(a == b) {
            dp[i] = dp[i - 1] + sum - 1;
        } else {
            dp[i] = dp[i - 1] + sum;
        }
    }
    cout << dp[N] << endl;
}


Measured memory_bytes: 1024
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
int max(int a,int b){return a>b?a:b;}
int min(int a,int b){return a<b?a:b;} 
int main(void)
{
  int n,i;
  long  a,ans=1;
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
    scanf("%ld",&a);
    if(a==0)
    {
      ans=0;
      break;
    }
    if(a<=1000000000000000000/ans)
      ans*=a;
    else
      ans=-1;
  }
  printf("%ld",ans);
    
}


Measured memory_bytes: 1736
#include <algorithm>
#include <deque>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;

vector<int> solve(const vector<vector<int>> &G) {
  const int N = G.size();
  vector<int> id(N, -1);
  int sz = 0;
  for (int i = 0; i < N; i++) {
    if (id[i] != -1) {
      continue;
    }
    queue<int> q;
    q.push(i);
    id[i] = sz;
    while (!q.empty()) {
      int v = q.front();
      q.pop();
      for (int u : G[v]) {
        if (id[u] == -1) {
          q.push(u);
          id[u] = sz;
        }
      }
    }
    ++sz;
  }
  return id;
}

int main() {
  int N, K, L;
  cin >> N >> K >> L;
  vector<vector<int>> G1(N), G2(N);
  for (int i = 0; i < K; i++) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    G1[a].push_back(b);
    G1[b].push_back(a);
  }
  for (int i = 0; i < L; i++) {
    int a, b;
    cin >> a >> b;
    --a;
    --b;
    G2[a].push_back(b);
    G2[b].push_back(a);
  }
  vector<int> id1 = solve(G1);
  vector<int> id2 = solve(G2);
  map<pair<int, int>, int> cnt;
  for (int i = 0; i < N; i++) {
    ++cnt[make_pair(id1[i], id2[i])];
  }
  for (int i = 0; i < N; i++) {
    cout << cnt[make_pair(id1[i], id2[i])] << " ";
  }
  cout << endl;
  return 0;
}


Measured memory_bytes: 27812
import kotlin.math.max

fun main() {
    val n = nextInt()
    val ln = nextIntList()
    val ans = solve(ln)
    println(ans)
}


fun solve(ln: List<Int>): Int {
    val excludeDistinctLn = ln.distinct()
    val excludeDistinctLnSize = excludeDistinctLn.size

    if (excludeDistinctLnSize < 3) return 0

    var max = 0
    val lnMap = ln.groupBy { it }

    for (i in 0..excludeDistinctLnSize - 1) {
        val li = excludeDistinctLn[i]
        for (j in (i +1)..excludeDistinctLnSize - 1) {
            val lj = excludeDistinctLn[j]
            for (k in (j + 1)..excludeDistinctLnSize - 1) {

                val lk = excludeDistinctLn[k]
                if (li + lj - lk > 0 && li + lk - lj > 0 && lk + lj - li > 0) {
                    max += lnMap[li]!!.size * lnMap[lj]!!.size * lnMap[lk]!!.size
                }
            }
        }
    }

    return max
}

fun nextInt(): Int {
    return readLine()!!.toInt()
}

fun nextIntList(): List<Int> {
    return readLine()!!.split(" ").map { it.toInt() }
}

fun nextString(): String {
    return readLine()!!
}

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

typedef struct node {
    int key;
    struct node *prev, *next;
} Node;

Node *nil;

void initialize() {
    nil = (Node *)malloc(sizeof(Node));
    nil->next = nil;
    nil->prev = nil;
}

void insert(int x){
    Node *i;
    i = (Node *)malloc(sizeof(Node));
    i->key = x;
    
    i->next = nil->next;
    nil->next->prev = i;
    nil->next = i;
    i->prev = nil;
}

void delete_node(int x) {
    Node *now = nil->next;
    while(now != nil) {
        if(now->key == x) {
           now->prev->next = now->next;
           now->next->prev = now->prev;
           free(now);
           break; 
        }
        
        now = now->next;
    }
}
void printList(){
    Node *cur = nil->next;
 
    int isf = 0;
    while(1){
        if(cur == nil) break;
        if(isf ++ > 0) printf(" ");
        printf("%d", cur->key);
        cur = cur->next;
    }
 
    printf("\n");
 
}
 
void delete_last(){
    if(nil->prev == nil) return;
    Node *last = nil->prev;
    nil->prev->prev->next = nil;
    nil->prev = nil->prev->prev;
    free(last);
}

void delete_first() {
    if(nil->next == nil) return;
    Node *first = nil->next;
    nil->next = first->next;
    first->next->prev = nil;
    free(first);
}

int main(void){
    // Your code here!
    int n;
    scanf("%d", &n);
    
    char cmd[20];
    int val;
    initialize();
    for(int i = 0; i < n; i++){
        scanf("%s %d", cmd, &val);
        
        if(strlen(cmd) < 7){
            if(cmd[0] == 'i'){
                insert(val);
            } else {
                delete_node(val);
            }
        } else {
            if(cmd[6] == 'F'){
               delete_first(); 
            } else {
               delete_last();    
            }
        }
    }
    printList();
}



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

using namespace std;

int main() {
  int N, Ma, Mb;
  cin >> N >> Ma >> Mb;
  vector<int> a(N), b(N), c(N);
  for(int i = 0; i < N; ++i) cin >> a[i] >> b[i] >> c[i];
  vector<vector<int> > dp(404, vector<int>(404, INT_MAX));
  dp[0][0] = 0;
  for(int i = 0; i < N; ++i) {
    for(int j = 400; j >= a[i]; --j) {
      for(int k = 400; k >= b[i]; --k) {
	if(dp[j-a[i]][k-b[i]] == INT_MAX) continue;
	dp[j][k] = min(dp[j][k], dp[j-a[i]][k-b[i]]+c[i]);
      }
    }
  }
  int ans = INT_MAX;
  for(int i = 1; i <= 400; ++i) {
    for(int j = 1; j <= 400; ++j) {
      if(i/__gcd(i, j) == Ma && j/__gcd(i, j) == Mb) {
	ans = min(ans, dp[i][j]);
      }
    }
  }
  cout << (ans == INT_MAX ? -1 : ans) << endl;
  return 0;
}


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

int main() {
	int W,H,x,y,r;
	
	cin >> W >> H >> x >> y >> r;
	
	if(0<=x-r && x+r<=W && 0<=y-r && y+r<=H){
		cout <<"Yes" << endl;
	}else{
		cout << "No" << endl;
	}
	
	return 0;
}

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

using namespace std;

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

int j[100010][26];

int main(){
  string s, t;
  cin >> s >> t;
  memset(j, -1, sizeof j);
  REP(i, s.size()){
    int d = s[i] - 'a';
    for(int x = i + 1; x--; ){
      if(j[x][d] >= 0) break;
      j[x][d] = i;
    }
  }
  uint64_t loop = 0;
  int p = 0;
  REP(i, t.size()){
    int d = t[i] - 'a';
    if(j[0][d] < 0){
      cout << -1 << endl;
      return 0;
    }
    if(j[p][d] >= 0){
      p = j[p][d] + 1;
    }else{
      ++loop;
      p = j[0][d] + 1;
    }
    if(p == s.size()){
      ++loop;
      p = 0;
    }
  }
  cout << (loop * s.size() + p) << endl;
  return 0;
}


Measured memory_bytes: 10752
import sys
input = sys.stdin.readline

SS = input().rstrip()
ls = len(SS)
Ki = int(input())
lis= []

for K in range(1,4):
    S = list(SS*K)
    N = len(S)
    cnt = 0
    for i in range(1,N-1):
        if S[i-1] == S[i] == S[i+1]:
            S[i] = '5'
            cnt += 1
    for i in range(N-1):
        if S[i]==S[i+1]:
            S[i] = '5'
            cnt += 1
    lis.append(cnt)    
a = lis[0]
d1 = lis[1]-lis[0]
d2 = lis[2]-lis[1]

print(a + d1 *(Ki//2) + d2*((Ki-1)//2))


Measured memory_bytes: 9240
N = int(input())
V = list(map(int,input().split()))
even = [0]*(10**5+10)
odd = [0]*(10**5+10)
for v in V[1::2]:
  even[v] += 1
for v in V[::2]:
  odd[v] += 1
max_even = max(even)
max_odd = max(odd)
if(even.index(max_even) != odd.index(max_odd)):
  print(N - max_even - max_odd)
else:
  even.sort(reverse = True)
  odd.sort(reverse = True)
  print(min(N - even[0] - odd[1], N - even[1] - odd[0]))

Measured memory_bytes: 14396
N = int(input())
A=[0]*N
B=[0]*N
class Job:
    def __init__(self, a, b):
        self.time = a
        self.limit = b

jobs = []
for i in range(N):
    A, B = map(int, input().split())
    jobs.append(Job(A, B))

jobs.sort(key = lambda job: job.limit)
used_time = 0
for job in jobs:
    used_time += job.time
    if used_time > job.limit:
        print("No")
        break
else:
    print("Yes")

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

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<int, int> pii;
typedef pair<pii, pii> piii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector< vi > vvi;
typedef vector< vvi > vvvi;
typedef vector<short> vs;
typedef vector<vs> vvs;
typedef vector<vvs> vvvs;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
typedef vector<ld> vld;
typedef vector<vld> vvld;
typedef vector<vvld> vvvld;
typedef vector<string> vst;
typedef vector<vst> vvst;
typedef pair<ld, ld> pld;

#define inmin(a, b) a = min(a, (b))
#define inmax(a, b) a = max(a, (b))
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define sqr(x) ((x) * (x))
#define fori(i, n) for(int i = 0; i < int(n); ++i)
#define SZ(a) ((int)((a).size()))
#define triple(T) tuple<T, T, T>
#define quad(T) tuple<T, T, T, T>
#define watch(x) cerr << (#x) << " = " << (x) << endl;

#ifdef RUS_HOME
#define cerr cout
#else
#define cerr if (false) cerr
#endif

const double PI = 2 * acos(0.0);
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());

const string DIGITS = "0123456789";
const string ALPH = "abcdefghijklmnopqrstuvwxyz";


template <class T0, class T1>
inline ostream & operator << (ostream &out, pair<T0, T1> &a) {
    return out << "{" << a.first << ", " << a.second << "}";
}

template <class T0, class T1>
inline istream & operator >> (istream &in, pair<T0, T1> &a) {
    return in >> a.first >> a.second;
}

template <class T0, class T1, class T2>
inline ostream & operator << (ostream &out, tuple<T0, T1, T2> &a) {
    return out << "{" << get<0>(a) << ", " << get<1>(a) << ", " << get<2>(a) << "}";
}

template <class T0, class T1, class T2, class T3>
inline ostream & operator << (ostream &out, tuple<T0, T1, T2, T3> &a) {
    return out << "{" << get<0>(a) << ", " << get<1>(a) << ", " << get<2>(a) << ", " <<  get<3>(a) << "}";
}

template<class T>
inline ostream & operator << (ostream &out, vector<T> &a) {
    out << "[";
    fori (i, a.size())
        out << a[i] << vector<string>{", ", "]  "}[i + 1 == a.size()];
    return out;
}


void smain();



signed main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
#ifdef RUS_HOME
    freopen("input", "r", stdin);
    clock_t start = clock();
#endif
    cout << setprecision(12) << fixed;
    smain();
#ifdef RUS_HOME
    cout << "\n\n\n\nTOTAL EXECUTION TIME: " << float( clock () - start ) /  CLOCKS_PER_SEC << endl;
#endif
    return 0;
}


void smain() {

    int a,b,c;
    cin>>a>>b>>c;
    if(a%2==0||b%2==0||c%2==0)
        cout<<0;
    else{
        if(a<b)
            swap(a,b);
        if(a<c)
            swap(a,c);
        cout<<b*c;
    }

}

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

using i64=int64_t;

#define rep(i,x,y) for(i64 i=i64(x),i##_max_for_repmacro=i64(y); i<i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
 
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif
 
const int inf=1.01e9;
const i64 inf64=4.01e18;
const double eps=1e-9;
 
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
        os << v << ",";
    }
    os << "]";
    return os;
}

void solve(){
    i64 N,K;
    cin >> N >> K;
    vector<i64> x(N);
    rep(i,0,N) cin >> x[i];

    i64 idx=N;
    rep(i,0,N){
        if(x[i]>=0){
            idx=i;
            break;
        }
    }

    i64 ans=inf64;
    if(idx>=K){
        ans=min(ans,x[idx-1]-x[idx-K]-x[idx-1]);
        print(ans);
    }
    if(N-idx>=K){
        ans=min(ans,x[K+idx-1]-x[idx]+x[idx]);
        print(ans);
    }
    for(int i=idx-1; i>=0; --i){
        if((idx-i)+N-idx<K) continue;
        i64 K_=K-(idx-i);
        ans=min(ans,(x[idx-1]-x[i]-x[idx-1])*2+(x[K_+idx-1]-x[idx]+x[idx]));
        print(i);
        print(ans);
    }
    rep(i,idx,N){
        if((i-idx+1)+idx<K) continue;
        i64 K_=K-(i-idx+1);
        ans=min(ans,(x[idx-1]-x[idx-K_]-x[idx-1])+(x[i]-x[idx]+x[idx])*2);
        print(i);
        print(ans);
    }

    cout << ans << endl;
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
  int n; cin>>n;int arr[n+1]; ll c=0;
  for(int i=0;i<n;i++){
    cin>>arr[i];
  } ll k=arr[0];
  for(int i=1;i<n;i++){
    if(arr[i]<k){ c+=k-arr[i];  arr[i]=k;}
    else k=arr[i];
  } cout<<c;
}


Measured memory_bytes: 4368