akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
 
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n)  for(int i=0;i<(n);++i)
#define REPr(i, n) for(int i=(n)-1;i>=0; --i)
#define FORq(i, m, n) for(int i = (m);i <= (n);++i)
#define FORqr(i, m, n) for(int i = (n);i >=(m);--i)
#define PB push_back
#define MP make_pair
#define DEBUG printf("%s\n","debug")
#define fst first
#define snd second
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x,0,sizeof(x))
#define FILL(x, y) memset(x,y,sizeof(x))
#define MM(x) memset(x,-1,sizeof(x))
#define ALL(x) (x).begin(),(x).end()
using namespace std;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
/* (๑╹◡╹) */
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll MOD = 1000000007;
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;
}
/* (๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹)(๑╹◡╹) */
///////////////////////////////////////////////
const int MAX = 510000;
 
long long fac[MAX], finv[MAX], inv[MAX];
 



int main() {
	int ans = 0;
	int N; cin >> N;
	vector<int> A(N);
	vector<int> B(N);

	for (int i = 0; i < N; i++)
	{
		cin >> A.at(i);
		B.at(i) = A.at(i);
	}

	sort(ALL(A));
	reverse(ALL(A));

	int p;
	for (int i = 0; i < N; i++)
	{
		if(A.at(0) == B.at(i)){p = i;break;}
	}
	

	if(A.at(0) == A.at(1))
	{
		for (int i = 0; i < N; i++)
		{
			cout << A.at(0) << endl;
		}
	}
	else
	{
		for (int i = 0; i < N; i++)
		{
			if(i != p){
				cout << A.at(0) << endl;
			}
			else
			{
				cout << A.at(1) << endl;
			}
			
		}
	}
	
	
}


Measured memory_bytes: 3200
#include<bits/stdc++.h>
#include<string>
#include<map>
#define ll          long long
#define pb          push_back
#define mp          make_pair
#define pii         pair<int,int>
#define pll         pair<ll,ll>
#define vii         vector<pair<ll,ll> >
#define vi          vector<int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define hell        1000000007
#define endl        '\n'
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define rep1(i,a,b) for(ll i=a;i<= b;i++)
#define PI          3.14159
#define MAX         100000001
#define fast_io      ios_base::sync_with_stdio(false);  cin.tie(0); cout.tie(0);
#define scan(var)    scanf("%lld",&var)
#define print(var)   printf("%lld\n", var);
#define BLOCK 317
#define double       long double
#define mod          998244353
using namespace std;
ll dp[100001][3];
ll n,k;
ll a[100001],b[100001],c[100001];
ll solvedp(ll index,ll status, ll n)
{
  if(index == n)
  {
    return 0;
  }
  if(dp[index][status] != -1)
  {
    return dp[index][status];
  }
  if(status == 0)
  {
    dp[index][status] = max(b[index] + solvedp(index + 1,1,n),c[index] + solvedp(index + 1,2,n));
  }
  if(status == 1)
  {
    dp[index][status] = max(a[index] + solvedp(index + 1,0,n),c[index] + solvedp(index + 1,2,n));
  }
  if(status == 2)
  {
    dp[index][status] = max(a[index] + solvedp(index + 1,0,n),b[index] + solvedp(index + 1,1,n));
  }
  return dp[index][status];
}
int main()
{
  fast_io
  cin >> n;
  memset(dp,-1,sizeof(dp));
  rep(i,0,n)
  {
    cin >> a[i] >> b[i] >> c[i];
  }
  cout << max(solvedp(0,0,n),max(solvedp(0,1,n),solvedp(0,2,n)));
  return 0;
}



Measured memory_bytes: 11136
#include <iostream>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define ll long long int
int main(){
  ll H, W;
  ll ans1, ans2, ans3=10000000000, ans4=10000000000;
  cin >> H >> W;

  if(H % 3 == 0 || W % 3 == 0){
    cout << "0" << endl;
    exit(0);
  }

  ll l1 = H / 3;
  ll l2 = H / 3 + 1;
  ans1 = abs((l1-l2)*W);

  ll l3 = W / 3;
  ll l4 = W / 3 + 1;
  ans2 = abs((l3-l4)*H);

  for(int i = 1; i <= H / 2; ++i){
    ll c1 = i * W;
    ll res = H * W - c1;
    ll j = W / 2;
    ll c2 = (H - i) * j;
    ll c3 = (H - i) * (W - j);
    ll kans = max({abs(c1-c2),abs(c2-c3),abs(c3-c1)});
    if(kans < ans3){
      ans3 = kans;
    }
  }

  for(int i = 1; i <= W / 2 + 1; ++i){
    ll c1 = i * H;
    ll res = H * W - c1;
    ll j = H / 2;
    ll c2 = (W - i) * j;
    ll c3 = (W - i) * (H - j);
    ll kans = max({abs(c1-c2),abs(c2-c3),abs(c3-c1)});
    if(kans < ans4){
      ans4 = kans;
    }
  }

  cout << min({ans1, ans2, ans3, ans4}) << endl;
  return 0;

}


Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        var a = Console.ReadLine().Split().Select(int.Parse).ToArray();
        Console.WriteLine(a.Sum(x =>
        {
            int count = 0;
            while (x % 2 == 0)
            {
                x /= 2;
                count++;
            }
            return count;
        }));
    }
}

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

using namespace std;

using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

constexpr int I_INF = (1 << 30);
constexpr ll L_INF = (1ll << 62);

//==================================

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

    ll N;
    cin >> N;

    if (N % 2 == 1) {
        cout << 0 << endl;
        return 0;
    }

    ll n2 = 0, n5 = 0;
    // 2
    ll p = 2;
    while (true) {
        ll tmp = N / p;
        if (tmp == 0) {
            break;
        }
        n2 += tmp;
        p *= 2;
    }

    p = 10;
    while (true) {
        ll tmp = N / p;
        if (tmp == 0) {
            break;
        }
        n5 += tmp;
        p *= 5;
    }

    cout << min(n2, n5) << endl;

    return 0;
}

