akhauriyash/Code-Regression huggingface dataset:
#include<stdio.h>
int main(void){
	int t,n,i;
	for(i=0;i<4;i++){
		scanf("%d %d",&t,&n);
		if(t==1) printf("%d\n",n*6000);
		else if(t==2) printf("%d\n",n*4000);
		else if(t==3) printf("%d\n",n*3000);
		else  printf("%d\n",n*2000);
	}
	return 0;
}

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

int main(){
    int x, y;
cin >> x >> y;
if (x > y){
    cout << "a > b" << endl;    
} else if (x < y) {
    cout << "a < b" << endl;
} else {
       cout << "a == b" << endl;
}
return 0;
}


Measured memory_bytes: 3072
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <complex>
typedef long long int LL;
typedef unsigned long long int ULL;
using namespace std;

// 插入此處

int main() {
    LL n, k;
    scanf("%lld%lld", &n, &k);
    LL r = n % k;
    printf("%lld\n", min(r, k - r));
}


Measured memory_bytes: 888
#include <bits/stdc++.h>
using namespace std;
int main(){
  int h,w,count;
  cin >> h >> w;
  vector<vector<char>> s(h+2,vector<char>(w+2));
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
      cin >> s[i+1][j+1];
    }
  }
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      count = 0;
      if(s[i][j]=='.'){
        if(s[i-1][j-1]=='#'){
          count++;
        }
        if(s[i-1][j]=='#'){
          count++;
        }
        if(s[i-1][j+1]=='#'){
          count++;
        }
        if(s[i][j-1]=='#'){
          count++;
        }
        if(s[i][j]=='#'){
          count++;
        }
        if(s[i][j+1]=='#'){
          count++;
        }
        if(s[i+1][j-1]=='#'){
          count++;
        }
        if(s[i+1][j]=='#'){
          count++;
        }
        if(s[i+1][j+1]=='#'){
          count++;
        }
        s[i][j]=char(count + '0');
      }  
    }
  }
  for(int i=1;i<h+1;i++){
    for(int j=1;j<w+1;j++){
      cout << s[i][j] ;
    }
    cout << endl;
  }
}

Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include<math.h>
#include<list>
#include <algorithm>
#include<set>
#include<vector>
#include<math.h>
#include<map>
#include<string>
#include <numeric>
#include <queue>
#include <sstream>
#include<stack>

using namespace std;
using ll = long long;
using vll = vector<long long>;
using sll = set<long long>;

template<typename T>
T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }
template<typename T>
T lcm(T a, T b) { return a / gcd(a, b) * b; }

template<typename T>
map<T, T> primeFactor(T n) {
	map<T, T> res;
	for (T i = 2; i * i <= n; ++i) {
		while (n % i == 0) {
			res[i] ++;
			n /= i;
		}
	}
	if (n != 1) res[n] = 1;
	return res;
}

template<typename T>
bool IsPrimeNumber(T num)
{
	if (num <= 2) return true;
	else if (num % 2 == 0) return false;

	double sqrtNum = sqrt(num);
	for (int i = 3; i <= sqrtNum; i += 2)
	{
		if (num % i == 0)
		{
			return false;
		}
	}

	return true;
}


#define in(x) cin >> x
#define out(x) cout << x
#define outn(x) cout << x << '\n'
#define outs(x) cout << x << ' '
#define rep(i,s,e) for(long i=s;i<e;i++)
#define repeq(i,s,e) for(long i=s;i<=e;i++)



void func(vector<vll> &r, vll &s, ll & sCnt ,vll &a,vll &b) {
	rep(i, 0, a.size()) {
		bool flg = false;
		if (a[i] == s[sCnt - 1]) {
			s[sCnt] = b[i];
			flg = true;
		}
		else if(b[i] == s[sCnt - 1]){
			s[sCnt] = a[i];
			flg = true;
		}
		if (flg) {
			sCnt++;
			a.erase(a.begin() + i);
			b.erase(b.begin() + i);
			i--;
			func(r, s, sCnt, a, b);
		}
	}
	rep(i, 0, sCnt) {
		r[s[i]].push_back(s[sCnt - 1]);
	}

	sCnt--;
}

int main() {

	ll n, ans = 0, cnt = 0, x;
	in(n);

	vll a(n);
	rep(i, 0, n) {
		in(a[i]);
	}

	sort(a.begin(), a.end());
	x = a[0];
	rep(i, 0, n) {
		if (a[i] != x) {
			if (cnt != x) {
				ans += cnt > x ? cnt - x : cnt;
			}
			x++;
			i--;
			cnt = 0;
		}
		else {
			cnt++;
		}
	}

	if (cnt != x) {
		ans += cnt > x ? cnt - x : cnt;
	}

	outn(ans);

	return 0;

}


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

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

    int k;
    k = abs(a - b) + abs(b - c);
    if (min > k) min = k;
    k = abs(a - c) + abs(c - b);
    if (min > k) min = k;
    k = abs(b - a) + abs(a - c);
    if (min > k) min = k;
    k = abs(b - c) + abs(c - a);
    if (min > k) min = k;
    k = abs(c - a) + abs(a - b);
    if (min > k) min = k;
    k = abs(c - b) + abs(b - a);

    cout << min << endl;

    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'

using namespace std;

