akhauriyash/Code-Regression huggingface dataset:
package main
import (
  "bufio"
  "os"
  "strconv"
  "strings"
  "fmt"
)

const p = 998244353

func Sum(A ...int) int {
  sum := 0
  for _, a := range A {
    sum = (sum + a) % p
  }
  return sum
}

func Solve() {
  S := strings.Split(NextLine(), " ")
  K, _ := strconv.Atoi(S[1])
  C := make([]int, 0)
  cnt := 0
  for _, s := range S[0] {
    if s == '0' {
      C = append(C, cnt)
      cnt = 0
    } else {
      cnt++
    }
  }
  C = append(C, cnt)
  C = C[1:]
  K = MinInt(SumInt(C...), K)
  M := len(C)
  DP := make([][][]int, M + 1)
  for i := range DP {
    DP[i] = make([][]int, K + 1)
    for j := range DP[i] {
      DP[i][j] = make([]int, K + 1)
    }
  }
  DP[M][0][0]++
  var cum int
  for i := M - 1; 0 <= i; i-- {
    for j := 0; j <= K; j++ {
      cum = 0
      for k := 0; k <= j; k++ {
        DP[i][j][k] += DP[i + 1][j][k] + cum
        DP[i][j][k] %= p
        cum += DP[i + 1][j][k]
      }
    }
    for k := 0; k <= K; k++ {
      cum = 0
      for j := k; j <= K; j++ {
        DP[i][j][k] += cum
        DP[i][j][k] %= p
        cum += DP[i + 1][j][k]
        if j >= C[i] { cum -= DP[i + 1][j - C[i]][k] }
      }
    }
  }
  ans := 0
  for _, dp := range DP[0] {
    ans = (ans + Sum(dp...)) % p
  }
  Write(ans)
}

func main() {
  Solve()
  Output()
}

var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  buffer := make([]byte, 0)
  for true {
    line, isPrefix, err := reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
    if !isPrefix { break }
  }
  return string(buffer)
}
func NextInt(A ...*int) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.Atoi(L[i])
  }
}
func NextIntSlice(A *[]int) {
  L := strings.Split(NextLine(), " ")
  (*A) = make([]int, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.Atoi(l)
  }
}
func NextFloat(A ...*float64) {
  L := strings.Split(NextLine(), " ")
  for i, a := range A {
    *a, _ = strconv.ParseFloat(L[i], 64)
  }
}
func NextFloatSlice(A *[]float64) {
  L := strings.Split(NextLine(), " ")
  (*A) = make([]float64, len(L))
  for i, l := range L {
    (*A)[i], _ = strconv.ParseFloat(l, 64)
  }
}
func Write(S ...interface{}) {
  fmt.Fprintln(writer, S...)
}
func WriteIntSlice(A []int) {
  B := make([]interface{}, len(A))
  for i, a := range A { B[i] = a }
  Write(B...)
}
func Output() {
  _ = writer.Flush()
}
func MaxInt(A ...int) int {
  max := A[0]
  for _, a := range A {
    if max < a { max = a }
  }
  return max
}
func MinInt(A ...int) int {
  min := A[0]
  for _, a := range A {
    if a < min { min = a }
  }
  return min
}
func SumInt(A ...int) int {
  sum := 0
  for _, a := range A {
    sum += a
  }
  return sum
}
func AbsInt(x int) int {
  if x < 0 { x = -x }
  return x
}

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

using namespace std;

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

	long long a, b, c, ans = 0;
	cin>>a>>b>>c;

	if(a + b + 1>= c)cout<<b + c<<"\n";
	else cout<<a + b + 1 + b<<"\n";

	return 0;
}

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



class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }
    

    Scanner cin;



    void calc()
    {
        cin = new Scanner();
        int N = cin.nextInt();
        int[] A = cin.ArrayInt(N);

        int xor = 0;
        foreach (var item in A)
        {
            xor ^= item;
        }

        int[] num = new int[40];
        foreach (var item in A)
        {
            num[getLeftPos(item)]++;
        }

        int ans = 0;
        for (int i = 31 - 1; i >= 0; i--)
        {
            if ((xor >> i) % 2 == 0) continue;
            ans++;
            if(num[i] == 0)
            {
                Console.WriteLine(-1);
                return;
            }
            xor ^= (1 << (i + 1)) - 1;
        }
        Console.WriteLine(ans);
    }

    int getLeftPos(int a)
    {
        for (int i = 0; i < 40; i++)
        {
            if ((a >> i) % 2 == 1) return i;
        }
        return -1;
    }
}



class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        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] = nextInt() + add;
        }
        return Array;
    }

    public long nextLong()
    {
        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] = nextLong() + add;
        }
        return Array;
    }

    public double nextDouble()
    {
        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] = nextDouble() + add;
        }
        return Array;
    }
}

Measured memory_bytes: 15444
// 標準入力
var fs = require('fs'),
length = fs.fstatSync(process.stdin.fd).size,
buffer = new Buffer(length),
bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
input = buffer.toString('utf8', 0, bytesRead).trim().split('\n');
main();