Measured memory_bytes: 256
n = int(input())
s = str(input())
dic = {}
for i in s:
    dic.setdefault(i,0)
    dic[i] += 1
#print(dic)
move = {}
ans = []
cnt = 0
for i in s:
    dic[i] -= 1
    move.setdefault(i,0)
    move[i] += 1
    if dic[i]>0 and move[i]>0:
        if i not in ans:
            ans.append(i)
    elif dic[i]==0:
        if i in ans:
            ans.remove(i)
    cnt = max(cnt,len(ans))
print(cnt)

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

using namespace std;

const int N = 5e5;

int n, ans = 0x3f3f3f3f;
int on[N], zn[N];
char a[N];

int main() {
	
	scanf("%d", &n);
	scanf("%s", a + 1);
	
	for (int i = 1; i <= n; ++i)	
		zn[i] = a[i] == '.' ? zn[i - 1] + 1 : zn[i - 1];
	for (int i = n; i >= 1; --i)
		on[i] = a[i] == '#' ? on[i + 1] + 1 : on[i + 1];
	
	for (int i = 0; i <= n; ++i)
		ans = min(ans, abs(i - zn[i]) + abs(n - i - on[i + 1]));
	
	printf("%d\n", ans);
		
	return 0;
}

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

int main(){
  int n, p, a;
  bool flag = true;
  cin >> n >> p;
  for(int i = 0; i < n; i++){
    cin >> a;
    if(a % 2) flag = false;
  }
  if(flag) cout << (p == 1 ? 0 : (1LL << n)) << endl;
  else cout << (1LL << n-1) << endl;
  return 0;
}

Measured memory_bytes: 256
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

H, W = map(int, read().split())

if min(H, W) == 1:
    print(1)
elif (H % 2 == 1) & (W % 2 == 1):
    print((H * W + 1) // 2)
else:
    print(H * W // 2)


Measured memory_bytes: 3060
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    N, K = LI()
    x_li = LI()  # sorted

    from bisect import bisect_left
    zeropoint = bisect_left(x_li, 0)

    x_negative = [-x for x in reversed(x_li[:zeropoint])]
    x_positive = x_li[zeropoint:]

    # はじめに正の方向に動くとき：
    if len(x_positive) > 0:
        if len(x_positive) >= K:
            pos_right = K-1
            pos_left = 0
            min_moves = x_positive[pos_right]
        else:
            pos_right = len(x_positive) - 1
            pos_left = K - len(x_positive) - 1
            min_moves = x_negative[pos_left] + x_positive[pos_right] * 2
        i = 0
        while True:
            i += 1
            if pos_left + i >= len(x_negative) or pos_right-i < 0: break
            moves = x_negative[pos_left+i] + x_positive[pos_right-i] * 2
            min_moves = min(min_moves, moves)
    else:
        min_moves = INF

    # はじめに負の方向に動くとき：
    if x_positive and x_positive[0] == 0:
        x_positive = x_positive[1:]
        x_negative = [0] + x_negative
    x_positive, x_negative = x_negative, x_positive

    if len(x_positive) > 0:
        if len(x_positive) >= K:
            pos_right = K-1
            pos_left = 0
            min_moves = min(min_moves, x_positive[pos_right])
        else:
            pos_right = len(x_positive) - 1
            pos_left = K - len(x_positive) - 1
            min_moves = min(min_moves, x_negative[pos_left] + x_positive[pos_right] * 2)
        i = 0
        while True:
            i += 1
            if pos_left + i >= len(x_negative) or pos_right-i < 0: break
            moves = x_negative[pos_left+i] + x_positive[pos_right-i] * 2
            min_moves = min(min_moves, moves)
    else:
        pass


    print(min_moves)

main()

Measured memory_bytes: 14252
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//ここから編集する
class Solve {
public:
    string S;

    void input() {
        cin >> S;
    }

    void solve() {
        input();
        ll ans = 0;
        ll anum = 0;

        int idx = 0;
        while (idx < S.size()) {
            if (S[idx] == 'A') {
                anum++;
                idx++;
            } else if (idx + 2 <= S.size() && S.substr(idx, 2) == "BC") {
                ans += anum;
                idx += 2;
            } else {
                anum = 0;
                idx++;
            }
        }
        cout << ans << endl;

    }
};


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

    Solve().solve();


    return 0;
}


Measured memory_bytes: 888
#include <string>
#include <vector>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<stack>
#include<queue>
#include<cmath>
#include<algorithm>
#include<functional>
#include<list>
#include<deque>
#include<bitset>
#include<set>
#include<map>
#include<unordered_map>
#include<cstring>
#include<sstream>
#include<complex>
#include<iomanip>
#include<numeric>
#include<cassert>
#define X first
#define Y second
#define pb push_back
#define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X))
#define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X))
#define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X))
#define repe(X,Y) for ((X) = 0;(X) < (Y);++(X))
#define peat(X,Y) for (;(X) < (Y);++(X))
#define all(X) (X).begin(),(X).end()
#define rall(X) (X).rbegin(),(X).rend()
#define eb emplace_back
#define UNIQUE(X) (X).erase(unique(all(X)),(X).end())

using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
template<class T> using vv=vector<vector<T>>;
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"{"; rep(i,t.size()) {os<<t[i]<<",";} os<<"}"<<endl; return os;}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}
template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;}
template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;}
const ll MOD=1e9+7;

