akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Practice
{
    class Program
    {
        static void Main(string[] args)
        {
            Solve();
        }
        private const int MOD = 1000000007;
        static void Solve()
        {
            int d = ReadAndParseInt();
            var dic = new Dictionary<int, string>()
             {
                 { 25,"Christmas" },
                 { 24,"Christmas Eve" },
                 { 23,"Christmas Eve Eve" },
                 { 22,"Christmas Eve Eve Eve" },
             };
            string ans = dic[d];
            Console.WriteLine(ans);
        }

        #region よく使う便利関数
        private static bool isPrime(long x)
        {
            if (x == 2) { return true; }
            if (x < 2 || x % 2 == 0) { return false; }
            long i = 3;
            while (i * i <= x)
            {
                if (x % i == 0) { return false; }
                i = i + 2;
            }
            return true;
        }
        private static long lcm(long x, long y)
        {
            return x / gcd(x, y) * y;
        }
        private static long gcd(long x, long y)
        {
            return y > 0 ? gcd(y, x % y) : x;
        }
        private static long pow(long x, long n)
        {
            if (n == 0) { return 1; }
            long res = pow(x * x % MOD, n / 2);
            if (n % 2 == 1)
            {
                res = res * x % MOD;
            }
            return res;
        }
        private static int ReadAndParseInt()
        {
            return int.Parse(Console.ReadLine());
        }
        private static int[] ReadAndParseIntArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
        }
        private static long ReadAndParseLong()
        {
            return long.Parse(Console.ReadLine());
        }
        private static long[] ReadAndParseLongArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse);
        }
        #endregion
    }
}

Measured memory_bytes: 11220
#include <iostream>

using namespace std;

int main()
{
	int n, d, x;
	cin >> n >> d >> x;
	d--;
	int a;
	int ans = 0;
	for (int i = 0; i < n; i++) {
		cin >> a;
		ans += d / a + 1;
	}
	cout << ans + x << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const long long INF = 1LL << 60;
const int MOD = 1000000007;
using pint = pair<ll, ll>;

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N);
    vector<ll> out;
    for (int i = 0; i < N; ++i) cin >> A[i];
    sort(A.begin(), A.end());
    ll cnt = 1;
    for (int i = 0; i < N-1; i++) {
      if (A[i] == A[i + 1]) {
        cnt++;
      }
      else{
          if(cnt/2==1){
            out.push_back(A[i]);
          }
          else if(cnt/2>=2){
            out.push_back(A[i]);
            out.push_back(A[i]);
          }
          cnt = 1;
      }
    }
    if (cnt / 2 == 1) {
      out.push_back(A[A.size()-1]);
    } else if (cnt / 2 >= 2) {
      out.push_back(A[A.size()-1]);
      out.push_back(A[A.size()-1]);
    }
    if (out.size() < 2)
      cout << 0 << endl;
    else
      cout << out[out.size() - 1] * out[out.size() - 2] << endl;
    return 0;
}

Measured memory_bytes: 4600
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#include<fstream>
#include<cstdio>
#include<deque>
#include<iomanip>
#include <numeric>
//#include<bits/stdc++.h>

using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;++i)
#define REP(i,s,n) for(int i=(s);i<(n);++i)
#define repr(i,n) for(int i=n-1;i>=0;--i)
#define REPR(i,s,n) for(int i=(s);i>=(n);--(i))
#define all(a) (a).begin(),(a).end()
#define reall(a) (a).rbegin(),(a).rend()
#define pb push_back
#define pf push_front
#define MIN(a,b) a=min((a),(b))
#define MAX(a,b) a=max((a),(b))
#define SIZE(v) (int)v.size()
const double pi = acos(-1.0);

typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
const ll mod = 1e9 + 7;
ll dx[4] = { 1,0,-1,0 };
ll dy[4] = { 0,1,0,-1 };

ll gcd(ll x, ll y)
{
	ll r;

	if (x == 0 || y == 0)  // 引数チェック
	{
		fprintf(stderr, "引数エラーです。\n");
		return 0;
	}

	// ユーグリッドの互除法
	while ((r = x % y) != 0)  // yで割り切れるまでループ
	{
		x = y;
		y = r;
	}
	return y;
}

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

	ll n, p, ans = 0;
	cin >> n >> p;
	vll v(n);
	ll num0 = 0, num1 = 0;
	rep(i, n) {
		cin >> v[i];
		if (v[i] % 2 == 0)num0++;
		else num1++;
	}
	if (num1 == 0)ans = (1LL << n);
	else ans = (1LL << (n-1));
	if (p == 1) ans = (1LL << n) - ans;
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
#coding=utf-8

def solve(abs, cds):
    abs = sorted(abs, key = lambda x: -1 * x[1]) #sorted by y
    cds = sorted(cds, key = lambda x: x[0]) #sorted by x 

    count = 0
    for r in cds:
        _abs = list(filter(lambda x: r[0] > x[0] and r[1] > x[1], abs))
        if len(_abs) == 0:
            continue
        del abs[abs.index(_abs[0])]
        count += 1
    return count

if __name__ == '__main__':
    N = int(input())
    abs = []
    cds = []
    for _ in range(N):
        abs = abs + [list(map(lambda x: int(x), input().split()))] 
    for _ in range(N):
        cds = cds + [list(map(lambda x: int(x), input().split()))] 

    print(solve(abs, cds))


Measured memory_bytes: 3064
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <utility>
#include <map>
#include <list>
#include <climits>
#include <set>
#include <deque>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <iomanip>
#include <bitset>

// #define cerr if(false)cerr
#define watch(x) cerr << "> " << #x << ": " << x << "\n";

using namespace std;

template <typename T>
std::ostream &operator <<(std::ostream &out, vector<T> &v) {
	for (typename vector<T>::size_type i = 0; i < v.size(); ++i)
		out << v[i] << " ";
	out << "\n";
    return out;
}
template <typename T, typename N>
std::ostream &operator <<(std::ostream &out, vector<pair<T, N> > &v) {
	for (size_t i = 0; i < v.size(); ++i)
		out << "(" << v[i].first << ", " << v[i].second << ") ";
	out << "\n";
    return out;
}
template <typename T>
std::ostream &operator <<(std::ostream &out, vector<vector<T> > &v) {
	for (size_t i = 0; i < v.size(); ++i) {
		for (size_t j = 0; j < v[i].size(); ++j) {
			out << v[i][j] << " ";
		}
		out << "\n";
	}
   	return out;
}