function main(){
  var operands = ['+', '-', '*'];
  var inp;
  for(var i = 0; (inp = input[i]) != '0 0 0 0'; i++){
    inp = inp.split(' ').map(Number);
    var found = false;

  FIRST:for(var a = 0; a < 4; a++){
    for(var b = 0; b < 4; b++){
      if(a==b)continue;
      for(var c = 0; c < 4; c++){
        if(a==c||b==c)continue;
        for(var d = 0; d < 4; d++){
          if(a==d||b==d||c==d)continue;

          for(var op1 = 0; op1 < 3; op1++){
            for(var op2 = 0; op2 < 3; op2++){
              for(var op3 = 0; op3 < 3; op3++){
                for(var pattern = 0; pattern < 3; pattern++){
                  var polish = [];
                  switch(pattern){
                  case 0:
                    // pattern1:num num op num op num op (((a op1 b) op2 c) op3 d)
                    polish = [inp[a], inp[b], operands[op1], inp[c], operands[op2], inp[d], operands[op3]];
                    break;
                  case 1:
                    // pattern2:num num num op op num op ((a op2 (b op1 c)) op3 d)
                    polish = [inp[a], inp[b], inp[c], operands[op1], operands[op2], inp[d], operands[op3]];
                    break;
                  case 2:
                    // pattern3:num num num num op op op ((c op1 d) op3 (a op2 b))
                    polish = [inp[a], inp[b], operands[op1],inp[c], inp[d], operands[op2], operands[op3]];
                    break;
                  }

                  var stack = [];
                  for(var j = 0; j < 7; j++){
                    var h = polish[j];
                    switch(h){
                    case '+':
                      stack.push(stack.pop() + stack.pop());
                      break;
                    case '-':
                      stack.push(-stack.pop() + stack.pop());
                      break;
                    case '*':
                      stack.push(stack.pop() * stack.pop());
                      break;
                    default:
                      stack.push(h);
                      break;
                    }
                  }

                  if(stack.pop() == 10){
                    found = true;

                    var result = [];
                    var l, r;
                    for(var j = 0; j < 7; j++){
                    var h = polish[j];
                      if(h == '+' || h == '-' || h == '*'){
                        r = result.pop();
                        l = result.pop();
                        result.push("(" + l + " " + h + " " + r + ")");
                      }else{
                        result.push(h);
                      }
                    }
                    
                    console.log(result.pop());
                    break FIRST;
                  }
                }
              }
            }
          }
        }
      }
    }
  }

    if(!found)
      console.log(0);
    
  }
}
     

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

namespace ConsoleApp90 {
    class Program {
        static void Main(string[] args) {
            string S = Console.ReadLine();
            string T = Console.ReadLine();

            int S_kind = S.ToCharArray().Distinct().Count();
            int T_kind = T.ToCharArray().Distinct().Count();

            //文字の種類数が異なっていればまずアウト
            if (S_kind != T_kind) {
                Console.WriteLine("No");
                return;
            }

            var alphabetList = new List<char> { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };

            //Console.WriteLine(S_kind);

            //Console.WriteLine(S.ToCharArray().Distinct().ToArray()[0]);
            
            for (int i = 0; i < S_kind; i++) {
                S = S.Replace(S.ToCharArray().Distinct().ToArray()[i], alphabetList[i]);
                T = T.Replace(T.ToCharArray().Distinct().ToArray()[i], alphabetList[i]);
            }

            //Console.WriteLine(S);
            //Console.WriteLine(T);

            if (S == T) {
                Console.WriteLine("Yes");
            } else {
                Console.WriteLine("No");
            }

        }
    }
}

Measured memory_bytes: 29920
#include<bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;

