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

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define itn int

typedef long long ll;
typedef pair<ll,ll> p;


int main()
{
  string s;
  cin >> s;
  auto tmp = s.find("AC");
  if(tmp == string::npos) cout << "No" << endl;
  else cout << "Yes" << endl;


}


Measured memory_bytes: 256
//#include <bits/stdc++.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <iomanip>
#include <stdlib.h>
#include <stdio.h>
#include <queue>
#include <deque>
#include <set>
#include <stack>
#include <time.h>
 
using namespace std;
 
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<int, ll> Pil;
typedef pair<ll, ll> Pll;
typedef pair<ll, int> Pli;

#define fi first
#define se second
#define mp make_pair
 
const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll INF = 1ll << 60;
const double PI = 2 * asin(1);

void yes() {printf("yes\n");}
void no() {printf("no\n");}
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}

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

  int A = 1, B = N;
  bool visited[N + 1] = {};
  for (int i = 0; i < M; i++){
    printf("%d %d\n", A, B);
    visited[B - A] = true;
    visited[N - (B - A)] = true;

    A++; B--;
    while ((B - A) * 2 == N || visited[B - A] || visited[N - (B - A)]){
      B--;
    }
  }

  return 0;
}


Measured memory_bytes: 3868
#include<bits/stdc++.h>
using namespace std;
int main(){
    long long int n,m;
    cin>>n>>m;
    if(m>=n){
        for(int i=0;i<m;i++) cout<<n;
    }
    else
    {
        for(int i=0;i<n;i++) cout<<m;
    }
    cout<<endl;
       }

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

int main(void){
    int N;
    cin >> N;
    int A[N];
    for(int i = 0 ; i!=N; ++i){
        cin >> A[i];
    }
    int X = 0;
    for(int i = 0; i!=N; ++i){
        X = (X ^ A[i]);
    }
    for(int i = 0; i!=N; ++i){
        cout << (X ^ A[i]);
        if(i+1!=N){
            cout << ' ';
        }
    }
    cout << endl;
    
}

Measured memory_bytes: 4328
#include <iostream>

using namespace std;

int main()
{
	int a, b, c, divsor = 0, i;
	
	cin >> a;
	cin >> b;
	cin >> c;
	
	for(i = a; i <= b; i++)
	{
		if(0 == c % i)
		{
			divsor++;
		}
	}
	
	cout << divsor << endl;
	
	return 0;
}


Measured memory_bytes: 3108
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;

int main()
{
    int n;
    int t[101];
    long long sum=1000;
    long long f;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)
        scanf("%d",&t[i]);
    for(int i=1;i<n;i++)
    {
        f=0;
        if(t[i]<t[i+1])
            f=sum/t[i];
        sum+=(t[i+1]-t[i])*f;
    }
    printf("%lld\n",sum);
    return 0;
}


Measured memory_bytes: 3776
#include<iostream>
#include<cstdio>
#include<string>

using namespace std;

int main () {
  string s;
  int N,k=0;
  cin >> s;
  cin >> N;
  for(int i=0 ; i<=N-1; i++) {
    string s1;
    cin >> s1;
    s1 += s1;
    if(s1.find(s) != string::npos ) k++;
  }
  cout << k << endl;
}

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

int main(void){
    int N,q = 0;
    scanf("%d",&N);
    switch (N)
    {
    case 1:
        q = 1;
        break;
    case 2:
        q = 1;
        break;
    case 3:
        q = 1;
        break;
    case 4:
        q = 1;
        break;
    case 5:
        q = 1;
        break;
    case 6:
        q = 1;
        break;
    case 7:
        q = 1;
        break;
    case 8:
        q = 1;
        break;
    case 9:
        q = 1;
        break;
    case 10:
        q = 1;
        break;
    case 12:
        q = 1;
        break;
    case 14:
        q = 1;
        break;
    case 15:
        q = 1;
        break;
    case 16:
        q = 1;
        break;
    case 18:
        q = 1;
        break;
    case 20:
        q = 1;
        break;
    case 21:
        q = 1;
        break;
    case 24:
        q = 1;
        break;
    case 25:
        q = 1;
        break;
    case 27:
        q = 1;
        break;
    case 28:
        q = 1;
        break;
    case 30:
        q = 1;
        break;
    case 32:
        q = 1;
        break;
    case 35:
        q = 1;
        break;
    case 36:
        q = 1;
        break;
    case 40:
        q = 1;
        break;
    case 42:
        q = 1;
        break;
    case 45:
        q = 1;
        break;
    case 48:
        q = 1;
        break;
    case 49:
        q = 1;
        break;
    case 54:
        q = 1;
        break;
    case 56:
        q = 1;
        break;
    case 63:
        q = 1;
        break;
    case 64:
        q = 1;
        break;
    case 72:
        q = 1;
        break;
    case 81:
        q = 1;
        break;
    }
    if(q == 1) printf("Yes");
    else printf("No");
    return 0;
}

Measured memory_bytes: 128
#include <stdio.h>

int main() {
    int n, ac = 0, wa = 0, tle = 0, re = 0, i;
    char str[4];

    scanf("%d", &n);

    for (i = 0; i < n; i++) {
        scanf("%s", str);
        switch (str[0]) {
        case 'A':
            ac++;
            break;
        case 'W':
            wa++;
            break;
        case 'T':
            tle++;
            break;
        default:
            re++;
            break;
        }
    }

    printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d", ac, wa, tle, re);

    return 0;
}

Measured memory_bytes: 1704
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