main()
{
    fast;
    int a,b,c,x,i,j,k;
    cin>>a>>b>>c>>x;
    int ans=0;
    for (i=0;i<=a;i++)
    {
        for (j=0;j<=b;j++)
        {
            for (k=0;k<=c;k++)
            {
                if ((500*i+100*j+50*k)==x)
                    ans++;
            }
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
 
 int main(void)
{
  char str1[] = "S";
  char str2[] = "hi";
  char str3[] = "hihi";
  char str4[] = "hihihi";
  char str5[] = "hihihihi";
  char str6[] = "hihihihihi";
  
  scanf("%s",str1);
  
  if((strcmp(str1,str2) == 0)
    ||(strcmp(str1,str3) == 0)
    ||(strcmp(str1,str4) == 0)
    ||(strcmp(str1,str5) == 0)
    ||(strcmp(str1,str6) == 0)) {
    printf("Yes");
  } else {
    printf("No");
  }
  
    return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
static const int MAX = 10000; 
int n;
vector<pair<int, int>> adj[MAX];
void dij(){
	priority_queue<pair<int,int>> que;
	int d[MAX],color[MAX];
	for(int i = 0;i < n;i++){
		d[i] = INT_MAX;
		color[i] = 0;
	}
	d[0] = 0;
	que.push(make_pair(0,0));
	color[0] = 1;
	while(!que.empty()){
		pair<int,int> f = que.top();
		que.pop();
		int u = f.second;
		color[u] = 2;
		if(d[u] < f.first * (-1))continue;
		for(int j = 0;j <  adj[u].size();j++){
			int v = adj[u][j].first;
			if(color[v] == 2)continue;
			if(d[v] > d[u] + adj[u][j].second){
				d[v] = d[u] + adj[u][j].second;
				que.push(make_pair(d[v]*(-1),v));
				color[v] = 1;
			}
		}
	}
	for(int i = 0;i < n;i++){
		cout << i << " " << (d[i] == INT_MAX ? -1 : d[i]) << endl;
	}
}
int main(){
	cin >> n;
	int k, c, u,v;
	for(int i = 0;i < n;i++){
		cin >> u >> k;
		for(int j = 0;j < k;j++){
			cin >> v >> c;
			adj[u].push_back(make_pair(v,c));
		}
	}
	dij();
}


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

namespace AOJ0075
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (var fat in from student in ReadInput()
                                let bmi = student.Weight / student.Height / student.Height
                                where bmi >= 25
                                orderby student.Id
                                select student.Id)
            {
                Console.WriteLine(fat);
            }
        }

        private static IEnumerable<Student> ReadInput()
        {
            string line;
            while ((line = Console.ReadLine()) != null)
            {
                var values = line.Split(',');

                var id = int.Parse(values[0]);
                var weight = double.Parse(values[1]);
                var height = double.Parse(values[2]);

                yield return new Student(id, weight, height);
            }
        }
    }

    public class Student
    {
        public int Id { get; private set; }
        public double Weight { get; private set; }
        public double Height { get; private set; }

        public Student(int id, double weight, double height)
        {
            Id = id;
            Weight = weight;
            Height = height;
        }
    }
}

Measured memory_bytes: 6500
#include<stdio.h>
int main(void) {
	char n[100000];
	scanf("%s", n);
	//printf("%d", n[0]-48);
	int ans = 0;
	for (int i = 0; n[i] != '\0'; i++) {
		ans += (int)n[i] - 48;
	}
	if (ans == 1) {
		ans = 10;
	}
	printf("%d\n", ans);
	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
 
int main() {

    string S;
    cin >> S;
    int count = 0;
    int max = 0;

    for(int i = 0; i < 3; i++){
        if(S.at(i) == 'R'){
            count++;
        }else{
            if(max < count){
            max = count;
            }
        count = 0;
        }
    }

    if(max < count){
        max = count;
    }

    cout << max << endl;

}

Measured memory_bytes: 3592
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <numeric>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <climits>
#include <cmath>
#include <cstring>
#include <cassert>
#include <chrono>
#include <random>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
using namespace std;

#define pb push_back
#define fst first
#define snd second

#ifdef QLEG_DEBUG
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) { os << '{'; string sep; for (const auto& x : v) os << sep << x, sep = ", "; return os << '}'; }
template<typename A, typename B> ostream& operator<<(ostream& os, const pair<A, B>& p) { return os << '(' << p.first << ", " << p.second << ')'; }
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }

#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif

using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll, ll>;
template<typename T> using min_queue=priority_queue<T,vector<T>,greater<T>>;

constexpr ll MOD = 998244353;


template<typename T>
struct BIT {
  int N;
  vector<T> bit;

  BIT(int sz) : N(sz), bit(sz+1) { }

  inline void update(int ix,T v){
    assert(ix >= 0);
    assert(ix < N);
    v %= MOD;
    if (v < 0) v += MOD;
    ix++;
    for(;ix<=N;ix+=ix&-ix) bit[ix] = bit[ix]+v;
  }

  // queries the interval [0, ix)
  inline T query(int ix){
    assert(ix >= 0);
    assert(ix <= N);
    T res=0;
    for(;ix;ix-=ix&-ix) res = (res + bit[ix])%MOD;
    return res;
  }

  // Find least k such that query(k)>=v
  // Only works if array elements are nondecreasing
  inline int lbound(T v){
    if(v<=0) return 0;
    int lg = 31 - __builtin_clz(N);
    int k = 0;
    for (int i = lg; i >= 0; i--) {
      T x = bit[k + (1<<i)];
      if (v > x) {
        v -= x;
        k += 1<<i;
      }
    }
    return k+1;
  }
};

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

  int N, K; cin>>N>>K;
  vector<int> l(K), r(K);
  for (int i=0;i<K;i++) cin>>l[i]>>r[i];

  vector<ll> dp(N+1);
  BIT<ll> bit(N+1);
  bit.update(1, 1);
  for (int k = 2;k <= N;k++) {
    for (int i=0;i<K;i++) {
      int l0 = k - r[i], r0 = k - l[i];
      l0 = max(l0, 1);
      if (l0 <= r0) {
        bit.update(k, bit.query(r0+1) - bit.query(l0));
      }
    }
  }
  ll res = bit.query(N+1) - bit.query(N);
  if (res < 0) res += MOD;
  cout << res << '\n';
}


