akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;

using ll = long long int;

const int MAX_N = (int)(1e2 + 5);

int n;
int x[MAX_N], y[MAX_N];
ll h[MAX_N];

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

  int tmpind;

  for (int i = 0; i < n; ++i) {
    scanf("%d %d %lld", &(x[i]), &(y[i]), &(h[i]));
    if (h[i] > 0) tmpind = i;
  }

  for (int tx = 0; tx <= 100; ++tx) for (int ty = 0; ty <= 100; ++ty) {
    ll base = h[tmpind] + abs(x[tmpind] - tx) + abs(y[tmpind] - ty);

    bool pass = true;

    for (int i = 0; i < n; ++i) {
      if (h[i] > 0) {
        ll cur = h[i] + abs(x[i] - tx) + abs(y[i] - ty);
        if (cur != base) {
          pass = false;
          break;
        }
      }
      else {
        ll cur_target = base - abs(x[i] - tx) - abs(y[i] - ty);
        if (cur_target > 0) {
          pass = false;
          break;
        }
      }
    }

    if (pass) {
      printf("%d %d %lld\n", tx, ty, base);
      return 0;
    }
  }

  return 0;
}


Measured memory_bytes: 256
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
import numpy as np

N = INT()
lr = [LIST() for _ in range(N)]

ans = 0
for i in range(N):
	ans += lr[i][1] - lr[i][0] +1

print(ans)

Measured memory_bytes: 13828
import Foreign;x%'1'=2*x+1;x%c=2*x;main=do n<-readLn;s<-getLine;putStr.unlines$show.length.fst.span(/=0).iterate(rem<*>toInteger.popCount).(xor$foldl(%)0s).bit<$>[n-1,n-2..0]

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

int main(){
   long long int N;
   cin >> N;
   long long int a;
   cin >> a;
   long long int b;
   cin >> b;
   long long int shou;
   long long int amari;
   shou=N/(a+b);
   amari=N%(a+b);
   if(amari<=a)cout<<a*shou+amari<<endl;
   else cout<<a*shou+a<<endl;
   return 0;
   }

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define endl "\n"
#define se second
#define ls( s) (s&(-s))
#define ll long long
#define inf 0x3f3f3f3f
const ll N = 500030;
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
const ll mod =    1e9+7;
int n,k;

vector<int> g[N];

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

rep(i,0,n-1)
{
	int x,y;
	cin>>x>>y;
	x--;
	y--;
	g[x].push_back(y);
	g[y].push_back(x);
}
cin>>k;
int val[n];
rep(i,0,n)
val[i]=-1;
priority_queue<pair<int,int>, vector<pair<int,int>>, greater<pair<int,int>>>pq;
while(k--)
{
	int x,y;
	cin>>x>>y;
	x--;
	val[x]=y;
	pq.push({y,x});
}
while(!pq.empty())
{
	int x=pq.top().fi;
	int y=pq.top().se;
	pq.pop();
	for(int z:g[y])
	{
		if(val[z]==-1)
		{
			val[z]=x+1;
			pq.push({x+1,z});
		}
		else if(val[z])
		{
			if(abs(val[z]-x)!=1)
			{
				cout<<"No";
				return 0;
			}
		}
	}
}
cout<<"Yes\n";
rep(i,0,n)
{
	cout<<val[i]<<endl;
}



}

Measured memory_bytes: 17268
using System;
using System.Numerics;

namespace b
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());

            var a = new BigInteger[n + 1];
            a[0] = 2;
            a[1] = 1;

            for(var i = 2; i <= n ;i++){
                a[i] = a[i - 1] + a[i - 2];
            }

            Console.WriteLine(a[n]);
        }
    }
}


Measured memory_bytes: 13396
package main

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

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	X, Y := sc.nextInt(), sc.nextInt()
	fmt.Println(X + Y/2)
}


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