int main(void) {
    string S;
    cin >> S;

    bool flag = false;
    for(int i=0; i<3; i++){
        if(S[0]!=S[i])
          flag = true;
    }

    if(flag)
      cout<<"Yes" <<endl;
    else
      cout<<"No" <<endl;

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<math.h>

struct point {double x,y;};

void kock(int n,struct point p1,struct point p2){
  struct point s,u,t;
  double radian;

  radian = 60.0 * (M_PI / 180.0);
  
  if(n == 0) return;

  s.x = (2.0 * p1.x + 1.0 * p2.x)/3;
  s.y = (2.0 * p1.y + 1.0 * p2.y)/3;
  t.x = (1.0 * p1.x + 2.0 * p2.x)/3;
  t.y = (1.0 * p1.y + 2.0 * p2.y)/3;

  u.x = (t.x - s.x) * cos(radian) - (t.y - s.y) * sin(radian) + s.x;
  u.y = (t.x - s.x) * sin(radian) + (t.y - s.y) * cos(radian) + s.y;

  kock(n-1,p1,s);
  printf("%.8f %.8f\n",s.x,s.y);
  
  kock(n-1,s,u);
  printf("%.8f %.8f\n",u.x,u.y);

  kock(n-1,u,t);
  printf("%.8f %.8f\n",t.x,t.y);

  kock(n-1,t,p2);
}

int main(){
  int n;
  struct point a,z;
  
  scanf("%d",&n);
  
  a.x = 0.0;
  a.y = 0.0;
  z.x = 100.0;
  z.y = 0.0;

  printf("%.8f %.8f\n",a.x,a.y);
  kock(n,a,z);
  printf("%.8f %.8f\n",z.x,z.y);

  return 0;
}



Measured memory_bytes: 2104
#include <iostream>
#include <vector>
using ll =long long;
int main()
{
  int N;std::cin>>N;
  ll X;std::cin>>X;
  std::vector<ll> s(N+1,1),p(N+1,1);
  for(int i=1;i<=N;i++){
    s[i]=2*s[i-1]+3;
    p[i]=2*p[i-1]+1;
  }
  auto dp=[&](auto&& self,const int l,const ll x)->ll{
    if(l==0)return 1;
    if(x<=1)return 0;
    if(x<=1+s[l-1])return self(self,l-1,x-1);
    if(x==2+s[l-1])return 1+p[l-1];
    if(x<=2+2*s[l-1])return p[l-1]+1+self(self,l-1,x-2-s[l-1]);
    return 2*p[l-1]+1;
  };
  std::cout<<dp(dp,N,X)<<std::endl;
  return 0;
}


Measured memory_bytes: 256
import std.stdio;
import std.ascii;
import std.conv;
import std.string;
import std.array;

void main() {
  int sum = 0;
  while(true) {
    string line = readln.chomp;
    bool prev_digit = false;
    string number = "";
    if (stdin.eof) break;
    foreach(x; line) {
      if (isDigit(x)) {
        number ~= x;
        prev_digit = true;
      }
      else if (prev_digit) {
        sum += number.to!(int);
        number = "";
        prev_digit = false;
      }
    }
    if (number != "") sum += number.to!(int);
  }
  writeln(sum);
}

Measured memory_bytes: 1056
a1 = gets.split.map(&:to_i)
a2 = gets.split.map(&:to_i)
a3 = gets.split.map(&:to_i)

gets.to_i.times do
  b = gets.to_i

  a1.map! { |a| a == b ? 'B' : a }
  a2.map! { |a| a == b ? 'B' : a }
  a3.map! { |a| a == b ? 'B' : a }
end

# 縦
if 3.times.any? { |i| [a1[i], a2[i], a3[i]].all? { |a| a == 'B' } }
  puts 'Yes'

  exit
end

# 横
if [a1, a2, a3].any? { |a_ary| a_ary.all? { |a| a == 'B' } }
  puts 'Yes'

  exit
end

# 斜め

if [a1[0], a2[1], a3[2]].all? { |a| a == 'B' } ||
   [a1[2], a2[1], a3[0]].all? { |a| a == 'B' }

  puts 'Yes'

  exit
end

puts 'No'


Measured memory_bytes: 1788
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
#define mp1(a,b,c) P1(a,P(b,c))

const int INF=1000000000;
const int dir_4[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
const int dir_8[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};

const long double EPS = 0.0000001;

int main(){
	long long A,B,C;
	cin >> A >> B >> C;
	if(A%2 == 0 || B%2 == 0 || C%2 == 0){
		cout << 0 << endl;
	}
	else{
		cout << min( A*B, min( A*C, B*C ) ) << endl;
	}
}



Measured memory_bytes: 256
#include <stdio.h>

int	main(void)
{
	long long a, b, c, d;

	scanf("%lld%lld%lld%lld", &a, &b, &c, &d);

	if (a * b >= 0){
		if (c * d >= 0){
			if (a >= 0){
				if (c >= 0){
					printf("%lld\n", b * d);
				}else{
					printf("%lld\n", a * d);
				}
			}else{
				if (c >= 0){
					printf("%lld\n", b * c);
				}else{
					printf("%lld\n", a * c);
				}
			}
		}else{
			if (a >= 0){
				printf("%lld\n", b * d);
			}else{
				printf("%lld\n", a * c);
			}
		}
	}else{
		if (c * d >= 0)
		{
			if (c >= 0)
			{
				printf("%lld\n", b * d);
			}else{
				printf("%lld\n", a * c);
			}
		}else{
			if (a * c >= b * d){
				printf("%lld\n", a * c);
			}else{
				printf("%lld\n", b * d);
			}
		}
	}
}


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

///#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,avx,sse4.1,sse4.2,mmx")
///#pragma GCC optimize ("unroll-loops")
///#pragma GCC optimize ("Ofast")
///#pragma GCC optimize ("O3")

using namespace std;

#define int long long
#define ff first
#define ss second
#define db double
#define ld long double
#define pb push_back

const int N = 1e6 + 5, M = 1e3 + 5;
const int inf = 1e9 + 100, mod = 1e9 + 7;
const ld eps = 1e-9, pi = atan2(0, -1);

mt19937_64 mt_rnd_64(chrono::steady_clock::now().time_since_epoch().count());
int rnd(int l, int r){
    return mt_rnd_64() % (r - l + 1) + l;
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int q;
    cin >> q;

    int ac = 0, wa = 0, tle = 0, re = 0;
    while (q--)
    {
        string s;
        cin >> s;

        ac += (s == "AC");
        wa += (s == "WA");
        tle += (s == "TLE");
        re += (s == "RE");
    }

    cout << "AC x " << ac << '\n';
    cout << "WA x " << wa << '\n';
    cout << "TLE x " << tle << '\n';
    cout << "RE x " << re;
    return 0;
}
/// hto ya? zvychayna domohospodarka chy president Ykrainy?


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

namespace ABC118C
{
    class MainClass
    {
        static int[] s;
        static int[] n;

        public static void Main(string[] args)
        {

            s = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);
            n = Array.ConvertAll(Console.ReadLine().Split().ToArray(), int.Parse);

            int tmp = n[0];
            for(int i = 0; i < s[0]-1; i++)
            {
                tmp = Gcd(tmp, n[i + 1]);
            }

            Console.WriteLine(tmp);
        }


        public static int Gcd(int a, int b)
        {
            int tmp;
            // a<bにする
            if (a >= b)
            {
                tmp = a;
                a = b;
                b = tmp;
            }

            if (a == 0)
            {
                return b;
            }

            tmp = a;
            a = b % a;
            b = tmp;
            return Gcd(a, b);

        }
    }
}


Measured memory_bytes: 22880
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,a=0,b=0;
  cin>>n;
  vector<int> vec(n);
  for(int i=0; i<n; i++){
    cin>>vec.at(i);
  }
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  for(int i=0; i<n; i++){
    if(i%2==0){a+=vec.at(i);}else{b+=vec.at(i);}
  }
  cout<<a-b<<endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
 using namespace std;
 int main()
 { 
  long n,a,b,c,d,e,botl,machi,amari;
  cin >> n >> a >> b >> c >> d >> e;
  botl= min (min(min(min(a,b),c),d),e);
  if(n%botl==0)
  {
    amari=n%botl;
  }
   else
   {
     amari=botl-n%botl;
   }
  //cout << amari <<endl;
  machi= (n+amari)/botl-1;
  cout << machi+5 << endl;
  }

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cmath>
#include <functional>
#include <queue>
#include <climits>
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,n1,n2) for(int i=n1;i<n2;i++)
#define put(a) cout<<a<<endl;
using namespace std;
typedef long long ll;
//typedef unsigned long long ull;
typedef pair<int, int> P;

int n;
ll h;
ll min(ll a,ll b){
    if(a<b)return a;
    else return b;
}

ll tim(ll h,ll a){
    if(h%a==0){
        return h/a;
    }else{
        return h/a+1;
    }
}