int main() {

	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);

	int n;
	cin >> n;

	vector<int> top_sum(n + 1), bottom_sum(n + 1);
	int c;
	for (int i = 1; i <= n; ++i) {
		cin >> c;
		top_sum[i] = top_sum[i - 1] + c;
	}

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

	int most_candies = 0;
	int down = 1;
	for (int i = 1; i <= n; ++i) {
		int curr = top_sum[down] + bottom_sum[n] - bottom_sum[down - 1];
		most_candies = max(most_candies, curr);
		++down;
	}

	cout << most_candies << "\n";

	return 0;

}

Measured memory_bytes: 256
// I - Coins
// O(n^2)
 
#include <bits/stdc++.h>
 
using namespace std;
 
#define fi first
#define se second
#define pb push_back
 
typedef long long ll;
typedef pair<int, int> pii;
 
const ll inf = 1e15L;
const int maxn = 3010;
double p[maxn];
double dp[maxn][maxn];
 
int main(){
    // freopen("input.txt", "r", stdin);
    // ios_base::sync_with_stdio(0);
    // cin.tie(0); 
    int n;
    scanf("%d", &n);
    memset(p, 0, sizeof(p));
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1.;
    for (int i = 1; i <= n; ++i)
    {
         scanf("%lf", &p[i]);
         dp[i][0] = dp[i-1][0] * (1-p[i]);
         //dp[i][i] = dp[i-1][i-1] * p[i];  it doesn't matter whether setting these values
    }
    
    //dp[i][j] - i is the number of current coins, j is the number fo heads
    for(int i = 1; i <= n; ++i){
        for(int j = 1; j <= i; ++j){
            dp[i][j] = p[i] * dp[i-1][j-1] + (1 - p[i]) * dp[i-1][j];
        }
    }
    double res = 0.;
    for (int head = 1; head <= n; ++head)
    {
        int tail = n - head;
        if(head > tail)res = res + dp[n][head];
    }
    printf("%.10lf\n", res);
    return 0;
}

Measured memory_bytes: 71040
#include<iostream>
#include<cmath>

using namespace std;

int main(void) {
	int a, b;
	int tall[1000] = {};

	cin >> a >> b;

	for (int i = 1; i <= 999; i++) {
		tall[i] = tall[i - 1] + i;
		if (tall[i] - tall[i - 1] == b - a) {
			cout << tall[i] - b << endl;
			break;
		}
	}

	return 0;
}

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

int main() {
  string S;
  cin >> S;
  int price = 700;
  
  for (int i = 0; i < 3; i++) {
  	if (S.at(i) == 'o') {
    	price += 100;
    }
  }
  cout << price << endl;
}



Measured memory_bytes: 256
import itertools
import sys
input = sys.stdin.readline


def main():
    n, m, x = map(int, input().split())

    MONEY = []
    UNDERSTAND = []
    for i in range(n):
        lst = [int(i) for i in input().split()]
        MONEY.append(lst[0])
        UNDERSTAND.append(lst[1:])

    ans = -1
    for i in range(1 << n):
        understand = [0] * m
        money = 0
        b = [int(i) for i in bin(i)[2:]]
        for select_u, select_m in itertools.compress(zip(UNDERSTAND, MONEY), b[::-1]):
            money += select_m
            for k in range(m):
                understand[k] += select_u[k]
        if all([i >= x for i in understand]):
            if ans == -1:
                ans = money
            else:
                ans = min(ans, money)
    print(ans)


if __name__ == '__main__':
    main()

Measured memory_bytes: 9108
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=((int)(n)-1);i>=0;(i)--)
#define rrep1(i,n) for(int i=((int)(n));i>0;(i)--)
#define sz(c) ((int)(c).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define fi first
#define se second

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> P;
typedef pair<int, pair<int, int> > PP;
//const int MAX=;

int N;
void input(){
	cin>>N;
}

int col[515][515];
void DFS(int l, int r, int c){
	int m=(l+r)/2;
	for(int i=l; i<=m; i++)for(int j=m+1; j<=r; j++){
		col[i][j]=c;
	}
  	if(l!=m){
		DFS(l,m,c-1);
		DFS(m+1,r,c-1);
    }
}

void solve(){
	int n=1;
	int p=0;
	while(true){
		p++;
		n*=2;
		if(n>=N)break;
	}
	DFS(1,n,p);

	for(int i=1; i<=N-1; i++){
		for(int j=i+1; j<=N; j++){
			cout<<col[i][j]<<" ";
		}
		cout<<endl;
	}
}

void output(){
  
}

int main(){
  input();
  solve();
  output();
}

Measured memory_bytes: 1536
#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B;
  cin>>A>>B;
  if(A==1 && B==1)
    cout<<"Draw";
  else if(A==1)
    cout<<"Alice";
  else if(B==1)
    cout<<"Bob";
  else if(A>B)
    cout<<"Alice";
  else if(A<B)
    cout<<"Bob";
  else
    cout<<"Draw";
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define sf scanf
#define pf printf
#define pb push_back
#define llu unsigned long long
#define U unsigned int
#define SIZE 100005
#define pie 3.14159265358979323
#define minuss 1e-6
#define pair pair<ll,ll>
#define fast_cin ios_base::sync_with_stdio(false);cin.tie(NULL)
#define BIG 1000000000
#define INF 1000000000000005
#define N 10000
/*
std::cout << std::fixed;
std::cout << std::setprecision(1);
std::cout << VALUE NAME<<endl;
*/
ll tra[100006],tra1[100006];


int main()
{
    fast_cin;
    ll t;

        map<ll,ll>mp;
        map<ll,ll>::iterator it;
        ll n,m;
        cin>>n>>m;
        cout<<n*m<<endl;

}