int main(){
  ios_base::sync_with_stdio(false);
  cout<<fixed<<setprecision(0);
  int n,a,b;
  cin>>n>>a>>b;
  int re=n;
  rep(i,n){
    int x;
    cin>>x;
    if(a<=x && x<b) --re;
  }
  cout<<re<<endl;
  return 0;
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast,fast-math,unroll-loops")

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef string str;

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()


int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
	
	string s;
	cin >> s;
	if(s[0] == '7' || s[1] == '7' || s[2] == '7')cout << "Yes";
	else cout << "No";
}


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



int main() {
  ll MOD = 1000000007;
  ll N; cin >> N;
  
  vector<ll> A(N,0);
  ll Aadd = 0;
  rep(i,N){
    cin >> A[i];
    Aadd += A[i];
  }
  sort(A.begin(), A.end());
  ll sum = 0;
  for(ll i = 0; i < N-1; i++){
    Aadd -= A[i];
    sum += ((A[i] % MOD) * (Aadd % MOD)) %MOD;
    sum %= MOD;
  } 
  cout << sum << endl;
	return 0;
}



Measured memory_bytes: 4784
n = int(input())
p = list(map(int,input().split()))
q = list(range(1,n+1))
z = 0

for i in range(n-1):
    if p[i] == q[i]:
        p[i+1] = p[i]
        z += 1

if p[-1] == q[-1]:
    print(z + 1)
else:
    print(z)

Measured memory_bytes: 20648
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
typedef long long ll;
using namespace std;

const ll mod = 1000000007;

/*
ZZ(xi-xj)(yk-yl)
= Z(xi-xj) * Z(yk-yl)
Z(xi-xj)
Zxi
*/

int main(){
  int n,m;
  cin >> n >> m;
  vector<ll> x(n);
  vector<ll> y(m);
  rep(i,n) {cin >> x[i]; x[i]+=1e9;}
  rep(i,m) {cin >> y[i]; y[i]+=1e9;}
  ll ans = 0;
  ll zi=0,zj=0,zk=0,zl=0;
  rep(i,n-1){
    zi += x[i+1]%mod*(i+1)%mod; zi %= mod;
    zj += x[i]%mod*(n-1-i)%mod; zj %= mod;
  }
  rep(i,m-1){
    zk += y[i+1]%mod*(i+1)%mod; zk %= mod;
    zl += y[i]%mod*(m-1-i)%mod; zl %= mod;
  }
  ans = (zi-zj+mod)%mod;
  ans *= (zk-zl+mod)%mod; ans %= mod;
  cout << ans % mod << endl;
  return 0;
}


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

using ll = long long;

