akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

int main()
{
  char x, y;
  cin >> x >> y;

  // cout << (int)x << endl
  //     << (int)y << endl;

  if ((int)x < (int)y)
    cout << "<";
  else if ((int)x > (int)y)
    cout << ">";
  else
  {
    cout << "=";
  }
}


Measured memory_bytes: 3652
from fractions import gcd
ide = 0
def func(a,b):
  return gcd(a,b)
class SegmentTree:
  def __init__(self,ls):
    n = len(ls)
    self.tree = [ide for i in range(n)]+ls
    for i in range(1,n)[::-1]:
      self.tree[i] = func(self.tree[i<<1|0],self.tree[i<<1|1])
  def get(self,l,r):
    ret = ide
    l += n
    r += n
    while l < r:
      if l&1:
        ret = func(ret,self.tree[l])
        l += 1
      if r&1:
        ret = func(ret,self.tree[r-1])
      l >>= 1
      r >>= 1
    return ret
  def update(self,i,x):
    i += n
    self.tree[i] = x
    while i > 1:
      i >>= 1
      self.tree[i] = func(self.tree[i<<1|0],self.tree[i<<1|1])

import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int,input().split()))
sol = SegmentTree(a)
ans = 0
for i in range(n):
  t = a[i]
  sol.update(i,0)
  ans = max(ans,sol.get(0,n))
  sol.update(i,t)
print(ans)


Measured memory_bytes: 95208
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<61,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;

void Main() {
  int a[3];
  rep(i,3) R a[i];
  sort(a,a+3);
  if(a[0]==a[1]) pr(a[2]);
  else pr(a[0]);
}

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


Measured memory_bytes: 892
n = int(input())
a = list(map(int,input().split()))
s = 1
cnt = 0
for i in range(n):
  if a[i] == 0:
    print(0)
    exit()
for i in range(n):
  x = a[i]
  s *= x
  if s > 10**18:
    print(-1)
    exit()
print(s)

Measured memory_bytes: 21656
#[allow(unused_imports)]
use std::{cmp::Reverse, collections::*};

#[allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Chars, Usize1},
};

#[allow(unused_imports)]
use itertools::Itertools;

#[allow(unused_imports)]
use num::Integer;

#[fastout]
pub fn main() {
    input! {
        m: [i32; 5],
    }

    println!(
        "{}",
        (0..5)
            .permutations(5)
            .map(|indices| {
                let mut t = 0;
                for i in indices {
                    if t % 10 != 0 {
                        t += 10 - (t % 10);
                    }
                    t += m[i];
                }
                t
            })
            .min()
            .unwrap()
    );
}


Measured memory_bytes: 2152
// In the name of God

#include <iostream>
#include <algorithm>
#include <fstream>
#include <vector>
#include <deque>
#include <assert.h>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <math.h>
#include <bitset>
#include <iomanip>
#include <complex>

using namespace std;

#define rep(i, a, b) for (int i = (a), i##_end_ = (b); i < i##_end_; ++i)
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define mp make_pair
#define x first
#define y second
#define pb push_back
#define SZ(x) (int((x).size()))
#define ALL(x) (x).begin(), (x).end()

template<typename T> inline bool chkmin(T &a, const T &b) { return a > b ? a = b, 1 : 0; }
template<typename T> inline bool chkmax(T &a, const T &b) { return a < b ? a = b, 1 : 0; }
template<typename T> inline bool smin(T &a, const T &b)   { return a > b ? a = b : a;    }
template<typename T> inline bool smax(T &a, const T &b)   { return a < b ? a = b : a;    }

typedef long long LL;

const int N = (int) 1e5 + 5, mod = (int) 0;
long long s[N];
int a[N];
int main() {
	int n;
	scanf("%d", &n);
	for (int j = 0; j < n; ++j) {
		scanf("%d", a + j);
	}
	int res = 0;
	sort(a, a + n);
	for (int j = 0; j < n; ++j)
		s[j + 1] = s[j] + a[j];
	for (int j = 0; j < n; ++j) {
		long long cur = a[j];
		while (true) {
			long long tmp = cur;
			int pos = upper_bound(a, a + n, cur + cur) - a;
			cur = s[pos];
			if (tmp == cur) break;
		}
		if (cur == s[n]) res++;
	}
	cout << res << '\n';
}


Measured memory_bytes: 1408
#include <iostream>

using namespace std;

int main(){
    int A,B;
    int Ans = 0;
    cin >> A >> B;
    if(A > B){
        Ans += A;
        if((A-1) > B){
            Ans += A-1;
        }else
        Ans += B;
    }else{
        Ans += B;
        if((B-1) > A){
            Ans += B-1;
        }else{
            Ans += A;
        }
    }
    cout << Ans << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9+7))
#define REP(i, n) for(int i=0;i<int(n);++i)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define ALL(v) v.begin(),v.end()
#define FIND(v,x) (binary_search(ALL(v),(x)))
#define SORT(v) sort(ALL(v))
#define RSORT(v) sort(ALL(v));reverse(ALL(v))
#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl
#define Yes(n) cout<<((n)?"Yes":"No")<<endl
#define YES(n) cout<<((n)?"YES":"NO")<<endl
#define pb push_back
#define fi first
#define se second
using namespace std;
template<class A>void pr(A a){cout << (a) << endl;}
template<class A,class B>void pr(A a,B b){cout << a << " "  ;pr(b);}
template<class A,class B,class C>void pr(A a,B b,C c){cout << a << " " ;pr(b,c);}
template<class A,class B,class C,class D>void pr(A a,B b,C c,D d){cout << a << " " ;pr(b,c,d);}
template<class T> inline bool chmin(T& a, T b){return a>b ? a=b, true : false;}
template<class T> inline bool chmax(T& a, T b){return a<b ? a=b, true : false;}
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