Measured memory_bytes: 6356
#include<bits/stdc++.h>
using namespace std;
#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
#define sz(x) ((int)(x).size())
using ll=long long;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define MOD  1000000007
const ll INF=1e18;
template<class T>void show(vector<T>v){for (int i = 0; i < v.size(); i++){cerr<<v[i]<<" ";}cerr<<endl;}
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(int argc, char const *argv[]) {
  int n;
  cin >> n;
  vector<ll> a(n);
  rep(i,n) cin >> a[i];
  long long ans = 0;
  ll MaxNum = 0;
  for (int i = 0; i < n; i++)
    {
        MaxNum = max(MaxNum, a[i]);
        int Bi = MaxNum;
        ans += Bi - a[i];
    }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 4756
#include<stdio.h>

int main(void){
  long long a , b , c;
  scanf("%lld %lld %lld",&a ,&b ,&c);

  long long a1 , b1 , c1;
  
  int flag = 0 , count = 0;

  if(a%2 + b%2 + c%2 != 0){
    count = 0;
    flag = 1;
  }

  else if(a == b){
    if(a == c){
      count = -1;
  	}
  }
  
  else {
    while(flag == 0){
    a1 = b/2 + c/2;
    b1 = a/2 + c/2;
    c1 = a/2 + b/2;
    count ++;
    if(a1%2 + b1%2 + c1%2 == 0){
      a = a1;
      b = b1;
      c = c1;
    }

    else{
      	flag = 1;
    	}
  	}
  }

  printf("%d",count);

  return 0;
}

Measured memory_bytes: 1716
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int tmp = sc.nextInt();
        while(tmp>0) {
            if(tmp%10==7) {
                System.out.println("Yes");
                return;
            }
            tmp/=10;
        }
        System.out.println("No");
//        System.out.println(String.format("%d", tmp));
    }
}


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

int main(){
    int n;
    cin >> n;
    vector<int> a(n), b(n);
    vector<bool> v(n+1, 0);
    for(int i = 0; i < n; i++)  cin >> a[i];
    for(int i = 0; i < n; i++)  cin >> b[i], v[b[i]] = true;
    int val = -1;
    for(int i = 1; i <= n; i++){
        if(!v[i]){
            val = i;
            break;
        }
    }
    if(val == -1){
        cout << "Yes" << endl;
        return 0;
    }
    vector<int> c(n), d(n);
    for(int i = 0; i < n; i++){
        c[i] = i+1;
        if(a[i] == val) d[i] = (i+1)%n+1;
        else            d[i] = i+1;
    }
    cout << "No" << endl;
    for(int i = 0; i < n; i++)  cout << c[i] << " \n"[i+1==n];
    for(int i = 0; i < n; i++)  cout << d[i] << " \n"[i+1==n];
    return 0;
}


Measured memory_bytes: 4408
#include <bits/stdc++.h>
#include <algorithm>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define ll long long 
#define pb push_back
#define mk make_pair
#define mod 1000000007
#define endl "\n"
using namespace std;

ll gcd(ll a, ll b){
    return __gcd(a,b);
}

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

bool isPrime(ll n){
    if(n <= 1) return false;
    for(ll i=2; i<=sqrt(n); i++){
        if(n%i == 0){
            return false;
        }
    }
    return true;
}

void solve(){
  ll n;
  cin >> n;
  if(n >= 30) cout << "Yes" << endl;
  else  cout << "No" << endl;
}

int main() {
    fast;
    solve();
	//ll t; cin >> t; while(t--){ solve(); }
	return 0;
}


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

int main(){
    char c;
    cin >> c;
    if (c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o') {
        cout << "vowel" << endl;
    } else {
        cout << "consonant" << endl;
    }
    return 0;
}

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

int main() {
    int n, k;
    cin >> n >> k;

    long long ans = 0;
    
    for(int i = 1; i <= n; i++) {
        ans += n / i * max(0, i - k) + max(0, n % i - k + 1);
        if(k == 0) ans--;
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.*;

public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int P = Integer.parseInt(tokens[0]);
		int Q = Integer.parseInt(tokens[1]);
		int R = Integer.parseInt(tokens[2]);
		
		List<Integer> list = new ArrayList<>();
		list.add(P);
		list.add(Q);
		list.add(R);
		Collections.sort(list);
		System.out.println((list.get(0)+list.get(1)));
	}

}


Measured memory_bytes: 20692
#include<iostream>
#include<string>
using namespace std;
int main() {
	int H, W;
	cin >> H >> W;
    char S[101][101];
	int A[101];
	int B[101];
	for (int i = 0; i < 101; ++i) {
		A[i] = 0;
		B[i] = 0;
	}
	for (int i = 0; i < H; ++i) {
		for (int j = 0; j < W; ++j) {
			cin >> S[i][j];
			if (S[i][j] == '#') {
				A[i] = 1;
				B[j] = 1;
			}
		}
	}
	for (int i = 0; i < H; ++i) {
		if (A[i]) {
			for (int j = 0; j < W; ++j) {
				if (B[j]) {
					cout << S[i][j];
				}
			}
			cout << endl;
		}
	}
	return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;
import java.util.Arrays;

public class Main {

	static Scanner s = new Scanner(System.in);

	public static void main(String[] args) {
		int N = s.nextInt();
		int[] numArr = new int[100003];

		for (int i = 0; i < N; i++) {
			int j = Integer.parseInt(s.next())+1;
			numArr[j]++;
			numArr[j - 1]++;
			numArr[j + 1]++;
		}

		Arrays.sort(numArr);

		System.out.println(numArr[100002]);
	}
}

Measured memory_bytes: 49928
fn solve() -> &'static str {
    let n = readln();
    let mut t = 0;
    let mut p = (0, 0);
    for _ in 0..n {
        let (nt, nx, ny): (i64, i64, i64) = readln();
        let (x, y) = p;
        let d = (nx - x).abs() + (ny - y).abs();
        let l = (nt - t);
        if d > l {
            return "No";
        }
        let rest = l - d;
        if rest % 2 != 0 {
            return "No";
        }
    }
    "Yes"
}
fn main() {
    let ans = solve();
    println!("{}", ans);
}

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::HashSet;

pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);


Measured memory_bytes: 4352
#include<bits/stdc++.h>
using namespace std;
int main(){
  int X, N;
  cin >> X >> N;
  set<int> S;
  for(int i=0; i<N; i++){
    int x;
    cin >> x;
    S.insert(x);
  }
  int cnt = 0;
  while(true){
    if(!S.count(X-cnt)){
      cout << X - cnt << endl;
      break;
    }
    else if(!S.count(X+cnt)){
      cout << X + cnt << endl;
      break;
    }
    cnt++;
  }
}