int main() {
    ll n; cin >> n;
    ll ans = 0;
    for(ll m1 = 1; m1 * m1 <= n; ++m1) { // (m + 1)
        if(n % m1 == 0) {
            if(m1 != 1) {
                const ll m = m1 - 1;
                const ll t = n % m;
                if(m1 * t == n) {
                    ans += m;
                }
            }
            if(m1 * m1 != n) {
                const ll tm1 = n / m1;
                const ll m = tm1 - 1;
                const ll t = n % m;
                if(tm1 * t == n) {
                    ans += m;
                }
            }
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#include <cstring>
#include <cmath>
#include <algorithm>
#include <string>
#include <iostream>
#include <vector>
#include <queue>
#include <unordered_map>
#include <random>
#include <stack>
#include <set>
#include <unordered_set>

#define bug(x) cout<<"zdongdebug1: "<<x<<endl;
#define bug2(x, y) cout<<"zdongdebug2: "<<x<<" "<<y<<endl;
#define bug3(x, y, z) cout<<"zdongdebug3: "<<x<<" "<<y<<" "<<z<<endl;
using namespace std;
typedef long long ll;
const int maxn = 105;
const int mod = 1000000007;

int main() {
#ifdef suiyuan2009
  freopen("/Users/suiyuan2009/CLionProjects/icpc/input.txt", "r", stdin);
  //freopen("/Users/suiyuan2009/CLionProjects/icpc/output.txt", "w", stdout);
#endif
  int n;
  string s;
  cin>>n>>s;
  if(s.size()<=n)cout<<s<<endl;
  else {
    cout<<s.substr(0, n)<<"..."<<endl;
  }
  return 0;
}

Measured memory_bytes: 3628
//Code by Mukul Totla
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main()
{   
  #ifndef ONLINE_JUDGE 
  freopen ("input.txt", "r", stdin);
  freopen ("output.txt", "w", stdout);
  #endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  ll n,i;
  cin>>n;
  if(n>=30)
    cout<<"Yes";
  else
    cout<<"No";

  return 0;
}

Measured memory_bytes: 3632
read_string(Str) :-
  current_input(Input),
  read_string(Input, '\n', '', _, Str).

solve(S, Ret) :-
  string_chars(S, Cs),
  findall(_, (
    member(C, Cs),
    C == 'o'
  ), Found),
  length(Found, Count),
  Ret is 700 + 100 * Count.

main :-
  read_string(S),
  solve(S, Ret),
  write(Ret).

:- main.


Measured memory_bytes: 8172
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <string>
#include <set>
#include <vector>
#include <queue>
#include <stack>
#include <map>
using namespace std;
#define ms(a, x) memset(a, x, sizeof(a))
#define fore(i, a, n) for (long long i = a; i < n; i++)
#define ford(i, a, n) for (long long i = n - 1; i >= a; i--)
#define si(a) scanf("%d", &a)
#define sl(a) scanf("%lld", &a)
#define sii(a, b) scanf("%d%d", &a, &b)
#define siii(a, b, c) scanf("%d%d%d", &a, &b, &c)
#define sll(a, b) scanf("%lld%lld", &a, &b)
#define slll(a, b, c) scanf("%lld%lld%lld", &a, &b, &c)
#define debug(a) cout << a << endl
#define pr(a) printf("%d ",a)
#define endl '\n'
#define pi acos(-1.0)
#define tr t[root]
#define lson t[root << 1]
#define rson t[root << 1 | 1]
#define IO ios::sync_with_stdio(false), cin.tie(0)
#define ull unsigned long long
const double eps = 1e-8;
inline int sgn(const double &x) { return x < -eps ? -1 : x > eps; }
typedef long long ll;
const int inf=0x3f3f3f3f;
const int MAXN = 1e5 + 10;
int n,m;
struct edge{
	int to ,next;
}e[MAXN];
int head[MAXN];
int cnt,ans;
void add(int x,int y)
{
	e[cnt].to=y;
	e[cnt].next=head[x];
	head[x]=cnt;
	cnt++;
 }
int ru[MAXN],chu[MAXN],dp[MAXN];
ll dfs(int x)
{
	if(chu[x]==0) return 0;
	if(dp[x])return dp[x];
	ll ans=0;
	for(int i=head[x];~i;i=e[i].next )
	{
		ans=max(dfs(e[i].to)+1,ans);
				
	}//cout<<ans<<endl;
	
	return dp[x]=ans;
}
int main()
{
	sii(n,m);
	ms(head,-1);
	ll ans=0;
	for(int i=0;i<m;++i)
	{
		int x,y;
		sii(x,y);
		add(x,y);
		ru[y]++;
		chu[x]++;
	}
	for(int i=1;i<=n;++i)
	{
		if(!ru[i])
		{
			ans=max(ans,dfs(i));
		}
	}
	printf("%lld\n",ans);
 } 


Measured memory_bytes: 5760
# include <cmath>
# include <iostream>
# include <queue>
# include <set>
# include <stack>
# include <string>
# include <vector>


using namespace std;


template <typename integer>
integer _gcd(integer a, integer b) {
    if (b != 0) return _gcd(b, a%b);
    else return a;
}

template <typename integer>
integer gcd (integer a, integer b) {
    if (a > b) return _gcd(a, b);
    return _gcd(b, a);
}

template<typename integer>
integer lcm(integer a, integer b) {
    return (a * b) / gcd(a, b);
}

int main() {
    long long a, b; cin >> a >> b;
    cout << lcm(a, b) << endl;   
    return 0;
}



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

#define ALL(v) (v).begin(), (v).end()
#define rep(i, n) for (ll i = 0, __##i##_length = (n); i < __##i##_length; i++)
#define rep_reverse(i, n) for (ll i = (n)-1; 0 <= i; i--)
#define FOR(i, from, to) for (ll i = (from), __##i##_end = (to); i < __##i##_end; i++)
#define FOR_REVERSE(i, from, to) for (ll i = (to)-1, __##i##_end = (from); __##i##_end <= i; i--)
#define foreach(e, v) for (const auto e : (v))
#define vfree(v) std::vector<int>().swap(v)
#define DEBUG(x) cout << #x << " = " << (x) << endl

using namespace std;
typedef int64_t ll;
typedef vector<ll> llv;
typedef vector<llv> llvv;

ll gcd(ll a, ll b)
{
    return (a < b) ? gcd(b, a) : ((a % b) ? gcd(b, a % b) : b);
}

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

int main()
{
    ll a, b;
    cin >> a >> b;
    if (0 < a && 0 < b)
    {
        cout << "Positive" << endl;
        return 0;
    }
    if (a < 0 && b < 0)
    {
        cout << (((b - a + 1) & 1) ? "Negative" : "Positive") << endl;
        return 0;
    }
    cout << "Zero" << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 2e9;
const int maxN = 500 + 9;
const int maxC = 30 + 9;
const double EPS = 1e-9;

int n, c;
int d[maxN][maxC], f[3][maxC];
vector<int> cc[3];

void read(){
  cin >> n >> c;
  for(int i = 1; i <= c; i++)
    for(int j = 1; j <= c; j++)
      cin >> d[i][j];

  for(int i = 1; i <= n; i++){
    for(int j = 1; j <= n; j++){
      int x;  cin >> x;
      cc[(i + j) % 3].push_back(x);
    }
  }
}

void solv(){
  for(int id = 0; id < 3; id++){
    for(int curColor = 1; curColor <= c; curColor++){
      f[id][curColor] = 0;
      for(int i = 0, L = cc[id].size(); i < L; i++){
        int x = cc[id][i];
        f[id][curColor] += d[x][curColor];
      }
    }
  }

  int fres = INF;
  for(int i = 1; i <= c; i++){
    for(int j = 1; j <= c; j++){
      for(int k = 1; k <= c; k++){
        if((i != j) && (j != k) && (i != k)){
          fres = min(fres, f[0][i] + f[1][j] + f[2][k]);
        }
      }
    }
  }

  cout << fres << '\n';
}

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

  #ifdef DEBUG
    freopen("in.txt", "r", stdin);
  #endif

  read();
  solv();

  return 0;
}


Measured memory_bytes: 1520
#pragma region
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <iomanip>
#include <cstdint>
#include <cstdlib>

using namespace std;
typedef long long ll;
//#define rep(i, s, e) for (int(i) = (s); (i) < (e); ++(i))
#define rep(i, e) for (int(i) = 0; (i) < (e); ++(i))
#define rrep(i, s) for (int(i) = (s) - 1; (i) >= 0; --(i))
#define all(x) x.begin(),x.end()
#pragma endregion


int main()
{
	int n, k; cin >> n >> k;
	vector<pair<ll, int>> sushi(n);
	vector<bool> chosen(n + 1);
	rep(i, n)
	{
		int t; ll d; cin >> t >> d;
		sushi[i] = make_pair(d, t);
	}
	sort(all(sushi), greater<pair<ll, int>>());
	ll res = 0;
	ll x = 0;
	vector<ll> removeCandidate, addCandidate;
	rep(i, k)
	{
		int t = sushi[i].second;
		ll d = sushi[i].first;
		res += d;
		if (!chosen[t])
		{
			chosen[t] = true;
			++x;
		}
		else removeCandidate.push_back(d);
	}
	res += x * x;
	for (int i = k; i < n; ++i)
	{
		int t = sushi[i].second;
		ll d = sushi[i].first;
		if (!chosen[t])
		{
			addCandidate.push_back(d);
			chosen[t] = true;
		}
	}
	sort(all(removeCandidate));
	sort(all(addCandidate), greater<ll>());
	ll can = res;
	for (int i = 0; i < min(removeCandidate.size(), addCandidate.size()); ++i)
	{
		can -= removeCandidate[i];
		can += addCandidate[i];
		can -= x * x;
		++x;
		can += x * x;
		res = max(res, can);
	}
	cout << res << endl;
}

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

int main(){
    int n, a, b;
    string  s;
    int sum_b=0;
    int sum=0;
    cin >> n >> a >> b;
    cin >> s;

    int len = s.length();
    for(int i=0; i<len; i++){
        if(s.at(i) == 'a'){
            if(sum < (a+b)){
                sum++;
                printf("Yes\n");
            }else{
                printf("No\n");
            }
        }else if(s.at(i) == 'b'){
            if(sum < (a+b) && sum_b < b){
                sum++;
                sum_b++;
                printf("Yes\n");
            }else{
                printf("No\n");
            }
        }else{
            printf("No\n");
        }
    }
}

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

int main() {
  int h, w;
  cin >> h >> w;
  char s[h][w];
  int i, j, k, l;
  for (i = 0; i < h; i++) {
    for (j = 0; j < w; j++) {
      cin >> s[i][j];
    }
  }
  for (i = 0; i < h; i++) {
    for (j = 0; j < w; j++) {
      if (s[i][j] != '#') {
        int count = 0;
        for (k = max(i - 1, 0); k < min(i + 2, h) ; k++) {
          for (l = max(j - 1, 0); l < min(j + 2, w); l++) {
            if (s[k][l] == '#') {
              count++;
            }
          }
        }
        s[i][j] = (char)count;
      }
    }
  }
  for (i = 0; i < h; i++) {
    for (j = 0; j < w; j++) {
      if (s[i][j] != '#') {
        cout << (int)s[i][j];
      } else {
        cout << s[i][j];
      }
    }
    cout << endl;
  }
  return 0;
 }


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

int main() {
    int x;
    cin >> x;
    if (x >= 30)
        cout << "Yes";
    else
        cout << "No";
    cout << endl;

    return 0;
}

Measured memory_bytes: 3628
using System;

namespace AtCoder.ABC._131
{
    class a
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Trim();
            for(var i = 1; i < line.Length; ++i)
            {
                if(line[i] == line[i - 1])
                {
                    Console.WriteLine("Bad");
                    return;
                }
            }
            Console.WriteLine("Good");
        }
    }
}


Measured memory_bytes: 11092
#include<bits/stdc++.h>
using namespace std;
int v[101];
int main()
{
	int n,k,i,d,c,j,a=0;
	cin>>n>>k;
	for(i=1;i<=k;i++)
	{
		cin>>d;
		for(j=1;j<=d;j++)
		{
			cin>>c;
			v[c]=1;
		}
	}
	for(i=1;i<=n;i++)if(v[i]==0)a++;
	cout<<a;
	return 0;
}


Measured memory_bytes: 3640
#include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0

using namespace std;
#define ll long long
#define rep(i,n) for (int i = 0; i < n; i++)
#define MOD (1000000007)
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int, int>
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()

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

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

const ll INF = 1LL << 60;

const int dh[4] = {1,0,-1,0};
const int dw[4] = {0,1,0,-1};

int fac(int n){
  if(n == 1) return 1;
  return n*fac(n-1);
}

int main(){
  int n; cin >> n;
  vector<double> x(n),y(n); rep(i, n) cin >> x[i] >> y[i];

  vi v; rep(i, n) v.pb(i);

  double sum = 0;
  do {
    rep(i, n-1){
      sum += sqrt(pow(x[v[i]] - x[v[i+1]], 2) + pow(y[v[i]] - y[v[i+1]], 2));
    }
  } while(next_permutation(all(v)));

  double ans = sum/fac(n);
  printf("%.10f\n", ans);
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n,a[100]={0};
    cin>>n;
    for(int i=0;i<n;i++)
        cin>>a[i];
    sort(a,a+n);
    cout<<a[n-1]-a[0]<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>

int main(){
  int a = 0; //cake_max
  int b = 0; //donut_max
  int N = 0;

  std::cin >> N;

  a = N/4;
  b = N/7;
  int res = 0;
  for (int i = 0; i<a+1; ++i){
    for (int j =0; j<b+1; ++j){
      if (4*i + 7*j == N){
        ++res;
      }
    }
  }

  if (res>0){
    std::cout << "Yes" <<std::endl;
  } else{
    std::cout << "No" << std::endl;
  }

  return 0;
}


Measured memory_bytes: 256
i2c_ = ['S','H','C','D']

def i2c(i):
	return i2c_[i]

def c2i(c):
	if c == 'S': return 0
	if c == 'H': return 1
	if c == 'C': return 2
	if c == 'D': return 3
	return -1

n=int(input())

have = [[False for j in range(14)] for i in range(4)]

for i in range(n):
	c, x = input().split()
	have[c2i(c)][int(x)] = True

for i in range(4):
	for j in range(1,14):
		if not have[i][j]:
			print(f"{i2c(i)} {j}")
	



Measured memory_bytes: 5612
#include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <queue>
#include <set>
#include <numeric>
#include <cmath>

using namespace std;

typedef long long int ll;

#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;
const ll MAXN = 1e9;

int main()
{
    int a,b;
    cin >> a>>b;
    if(a>=9 || b >= 9) cout << ":(" << endl;
    else cout << "Yay!" << endl;

    return 0;
}

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

ans = 0
fpos = []
p = '0'
for i in range(len(S)):
    if p == '0' and S[i] == '1':
        fpos.append(i)
    if p == '1' and S[i] == '0':
        fi = len(fpos) - 1 - K
        if fi >= 0:
            l = (i-1) - (fpos[fi]-1)
            if l > ans:
                ans = l
    p = S[i]
#print('ans: ', ans)
            
# top
p = '1'
cnt = 0
for i in range(len(S)):
    if p == '0' and S[i] == '1':
        cnt += 1
    if p == '1' and S[i] == '0':
        if cnt == K:
            l = i
            if l > ans:
                ans = l
            break
    if i == len(S) - 1:
        l = len(S)
        if l > ans:
            ans = l
        break
    p = S[i]

# tail
p = '1'
cnt = 0
for i in range(len(S)-1, -1, -1):
    if p == '0' and S[i] == '1':
        cnt += 1
    if p == '1' and S[i] == '0':
        if cnt == K:
            l = (len(S)-1) - i
            if l > ans:
                ans = l
            break
    if i == 0:
        l = len(S)
        if l > ans:
            ans = l
        break
    p = S[i]

print(ans)


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

#define ll long long
#define endl "\n"

int main ()
{

	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #define int ll
    //freopen("input.txt", "r", stdin); 
    //freopen("output.txt", "w", stdout);
	
	int n, m, k;
	cin >> n >> m >> k;
	
	vector <int> a(1, 0);
	vector <int> b(1, 0);
	
	for (int i=0; i<n; i++){
		int aa;
		cin >> aa;
		a.emplace_back(aa);
	}
	
	for (int i=0; i<m; i++){
		int bb;
		cin >> bb;
		b.emplace_back(bb);
	}
		
	
	for (int i=1; i<a.size(); i++){
		a[i] = a[i] + a[i-1];
	}
	
	for (int i=1; i<b.size(); i++){
		b[i] = b[i] + b[i-1];
	}
	
	int ans = 0;
	
	for (int i=0; i<=n; i++){
		int total_a = a[i];
		int remaining = k - total_a;
		if (remaining < 0) break;
		
		int taken_from_b = --upper_bound(b.begin(), b.end(), remaining) - b.begin();
		int taken_from_a = i;
		
		ans = max(ans, taken_from_a + taken_from_b);
	}
	
	cout << ans << endl;
	
	return 0;

}

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

#define ll long long 
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);


int main()
{
    ll n;
    cin >> n;
    ll ar[n];
    for(int i=0;i<n;i++) cin >> ar[i];
    sort(ar,ar+n);
    ll i=n-1,a=0,b=0;
    for(;i>=1;i--)
    {
        if(ar[i]==ar[i-1])
        {
            a=ar[i];
            i-=2;
            break;
        }
    }
    for(;i>=1;i--)
    {
        if(ar[i]==ar[i-1])
        {
            b=ar[i];
            i--;
            break;
        }
    }
    cout << a*b << endl;
}

Measured memory_bytes: 4412
#include<bits/stdc++.h>
using namespace std;
    static const double pi = 3.141592653589793;
 typedef pair<int64_t,int64_t> P;
#define rep(i, n) for (int i = 0; i < (n); i++)
 #define all(v) (v).begin(),(v).end()
 using ll = long long;
using Graph = vector<vector<int>>;
const int MAX = 510000;
const int MOD = 1000000007;



int main(){
ll a,b;
  cin>>a>>b;
  ll d=a*b;
 
  if(a==1) cout<<1;
  else if(b==1) cout<<1;
  else if(d%2==0) cout<<d/2;
  else cout<<d/2+1;
  
  }
 





Measured memory_bytes: 256
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <math.h>
#include <cstdlib>
#include <iomanip>
#define rep(i,x) for(ll i=0;i<x;i++)
#define all(a) (a).begin(),(a).end()
using namespace std;
using ld = long double;
using ll = long long;
const ll INF = 10010010010;
typedef pair<ll, ll> P;
using graph = vector<vector<ll>>;
const ll mod = 1000000007;
ll gcd(ll a, ll b) {//a>b
    if (a < b)swap(a, b);
    if (a % b == 0) return b;
    else return gcd(b, a % b);
}/*フィボナッチテンプレ
ll memo[50];
ll fibo(ll n) {
    if (memo[n] != 0)return memo[n];
    if (n <= 1)return memo[n] = n;
    else return memo[n] = fibo(n - 1) + fibo(n - 2);
}
*/
bool isp(ll n) {
    bool res = true;
    for (ll i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            res = false;
            break;
        }
    }
    return res;
}