int minTime(vector<int> &arr) {
    int time = 24;
    vector<int> c;
    for (int i = 0; i < arr.size(); i++) {
        if (arr[i] >= 1) c.push_back(i);
    }
    for (int i = 0; i < c.size() - 1; i++) time = min(time, c[i + 1] - c[i]);
    time = min(time, 24 - c.back());
    return time;
}

int main(void)
{
    int N;
    cin >> N;
    vector<int> D(13,0);
    D[0]++;//takahashi
    for (int i = 0; i < N; i++) {
        int d;
        cin >> d;
        D[d]++;
    }
    if(D[0] >= 2){
        pr(0);
        return 0;
    }

    int ans = 0;
    REP(i, 1<<13){
        vector<int> e(24,0);
        e[0]=1;
        Rep(j, 1, 13){
            if(D[j]==0)continue;
            else if(D[j]==2){
                if(j==0||j==12){
                    pr(0);return 0;
                }
                e[j] = 1;
                e[24-j] = 1;
            }else if(D[j]>2){
                pr(0);return 0;
            }
            else if(i&(1<<j)){
                e[j] = 1;
            }else{
                e[24-j] = 1;
            }
        }
        vector<int> ei;
        REP(j, 24){
            if(e[j]>=1) ei.pb(j);
        }
        int tmp = 24-ei.back();
        REP(i, ei.size()-1){
            chmin(tmp, ei[i+1]-ei[i]);
        }
        chmax(ans, tmp);
        // if(ei.size()==2){
        //     chmax(ans, chmin(ei.back(), 24-ei.back()));
        // }else{
        //     int tmp = ei.back()>12?24-ei.back():ei.back();
        //     REP(i, ei.size()-1){
        //         chmin(tmp, ei[i+1]-ei[i]);
        //     }
        //     chmax(ans, tmp);
        // }
        // chmax(ans, minTime(e));
    }
    pr(ans);
}

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

namespace ConsoleApp14
{
    class Class22
    {
        static void Main()
        {
            var NK = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = NK[0];
            int K = NK[1];
            var h = Console.ReadLine().Split().Select(int.Parse).ToArray();

            var DP = new long[N + 1];
            for(int i = 1; i <= N; i++) { DP[i] = long.MaxValue; }
            DP[0] = 0;

            for(int i = 0; i < N; i++)
            {
                for(int j = 1; j <= K; j++)
                {
                    if (i + j < N)
                    {
                        int k = Math.Abs(h[i] - h[i + j]);
                        DP[i + j] = Math.Min(DP[i + j], DP[i] + k);
                    }
                }
            }
            Console.WriteLine(DP[N-1]);
        }
    }
}


Measured memory_bytes: 20448
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;

struct node
{
	int x,y,z;
	bool operator <(node a)const {return x<a.x;}
}a[100010];

int fa[100010],d[100010];

int find(int x)
{
	if (x==fa[x]) return fa[x];
	int y=fa[x];
	fa[x]=find(fa[x]);
	d[x]+=d[y];
	return fa[x];
}



int main()
{
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int R,C;scanf("%d%d",&R,&C);
	int n;scanf("%d",&n);
	for (int i=1;i<=n;i++) scanf("%d%d%d",&a[i].x,&a[i].y,&a[i].z);
	sort(a+1,a+n+1);
	for (int i=1;i<=C;i++) fa[i]=i;
	for (int i=1;i<=C;i++) d[i]=0;
	int k=1;
	while (k<=n)
	{
		int j=k;
		while (j<=n&&a[j].x==a[k].x) j++;
		for (int i=k+1;i<j;i++)
		{
			int fx=find(a[k].y),fy=find(a[i].y);
			if (fx==fy)
			{
				if (d[a[k].y]-d[a[i].y]!=a[k].z-a[i].z) {puts("No");return 0;}
			}
			else
			{
				int w=d[a[k].y]+a[i].z-d[a[i].y]-a[k].z;
				if (w>0)
				{
					fa[fy]=fx;d[fy]=w;
				}
				else
				{
					fa[fx]=fy;d[fx]=-w;
				}
			}
		}
		k=j;
	}
	for (int i=1;i<=n;i++)
	{
		find(a[i].y);
		if (d[a[i].y]>a[i].z) {puts("No");return 0;}
	}
	swap(R,C);
	for (int i=1;i<=n;i++) swap(a[i].x,a[i].y);
	sort(a+1,a+n+1);
	for (int i=1;i<=C;i++) fa[i]=i;
	for (int i=1;i<=C;i++) d[i]=0;
	k=1;
	while (k<=n)
	{
		int j=k;
		while (j<=n&&a[j].x==a[k].x) j++;
		for (int i=k+1;i<j;i++)
		{
			int fx=find(a[k].y),fy=find(a[i].y);
			if (fx==fy)
			{
				if (d[a[k].y]-d[a[i].y]!=a[k].z-a[i].z) {puts("No");return 0;}
			}
			else
			{
				int w=d[a[k].y]+a[i].z-d[a[i].y]-a[k].z;
				if (w>0)
				{
					fa[fy]=fx;d[fy]=w;
				}
				else
				{
					fa[fx]=fy;d[fx]=-w;
				}
			}
		}
		k=j;
	}
	for (int i=1;i<=n;i++)
	{
		find(a[i].y);
		if (d[a[i].y]>a[i].z) {puts("No");return 0;}
	}
	puts("Yes");
	return 0;
}


Measured memory_bytes: 2176
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;