int main() {
    cin >> n >> h;
    vector<ll> a(n);
    vector<ll> b(n);
    vector<ll> c(n+1);
    REP(i,n){
        cin >> a[i] >> b[i];
    }
    sort(a.begin(),a.end(),greater<ll>());
    sort(b.begin(),b.end(),greater<ll>());
    c[0]=0;
    REP(i,n){
        c[i+1] = c[i]+b[i];
    }
    ll res = LLONG_MAX;
    REP(i,n){
        ll k;
        if(c[i+1]<h){
            k = (i+1) + tim((h-c[i+1]),a[0]);
        }else{
            k = i+1;
        }
        res = min(res,k);
    }
    put(res);
    return 0;
}


Measured memory_bytes: 2560
using System;
using System.Collections.Generic;

namespace abc145_b
{
  class Program
  {
    static void Main(string[] args)
    {
      var n = CIn.ReadInt();
      var s = CIn.Read().ToCharArray();

      if (n % 2 == 1)
      {
        Console.WriteLine("No");
        return;
      }

      for (var i = 0; i < n / 2; i++)
      {
        if (s[i] != s[i + n / 2])
        {
        Console.WriteLine("No");
        return;
        }
      }

      Console.WriteLine("Yes");
    }
  }

  class CIn
  {
    private static readonly Queue<string> fieldBuffer = new Queue<string>();

    public static string Read()
    {
      if (fieldBuffer.Count == 0)
      {
        foreach (var field in Console.ReadLine().Split())
        {
          fieldBuffer.Enqueue(field);
        }
      }
      return fieldBuffer.Dequeue();
    }

    public static int ReadInt() => int.Parse(Read());
    public static long ReadLong() => long.Parse(Read());
    public static double ReadDouble() => double.Parse(Read());

    public static string[] ReadStringArray(long n)
    {
      var array = new string[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = Read();
      }
      return array;
    }

    public static int[] ReadIntArray(long n)
    {
      var array = new int[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadInt();
      }
      return array;
    }

    public static long[] ReadLongArray(long n)
    {
      var array = new long[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadLong();
      }
      return array;
    }

    public static double[] ReadDoubleArray(long n)
    {
      var array = new double[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadDouble();
      }
      return array;
    }
  }
}

Measured memory_bytes: 11220
#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<stack>
#include<queue>
#include<math.h>
using namespace std;
typedef long long ll;
#define int long long
typedef vector<int> VI;
typedef pair<int, int> pii;
typedef vector<pii> VP;
typedef vector<string> VS;
typedef priority_queue<int> PQ;
template<class T>bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; }
#define fore(i,a) for(auto &i:a)
#define REP(i,n) for(int i=0;i<n;i++)
#define eREP(i,n) for(int i=0;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define eFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define SORT(c) sort((c).begin(),(c).end())
#define rSORT(c) sort((c).rbegin(),(c).rend())
#define LB(x,a) lower_bound((x).begin(),(x).end(),(a))
#define UB(x,a) upper_bound((x).begin(),(x).end(),(a))
#define INF 1000000000
#define LLINF 9223372036854775807
#define mod 1000000007
//priority_queue<int,vector<int>, greater<int> > q2;



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

	string S;
	cin >> S;
	REP(i, S.size()) {
		if (i % 2 == 0)cout << S[i];
	}
	cout << endl;
	return 0;
}



Measured memory_bytes: 592
N, S = readlines.map(&:chomp)

def f(s, c)
  [s.chars.inject([0]){|a, x| a << a.last + (x == c ? 1 : -1)}.max, 0].max
end

l = f(S, ')')
r = f(('(' * l + S).reverse, '(')
puts '(' * l + S + ')' * r

Measured memory_bytes: 1788
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(n) begin(n), end(n)
using ll = long long;
using namespace std;

int main(){
	string s;
	cin >> s;
	rep(i, s.size()){
		if(i == 4) cout << " ";
		cout << s[i];
	}
	cout << endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cctype>
#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <numeric>
#include <functional>
#include <cstdlib>
#include <regex>
#include <list>
int main() {
	int a, b, L, P;
	std::cin >> a >> b;
	P = a * b;
	L = (a + b) * 2;
	std::cout << P << " " << L << std::endl;
	return 0;
}


Measured memory_bytes: 3076
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
int main(){
    ll n,c;cin >> n >>c;
    vl d(n),v(n),ad(n),av(n);
    rep(i,n)cin >> d[i] >>v[i];
    vl cl(n),acl(n);
    ll tmp=0;
    rep(i,n){
        tmp+=v[i];
        cl[i]=tmp-d[i];
    }
    tmp=0;
    ad=d;av=v;
    rev(all(ad));rev(all(av));
    rep(i,n){
        ad[i]=c-ad[i];
        tmp+=av[i];
        acl[i]=tmp-ad[i];
    }
    ll ans=0;
    vl x,y;
    x=cl;y=acl;
    chmax(cl[0],(ll)0);chmax(acl[0],(ll)0);
    rep(i,n-1)chmax(cl[i+1],cl[i]);
    rep(i,n-1)chmax(acl[i+1],acl[i]);
    chmax(ans,cl[n-1]);
    chmax(ans,acl[n-1]);
    rep(i,n-1){
        ll t=y[i]-ad[i]+cl[n-i-2];
        chmax(ans,t);
    }
    rep(i,n-1){
        ll t=x[i]-d[i]+acl[n-i-2];
        chmax(ans,t);
    }
    cout << ans <<endl;
}

Measured memory_bytes: 6528
fun main(args: Array<String>) {
    abc138b()
}

fun abc138b() {
    val n = readLine()!!.toInt()
    val aList = readLine()!!.split(" ").map { it.toDouble() }

    val sum = aList.map { 1.toDouble() / it }.sum()

    println(1.toDouble() / sum)
}


Measured memory_bytes: 37808
#include<bits/stdc++.h>
#define int long long

using namespace std;
typedef long long ll;
int n;

struct BIT
{
	ll c[(int)1e6+8];
	int lowbit(int x){return x&-x;}
	void add(int x,int val)
	{
		for(;x<=(int)1e6+5;x+=lowbit(x))
		{
			c[x]+=val;
		}
	}
	int query(int x)
	{
		int ret=0;
		for(;x>0;x-=lowbit(x))
		{
			ret+=c[x];
		}
		return ret;
	}
	void clear()
	{
		memset(c,0,sizeof(c));
	}
}T;

int a[(int)1e5+5];
int s[(int)1e5+5];
signed main()
{
	ios::sync_with_stdio(0);
	
	cin>>n;
	int ans=(n+1)*n/4+1;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i];
	}
	
	int l=0,r=1e9+1;
	while(l<r)
	{
		int m=l+r>>1;
		for(int i=1;i<=n;i++)
		{
			if(a[i]>m)s[i]=-1;else s[i]=1;
		}
		s[0]=0;
		for(int i=1;i<=n;i++)s[i]=s[i-1]+s[i];
		for(int i=0;i<=n;i++)s[i]+=1e5+5;
		T.clear();
		T.add(1e5+5,1);
		int cnt=0;
		for(int i=1;i<=n;i++)
		{
			cnt+=T.query(s[i]-1);
			T.add(s[i],1);
		}
		if(cnt>=ans)r=m;else l=m+1;
	}
	cout<<l;
	return 0;
}