int main() {
  ll N;
  cin >> N;
  vector<ll> ten(N);
  vector<ll> hito(N);
  ll a ,b;
  ll cntten = 0;
  ll cnthito = 0;
  rep(i,N){
    cin >> hito[i] >> ten[i];
  }
  rep(i,N){
    if(cnthito < hito[i]){
      cnthito = hito[i];
      cntten = ten[i];
    }
  }
  cout << cntten + cnthito << endl;
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i = (a); i <= (b); i++)
#define rng(a) a.begin(), a.end()
#define ina(n,a) cin >> n; for(int i = 1; i <= n; i++) cin >> a[i]
#define sz(x) (int)(x).size()
#define se second
#define fi first
#define prev            coyhhhhhhyoc    
#define next          sdNNNmNNNNNNNmds  
#define y0           hNNNNy_yNNNNNN_sNh
#define y1          mNNNNNdtdNNNNNNtsNNm
#define yn          mNNNNNNNNy___smNNNms
#define tm            oooooosyysooooot 
#define read               tyhyt        
#define rank              ytmNmo         
#define index              yyy
#define pb push_back
#define pcnt __builtin_popcountll
#define rrep(i,a,b) for(int i = (b); i >= (a); i--)
#define rall(x,a) for(auto x : a)
#define MOD 1000000007
#define endl "\n"
typedef long long ll;
using namespace std;