class Main {
        public static void main(String[] args) throws Exception {
                BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                StringTokenizer st;
                int n = Integer.parseInt(br.readLine());
                st = new StringTokenizer(br.readLine());
                int a[] = new int[n+1];
                for(int i=0 ; i<n+1 ; i++) {
                        a[i] = Integer.parseInt(st.nextToken());
                }

                st = new StringTokenizer(br.readLine());
                int b[] = new int[n];
                long count = 0;
                for(int i=0 ; i<n ; i++) {
                        b[i] = Integer.parseInt(st.nextToken());
                        if(a[i] >= b[i]) {
                                count += b[i];
                                a[i] -= b[i];
                                b[i] = 0;
                        }
                        else {
                                b[i] -= a[i];
                                count += a[i];
                                a[i] = 0;
                                if(a[i+1] >= b[i]) {
                                        count += b[i];
                                        a[i+1] -= b[i];
                                        b[i] = 0;
                                }
                                else {
                                        b[i] -= a[i+1];
                                        count += a[i+1];
                                        a[i+1] = 0;
                                }
                        }
                }

                System.out.println(count);
        }
}


Measured memory_bytes: 44092
#include<stdio.h>

typedef struct {char suit, value;}Card;

void bubble(Card A[],int N){
    int i ,j;
    Card t;
    for(i=0;i<N;i++){
        for(j=N-1;j>=i;j--){
            if(A[j].value<A[j-1].value){
                t=A[j];A[j]=A[j-1];A[j-1]=t;
            }
        }
    }
}

void selection(Card A[],int N){
    int i,j,minj;
    Card t;
    for(i=0;i<N;i++){
        minj=i;
        for(j=i;j<N;j++){
            if(A[j].value<A[minj].value)minj=j;
        }
        t=A[i];A[i]=A[minj];A[minj]=t;
    }
}

void print (Card A[],int N){
    int i;
    for(i=0;i<N;i++){
        if(i>0)printf(" ");
            printf("%c%d",A[i].suit,A[i].value);
    }
    printf("\n");
}

int isStaable(Card C1[],Card C2[],int N){
    int i;
    for(i=0;i<N;i++){
        if(C1[i].suit!=C2[i].suit)return 0;
    }
    return 1;
}


void str2Card(Card*t,char str[]){
    t->suit=str[0];
    t->value=str[1]-'0';
}

int main(void){
    Card C1[100],C2[100];
    int N,i;
    char str[3];

    scanf("%d",&N);
    for(i=0;i<N;i++){
        scanf("%s",str);
        str2Card(&C1[i],str);
    }

    for(i=0;i<N;i++)C2[i]=C1[i];

    bubble(C1,N);
    selection(C2,N);

    print(C1,N);
    printf("Stable\n");
    print(C2,N);
    if(isStaable(C1,C2,N)){
        printf("Stable\n");
    }else{
        printf("Not stable\n");
    }

    return 0;
}


Measured memory_bytes: 2100
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cctype>
 
#include <algorithm>
#include <tuple>
#include <random>
#include <bitset>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <vector>
#include <chrono>
#include <iostream>
#include <limits>
#include <numeric>
 
#define LOG(FMT...) fprintf(stderr, FMT)

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (T& x : v)
    is >> x;
  return is;
}
 
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  if (!v.empty()) {
    os << v.front();
    for (int i = 1; i < v.size(); ++i)
      os << ' ' << v[i];
  }
  return os;
}

const int N = 100010, P = 1000000007;

int fac[N * 2], ifac[N * 2];

int binom(int n, int m) { return fac[n] * (ll)ifac[m] % P * ifac[n - m] % P; }

void prepare(int n) {
  fac[0] = 1;
  for (int i = 1; i <= n; ++i)
    fac[i] = fac[i - 1] * (ll)i % P;
  ifac[0] = ifac[1] = 1;
  for (int i = 2; i <= n; ++i)
    ifac[i] = -(P / i) * (ll)ifac[P % i] % P + P;
  for (int i = 2; i <= n; ++i)
    ifac[i] = ifac[i - 1] * (ll)ifac[i] % P;
}

void add(int& x, int y) {
  if ((x += y) >= P)
    x -= P;
}

void sub(int& x, int y) {
  if ((x -= y) < 0)
    x += P;
}

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

  int n, m, a, b;
  cin >> n >> m >> a >> b;
  prepare(n + m);
  int ans = binom(n - 1 + m - 1, n - 1);
  for (int i = 1; i <= b; ++i)
    sub(ans, binom(n - a - 1 + i - 1, i - 1) * (ll)binom(a - 1 + m - i, m - i) % P);
  cout << ans;

  return 0;
}


Measured memory_bytes: 1792
n = gets.to_i
a = gets.split.map(&:to_i)
c = Array.new(60, 0)
a.each do |aa|
    i = 0
    while aa > 0
        if aa % 2 == 1
            c[i] += 1
        end
        aa /= 2
        i += 1
    end
end
ans = 0
k = 1
c.each do |cc|
    ans += (cc * (n - cc) * k)
    ans %=  (10 ** 9 + 7)
    k *= 2
end
puts ans

Measured memory_bytes: 36892
def ss(x):
  if x in ('1','2','3','4','5','6','7','8','9','0'):
    return 0
  else:
    return 1

a,b=[int(i) for i in input().split(' ')]
n=input()
x=0
for i in range(len(n)):
  
  if i<a:
    x+=ss(n[i])
  elif i==a:
    if n[i]!='-':
      x+=1
  elif i<=a+b:
    x+=ss(n[i])
  elif i>a+b:
    x+=1

if x>0:
  print('No')