//http://www.cnblogs.com/chy-2003/p/9751361.html

Measured memory_bytes: 9600
var
    n,i,a,b,t,x,y:longint;
begin
    readln(n);
    x:=0; y:=0;
    for i:=1 to n do
    begin
        read(t,a,b);
        if (abs(x-a)+abs(y-b)>t) or (abs(abs(x-a)+abs(y-b)-t) mod 2=1) then
        begin
            writeln('No');
            halt;
        end;
    end;
    writeln('Yes');
end.

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

const int N_MAX = 200001;

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

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

    for (int i = N_MAX-1; i >= 0; i--) {
        if(species[i]==0) {
            species.erase(species.begin()+i);
        }
    }

    sort(species.begin(), species.end(), 
        [](auto kv1, auto kv2) -> bool {return kv1 < kv2;}
    );

    int ret = 0;
    while ( species.size() > k ) {
        ret += species[0];
        species.erase(species.begin());
    }
    printf("%d\n", ret);
    return 0;
}

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

int main()
{
    int a;
    cin >> a;
    cout << pow(a, 3) + pow(a, 2) + a << endl;
    return 0;
}

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

using namespace std;

typedef long long ll;

const int N=1e5+10;
const int MOD=1e9+7;

struct segtree{
    int b[N<<2];
    int lazs[N<<2];

    void lazyupdate(int node,int L,int R){
        if (lazs[node]){
            b[node]=0;
            if (L<R) lazs[node*2]=lazs[node*2+1]=1;
            lazs[node]=0;
        }
    }
    void setzero(int node,int L,int R,int l,int r){
        lazyupdate(node,L,R);
        if (L>r||R<l) return;
        if (l<=L&&R<=r){
            lazs[node]=1;
            lazyupdate(node,L,R);
            return;
        }
        setzero(node*2,L,(L+R)/2,l,r);
        setzero(node*2+1,(L+R)/2+1,R,l,r);
        b[node]=(b[node*2]+b[node*2+1])%MOD;
    }
    void addpos(int node,int L,int R,int pos,int val){
        lazyupdate(node,L,R);
        if (L>pos||R<pos) return;
        if (L==R){
            b[node]=(b[node]+val)%MOD;
            return;
        }
        addpos(node*2,L,(L+R)/2,pos,val);
        addpos(node*2+1,(L+R)/2+1,R,pos,val);
        b[node]=(b[node*2]+b[node*2+1])%MOD;
    }
    int get(int node,int L,int R,int l,int r){
        lazyupdate(node,L,R);
        if (L>r||R<l) return 0;
        if (l<=L&&R<=r) return b[node];
        return (get(node*2,L,(L+R)/2,l,r)+get(node*2+1,(L+R)/2+1,R,l,r))%MOD;
    }
}mseg[2];
int n;
ll tol[2],a[N];
void prepare(){
    cin>>n>>tol[0]>>tol[1];
    for(int i=1;i<=n;i++) cin>>a[i];
}
int solve(){
    a[0]=-ll(1e18);
    for(int i=0;i<=1;i++) mseg[i].addpos(1,0,n,0,1);

    int cur[2]={0,0};
    for(int i=2;i<=n;i++){
        for(int j=0;j<=1;j++)
            while (a[i]-a[cur[j]+1]>=tol[j]) cur[j]++;
        ll add0=mseg[0].get(1,0,n,0,cur[0]);
        ll add1=mseg[1].get(1,0,n,0,cur[1]);
        for(int j=0;j<=1;j++) if (a[i]-a[i-1]<tol[j])
            mseg[j^1].setzero(1,0,n,0,n);
        mseg[1].addpos(1,0,n,i-1,add0);
        mseg[0].addpos(1,0,n,i-1,add1);
    }
    return (mseg[0].b[1]+mseg[1].b[1])%MOD;
}
int main(){
    prepare();
    cout<<solve()<<'\n';
}


Measured memory_bytes: 5248
import sys
import numpy as np

def parse(inp):
    N,A,B,C=map(int,next(inp).split())
    L=[int(next(inp).split()[0]) for _ in range(N)]
        
    return N,[A,B,C],sorted(L,reverse=True)
  
def main(inp):
    N,target,L=inp
    
    pattern=[0 for _ in range(N)]
    
    ans = np.iinfo(np.int32).max
    
    for i in range(27,4**N-6):
        tmp = i
        for j in range(N-1,-1,-1):
#             print(tmp,4**j)
            pattern[j]=int(tmp/(4**j))
            if(tmp >= 4**j): tmp -= int(tmp/(4**j))*4**j
        
        if(pattern.count(1)==0 or pattern.count(2)==0 or \
               pattern.count(3)==0): continue
            
        taketest = [0 for _ in range(3)]
        
        for j in range(N):
            if(pattern[j]==0): continue
            else: taketest[pattern[j]-1] += L[j]
        
        param=0
        for j in range(3):
            param += abs(taketest[j]-target[j]) + 10*(pattern.count(j+1)-1)
        ans = min(ans,param)
        
    return ans
  