int main() {
    char c[2][3];

    rep(i, 2) {
        rep(j, 3) {
            cin >> c[i][j];
        }
    }

    if(c[0][0] == c[1][2] && c[0][1] == c[1][1] && c[0][2] == c[1][0]) {
        cout << "YES";
    }
    else {
        cout << "NO";
    }
    
    cout << endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <math.h>
#include <bits/stdc++.h>
#include <algorithm>
#define ll long long int
#define pb push_back
#define fi first
#define se second
#define N 100005
#define inf 1e18

using namespace std;

ll binomialCoeff(ll n,ll k);
ll power(ll x,ll y);

ll gcd(ll a,ll b)
{
    if(b==0)
        return a;
    return gcd(b,a%b);
}

int mod(int a,int b)
{
    if(a>b)
        return a-b;
    return b-a;
}

int main()
{
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(0);
    int n;
    cin >> n;
    int dp[N];
    int h[n+1];
    for(int i=1;i<=n;i++)
        cin >> h[i];
    dp[2] = mod(h[1],h[2]);
    dp[1] = 0;
    for(int i=3;i<=n;i++)
    {
        dp[i] = min(dp[i-1] + mod(h[i],h[i-1]) , dp[i-2] + mod(h[i],h[i-2]));
    }
    cout << dp[n];
}

ll binomialCoeff(ll n,ll k)
{
    ll res = 1;
    if(k >n - k)
        k = n - k;
    for(int i = 0; i < k; ++i)
    {
        res *= (n - i);
        res /= (i + 1);
    }
    return res;
}

ll power(ll x,ll y)
{
    ll temp;
    if(y == 0)
        return 1;
    temp = power(x, y/2);
    if (y%2 == 0)
        return temp*temp;
    else
        return x*temp*temp;
}


Measured memory_bytes: 1024
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
 
int gcd(int a, int b)
{
    if (a < b) swap(a,b);
    while(b>0)
    {
        int r = a % b;
        a = b;
        b = r;
    }
    return a;
}
 
int main() {
    int x,y;
    cin >> x >> y;
    cout << gcd(x,y) << endl;
    return 0;
}


Measured memory_bytes: 3096
#include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rep(i, s, N) for(ll i{s}; i < N; i++)
#define rem(i, N, s) for(ll i{N}; i > s; i--)
using namespace std;using ll = long long int;using ld = long double;using P = pair<ll,ll>;const int MOD = (int)1e9+7;const string rt = "\n";const string sp = " ";/* 最大公約数 */template<typename T> T gcd(T a, T b){return b != 0 ? gcd(b, a % b) : a;}/* UnionFind */template<typename T> struct UnionFind{vector<T> par;UnionFind(T n) : par(n, -1){}void init(T n){par.assign(n, -1);}T root(T x){if (par[x] < 0) return x;else return par[x] = root(par[x]);}bool issame(T x, T y){return root(x) == root(y);}bool merge(T x, T y){x = root(x); y = root(y);if(x == y) return false;if(par[x] > par[y]) swap(x, y);par[x] += par[y];par[y] = x;return true;}int size(int x) {return -par[root(x)];}};/* コンビネーション */template<typename T> ll combpm(T N_, T C_) {const int NUM_=400001;static ll fact[NUM_+1],factr[NUM_+1],inv[NUM_+1];if (fact[0]==0) {inv[1]=fact[0]=factr[0]=1;for (int i=2;i<=NUM_;++i) inv[i] = inv[MOD % i] * (MOD - MOD / i) % MOD;for (int i=1;i<=NUM_;++i) fact[i]=fact[i-1]*i%MOD, factr[i]=factr[i-1]*inv[i]%MOD;}if(C_<0 || C_>N_) return 0;return factr[C_]*fact[N_]%MOD*factr[N_-C_]%MOD;}/* 多次元ベクター */template<class T>vector<T> mvec(size_t a){return vector<T>(a);}template<class T, class... Ts>auto mvec(size_t a, Ts... ts){return vector<decltype(mvec<T>(ts...))>(a, mvec<T>(ts...));}/* 多次元デック */template<class T>deque<T> mdeq(size_t a){return deque<T>(a);}template<class T, class... Ts>auto mdeq(size_t a, Ts... ts){return deque<decltype(mdeq<T>(ts...))>(a, mdeq<T>(ts...));}/* テスト関数 */void test(ll n){cout << "test" << n << endl;}/* 小数点以下 */void fixsp(ll n){cout << fixed << setprecision(n);}void defsp(ll n){cout << defaultfloat << setprecision(n);}/* 重み付きUnionFind */struct WUnionFind {vector<int> par;vector<int> rank;WUnionFind(int n = 1) {init(n);}void init(int n = 1) {par.resize(n); rank.resize(n);for (int i = 0; i < n; ++i) par[i] = i, rank[i] = 0;}int root(int x) {if (par[x] == x) {return x;}else {int r = root(par[x]);return par[x] = r;}}bool issame(int x, int y) {return root(x) == root(y);}bool merge(int x, int y) {x = root(x); y = root(y);if (x == y) return false;if (rank[x] < rank[y]) swap(x, y);if (rank[x] == rank[y]) ++rank[x];par[y] = x;return true;}};/* 約数列挙 */vector<ll> divisor(ll n) {vector<ll> ret;for(ll i = 1; i * i <= n; i++) {if(n % i == 0) {ret.push_back(i);if(i * i != n) ret.push_back(n / i);}}sort(begin(ret), end(ret));return (ret);}/* IO高速化 */void fastio(){ios::sync_with_stdio(false);cin.tie(NULL);}
/* ここからコード開始 */

int main(){
  fastio;
  string S;
  cin >> S;
  ll K;
  cin >> K;
  rep(i, 0, K){
    if(S[i] != '1'){
      cout << S[i] << rt;
      return 0;
    }
  }
  cout << 1 << rt;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define F first
#define S second

using namespace std;
using P = pair<int,int>;
using ivec = vector<int>;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }


const int MOD=1000000007;
int INF=100100100100100;
int b[100];
int a[100][100];
signed main(){
  int n,m,c;cin>>n>>m>>c;
  rep(i,m)cin>>b[i];
  rep(i,n)rep(j,m)cin>>a[i][j];
  int ans=0;
  rep(i,n){
    int sum=0;
    rep(j,m)sum+=a[i][j]*b[j];
    sum+=c;
    if(sum>0)ans++;
  }
  cout<<ans<<endl;
  return 0;
}

Measured memory_bytes: 3612
#include <iostream>
#include <vector>
using namespace std;
int main(){
    int h, w;
    cin >> h >> w;
    vector<vector<char> > a(h, vector<char>(w));
    vector<bool>x(h,1);
    vector<bool>y(w,1);

    int cnt=0;

    for(int i=0; i<h; i++){
        cnt = 0;
        for(int j=0; j<w; j++){
            cin >> a[i][j];
            if(a[i][j]=='.'){
                cnt++;
            }else{
                continue;
            }
        }
        if(cnt==w){
            x[i]=0;
        }
    }

    for(int i=0; i<w; i++){
        cnt = 0;
        for(int j=0; j<h; j++){
            if(a[j][i]=='.'){
                cnt++;
            }else{
                continue;
            }
        }
        if(cnt==h){
            y[i]=0;
        }
    }

    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            if(x[i]&&y[j]){
                cout << a[i][j];
            }
        }
        if(x[i]) cout << endl;
    }

    return 0;
}

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