int main(){
    int a,b,c,d;
    cin >> a >> b >> c >>d;
    if((abs(a-c)<=d)||((abs(a-b)<=d)&&(abs(b-c)<=d))){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }

    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<cassert>

#define f first
#define s second
#define mp make_pair

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

using namespace std;

typedef unsigned int uint;
typedef long long ll;

#define MAX 1000001

int h[MAX];

int main(){
  for(int i=1; i<MAX; i*=2)
    for(int j=i; j<MAX; j*=3)
      for(int k=j; k<MAX; k*=5)
        h[k] = 1;
  int a,b;
  while(scanf("%d",&a),a){
    int ans = 0;
    scanf("%d",&b);
    while(a <= b) ans += h[a++];
    printf("%d\n",ans);
  }
  return 0;
}

Measured memory_bytes: 0
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MAX=1000005;
const ll INF=0x3f3f3f3f3f3f3f;
const ll MOD=1000000007;
ll n,dp[MAX],dp_sum[MAX];
int main(){
    scanf("%lld",&n);
    dp[n+1]=1,dp[n]=1,dp[n-1]=n,dp_sum[n-1]=n-1;
    for(ll i=n-2;i>=0;i--){
        dp[i]=(n-1)*(n-1)+dp_sum[i+1]+dp[i+1],dp[i]%=MOD;
        dp_sum[i]=dp_sum[i+1]+dp[i+2]-1,dp_sum[i]%=MOD;
    }
    printf("%lld\n",dp[0]);
    //for(ll i=0;i<=n;i++) printf("%lld : %lld %lld\n",i+1,dp[i],dp_sum[i]);
}


Measured memory_bytes: 15872
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
typedef long long ll;
#define showa(v) for(int iii = 0; iii < v.size(); iii++){ cout << v[iii] << " ";} cout << endl;
#define show(iiii) cout << iiii << endl; 
#define shows(iiiii) cout << iiiii << " ";
#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include <cmath>
#include <cstdlib>
#include <cassert>
#include <algorithm>
#include <set>
#include <deque>
#include <numeric>
#include<tuple>
#include <utility>
#include <map>
#include <cassert>
using namespace std;
 
int main(){
    long long int n, a, b;
    cin >> n >> a >> b;
    cout << (n/(a+b)) *a + min(a, (n%(a+b))) << endl;
    // return 0;
 }

Measured memory_bytes: 256
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    s = inputs[0]
    weekly = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
    c = 7
    index = None
    for i in range(len(weekly)):
        if s == weekly[i]:
            return c - i


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)


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

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/2;
    public static final int inf = Integer.MAX_VALUE/2;

    static void solve(InputReader in, PrintWriter out){
        long a = in.nl();
        char[] c = in.ns().toCharArray();
        long b = 0;
        for (int i = 0; i < 4; i++) {
            if(i!=1){
                b += c[i]-'0';
                b *= 10;
            }
        }
        b /= 10;
        a *= b;
        out.println(a/100);
    }

    public static void main(String[] args){
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public double nd(){
            return Double.parseDouble(ns());
        }
        public char nc(){
            return ns().toCharArray()[0];
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

Measured memory_bytes: 32700
#include<iostream>
#include<string>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<vector>
#include<functional>
#include<iomanip>
#include<queue>
#include<cassert>
#include<tuple>
#include<set>
#include<map>
#include<list>
#include<bitset>
#include<utility>
#include<numeric>

#define PB push_back
#define all(a)  (a).begin(),(a).end()
#define ALL(v) begin(v), end(v)
#define dwn(a)  (a).begin(),(a).end(), greater<int>()
#define rep(i, m) for (int i = 0; i < m; i++)
#define REP(i, n, m) for (int i = n; i < m; i++)
#define V vector<int>
#define VV vector<V>
#define VVV vector<VV>

using namespace std;

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

const int dx[4] = { 1, 0, -1, 0 };
const int dy[4] = { 0, 1, 0, -1 };
const int INF = (int)1e9;
const ll inf = (ll)1e18;
const ll MOD{ (ll)1e9 + 7 };
const long double EPS = 1e-10;

int main() {
	ll n, h;
	cin >> n >> h;
	vector<ll> a(n), b(n);
	rep(i, n) cin >> a[i] >> b[i];

	sort(dwn(a));
	sort(dwn(b));

	vector<int> strong;

	for (int i = 0; i < b.size(); i++) {
		if (a[0] <= b[i]) {
			strong.push_back(b[i]);
		}
	}

	ll cnt = 0;

	for (int i = 0; i < strong.size(); i++) {
		h -= strong[i];
		cnt++;
		if (h <= 0) {
			break;
		}
	}

	if (h > 0) {
		cnt += (h - 1) / a[0] + 1;
	}
	
	cout << cnt << endl;
	return 0;
}

Measured memory_bytes: 2428
#include <stdio.h>
long int abs2(long int a)
{
    if(a<0) return -a;
    return a;
}
long int sum(long int n, long int a[])
{
    long int i, sum=0;
    for(i=0;i<n;i++){
        if(a[i]<0) a[i]=a[i]*(-1);
        sum=sum+a[i];
    }
    return sum;
}
long int summin(long int n, long int a[], long int minidx)
{
    long int i, sum=0;
    for(i=0;i<n;i++){
        if(a[i]<0 && i!=minidx) a[i]=a[i]*(-1);
        else if(i==minidx && a[i]>0) a[i]=a[i]*(-1);
        sum=sum+a[i];
    }
    return sum;
}
int main(void)
{
    long int n, a[100000], i, ans, cntm=0, min=1000000001, minidx;
    scanf("%ld", &n);
    for(i=0;i<n;i++){
        scanf("%ld", &a[i]);
        if(abs2(a[i])<min){
            min=abs2(a[i]);
            minidx=i;
        }
    }

    for(i=0;i<n;i++){
        if(a[i]<=0) cntm++;
    }
    if(cntm%2==0) ans=sum(n, a);
    else ans=summin(n, a, minidx);
    printf("%ld\n", ans);
    return 0;
}


Measured memory_bytes: 896
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <random>
#include <iomanip>
#include <unordered_set>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
typedef map<int, int> mii;
typedef set<int> si;
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define irep(it, stl) for(auto it = stl.begin(); it != stl.end(); it++)
#define drep(i,n) for(int i = (n) - 1; i >= 0; --i)
#define fin(ans) cout << (ans) << '\n'
#define STLL(s) strtoll(s.c_str(), NULL, 10)
#define mp(p,q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
#define MATHPI acos(-1)
#define itn int
// #define endl '\n';
#define fi first
#define se second
#define NONVOID [[nodiscard]]
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
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;}
template<class T> inline void dump(T &v){irep(i, v){cout<<*i<<((i==--v.end())?'\n':' ');}}
inline string getline(){string s; getline(cin,s); return s;}
inline void yn(const bool b){b?fin("yes"):fin("no");}
inline void Yn(const bool b){b?fin("Yes"):fin("No");}
inline void YN(const bool b){b?fin("YES"):fin("NO");}
struct io{io(){ios::sync_with_stdio(false);cin.tie(0);}};
const int INF = INT_MAX;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;
const double EPS = 1e-9;

vector<ll> enum_div(ll n) {
    vector<ll> ret;
    for(ll i = 1 ; i*i <= n ; ++i){
        if(n%i == 0) {
            ret.push_back(i);
            if(i*i != n){
                ret.push_back(n/i);
            }
        }
    }
    return ret;
}

int main() {
    
    ll ans=0;
    ll n;
    cin>>n;
    vll v=enum_div(n);
    for(ll x:v){
        if(x==1)continue;
        ll t=n;
        while(t%x==0)t/=x;
        t%=x;
        if(t==1)ans++;
    }
    ans+=enum_div(n-1).size()-1;
    fin(ans);
}



Measured memory_bytes: 384
<?php
$n = intval(fgets(STDIN));
$min = 10**10;
foreach(divisor($n) as $num){
    $min = min($min, max(strlen($num),strlen($n/$num)));
}
echo $min;

function divisor($n){
    for($i = ceil(sqrt($n)); $i >= 1; $i--){
        if($n % $i == 0){
            $f[] = $i;
        }
    }
    return array_unique($f);
}


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

#define LL long long
#define hell 998244353
#define PI 3.1415926535897932385



int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout << fixed << showpoint;
cout << setprecision(11);

int n;cin>>n;
map<int, int>mp;
LL sm = 0;
for(int i=0;i<n;i++)
{
  int a;cin>>a;mp[a]+=1;
  sm+=a;
}
int q;cin>>q;
while(q--)
{
  int a, b;cin>>a>>b;
  int sv = mp[a];
  if(sv>0)
  {
     sm+=sv*(b-a);
     mp[a]=0;
     mp[b]+=sv;
  }
  cout<<sm<<"\n";

}

return 0;
}

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