Measured memory_bytes: 3656
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
using System.Text;
using System.IO;
using static System.Math;
using System.Numerics;
using System.Runtime.InteropServices.ComTypes;
using System.Xml.Schema;
using System.ComponentModel.DataAnnotations;
using System.Security.Cryptography;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Linq.Expressions;
using System.Xml.XPath;

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
            Solve();
            //Out.Flush();
            Read();
        }

        static void Solve()
        {
            var N = Sarray()[0];
            var di = Sarray().OrderBy(d => d).ToArray();
            WriteLine(di[N / 2] - di[N / 2 - 1]);
        }

        static long Gcd(long x, long y) => y == 0 ? x : Gcd(y, x % y);
        static long Lcm(long x, long y) => x / Gcd(x, y) * y;

        static long Mod = (long)1e9 + 7;
        static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); }
        static public List<long> Slist() { return ReadLine().Split().Select(long.Parse).ToList(); }
        static public (T1 a, T2 b) Slice<T1, T2>()
        {
            var t = ReadLine().Split();
            return (
            (T1)Convert.ChangeType(t[0], typeof(T1)),
            (T2)Convert.ChangeType(t[1], typeof(T2)));
        }
        static public (T a, T b) Slice2<T>()
        {
            var t = ReadLine().Split();
            return (
            (T)Convert.ChangeType(t[0], typeof(T)),
            (T)Convert.ChangeType(t[1], typeof(T)));
        }
        static public (T a, T b, T c) Slice3<T>()
        {
            var t = ReadLine().Split();
            return (
            (T)Convert.ChangeType(t[0], typeof(T)),
            (T)Convert.ChangeType(t[1], typeof(T)),
            (T)Convert.ChangeType(t[2], typeof(T)));
        }
        static public (T a, T b, T c, T d) Slice4<T>()
        {
            var t = ReadLine().Split();
            return (
            (T)Convert.ChangeType(t[0], typeof(T)),
            (T)Convert.ChangeType(t[1], typeof(T)),
            (T)Convert.ChangeType(t[2], typeof(T)),
            (T)Convert.ChangeType(t[3], typeof(T)));
        }
    }
}

Measured memory_bytes: 37944
#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cassert>
#include <utility>
#include <iomanip>

using namespace std;

#define sz(x) (int) x.size()
#define unique(x) x.erase(unique(x.begin(), x.end()), x.end())
#define all(a) a.begin(), a.end()
#define sqr(x) ((x) * (x)) 
#define y1 aksjdaskdjksjfksdjf
#define left kdnvldvoiwejifejg
#define right lkdsjflksdjfdjfk
#define prev asdasfsadjkjsdfjs

const int MAXN = 105000;

int n, total;
int a[MAXN];
bool dp[MAXN];

int main() {

  scanf("%d %d", &n, &total); 
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }

  dp[0] = false;
  for (int i = 1; i <= total; i++) {
    for (int j = 0; j < n; j++) {
      if (a[j] > i) {
        continue;
      }
      if (dp[i - a[j]] == false) {
        dp[i] = true;
      }
    }
  }

  if (dp[total]) {
    puts("First");
  } else {
    puts("Second");
  }

  return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
#include<math.h>
#include <stdio.h>
#include<vector>
#include<deque>
#include<stdlib.h>
//#include <algorithm>
#include<set>
#include <limits>
#include<iomanip>
#include<string>
#define rep(i,n) for(int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
#define llMAX numeric_limits<long long>::max()
#define intMAX numeric_limits<int>::max()
#define ll long long
#define d_5 100000
#define d9_7 1000000007
int main(void){
  int n;
  cin >> n;
  set<ll> a;
  vector<ll> A;
  vector<ll> B(n,0);
  int tmp;
  rep(i,n){
    cin>>tmp;
    tmp--;
    A.push_back(tmp);
    B[tmp]=i;
  }
  a.insert(-1);
  a.insert(n);
  ll ans=0;
  rep(i,n){
    ll pos=B[i];//posは、i番目に小さい数の位置
    auto right=a.lower_bound(pos);
    auto left=right;
    left--;
    ll l=*left;
    ll r =*right;
    ans+=(i+1)*(pos-l)*(r-pos);
    a.insert(pos);
  }
  cout<<ans;
	return 0;
}

Measured memory_bytes: 12784
import java.util.*;

public class Main {

    static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
    static int mod = 1000000007;

    public static void main(String[] args)  {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int K = sc.nextInt();

        if(A >= K){
            System.out.println(K);
        } else if(A + B >= K){
            System.out.println(A);
        } else {
            System.out.println(A - (K - A - B));
        }
    }

}









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

const int N = (int) 1e5 + 5;
int a[N];
int dp[N];

int main()
{
    ios :: sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    for(int i = 0;i < n;++i)
        cin >> a[i];
    dp[1] = abs(a[1] - a[0]);
    for(int i = 2;i < n;++i)
    {
        dp[i] = min(dp[i-1]+abs(a[i]-a[i-1]),dp[i-2] + abs(a[i] - a[i-2]));
    }
    cout << dp[n-1];
    return 0;
}


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

using namespace std;
typedef long long LL;
template <typename F, typename S> std::ostream& operator<<(ostream& os, const pair<F,S>& p) {
    os << "(" << p.first << "," << p.second << ")"; return os; }
template <typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
    os << "["; for(const T& a: v){ os << a << ", "; } os << "]"; return os; }
template <typename K, typename V> ostream& operator<<(ostream& os, const map<K,V>& m) {
    os << "{"; for(const auto& p: m){ os << p.first <<":"<< p.second << ", "; } os << "]"; return os; }


LL leftPart(LL b, LL e, vector<LL>& left1, vector<LL>& left2){
    LL score = (left2[e] - left2[b]) * 2;
    score -= (left1[e] - left1[b]) * (b * 2 + 1);
    return score;
}


LL rightPart(LL b, LL e, vector<LL>& right1, vector<LL>& right2){
    LL score = (right2[e] - right2[b]) * 2;
    score -= (right1[e] - right1[b]) * (b * 2 + 2);
    return score;
}


LL kougo(LL total, LL n, LL b, LL e, vector<LL>& left1, vector<LL>& left2, vector<LL>& right1, vector<LL>& right2){
    if(e - b < 1) return 0;
    LL last = (e + b) / 2;
    LL score = total * (e - b - 1);
    score -= leftPart(b, last, left1, left2);
    score -= rightPart(n+1 - e, n+1 - last, right1, right2);
    return score;
}


LL solve(LL l, LL n, vector<LL>& x){
    vector<LL> left1(x.size());
    vector<LL> left2(x.size());
    vector<LL> right1(x.size());
    vector<LL> right2(x.size());
    for(LL i = 1; i < n+2; ++i){
        left1[i] = left1[i-1] + (x[i] - x[i-1]);
        left2[i] = left2[i-1] + (x[i] - x[i-1]) * i;
        right1[i] = right1[i-1] + (x[n+1-(i-1)] - x[n+1-i]);
        right2[i] = right2[i-1] + (x[n+1-(i-1)] - x[n+1-i]) * i;
    }

    LL ans = 0;
    for(LL i = 0; i < n+1; ++i){
        LL cand = x[i] + kougo(l, n, i, n+1, left1, left2, right1, right2);
        ans = max<LL>(ans, cand);
    }
    return ans;
}