Measured memory_bytes: 3592
#include <bits/stdc++.h>
#define PI 3.1415926535897932
#define _GLIBCXX_DEBUG
using namespace std;
int main() {
  
  int W,a,b;
  cin>>W>>a>>b;
  
  int ans=0;
  
  
  if(b>a+W){
    ans=b-(a+W);
  }
  else if(b+W<a){
    ans=a-(b+W);
  }
  
  cout<<ans<<endl;
}


Measured memory_bytes: 3576
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int main(void)
{	
	char s[101],t[101],wk;
	int n,n2,i,j;
	bool flg=false;
	cin>>s>>t;
	n=strlen(s);
	for(j=0;j<n;j++){
		wk=t[n-1];
		for(i=n-1;i>0;i--){
			t[i]=t[i-1];
		}
		t[0]=wk;
		if(strcmp(s,t)==0){
			flg=true;
			break;
		}
	}
	cout<<((flg)?"Yes":"No")<<endl;
	return 0;
}

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

// 素因数分解した時の素因数と個数
map <ll,ll> nump;

map< int64_t, int > prime_factor(int64_t n) {
  map< int64_t, int > ret;
  for(int64_t i = 2; i * i <= n; i++) {
    while(n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if(n != 1) ret[n] = 1;
  return ret;
}

ll num(ll m){
    ll res = 0;
    for(auto p : nump){
        if(p.second >= m - 1){
            res ++;
        }
    }
    return res;
}

int main(){
    ll N;
    cin >> N;
    for(int i=2;i<=N;++i){
        for(auto p : prime_factor(i)){
            nump[p.first] += p.second;
        }
    }
    ll ans = (num(75) + num(25) * (num(3) - 1) + num(15) * (num(5) - 1) + num(5) * (num(5) - 1) * (num(3) - 2) / 2);
    cout << ans << endl;
}

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

int main(){
    int num = 1001;
    string s;
    cin >> s;

    for(int i = 0; i < s.length() - 1; i++){
        int sub;
        string a;
        a = s.substr(i, 3);
        sub = abs(753 - stoi(a));
        num = min(num, sub);
    }
    cout << num << endl;
    return 0;
}

Measured memory_bytes: 256
module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r=n(1);n(2)(r.readFileSync("/dev/stdin","utf8"))},function(t,e){t.exports=require("fs")},function(t,e,n){"use strict";var r=n(3),i=n(5);t.exports=function(t){var e=new r(t);i(e)}},function(t,e,n){"use strict";var r=n(4);t.exports=class{constructor(t){var e=t.trim().split(/\s+/g);this.inp=new r(e)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(t,e,n){"use strict";t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=t.length,this.items=t,this.ind=0}enq(t){this.size+=1,this.items.push(t)}deq(){var t=this.items[this.ind];return this.size-=1,this.ind+=1,t}clear(){this.items=[],this.size=0,this.ind=0}}},function(t,e,n){"use strict";t.exports=function(t){t.in()+t.in()+t.in()>=22?console.log("bust"):console.log("win")}}]);


Measured memory_bytes: 7372
#include "bits/stdc++.h"
 
using namespace std;
 
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;
 
#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back
 
 
 
int main(){
   int n;
   while(cin>>n){
       if(n==-1)break;
        
       long double seta=0;
       for(int i=1;i<n;i++){
           seta+=atan(1.0/sqrt(i));
           while(seta>=2*M_PI)seta-=2*M_PI;
       }
       double l=sqrt(n);
        
       printf("%.20Lf\n",l*cos(seta));
       printf("%.20Lf\n",l*sin(seta));
 
        
   }
    
   return 0;
}

Measured memory_bytes: 1252
#include <bits/stdc++.h>
using namespace std;
int main(void){
    long long N,M;
    cin >> N >> M;
    vector<long long> A(N),B(N);
    vector<pair<long long,long long>> P(N);
    for(int i = 0; i < N; i++){
        cin >> A[i] >> B[i];
        P[i] = make_pair(A[i],B[i]);
    }
    sort(P.begin(),P.end());
    long long ans = 0;
    int i = 0;
    while(M > 0){
        if(P[i].second <= M){
            M -= P[i].second;
            ans += P[i].first*P[i].second;
        }
        else{
            ans += P[i].first*M;
            M = 0;
        }
        i++;
    }
    cout << ans << endl;
}


Measured memory_bytes: 3328
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
typedef long long ll;
const int maxn = 100005;
typedef pair<ll, ll>par;
const ll mod = 1e9+7;

double pi = acos(-1);
int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(0);
    #ifdef acm
    freopen("a.in", "r",stdin);
    #endif // acm

    int a, b, h, m;
    cin >> a >> b >> h >> m;

    h *= 5;

    h *= 6;

    double hh = h + m/2.0;
    m *= 6;
    double mm = m;
    double d =  ( max(hh, mm) - min(hh, mm) ) ;
    d = min( d, 360.-max(hh, mm) + min(hh, mm) );

    if( d == 180 ){
        cout << fixed << setprecision(20) << a+b << "\n";
        return 0;
    }else{
        double alpha = (d*pi)/180.;
        double c = sqrt( a*a + b*b - 2*a*b*cos(alpha) );
        cout << fixed << setprecision(20) << c << "\n";
    }


    return 0;
}