const int N = 111111;
int v[N], ne[N], no[N];
int n;

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin >> n;
    int m = 0;
    rep(i, 1, n) {
        cin >> v[i];
        m = max(m, v[i]);
        if(i & 1) {
            no[v[i]]++;
        } else {
            ne[v[i]]++;
        }
    }
    if(n == 2) {
        cout << 0 << endl;
        return 0;
    }
    int me = 0, mee = 0;
    int mo = 0, moo = 0;
    rep(x, 1, m) {
        if(ne[x] >= ne[me]) {
            mee = me, me = x;
        } else if(ne[x] >= ne[mee]) {
            mee = x;
        }
        if(no[x] >= no[mo]) {
            moo = mo, mo = x;
        } else if(ne[x] >= no[moo]) {
            moo = x;
        }
    }
    int ans = n - (me != mo ? ne[me] + no[mo] : max(ne[me] + no[moo], ne[mee] + no[mo]));
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 1408
x = gets.to_i
if x >= 1800
  puts 1
elsif x >= 1600
  puts 2
elsif x >= 1400
  puts 3
elsif x >= 1200
  puts 4
elsif x >= 1000
  puts 5
elsif x >= 800
  puts 6
elsif x >= 600
  puts 7
else
  puts 8
end


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long int
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(a)      (a).begin(),(a).end()
#define rall(a)     (a).rbegin(),(a).rend()

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpii;
typedef vector<vector<int>> vvi;
typedef unordered_map<int,int> uoii;
typedef unordered_map<string,int> uosi;