int eratosthenes(int n, vector<bool>& prime) {
    int ret = 0; prime.assign(n, false);
    vector<bool> chk(n, false);
    for (auto i = 2; i < n; i++) {
        if(chk[i]) continue;
        ret++; prime[i] = true;
        for (auto j = i; j < n; j += i) chk[j] = true;
    }
    return ret;
}

int main(){
    vector<bool> prime; eratosthenes(1000000, prime);
    vector<int> cnt(1000000, 0);
    for (auto i = 0; i < 1000000; i++) {
        if(prime[i]) cnt[i]++;
        cnt[i + 1] += cnt[i];
    }

    string s;
    while(cin >> s){
        int n = stoi(s);
        cout << cnt[n] << endl;
    }
    return 0;
}


Measured memory_bytes: 6652
#include<bits/stdc++.h>
using namespace std;
main()
{
	string s,t;
    int ct=0, i;
    cin>>s>>t;
    for(i=0;i<s.size();i++)
    {
        if(s[i]!=t[i])
        {
            ct++;
        }
    }
    cout<<ct;
}

Measured memory_bytes: 3916
#include <algorithm>
#include <iostream>
#include <vector>
#include <string> 
#include <set>
typedef long long ll;
using namespace std;

int arr[107];
const ll inf = 1000000001;