Measured memory_bytes: 4208
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	double as[];
	double bs[];
	double cs[];
	double ds[];
	final double EPS = 1.0e-10;
	int n;

	void run() {
		Scanner sc = new Scanner(System.in);
		while (true) {
			n = sc.nextInt();
			if (n == 0)
				break;
			as = new double[n];
			bs = new double[n];
			cs = new double[n];
			ds = new double[n];
			for (int i = 0; i < n; i++) {
				as[i] = sc.nextDouble();
			}
			for (int i = 0; i < n; i++) {
				bs[i] = sc.nextDouble();
			}
			for (int i = 0; i < n; i++) {
				cs[i] = sc.nextDouble();
			}
			for (int i = 0; i < n; i++) {
				ds[i] = sc.nextDouble();
			}
			solve();
		}
	}

	void solve() {
		P[][] ps = new P[n + 2][n + 2];
		for (int i = 1; i <= n; i++) {
			ps[0][i] = new P(as[i - 1], 0);
		}
		ps[0][0] = new P(0, 0);
		ps[0][n + 1] = new P(1, 0);
		for (int i = 1; i <= n; i++) {
			ps[n + 1][i] = new P(bs[i - 1], 1);
		}
		ps[n + 1][0] = new P(0, 1);
		ps[n + 1][n + 1] = new P(1, 1);
		for (int i = 1; i <= n; i++) {
			ps[i][0] = new P(0, cs[i - 1]);
			ps[i][n + 1] = new P(1, ds[i - 1]);
		}
		for (int i = 1; i <= n; i++) {
			for (int j = 1; j <= n; j++) {
				P cp = isLL(ps[0][i], ps[n + 1][i], ps[j][0], ps[j][n + 1]);
				ps[j][i] = cp;
			}
		}
		// for (int i = 0; i <= n + 1; i++) {
		// System.out.println(Arrays.toString(ps[i]));
		// }
		double max = 0;
		for (int i = 0; i <= n; i++) {
			for (int j = 0; j <= n; j++) {
				max = Math.max(
						max,
						calcArea(ps[j][i], ps[j][i + 1], ps[j + 1][i + 1],
								ps[j + 1][i]));
			}
		}
		System.out.printf("%.10f\n", max);
	}

	double calcArea(P a, P b, P c, P d) {
		return Math.abs(a.sub(b).det(c.sub(b))) / 2
				+ Math.abs(a.sub(d).det(c.sub(d))) / 2;
	}

	// 直線と直線の交点
	P isLL(P p1, P p2, P q1, P q2) {
		double d = q2.sub(q1).det(p2.sub(p1));
		if (Math.abs(d) < EPS)
			return null;
		return p1.add(p2.sub(p1).mul(q2.sub(q1).det(q1.sub(p1)) / d));
	}

	public static void main(String[] args) throws Exception {
		new Main().run();
	}
}

class P {
	double x;
	double y;

	P(double x, double y) {
		this.x = x;
		this.y = y;
	}

	P sub(P p) {
		return new P(x - p.x, y - p.y);
	}

	P add(P p) {
		return new P(x + p.x, y + p.y);
	}

	double det(P p) {
		return x * p.y - y * p.x;
	}

	P mul(double k) {
		return new P(k * x, k * y);
	}

	public String toString() {
		return "(" + x + " , " + y + ")";
	}
}

Measured memory_bytes: 13000
#include <stdio.h>
#include <string.h>
#include <stdbool.h>

int main() {
	int i, mojisu = 0;
	char s[100000];
	char t[100000];
	char dream[6] = { "dream" };
	char dreamer[8] = { "dreamer" };
	char erase[6] = { "erase" };
	char eraser[7] = { "eraser" };
	bool flag = true;

	scanf("%s", s);

	while (s[mojisu] != '\0'){
		mojisu++;
	}

	while (mojisu >= 0 && flag == true) {
		flag = false;
		while (1) {
			for (i = 7; i > 0; i--) t[7 - i] = s[mojisu - i];
			t[7] = '\0';
			if (strcmp(t, dreamer) == 0) {
				flag = true;
				mojisu -= 7;
				break;
			}

			for (i = 6; i > 0; i--) t[6 - i] = s[mojisu - i];
			t[6] = '\0';
			if (strcmp(t, eraser) == 0) {
				flag = true;
				mojisu -= 6;
				break;
			}

			for (i = 5; i > 0; i--) t[5 - i] = s[mojisu - i];
			t[5] = '\0';
			if (strcmp(t, dream) == 0) {
				flag = true;
				mojisu -= 5;
				break;
			}

			for (i = 5; i > 0; i--) t[5 - i] = s[mojisu - i];
			t[5] = '\0';
			if (strcmp(t, erase) == 0) {
				flag = true;
				mojisu -= 5;
			}
			break;
		}
	}

	printf(mojisu <= 0 ? "YES\n" : "NO\n");

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
long long mon,sum,ma[200005];
int main(){
  int a,b,c,ma=0,sum;
cin>>a>>b;
for(int i=0;i<a;++i){
  sum=0;
for(int j=0;j<b;++j){
  cin>>c;
sum+=c;
}
ma=max(ma,sum);
}
cout<<ma<<endl;
}


Measured memory_bytes: 3124
import math
import fractions
import bisect
import collections
import itertools
import heapq
import string
import sys
import copy
from collections import deque
sys.setrecursionlimit(10**7)
MOD = 10**9+7
def gcd(a,b):return fractions.gcd(a,b) #最大公約数
def lcm(a,b):return (a*b) // fractions.gcd(a,b) #最小公倍数
def iin(): return int(input()) #整数読み込み
def ifn(): return float(input()) #浮動小数点読み込み
def isn(): return input().split() #文字列読み込み
def imn(): return map(int, input().split()) #整数map取得
def fmn(): return map(float, input().split()) #浮動小数点map取得
def iln(): return list(map(int, input().split())) #整数リスト取得
def iln_s(): return sorted(iln()) # 昇順の整数リスト取得
def iln_r(): return sorted(iln(), reverse=True) # 降順の整数リスト取得
def fln(): return list(map(float, input().split())) # 浮動小数点リスト取得
def join(l, s=''): return s.join(l) #リストを文字列に変換
def perm(l, n): return itertools.permutations(l, n) # 順列取得
def perm_count(n, r): return math.factorial(n) // math.factorial(n-r) # 順列の総数
def comb(l, n): return itertools.combinations(l, n) # 組み合わせ取得
def comb_count(n, r): return math.factorial(n) // (math.factorial(n-r) * math.factorial(r)) #組み合わせの総数
def two_distance(a, b, c, d): return ((c-a)**2 + (d-b)**2)**.5 # 2点間の距離
def add_mod(a,b): return (a+b) % MOD

s = input()
t = input()

sl =len(s)
tl =len(t)

dp = [[0 for _ in range(tl+1)] for _ in range(sl+1)]


for i in range(sl):
    for j in range(tl):
        if s[i] == t[j]: dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j]+1)
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i+1][j])
        dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j+1])