print(main(parse(sys.stdin)))

Measured memory_bytes: 14508
def findSumOfDigits(n):
    sum = 0
    while (n > 0):
        sum += n % 10
        n //= 10
    return sum

ans = 0
n, a, b = map(int, input().split())
for i in range(n+1):
    total = findSumOfDigits(i)
    if a <= total <= b:
        ans += i
print(ans)

Measured memory_bytes: 9076
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define FOR(i, a, b) for (int i = a; i < int(b); i++)
#define FOREACH(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); i++)
#define SIZE(v) ((int)(v).size())
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define ll long long
#define pii pair<int, int>

const int MAX = 500100;

vector<int> adj[MAX];
bitset<MAX> visited;

void solve() {
	queue<int> q;
	FOREACH(v, adj[1]) q.push(*v);
	while(!q.empty()) {
		int u = q.front(); q.pop();
		FOREACH(v, adj[u])
			if(*v != 1) visited[*v] = true;
	}
}



int main() {
	int N, M;
	scanf("%d %d", &N, &M);
	REP(i, M) {
		int u, v;
		scanf("%d %d", &u, &v);
		adj[u].pb(v);
		adj[v].pb(u);
	}
	solve();
	if(visited[N]) printf("POSSIBLE\n");
	else printf("IMPOSSIBLE\n");
}

Measured memory_bytes: 19440
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 1e18
int main()
{
	ll n,weight;
	cin>>n>>weight;
	ll w[n],val[n],sum=0;
	for(int i=0;i<n;i++)
	{
		cin>>w[i]>>val[i];
		sum+=val[i];
	}
	ll dp[n+1][sum+1];
	for(int i=0;i<=n;i++)
	dp[i][0]=0;
	for(int j=1;j<=sum;j++)
	dp[0][j]=inf;
	
	for(ll int i=1;i<=n;i++)
	{
		for(ll int j=1;j<=sum;j++)
		{
			if(j-val[i-1]>=0)
			dp[i][j]=min(dp[i-1][j],w[i-1]+dp[i-1][j-val[i-1]]);
			else
			dp[i][j]=min(dp[i-1][j],w[i-1]+dp[i-1][0]);
		}
	}
	ll ans=0;
	for(int i=sum;i>=0;i--)
	{
		if(dp[n][i]<=weight)
		{
			ans=i;
			break;
		}
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 79104
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScan in = new MyScan(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, MyScan in, PrintWriter out) {
            int n = in.nextInt();
            if (n == 3) {
                out.println("2 5 63");
                return;
            }

            out.print(" 2 4 3 9 ");
            n -= 4;


            for (int r = 21; r <= 30000 && n > 1; r += 12) {
                out.print(r + " ");
                out.print((r - 6) + " ");
                n -= 2;
            }


            for (int r = 10; r <= 30000 && n > 1; r += 6) {
                out.print(r + " ");
                out.print((r - 2) + " ");
                n -= 2;
            }

            for (int s = 6; s <= 30000 && n > 0; s += 6) {
                out.print(s + " ");
                n -= 1;
            }


        }

    }

    static class MyScan {
        private final InputStream in;
        private byte[] inbuf = new byte[1024];
        public int lenbuf = 0;
        public int ptrbuf = 0;

        public MyScan(InputStream in) {
            this.in = in;
        }

        private int readByte() {
            if (lenbuf == -1) throw new InputMismatchException();
            if (ptrbuf >= lenbuf) {
                ptrbuf = 0;
                try {
                    lenbuf = in.read(inbuf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (lenbuf <= 0) return -1;
            }
            return inbuf[ptrbuf++];
        }

        public int nextInt() {
            int num = 0, b;
            boolean minus = false;
            while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) ;
            if (b == '-') {
                minus = true;
                b = readByte();
            }

            while (true) {
                if (b >= '0' && b <= '9') {
                    num = num * 10 + (b - '0');
                } else {
                    return minus ? -num : num;
                }
                b = readByte();
            }
        }

    }
}



Measured memory_bytes: 25684
N, M = map(int, input().split())
if M == 0:
  print(0, 0)
else:
  pS = [list(input().split()) for i in range(M)]

  for i in range(M):
    pS[i][0] = int(pS[i][0])

  listWA = [0 for i in range(N)]
  listAC = [0 for i in range(N)]
  
  for j in range(M):
    if listAC[pS[j][0] - 1] < 1:
      if pS[j][1] == "AC":
        listAC[pS[j][0] - 1] = 1
      else:
        listWA[pS[j][0] - 1] += 1
  
  for i in range(N):
    if listAC[i] < 1:
      listWA[i] = 0
  
  
  print(sum(listAC), sum(listWA))

Measured memory_bytes: 30788
def judge(num):
	if num%2:
		return True
	else:
		if not num%3 or not num%5:
			return True
	return False

def solve(li):
	for i in li:
		if not judge(i):
			print('DENIED')
			return 
	print('APPROVED')
	
input()
li = list(map(int,input().split()))
solve(li)

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_int.hpp>
//typedef boost::multiprecision::cpp_int ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
////////////////////////////

int main(){
    ll a,b,k;cin>>a>>b>>k;
    ll aa=max(0,a-k);
    ll bb=b;
    if(a-k<0){
        bb=max(0,b-(k-a));
    }
    cout<<aa<<' '<<bb<<endl;
    
    return 0;
}



Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
    int h,a;
    int c = 0;
    
    scanf("%d %d",&h,&a);
    
    while (h > 0){
        h = h-a;
        c++;
    }
    
    printf("%d\n",c);
    
    return 0;
}


Measured memory_bytes: 128
#include<stdio.h>
#include<stdlib.h>

struct node{
  struct node *right;
  struct node *left;
  struct node *parent;
  int key;
};

typedef struct node * Node;