int main() {
    int x, n; cin >> x >> n;
    
    set<int>s;
    for (int i = 0; i < n; ++i) {
        int a; cin >> a;
        s.insert(a);
    }

    ll dif = inf;
    ll ans = inf;
    for (int i = -150; i <= 150; ++i) {
        if (s.count(i))
            continue;
        int di = abs(x - i);
        if (di < dif) {
            dif = abs(x - i);
            ans = i;
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3628
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
using static System.Console;
using static System.Math;
class Z { static void Main() => new K(); }
class K
{
	int F => int.Parse(Str);
	long FL => long.Parse(Str);
	int[] G => Strs.Select(int.Parse).ToArray();
	uint[] GU => Strs.Select(uint.Parse).ToArray();
	decimal[] GD => Strs.Select(decimal.Parse).ToArray();
	long[] GL => Strs.Select(long.Parse).ToArray();
	string Str => ReadLine();
	string[] Strs => Str.Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
	static T[] ConstantArray<T>(int n, T val) { var a = new T[n]; for (var i = 0; i < n; i++) a[i] = val; return a; }
	static T[] MakeArray<T>(int n, Func<int, T> f) { var a = new T[n]; for (var i = 0; i < n; i++) a[i] = f(i); return a; }
	static ulong One(int k) => 1ul << k;
	static ulong All(int k) => One(k) - 1;
	static bool Has(ulong s, int k) => (s & One(k)) != 0;
	const int MOD = 998244353;
	public K()
	{
		SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
		Solve();
		Out.Flush();
	}
	void Solve()
	{
		var N = F;
		var a = MakeArray(N, _i => F);
		var S = a.Sum();
		var dp = new long[S + 1];
		dp[0] = 1;
		for (var i = 0; i < N; i++)
		{
			var next = new long[S + 1];
			for (var s = 0; s < a[i]; s++) next[s] = 2 * dp[s] % MOD;
			for (var s = a[i]; s <= S; s++) next[s] = (2 * dp[s] + dp[s - a[i]]) % MOD;
			dp = next;
		}
		var ans = 0L;
		for (var b = (S + 1) / 2; b <= S; b++) ans += dp[b];
		if (S % 2 == 0)
		{
			var dp2 = new long[S + 1];
			dp2[0] = 1;
			for (var i = 0; i < N; i++)
			{
				var next = new long[S + 1];
				for (var s = 0; s < a[i]; s++) next[s] = dp2[s] % MOD;
				for (var s = a[i]; s <= S; s++) next[s] = (dp2[s] + dp2[s - a[i]]) % MOD;
				dp2 = next;
			}
			ans -= dp2[S / 2];
		}
		ans = (Pow(3, N, MOD) - 3 * ans) % MOD;
		if (ans < 0) ans += MOD;
		WriteLine(ans);
	}
	public static long Pow(long a, long b, long mod)
	{
		var p = 1L;
		var x = a;
		while (b > 0)
		{
			if ((b & 1) == 1) p = (p * x) % mod;
			b >>= 1;
			x = (x * x) % mod;
		}
		return p;
	}
}


Measured memory_bytes: 29512
#include<iostream>
#include<vector>

using namespace std;

typedef long long int llint;

const llint MOD = 1000000007;

llint X, Y;

vector<llint> fac, finv, inv;
void COMinit(llint N) {
	fac = vector<llint>(N);
	finv = vector<llint>(N);
	inv = vector<llint>(N);
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < N; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
long long COM(llint n, llint k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main() {
	cin >> X >> Y;
	llint n, m;
	if ((X + Y) % 3 != 0) { cout << 0 << endl; return 0; }
	n = (-X + 2 * Y) / 3;
	m = (2 * X - Y) / 3;
	COMinit(n + m + 1);
	cout << COM(n + m, n) << endl;
}

Measured memory_bytes: 15872
//g++ -std=gnu++14 a.cpp

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

#define ll long long
#define rep(i, n) for(ll i = 0; i < (n); i++)
ll MOD = 1e9 + 7;
int INF = 1 << 30;
ll INFL = 1LL << 60;
ll MODP = 998244353;

ll kai(ll x,ll y){
  if(y == 0)return 1;
  if(y == 1)return x;
  if(y&1){
    return (x*kai(x,y-1))%MOD;
  }else{
    ll t = kai(x,y/2);
    return (t*t)%MOD;
  }
}

ll comb(ll a,ll b,vector<ll> &p){
  if(a == 0)return 1;
  if(b == 0)return 1;
  ll ans = p[a+b];
  ans = (ans*kai(p[a],MOD-2))%MOD;
  ans = (ans*kai(p[b],MOD-2))%MOD;
  return ans;
}

int main(){
  ll N;
  cin >> N;
  ll a = 1,b = 1,c = 1;
  rep(i,N){
    a *= 10;
    a %= MOD;
    b *= 9;
    b %= MOD;
    c *= 8;
    c %= MOD;
  }

  ll ans = (a-(2*b)+c)%MOD;
  if(ans < 0){
    cout << ans+MOD << endl;
  }else{
    cout << ans << endl;
  }





  return 0;
}


Measured memory_bytes: 3668
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repr(i, a, n) for (int i = n - 1; i >= a; i--)
using namespace std;
using ll = long long;
using P = pair<int, int>;

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

  int n, m, l = 0, r = 1e9;
  cin >> n >> m;
  rep(i, 0, m) {
    int a, b;
    cin >> a >> b;
    l = max(l, a);
    r = min(r, b);
  }

  cout << max(r - l + 1, 0) << endl;
}


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

namespace AtcoderSubmit
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Split(' ');
            var a = ulong.Parse(line[0]);
            var b = line[1].Split('.').ToArray();
            var b0 = ulong.Parse(b[0]);
            var b1 = ulong.Parse(b[1]);
            ulong ans0 = a * b0;
            var ans1_ = a * b1;
            ulong ans1;
            if(ans1_ < 100) {
                ans1 = 0;
            }
            else {
                var str = ans1_.ToString();
                ans1 = ulong.Parse(str.Substring(0, str.Length - 2));
            }
            var ans = ans0 + ans1;
            Console.WriteLine(ans);
        }
    }
}


Measured memory_bytes: 28060
#include <stdio.h>

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

  int ans = 0;
  if(n < 10){
    ans = n;
  } else {
    while(n!=0){
      ans += n % 10;
      n /= 10;
    }
  }

  if(ans == 1) ans = 10;
  
  printf("%d", ans);

  return 0;
}


Measured memory_bytes: 128
fun main(args:Array<String>?): Unit {
    val n = readLine()!!.trim().toInt()
    val books = Array(n){
        val (title, author, date) = readLine()!!.trim().split(' ')
        Book(title, author, date)
    }
    repeat(readLine()!!.trim().toInt()){
        if (it != 0) println()
        val (title, author, from, to) = readLine()!!.trim().split(' ')
        var find: List<Int> = books.indices.toList()
        if (title != "*") find = find.filter{ i -> title in books[i].title }
        if (author != "*") find = find.filter { i -> author in books[i].author }
        if (from != "*") {
            val f = Date.parse(from)
            find = find.filter{ i -> f <= books[i].date}
        }
        if (to != "*") {
            val t = Date.parse(to)
            find = find.filter{ i -> t >= books[i].date}
        }
        if (find.isNotEmpty())
            println(find.joinToString("\n"){i -> books[i].title})
    }
}
data class Book(val title: String, val author: String, val date: Date) {
    constructor(title: String, author: String, date: String):this(title, author, Date.parse(date))
}
data class Date(val year: Int, val month: Int, val day: Int): Comparable<Date> {
    override fun compareTo(other: Date): Int {
        return if (year == other.year) if (month == other.month) day.compareTo(other.day) else month.compareTo(other.month) else year.compareTo(other.year)
    }