ans = ''
while sl > 0 and tl > 0:
    if dp[sl][tl] == dp[sl-1][tl]:
        sl -= 1
    elif dp[sl][tl] == dp[sl][tl-1]:
        tl -= 1
    else:
        ans = s[sl-1] + ans
        sl -= 1
        tl -= 1
print(ans)



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

const int MAXN = 100055;

int A[MAXN];

int N;

bool go(int col, int on, int mul) {
	col -= on;
	if(col < 0 || 1 == mul) return false;
	if((mul>>1) < col) return false;
	if(mul && !col) return false;
	return true;
}

bool f() {
	int col = A[1], on = 0, mul = 0;
	for(int i = 2; i <= N; i++) {
		if(A[i] < col || col+1 < A[i])
			return false;
		(A[i] == col ? on : mul)++;
	}
	return go(col, on, mul);
}

bool g() {
	int col = A[1], on = 0, mul = 0;
	for(int i = 2; i <= N; i++) {
		if(A[i] < col-1 || col < A[i])
			return false;
		(A[i] == col ? mul : on)++;
	}
	return go(col, on, mul+1);
}

int main() {
	ios::sync_with_stdio(false);

	cin >> N;
	for(int i = 1; i <= N; i++) cin >> A[i];

	puts(f() || g() ? "Yes" : "No");
	return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define print(x) cout<<(x)<<'\n'
using ll=long long;
using pl=pair<ll,ll>;
using vl=vector<ll>;
using vvl=vector<vl>;
using vs=vector<string>;

void solve() {
    ll n;
    cin >> n;
    vl num(4);
    rng(i,0,4){
        num[3-i] = n % 10;
        n /= 10;
    }
    int len = 3;
    vector<char> op(len);
    for(int bit=0; bit < (1<<(len)); bit++) {
        ll res = num[0];
        rng(j,0,len) {
            if(bit & (1<<j)) {
                op[j] = '+';
                res += num[j+1];
            }else{
                op[j] = '-';
                res -= num[j+1];
            }
        }
        if(res == 7) {
            break;
        }
    }
    cout << num[0];
    rng(i,0,3){
        cout << op[i] << num[i+1];
    }
    cout << "=7" << '\n';
}

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
	cout<<fixed<<setprecision(20);
    //int q; cin >> q;
	//while (q--)
		solve();
    return 0;
}


Measured memory_bytes: 3644
# -*- coding: utf-8 -*-

N = int(input())
a = list(map(int, input().split()))

c = [0] * (N+1)
for i in range(N, 0, -1):
    check_sum = sum(c[::i]) % 2
    if check_sum != a[i-1]:
        c[i] = 1

m = sum(c)
b = [i for i, x in enumerate(c) if x == 1]

print(m)
print(" ".join(map(str, b)))


Measured memory_bytes: 19892
// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int n, m;
  cin >> n >> m;
  vi v(n, 1), t(n);
  t[0] = true;
  while (m--) {
    int x, y;
    cin >> x >> y;
    x--, y--;
    if (t[x]) t[y] = true;
    v[x]--, v[y]++;
    t[x] = t[x] && v[x];
  }
  cout << count(all(t), true) << endl;
}


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

#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)
 
typedef long long ll;
using namespace std;
 
int main() {
  int n,j;
  int ans = 100;
  cin >> n;
  int a[n];
  
  rep(i,0,n){
    cin >> a[i];
    j = 0;
    while(a[i]%2 != 1){
      a[i] /= 2;
      j++;
    }
    ans = min(ans,j);
  }

  printf("%d\n",ans);

	return 0;
}

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

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

node *nil;

node* listSearch(int key){
  node *cur = nil->next;
  while ( cur != nil && cur->key != key ){
    cur = cur->next;
  }
  return cur;
}

void init(){
  nil =(node *)malloc(sizeof(struct node));
  nil->next = nil;
  nil->prev = nil;
}

void printList(){
  node *cur = nil->next;
  int isf = 0;
  while(1){
    if ( cur == nil ) break;
    if ( isf++ > 0 )  printf(" ");
    printf("%d", cur->key);
    cur = cur->next;
  }
  printf("\n");
}

void deleteNode(node *t){
  if ( t == nil ) return;
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}

void deleteFirst(){
  deleteNode(nil->next);
}

void deleteLast(){
  deleteNode(nil->prev);
}

void deleteKey(int key){
  deleteNode(listSearch(key));
}


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

int main(){
  int key, n, i;
  int size = 0;
  char com[20];
  int np = 0, nd = 0;
  scanf("%d", &n);
  init();
  for ( i = 0; i < n; i++ ){
    scanf("%s%d", com, &key);
    if ( com[0] == 'i' ) {insert(key); np++; size++;}
    else if ( com[0] == 'd' ) {
      if (strlen(com) > 6){
	if ( com[6] == 'F' ) deleteFirst();
	else if ( com[6] == 'L' ) deleteLast();
      } else {
	deleteKey(key); nd++; 
      }
      size--;
    }
  }

  printList();
  return 0;
}


Measured memory_bytes: 34452
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define INF ((1LL<<62)-(1LL<<31))
#define max(p,q)((p)>(q)?(p):(q))
#define min(p,q)((p)<(q)?(p):(q))
#define bit(n,m)(((n)>>(m))&1)
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define MOD 998244353
//#define MOD 1000000007
#define invp(a,p)pom(a,p-2,p)

ll n,a[100010];
int main(){
	scanf("%lld",&n);
	int t;
	scanf("%d",&t);
	if(t!=0){
		puts("0");
		return 0;
	}
	a[0]++;
	
	int M=0;
	rep(i,1,n){
		scanf("%d",&t);
		a[t]++;
		M=max(M,t);
	}
	if(a[0]!=1){
		puts("0");
		return 0;
	}
	
	ll ans=1;
	rep(i,1,M+1){
		ans=ans*pom(a[i-1],a[i],MOD)%MOD;
	}
	printf("%lld",ans);
}

Measured memory_bytes: 896
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for i in range(1, min(N+1, K+1)):
    for j in range(i+1):
        values = sorted(V[:j] + V[N-(i-j):])
        k = i+1
        while k <= K and len(values) > 0 and values[0] < 0:
            k += 1
            values.pop(0)
        ans = max(ans, sum(values))