else:
  print('Yes')

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
#define iinf 2000000000
#define linf 1000000000000000000LL
#define ulinf 10000000000000000000ull
#define MOD1 1000000007
#define lson(v) ((v)<<1)
#define rson(v) (((v)<<1)^1)
#define mpr make_pair
typedef long long LL;
typedef unsigned long long ULL;
typedef unsigned long UL;
typedef unsigned short US;
typedef pair < int , int > pii;
clock_t __stt;
inline void TStart(){__stt=clock();}
inline void TReport(){printf("\nTaken Time : %.3lf sec\n",(double)(clock()-__stt)/CLOCKS_PER_SEC);}
template < typename T > T MIN(T a,T b){return a<b?a:b;}
template < typename T > T MAX(T a,T b){return a>b?a:b;}
template < typename T > T ABS(T a){return a>0?a:(-a);}
template < typename T > void UMIN(T &a,T b){if(b<a) a=b;}
template < typename T > void UMAX(T &a,T b){if(b>a) a=b;}
int k,a[100005];
int main(){
    // inputing start
    scanf("%d",&k);
	int xb,x2;
	for(xb=0;xb<k;++xb) scanf("%d",a+xb);
    #ifdef LOCAL
        TStart();
    #endif
    // calculation start
	if(a[k-1]!=2){
		printf("-1\n");
		return 0;
	}
    LL mn=2LL,mx=3LL;
	for(xb=k-1;xb>=0;--xb){
		LL v=(LL)a[xb];
		mn=v*(LL)((mn+v-1LL)/v);
		mx=v*(LL)(mx/v)+v-1LL;
		if(mn>mx){
			printf("-1\n");
			return 0;
		}
	}
	if(mn<=mx)printf("%lld %lld\n",mn,mx); else printf("-1\n");
    #ifdef LOCAL
        TReport();
    #endif
    return 0;
}

Measured memory_bytes: 640
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <vector>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;

void judgePrime(int n, vector<bool>& isNotPrime)
{
	isNotPrime[0] = true;
	isNotPrime[1] = true;
	for (auto i = 2; i <= n; ++i)
	{
		if (!isNotPrime[i])
		{
			for (auto j = i * 2ll; j <= n; j += i)
			{
				isNotPrime[(int)j] = true;
			}
		}
	}
}


int main()
{
	auto n = (int)1e5;
	vector<bool> isNotPrime(n + 1);
	judgePrime(n, isNotPrime);

	vector<int> isSimilar(n + 1);
	for (auto i = 0; i <= n; ++i)
	{
		if (i % 2 > 0 && !isNotPrime[i] && !isNotPrime[(i + 1) / 2])
		{
			isSimilar[i] = true;
		}
	}

	vector<int> sum(n + 1);
	sum[0] = 0;
	for (auto i = 1; i < n + 1; ++i)
	{
		sum[i] = sum[i - 1];
		if (isSimilar[i])
		{
			++sum[i];
		}
	}

	int Q;
	cin >> Q;
	vector<int> ans;
	for (auto i = 0; i < Q; ++i)
	{
		int l, r;
		cin >> l >> r;
		ans.push_back(sum[r] - sum[l - 1]);
	}

	for (auto i = 0; i < Q; ++i)
	{
		cout << ans[i] << endl;
	}

	return 0;
}

Measured memory_bytes: 1916
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n); i++) 
#define dunk(n) cout << n << endl
#define all(a) (a).begin(),(a).end()
typedef pair<int,int> P;
typedef long long ll;

int main() {
    ll h;
    cin >> h;
    ll ans = 0,turn = 0;
    while(h > 0){
        h = h/2;
        turn++;
    }
    rep(i,turn){
        ans += pow(2,i);
    }
    dunk(ans);
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define    endl        '\n'
#define pii         pair<ll int,ll int>
#define vi          vector<ll int>
#define vvi            vector<vi>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll int)x.size()
#define hell        1000000007
#define rep(i,a,b)    for(ll int i=a;i<b;i++)
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define tr(c,i)        for(auto i = (c).begin(); i != (c).end(); i++)
#define present(c,x)    ((c).find(x) != (c).end()) 
#define cpresent(c,x)    (find(all(c),x) != (c).end()) 
using namespace std;
ll mod=1e9+7;
#define N  100005

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int TESTS=1;
    //cin>>TESTS;
    //ll cs=1;
    while(TESTS--)
    {
        double d,t,s; cin >> d >> t >> s;
        if(d/s <= t) cout << "Yes" << "\n";
        else cout << "No" << "\n";
    }
    return 0;
}

Measured memory_bytes: 3752
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    if N==1:
        print(1)
        exit()
    temp=0
    ans=[]
    for i in range(1,N+5):
        temp+=i
        ans.append(i)
        if temp>N:
            ans.remove(temp-N)
            break
        elif temp==N:
            break
    for i in range(len(ans)):
        print(ans[i])
        

main()