    companion object {
        fun parse(str: String): Date {
            val (year, month, day) = str.trim().split('/').map(String::toInt)
            return Date(year, month, day)
        }
    }
}


Measured memory_bytes: 35384
import itertools

n, m = [int(_) for _ in input().split()]
s = []
for i in range(m):
    s.append([int(_) for _ in input().split()])
p = [int(_) for _ in input().split()]

seq = [0, 1]
cand = list((itertools.product(seq,repeat = n)))
ans = 0
for c in cand:
    are_all_ok = True
    for j in range(m):
        kj = s[j][0]
        on_switch = 0
        for l in range(kj):
            on_switch += c[s[j][l + 1] - 1]
        if on_switch % 2 != p[j]:
            are_all_ok = False
    if are_all_ok == True:
        ans += 1

print(ans)

Measured memory_bytes: 3188
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <random>
#include <cstdio>
#include <cstring>
#include <cmath>

// for i in f..<t { as swift
#define forin(i, f, t) for(auto i = f; i < t; i++)

using namespace std;
using ll = long long;
using XY = pair<int, int>;

int main() {
    int a, b, x;
    cin >> a >> b >> x;
    cout << ((x >= a && x <= a + b) ? "YES" : "NO");
}





Measured memory_bytes: 256
def solve(n, f_list, p_list):

    ans = [0] * 1024
    
    for i in range(1, 1024):
        for f, p in zip(f_list, p_list):
            c = bin(f & i).count("1")
            ans[i] += p[c]
    
    return max(ans[1:])

if __name__ == "__main__":
    n = int(input())
    f_list = [int("".join(input().split()),2) for i in range(n)]
    p_list = [[int(j) for j in input().split()] for i in range(n)]
    print(solve(n, f_list, p_list))

Measured memory_bytes: 3064
//#include <bits/stdc++.h>
//#include <ext/pb_ds/hash_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/rope>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <ctime>

#define X first
#define Y second
#define ls rt<<1
#define rs rt<<1|1
#define getmid ((l+r)>>1)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define lowbit(x) ((x)&-(x))
#define sz(a) ((int)a.size())
#define ALL(x) x.begin(),x.end()
#define mst(x,a) memset(x, a, sizeof(x))
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep1(i,n) for(int i=1; i<=(n); i++)
using namespace std;
#ifdef LOCAL
#define dbg(args...) cout << #args << " -> ", err(args);
void err(){ cout << endl; }
template<typename T, typename... Args>
void err(T a, Args... args){ cout << a << ' '; err(args...); }
#else
#define dbg(args...)
#endif // LOCAL

//using namespace __gnu_cxx;
//using namespace __gnu_pbds;
typedef double db;
typedef long long ll;
const int inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3fll;
typedef pair<int,int> pii;
typedef pair<db,db> pdd;

const int N = 2e5 + 10;
const int M = 5e5 + 10;
const int maxn = 50*50 + 10;
const int mod = (int)1e9+7;
const db eps = 1e-8;
const db pi = acos(-1.0);

int n;
int num[55][25];
int cnt[55][25];
ll a[N];

int main(){
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
#endif //LOCAL
//    ios::sync_with_stdio(false);
//    cin.tie(0);
//    cout.tie(0);

    scanf("%d", &n);
    for(int i=1; i<=n; i++){
        db t; scanf("%lf", &t);
        a[i] = t * 1e9 + 0.5;
    }
    ll ans = 0;
    for(int i=1; i<=n; i++){
        ll t = a[i];
        int c2 = 0, c5 = 0;
        while(t%2==0) t /= 2, c2++;
        while(t%5==0) t /= 5, c5++;
        num[c2][c5]++;
        if(c2>=9 && c5>=9) ans--;
    }
    for(int i=0; i<=50; i++){
        for(int j=0; j<=20; j++){
            cnt[i][j] = num[i][j];
            if(i) cnt[i][j] += cnt[i-1][j];
            if(j) cnt[i][j] += cnt[i][j-1];
            if(i && j) cnt[i][j] -= cnt[i-1][j-1];
        }
    }
    for(int i=0; i<=50; i++){
        for(int j=0; j<=20; j++){
            ll res = cnt[50][20];
            if(18-i>0) res -= cnt[18-i-1][20];
            if(18-j>0) res -= cnt[50][18-j-1];
            if(18-i>0 && 18-j>0) res += cnt[18-i-1][18-j-1];
            ans += num[i][j] * res;
        }
    }
    assert(ans%2==0);
    printf("%lld\n", ans>>1);

    return 0;
}

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

int main() {
	char a,b;
	cin >> a >> b;
	if (a=='H'){
		cout << b;
	}else{
		if (b=='H'){
			cout << 'D';
		}else{
			cout << 'H';
		}
	}
	return 0;
}

Measured memory_bytes: 256
A, B, C = map(int,input().split())

K = int(input())

flag = False