print(ans)


Measured memory_bytes: 3064
#include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;
bool check(long long Num, long long N, long long M){
	//作るべきSの数
	long long makeS = Num - N;
	if (makeS <= 0) makeS = 0;
	//Sを作るのに使う分をMから引く
	M -= makeS * 2;
	//足りなかったらNG
	if (M < 0) return false;
	N = Num;
	//この時点でCが足りていたらOK、足りて無かったらNG
	if (N * 2 <= M){
		return true;
	}
	else return false;
}
int main(){
	long long N, M;
	cin >> N >> M;
	long long maxScc = 1000000000000/2;
	long long minScc = 0;
	//binsearch
	long long left = minScc,right=maxScc;
	while (right - left != 1){
		long long mid = (left + right) / 2;
		if (check(mid, N, M)) left = mid;
		else right = mid;
	}
	long long ans = check(right, N, M) ? right : left;
	cout << ans << endl;

	

	return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
#include<fstream>
#include<set>
#include<queue>
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define out(str) cout << str << endl
#define ALL(a) (a).begin(),(a).end()
#define INF (1<<29)

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

ll N,A=10,ans=0;

int main(){
    cin>>N;
    if(N%2==1){
        out(0);
        return 0;
    }
    while(A<=N){
        ans+=N/A;
        A*=5;
    }
    out(ans);
    
}


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

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

const ll mod =  1000000007;
const int inf = 1e9;
const long long INF = 1LL << 60;   // INFの値は1152921504606846976

struct UnionFind{
    vector<int> rank,p,size;
    UnionFind(int n){
        rank.resize(n,0);
        p.resize(n,0);
        size.resize(n,0);
        for(int i = 0; i < n; i++){
            p[i] = i;
            rank[i] = 0;
            size[i] = 1;
        }
    }
    bool same(int x,int y){
        return root(x) == root(y);
    }
    int root(int x){
        if(x != p[x]){
            p[x] = root(p[x]);
        }
        return p[x];
    }
    bool unite(int x,int y){
        int rx = root(x);
        int ry = root(y);
        if(rx == ry) return false;
        if(rank[rx] > rank[ry]){
            p[ry] = rx;
            size[rx] += size[ry];
        }else{
            p[rx] = ry;
            size[ry] += size[rx];
            if(rank[rx] == rank[ry]){
                rank[ry]++;
            }
        }
        return true;
    }
    int tree_size(int x){
        return (size[root(x)]);
    }
};

int main()
{
    int n;
    cin >> n;
    int a[n];
    rep(i,n){
        cin>>a[i];
    }
    multiset<int> m;
    int ans = 0;
    rep(i,n){
        auto iter = m.lower_bound(a[i]);
        if(iter == m.begin()){
            ans++;
            m.insert(a[i]);
        }else{
            int d = distance(m.begin(),iter);
            iter--;
            m.erase(iter);
            m.insert(a[i]);
        }
    }
    cout << ans;
}


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

int main() {
  int k;
  cin >> k;
  int even = k / 2;
  int odd  = k / 2;
  if (k % 2 == 1) {
    odd = (k / 2) + 1;
  }
  cout << even * odd << endl;
  return 0;
}

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

typedef long long Int64;

const Int64 N = 5e5 + 1000;

Int64 n, m;
Int64 target;
Int64 a[N];
Int64 query[N];

void init() {
	std::cin >> n;
	std::cin >> target;
	for (Int64 i = 1; i <= n; i++) {
		scanf("%lld", &a[i]);
	}
	std::cin >> m;
	for (Int64 i = 1; i <= m; i++) {
		scanf("%lld", &query[i]);
	}
}

void work() {
	static Int64 pos[N];

	pos[0] = target;
	for (Int64 i = 1; i <= n; i++) {
		pos[i] = std::min(pos[i - 1], std::abs(pos[i - 1] - a[i]));
	}

	static Int64 f[N];
	f[n] = 1;
	for (Int64 i = n - 1; i >= 0; i--) {
		if (a[i + 1] >= 2LL * f[i + 1]) {
			f[i] = f[i + 1];
		} else {
			f[i] = f[i + 1] + a[i + 1];
		}
	}

	for (Int64 i = 1; i <= m; i++) {
		Int64 u = query[i];
		if (pos[u - 1] < f[i]) {
			puts("NO");
		} else {
			puts("YES");
		}
	}
}

int main() {
	init();
	work();

	return 0;
}


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

int main() {
  string s, t;
  cin >> s >> t;
  int count = 0;
  for (int i = 0; i < (int)s.size(); i++) {
    if (s.at(i) != t.at(i)) {
      count++;
    }
  }
  cout << count << endl;
}

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

using namespace std;

using ll = long long;
using ld = long double;

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

    int n;
    cin >> n;

    vector<tuple<string, int, int>> s(n);
    for (int i = 0; i < n; ++i) {
        cin >> get<0>(s[i]) >> get<1>(s[i]);
        get<1>(s[i]) *= -1;
        get<2>(s[i]) = i;
    }
    sort(s.begin(), s.end());

    for (int i = 0; i < n; ++i) {
        cout << get<2>(s[i]) + 1 << '\n';
    }

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <numeric>
#include <limits>
using namespace std;


int main(){
    int a, c;
    string b;

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

Measured memory_bytes: 256
//Nihal Mittal - nihal_47
//Strike First , Strike Hard , No Mercy !!

/**⠀⠀⠀⠀⠀⠀⣀⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⣰⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣧⢀⠀⠀⠀⠀
⠀⠀⠀⣿⣿⣿⠋⠀⠀⠀⠀⠀⠙⠀⠙⣿⣿⣿⣷⢳⢀⠀⠀⠀
⠀⠀⣠⣿⣿⣿⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⢀
⠀⠀⣸⣿⣿⣿⠸⠀⠀⠀⠒⠒⠒⠐⠀⠀⢿⣿⣿⣿⣿⣿⠀⠀
⠀⣴⣿⣿⣿⡿⠀⠒⣋⣙⡒⢰⠀⠤⣖⠒⢾⣿⣿⣿⣿⣧⠀⠀
⢺⣿⣿⣿⣿⢀⠀⠀⠉⠉⠉⠸⠀⡇⠉⠉⠀⢿⣿⣿⣿⣄⠀⠀
⠀⠙⣿⣿⣧⢻⠀⠀⠀⠀⠀⠠⠀⠰⠀⠀⠀⣸⠸⣿⣿⠿⠰⠀
⠀⠀⠀⠹⣿⣿⣿⣷⠀⡠⠙⣲⣔⣅⢡⣰⣷⣿⣿⣿⣧⠀⠀⠀
⠀⠀⠀⣼⣿⣿⣿⣿⠀⡿⠭⠭⠭⠭⢿⠀⣿⢻⣿⣿⠃⠀⠀⠀
⠀⠀⠀⠙⠛⣿⢻⠹⣿⠐⠙⠛⠟⠉⢀⣴⡟⢿⣿⡏⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⡟⠀⠀⠻⣦⣤⣶⠾⠋⠀⠀⠁⡦⢄⢀⠀⠀⠀
⠀⠀⠀⠀⡠⠁⡇⠑⢄⠀⠀⠀⠀⠀⠀⠔⠀⠀⠁⠀⠀⠀⠉⠁
⠀⠔⠊⠁⠀⠀⣇⠀⠀⠀⠑⡤⠤⢎⠁⠀⠀⡘⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢢⠠⠀⡠⢆⠀⠀⡠⠙⢄⠀⡸⠀
**/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define ld long double
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define all(v) (v).begin(),(v).end()
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(0);
#define pii pair<ll,ll>
#define vi(x) vector<x>
#define maxn 100005
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
using namespace std;
using namespace __gnu_pbds;

signed main()
{
    fast;
   
    ll n,i,j;
    cin>>n;
    ll ma[n+2]={0};
    for(i=2;i<=n;i++)
    {
    	ll x;
    	cin>>x;
    	ma[x]++;
    }
    for(i=1;i<=n;i++) cout<<ma[i]<<"\n";
}

Measured memory_bytes: 5156
#include <iostream>

int main()
{
    int N, A, B, C, D;
    scanf("%d %d %d %d %d", &N, &A, &B, &C, &D);
    char S[N+1];
    A--; B--; C--; D--;
    scanf("%s", S);

    bool flag1 = true;
    bool flag2 = true;
    bool flag3 = C < D ? true : false;
    for(int i=A+1; i<C; i++)
        if(S[i] == '#' && S[i+1] == '#') flag1 = false;
    for(int i=B+1; i<D; i++)
        if(S[i] == '#' && S[i+1] == '#') flag2 = false;
    if(D < C){
        for(int i=B; i<=D; i++){
            if(S[i-1] == '.' && S[i] == '.' && S[i+1] == '.') flag3 = true;
        }
    }

    if(flag1 & flag2 & flag3) printf("Yes\n");
    else printf("No\n");
}


Measured memory_bytes: 384
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cmath>
#include <set>
#include <queue>
#include <vector>
#include <climits>
using namespace std;


int main()
{
	int K, N;
	cin >> N >> K;
	vector<long long> h(N);
	for (auto i = 0; i < N; ++i)
	{
		cin >> h[i];
	}

	sort(h.begin(), h.end());

	auto result = (long long)10e10;
	for (auto i = 0; i < N - K + 1; ++i)
	{
		result = min(result, h[i + K - 1] - h[i]);
	}

	cout << result << endl;

	return 0;
}


Measured memory_bytes: 1024
#include <cmath>
#include <vector>
#include <iostream>
#include <limits>
#include <iostream>
#include <vector>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <map>
#include <cmath>
#include <set>
#include <queue>
#include <algorithm>


using namespace std;
typedef long long Long;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef pair<int,int> PII;

struct Point { 
	int i,j;
	bool operator<(const Point &P)const{
		return j < P.j;
	}
};


int main()
{
	Long H,W;
	cin >> H >> W;
	int N;
	cin >> N;
	vector<Point> V(N);
	map<int,vector<Point> > S;
	Long C = 0;
	for(int i = 0; i < N; ++i){
		cin >> V[i].i >> V[i].j;
		V[i].i--;
		V[i].j--;
		for(int j = -2; j <= 0; ++j){
			int ni = V[i].i + j;
			if(ni < 0)continue;
			if(ni >= H-2)continue;
			S[ni].push_back(V[i]);
		}
	}
	vector<Long> F(10);
	for(pair<int,vector<Point> > v : S){
		map<int,int> MM;
		for(Point &p : v.second){
			for(int j = -2; j <= 0; ++j){
				int nj = p.j + j;
				if(nj < 0)continue;
				if(nj >= W-2)continue;
				MM[nj]++;
			}
		}
		for(pair<int,int> p : MM){
			F[p.second]++;
			C++;
		}
	}
	F[0] = (H-2)*(W-2) - C;
	
	for(int i = 0; i < 10; ++i){
		cout  << F[i] << endl;
	}
	
}

/*

3 1 2 1
4 7 52 9
7 1 2 1
3 9 52 4
1 2 3 4
5 10 7 8
1 2 3 4
5 8 7 10
34 5 6 998
4 17 77 84
34 5 6 998
4 17 77 8481


 */



Measured memory_bytes: 33792
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll,ll> pll;
const ll mod=1e9+7;
//const ll mod=998244353;
const ll inf=1LL<<61;

int main() {
  char c;
  cin >> c;
  if('a'<=c&&c<='z') {
    cout << 'a' << endl;
  }
  else {
    cout << "A" << endl;
  }
}

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

int comp(const void *a, const void *b){
  return *(int *)a - *(int *)b;
}

int main(){
  int N,K;
  scanf("%d%d",&N,&K);
  int l[N];
  int i;
  for(i = 0;i<N;i++){
  scanf("%d",&l[i]);
}
//  printf("%d\n",N);
  qsort(l,N,sizeof(int),comp);
  int sum = 0;
  i = 0;
  for(i = 0;i < K;i++){
    sum += l[N-1-i];
  }

  printf("%d\n",sum);
  return 0;

}

Measured memory_bytes: 128