akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll=long long;
using vi=vector<int>;
using vl=vector<long long>;
using pii=pair<int,int>;
using pll=pair<long long,long long>;
#define ITR(i,c) for(auto i=begin(c);i!=end(c);++i)
#define FORE(x,c) for(auto &x:c)
#define FOR(i,a,n) for(int i=a,i##_len=(int)n;i<i##_len;++i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i=((int)(n)-1);i>=0;--i)
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)   // c++14
#define SZ(c) ((int)c.size())
#define dump(...)
const int DX[9]={0,1,0,-1,1,1,-1,-1,0}, DY[9]={-1,0,1,0,-1,1,1,-1,0};
const int INF=1001001001; const long long INFLL=1001001001001001001ll;
template<class T> ostream& operator << (ostream &os, const vector<T> &v) {
    ITR(i,v) os << *i << (i==end(v)-1 ? "" : " "); return os; }
template<class T> istream& operator >> (istream &is, vector<T> &v) {
    ITR(i,v) is >> * i; return is; }
template<class T> istream& operator >> (istream &is, pair<T,T> &p) {
        is >> p.second >> p.first; return is; }
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return 1;}return 0;}
//------------------------------------------------------------------------------
struct before_main_function {
    before_main_function() {
    #ifdef int
        cerr<<"\x1b[7m"<<"'int' is defined as 'long long' !!!!"<<"\x1b[m"<<endl;
    #endif
        cin.tie(0);ios::sync_with_stdio(false);
        cout<<setprecision(12)<<fixed;
    }
} before_main_function;
//------------------------------------------------------------------------------

signed main() {
    int a,b;
    char op;
    cin>>a>>op>>b;
    if(op=='+') cout<<a+b<<endl;
    if(op=='-') cout<<a-b<<endl;
    return 0;
}


Measured memory_bytes: 256
#pragma GCC optimize("O3")
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
typedef  unsigned long long int ull;
typedef pair<ll,ll> P;
template<class T> using V=vector<T>; 
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
struct mint{
    using ull=unsigned long long int;
    ull v;
    mint(ll vv=0){s(vv%mod+mod);}
    mint& s(ull vv){
        v=vv<mod?vv:vv-mod;
        return *this;
    }
    //オーバーロード
    mint operator-()const{return mint()-*this;}//符号反転
    mint&operator+=(const mint&val){return s(v+val.v);}
    mint&operator-=(const mint&val){return s(v+mod-val.v);}
    mint&operator*=(const mint&val){
        v=ull(v)*val.v%mod;
        return *this;
    }
    mint&operator/=(const mint&val){return *this*=val.inv();}
    mint operator+(const mint&val){return mint(*this)+=val;}
    mint operator-(const mint&val){return mint(*this)-=val;}
    mint operator*(const mint&val){return mint(*this)*=val;}
    mint operator/(const mint&val){return mint(*this)/=val;}
    mint pow(ll n)const{
        mint res(1),x(*this);
        while(n){
            if(n&1)res*=x;
            x*=x;
            n>>=1;
        }
        return res;
    }
     mint inv()const{return pow(mod-2);}
    //拡張ユークリッドの互除法
    /* mint inv()const{
        int x,y;
        int g=extgcd(v,mod,x,y);
        assert(g==1);
        if(x<0)x+=mod;
        return mint(x);
    }*/
    friend ostream& operator<<(ostream&os,const mint&val){
        return os<<val.v;
    }//出力
    bool operator<(const mint&val)const{return v<val.v;}
    bool operator==(const mint&val)const{return v==val.v;}
    bool operator>(const mint&val)const{return v>val.v;}
};
map<P,P> mp;
int main(){
  ll n;
  cin>>n;
  ll zero=0;
  for(int i=0;i<n;i++){
    ll x,y;
    cin>>x>>y;
    if(x==0&&y==0){
      zero++;
      continue;
    }
    ll g=GCD(x,y);
    x/=g;y/=g;
    if(y<0){
      y=-y;
      x=-x;
    }
    if(y==0&&x<0){
      x=-x;
    }
    if(x<=0){
     mp[P(y,-x)].fi++;
    }else{
      mp[P(x,y)].se++;
    }
  }
  mint ans=1;
  for(auto p:mp){
      ll s=p.se.fi,t=p.se.se;
      mint now=1;
      now+=mint(2).pow(s)-mint(1);
      now+=mint(2).pow(t)-mint(1);
      ans*=now;
  }
  ans-=mint(1);
  ans+=mint(zero);
  cout<<ans<<"\n";
}

Measured memory_bytes: 19140
inputs= list(map(int,input().split()))
k = inputs[0]
s = inputs[1]
answer = 0
for i in range(k+1):
  x = i
  for l in range(k+1):
    y = l
    z = s-x-y
    if z >= 0 and z <= k :
      answer += 1
print(answer)
      

Measured memory_bytes: 2940
#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
 int i,k,n;
 long long int ans=0;
 cin >> n;
 int a[n];
 for(i=0;i<n;i++)
 cin >> a[i];
 sort(a,a+n);
 ans=a[n-1];
 k=n-2;
 for(i=(n-2);k>0 && i>=0;i--)
 {
  if(k>1)
  {
   k-=2;
   ans+=2*a[i];
  }
  else if(k==1)
  {
   ans+=a[i];
   k--;
  }
 }
 cout << ans;
 return 0;
}

Measured memory_bytes: 4420
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //コード
    	Scanner sc = new Scanner(System.in);
//    	File file = new File("src/in.txt");
//    	Scanner sc = new Scanner(file);
    	long X = sc.nextLong();
    	int year = 0;
    	long sum = 100;

    	while(sum < X) {
    		year = year + 1;
    		sum = (long) (sum + Math.floor(sum * 0.01));
    	}
    	System.out.println(year);
    }
}

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

string s;