for i in range(0, K+1):
    for j in range(0, K+1):
        for k in range(0, K+1):
            x = A * 2**i
            y = B * 2**j
            z = C * 2**k
            # print(x, y, z)

            if x < y < z and i + j + k <= K:
                flag = True


if flag == True:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 9008
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <cmath>
#include <numeric>
#include <functional>
#include <stack>
#include <iomanip>
#include <map>
#include <cstdio>

int main() {
	long long n;

	std::cin >> n;

	std::vector<long long> v(n, 0);

	for (long long i = 0; i < n - 1; i++)
	{
		long long a;
		std::cin >> a;

		v[a - 1]++;
	}

	for (long long i = 0; i < n; i++)
	{
		std::cout << v[i] << std::endl;
	}

	return 0;
}

Measured memory_bytes: 4816
"""
https://atcoder.jp/contests/tokiomarine2020/submissions/14229099
"""
N,K = map(int,input().split())
A = list(map(int,input().split()))

def update(A):
    b = [0]*N

    for i,a in enumerate(A):
        l = max(0,i-a)
        r = min(N-1,i+a)

        b[l] += 1
        if r+1 < N:
            b[r+1] -= 1
    
    res = []
    s = 0
    for i in b:
        s += i
        res.append(s)
    return res

for _ in range(min(K,75)):
    A = update(A)

print(*A)

Measured memory_bytes: 235604
//(・ω・)
#include <stdio.h>
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, atoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <iomanip> //setprecision
#include <limits>
#include <sstream> //istringstream
#include <stdlib.h>
#include <list>
#include <iterator>//std::advance()
using namespace std;
int main(){
    int w, h, x, y, r;
    cin >> w >> h >> x >> y >> r;
    bool ans=1;//答え
    if(x-r<0) ans=0;
    else if(x+r>w) ans=0;
    else if(y+r>h) ans=0;
    else if(y-r<0) ans=0;

    if(ans) cout << "Yes" << endl;
    else cout << "No" << endl;
}



Measured memory_bytes: 3120
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define INF (1LL<<50)
#define MOD 1000000007

using Edge = pair<int,int>; // (隣接頂点, 辺番号)
using Graph = vector<vector<Edge>>;

int main(){
    int N;
    cin >> N;
    Graph G(N,vector<Edge>());
    rep(i,N-1){
        int a,b;
        cin >> a >> b;
        a--;b--;
        G[a].push_back(make_pair(b,i));
        G[b].push_back(make_pair(a,i));
    }
    int cnt=0;
    rep(i,N) cnt = max(cnt,(int)G[i].size());
    cout << cnt << endl;
    deque<pair<int,int>> dq;
    dq.push_back(make_pair(0,-1));
    vector<int> dist(N);
    vector<int> seen(N);
    dist[0] = 1;
    while(!dq.empty()){
        auto p = dq.front(); dq.pop_front();
        int node = p.first;
        int c = p.second;
        int num = 1;
        for(int i=0;i<G[node].size();i++){
            int n_node = G[node][i].first;
            int n_edge = G[node][i].second;
            if(dist[n_node]>0){
                continue;
            }
            dist[n_node]=1;
            if(num==c){
                num++;
            }
            dq.push_back(make_pair(n_node,num));
            seen[n_edge] = num;
            num++;
        }
    }
    rep(i,N-1) cout << seen[i] << endl;
    return 0;
}

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

#include <math.h>
#include <stdlib.h>


#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

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; }

// const int INF = 1001001001;
// long long max => LLONG_MAX
const ll mod = 1000000007;

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    int n; string s1, s2;
    cin >> n >> s1 >> s2;
    
    vector<bool> array;
    for(int i = 0; i < s1.length(); i++){
        if(s1[i] == s2[i]) array.push_back(1);
        else {
            array.push_back(0);
            i++;
        }
    }

    ll ans;
    if(array[0]) ans = 3;
    else ans = 6;

    for(int i = 1; i < array.size(); i++){
        if(array[i-1]){
            ans *= 2;
        } else {
            if(!array[i]) ans *= 3;
        }
        ans %= mod;
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <string>
#include <cmath>
#include <stdio.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main() {
	int a,b,h,m;
	double t=0,c=0,ans=0,pi=3.141592653589793;

	cin>>a>>b>>h>>m;
	t=(h*60+m)*0.5;

	c=m*6;
	t= (t-c)*pi/180;
	
	
	ans=double((a*a)+(b*b)-(2*a*b*cos(t)));
	
	printf("%.20f",sqrt(ans));
	//cout<<sqrt(ans)<<endl;
	
	// your code goes here
	return 0;
}

Measured memory_bytes: 4200
//============================================================================
// Name        : AOJ.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int main() {
	int a,b;
	cin>>a>>b;

	if (a<b) cout<<"a < b"<<endl;
	else if (a>b) cout<<"a > b"<<endl;
	else cout << "a == b" << endl;
	return 0;
}

Measured memory_bytes: 3108
n = int(input())
X = list(map(int, input().split()))

import copy
Y = copy.copy(X)

L = []
U = []
X.sort()
for i in range(n):
    if i < n//2:
        L.append(X[i])
    else:
        U.append(X[i])
#print(L)
#print(U)

L_ = set(L)
U_ = set(U)

ans = [0]*n
for i, y in enumerate(Y):
    if y in L_:
        ans[i] = U[0]
    else:
        ans[i] = L[-1]
print(*ans, sep='\n')