int main(){
    LL l, n;
    cin >> l >> n;
    vector<LL> x(n+2);
    vector<LL> x2(n+2);
    for(LL i = 0; i < n; ++i){
        cin >> x[i+1];
    }

    x[n+1] = l;
    for(LL i = 0; i < n+2; ++i){
        x2[i] = l - x[n+1-i];
    }

    cout << max<LL>(solve(l, n, x), solve(l, n, x2)) << endl;
    return 0;
}



Measured memory_bytes: 9616
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;


int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int k;
    cin >> k;
    int a = k / 2, b = k / 2 + k % 2;
    cout << a * b;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{
    int a,b,r,m,s,sum=0,x,y;
    float sq;
    char s1[101],s2[101];
    scanf("%s %s", s1,s2);
    strcat(s1,s2);

    a = atoi(s1);

    sq = sqrt(a);
    x = floor(sq);
    y = ceil(sq);
    if(x==y)
    {
        printf("Yes\n");
    }
    else
    {
        printf("No\n");
    }




    return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#include<math.h>
#include<queue>
#include<stack>
#include<iomanip>
#include<cstring>
#include<string>
#include<set>

#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()

using namespace std;
using ll = long long int;

const ll INF = 1LL<<60;
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; }

int main(void) {
    ll a;
    long double b;
    cin >> a >> b;
    cout << (a * lround(b * 100)) / 100 << endl;
}

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

namespace AtCorder
{
	public class Program
	{
		static void Main(string[] args)
		{
			Scanner cin = new Scanner();
			int n = cin.Int();
			int m = cin.Int();
			var ipy = new List<Tuple<int, int, int>>(m);
			for (int i = 0; i < m; i++) {
				ipy.Add(new Tuple<int, int, int>(i, cin.Int(), cin.Int()));
			}

			ipy.Sort((x, y) => x.Item3 - y.Item3);

			int[] cnt = new int[n + 1];
			var numbers = new List<Tuple<int, string>>(m);
			for (int i = 0; i < m; i++) {
				cnt[ipy[i].Item2] += 1;
				string number = $"{ipy[i].Item2.ToString("d6")}{cnt[ipy[i].Item2].ToString("d6")}";
				numbers.Add(new Tuple<int, string>(ipy[i].Item1, number));
			}

			numbers.Sort((x, y) => x.Item1 - y.Item1);
			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < m; i++) {
				sb.AppendLine(numbers[i].Item2);
			}

			Console.WriteLine(sb.ToString());
		}	
	}

	public class Scanner
	{
		private readonly char[] delimiter_ = new char[] { ' ' };
		private string[] buf_;
		private int index_;
		
		public Scanner()
		{
			buf_ = new string[0];
			index_ = 0;
		}

		public string Next()
		{
			if (index_ < buf_.Length) {
				return buf_[index_++];
			}

			string st = Console.ReadLine();
			while (st == "") {
				st = Console.ReadLine();
			}

			buf_ = st.Split(delimiter_, StringSplitOptions.RemoveEmptyEntries);
			if (buf_.Length == 0) {
				return Next();
			}

			index_ = 0;
			return buf_[index_++];
		}

		public int Int()
		{
			return int.Parse(Next());
		}
		public int[] ArrayInt(int N, int add = 0)
		{
			int[] Array = new int[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Int() + add;
			}
			return Array;
		}

		public long Long()
		{
			return long.Parse(Next());
		}

		public long[] ArrayLong(int N, long add = 0)
		{
			long[] Array = new long[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Long() + add;
			}
			return Array;
		}

		public double Double()
		{
			return double.Parse(Next());
		}

		public double[] ArrayDouble(int N, double add = 0)
		{
			double[] Array = new double[N];
			for (int i = 0; i < N; i++) {
				Array[i] = Double() + add;
			}
			return Array;
		}
	}
}


Measured memory_bytes: 41348
def resolve():
    H, W, K = [int(i) for i in input().split()]
    A = [input() for _ in range(H)]
    ans = 0
    for i in range(2**H):
        for ii in range(2**W):
            cnt = 0
            for j in range(H):
                for jj in range(W):
                    if (i >> j) & 1 and (ii >> jj) & 1:
                        if A[j][jj] == "#":
                            cnt += 1
            if cnt == K:
                ans += 1
    print(ans)

resolve()


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

using namespace std;
const int Maxn = 1e5 + 10;
int a[Maxn], n,q;
int main() {
//#define LOCAL
#ifdef LOCAL
    freopen("/Users/ttjy/Desktop/in.txt", "r", stdin);
#endif
    cin >> n;
    int ai;
    long long sum = 0;
    for (int i = 0; i < n; ++i) {
        scanf("%d", &ai);
        a[ai]++;
        sum += ai;
    }
    cin >> q;
    while (q--) {
        int b, c;
        scanf("%d%d", &b, &c);
        sum +=a[b]* c-a[b]* b;
        a[c] += a[b];
        a[b] = 0;

        cout << sum << endl;
    }
    return 0;
}

Measured memory_bytes: 4060
s = gets.chomp
K = gets.chomp.to_i
list = []
q = s.chars.uniq.sort
while (list.size<K)
	cur = q.shift
	if list.include?(cur)
		next
	end
	list.push cur
	i = 0
	nq = []
	while((i = s.index(cur,i)) && i <s.size-cur.size)
		nq.push s[i..i+(cur.size)]
		i+=1
	end
	q = nq.sort+q
end
puts list.last

Measured memory_bytes: 3704
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>

using namespace std;

int dp[1000001];
int kind[31];


const int MAX_SIZE = 10000;
const int MAX_PRIME = 1000000;


int prime[MAX_PRIME+1];
bool isPrime[MAX_PRIME+1];
int p;

void erats(){
	// primeXgðú»
	fill(isPrime,isPrime+MAX_PRIME,true);
	p = 0;
	isPrime[0] = isPrime[1] = false;

	for(int i = 2; i <= MAX_PRIME; i++){
		if(isPrime[i]){
			prime[p++] = i;
		}
		else
			continue;

		// Óé¢É©¯é
		for(int j = 2*i; j <= MAX_PRIME; j+=i){
			isPrime[j] = false;
		}
	}
}