#define NIL NULL

Node root;

void ins(int);
void ino(Node);
void pre(Node);

int main(){
  int k,i,x;
  char c[20];
  scanf("%d",&k);

  for(i = 0 ; i < k ; i++ ){

    scanf("%s", c);

    if(c[0] == 'i'){

      scanf("%d", &x);
      ins(x);

    }

    else if (c[0] == 'p'){
      ino(root);
      printf("\n");
      pre(root);
      printf("\n");
    }
  }

  return 0;
}
void ins(int k){
  Node y = NIL;
  Node x = root;
  Node z;

  z = (Node)malloc(sizeof(struct node));
  z->key = k;
  z->left = NIL;
  z->right = NIL;

  while(x != NIL){
    y = x;
    if(z->key < x->key)
      x = x->left;
    else
      x = x->right;
  }
  z->parent = y;
  if(y == NIL)
    root = z;
  else if(z->key < y->key)
    y->left = z;
  else
    y->right = z;

}

void ino(Node u){

  if(u->left != NIL)

    ino(u->left);

  printf(" %d",u->key);

  if(u->right != NIL)

    ino(u->right);

}

void pre(Node u)
{

  printf(" %d",u->key);

  if(u->left != NIL)

    pre(u->left);

  if(u->right != NIL)

    pre(u->right);

}

Measured memory_bytes: 24040
#include <math.h>
# include <iostream>

using namespace std; 
  
int main() 
{ 
	bool answer = false;
	long long int num;
	num = 0;
	cin >> num;
	float temp = sqrt(num);
	int base = temp;
	base++;
	long long int a, b;
	a = 0, b = 0;
	
	while( answer == false && base != 0 ) {
		if ( num % base == 0 ) {
			answer = true;
			a = base;
			b = num / base;
		} // if
		
		else {
			base--;
		} // else
	} // while
  
  	cout << a+b-2;
} // main()

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define ll long long
#define _GLIBCXX_DEBUG
const ll MOD = 1000000007;
const int MAX = 510000;

int main() {
  int H, W;
  cin >> H >> W;
  vector<vector<char>> a(H, vector<char>(W));
  for (int i=0; i<H; i++) {
    for (int j=0; j<W; j++) cin >> a[i][j];
  }
  vector<int> memo_line, memo_column;
  // 黒いマスが存在する行と列
  for (int i=0; i<H; i++) {
    for (int j=0; j<W; j++) {
      if (a[i][j]=='#') {
        memo_line.push_back(i);
        memo_column.push_back(j);
      }
    }
  }
  sort(memo_line.begin(), memo_line.end());
  sort(memo_column.begin(), memo_column.end());
  memo_line.erase(unique(memo_line.begin(), memo_line.end()), memo_line.end());
  memo_column.erase(unique(memo_column.begin(), memo_column.end()), memo_column.end());
  for (int i=0; i<memo_line.size(); i++) {
    for (int j=0; j<memo_column.size(); j++) {
      if (j==memo_column.size()-1) cout << a[memo_line[i]][memo_column[j]] << endl;
      else cout << a[memo_line[i]][memo_column[j]];
    }
  }
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
#define qtr ios::sync_with_stdio(0); cin.tie(0);
#define int long long
using namespace std;

int32_t main(){ qtr	
	int n;
	cin >> n;
	vector<int> vec(n);
	for(int i = 0; i < n; i++){
		cin >> vec[i];
	}
	vector<int> dp(n);
	dp[0] = 0;
	for(int i = 1; i < n; i++){
		int a = dp[i-1];
		int b = i - 2 >= 0 ? dp[i-2] : INT_MAX;
		dp[i] = min(a + abs(vec[i-1] - vec[i]), b + abs(vec[i-2] - vec[i]));
	}
	cout << dp[n-1] << endl;
}

Measured memory_bytes: 4736
#include<iostream>
#include<algorithm>
#include<queue>
#include<string>
#include<unordered_map>
using namespace std;
using ll = long long;
int main(){
    int N;
    cin >> N;
    int A[220];
    int ans = 100000;
    for(int i = 1;i <= N;i++){
        cin >> A[i];
        int count = 0;
        while(A[i] % 2 == 0){
            A[i] /= 2;
            count++;
        }
        if(count < ans)ans = count;
    }
    cout << ans;
}


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

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

int N;
int cnt[111];

signed main(){
    cin>>N;
    for(int i=1;i<=N;i++){
        int n=i;
        for(int j=2;j<=n;j++){
            while(n%j==0){
                cnt[j]++;
                n/=j;
            }
        }
    }

    vint dp(100);
    dp[1]=1;
    rep(i,111){
        vint dp2(100);
        rep(j,100){
            rep(k,cnt[i]+1){
                if(j*(k+1)>=100)continue;
                dp2[j*(k+1)]+=dp[j];
            }
        }
        dp=dp2;
    }
    cout<<dp[75]<<endl;
    return 0;
}


Measured memory_bytes: 256
package main

import (
	"bufio"
	"fmt"
	basicIO "io"
	"os"
	"sort"
	"strconv"
)

type Element struct {
	sum int
	x   int
	y   int
	z   int
}

func main() {
	protagonist(os.Stdin, os.Stdout)
}

func protagonist(r basicIO.Reader, w basicIO.Writer) {
	io := NewIO(r, w)
	X := io.nextInt()
	Y := io.nextInt()
	Z := io.nextInt()
	K := io.nextInt()

	var arrx, arry, arrz []int
	for i := 0; i < X; i++ {
		arrx = append(arrx, io.nextInt())
	}
	for i := 0; i < Y; i++ {
		arry = append(arry, io.nextInt())
	}
	for i := 0; i < Z; i++ {
		arrz = append(arrz, io.nextInt())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(arrx)))
	sort.Sort(sort.Reverse(sort.IntSlice(arry)))
	sort.Sort(sort.Reverse(sort.IntSlice(arrz)))

	var pool []Element
	pool = append(pool, Element{arrx[0] + arry[0] + arrz[0], 0, 0, 0})

	for i := 0; i < K; i++ {
		maxNum := 0
		for j, _ := range pool {
			if pool[maxNum].sum < pool[j].sum {
				maxNum = j
			}
		}
		io.PutInt(pool[maxNum].sum)

		x := pool[maxNum].x
		y := pool[maxNum].y
		z := pool[maxNum].z

		hasx := false
		hasy := false
		hasz := false
		for _, e := range pool {
			if e.x == x+1 && e.y == y && e.z == z {
				hasx = true
			} else if e.x == x && e.y == y+1 && e.z == z {
				hasy = true
			} else if e.x == x && e.y == y && e.z == z+1 {
				hasz = true
			}
		}
		if !hasx && x < X-1 {
			pool = append(pool, Element{arrx[x+1] + arry[y] + arrz[z], x + 1, y, z})
		}
		if !hasy && y < Y-1 {
			pool = append(pool, Element{arrx[x] + arry[y+1] + arrz[z], x, y + 1, z})
		}
		if !hasz && z < Z-1 {
			pool = append(pool, Element{arrx[x] + arry[y] + arrz[z+1], x, y, z + 1})
		}

		pool = unset(pool, maxNum)
	}

}