Measured memory_bytes: 141096
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(),(x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using P = pair<int, int>;
#define debug(var) cerr << "[" << #var << "] " << var << endl
#define chmin(x, y) x = min(x, y)
const ll mod = 1000000007;
const int dx[] = {-1,0,1,0};
const int dy[] = {0,-1,0,1};



int main(){
    int a, b, k;
    cin >> a >> b >> k;
    vector<int> v;
    for (int i=200; i>=1; i--) {
        if (a%i==0 && b%i==0) {
            v.push_back(i);
        }
    }
    int ans = v[k-1];
    
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
#define endl '\n'
#define next next_
#define fst first
#define sed second
#define pb push_back
#define mp make_pair
#define rint register int
#define newline putchar('\n')
#define leave_space puthchar(' ')
#define all(x) (x).begin(), (x).end()
#define reveal(x) cerr << #x << " = " << (x) << endl
#define rep(it, f, e) for (rint it = f; it <= e; ++it)
#define per(it, f, e) for (rint it = f; it >= e; --it)
const int MAXN = 5e5 + 20;
char s[MAXN], t[MAXN];
int n, fail1[MAXN], fail2[MAXN];
/*inline void getfail(int fail[], char S[]) {
	int j = fail[0] = -1;
	rep (i, 1, n - 1) {
		while(j >= 0 && S[i] != S[j]) j = fail[j];
		fail[i + 1] = ++j;
	}
}*/
inline void getfail(int *fail, char *s) {
    fail[0] = -1;
    int j = 0;
    for (int i = 1; i < n; ++i) { 
        while (j && s[i] != s[j]) j = fail[j];
        if (s[i] == s[j]) fail[i + 1] = ++j;
        else fail[i + 1] = 0;
    }
}
inline bool check_cyc1(int x) {
	return fail1[x] == 0 || x % (x - fail1[x]);
}
inline bool check_cyc2(int x) {
	if (x == 0) return false;
	return fail2[x] == 0 || x % (x - fail2[x]);
}
int main() {
	scanf("%s", s);
	n = strlen(s);
	//memcpy(t, s, sizeof(t));
	for (int i = 0; i < n; ++i) t[i] = s[n - i - 1];
	getfail(fail1, s);
	getfail(fail2, t);
	int res = check_cyc1(n) ? 1 : 2;
	bool flag = true;
	rep (i, 1, n - 1) {
		if (s[i] != s[i - 1]) {
			flag = false;
			break;
		}
	}
	if (flag) {
		cout << n << endl;
		cout << 1 << endl;
	} else if (res == 1) {
		cout << 1 << endl;
		cout << 1 << endl;
	} else {
		int ans = 0;
		rep (i, 0, n - 1) {
			ans += (check_cyc1(i + 1) && check_cyc2(n - i - 1));
		}
		cout << 2 << endl;
		cout << ans << endl;
	}
	return 0;
}

Measured memory_bytes: 5120
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <math.h>
#include <bitset>

using namespace std;

void solve() {
    int k, x;
    cin >> k >> x;
    if(500*k >= x) cout << "Yes";
    else cout << "No";
}

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

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;

int main() {
string S;
cin >> S;
string N = S;
reverse(S.begin(),S.end());
int kazu = 0;
for (int i = 0;i < S.size();i++) {
    if (S.at(i) != N.at(i)) {
        kazu++;
    }
}
cout << kazu/2 << endl;

return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#define SIZE 110
#define INF 1000000009

int dp[SIZE][SIZE];
int in[SIZE];

int min(int a, int b){
    return (a<b ? a : b);
}

int main(){
    int n,i,j,k;
    scanf("%d",&n);
    for(i=1; i<=n; i++){
        scanf("%d %d",&in[i-1],&in[i]);
    }

    for(i=1; i<=n; i++) dp[i][i] = 0;

    for(k=2; k<=n; k++){
        for(i=1; i<=n-k+1; i++){
            int v;
            v = i+k-1;
            dp[i][v] = INF;
            for(j=i; j<=v-1; j++){
                dp[i][v] = min(dp[i][v],dp[i][j]+dp[j+1][v]+in[i-1]*in[j]*in[v]);
            }
        }
    }

    printf("%d\n",dp[1][n]);

    return 0;
}


Measured memory_bytes: 2756
N = int(input())
H = [int(i) for i in input().split()]
for i in reversed(range(1, N)):
  if(H[i] - H[i-1] < -1):
    print('No')
    exit()
  elif(H[i] - H[i-1] == -1):
    H[i-1] -= 1
print('Yes')

Measured memory_bytes: 14396
using System;

class IDONTKNOWCSHARP
{
    public static void Main()
    {
        int[] values=Convert(GetLines());

        int S=values[0];
        int W=values[1];

        if (W >= S)
        Console.WriteLine("unsafe");
        else
        Console.WriteLine("safe");

    }


    static int[] Convert(string[] v)
    {
        var temp = new int[v.Length];

        for (int i = 0; i < temp.Length; i++)
        {
            temp[i] = int.Parse(v[i]);
        }

        return temp;
    }




    static string[] GetLines()
    {
        return Console.ReadLine().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
    }


}

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

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, a, b) for (ll i = (a); i < (b); i++)
#define chmax(x, v)                                                            \
  do {                                                                         \
    x = max(x, v);                                                             \
  } while (0)
#define chmin(x, v)                                                            \
  do {                                                                         \
    x = min(x, v);                                                             \
  } while (0)
typedef uint64_t ull;
typedef int64_t ll;
typedef std::pair<ll, ll> PLL;

using namespace std;

signed main() {
  string s;
  cin>>s;
  rep(i,s.size()){
    cout<<"x";
  }
  cout<<endl;
  return 0;
}


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

using namespace std;
int n;
vector<int> ed[500000];
int x, y;
int f[300000];
void dfs(int x, int y) {
    for (int i = 0; i < ed[x].size(); i++) {
        int to = ed[x][i];
        if (to == y) continue;
        dfs(to, x);
        f[x] ^= f[to] + 1;
    }
}
int main() {
    ios_base::sync_with_stdio(0);
    cin >> n;
    for (int i = 1; i < n; i++) {
        cin >> x >> y;
        ed[x].push_back(y);
        ed[y].push_back(x);
    }
    dfs(1, 0);
    if (f[1] > 0) cout << "Alice\n";
    else cout << "Bob\n";
    return 0;
}


Measured memory_bytes: 23296
#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int a,b,c;
	int ans = 3;
	cin >> a >> b >> c;
	if(a == b){
		ans--;
	}
	if(a == c){
		ans--;
	}
	if(c == b){
		ans--;
	}
	if(ans == 0){
		ans++;
	}
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(unused_macros)]
#![allow(unused_imports)]

use std::cmp::*;
use std::collections::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    }
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