int main(){

	int n;
	int x;
	erats();
	while(cin>>n>>x&&!(n==0&&x==0)){
		for(int i = 0; i < n; i++){
			cin>>kind[i];
		}
		// eàzÌ¥¢ûª½íÞ é©ðßé
		fill(dp,dp+1000001,0);
		dp[0]=1;
		int maxCost=-1;

		for(int j = 0; j < n; j++){
			for(int i = kind[j]; i <= x; i++){
				dp[i]+=dp[i-kind[j]];
			}
		}

		//for(int i = 1; i <= x; i++){
		//	dp[i]=0;
		//	for(int j = 0; j < n; j++){
		//		if(i-kind[j]>=0){
		//			dp[i]+=dp[i-kind[j]];
		//		}
		//	}
		//	if(dp[i]>=1&&(isPrime[i])){
		//		maxCost=max(i,maxCost);
		//	}
		//}
		for(int i = 0; i <= x; i++){
			if(dp[i]&&isPrime[i])
				maxCost=i;
		}


		if(maxCost==-1)
			cout<<"NA"<<endl;
		else
			cout<<maxCost<<endl;
	}

	return 0;
}

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

using namespace std;

int main() {
    int n = 0, x = 0, t = 0, ans = 0;
    cin >> n >> x >> t;
    if (n % x != 0) {
        ans = (n / x + 1) * t;
    } else {
        ans = (n / x) * t;
    }

    cout << ans << endl;

}

Measured memory_bytes: 3592
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <unordered_set>
#include <unordered_map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  ll r, D, x;
  cin >> r >> D >> x;
  int i = 2001;
  while (i <= 2010) {
    x = r * x - D;
    cout << x << endl;
    i++;
  }
  return 0;
}


Measured memory_bytes: 256
# Circumscribed Circle of a Triangle
import math
def simul_eq(a,b,c,d,e,f):
    # A = [[a,b],[d,e]]
    C = [c,f]
    detA = a*e - b*d
    # if detA == 0: raise # det(A) == 0.
    At = [[e,-b],[-d,a]]
    x = sum(map((lambda x,y: x*y), At[0], C)) / detA
    y = sum(map((lambda x,y: x*y), At[1], C)) / detA
    fx,fy = '{0:.3f}'.format(x), '{0:.3f}'.format(y)
    if fx == '-0.000': fx = fx[1:]
    if fy == '-0.000': fy = fy[1:]
    return (fx,fy)

n = int(input())
for _ in range(n):
    x1,y1,x2,y2,x3,y3 = map(float, input().split())
    a = math.sqrt(pow(x2-x3, 2) + pow(y2-y3, 2))
    b = math.sqrt(pow(x1-x3, 2) + pow(y1-y3, 2))
    c = math.sqrt(pow(x2-x1, 2) + pow(y2-y1, 2))
    cosA = (pow(b,2) + pow(c,2) - pow(a,2)) / (2*b*c)
    sinA = math.sqrt(1 - pow(cosA,2))
    R = a / (2 * sinA)
    cen = simul_eq(x2-x1, y2-y1, (y2**2 - y1**2 + x2**2 - x1**2) / 2, x3-x1, y3-y1, (y3**2 - y1**2 + x3**2 - x1**2) / 2)
    print(' '.join(cen), '{0:.3f}'.format(R))


Measured memory_bytes: 7748
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=1000005,INF=1<<30;
ll dp[MAX],sum[MAX];

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    ll N;cin>>N;
    dp[1]=N;
    dp[2]=N*N%mod;
    
    sum[1]=N;
    sum[2]=N+N*N%mod;
    
    for(ll i=3;i<=N;i++){
        dp[i]=dp[i-1]+sum[i-3]+(N-1-(i-3))*N+(i-3)*(N-1);
        dp[i]%=mod;
        
        sum[i]=sum[i-1]+dp[i];
        sum[i]%=mod;
    }
    
    //for(int i=1;i<=N;i++) cout<<dp[i]<<" ";
    
    cout<<dp[N]<<endl;
}


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

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

  cout << a*b/2 << endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define GET_REP(_1, _2, _3, NAME, ...) NAME
#define rep(...) GET_REP(__VA_ARGS__, irep, _rep)(__VA_ARGS__)
#define rep1(...) GET_REP(__VA_ARGS__, irep1, _rep1)(__VA_ARGS__)
#define _rep(i, n) irep (i, 0, n)
#define _rep1(i, n) irep1(i, 1, n)
#define irep(i, a, n) for (int i = a; i < (int)(n); ++i)
#define irep1(i, a, n) for (int i = a; i <= (int)(n); ++i)
#define rrep(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define rrep1(i, n) for (int i = (int)(n); i >= 1; --i)
#define allrep(X, x) for (auto &&X : x)
#define all(x) begin(x), end(x)
#ifdef LOCAL
  #include "../../Lib/cout_container.hpp"
  #define debug(x) cout << #x " => " << (x) << endl
#else
  #define debug(x) 0
#endif
using lint = long long;
constexpr int    INF  = 1 << 29;
constexpr lint   INFL = 1LL << 61;
constexpr int    MOD  = (int)1e9 + 7;
constexpr double EPS  = 1e-9;
using namespace std;
namespace { struct INIT { INIT() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(15); } } INIT; }

template <typename T>
T gcd(T a, T b) {
  while (a && b) {
    if (a >= b) a %= b;
    else b %= a;
  }
  return a + b;
}