int main(void){
    
    cin >> s;
    
    int sum = 0;
    for(int i = 0; i < s.size(); ++i){
        sum += s[i] - '0';
    }
    
    if(stoi(s) % sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll>
#define cvector vector<char>
#define svector vector<string>
#define lque queue<ll>
#define lpque priority_queue<ll>
#define dlpque priority_queue<ll,lvector,greater<ll>>
#define P pair<ll,ll>
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define rep(i,n) for(ll i=0; i<n; ++i)
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll h,w,k,ans=0;cin>>h>>w>>k;
  vector<vector<char>> G(h,vector<char>(w));
  rep(i,h)rep(j,w) cin>>G[i][j];
  for(ll tate=0;tate<(1<<h);tate++) {
    for(ll yoko=0;yoko<(1<<w);yoko++) {
      vector<vector<char>> tmp(G);
      rep(i,h) {
        if(1&(tate>>i)) {
          rep(j,w) tmp[i][j]='.';
        }
      }
      rep(i,w) {
        if(1&(yoko>>i)) {
          rep(j,h) tmp[j][i]='.';
        }
      }
      ll v=0;
      rep(i,h)rep(j,w) if(tmp[i][j]=='#') v++;
      if(v==k) ans++; 
    }
  }
  print(ans);
  return 0;
}

Measured memory_bytes: 3652
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

def main():
    n,k = inpm()
    if n == k or n%k == 0:
        print(0)
        return
    n = n%k
    print(min(n,abs(n-k)))
    
    
if __name__ == "__main__":
    main()

Measured memory_bytes: 39020
#include <iostream>
#include <string>
using namespace std;
#define MAX_N 100000

int n;
int h[MAX_N];

void solve()
{
    int ans = 0;
    int cnt = 0;
    int pre = 0;

    for (int i = 0; i < n; i++)
    {
        if (pre >= h[i])
        {
            cnt++;
        }
        else
        {
            ans = max(ans, cnt);
            cnt = 0;
        }
        pre = h[i];
    }
    // 最後に最高記録を更新するときもある
    ans = max(ans, cnt);

    cout << ans << endl;
}

int main()
{
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> h[i];
    }

    solve();
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
#define REP(i, n) for(long long i=0; i<n; i++)
#define REPR(i, n) for(long long i=n-1; i>=0; i--)
#define FOR(i, m, n) for(long long i=m; i<=n; i++)
#define FORR(i, m, n) for(long long i=m; i>=n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()
#define FIN ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;
const ll mod = 1e9+7;
const ll inf = 1e15;


ll power(ll a,ll b){return b?power(a*a%mod,b/2)*(b%2?a:1)%mod:1;}


int main(){FIN

    ll a,b;cin>>a>>b;
    a *= b;
    if(a%2==0) cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,k,i,ans=0;
  cin>>n>>k;
  vector<int> l(n);
  for(i=0;i<n;i++) cin>>l.at(i);
  sort(l.begin(),l.end());
  reverse(l.begin(),l.end());
  for(i=0;i<k;i++) ans+=l.at(i);
  cout<<ans<<endl;
}

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



int main() {
    ios_base::sync_with_stdio(false); 
    cin.tie(NULL);  
   	int n;
   	cin>>n;

   	auto getTop = [](priority_queue<float, vector<float>, greater<float>>& q){
   		float x = q.top();
   		q.pop();
   		return x;
   	};

   	priority_queue<float, vector<float>, greater<float>> v;
   	for(float i =0; i < n; i++) {
   		float x;
   		cin>>x;
   		v.push(x);
   	}

   	float ans = 0,x,y;
   	while(!v.empty()) {
   		x = getTop(v);
   		ans = x;
   		if(!v.empty()) {
   			y = getTop(v);
   			v.push((x+y)/2);
   		}
   	}
   	cout<<ans;

	return 0;		
}


Measured memory_bytes: 256
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
???????????? I

?¬?????±??????????????????????????????????????????¢??????????????\??¬????????§????????????????????°????????????????????????????????????
   +--+
 ???|???|
+--+--+--+--+
|???|???|???|???|
+--+--+--+--+
 ???|???|
   +--+

"""

class Dice:
    T = 0
    S = 1
    E = 2
    W = 3
    N = 4
    B = 5

    """ ????????????????????? """
    def __init__(self): # ?????????????????????
        self.side = [1, 2, 3, 4, 5, 6]
        self.top = 0

    def setDice(self, arr):  # ??¢??????????????????
        self.side = arr[0:6]

    def Turn(self, dir): # ?????????????????¢??????
        s = self.side

        if dir == "N":     # ????????¢??????
            #    Top 0     South 1   East 2    West 3    North 4   Bottom 5
            t = [s[Dice.S],s[Dice.B],s[Dice.E],s[Dice.W],s[Dice.T],s[Dice.N]]
        elif dir == "S": # ????????¢??????
            t = [s[Dice.N],s[Dice.T],s[Dice.E],s[Dice.W],s[Dice.B],s[Dice.S]]
        elif dir == "E": # ??±?????¢??????
            t = [s[Dice.W],s[Dice.S],s[Dice.T],s[Dice.B],s[Dice.N],s[Dice.E]]
        elif dir == "W": # ?\??????¢??????
            t = [s[Dice.E],s[Dice.S],s[Dice.B],s[Dice.T],s[Dice.N],s[Dice.W]]

        self.side = t
#        print("{0} T0:{1} S1:{2} W2:{3} E3:{4} N4:{5} B5:{6} ".format(dir, self.side[0],self.side[1], self.side[2],self.side[3], self.side[4],self.side[5]))

num = list(map(int,input().strip().split()))
cmd = input().strip()
d = Dice()
d.setDice(num)
for c in cmd:
    d.Turn(c)
print(d.side[0])

Measured memory_bytes: 7816
import qualified Data.ByteString.Char8 as B
import qualified Data.IntSet as S
import qualified Data.Array.IArray as A
import Data.Maybe
import Data.Bool

main = do
  [n,m] <- map read . words <$> getLine
  es <- readUndirectedEdge <$> B.getContents
  let g = buildG n es
  putStrLn $ bool "IMPOSSIBLE" "POSSIBLE" (voyage n g)

voyage n g = any (\v -> S.member n (from g v)) $ S.toList $ from g 1

type Vertex = Int
type Vertexes = S.IntSet
type Edge = (Vertex, Vertex)
type Graph = A.Array Vertex Vertexes

buildG :: Int -> [Edge] -> Graph
buildG n = A.accumArray (flip S.insert) S.empty (1, n)

size :: Graph -> Int
size = snd . A.bounds

from :: Graph -> Vertex -> Vertexes
from g = (g A.!)

degree :: Graph -> Vertex -> Int
degree g = S.size . (g A.!)

readUndirectedEdge :: B.ByteString -> [Edge]
readUndirectedEdge = concatMap (constructTwoWay . map readInt . B.words) . B.lines

constructTwoWay :: [Int] -> [Edge]
constructTwoWay [s,t] = [(s, t), (t, s)]
constructTwoWay _ = undefined

readInt :: B.ByteString -> Int
readInt = fst . fromJust . B.readInt

Measured memory_bytes: 57724
#include<bits/stdc++.h>
#define fasterthanlight ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define test int T; cin>>T; while(T--)
#define endl "\n"
#define int long long
#define vi vector<int>
#define pb push_back
#define mod 1000000007
#define MAX 1e9
#define MIN -1e9
#define hi "visited\n" //sasta debugging
using namespace std;

//author::@whohet-->Het Patel

signed main()
{
    fasterthanlight;
    //int n;cin>>n;
    //int arr[n];for(int i=0;i<n;i++)cin>>arr[i];sort(arr,arr+n);
    //string s;cin>>s;
    char s;
    cin >> s;
    if (s >= 65 && s <= 90)
        cout << "A";
    else
        cout << "a";
    //cout << "\n\n"<<"Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " seconds.\n";
    return 0;
}


Measured memory_bytes: 3648
import java.util.Scanner;

public class Main {
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		while(true){
			int n = in.nextInt();
			if(n == 0)break;
			for(int i = 0;i < n;i++){
				int pm = in.nextInt();
				int pe = in.nextInt();
				int pi = in.nextInt();
				if(pm == 100 ||pe == 100||pi == 100){
					System.out.println("A");
				}else if(pm + pe >= 180){
					System.out.println("A");
				}else if(pm + pe + pi >= 240){
					System.out.println("A");
				}else if(pm + pe + pi >= 210){
					System.out.println("B");
				}else if(pm + pe + pi >= 150 && (pm >= 80 || pe >= 80)){
					System.out.println("B");
				}else {
					System.out.println("C");
				}
			}
		}
	}
}

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

using namespace std;
int main(){
	int n;
	cin>>n;
	int l = 0,r = 0,flag = 0;
	int a[50+5];
	for(int i = 1;i <= n;i++){
		cin>>a[i];
		if(l == 0&&i != a[i]){
			flag++;
			l = a[i];
		}else if(i != a[i]){
			flag++;
			r = a[i];
		}
	}
	if(flag == 0 || (a[l] = r&& flag == 2)){
		cout<<"YES"<<endl;
	}else{
		cout<<"NO"<<endl;
	}
}

Measured memory_bytes: 256
def solve():
    r,g,b,n=map(int,input().split())
    ans=0
    for i in range(int(n/r)+1):
        for j in range(int((n-(i*r))/g)+1):
            num=n-(i*r+j*g)
            if num%b==0 and num>=0:
                ans+=1
    print(ans)
solve()


Measured memory_bytes: 3060
from collections import defaultdict, deque

nVertices = int(input())
g = [[] for _ in range(nVertices + 1)]
edges = []
for _ in range(nVertices - 1):
    u, v = map(int, input().split())
    edges.append((u, v))
    g[u].append(v)
    g[v].append(u)

colours = defaultdict(int)
q = deque()
colour = 1
maxColour = colour
par = 1
for child in g[par]:
    if child != par:
        colours[(par, child)] = colour
        maxColour = max(maxColour, colour)
        colour += 1
        q.appendleft((par, child))
while q:
    par, vertex = q.pop()
    parColor = colours[(par, vertex)]
    colour = 1
    for child in g[vertex]:
        if child != par:
            if colour == parColor:
                colour += 1
            colours[(vertex, child)] = colour
            maxColour = max(maxColour, colour)
            colour += 1
            q.appendleft((vertex, child))

print(maxColour)
for e in edges:
    print(colours[e] or colours[e[::-1]])


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

int main(){
    string s, t; cin >> s >> t;
    int sz = s.size();
    s += s;
    bool ok;
    //cout << s << endl;
    //cout << t << endl;
    for(int i = 0; i < sz; i++){
        ok = true;
        for(int j = 0; j < sz; j++){
            if(t[j] != s[i+j]){
                ok = false;
                break;
            }
        }
        if(ok) break;
    }
    if(ok) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Measured memory_bytes: 3584
x = int(input())

i = 1
j = 2
T=[1]
while(True):
    i+=1
    j=2
    if i ** 2 > x: 
        break
    while(True):
        t = i ** j
        if t > x:
            T.append(i ** (j-1))
            break
        j+=1

print(max(T))

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

#define MAX_INT 0x3f3f3f3f 
#define acc(x) setprecision(x)
#define boost ios_base::sync_with_stdio(false); 	cin.tie(NULL);

int main()
{
	boost;
    string s;
    cin >> s;
    long long int  p = 0;
    for(int i=0;i<s.length();i++)
    {
        p+=s[i]-'0';
    }
    if(p%9==0)
    {
        cout << "Yes\n";
    }
    else
    {
        cout << "No\n";
    }
}

Measured memory_bytes: 3740
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
const int mod = 1e9+7;
const int INF = 1e9;
const int MAX = 1e6;

bool solve(int n, vector<ll> &t, vector<ll> &x, vector<ll> &y) {
    rep(i, n) {
        if (i == 0) {
            if (x[i] + y[i] > t[i]) return false;
            else if ((t[i] - (x[i] + y[i])) % 2 == 1) return false;
        } else {
            ll diff_x = abs(x[i] - x[i-1]);
            ll diff_y = abs(y[i] - y[i-1]);
            ll diff_t = t[i] - t[i-1];
            if (diff_x + diff_y > diff_t) return false;
            else if ((diff_t - (diff_x + diff_y)) % 2 == 1) return false;
        }
    }
    return true;
}

int main() {
    int n;
    cin >> n;
    vector<ll> t(n), x(n), y(n);
    rep(i, n) {
        cin >> t[i] >> x[i] >> y[i];
    }
    if (solve(n, t, x, y)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

Measured memory_bytes: 5628
#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using vs = vector<string>;
using vb = vector<bool>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b; return true;} return false;}
template<class T> inline void prn(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << ' ';}
template<class T> inline void printv(vector<T>& v) {int n = sz(v); if (n == 0) cout << endl; REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');}
template<class T> inline void printvv(vector<vector<T>>& v) {for (auto u : v) printv(u);}
template<class T> inline void printlnv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}

void solve() {
    int n;
    cin >> n;
    int x = 0;
    REP1(i, n) {
        x += i;
        if (x >= n) {
            REP1(j, i) if (j != x - n) cout << j << endl;
            return;
        }
    }
}


Measured memory_bytes: 3628
n = int(input())
def factorize(n,factors):
	d = 2
	orig_n = n
	while d*d <= orig_n and n > 1:
		while n%d==0:
			factors[d] = factors.get(d,0)+1
			n //= d 
		d += 1
	if n > 1:
		factors[n] = factors.get(n,0)+1
def geq(val,factors):
	return len([x for x in factors if factors[x] >= val])

factors = {}
for i in range(1,n+1):
	factorize(i,factors)

ans = 0
ans += geq(74,factors)
ans += geq(24,factors)*(geq(2,factors)-1)
ans += geq(14,factors)*(geq(4,factors)-1)
ans += (geq(4,factors)*(geq(4,factors)-1)//2)*(geq(2,factors)-2)

print(ans)

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

using namespace std;
using int64 = long long;

constexpr int DEBUG = 0;

struct Item {
  int a, b;
};

template<class T> inline bool UpdateMin(T& a, T b) {
  if (a > b) { a = b; return 1; } return 0;
}

template<class T> inline bool UpdateMax(T& a, T b) {
  if (a < b) { a = b; return 1; } return 0;
}

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

  int n, t;
  cin >> n >> t;
  vector<Item> items(n);
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    items[i] = Item({a, b});
  }
  sort(items.begin(), items.end(), [&](const Item& item1, const Item& item2) {
    return item1.a < item2.a;
  });

  vector<int> dp(t + 1, -1);
  dp[0] = 0;
  for (int i = 0; i < n; i++) {
    for (int k = t - 1; k >= 0; k--) {
      UpdateMax(dp[min(k + items[i].a, t)], dp[k] + items[i].b);
    }
  }
  
  int ans = 0;
  for (int i = 0; i <= t; i++) {
    UpdateMax(ans, dp[i]);
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <iomanip>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cassert>
#include <complex>
#include <stdio.h>
#include <time.h>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
# define ll int64_t
# define rep(i,n) for(ll i=0;i<n;i++)
# define rrep(i,n) for(ll i=1;i<=n;i++)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define mod 1000000007
# define PI 3.141592653589793
# define vec vector
#define dump(x) cerr<<#x<<"="<<x<<endl
using namespace std;

bool compare_by_b(pair<string,ll> a,pair<string,ll> b){
    if(a.second != b.second) return a.second<b.second;
    else return a.first<b.first;
}

bool my_compare(pair<string,ll> a,pair<string,ll> b){
    if(a.first != b.first) return a.first<b.first;
    if(a.second != b.second) return a.second>b.second;
    else return true;
}

ll factorial(ll n){
    ll x=1;
    rrep(i,n) (x*=i)%=mod;
    return x;
}

ll gcd(ll a,ll b){
   if (a%b == 0) return(b);
   else 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);
    
    ll n,a,b;
    cin>>n>>a>>b;
    if((b-a)%2==0) cout<<(b-a)/2<<endl;
    else{
        ll rec=0;
        rec+=min(a-1,n-b);
        if(min(a-1,n-b)==n-b) a++;
        else b--;
        rec++;
        if(b!=a) rec+=(b-a)/2;
        cout<<rec<<endl;
    }
    
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(c) (c).begin(),(c).end()
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MINF(a) memset(a,0x3f,sizeof(a))
#define POW(n) (1LL<<(n))
#define IN(i,a,b) (a <= i && i <= b)
using namespace std;
template <typename T> inline bool CHMIN(T& a,T b) { if(a>b) { a=b; return 1; } return 0; }
template <typename T> inline bool CHMAX(T& a,T b) { if(a<b) { a=b; return 1; } return 0; }
template <typename T> inline void SORT(T& a) { sort(ALL(a)); }
template <typename T> inline void REV(T& a) { reverse(ALL(a)); }
template <typename T> inline void UNI(T& a) { sort(ALL(a)); a.erase(unique(ALL(a)),a.end()); }
template <typename T> inline T LB(vector<T>& v, T a) { return *lower_bound(ALL(v),a); }
template <typename T> inline int LBP(vector<T>& v, T a) { return lower_bound(ALL(v),a) - v.begin(); }
template <typename T> inline T UB(vector<T>& v, T a) { return *upper_bound(ALL(v),a); }
template <typename T> inline int UBP(vector<T>& v, T a) { return upper_bound(ALL(v),a) - v.begin(); }
template <typename T1, typename T2> ostream& operator<< (ostream& os, const pair<T1,T2>& p) { os << p.first << " " << p.second; return os; }
template <typename T1, typename T2> istream& operator>> (istream& is, pair<T1,T2>& p) { is >> p.first >> p.second; return is; }
template <typename T> ostream& operator<< (ostream& os, const vector<T>& v) { REP(i,v.size()) { if (i) os << " "; os << v[i]; } return os; }
template <typename T> istream& operator>> (istream& is, vector<T>& v) { for(T& in : v) is >> in; return is; }
template <typename T = int> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...)); }
template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; }
template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for(auto &e : t) fill_v(e,v); }
const int MOD = 1000000007;
const int INF = 0x3f3f3f3f3f3f3f3f;
const double EPS = 1e-10;

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

  int y,m,d;
  char c;
  cin >> y >> c >> m >> c >> d;
  if (m <= 4) cout << "Heisei" << endl;
  else cout << "TBD" << endl;

  return 0;
}

Measured memory_bytes: 256
/**
 *      purpose : CODE FESTIVAL 2016 qual B A
 *      author  : kyomukyomupurin
 *      created : 2018-12-16 18:58:00
**/

#pragma GCC optimize ("Ofast")
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(v) (v).begin(), (v).end()
#define print(x) cout << (x) << '\n'
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define fi first
#define se second

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(__null);
    
    string s; cin >> s;

    string correct = "CODEFESTIVAL2016";
    int cnt = 0;

    for (int i = 0; i < (int) correct.size(); ++i){
        if (s[i] != correct[i]) ++cnt;
    }

    print(cnt);
    
    return 0;
}

Measured memory_bytes: 256
/*
    ____        __
   / __ \____  / /_  ____ _____ ___
  / /_/ / __ \/ __ \/ __ `/ __ `__ \
 / _, _/ /_/ / / / / /_/ / / / / / /
/_/ |_|\____/_/ /_/\__,_/_/ /_/ /_/
*/
#include<bits/stdc++.h>

typedef long long ll ;

#define pll pair<ll , ll >
#define X   first
#define Y   second
#define mp  make_pair
#define pii pair<int , int>
#define vec vector
#define vpii vector<pair<int , int>>
#define i_n   int i = 0 ; i< n ; i++
#define cn  int n ; cin>>n
#define file_io freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define cina int a[n] ; for(int i = 0 ; i < n ; i++) cin>>a[i]
#define pb push_back

using namespace std;
const int maxn = 1000*100+5 ;
const ll inf = 9223372036854775807 ;


int main()
{
	migmig ;
  int a[2] ; 
  cin>>a[0] >> a[1] ; 
  sort(a , a+2 ) ; 
  for(int i = 0 ; i < a[1] ; i ++ ) 
  {
cout<<a[0];
  }

}
//////
////////
///////////




Measured memory_bytes: 256
//Be Name Khoda
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#pragma optimize O3
using namespace __gnu_pbds;
using namespace std;
template <typename T> using ordered_set =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T> using ordered_multiset =  tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
typedef long long int LL;
typedef LL ll;
typedef long double ld;
typedef string str;
typedef pair<ll,ll> pll;
typedef vector<ll> vll;
typedef stringstream strs;
 
#define X first
#define Y second
#define PB push_back
#define For(i,a,b) for (int i=a;i<b;i++)
#define Ford(i,a,b) for (int i=a;i>=b;i--)
#define smax(a,b) a=max(a,b)
#define smin(a,b) a=min(a,b)
#define SZ(a) ((ll)a.size())
#define ER(a) cout << #a << ' ' << a << endl
#define LB(a,n,x) (lower_bound(a,(a)+(n),x)-(a))
#define RET(x) { cout << x; exit(0); }
#define MKP make_pair
#define RETD(x) { cout << fixed << setprecision(15) << x; exit(0); }
#define GEI(x) scanf("%d",&x)
#define GEL(x) scanf("%lld",&x)
#define ALL(x) x.begin(),x.end()
const ll M=2e6+5,LG=32,SM=600+5,inf=1e18+5;
ll mod=1e9+7;

ll n,a,b;

int main()
{
    cin >> n >> a >> b;
    if ((a^b)&1)
        RET("Borys");
    RET("Alice");       
}

Measured memory_bytes: 256
from functools import reduce

n, m = map(int, input().split())
if abs(n-m) > 1:
    print(0)
    exit()
MOD = 10**9 + 7
mul_mod = lambda x, y, mod=MOD : x*y % mod
ans = reduce(mul_mod, range(1, n+1)) * reduce(mul_mod, range(1, m+1)) % MOD
if abs(n-m) == 0:
    ans *= 2
print(ans%MOD)


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

int64_t f1(int n, int64_t i) {
  if(n == 0) {
    return 1;
  }
  else if(n % 2 == 0) {
    int64_t a = f1(n / 2, i);
    a = (a * a) % 1000000007;
    return a;
  }
  else {
    int64_t a = f1(n / 2, i);
    a = (a * a) % 1000000007;
    a = a * i % 1000000007;
    return a;
  }
}

int main() {
  int n, a, b;
  cin >> n >> a >> b;
  int64_t A = 1;
  for(int i = 0; i < a; i++) {
    A *= i + 1;
    A %= 1000000007;
  }
  A = f1(1000000005, A);
  for(int i = 0; i < a; i++) {
    A *= n - i;
    A %= 1000000007;
  }
  int64_t B = 1;
  for(int i = 0; i < b; i++) {
    B *= i + 1;
    B %= 1000000007;
  }
  B = f1(1000000005, B);
  for(int i = 0; i < b; i++) {
    B *= n - i;
    B %= 1000000007;
  }
  int64_t ans = f1(n, 2) - 1 - A - B;
  ans %= 1000000007;
  if(ans >= 0) {
    cout << ans << endl;
  }
  else {
    cout << ans + 1000000007 << endl;
  }
}

Measured memory_bytes: 384
from bisect import bisect

N = int(input())
A = sorted(list(map(int,input().split())))

ind = bisect(A,0)

X = A[:ind]
Y = A[ind:]
ans = []
if len(X) == 0 :
    ans.append([Y[0],Y[1]])
    X.append(Y[0]-Y[1])
    Y.pop(0)
    Y.pop(0)

if len(Y) == 0 :
    if len(X) != 1 :
        ans.append([X[-1],X[-2]])
        Y.append(X[-1]-X[-2])
        X.pop(-1)
        X.pop(-1)

if len(X) + len(Y) <= 1 :
    if len(X) == 0 :
        calc = Y[0]
    else :
        calc = X[0]

while len(X) + len(Y) >= 2 :
    if len(X) >= 2 :
        if len(Y) != 1 :
            ans.append([X[-1],Y[0]])
            X[-1] -= Y.pop(0)
        else :
            ans.append([Y[0],X[-1]])
            Y[0] -= X.pop(-1)
    elif len(Y) >= 2 :
        if len(X) != 1 :
            ans.append([Y[0],X[-1]])
            Y[0] -= X.pop(-1)
        else :
            ans.append([X[-1],Y[0]])
            X[-1] -= Y.pop(0)
    else :
        calc = Y[0]-X[0]
        ans.append([Y.pop(0),X.pop(0)])

print(calc)
#print(*ans,sep="\n")
for l in ans :
    print(*l)


Measured memory_bytes: 22672
#include<iostream>
#include<algorithm>
#include<set>
#include<math.h>
#include<vector>
#include<sstream>
#include<queue>
#include<functional>
#include<bitset>
#include<cstdio>
#include<iomanip>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include <string.h>

using ll = long long;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define reps(i, x) for(int i=1;i<=(int)(x);i++)
#define rrep(i, x) for(int i=((int)(x)-1);i>=0;i--)
#define rreps(i, x) for(int i=(int)(x);i>0;i--)
#define all(x) (x).begin(),(x).end()
#define m0(x) memset(x,0,sizeof(x))
#define vll vector<ll>
#define vi vector<int>
#define vpll vector<pair<ll,ll>>
#define vpi vector<pair<int,int>>
#define mod 1000000007
#define put2darr(arr, row, col) rep(i, row) { rep(j, col) { printf("%18d", arr[i][j]); } cout << endl; }

using namespace std;

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

/* 1..10
 * rep:   0 1 2 3 4 5 6 7 8 9
 * reps:  1 2 3 4 5 6 7 8 9 10
 * rrep:  9 8 7 6 5 4 3 2 1 0
 * rreps: 10 9 8 7 6 5 4 3 2 1
 */
int h[100010];
int main(){
    ll n;
    cin >> n;
    ll ans = 0;
    reps(i, n-1){
        ans += i;
    }
    cout << ans << endl;
}



Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,A,i,ans=30;
  cin >> N;
  while(N--){
    i=0;
    cin>>A;
    if(A%2==0){
      while(A%2==0){
        i++;
        A/=2;
      }
    }else{
      ans=i;
      break;
    }
    if(i<ans){
      ans=i;
    }
  }
  cout<<ans<<endl;
}

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

long long N, A, B, C;
long long l[10];

long long getsum(vector<long long> vec){
	long long ans = 0;
	for(auto v : vec){
		ans+=v;
	}
	return ans;
}

int main(){
	cin >> N >> A >> B >> C;
	for(long long i = 0; i < N; i++){
		cin >> l[i];
	}
	queue<string> Q;
	Q.push("");
	for(long long i = 0; i < N; i++){
		while(Q.front().size() <= i){
			string front = Q.front();
			Q.pop();
			Q.push(front+"A");
			Q.push(front+"B");
			Q.push(front+"C");
			Q.push(front+"D"); //捨てる
		}
	}


	long long ans = -1;
	while(!Q.empty()){
		string pat = Q.front();
		Q.pop();

		vector<long long> Avec;
		vector<long long> Bvec;
		vector<long long> Cvec;
		long long cost = 0;
		for(long long i = 0; i < N; i++){
			if(pat[i] == 'A'){
				Avec.push_back(l[i]);
			}
			if(pat[i] == 'B'){
				Bvec.push_back(l[i]);
			}
			if(pat[i] == 'C'){
				Cvec.push_back(l[i]);
			}
		}

		long long alen = getsum(Avec);
		long long blen = getsum(Bvec);
		long long clen = getsum(Cvec);
		if(alen == 0 || blen == 0 || clen == 0){
			continue;
		}
		cost += (Avec.size()-1) * 10;
		cost += (Bvec.size()-1) * 10;
		cost += (Cvec.size()-1) * 10;
		cost += abs(alen - A);
		cost += abs(blen - B);
		cost += abs(clen - C);
		if(ans == -1){
			ans = cost;
		}else{
			ans = min(cost, ans);
		}
	}
	cout << ans << endl;
}


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

class Program
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int min = int.Parse(Console.ReadLine());
        int ans = 0;
        for (int i = 1; i < n; i++)
        {
            int a = int.Parse(Console.ReadLine());
            if (i == 1)
            {
                ans = a - min;
                min = Math.Min(a, min);
                continue;
            }
            ans = Math.Max(ans, a - min);
            min = Math.Min(a, min);
        }
        Console.WriteLine(ans);
    }
}

Measured memory_bytes: 9276
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define fi first
#define se second
#define mp make_pair
#define itrfor(itr,A) for(auto itr = A.begin(); itr !=A.end();itr++)
#define dame { printf("No\n"); return 0;}
template <class T> using reversed_priority_queue = priority_queue<T, vector<T>, greater<T> >;
typedef long long llong;
char moji[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char moji2[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char moji3[10]={'0','1','2','3','4','5','6','7','8','9'};
#define Sort(a) sort(a.begin(),a.end());
#define Reverse(a) reverse(a.begin(),a.end());
#define print(a) cout << a << endl;
#define MOD llong(1e9+7)
#define MAX int(2 * 1e5 +5)
#define debug(x)  cout << #x << " = " << (x) << endl;
#define pi acos(-1.0)
#define int llong
#define INF llong(1e17)


signed main(){
    string s;
    cin >> s;
    int res = 0;
    int tmp = 0;
    int n = s.size();
    REP(i,n){
        if(s[i] == '0'){
            tmp --;
            if(tmp >=0) res ++;
        }
        else{
            tmp ++;
            if(tmp <= 0) res ++;
        }
    }
    cout << 2 * res << endl;

}


Measured memory_bytes: 512
num=int(input())
line=input().split(" ")
a=int(line[0])
b=int(line[1])
low=[]
middle=[]
high=[]

lines=input().split(" ")


for i in range(num):
    n=int(lines[i])
    if n<=a:
        low.append(n)
    elif n<=b:
        middle.append(n)
    else:
        high.append(n)

print(min(len(low),len(middle),len(high)))

Measured memory_bytes: 3064
#include<iostream>
using namespace std;
int main(){
    int n,h[22],i,j,f=0,s=0;
    cin >> n;
    for(i=0;i<n;i++){
        cin >> h[i];
    }
    for(i=0;i<n;i++){
        f=0;
        for(j=0;j<i;j++){
            if(h[i]<h[j]){
                f=1;
                break;
            }
        }
        if(f==0)
            s++;
    }
    cout << s << endl;
    return 0;
}


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

typedef long long ll;

ll a[10005];

const ll mod = 1e9 + 7;
ll ans = 1;
vector<int> p;
ll ans2;
bool prime[1000005];
ll sum[1000005];

ll f(ll a, ll x) {
  ll res = 1;
  while(x > 0) {
    if(x & 1) res = a * res % mod;
    a = a * a % mod;
    x >>= 1;
  }
  return res;
}


int main() {
  ll n;
  cin >> n;
 
  
  for(int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if(n == 1) {
    cout << 1 << endl;
    return 0;
  }
  
  for(int i = 0; i < n; i++) {
    ll tmp = a[i];
    for(int j = 2; j * j <= tmp; j++) {
      ll tmp2 = 0;
      while(tmp % j == 0) {
	tmp /= j;
	tmp2++;
      }
      sum[j] = max(sum[j],tmp2);
    }
    if(tmp != 1) sum[tmp] = max(sum[tmp],1ll);
  }

  for(int i = 0; i < 1000005; i++) {
  
    ans = ans * f(i,sum[i]) % mod;
  }
  // cout << ans << endl;
  
  for(int i = 0; i < n; i++) {
    ans2 = (ans2 + ans * f(a[i],mod-2) % mod) % mod;
  }
  cout << ans2 << endl;
    
  
}

  
    


Measured memory_bytes: 8320
#include <bits/stdc++.h>
// clang-format off
using namespace std; using ll = int64_t; using ull = uint64_t; const ll INF = 9e18;
void print() { cout << endl; }
template<typename Head,typename... Tail> void print(Head head,Tail... tail){cout<<head;if(sizeof...(Tail)>0)cout<<" ";print(tail...);}
void print0() {}
template<typename Head,typename... Tail> void print0(Head head,Tail... tail){cout<<head;print0(tail...);}
// clang-format on

int main() {
    ll K;
    cin >> K;
    for (ll i = 0; i < K; i++) {
        print0("ACL");
    }
    print();
}


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

int main() {
  ll A;
  string B;
  cin >> A >> B;
  string s;
  for (char e : B) {
    if (e != '.') s += e;
  }
  int h = stoi(s);
  cout << A*h/100 << endl;
}

Measured memory_bytes: 3616
#include<stdio.h>

int main(){
	int H,W;
	scanf("%d%d",&H,&W);
	char s[H][W+1];
	for(int i=0;i<H;i++)scanf("%s",s[i]);
	
	for(int i=0;i<H;i++)for(int j=0;j<W;j++){
		if(s[i][j]=='#'){
			if(i>0 && s[i-1][j]=='#')continue;
			if(i<H-1 && s[i+1][j]=='#')continue;
			if(j>0 && s[i][j-1]=='#')continue;
			if(j<W-1 && s[i][j+1]=='#')continue;
			
			printf("No\n");
			return 0;
		}
	}
	printf("Yes\n");
	return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <iterator>  // std::back_inserter()
#include <algorithm>  // std::copy()
#include <functional>  // std::greater<T>()
#include <utility>  // std::swap()
#include <numeric>  // accumulate(ALL(vec), 0)  0 は初期値
#include <cmath>
#include <climits>  // INT_MIN
#include <cctype>  // std::isdigit()
#include <ios>     // std::left, std::right
#include <iomanip> // std::setw(int), std::setfill(char)
using namespace std;

// typedef
typedef long long ll;
typedef unsigned long ul;
// #define int long long

// macro
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (int i=0; i < (int)(n); i++)  // 0 ~ n-1
#define REPN(i, n) for (int i=1; i <= (int)(n); i++)  // 1 ~ n
#define DESCEND greater<int>()  // sort 降順 大きい順
#define UNIQUE(vec) (vec).erase(unique(ALL((vec))), (vec).end());  // 必ずsortを行なってから
#define MIN(vec) min_element(ALL((vec)))  // 値を取り出すときは * を先頭につける
#define MAX(vec) max_element(ALL((vec)))
#define IDX(vec, element_iter) distance((vec).begin(), element_iter)
#define SUM(vec) accumulate(ALL((vec)), 0)  // 0 は初期値
#define COPY(vec1, vec2) copy(ALL(vec1), back_inserter(vec2))  // vec1をvec2にコピーする vec2は空にしておく必要あり
#define zero_pad(num) setfill('0') << std::right << setw(num)  // 直後の要素をパディング
#define space_pad(num) setfill(' ') << std::right << setw(num)  // 直後の要素をパディング

// func declaration
template <class T> void print2DVec(vector< vector<T> >&);
template <class T> void calcVec(vector<T>&, int, char);
int char_to_int(const char);

// const
const int INF = 10000000;

/*MEMO
・辞書順
abc < abcd, atcoder < atlas
・イテレータ
std::vector<int>::iterator とタイプするのは面倒なので、
 通常は型推論の auto を使用する。
 auto iter = max_element(ALL(vec));
・2次元配列
vector<vector<int>> vec = {{1, 2, 3}, {4, 5, 6}}
・20×10の配列
vector<vector<int>> vec(20, vector<int>(10, 0));
・(n, m)の多次元配列
vector< vector<int> > vec(n, vector<int>(m, 0))  // 0で初期化
*/

int main() {
    cin.tie();
    ios::sync_with_stdio(false);
    
    // input
    char X, Y;
    cin >> X >> Y;
    
    // calculation
    if (X > Y) {
        cout << ">" << "\n";
    } else if (X < Y) {
        cout << "<" << "\n";
    } else {
        cout << "=" << "\n";
    }
    
    
    return 0;
}


// function
template <class T> void print2DVec(vector< vector<T> >& vec) {
    REP(i, vec.size()) {
        REP(j, vec.front().size()) {
            cout << vec.at(i).at(j);
        }
        cout << endl;
    }
}

template <class T> void calcVec(vector<T> &vec, int num, char ch) {
    // vec全体への演算
    switch (ch) {
        case '+':
            REP(i, vec.size()) vec.at(i) += num; break;
        case '-':
            REP(i, vec.size()) vec.at(i) -= num; break;
        case '*':
            REP(i, vec.size()) vec.at(i) *= num; break;
        case '/':
            REP(i, vec.size()) vec.at(i) /= num; break;
        case '%':
            REP(i, vec.size()) vec.at(i) %= num; break;
        default:
            cout << "Incorrect Operator" << endl;
    }
}

int char_to_int(const char c) {
    if('0' <= c && c <= '9') return (c - '0');
    return -1;
}


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

public class Program
{
    static void Main()
    {
        string[] lineRecord = Console.ReadLine().Trim().Split(' ');
        var A = long.Parse(lineRecord[0]);
        var B = long.Parse(lineRecord[1]);

        var answer = CalcSaishouKoubaisuu(A, B);
        Console.WriteLine(answer.ToString());
    }

    /// <summary>
    /// 
    /// </summary>
    /// <returns></returns>
    private static long CalcSaishouKoubaisuu(long a, long b)
    {
        return a * b / Gcd(a, b);
    }

    // ユークリッドの互除法 
    private static long Gcd(long a, long b)
    {
        if (a < b)
            // 引数を入替えて自分を呼び出す
            return Gcd(b, a);
        while (b != 0)
        {
            var remainder = a % b;
            a = b;
            b = remainder;
        }
        return a;
    }
}

Measured memory_bytes: 13140
#include<iostream>
#include<cmath>
#include<string>
#include<algorithm>
#include<set>
#include<iomanip>
using namespace std;

int main()
{
	int a,b,k;cin>>a>>b>>k;
	for(int i=a;i<=b;i++)
	{
		if(i<a+k||b-k<i)
		{
			cout<<i<<endl;
		}
	}
	return 0;
}

Measured memory_bytes: 256
#graph implementation
import math
n,m=map(int,input().split())
ans=['bal']*n
for i in range(m):
    s,c=map(int,input().split())
    if ans[s-1]=='bal':
      ans[s-1]=c
    else:
        if ans[s-1]!=c:
            print(-1)
            exit(0)
if ans[0]=='bal' and n>1:
    ans[0]=1
for i in range(n):
    if ans[i]=='bal':
        ans[i]=0
if ans[0]==0 and n>1:
    print(-1)
else:
    for i in ans:
        print(i,end="")
print()


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


using namespace std;
#define _rep(n, a, b) for (ll n = (a); n <= (b); ++n)
#define _rev(n, a, b) for (ll n = (a); n >= (b); --n)
#define _for(n, a, b) for (ll n = (a); n < (b); ++n)
#define _rof(n, a, b) for (ll n = (a); n > (b); --n)
#define oo 0x3f3f3f3f3f3f
#define ll long long
#define db double
#define eps 1e-6
#define bin(x) cout << bitset<10>(x) << endl;
#define what_is(x) cerr << #x << " is " << x << endl
#define met(a, b) memset(a, b, sizeof(a))
#define mp(a, b) make_pair(a, b)
#define all(x) x.begin(), x.end()
#define pii pair<ll, ll>
#define pdd pair<db, db>
#define pi acos(-1.0)
const ll maxn = 2e5 + 10;
signed main(){
	map<string, int> ca;
	int n;
	cin >> n;
	int ans = 0;
	_rep(i, 1, n){
		string s;
		cin >> s;
		ca[s]++;
		ans = max(ans, ca[s]);
	}
	for(auto i:ca){
		if(i.second == ans){
			cout << i.first << endl;
		}
	}
}

Measured memory_bytes: 25216
#include <algorithm>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
const ll INF = 1ll << 40;

int main() {
  int K, N;
  while (cin >> K >> N) {
    vector<int> ans;
    if (K % 2 == 0) {
      ans.push_back(K / 2);
      for (int i = 0; i < N - 1; i++) {
        ans.push_back(K);
      }
    } else {
      vector<ll> ways(N + 1), pw(N + 1);
      ways[0] = 1, pw[0] = 1;
      for (int i = 1; i <= N; i++) {
        pw[i] = min(pw[i - 1] * K, INF);
        ways[i] = min(ways[i - 1] + pw[i], INF);
      }
      ans.push_back((K + 1) / 2);
      int L = 2, parity = (N & 1) ^ 1;
      while (L <= N && ways[N - L] / 2 >= (L + parity) / 2) {
        ans.push_back((K + 1) / 2);
        ++L;
      }
      if (L <= N) {
        ll kth = 1 + ways[N - L] * (K / 2) + ways[N - L] / 2 - (L + parity) / 2;
        while (kth > 0) {
          ll x = (kth - 1) / ways[N - L];
          ans.push_back(x + 1);
          kth -= 1 + ways[N - L] * x;
          ++L;
        }
      }
    }
    for (int x : ans) {
      cout << x << " ";
    }
    cout << endl;
  }
  return 0;
}


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

using i64 = int64_t;

struct Edge{
    int from, to;
};

struct Node{
    int num;
    vector<int> visited;
};

using Graph = vector<vector<Edge>>;

int main(){
    int n, m;
    cin >> n >> m;
    Graph graph(n+1, vector<Edge>());
    for(int i=0;i<m;++i){
        int a, b;
        cin >> a >> b;
        graph[a].push_back({a, b});
    }

    vector<int> ans;
    for(int i=1;i<=n;++i){
        queue<Node> que;
        deque<bool> visited(n+1);
        for(auto e: graph[i]){
            que.push({e.to, vector<int>({e.to})});
            visited[e.to] = true;
        }
        while(!que.empty()){
            auto cur = que.front(); que.pop();
            if(cur.num == i){
                if(ans.size() == 0 || cur.visited.size() < ans.size()){
                    ans = cur.visited;
                }
                break;
            }
            for(auto e: graph[cur.num]){
                if(visited[e.to])continue;
                auto v = cur.visited;
                v.push_back(e.to);
                que.push({e.to, v});
                visited[e.to] = true;
            }
        }
    }

    if(ans.size() == 0)cout << -1 << endl;
    else{
        cout << ans.size() << endl;
        for(auto e: ans){
            cout << e << endl;
        }
    }

    return 0;
}


Measured memory_bytes: 384