type IO struct {
	Scanner *bufio.Scanner
	Writer  basicIO.Writer
}

func NewIO(r basicIO.Reader, w basicIO.Writer) *IO {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	return &IO{
		Scanner: s,
		Writer:  w,
	}
}

func (io *IO) nextString() string {
	io.Scanner.Scan()
	return io.Scanner.Text()
}

func (io *IO) nextInt() int {
	io.Scanner.Scan()
	i, _ := strconv.Atoi(io.Scanner.Text())
	return i
}

func (io *IO) PutInt(v int) {
	fmt.Fprintf(io.Writer, "%d\n", v)
}

func (io *IO) PutString(s string) {
	fmt.Fprintf(io.Writer, "%s\n", s)
}

func unset(s []Element, i int) []Element {
	if i >= len(s) {
		return s
	}
	return append(s[:i], s[i+1:]...)
}


Measured memory_bytes: 1408
#include<iostream>
using namespace std;
#define ll long long

int main() {
	ll a, b, x, f_a, f_b;
	cin >> a >> b >> x;
	f_a = 0; f_b = 0;
	if (a % x == 0) {
		f_a = 1;
	}
	if (b %x == 0) {
		f_b = 1;
	}

	a /= x;
	b /= x;
	cout << b - a + f_a << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define rrep(i,a) for(int i=(int)a-1;i>=0;--i)
#define REP(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RREP(i,a,b) for(int i=(int)a-1;i>=b;--i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
typedef std::vector<int> vi;
typedef std::vector<std::vector<int>> vvi;
typedef std::vector<long long> vl;
typedef std::vector<std::vector<long long>> vvl;
#define out(x) cout<<x<<"\n";
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

ll gcd(ll n, ll m) {
    ll tmp;
    while (m!=0) {
        tmp = n % m;
        n = m;
        m = tmp;
    }
    return n;
}

ll lcm(ll n, ll m) {
    return abs(n) / gcd(n, m)*abs(m);//gl=xy
}
 
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;
}
 
using namespace std;

vector<ll>ans;

void dfs(int v,string s){
  if(s.size()>10)return;
  ans.pb(stoll(s));
  rep(i,10){
    if(abs(s.back()-char(i+'0'))<=1)dfs(v+1,s+to_string(i));
  }
}

void solve(){
  ll n;
  cin>>n;
  rep(i,9){
    dfs(0,to_string(i+1));
  }
  sort(all(ans));
  cout<<ans[n-1];
}


int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(15);
    solve();
    return 0;
}


Measured memory_bytes: 2420
import java.util.*;

public class Main {
 	 static Scanner sc = new Scanner(System.in);
 	 public static void main(String[] args){
       int N = sc.nextInt(); 
       int K = sc.nextInt();
       int p[] = new int[N];
       
       for(int i=0;i<N;i++) {
       		p[i] = sc.nextInt();
       }
       Arrays.sort(p);
       int a=0;
       for(int i=0;i<K;i++) {
       	a += p[i];
       }
       System.out.println(a);
     }
}   

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

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a); i > (b); --i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, a) for (auto &(x) : (a))
#define VECCIN(x)            \
	for (auto &youso_ : (x)) \
	cin >> youso_
#define mp make_pair
#define All(a) (a).begin(), (a).end()
template <typename T = long long>
inline T IN()
{
	T x;
	cin >> x;
	return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail)
{
	cin >> head;
	CIN(move(tail)...);
}
#define CINT(...)    \
	int __VA_ARGS__; \
	CIN(__VA_ARGS__)
#define LCIN(...)   \
	ll __VA_ARGS__; \
	CIN(__VA_ARGS__)
#define SCIN(...)       \
	string __VA_ARGS__; \
	CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"

typedef long long ll;
typedef vector<int> V;
typedef vector<ll> VL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
typedef priority_queue<int> PQ;
typedef priority_queue<int, V, greater<int>> PQG;

const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;

int N, K;
string S;
int cnt;
char pre;
bool bias;

int main()
{
	cin >> N >> K;
	cin >> S;
	if (S[0] == '0')
	{
		S = "1" + S;
		N++;
		bias = true;
	}
	int l = 0, r = 0, len = 0;
	while (l < N)
	{
		if (S[l] != '1' || (l != 0 && S[l - 1] == '1'))
		{
			l++;
			continue;
		}
		while (r < N)
		{
			if (S[r] == '0' && pre == '1')
			{
				cnt++;
				if (cnt > K)
					break;
			}
			pre = S[r++];
		}
		if (l == 0 && bias)
		{
			len = max(len, r - l - 1);
		}
		else
		{
			len = max(len, r - l);
		}
		l++;
		cnt -= 2;
	}
	cout << len << "\n";
	return 0;
}

Measured memory_bytes: 512