template <typename T>
vector<T> divisor(T n) {
  vector<T> ret;
  for (T 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(void) {
  int a, b, k;
  cin >> a >> b >> k;
  int  x = gcd(a, b);
  auto v = divisor(x);
  sort(all(v));
  cout << *(v.end() - k) << endl;
  return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main(){
  int n, a, b;
  scanf ( "%d%d%d", &n, &a, &b); 
  int r = 0;
  for (int i = 1; i <= n; i++) {
	int c = 0, t = i;
  for (int j = 0; j < 5; j++) c += t % 10, t /= 10; 
    if  (a <= c && c <= b ) r += i;
  }
  printf("%d\n", r);
}

Measured memory_bytes: 256
n=int(input())
a=list(map(int, input().split()))
b=list(map(int, input().split()))
count=0

for i in range(n):
    if a[i]>b[i]:
        count+=b[i]
    else:
        count+=a[i]
        b[i]-=a[i]
        if a[i+1]>b[i]:
            count+=b[i]
            a[i+1]-=b[i]
        else:
            count+=a[i+1]
            a[i+1]=0
print(count)

Measured memory_bytes: 18476
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) FOR(i,0,n)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define PQ priority_queue
#define UM unordered_map
#define ALL(a) (a).begin(),(a).end()
typedef vector<ll> vi;
typedef vector<vector<ll>> vvi;
const ll INF = (1ll << 60);
typedef pair<ll,ll> pii;
struct Edge{
  ll to,id;
};
typedef vector<vector<ll>> Graph;
typedef vector<pii> vpii;

int main() {
  ll N,K; cin>>N>>K;
  vi a(N); REP(i,N) cin>>a[i];
  vi sum(N-K+1),abssum(N-K+1);
  REP(i,K) sum[0]+=a[i];
  REP(i,K) abssum[0]+=max(0ll,a[i]);
  REP(i,N-K) sum[i+1]=sum[i]+a[K+i]-a[i];
  REP(i,N-K) abssum[i+1]=abssum[i]+max(0ll,a[K+i])-max(0ll,a[i]);
  ll tot_abssum=0;
  REP(i,N) tot_abssum+=max(0ll,a[i]);
  ll ans=-INF;
  REP(i,N-K+1) {
    ans=max(ans,max(0ll,sum[i])+(tot_abssum-abssum[i]));
  }
  cout<<ans<<endl;

}


Measured memory_bytes: 2560
#include<stdio.h>
int main(void)
{
	int n,i,a[101],b[101],c[101],s,ss,sss,z;
	scanf("%d",&n);
	while(n!=0){
		for(i=0;i<n;i++){
			z=0;
			scanf("%d %d %d",&a[n],&b[n],&c[n]);
			ss=a[n]+b[n]+c[n];
			s=ss/3;
			sss=(a[n]+b[n])/2;
			if(100==a[n] || 100==b[n] || 100==c[n]){
				printf("A\n");
				z=1;
			}
			else if(sss>=90){
				printf("A\n");
				z=1;
			}
			else if(s>=80){
				printf("A\n");
				z=1;
			}
			else if(s>=70){
				printf("B\n");
				z=1;
			}
			else if(s>=50){
				if(a[n]>=80 || b[n]>=80){
				printf("B\n");
				z=1;
				}
			}
			if(z==0){
				printf("C\n");
			}
		}
		scanf("%d",&n);
	}
	return 0;
}

Measured memory_bytes: 1008
#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	int i,l=-1,r=-1;
	for(i=0;i<=s.size()-1;i++)
	{
		if(s[i]=='C') l=i;
	}
	if(l==-1)
	{
		cout<<"No";
		return 0;
	}
	for(i=l;i<=s.size()-1;i++)
	{
		if(s[i]=='F') r=i;
	}
	if(r==-1) cout<<"No";
	else cout<<"Yes";
	return 0;
}

Measured memory_bytes: 384
//
//  atcoder.cpp
//
//
///
#include <bits/stdc++.h>
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/numeric/ublas/vector.hpp>
#include <boost/multiprecision/cpp_int.hpp>
// ↓これいる？
#include <boost/graph/strong_components.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) (void)0; const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;
using namespace boost::numeric;
using namespace boost::multiprecision;
using ll = long long;
namespace bst = boost;
template<class T> void fill(T& v) { for (auto&& i : v) cin >> i; }

//#include "atcoder.hpp"

int main() {
    int N; string s;
    
    cin >> N>>s;
    
  for (auto&& i : s) {
    i += N;
    i = (i - 'A') % 26 + 'A';
  }
    cout << s << endl;
    
    return 0;
}







Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>
#define A 100000
int o;
int O[A];
int pa(int p , int l){
  int u,i,j,t;
  u =O[l];
  i = p-1;
  for(j=p;j<l;j++){
    if(O[j] <= u){
      i++;
      t=O[i];
      O[i]=O[j];
      O[j]=t;
    }
  }
  t=O[i+1];
  O[i+1]=O[l];
  O[l]=t;
  return i+1;
}
int main(){
  int i,h;
  scanf("%d",&o);
  for(i=0;i<o;i++) scanf("%d",&O[i]);
  h= pa(0,o-1);


  for(i=0;i<o;i++){
    if(i)printf(" ");
    if(i == h)printf("[");
    printf("%d",O[i]);
    if(i==h)printf("]");
  }
  printf("\n");
  return 0;
}



Measured memory_bytes: 2132
from sys import stdin
from itertools import accumulate
def main():
    #入力
    readline=stdin.readline
    n,k=map(int,readline().split())
    a=list(map(int,readline().split()))

    cnt=0
    while cnt<k:
        s=[0]*n
        for i in range(n):
            x_min=i-a[i]
            x_max=i+a[i]+1
            s[max(0,x_min)]+=1
            if n-1<x_max:
                pass
            else:
                s[x_max]-=1
        a=list(accumulate(s))
        cnt+=1
        
        flag=True
        for i in range(n):
            if a[i]!=n:
                flag=False
                break
        if flag: break

    print(*a)

if __name__=="__main__":
    main()

Measured memory_bytes: 176728
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int tot,id,n,q,dis[N],dep[N],root[N],head[N],nex[N<<1],to[N<<1],c[N<<1],wi[N<<1];
int fa[N][20],lg[N];
struct node
{
    int tot,sum,l,r;
}t[N*40];
void add(int u,int v,int x,int y)
{
    to[++tot]=v;nex[tot]=head[u];head[u]=tot;c[tot]=x;wi[tot]=y;
}
int build(int l,int r,int k)
{
    int p=++id;
    if(l==r) return p;
    int m=l+r>>1;
    t[p].l=build(l,m,k<<1);
    t[p].r=build(m+1,r,k<<1|1);
    return p;
}
int update(int l,int r,int k,int x,int v,int pre)
{
    int p=++id;
    if(l==r) {t[p].sum=t[pre].sum+v;t[p].tot=t[pre].tot+1;return p;}
    int m=l+r>>1;
    if(x<=m)
    {
        t[p].r=t[pre].r;
        t[p].l=update(l,m,k<<1,x,v,t[pre].l);
    }
    else
    {
        t[p].l=t[pre].l;
        t[p].r=update(m+1,r,k<<1|1,x,v,t[pre].r);
    }
    return p;
}
pair<int,int> query(int l,int r,int k,int x,int now,int pre)
{
    if(l==r) return {t[now].tot-t[pre].tot,t[now].sum-t[pre].sum};
    int m=l+r>>1;
    if(x<=m) return query(l,m,k<<1,x,t[now].l,t[pre].l);
    return query(m+1,r,k<<1|1,x,t[now].r,t[pre].r);
}
void dfs(int u,int p)
{
    dep[u]=dep[p]+1;
    fa[u][0]=p;
    for(int i=1;1<<i<=dep[u];i++)
        fa[u][i]=fa[fa[u][i-1]][i-1];
    for(int i=head[u];i;i=nex[i])
    {
        int v=to[i];
        if(v==p) continue;
        root[v]=update(1,n-1,1,c[i],wi[i],root[u]);
        dis[v]=dis[u]+wi[i];
        dfs(v,u);
    }
}
int LCA(int u,int v)
{
    if(dep[u]<dep[v]) swap(u,v);
    while(dep[u]>dep[v])
        u=fa[u][lg[dep[u]-dep[v]]-1];
    if(u==v) return u;
    for(int k=lg[dep[u]]-1;k>=0;k--)
        if(fa[u][k]!=fa[v][k])
            u=fa[u][k],v=fa[v][k];
    return fa[u][0];
}
int main()
{
    scanf("%d%d",&n,&q);
    for(int i=1;i<n;i++)
    {
        int u,v,x,y;
        scanf("%d%d%d%d",&u,&v,&x,&y);
        add(u,v,x,y);
        add(v,u,x,y);
    }
    for(int i=1;i<=n;i++)
        lg[i]=lg[i-1]+(1<<lg[i-1]==i);
    root[1]=build(1,n-1,1);
    dfs(1,0);
    while(q--)
    {
        int x,y,u,v;
        scanf("%d%d%d%d",&x,&y,&u,&v);
        int lca=LCA(u,v);
        if(dep[u]>dep[v]) swap(u,v);
        if(lca==u)
        {
            int ans=dis[v]-dis[u];
            pair<int,int>t=query(1,n-1,1,x,root[v],root[u]);
            ans=ans-t.second+t.first*y;
            printf("%d\n",ans);
        }
        else
        {
            int ans=dis[v]-dis[lca]+dis[u]-dis[lca];
            pair<int,int>t1=query(1,n-1,1,x,root[v],root[lca]),t2=query(1,n-1,1,x,root[u],root[lca]);
            ans=ans-t1.second+t1.first*y-t2.second+t2.first*y;
            printf("%d\n",ans);
        }
    }
}


Measured memory_bytes: 51072
//package atcoder.beginnner_176;

import java.io.*;
import java.util.StringTokenizer;

public class Main {

    public static void main (String[] args) throws Exception {

        String s = "1\n" +
                "1 2";

//        br = new BufferedReader(new StringReader(s));
        br = new BufferedReader(new InputStreamReader(System.in));
        bw = new BufferedWriter(new OutputStreamWriter(System.out));

        rl(); int N = nin();
        long m=0;
        long ph=0;
        rl(); for (int i=0; i<N; ++i) {
            long h=nlo();
            if (h<ph) m+=(ph-h);
            ph=Math.max(h, ph);
        }
        bw.write(m + "\n");
        bw.flush();
    }

    static BufferedReader br; static BufferedWriter bw; static StringTokenizer st;
    static void rl() throws Exception{ st = new StringTokenizer(br.readLine()); }
    static long nlo(){ return Long.parseLong(st.nextToken()); }
    static int nin(){ return Integer.parseInt(st.nextToken()); }
    /*private static void te(){}*/
    static double ndo(){ return Double.parseDouble(st.nextToken()); }
    static char[] nca(){ return st.nextToken().toCharArray(); }
}


Measured memory_bytes: 55368
//sjf in cpp
#include <bits/stdc++.h>
#include<iostream>
#include <algorithm>
using namespace std;
int n;
char f(char c)
{
	int val=c-'A';
	char k=(val+n)%26 +'A';
	return k;
}
int main(){
	
	cin>>n;
	string s;
	cin>>s;
	for(char c:s)
		cout<<f(c);
	cout<<endl;
	
}

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

const ll mod=1e9+9;
const ll MAXN=5e3+5;
const ll inf=1e17;

int main()
{
    fastio;
    string s;
    cin>>s;
    for(int i=0;i<s.length();i++) cout<<'x';
    cout<<endl;
}


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

#define INF 2147483647
#define LINF 9223372036854775807
#define MOD 1000000007
#define MOD2 998244353

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

#define rep(i,n) for(int i=0,_i=(n);i<_i;++i)
#define rep1(i,a,b) for(int a_=(a),b_=(b),i=a_;i<b_;++i)
#define repr(i,n) for(int _i=(n),i=_i;i>0;--i)

#define db(x) cerr<<#x<<" = "<<x<<" ";
#define db2(x,y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<") ";
#define db3(x,y,z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = ("<<x<<", "<<y<<", "<<z<<") ";
#define ln cout<<endl;

#define all(a)  (a).begin(),(a).end()
#define dig(n)  to_string(n).length()

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define se second
#define fi first

typedef long long ll;
typedef long double ld;

typedef pair<int,int> P;
typedef pair<int,P> iP;
typedef pair<P,P> PP;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};