using namespace std;
using ll = long long;
constexpr int mod = 1e9+7;
constexpr int md = mod;
ll gcd(ll a, ll b){
    if(b == 0) return a;
    return gcd(b,a%b);
}
int main(){
    string str;
    cin>>str;
    if(str.substr(0,4) < "2019" || (str.substr(0,4) == "2019" && str.substr(5,2) < "04" ) || (str.substr(0,4) == "2019" && str.substr(5,2) == "04" && str.substr(8,2) <= "30")){
        cout << "Heisei" << endl;
    }else{
        cout << "TBD" << endl;
    }
    return 0;
}



Measured memory_bytes: 256
import java.util.*;
import java.util.stream.Collectors;



public class Main {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        String[] strings=scanner.next().split("");
        int[] ints=new int[strings.length];
        for(int i=0;i<ints.length;i++){
            ints[i]=Integer.parseInt(strings[i]);
        }
        for(int i=0;i<2;i++){
            for(int j=0;j<2;j++){
                for(int k=0;k<2;k++){
                    int result=ints[0];
                    String[] opt=new String[3];
                    if(i==0){
                        opt[0]="+";
                        result+=ints[1];
                    }else{
                        opt[0]="-";
                        result-=ints[1];
                    }
                    if(j==0){
                        opt[1]="+";
                        result+=ints[2];
                    }else{
                        opt[1]="-";
                        result-=ints[2];
                    }
                    if(k==0){
                        opt[2]="+";
                        result+=ints[3];
                    }else{
                        opt[2]="-";
                        result-=ints[3];
                    }
                    if(result==7){
                        for(int l=0;l<3;l++){
                            System.out.print(String.format("%d%s",ints[l],opt[l]));
                        }
                        System.out.print(String.format("%d=7",ints[3]));
                        return;
                    }
                }
            }
        }
    }
}

Measured memory_bytes: 23892
N, K = map(int,input().split())

sunuke = []
target = []

for i in range(K):
    d = input()
    c = list(map(int,input().split()))
    sunuke += c


for i in range(1, N+1):
    if i not in sunuke:
        target.append(i)

print(len(target))


Measured memory_bytes: 9164
#include <cstdio>
#include <cmath>
#include <cstring>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>
#include <fstream>

using namespace std;

vector<long long> v(0); 