macro_rules! chmax {
    ($x:expr, $e:expr) => {
        if $x < $e {
            $x = $e;
        }
    };
}
macro_rules! chmin {
    ($x:expr, $e:expr) => {
        if $x > $e {
            $x = $e;
        }
    };
}

const INF: i64 = 1 << 60;

fn main() {
    input!{
        N: usize,
        Q: usize,
        a: [usize; N],
        x: [usize; Q],
    }
    for i in 0..Q {
        let mut right = 0;
        let mut sum = 0;
        let mut ans = 0;
        let x = x[i];
        for left in 0..N {
            while right < N && sum + a[right] <= x {
                sum += a[right];
                right += 1;
            }
            ans += right - left;

            if right == left {
                right += 1;
            } else {
                sum -= a[left];
            }
        }
        println!("{}", ans);
    }
}



Measured memory_bytes: 7080
import sys
def fastio():
    from io import StringIO
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep = ' ', end = '\n'):
    print(*var, file=sys.stderr, end = end, sep = sep)

INF = 10**20
MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))
# from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br

s = [0] + [int(i) for i in input()]
ans = 0
n = len(s)
for i in range(n - 1, 0, -1):
    x = s[i]
    if x > 5:
        ans += (10 - x)
        idx = i - 1
        s[idx] += 1
        while idx > 0 and s[idx] == 10:
            s[idx] = 0
            s[idx - 1] += 1
            idx -= 1
    elif x == 5 and s[i - 1] >= 5:
        ans += 5
        idx = i - 1
        s[idx] += 1
        while idx > 0 and s[idx] == 10:
            s[idx] = 0
            s[idx - 1] += 1
            idx -= 1
    else:
        ans += x
ans += s[0]
print(ans)


Measured memory_bytes: 22956
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main()
{
  double sum=0;
  int N;
  cin >> N;
  vector<int> A(N);
  REP(i,N) cin >> A[i];
  REP(i,N) sum += 1.0/A[i];
  cout << 1.0/sum << endl;
}

Measured memory_bytes: 384
import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;


void main()
{
  auto nk = readln.chomp.split.map!(to!int);

  auto num = 1;
  foreach (i; 0..nk[0]) {
    if (i==0) num *= nk[1];
    else num *= nk[1]-1;
  }
  num.writeln;
}


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

int main(){
    int a, b, c, d;
    cin >> a >> b >> c >> d;

    if(abs(a-c) <= d || (abs(a-b) <= d && abs(b-c) <= d)) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main()
{
	int n;scanf("%d",&n);
	int startH;scanf("%d",&startH);
	startH--;
	for(int i=2;i<=n;i++)
	{
		int now;scanf("%d",&now);
		if(now<startH)
		{
			printf("No");
			return 0;
		}
		else if(now==startH)
		{
			continue;
		}else if(now>startH)
		{
			now--;
			startH=now;
		}
	}
	printf("Yes");
	return 0;
}

Measured memory_bytes: 256
// 2012/11/19 Tazoe

#include <iostream>
#include <algorithm>
using namespace std;

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

	int K;
	cin >> K;

	for(int i=0; i<K; i++){
		int a, b;
		cin >> a >> b;

		int d = min(min(a-1, N-a), min(b-1, N-b));

		int c = d%3+1;

		cout << c << '\n';
	}

	return 0;
}

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

int main() 
{
    int n, k;
    cin >> n >> k;
    map<int,int> mp;
    for (int i=0; i<n; i++)
    {
        int a; cin >> a;
        mp[a]++;
    }
    if (k>=mp.size()) 
        return cout << 0, 0;
    vector<int> v;
    for (auto x:mp)
        v.push_back(x.second);
    sort(v.begin(), v.end());
    int res = mp.size()-k;
    int sum = 0;
    for (int i=0; i<v.size(); i++)
    {
        // cout << v[i] << endl;
        res--;
        sum += v[i];
        if (res == 0) break;
    }
    cout << sum;
    return 0;
}

Measured memory_bytes: 10748