Measured memory_bytes: 74680
#include<bits/stdc++.h>
using namespace std;
#define ALL(x) (x).begin(),(x).end()
#define uniq(x) (x).erase(unique(ALL(x)),(x).end())
#define SORT(x) sort(ALL(x))
#define REV(x) reverse(ALL(x))
#define foreach(it,x) for(__typeof((x).begin()) it=(x).begin();it!=(x).end();it++)
#define debug(x) cerr<<#x<<"="<<(x)<<endl
#define gett() cerr<<"Time:"<<clock()<<"ms."<<endl
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rlcfpoj(x) scanf("%I64d",&x)
#define pi(x) printf("%d",x)
#define pl(x) printf("%lld",x)
#define plcfpoj(x) printf("%I64d",x)
#define lfd() printf("\n")
#define sp() printf(" ")
#define inrep(x) int x;scanf("%d",&x);while(x--)
int a,b,c;
int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>a>>b>>c;
	if(b+c<a){
		cout<<0<<endl;
	}
	else{
		cout<<b-a+c<<endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <cstring>
#include <string>
#include <stack>
#include <tuple>
#include <queue>

using namespace std;
typedef long long ll;
ll MOD = 1e9 + 7;


int main()
{
    int n, a, b;
    cin >> n >> a >> b;
    string s;
    cin >> s;
    int sum = 0;
    int sum_t = 0;
    for (auto& c: s)
    {
        bool flag = false;
        if (c == 'a' && sum < a + b) flag = true;
        if (c == 'b' && sum < a + b && sum_t < b)
        {
            flag = true;
            sum_t++;
        }
        if (flag)
        {
            cout << "Yes" << endl;
            sum++;
        }
        else
        {
            cout << "No" << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 896
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=2e5+5;
int tot,n,a[N<<1],b[N],nex[N],bk[N],pre[N];
ll k,A,B;
bool vis[N];
ll getdis(int s,int t)
{
    if(s==0) s=n;
    ll ans=0;
    while(s!=t)
    {
        ans+=nex[s];
        s=(s+nex[s])%n;
        if(s==0) s=n;
    }
    return ans;
}
void getAns(int now)
{
    for(int i=now;i<=n;i++)
    {
        int x=a[i];
        if(pre[x])
        {
            while(b[tot]!=x) pre[b[tot]]--,tot--;
            pre[x]--;tot--;
        }
        else b[++tot]=x,pre[x]++;
    }
}
int main()
{
    scanf("%d%lld",&n,&k);
    for(int i=1;i<=n;i++)
        scanf("%d",&a[i]),a[i+n]=a[i];
    for(int i=n<<1;i>=1;i--)
    {
        if(i<=n)
            nex[i]=bk[a[i]]-i+1;
        bk[a[i]]=i;
    }
    int now=1;
    while(!vis[now])
    {
        vis[now]=true;
        now=(now+nex[now])%n;
        if(now==0) now=n;
    }
    A=getdis(1,now);
    B=getdis(now+nex[now],now)+nex[now];
    k*=n;
    k--;
    if(k<=A)
    {
        int now=1;
        while(k>=nex[now])
        {
            k-=nex[now];
            now=(now+nex[now])%n;
            if(now==0) now=n;
        }
        getAns(now);
    }
    else
    {
        k-=A;
        k%=B;
        while(k>=nex[now])
        {
            k-=nex[now];
            now=(now+nex[now])%n;
            if(now==0) now=n;
        }
        getAns(now);
    }
    for(int i=1;i<=tot;i++)
        printf(i==tot?"%d\n":"%d ",b[i]);
}


Measured memory_bytes: 6400
#include<bits/stdc++.h>
#ifdef LOCAL
#include "lib/debug.hpp"
#else
#define debug(...) 1
#endif
#define ALL(a) (a).begin(), (a).end()
#define rep(i, n) REP(i, 0, (n))
#define repc(i, n) REPC(i, 0, (n))
#define REP(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define REPC(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define REPCM(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
using namespace std;
using ll = int_fast64_t;
using pr = pair<ll, ll>;
using vll = vector<ll>;
using vpr = vector<pr>;
template<class T> inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } else return false; }
template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; }

void answer() {
  int x, y;
  cin >> x >> y;
  repc(t, x) {
    int k = x - t;
    if(t * 2 + k * 4 == y) {
      cout << "Yes\n";
      return;
    }
  }
  cout << "No\n";
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  answer();
  return 0;
}

Measured memory_bytes: 3648
#include<iostream>
#include<string>
#include<math.h>
using namespace std;

int main() {
	char S[20];
	string T;
	string p;
	string Q;
	double m;
	int a = 0;
	int A = 0;
	int b = 0;
	int B = 0;
	int c = 0;
	int C = 0;
	int q, w, z;
	int n = 0;
	int x = 0;
	int y = 0;
	int ans = 0;
	cin >> n;
	if (n >= 1000) {
		cout << "ABD";
	}
	else {
		cout << "ABC";
	}

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define MAX_INF 0x7f
#define MAX_INF_VAL 0x7f7f7f7f
#define pi 3.141592653589
#define eps 1e-10
//#define p 2173412051LL
#define sz 2

using namespace std;

int main() {
	int n, m;
	scanf( "%d%d", &n, &m );
	if( n > m )
		swap( n, m );
	for( int i = 0; i < m; ++i )
		printf( "%d", n );
	return 0;
}

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

int vis[MAX];
vector<int> g[MAX];
int cont;

void dfs(int node){
	vis[node]=1;
	cont++;
	
	for (int i=0; i<(int)g[node].size(); i++){
		if (!vis[g[node][i]]) dfs(g[node][i]);
	}

}



int main(){
	int n,m;
	cin>>n>>m;
	
	for (int i=0; i<m; i++){
		int x,y;
		cin>>x>>y;
		
		g[x].push_back(y);
		g[y].push_back(x);
	}
	
	int res=0;
	
	for (int i=1; i<=n; i++){
		if (!vis[i]){
			cont=0;
			dfs(i);
			
			res=max(res,cont);
			
		}
	}
	
	
	cout<<res<<endl;




}


Measured memory_bytes: 21576
def main():
    n = int(input())
    al = []
    bl = []
    for _ in range(n):
        a, b = map(int, input().split())
        al.append(a)
        bl.append(b)
    als = list(sorted(al))
    bls = list(sorted(bl))
    if n%2:
        print(bls[n//2]-als[n//2]+1)
    else:
        print(bls[n//2-1]+bls[n//2]-als[n//2]-als[n//2-1]+1)

if __name__ == "__main__":
    main()

Measured memory_bytes: 29408
/*
 * test.cpp
 *
 *
 *      Author: Fireworks
 */

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
#include<string>
#include<map>
#include<cmath>
#include<bitset>
#include<set>
#include<iomanip>
#include<fstream>
#include<bitset>
#include<cstring>
#include<cstdlib>
#include<complex>
#include<list>
#include<sstream>

using namespace std;

typedef pair<int,int> ii;
typedef pair<int,long long> il;
typedef pair<long long,long long> ll;
typedef pair<ll,int> lli;
typedef pair<long long,int> li;
typedef pair<double,double> dd;
typedef pair<ii,int> iii;
typedef pair<double,int> di;
long long mod = 1000000007LL;
long long base = 10000007;
long long large = 1000000000000000000LL;



int main(){
	int n;
	cin>>n;
	vector<int> a(2*n,0);
	for(int i=0;i<2*n;i++){
		cin>>a[i];
	}
	sort(a.begin(),a.end());
	int ans = 0;
	for(int i=0;i<n;i++){
		ans+=a[2*i];
	}
	cout<<ans<<endl;

	return 0;
}


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

using namespace std;
typedef long long ll;
//typedef unsigned long long ll;

#define rep(i, n) for (int i = 0; i < (n); ++i)
//#define rep(i, n) for (ll i = 0; i < (n); ++i)
//#define sz(x) ll(x.size())
//typedef pair<ll, int> P;
typedef pair<ll, ll> P;
//const double INF = 1e10;
const ll INF = LONG_LONG_MAX / 10;
//const ll INF = (1ll << 31) - 1;
//const ll INF = 1e15;
const ll MINF = LONG_LONG_MIN;
//const int INF = INT_MAX / 10;
#define cmin(x, y) x = min(x, y)
#define cmax(x, y) x = max(x, y)
//typedef pair<int, int> P;
//typedef pair<double, double> P;

bool contain(set<P> &s, P a) { return s.find(a) != s.end(); }

//ifstream myfile("C:\\Users\\riku\\Downloads\\0_00.txt");
//ofstream outfile("log.txt");
//outfile << setw(6) << setfill('0') << prefecture << setw(6) << setfill('0') << rank << endl;
// std::cout << std::bitset<8>(9);


void print_line(vector<ll> &line) {
    if (line.size() == 0ll) {
        cout << endl;
        return;
    }
    for (ll i = 0; i < line.size(); i++) {
        cout << line[i];
        if (i == line.size() - 1) cout << endl;
        else cout << ' ';
    }
}


typedef priority_queue<long long, vector<long long>, greater<long long>> PQ_ASK;
const int mod = 1000000007;

int main() {
    int n;
    cin >> n;
    set<ll> numbers;
    rep(i, n) {
        ll a;
        cin >> a;
        numbers.insert(a);
    }

    if (numbers.size() == n) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }

}




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

using namespace std;

int main()
{
	// 入力
	int N;
	cin >> N;
	vector<int> A(N);
	vector<int> B(N);
	vector<int> C(N - 1);
	
	for (int i = 0; i < N; i++)
	{
		cin >> A[i];
	}
	for (int i = 0; i < N; i++)
	{
		cin >> B[i];
	}
	for (int i = 0; i < N - 1; i++)
	{
		cin >> C[i];
	}
		
	
	int answer = 0;
	int preEatIndex = -1;
	for (int i = 0; i < N; i++)
	{
		// 食べる料理のindex
		int eatIndex = A[i] - 1;
		
		// 満足度の加算
		answer += B[eatIndex];
		
		// 料理iを食べた直後に料理i + 1を食べた場合
		if (i > 0 && eatIndex == preEatIndex + 1)
		{
			// Ciの満足度を得る
			answer += C[preEatIndex];
		}
		
		// 前回の料理のindexを覚える
		preEatIndex = eatIndex;
	}
	
	// 出力
	cout << answer << endl;
	
	return 0;
}


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

using ll = long long;
using P = pair<int, int>;

const int INF = 1e9;
const int MOD = 1e9 + 7;

// 4近傍、8近傍
int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};

int main() {
  // 入力
  int N;
  cin >> N;
  ll x[N], y[N], h[N];
  int cnt = 0;
  for (int i = 0; i < N; i++) {
    cin >> x[i] >> y[i] >> h[i];
    if (h[i] > 0) cnt++;
  }

  if (cnt == 1) {
    for (int i = 0; i < N; i++) {
      if (h[i] > 0) {
        cout << x[i] << " " << y[i] << " " << h[i] << endl;
        return 0;
      }
    }
  } else {
    for (int i = 0; i <= 100; i++) {
      for (int j = 0; j <= 100; j++) {
        set<ll> st;
        ll H;
        for (int k = 0; k < N; k++) {
          if (h[k] == 0) continue;
          H = h[k] + llabs(x[k] - i) + llabs(y[k] - j);
          st.insert(H);
        }
        if ((int) st.size() == 1) {
          cout << i << " " << j << " " << H << endl;
          return 0;
        }
      }
    }
  }
  return 0;
}


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


int main()
{
    double a;
    while(~scanf("%lf",&a))
    {
        if(a<=48.00)
            printf("light fly\n");
        else if(a>48.00&&a<=51.00)
            printf("fly\n");
        else if(a>51.00&&a<=54.00)
            printf("bantam\n");
        else if(a>54.00&&a<=57.00)
            printf("feather\n");
        else if(a>57.00&&a<=60.00)
            printf("light\n");
        else if(a>60.00&&a<=64.00)
            printf("light welter\n");
        else if(a>64.00&&a<=69.00)
            printf("welter\n");
        else if(a>69.00&&a<=75.00)
            printf("light middle\n");
        else if(a>75.00&&a<=81.00)
            printf("middle\n");
        else if(a>81.00&&a<=91.00)
            printf("light heavy\n");
        else
            printf("heavy\n");
    }
    return 0;
}



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

int main() {
  int a, b;
  cin >> a >> b;
  
  int number = 0;
  if(b < 10)
    number = a*10 + b;
  else if (b < 100)
    number = a*100 + b;
  else
    number = a*1000 + b;
  
  bool ans = false;
  for(int i = 4; i < 320; i++) {
    if(number == i*i) {
      ans = true;
      break;
    }
  }
  
  if(ans)    cout << "Yes" << endl;
  else       cout << "No" << endl;
}

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

int main(int argc, char* argv[])
{
	int A,B,C,D;
	cin>>A>>B>>C>>D;
	if (B<C || D<A){
		cout<<0<<endl;
		return 0;
	}
	if (A<=C){
		if (D<=B){
			cout<<D-C<<endl;
			return 0;
		}else{
			cout<<B-C<<endl;
			return 0;
		}
	}else{
		if (B<=D){
			cout<<B-A<<endl;
			return 0;
		}else{
			cout<<D-A<<endl;
			return 0;
		}
	}
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define rng(a) a.begin(), a.end()
#define rrng(a) a.rbegin(), a.rend()
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define limit(x, l, r) max(l, min(x, r))
#define lims(x, l, r) (x = max(l, min(x, r)))
#define isin(x, l, r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)), x.end())
#define show(x) cout << #x << " = " << x << endl;
#define PQ(T) priority_queue<T, v(T), greater<T>>
#define bn(x) ((1 << x) - 1)
#define dup(x, y) (((x) + (y)-1) / (y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
typedef vector<T> vt;

int main() { 
  long double a, b, c;
  cin >> a >> b >> c;
  if(c-a-b <0){
    cout<<"No"<<endl;
    return 0;
  }
  if(2*sqrtl(a*b)<c-a-b) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
#define re register
#define cs const

using std::cerr;
using std::cout;
using pii=std::pair<int,int>;
#define fi first
#define se second

std::string inv(std::string s){
	std::string res="";
	std::reverse(s.begin(),s.end());
	for(char c:s)
		if(isupper(c))res+=c-'A'+'a';
		else res+=c-'a'+'A';
	return res;
}

int n;
std::string A;

void Main(){
	std::cin>>n>>A;
	if(A[0]=='0'){
		puts("Impossible");
		return ;
	}for(int re i=0;i<(1<<n);++i)
		if(A[i]=='1')for(int re j=i;j;j=i&(j-1))
			if(A[j]=='0'){
				puts("Impossible");
				return ;
			}
	std::vector<pii> p({{0,0}});
	for(int re s=0;s<(1<<n);++s)if(A[s]=='0'){
		bool flag=true;
		for(int re t=s&(s-1);t&&flag;t=s&(t-1))
			if(A[t]=='0')flag=false;
		if(!flag)continue;
		std::string q;
		for(int re i=0;i<n;++i)
			if(s&(1<<i)){
				if(q.empty())q+='a'+i;
				else q=(char)('a'+i)+q+(char)('A'+i)+inv(q);
			}
		int nw=0;
		for(char c:q){
			int i,dir;
			if(isupper(c))
				i=c-'A',dir=0;
			else 
				i=c-'a',dir=1;
			for(int j=nw+1;j<=i;++j)
				p.push_back({j,0});
			for(int j=nw-1;j>=i;--j)
				p.push_back({j,0});
			nw=i;
			if(dir){
				p.push_back({i,1});
				p.push_back({i+1,1});
				p.push_back({i+1,0});
				p.push_back({i,0});
			}else {
				p.push_back({i+1,0});
				p.push_back({i+1,1});
				p.push_back({i,1});
				p.push_back({i,0});
			}
		}
		for(int j=nw-1;~j;--j)
			p.push_back({j,0});
	}
	cout<<"Possible\n"<<(p.size()-1)<<"\n";
	for(auto t:p)cout<<t.fi<<" "<<t.se<<"\n";
}

inline void file(){
#ifdef zxyoi
	freopen("E.in","r",stdin);
#endif
}signed main(){file();Main();return 0;}

Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <iomanip>
#include <map>
using namespace std;

#define INF 1e9
#define LLINF 1e18
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;

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


int main() {
    int n;
    string s;
    cin >> n >> s;
    int ans = 0, a = 0;
    rep(i, n) {
        if (s.at(i) == 'I') a++;
        else a--;
        ans = max(a, ans);
    }
    cout << ans << endl;
}

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

using namespace std;

const int INF = 1000000000;

int main()
{
    ios_base::sync_with_stdio(0);
    int n, m;
    cin >> n >> m;
    vector< vector<int> > G(10, vector<int>(10));
    for (int i = 0; i < 10; ++i)
        for (int j = 0; j < 10; ++j)
            cin >> G[i][j];
    for (int i = 0; i < 10; ++i)
        G[i][i] = INF;
    vector<int> wyst(10, 0);
    for (int i = 0; i < n; ++i)
    {
        for (int j = 0; j < m; ++j)
        {
            int c;
            cin >> c;
            if (c != -1)
                ++wyst[c];
        }
    }
    for (int i = 0; i < 10; ++i)
        for (int j = 0; j < 10; ++j)
            for (int k = 0; k < 10; ++k)
                G[j][k] = min(G[j][k], G[j][i] + G[i][k]);
    int odp = 0;
    for (int i = 0; i < 10; ++i)
        if (i != 1)
            odp += wyst[i] * G[i][1];
    cout << odp;
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<string>
#include<algorithm>
#include<cmath>
//#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<long long> vll;
template <class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return 1;} return 0;}
template <class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return 1;} return 0;}
template <class T> inline T gcd(T a, T b) {if(a==0) return b; return gcd(b%a,a);}
template <class T> inline T lcm(T a, T b) {return a * b / gcd(a,b);}
template <class T> inline T sum(vector<T> &vec) {T res=0; for (int i = 0; i < vec.size(); i++) res += vec[i]; return res;}
template <class T> inline T mpow(T a, T b) {if(b==0)return 1; T c = mpow(a,b/2);if(b%2==1)return c*c*a; return c*c;}
const int INF = 1 << 30;
const long long INFLL = 1LL << 60;
typedef pair<int, int> P;

#define REP(i,n) for (int (i)=0;(i)<(n);(i)++)
#define FOR(i,n) for (int (i)=0;(i)<(n);(i)++)
#define REPB(i,n) for (int (i)=((n)-1);(i)>=0;(i)--)
#define FORB(i,n) for (int (i)=((n)-1);(i)>=0;(i)--)
#define SORT(A) sort((A).begin(),(A).end())

int main() {
    ll N, M;
    cin >> N >> M;
    vll A(N);
    FOR(i,N) cin >> A[i];
    int twos = 0;
    while (A[0] % 2 == 0) {
        twos++; A[0] /= 2;
    }
    for (int i = 1; i < N; i++) {
        FOR(j,twos) {
            if (A[i] % 2 == 1) {
                cout << 0 << endl; return 0;
            }
            A[i] /= 2;
        }
        if (A[i] % 2 == 0) {
            cout << 0 << endl; return 0;
        }
    }
    ll l = A[0] * mpow(2,twos-1);
    for (int i = 1; i < N; i++) {
        if (l > M) {
            cout << 0 << endl; return 0;
        }
        l = lcm(l,A[i]);
    }
    cout << (M/l+1)/2 << endl;
}


Measured memory_bytes: 1024
#include<iostream>
//#include<vector>
//#include<algorithm>
#define ll long long int
using namespace std ;



const int maxn = 1e5+10;

int stone ;
int dp[maxn];
int cost[maxn];



int min(int a, int b)
{
    if (a <= b) return a;
    return b;
}

int k ;

int abs(int x)
{
    if(x<0)
        return (-1*x);
    return x;
}





int fun (int pos)
{
    if( pos > stone )return 0;


    if( dp[pos]!= -1 )
        return dp[pos];
    else
    {
        int ans = 0 ;

        if(pos + 1 <= stone )
        {
            ans = fun(pos+1) + abs(cost[pos] - cost[pos+1]);
           // dp[pos] = ans ;
        }

        for(int i = 2 ; i<=k ; i++)
        {
            if( pos + i <= stone  )
            {
                ans = min( ans,  fun(pos+i) + abs(cost[pos] - cost[pos+i]) );
            }
        }
        return dp[pos] =  ans ;

    }

}


int main()
{
    cin >> stone ;
    cin >> k ;

    for(int i = 1 ; i<=stone ; i++)
    {
        cin >> cost[i];
        dp[i] = -1;
    }

    cout << fun(1)<<endl;


    return 0 ;
}


Measured memory_bytes: 5760
use std::io::prelude::*;

fn input<T: std::str::FromStr>() -> T {
    let stdin = std::io::stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}

#[allow(dead_code)]
fn with_stdout_lock<F: FnOnce(std::io::BufWriter<std::io::StdoutLock>)>(f: F) {
    let out = std::io::stdout();
    let w = std::io::BufWriter::new(out.lock());
    f(w);
}

#[allow(unused_macros)]
macro_rules! debug {
    ($var:expr) => {
        match &$var { v => eprintln!(concat!(stringify!($var), "={:?}"), v) }
    };
    ($var:expr, $($vars:expr),*) => {
        match &$var { v => eprint!(concat!(stringify!($var), "={:?} "), v) }
        debug!($($vars),*);
    };
}

fn main() {
    let n: i64 = input();

    if n == 0 {
        println!("0");
    } else if n > 0 {
        let mut m = 0;
        let mut k = 0;
        while m < n {
            m += 1 << k as i64;
            k += 2;
        }
        let mut v = vec![0; k - 1];
        v[0] = 1;
        let diff = m - n;
        for i in 1..k - 1 {
            let j = k - 1 - i - 1;
            if ((diff >> j as i64) & 1 == 1 && j & 1 == 1)
                || ((diff >> j as i64) & 1 == 0 && j & 1 == 0)
            {
                v[i] = 1;
            }
        }
        with_stdout_lock(|mut w| {
            for v in v {
                write!(w, "{}", v).unwrap();
            }
            writeln!(w, "").unwrap();
        });
    } else {
        let mut m = 0;
        let mut k = 1;
        while m > n {
            m -= 1 << k as i64;
            k += 2;
        }
        let mut v = vec![0; k - 1];
        v[0] = 1;
        let diff = m.abs() - n.abs();
        for i in 1..k - 1 {
            let j = k - 1 - i - 1;
            if ((diff >> j as i64) & 1 == 1 && j & 1 == 0)
                || ((diff >> j as i64) & 1 == 0 && j & 1 == 1)
            {
                v[i] = 1;
            }
        }
        with_stdout_lock(|mut w| {
            for v in v {
                write!(w, "{}", v).unwrap();
            }
            writeln!(w, "").unwrap();
        });
    }
}


Measured memory_bytes: 4352
A,B,C,D,E,F = map(int,input().split())
f = F//100

ans = [0,0]
per = -1

for w in range(1,f+1):
    wt = 0
    for b in range(0,w+1,B):
        if (w-b)%A == 0:
            wt = 1
            break
    if wt == 0:
        continue

    water = w*100

    for s in range(min(w*E,F-water),-1,-1):
        st = 0
        for d in range(0,s+1,D):
            if (s-d)%C == 0:
                st = 1
                break
        if st == 1:
            break

    if s/(s+water) > per:
        ans = [s+water,s]
        per = s/(s+water)

print(' '.join(map(str,ans)))


Measured memory_bytes: 3064
fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val k = readLine()!!.toInt()
    val x = readLine()!!.toInt()
    val y = readLine()!!.toInt()

    var cost = 0
    for (i in 0 until n) {
        if (i + 1 <= k) {
            cost += x
        } else {
            cost += y
        }
    }
    println(cost)
}

Measured memory_bytes: 34324
#include <ios>
#include <iomanip>
#include <iostream>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <climits>

using namespace std;
typedef long long int ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007
#define INF (1e9)
#define PI (acos(-1))
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
typedef pair <ll,ll> P;

int main()
{
    ll N;
    cin >> N;
    map<ll, ll> mp;
    rep(i, N) {
        ll D;
        cin >> D;
        mp[D]++;
    }
    ll M;
    cin >> M;
    rep(i, M) {
        ll T;
        cin >> T;
        if(mp[T] > 0) {
            mp[T] --;
        } else {
            NO;
            return 0;
        }
    }
    YES;
    return 0;
}


Measured memory_bytes: 12800
/*
[abc127] F - Absolute Minima
*/

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;

const int MAX_Q = 2e5;
const int INF = 1e9 + 1;

struct Query {
    bool ty;
    int a, b;
};

int Q;
Query qs[MAX_Q];
multiset<int> ls = {-INF}, rs = {INF};

pll update(Query &q, ll fx) {
    int lx = *ls.rbegin();
    int rx = (ls.size() == rs.size()) ? *rs.begin() : lx;
    if (q.a < lx) {
        fx += lx - q.a;
    } else if (rx < q.a) {
        fx += q.a - rx;
    }
    fx += q.b;

    if (ls.size() > rs.size()) {
        rs.insert(q.a);
    } else {
        ls.insert(q.a);
    }
    auto lr = *ls.rbegin(), rl = *rs.begin();
    if (lr > rl) {
        ls.erase(--ls.end());
        rs.erase(rs.begin());
        ls.insert(rl);
        rs.insert(lr);
    }

    return {*ls.rbegin(), fx};
}

void solve() {
    pll ans = {0, 0};
    for (int i = 0; i < Q; i++) {
        if (qs[i].ty) {
            cout << ans.first << " " << ans.second << endl;
        } else {
            ans = update(qs[i], ans.second);
        }
    }
}

int main() {
    cin >> Q;
    for (int i = 0; i < Q; i++) {
        int tmp_ty;
        cin >> tmp_ty;
        qs[i].ty = (tmp_ty == 2);
        if (!qs[i].ty) {
            cin >> qs[i].a >> qs[i].b;
        }
    }
    solve();

    return 0;
}


Measured memory_bytes: 11904
N = int(input())
 
div_counts = []
for i in range(2, int(N**0.5)+1):
    count = 0
    while N%i == 0:
        count += 1
        N //= i
        if N == 1: break
    div_counts.append(count)

if N != 1: div_counts.append(1)

ans = 0
for count in div_counts:
    for i in range(1, count+1):
        if count >= i:
            ans += 1
            count -= i
print(ans)

Measured memory_bytes: 17136
#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <list>
#include <iterator>
#include <assert.h>
#pragma warning(disable:4996) 
 
typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF 9223300000000000000
#define INF 2140000000
const long long MOD = 1000000007;
using namespace std;


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

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



    return 0;
}



Measured memory_bytes: 128
#include <stdio.h>

int main(){
	int n,i,count=0;
  long long h,k,a[1001],b[1001];
  
  	scanf("%d %lld %lld",&n,&h,&k);
  
  for(i=0;i<n;i++){
    	scanf("%lld %lld",&a[i],&b[i]);
    if(a[i]>=h && b[i]>=k){
	count++;
    }
  }
 	printf("%d", count);
}
  


Measured memory_bytes: 128
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <tuple>
#include <deque>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cassert>
#include <chrono>
#include <random>
#include <limits>
#include <iterator>
#include <functional>
using namespace std;

#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)

typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, double> Pid;
typedef pair<double, int> Pdi;
const double PI = 3.1415926535897932;   // acos(-1)
const double EPS = 1e-15;
const int mod = 1e+9 + 7;
const int INF = 1001001001;

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

    string s, t;
    int q;
    cin >> s >> t >> q;
    int ns = s.length();
    int nt = t.length();
    vector<int> ssum(ns+1, 0), tsum(nt+1, 0);
    for(int i = 0; i < ns; ++i){
        ssum[i+1] = (ssum[i] + (s[i] - 'A' + 1)) % 3;
    }
    for(int i = 0; i < nt; ++i){
        tsum[i+1] = (tsum[i] + (t[i] - 'A' + 1)) % 3;
    }
    for(int i = 0; i < q; ++i){
        int a, b, c, d;
        cin >> a >> b >> c >> d;
        --a, --c;
        int snum = (ssum[b] - ssum[a]) % 3;
        if(snum < 0)    snum += 3;
        int tnum = (tsum[d] - tsum[c]) % 3;
        if(tnum < 0)    tnum += 3;
        if(snum == tnum)    cout << "YES\n";
        else    cout << "NO\n";
    }
}

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