const int MOD = 1e9+7;

const int INF = 1e10;




int32_t main()
{
    IOS
    int l;
    cin>>l;
    double ans=l/3.0;
    cout<<setprecision(12)<<fixed<<ans*ans*ans;


    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define INF 1e9
#define endl '\n'
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define FORE(i, a, b) for (int i = (a), e = (b); i < e; ++i)
#define RFORE(i, a, b) for (int i = (b)-1, e = (a); i >= e; --i)
#define ALL(x) (x).begin(), (x).end()
#define SORT(c) sort((c).begin(), (c).end())
#define SORTR(c) sort((c).begin(), (c).end(), greater<int>())
using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int N;
    cin >> N;
    vector<int> L(N);
    for (int i = 0; i < N; i++) {
        cin >> L.at(i);
    }
    int ans = 0;
    FOR(i, 0, N - 2) {
        FOR(j, i + 1, N - 1) {
            FOR(k, j + 1, N) {
                int Li = L.at(i);
                int Lj = L.at(j);
                int Lk = L.at(k);
                if ((Li != Lj) & (Li != Lk) & (Lj != Lk) & (Li + Lj > Lk) &
                    (Lj + Lk > Li) & (Lk + Li > Lj)) {
                    ++ans;
                }
            }
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 3668
while true do
	
	aryInputLines = gets.split.map(&:to_i);
	
	middleTestPoints = aryInputLines[0];
	termEndTestPoints = aryInputLines[1];
	retestPoints = aryInputLines[2];
	
	if middleTestPoints == -1 && termEndTestPoints == -1 && retestPoints == -1 then
		break;
	end
	
	if middleTestPoints == -1 || termEndTestPoints == -1 then
		puts "F";
	elsif middleTestPoints + termEndTestPoints >= 80 then
		puts "A";
	elsif 65 <= middleTestPoints + termEndTestPoints && middleTestPoints + termEndTestPoints < 80 then
		puts "B";
	elsif 50 <= middleTestPoints + termEndTestPoints && middleTestPoints + termEndTestPoints < 65 then
		puts "C";
	elsif 30 <= middleTestPoints + termEndTestPoints && middleTestPoints + termEndTestPoints < 50 then
		
		if retestPoints >= 50 then
			puts "C";
		else
			puts "D";
		end
	
	else
		puts "F";
	end
end

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

using namespace std;

int n, a[7] , ans=0x3f3f3f3f, l[11];
vector<int> V[7];

void dfs(int k) {
	if (k==n+1) {
		int tmp=0;
		for(int i=1; i<=3; i++) {
			if (!V[i].size()) return;
			tmp+=(V[i].size()-1)*10;
			int sum=0;
			for(int j=0; j<V[i].size(); j++) sum+=V[i][j];
			tmp+=abs(sum-a[i]);
		}
		ans=min(ans, tmp);
		return;
	}
	for(int i=1; i<=4; i++) {
		V[i].push_back(l[k]);
		dfs(k+1);
		V[i].pop_back();
	}
}

int main() {
	cin>>n>>a[1]>>a[2]>>a[3];
	for(int i=1; i<=n; i++) {
		cin>>l[i];
	}
	dfs(1);
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <stack>
#include <math.h>
#define Z class
#define ln cout<<'\n'
#define ll long long
#define rep(i, n) for(int i = 0; i < (n); ++i)

// int H[N]; rep(i,N) scanf("%d", &H[i]);
// int max_x = *std::max_element(x.begin(), x.end());
// int min_y = *std::min_element(y.begin(), y.end());
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;}
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}

int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
const long long INF = 1LL << 60;

int main(){
    char A,B; cin >> A >> B;
    if(A<B) pr("<");
    else if(A>B) pr(">");
    else pr("=");
}



Measured memory_bytes: 256
import sys
n = int(input())
A = [int(e)for e in sys.stdin]
cnt = 0
G = [int((3**i-1)/2)for i in range(14,0,-1)]
G = [v for v in G if v <= n]
def insertionSort(A, n, g):
    global cnt
    for i in range(g, n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j+g] = A[j]
            j = j - g
            cnt += 1
        A[j+g] = v
for g in G:
    insertionSort(A, n, g)
print(len(G))
print(*G)
print(cnt)
print(*A,sep='\n')


Measured memory_bytes: 53288
#include<bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
#define ll long long int
#define ld long long double
#define vi vector<int>
#define vl vector<ll>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define pb push_back
#define pf push_front
#define pob pop_back
#define pof pop_front
#define nl '\n'
#define mp make_pair
#define debug1(x) cout <<#x<<" "<<x<<'\n';
#define debug2(x,y) cout <<#x<<" "<<x <<" "<<#y<<" "<<y <<'\n';
#define debug3(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<'\n';
#define fi first
#define se second
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define inf 1e18
const int mod = (int)1e9 + 7;
pair<ll, ll>s4[4] = {{ -1, 0}, {1, 0}, {0, -1}, {0, 1}};
pair<ll, ll>s8[8] = {{ -1, -1}, { -1, 0}, { -1, 1}, {0, -1}, {0, 1}, {1, 1}, {1, 0}, {1, -1}};

void judge() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}

void solve() {
    ll a;
    cin >> a;
    cout << a + a*a + a*a*a << nl;
}

signed main() {
    judge();
    boost;
    solve();
}


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

int main(){
	int N;
	cin >> N;
	long long ans = 1;
	for (int i = 1; i <= N; i++){
		ans *= i;
		ans = ans%(1000000000 + 7);
	}

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

X,Y = inpl()
print(X+Y//2)


Measured memory_bytes: 4464
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

o = rs()
e = rs()
ans = ''
for i in range(len(o)):
    ans += o[i]
    if i < len(e):
        ans += e[i]
print(ans)

Measured memory_bytes: 9060
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();
		int[] A = new int[N];

		for(int i = 0 ; i < N ; i++){
			A[i] = sc.nextInt();
		}
		sc.close();

		long[] cost = new long[N];
		cost[0] = 0;

		System.out.println(dfs(0,N-1,K,cost,A));

	}
	static long dfs(int a,int b,int c,long[] cost,int[] A){
		if(a == 0){
			return dfs(1,b,c,cost,A);
		}
		else{
			int p = Math.min(a, c);
			long tmp = 1000000000;
			for(int i = 1 ; i <= p ; i++){
				tmp = Math.min(tmp,cost[a-i] + Math.abs(A[a-i]-A[a]));
			}
			cost[a] = tmp;

			if(a == b){
				return cost[a];
			}
			else{
				return dfs(a+1,b,c,cost,A);

			}


		}
	}
}

Measured memory_bytes: 63992
#include<iostream>
#include<utility>
#include<cmath>
#include<iomanip>
using namespace std;

struct Point{
    double x;
    double y;
    Point(double x, double y) : x(x), y(y) {}
    Point operator-(Point p) {
        return Point(x - p.x, y - p.y);
    }
    Point operator+(Point p) {
        return Point(x + p.x, y + p.y);
    }
};
typedef Point Vector;
double dot(Vector v1, Vector v2){
    return v1.x * v2.x + v1.y * v2.y;
}

struct Circle{
    Point  c;
    double r;
    Circle(Point c, double r) : c(c), r(r) {}
};

pair<Point, Point> cross_point(Circle c1, Circle c2){
    double d = sqrt(dot(c2.c - c1.c, c2.c - c1.c));
    double cos1 = (c1.r * c1.r + d * d - c2.r * c2.r) / (2 * c1.r * d);
    double theta1 = acos(cos1);
    double theta2 = atan2(c2.c.y - c1.c.y, c2.c.x - c1.c.x);
    double alpha = theta2 + theta1;
    double beta  = theta2 - theta1;
    Point p1 = c1.c + Point(c1.r * cos(alpha), c1.r * sin(alpha));
    Point p2 = c1.c + Point(c1.r * cos(beta ), c1.r * sin(beta ));
    return make_pair(p1, p2);
}
void disp(pair<Point, Point> p){
    Point p1 = p.first;
    Point p2 = p.second;
    if (p1.x > p2.x || p1.x == p2.x && p1.y > p2.y) swap(p1, p2);
    cout << fixed << setprecision(10);
    cout << p1.x << " " << p1.y << " ";
    cout << p2.x << " " << p2.y << endl;
}

int main(){
    int c1x, c1y, c1r;
    cin >> c1x >> c1y >> c1r;
    Circle c1(Point(c1x, c1y), c1r);
    int c2x, c2y, c2r;
    cin >> c2x >> c2y >> c2r;
    Circle c2(Point(c2x, c2y), c2r);
    pair<Point, Point> cp = cross_point(c1, c2);
    disp(cp);
    return 0;
}



Measured memory_bytes: 3764
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static System.Math;
public static class P
{
    public static void Main()
    {

        Console.WriteLine(string.Join("", Console.ReadLine().Split().Select(x => char.ToUpper(x.First()))));
    }
}

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

using namespace std;
bool snuke[100];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    int n, k, counting = 0;
    cin >> n >> k;
    memset(snuke, 0, 100);
    while(k){
        int d;
        cin >> d;
        while(d){
            int m;
            cin >> m;
            snuke[m-1] = 1;
            d--;
        }
        k--;
    }

    for(int i=0;i<n;i++){
        if(!snuke[i])
            counting++;
    }
    cout << counting << endl;
    return 0;
}

Measured memory_bytes: 3580