ll sig(ll n){
    return n*(n+1)/2;
}


int main(){

    bool flag=false;
    ll ans=0,sum=0;

    ll n;
    cin>>n;

    for(ll i=1;i <= n; ++i){
        ans += (i * sig(n/i));
    }

    cout<<ans<<endl;
    //cout <<fixed<<setprecision(16)<< << endl;
    //if(flag)cout << "Yes" <<endl;
    //else cout << "No" <<endl;

    return 0;
}


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

int main() {
  ll H, W;
  cin >> H >> W;
  
  ll d[10][10];
  for (ll i = 0; i < 10; i++) {
    for (ll j = 0; j < 10; j++) {
      cin >> d[i][j];
    }
  }
  
  
  for (ll k = 0; k < 10; k++) {
    for (ll i = 0; i < 10; i++) {
      for (ll j = 0; j < 10; j++) {
        d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
      }
    }
  }
  
  
  ll ans = 0;
  for (ll i = 0; i < H; i++) {
    for (ll j = 0; j < W; j++) {
      ll n;
      cin >> n;
      if (n != -1) {ans += d[n][1];}
    }
  }
  
  cout << ans << endl;
}
    

Measured memory_bytes: 256
#include<stdio.h>
#include<string.h>
int main(void){
  int i;
  char s[100001];
  char flg[256]={0};
  scanf("%s",s);
  for(i=0;i<strlen(s);i++){
    flg[s[i]]=1;
  }
  for(i='a';i<='z'&&flg[i]!=0;i++);
  if(i>'z'){
	puts("None");
  }else{
    putchar(i);
  }
  return 0;
}