int main() {
  long n,ans;
  string s;
  cin >> n >> s;
  for(char i1='0';i1<='9';i1++) {
    long a=-1;
    for(long j=0;j<n;j++) {
      if(s[j]==i1){
        a=j;
        break;
      }
    }
    if(a==-1) continue;
    for(char i2='0';i2<='9';i2++) {
      long b=-1;
      for(long j=a+1;j<n;j++) {
        if(s[j]==i2){
          b=j;
          break;
        }
      }
      if(b==-1) continue;
      for(char i3='0';i3<='9';i3++) {
        for(long j=b+1;j<n;j++) {
          if(s[j]==i3){
            ans++;
            break;
          }
        }
      }
    }
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <set>
#include <map>
#include <math.h>

#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define repP(i, a, b) for(int i = a; i < b; i++)
#define repM(i, a, b) for(int i = a - 1; i >= b; i--)

using namespace std;

int main()
{
  int a = 0 , b = 0, c = 0, d = 0, e = 0, f = 0, i = 0, j = 0;
  int num = 0, count = 0, ans = 0;
  double d1 = 0, d2 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
  int a1[999999], a2[999999], a3[999999];
  //char s1[200000], s2[200000], s3[200000];
  //string s1, s2, s3;
  
  cin >> a >> b;
  if(a == 1){
    c += 300000;
  }
  if(a == 2){
    c+= 200000;
  }
  if(a == 3){
    c += 100000;
  }
    if(b == 1){
    c += 300000;
  }
  if(b== 2){
    c+= 200000;
  }
  if(b == 3){
    c += 100000;
  }
  if(a == b && a == 1){
    c+= 400000;
  }
  cout << c << endl;
}
  

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

int main() {
  int n,ans = 1,d = 1;
  cin >> n;
  int dc = 0;
  rep(i,n){
    int a;
    cin >> a;
    if(a%2 == 0) dc++;
  }
  rep(i,n) ans *= 3;
  rep(i,dc) d *= 2;
  cout << ans-d << endl;
}

Measured memory_bytes: 256
str = gets.chomp
arr = []
while true
  value = gets.chomp.split(" ")
  arr << value
  break if value[0] == "END_OF_TEXT"
end
ans = 0
arr.each do |value|
  value.each do |val2|
    if val2.capitalize == str.capitalize
      ans += 1
    end
  end
end

p ans

Measured memory_bytes: 6100