int main(void){
    long long n,bef;
    int cnt,ans,mx;
    cin>>n;
    for(long long i=2;i*i<=n;i++){
        while(n%i==0){
            v.push_back(i);
            n/=i;
        }
    }
    if(n!=1){
        v.push_back(n);
    }
    sort(v.begin(),v.end());
    bef=-1;
    ans=0;
    cnt=0;
    mx=0;
    for(auto val:v){
        if(val!=bef){
            cnt=1;
            mx=1;
            ans++;
            bef=val;
        }else{
            if(cnt>mx){
                mx=cnt;
                cnt=1;
                ans++;
            }else{
                cnt++;
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 3628
//To compile : type "$     g++ test.cpp -std=c++14 -I .    "
#include <atcoder/lazysegtree>
#include <atcoder/modint>
#include <bits/stdc++.h>
//#include <chrono>
//#pragma GCC optimize("Ofast")
using namespace std;
using namespace atcoder;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se second
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,Q,K,A,B;
//string S;
typedef pair<ll, ll> P;
const ll INF = (1LL<<60);

using mint = modint998244353;

struct S {
	mint x;
	int n;
	//S(int _x = 0, int _n = 0) : x(_x), n(_n){}
};

struct F {
	mint a, b;
	//F(mint _a = 1, mint _b = 0) : a(_a), b(_b){}
};

S op(S s, S t){
	return S{s.x + t.x, s.n + t.n};
}

S e(){ return S{0, 0}; }

S mapping(F f, S s){
	return S{f.a * s.x + f.b * s.n, s.n};
}

F composition(F f, F g){
	return F{f.a * g.a, f.a * g.b + f.b};
}

F id(){ return F{1, 0}; }

int main() {
	cin>>N>>Q;
	vector<S> a(N);
	rep(i, N){
		scanf("%lld", &A);
		a[i] = S{A, 1};
	}
	lazy_segtree<S, op, e, F, mapping, composition, id> seg(a);
	rep(_, Q){
		int t, l, r, b, c;
		scanf("%d%d%d", &t, &l, &r);
		if(t == 0){
			scanf("%d%d", &b, &c);
			seg.apply(l, r, F{b, c});
		}else{
			printf("%d\n", seg.prod(l, r).x.val());
		}
	}
}


Measured memory_bytes: 19392
package main

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

func solve() {
	n := scanInt()
	cnt := 0
	for i := 0; i < n; i++ {
		num := scanInt()
		if num%2 == 1 && (i+1)%2 == 1 {
			cnt++
		}
	}
	fmt.Println(cnt)
	return
}

var sc = bufio.NewScanner(os.Stdin)

func scanString() string {
	sc.Scan()
	return sc.Text()
}
func scanInt() int {
	sc.Scan()
	a, err := strconv.Atoi(sc.Text())
	if err != nil {
		fmt.Println(err)
	}
	return a
}
func scanFloat64() float64 {
	f, _ := strconv.ParseFloat(scanString(), 64)
	return f
}
func Permute(nums []int) [][]int {
	n := factorial(len(nums))
	ret := make([][]int, 0, n)
	permute(nums, &ret)
	return ret
}
func permute(nums []int, ret *[][]int) {
	*ret = append(*ret, makeCopy(nums))

	n := len(nums)
	var i, j int
	for {
		for i = n - 2; i >= 0; i-- {
			if nums[i] < nums[i+1] {
				break
			}
		}
		if i < 0 {
			return
		}
		for j = n - 1; ; j-- {
			if nums[j] > nums[i] {
				break
			}
		}
		nums[i], nums[j] = nums[j], nums[i]
		for k, l := i+1, n-1; k < l; {
			nums[k], nums[l] = nums[l], nums[k]
			k++
			l--
		}
		*ret = append(*ret, makeCopy(nums))
	}
}

func factorial(n int) int {
	ret := 1
	for i := 2; i <= n; i++ {
		ret *= i
	}
	return ret
}

func pow(n, m int) int {
	ret := 1
	for i := 0; i < m; i++ {
		ret *= n
	}
	return ret
}

func makeCopy(nums []int) []int {
	return append([]int{}, nums...)
}
func gcd(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func eratosthenes(n int) []int {
	search := make([]bool, n+1)
	ans := []int{}
	for i := 2; i < n+1; i++ {
		search[i] = true
	}
	for i := 2; i*i < n+1; i++ {
		for j := 2; i*j < n+1; j++ {
			search[i*j] = false
		}
	}
	for i := 2; i < n; i++ {
		if search[i] {
			ans = append(ans, i)
		}
	}
	return ans
}

func main() {
	sc.Split(bufio.ScanWords)
	solve()
}


Measured memory_bytes: 1772
#include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <tuple>
#include <bitset>
#include <memory>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <cfloat>



int main() {
	int n, a, b; std::cin >> n >> a >> b;
	std::cout << std::min(n * a, b) << std::endl;
}

Measured memory_bytes: 256
def unit(a):
  return a/abs(a)

c1x, c1y, c1r = map(int, input().split())
c2x, c2y, c2r = map(int, input().split())
a = complex(c1x,c1y)
b = complex(c2x,c2y)
ab=abs(b-a)
ac=(c1r**2 + ab**2-c2r**2)/(2*ab)
c=a+(b-a)*(ac/ab)
pc=(c1r**2-ac**2)**0.5
p=c+pc*unit(b-a)*1j
q=c+pc*unit(b-a)*-1j

if p.real>q.real:
  p,q=q,p
if abs(p.real - q.real) < 1e-6 and p.imag > q.imag:
  p, q = q, p
print('{:.10f} {:.10f} {:.10f} {:.10f}'.format(p.real, p.imag, q.real, q.imag))



Measured memory_bytes: 5660
#include <iostream>
#include <string>
#include <vector>
using namespace std;

int main() {
    bool sieve[10001] = {};
    sieve[0] = sieve[1] = true;
    for (int i=2; i*i<=10001; ++i) {
        if (sieve[i]) continue;
        for (int j=i*i; j<=10001; j+=i) {
            sieve[j] = true;
        }
    }
    int N;
    while (cin >> N) {
        int cnt = 0;
        for (int i=1; i<=N; ++i) {
            if ( ! sieve[i] && ! sieve[N+1-i]) {
                ++ cnt;
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

Measured memory_bytes: 1176
#include <iostream>
#include <vector>
#include <climits>
#include <stack>
#include <cstdio>
#include <queue>
#include <map>
#include <set>
#include <list>
#include <regex>
#include <algorithm>
#include <math.h>
#include <string>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(obj) obj.begin(), obj.end()
#define UNIQUE(v) v.erase(unique(All(v)), v.end());
typedef long long ll;

typedef pair<int, int> P;
vector<P> vecp;
int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1};

#define N 
// input
ll n;

vector<P> vecChecked;

signed main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cin >> n;
  REP(i, n){
    int a,b;
    cin >> a >> b;
    vecp.push_back(P(a + b, a - b));
  }
  sort(vecp.begin(), vecp.end());
  ll count = 0;
  int i = 0;
  while(i < n){ 
    int left = vecp[i].second;
    int right = vecp[i].first;
    count++;
    for(i++; i<n && right > vecp[i].second; i++){
    }
  }

  cout << count;
}

Measured memory_bytes: 1400
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<cmath>
#include<vector>
#include<string>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<iostream>
#include<algorithm>
#pragma GCC target("avx")
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC diagnostic error "-std=c++14"

#define isNum(a) (a>='0'&&a<='9')
#define SP putchar(' ')
#define EL putchar('\n')
#define ri register int

template<class T>
inline void in(T&);
template<class T>
inline void out(const T&);

typedef long long ll;
using std::min;
using std::max;
using std::abs;
using std::sort;
using namespace std;

int n,x,s;
struct stu{
	int l,r;
}a[100005];

inline bool cmp(stu q,stu p)
{
	if (q.r!=p.r) return q.r<p.r;
	return q.l<p.l;
}

int main()
{
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    in(n);
    for (ri i=1;i<=n;++i)
    {
    	in(x);in(s);
    	a[i].l=x-s;a[i].r=x+s;
    }
    sort(a+1,a+n+1,cmp);
    int last=a[1].r,ans=1;
    for (ri i=2;i<=n;++i) if (a[i].l>=last) ++ans,last=a[i].r;
    out(ans);EL;
    return 0;
}

template<class T>
void in(T &Re)
{
    T k=0;
    char ch=getchar();
    int flag=1;
    while (!isNum(ch))
	{
        if (ch=='-')
		{
            flag=-1;
        }
        ch=getchar();
    }
    while (isNum(ch))
	{
        k=(k<<1)+(k<<3)+ch-'0';
        ch=getchar();
    }
    Re=flag*k;
}

template<class T>
void out(const T &Wr)
{
    if (Wr<0)
	{
        putchar('-');
        out(-Wr);
    }
	else
	{
        if (Wr<10)
		{
            putchar(Wr+'0');
        }
		else
		{
            out(Wr/10);
            putchar((Wr%10)+'0');
        }
    }
}




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

using namespace std;

#define ll long long

void solve() {
	string s;
	cin >> s;
	for (int i = 0; i < 26; i++) {
		auto it = find(s.begin(), s.end(), ('a'+i));
		if (it == s.end()) {
			cout << char('a'+i) << "\n";
			return;
		}
	}
	cout << "None\n";
}

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

	int t = 1, i = 1;
	//cin >> t;
	while(t--) {
		//cout << "Case #" << i << ": ";
		solve();
		//i++;
	}
	return 0;
}



Measured memory_bytes: 3756
N, M, X = map(int, input().split())
A = list(map(int, input().split()))

l = list(range(1, X))
r = list(range(X+1, N+1))

l_c = len(set(A)&set(l))
l_r = len(set(A)&set(r))

print(min(l_c, l_r))

Measured memory_bytes: 61832
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) > (b) ? (b) : (a))
#define abs(x) ((x) > 0 ? (x) : -(x))
#define rep(i, n) for(int i = 0; i < (n); i++)
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9 + 7
typedef long long ll;

int
main(int argc, char *argv[])
{
  int n, r[200000];
  scanf("%d", &n);
  rep(i, n) scanf("%d", &r[i]);

  int min[200000] = {};
  min[0] = 1000000000;
  int ans = -1000000000;
  for(int i = 1; i < n; i++){
    min[i] = Min(min[i - 1], r[i - 1]);
    ans = Max(ans, r[i] - min[i]);
  }
  printf("%d\n", ans);
  return 0;
}



Measured memory_bytes: 3364
#include<iostream>
#include<cstring>
#include<cstdio>
#include<iomanip>
using namespace std;
char s[10086];
int main()
{
	cin>>s;
	for(int i=0;i<12;i++)
	{
		if(i==4) cout<<" ";
		cout<<s[i];
	}
	cout<<endl;
	return 0;
}

Measured memory_bytes: 256
//Bismillah Hir Rehmanir Rahim
//Allah knows best
#include<bits/stdc++.h>
using namespace std;
#define start ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define f(i, a, n) for( i=a; i<n;i++)
#define ll long long
#define pi 3.141592653589793
#define vi              vector<int>
#define si              set<int>
#define pb              push_back
#define mp              make_pair
#define mod             1000000007
#define rr              return 0
#define ff              first
#define in              insert
#define ss              second
#define setbits(x)      __builtin_popcountll(x)
#define zrbits(x)       __builtin_ctzll(x)
#define deb(x)          cout << #x << " = " << x << endl
int main()
{
    start;
    ll i,j,k,n,m;
    cin>>n;
    ll a[n];
    f(i,0,n) cin>>a[i];
    ll sum=0;
    for(i=1;i<n;i++)
    {
        if(a[i]<a[i-1])
        {
            sum+=(a[i-1]-a[i]);
            a[i]=a[i-1];
        }
    }
    cout<<sum<<endl;
    rr;
}


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

int main() {
	int x;
	cin >> x;
	int i = 1;
	while (1) {
		if (360 * i%x == 0) break;
		i++;
	}
	cout << 360 * i / x << endl;
	return 0;
}

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


int main(void){
	ll n, m, left, ans;
  cin >> n >> m;
  left = m - 2*n;
  if(left>=0){
    ans = n + left/4;
  }
  else{
    ans = m/2;
  }
  cout << ans;
}


Measured memory_bytes: 3584
#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
vector<int> a[200010], b[200010];
vector<ll> mem[200010];
ll mem1[200010], n, mod=1e9+7;
int sz1[200010], dpth[200010];
long long fact[200010];
void pre(){
    fact[0]=1;
    for(long long i=1; i<200010; ++i){
        fact[i]=(fact[i-1]*i)%mod;
    }
}
long long pwr(long long x, long long e){
    if(e==0)
        return 1;
    long long tmp=pwr(x,e/2);
    tmp=(tmp*tmp)%mod;
    if(e%2)
        tmp=(tmp*x)%mod;
    return tmp;
}
long long cmb(long long x, long long y){
    long long res, tmp;
    tmp=pwr(fact[x-y], mod-2);
    res=(fact[x]*tmp)%mod;
    tmp=pwr(fact[y],mod-2);
    res=(res*tmp)%mod;
    return res;
}
void dfs(int x, int pa){
	if(pa==-1){
		dpth[x]=0;
	}
	else{
		dpth[x]=dpth[pa]+1;
	}
	sz1[x]=1;
	for(int i=0; i<a[x].size(); ++i){
		if(a[x][i]==pa){
			continue;
		}
		dfs(a[x][i], x);
		sz1[x]+=sz1[a[x][i]];
	}
}
ll sz(int x, int pa){
	if(dpth[pa]<dpth[x]){
		return sz1[x];
	}
	else{
		return n-sz1[pa];
	}
}

ll dp(int x, int pa);
ll dp1(int x){
	if(mem1[x]!=-1){
		return mem1[x];
	}
	ll res=0;

	ll tmp=n-1;
	res=1;
	for(int i=0; i<a[x].size(); ++i){
		ll tmp1=dp(a[x][i], b[x][i])*cmb(tmp, sz(a[x][i], x));
		tmp1%=mod;
		res*=tmp1;
		res%=mod;
		tmp-=sz(a[x][i], x);
	}
	if(res<0){
		res+=mod;
	}
	mem1[x]=res;
	return res;
}

ll dp(int x, int pa){
	if(mem[x][pa]!=-1){
		return mem[x][pa];
	}
	ll res=0, tmp;
	if(mem1[x]!=-1){
		res=mem1[x];
		tmp=dp(a[x][pa], b[x][pa]);
		res*=pwr((tmp*cmb(n-1, sz(a[x][pa], x)))%mod, mod-2);
		res%=mod;
	}
	else{
		ll tmp=sz(x, a[x][pa])-1;
		res=1;
		for(int i=0; i<a[x].size(); ++i){
			if(i==pa){
				continue;
			}
			ll tmp1=dp(a[x][i], b[x][i])*cmb(tmp, sz(a[x][i], x));
			tmp1%=mod;
			res*=tmp1;
			res%=mod;
			tmp-=sz(a[x][i], x);
		}
	}
	if(res<0){
		res+=mod;
	}
	mem[x][pa]=res;
	return res;
}
void dfs1(int x, int pa){
	dp1(x);
	for(int i=0; i<a[x].size(); ++i){
		if(a[x][i]==pa){
			continue;
		}
		dfs1(a[x][i], x);
	}
}
int main(){
	pre();
    while(cin>>n){
    	int x, y;
        for(int i=0; i<n-1; ++i){
            scanf("%d%d",&x, &y);
            b[x].push_back(a[y].size());
            b[y].push_back(a[x].size());
            a[x].push_back(y);
            a[y].push_back(x);
        }
        for(int i=1; i<=n; ++i){
        	mem[i].resize(a[i].size()+10, -1);
        }
        memset(mem1, -1, sizeof mem1);
        dfs(1, -1);
        dfs1(1, -1);
        for(int i=1; i<=n; ++i){
        	printf("%lld\n",mem1[i]);
        }
    }
  return 0;
}




Measured memory_bytes: 55272
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <array>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <sstream>
#include <stdio.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <list>
#include <numeric>
#include <stack>
#include <iomanip>

using namespace std;

#define Rep(i,a,b) for(int i = a; i < b; i++)
#define rep(i,b) Rep(i,0,b)
#define rrep(i,a) for(int i = a; i >= 0; i--)
#define allof(a) (a).begin(), (a).end()

typedef long long ll;
const int inf = 1e9 + 7;
const ll infll = 1ll << 60ll;
const ll mod = 1e9 + 7;
// 0~3までは右左下上 4~7までは斜め
constexpr int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
constexpr int dy[] = { 0, -1, 0, 1, 1, -1, -1, 1 };

/*
// 最大公約数
ll gcd(ll a, ll b) {
	if (b == 0) return a;
	return gcd(b, a % b);
}

// 最小公倍数
ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;
}*/


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

	int x, a;
	cin >> x >> a;

	if (x < a) cout << 0 << endl;
	else cout << 10 << endl;

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define ALL(a)  (a).begin(),(a).end()
#define SUM(a)  accumulate((a).begin(),(a).end(),0)
#define SORT(a) sort(ALL(a))
#define REV(a) reverse(ALL(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
typedef long long ll;
const int INTINF = 1<<29;
const ll LLINF = 1LL<<61;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
const int DX[8]={ 0, 1, 0,-1, 1, 1,-1,-1};
const int DY[8]={ 1, 0,-1, 0, 1,-1, 1,-1};

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  set<char> st;
  string S;
  cin >> S;
  REP(i,3){
      st.insert(S[i]);
  }
  if (st.size()==3)cout << "Yes" << endl;
  else cout << "No" << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#define rep(i, start, end) for (int i = (int)start; i < (int)end; ++i)
#define rrep(i, start, end) for (int i = (int)start - 1; i >= (int)end; --i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
template<typename T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return 0;}
template<typename T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return 0;}

void divide(vector<int>& H, int l, int r, int& ans) {
    if (r - l < 1) {
        return;
    }
    int cnt = *min_element(H.begin() + l, H.begin() + r);
    ans += cnt;
    rep(i, l, r) {
        H[i] -= cnt;
    }
    int prev = -1;
    rep(i, l, r) {
        if (H[i] && prev < 0) {
            prev = i;
        } else if (!H[i] && prev >= 0) {
            divide(H, prev, i, ans);
            prev = -1;
        }
    }
    if (prev >= 0) {
        divide(H, prev, r, ans);
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N;
    cin >> N;
    vector<int> H(N);
    for (auto& h : H) {
        cin >> h;
    }
    int ans = 0;
    int prev = -1;
    rep(i, 0, N) {
        if (H[i] && prev < 0) {
            prev = i;
        } else if (!H[i] && prev >= 0) {
            divide(H, prev, i, ans);
            prev = -1;
        }
    }
    if (prev >= 0) {
        divide(H, prev, N, ans);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

N = I()

s = set()
for i in range(N):
    s.add(input())

print(len(s))


Measured memory_bytes: 85604
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define reps(i,s,n) for(int i=(s); i<(n); i++)
#define all(v) v.begin(),v.end()
#define outve(v) for(auto i : v) cout << i << " ";cout << endl
#define outmat(v) for(auto i : v){for(auto j : i) cout << j << " ";cout << endl;}
#define in(n,v) for(int i=0; i<(n); i++){cin >> v[i];}
#define out(n) cout << (n) << endl
#define fi first
#define se second
#define pb push_back
#define mod 1000000007
#define infi 1900000000
#define infl 1100000000000000000
#define cyes cout << "Yes" << endl
#define cno cout << "No" << endl
#define csp << " " <<
#define outset(n) cout << fixed << setprecision(n);
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<typename T> using ve = vector<T>;
template<typename T> using pq2 = priority_queue<T>;
template<typename T> using pq1 = priority_queue<T,vector<T>,greater<T>>;




int main()
{
    int N,K;
    cin >> N >> K;
    vi V(N);
    in(N,V);
    
    int ans = 0;
    rep(i,K+1) rep(j,K+1) rep(l,K+1){
        if(i+j > N) continue;
        if(i+j+l > K) continue;
        
        
        int an = 0;
        pq1<int> pq;
        rep(n,i) an += V[n],pq.push(V[n]);
        rep(n,j) an += V[N-1-n],pq.push(V[N-1-n]);
        rep(n,l){
            if(pq.empty()) break;
            if(pq.top() >= 0) break;
            
            an -= pq.top();
            pq.pop();
        }
        
        ans = max(ans,an);
    }
    cout << ans << endl;

    
    
    
    

    return 0;
}


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

using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;

template<class T>
void debug(T itr1, T itr2) { auto now = itr1; while(now<itr2) { cout << *now << " "; now++; } cout << endl; }
#define repr(i,from,to) for (int i=(int)from; i<(int)to; i++)
#define all(vec) vec.begin(), vec.end()
#define rep(i,N) repr(i,0,N)
#define per(i,N) for (int i=(int)N-1; i>=0; i--)

const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const int INF = pow(2,30)-1;

vector<ll> fac;
void c_fac(int x=pow(10,6)+10) { fac.resize(x,true); rep(i,x) fac[i] = i ? (fac[i-1]*i)%MOD : 1; }
ll inv(ll a, ll m=MOD) { ll b = m, x = 1, y = 0; while (b!=0) { int d = a/b; a -= b*d; swap(a,b); x -= y*d; swap(x,y); } return (x+m)%m; }
ll nck(ll n, ll k) { return fac[n]*inv(fac[k]*fac[n-k]%MOD)%MOD; }
ll gcd(ll a, ll b) { if (a<b) swap(a,b); return b==0 ? a : gcd(b, a%b); }
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; }


int main() {
  double R; cin >> R;
  double result = R * 2 * M_PI;
  cout << setprecision(10) << result << endl;
  return 0;
}

Measured memory_bytes: 3776
n = int(input())
ans = 0
red = sorted([ list(map(int,input().split())) for _ in range(n) ], key = lambda x : -x[1])
blue = sorted([ list(map(int,input().split())) for _ in range(n) ])
for i in red:
    for num,j in enumerate(blue):
        if i[0] < j[0] and i[1] < j[1]:
            ans += 1
            del blue[num]
            break
print(ans)

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

#define watch(x) cerr << (#x) << ": " << (x) << endl

const int N = 200001;
int n, k, p[N];

int32_t main() {

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> n >> k;
    for(int i = 0; i < n; ++i) cin >> p[i];

    int ans = 1;

    int prev = -1, len = 0;
    bool seen = false;

    set<int> nums;

    for(int i = 0; i < k; ++i) {
        int cur = p[i];
        if(cur > prev)
            len++;
        else
            len = 1;
        prev = cur;
        nums.insert(cur);
    }
    if(len == k) seen = true;
    
    for(int i = k; i < n; ++i) {
        bool add = true;
        int cur = p[i];
        if(cur > prev) {
            len++;
        } else {
            len = 1;
        }
        prev = cur;

        nums.insert(cur);

        int first = *(nums.begin()), last = *(nums.rbegin());

        if(first == p[i-k] && last == cur) {
            add = false;
        }
        nums.erase(p[i-k]);
        
        if(len >= k) {
            if(!seen) {
                seen = true;
            } else {
                add = false;
            }
        }

        if(add)
            ans++;
    }

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


Measured memory_bytes: 10368
#include<cstdio>
#include<algorithm>
#include<cstring>

using namespace std;

int n,m;
char c[100005];

int main() {
	scanf("%s", c);
	n = strlen(c);
	for (int i = n - 1; i > 0; i--) {
		if (c[i] != c[i - 1]) m++;
	}
	printf("%d\n", m);
}


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

using namespace std;

#define REP(i, n)   for(int i = 0; i < (n); i++)
#define REPS(i, n)  for(int i = 1; i <= (n); i++)
#define RREP(i, n)  for(int i = (n)-1; i >= 0; i--)
#define RREPS(i, n) for(int i = (n); i > 0; i--)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define mp make_pair
#define mt make_tuple
#define pb push_back

using ll  = long long;
using pi  = pair<int, int>;
using pl  = pair<ll, ll>;
using vi  = vector<int>;
using vl  = vector<ll>;
using vs  = vector<string>;
using vb  = vector<bool>;
using vvi = vector<vi>;
using vvl = vector<vl>;

const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const ll  INFL = 1e18;
const double PI = 3.141592653589793;
const double EPS = 1e-9;

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

signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);

    int N, L; cin >> N >> L;
    vs s(N); REP(i, N) cin >> s[i];
    sort(ALL(s));
    REP(i, N) cout << s[i];
    cout << endl;
}

Measured memory_bytes: 3604
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main()
{
	int n, m;
	cin >> n >> m;
	vector<vector<pair<int, int>>> a(n);
	int p, y;
	for (int i = 0; i < m; i++) {
		cin >> p >> y;
		a[p - 1].emplace_back(make_pair(y, i));
	}
	for (int i = 0; i < n; i++) {
		sort(a[i].begin(), a[i].end());
	}

	vector<pair<int, int>> ans(m);
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < a[i].size(); j++) {
			ans[a[i][j].second].first = i + 1;
			ans[a[i][j].second].second = j + 1;
		}
	}

	for (int i = 0; i < m; i++) {
		printf("%06d%06d\n", ans[i].first, ans[i].second);
	}

	return 0;
}

Measured memory_bytes: 7808
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

s=int(input())
max_count=s//3
if max_count==0:
    print(0)
else:
    ans=0
    for i in range(1,max_count+1):
        data=[j for j in range(1,i+1)]
        amari=s-3*i
        ans+=cmb(i+amari-1,amari)
        ans%=10**9+7
    print(ans)

Measured memory_bytes: 68408
#include<bits/stdc++.h>
using namespace std ;
int main () {
int A , B ; cin >> A >> B ;
int ans ;
if ( A > B ) {
ans = A + (A -1);
}
else if (B > A ) {
ans = B + (B -1);
}
else {
ans = A + B ;
}
cout << ans << endl ;
}


Measured memory_bytes: 256