Measured memory_bytes: 256
n = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr



fac = factorization(n)
ans = 0
if n == 1:
    print(0)
else:
    for i in fac:
        tem = 1
        while tem*(tem+1)//2 < i[1]:
            if i[1] >= (tem+1)*(tem+2)//2:
                tem += 1
            else:
                break
        ans += tem

    print(ans)

Measured memory_bytes: 63372
// clang-format

#include <bits/stdc++.h>
#define rep(i, n) for (lli i = 0; i < (n); i++)
#define rrep(i, n) for (lli i = (n)-1; i >= 0; i--)
using namespace std;

using lli = long long int;

void solve(long long A, long long B, long long K) {
  if(A<=K){

    K-=A;
    A = 0;
    cout << A << " " << max(0ll, B-K)<<endl;
  }
  else {
    A-=K;
    cout << A << " " << B << endl;
  }

}

int main() {
  int a;
  long long A;
  scanf("%lld", &A);
  long long B;
  scanf("%lld", &B);
  long long K;
  scanf("%lld", &K);
  solve(A, B, K);
  return 0;
}


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

int n, m, score[31];

int main(){
    int count = 0;
	cin >> n >> m;
	for(int i = 0, k; i<n ; i++){
		cin >> k;
		for(int j = 0, a; j<k; j++){
			cin >> a;
			score[a]++;
			if(score[a]==n){
				count++;
			}
		}
	}
	cout << count << endl;
}

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

ll s(ll a) {
    return a*(a+1)/2;
}

int main() {
    int x;
    cin>>x;
    ll ans=(1<<30)-1;
    for (int i=29;i>=0;i--)
        if (x<=s(ans-(1<<i)))
            ans-=1<<i;
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using static System.Console;
using static System.Math;

namespace Atcoder
{
    class Program
    {
        static StreamWriter sw = new StreamWriter(OpenStandardOutput()) { AutoFlush = false };
        static void Main(string[] args)
        {
            try
            {
                SetOut(sw);
                Solve.Answer();
                Out.Flush();
            }
            catch (Exception ex)
            {
                WriteLine(ex.ToString());
            }
        }
    }

    public class Solve
    {
        public static List<long[]> list = new List<long[]>();

        public static void Answer()
        {
            long N = IO.RLong;

            Yakusu(N);
            var last = list.Last();

            int a1 = Keta(last[0]);
            int a2 = Keta(last[1]);
            WriteLine(Max(a2, a1));
        }

        public static void Yakusu(long N)
        {
            for (int i = 1; i <= Sqrt(N); i++)
            {
                if (N % i == 0)
                    list.Add(new long[] { i, N / i });
            }
        }

        public static int Keta(long N)
        {
            int cnt = 1;
            while (true)
            {
                N /= 10;
                if (N != 0)
                    cnt++;
                else
                    break;
            }
            return cnt;
        }
    }

    public class IO
    {
        #region Input
        public static int RInt => int.Parse(ReadLine());
        public static long RLong => long.Parse(ReadLine());
        public static double RDouble => double.Parse(ReadLine());

        public static string[] RSString => ReadLine().Split();
        public static int[] RSInt => ReadLine().Split().Select(s => int.Parse(s)).ToArray();
        public static long[] RSLong => ReadLine().Split().Select(s => long.Parse(s)).ToArray();
        public static double[] RSDouble => ReadLine().Split().Select(s => double.Parse(s)).ToArray();
        #endregion

        #region Output
        public static void OutJoinSpace<T>(IEnumerable<T> list) => WriteLine(string.Join(" ", list));
        public static void WriteLineYes_or_No(bool flag) => WriteLine(flag ? "Yes" : "No");
        public static void WriteLineYES_or_NO(bool flag) => WriteLine(flag ? "YES" : "NO");
        #endregion
    }

    public class Mod
    {
        #region
        private readonly static long M = 1000000007;

        public static long Add(long a, long b) => (a * b) % M;
        public static long Sub(long a, long b) => (a - b) % M >= 0 ? (a - b) % M : (a - b) % M + M;
        public static long Multi(long a, long b) => (a * b) % M;
        #endregion
    }
}

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

bool cmp(int a, int b) {
	return a > b;
}

int main() {
	int X, Y, A, B, C;
	cin >> X >> Y >> A >> B >> C;
	vector<int> Red;
	vector<int> Green;
	vector<int> Colorless;
	vector<int> Eat;
	int a;
	long tot = 0;
	for (int i = 0;i < A;i++) {
		cin >> a;
		Red.push_back(a);
	}
	sort(Red.begin(), Red.end(), cmp);
	for (int i = 0;i < B;i++) {
		cin >> a;
		Green.push_back(a);
	}
	sort(Green.begin(), Green.end(), cmp);
	for (int i = 0;i < C;i++) {
		cin >> a;
		Colorless.push_back(a);
	}
	sort(Colorless.begin(), Colorless.end(),cmp);
	
	for (int i = 0;i < X;i++) {
		Eat.push_back(Red[i]);
	}
	for (int i = 0;i < Y;i++) {
		Eat.push_back(Green[i]);
	}
	for (int i = 0;i < C;i++) {
		Eat.push_back(Colorless[i]);
	}
	sort(Eat.begin(), Eat.end(), cmp);
	for (int i = 0;i < X+Y;i++) {
		tot += Eat[i];
	}
	cout << tot << "\n";

}

Measured memory_bytes: 3572
#include <stdio.h>

int main(void){

	int W,H,x,y,r;
	
	scanf("%d", &W);
	scanf("%d", &H);
	scanf("%d", &x);
	scanf("%d", &y);
	scanf("%d", &r);
	
	if(r<=x && x<=W-r && r<=y && y<=H-r){
		printf("Yes\n");
	}
	else{
		printf("No\n");
	}

	return 0;
}

Measured memory_bytes: 2680