akhauriyash/Code-Regression huggingface dataset:
/*
  ->->->->->-> Vora Mahammadasim <-<-<-<-<-<-
*/
#include<bits/stdc++.h>
#include<stdio.h>
#define int long long
#define pb emplace_back
#define Mod 1000000007
#define all(a) a.begin(),a.end()
using namespace std;
signed main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    for(int i = -2000 ;i<=2000;i++){
        for(int j=-2000 ;j<=2000;j++){
            if(i*i*i*i*i - j*j*j*j*j == n){
                cout<<i<<" "<<j<<'\n';
                return 0;
            }
        }
    }
}


Measured memory_bytes: 3636
H, W = map(int, input().split())
lists = [list(map(str, input())) for i in range(H)]

# 下、右、上、左、右下、右上、左下、左上
dh = [1, 0, -1, 0, 1, -1, 1, -1]
dw = [0, 1, 0, -1, 1, 1, -1, -1]

for i in range(H):
    for j in range(W):
        if lists[i][j] == "#":
            continue

        count = 0

        for k in range(8):
            nh = i + dh[k]
            nw = j + dw[k]

            if nh < 0 or H <= nh or nw < 0 or W <=nw:
                continue

            if lists[nh][nw] == "#":
                count += 1

        lists[i][j] = str(count)

for i in range(H):
    print("".join(lists[i]))


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

#include <boost/range/adaptors.hpp>
#include <boost/range/irange.hpp>

using namespace std;
using namespace boost;
using namespace boost::adaptors;

int main() {
    int64_t n;
    cin >> n;

    vector<string> s(n);
    for (auto&& ss : s) {
        cin >> ss;
    }

    vector<pair<int64_t, int64_t>> t1, t2;
    for (const auto& ss : s) {
        int64_t r = 0L, l = 0L;
        for (auto c : ss) {
            if (c == ')') {
                if (l > 0) {
                    --l;
                } else {
                    ++r;
                }
            } else {
                ++l;
            }
        }

        if (l - r >= 0) {
            t1.emplace_back(r, l - r);
        } else {
            t2.emplace_back(l, r - l);
        }
    }

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

    int64_t r = 0;
    for (const auto& tt : t1) {
        if (r - tt.first < 0) {
            cout << "No" << endl;
            return 0;
        }

        r += tt.second;
    }

    sort(t2.begin(), t2.end());
    int64_t l = 0;
    for (const auto& tt : t2) {
        if (l - tt.first < 0) {
            cout << "No" << endl;
            return 0;
        }

        l += tt.second;
    }

    if (l == r) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}

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

const int MAX_V = 1e5, MAX_LOG_V = 20;
vector<int> G[MAX_V];
int parent[MAX_LOG_V][MAX_V], depth[MAX_V];
vector< vector<int> > D(MAX_V);

void dfs(int v, int p, int d){
  parent[0][v] = p;
  depth[v] = d;
  D[d].push_back(v);
  for(int i = 0; i < G[v].size(); ++i){
    if(G[v][i] != p) dfs(G[v][i], v, d + 1);
  }
}

void init(int V, int root){
  dfs(root,-1,0);
  for(int k = 0; k + 1 < MAX_LOG_V; ++k){
    for(int v = 0; v < V; ++v){
      if(parent[k][v] < 0) parent[k + 1][v] = -1;
      else parent[k + 1][v] = parent[k][parent[k][v]];
    }
  }
}

int lca(int u, int v){
  if(depth[u] > depth[v]) swap(u, v);
  for(int k = 0; k < MAX_LOG_V; ++k){
    if((depth[v] - depth[u]) >> k & 1){
      v = parent[k][v];
    }
  }
  if(u == v) return u;
  for(int k = MAX_LOG_V - 1; k >= 0; --k){
    if(parent[k][u] != parent[k][v]){
      u = parent[k][u];
      v = parent[k][v];
    }
  }
  return parent[0][u];
}

long long int solve(vector<int> &P, int root){
  int n = P.size();
  for(int i = 1; i < n; ++i){
    G[i].push_back(P[i]);
    G[P[i]].push_back(i);
  }
  for(int i = 0; i < n; ++i) sort(G[i].begin(), G[i].end());
  init(n, root);
  long long int ret = 0;
  //for(int i = 0; i < n; ++i) cout << depth[i] << " "; cout << endl;
  vector<int> order;
  int t = n;
  for(int i = 0; i < n; ++i){
    for(int j = 0; j < D[i].size(); ++j){
      order.push_back(D[i][j]);
      --t;
    }
    if(t == 0) break;
  }
  for(int i = 1; i < n; ++i){
    int u = order[i], v = order[i - 1], l = lca(u,v);
    ret += depth[u] + depth[v] - 2*depth[l];
  }
  return ret;
}

int main(){
  int n;
  cin >> n;
  vector<int> P(n);
  P[0] = -1;
  for(int i = 1; i < n; ++i){
    cin >> P[i];
    --P[i];
  }
  cout << solve(P,0) << endl;
  return 0;
}



Measured memory_bytes: 27752
import heapq

n,m=map(int,input().split())
task=[[0] for _ in range(m+1)]

for i in range(n):
    a,b=map(int,input().split())
    if a<=m:
        task[a].append(b)

task=task[::-1]

tmp=[]
heapq.heapify(tmp)
ans=0

for i in range(m,-1,-1):
    cnt=0
    for j in task[i]:
        heapq.heappush(tmp,-j)
    cnt=heapq.heappop(tmp)
    ans-=cnt
print(ans)


Measured memory_bytes: 21496
N = int(input())
h = list(map(int, input().split()))
h.insert(0, float("inf"))

dp = [0] * (N + 1)
dp[0] = float("inf")
dp[1] = 0

for i in range(2, N + 1):
    dp[i] = min(dp[i - 1] + abs(h[i - 1] - h[i]),
    dp[i - 2] + abs(h[i - 2] - h[i]))

print(dp[N])

Measured memory_bytes: 13928
#include <stdio.h>
int main(void)
{
	int a,b,c,d,n,m=1,m2=0,i,j;
	int e[101]={0},f[101],g[101];
	int temp;
	scanf("%d",&n);
	for(i=1;i<=n*(n-1)/2;i++){
		scanf("%d %d %d %d",&a,&b,&c,&d);
		if(c>d)e[a]+=3;
		else if(c<d)e[b]+=3;
		else e[a]++,e[b]++;
		f[a]=e[a],f[b]=e[b];
	}
	for(i=1;i<n;i++)
	for(j=i+1;j<=n;j++)
	if(e[i]<e[j])temp=e[i],e[i]=e[j],e[j]=temp;
	for(i=1;i<=n;i++){
		g[i]=m;
		if(e[i]!=e[i+1]){
			m=m+1+m2;
			m2=0;
		}
		else m2++;
	}
	i=1;
	while(i<=n){
		j=1;
		while(j<=n){
			if(f[i]==e[j]){
				e[j]=0;
				break;
			}
			j++;
		}
		printf("%d\n",g[j]);
		i++;
	}
	return 0;
}



Measured memory_bytes: 2104
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define vv(T) std::vector<std::vector<T>>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;
using ll = long long;

int		main(void)
{
	int n;
	cin >> n;

	vector<int> C(510);
	vector<int> S(510);
	vector<int> F(510);
	for (int i = 0; i < n-1; ++i)
		cin >> C[i] >> S[i] >> F[i];

	for (int i = 0; i < n; ++i)
	{
		int ans = S[i] + C[i];
		for (int j = i+1; j < n-1; ++j)
		{
			if (ans < S[j])
				ans += S[j] - ans;
			else if (ans > S[j])
			{
				int t = S[j];
				// 爆発？
				while (ans > t)
				  t += F[j];
				ans += t - ans;
			}
			ans += C[j];
		}
		cout << ans << endl;
	}
}



Measured memory_bytes: 3624
import sys
from math import atan, degrees

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    a, b, x = map(int, readline().split())
    if x > a * a * b / 2:
        ans = atan((2 * a * a * b - 2 * x) / (a ** 3))
    else:
        ans = atan(a * b * b / (2 * x))

    print(degrees(ans))
    return


if __name__ == '__main__':
    main()


Measured memory_bytes: 3060
"use strict";
var input=require("fs").readFileSync("/dev/stdin","utf8");
var cin=input.split(/ |\n/),cid=0;
function next(a){return a?cin[cid++]:+cin[cid++];}
function nexts(n,a){return a?cin.slice(cid,cid+=n):cin.slice(cid,cid+=n).map(a=>+a);}
function nextm(h,w,a){var r=[],i=0;if(a)for(;i<h;i++)r.push(cin.slice(cid,cid+=w));else for(;i<h;i++)r.push(cin.slice(cid,cid+=w).map(a=>+a));return r;}
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill().map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill().map(x=>"+r+")";return eval(r);}

var myOut = main();
if(myOut !== undefined)console.log(myOut);

function main(){
  var k = next();
  var a = next(), b = next();
  for(var i = a; i <= b; i++){
    if(i % k === 0)return "OK";
  }
  return "NG";
}

Measured memory_bytes: 29636
#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#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<string.h>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
int n,a[110],ans;
int main()
{
	scanf("%d",&n);
	for (int i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
	}
	int now=0;
	for (int i=1;i<=n;i++)
	{
		if (a[i]==a[i-1])
		{
			now++;
		}
		else
		{
			ans+=now/2;
			now=1;
		}
	}
	ans+=now/2;
	printf("%d\n",ans);
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
int main(){
  
  int i, x;
  i = 1;
  while(1){
    scanf("%d", &x);
    if(x == 0){
     break;
    } 
     printf("Case %d: %d\n", i, x);
     i++;
  }
  return 0;
}


Measured memory_bytes: 1928
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define int long long
#define ll long long
#define INF LLONG_MAX/3
#define eps LDBL_EPSILON
#define moder 1000000007
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
using namespace std;
int n,a[100010];
bool check(int s){
	int size=a[s];
	rep(i,n){
		if(i!=s){
			if(a[i]<=2*size)size+=a[i];
			else return false;
		}
	}
	return true;
}
signed main(){
	cin>>n;
	rep(i,n)cin>>a[i];
	sort(a,a+n);
	int mi=0,ma=n-1;
	while(ma-mi>=2){
		int md=(mi+ma)/2;
		if(check(md))ma=md;
		else mi=md;
	}
	if(check(mi)){
		while(a[mi]==a[mi-1])mi--;
		cout<<n-mi<<endl;
	}
	else{
		while(a[ma]==a[ma-1])ma--;
		cout<<n-ma<<endl;
	}
    return 0;
}

Measured memory_bytes: 1024
#include<cstdio>
#include<vector>
#include<map>
#include<algorithm>
#include<cstring>
#define INF 1<<28
#define F first
#define S second
using namespace std;
 
int sx, sy, gx, gy;
typedef pair < int, int > P;
vector < P > v[5];
int memo[5][5][1111];

int dist(P a, P b){
  return abs(a.F - b.F) + abs(a.S - b.S);
}


int solve(int cnt, int now, int p){
 
  if(cnt == 4) return dist(v[now][p], P(gx, gy));
  if(memo[cnt][now][p]) return memo[cnt][now][p];
 
  int ans = INF, d = (now+1)%5, c;
  for(int i=0;i<v[d].size();i++){
    if(!cnt) c = dist(P(sx, sy), v[d][i]);
    else c = dist(v[now][p], v[d][i]);
    ans = min(ans, solve(cnt+1, d, i) + c);
  }
 
  return memo[cnt][now][p] = ans;
}
 
int main(){
 
  int w, h;
  char c;
 
  while(scanf("%d %d", &w, &h), w){
    
    for(int i=0;i<5;i++) v[i].clear();
    
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
	scanf(" %c", &c);
	if(c == '.') continue;
	else if(c == 'S') sx = j, sy = i;
	else if(c == 'G') gx = j, gy = i;
	else v[c-'1'].push_back(P(j,i));
      }
    }
    
    int a, b = INF;
    for(int i=0;i<5;i++){
      memset(memo, 0, sizeof(memo));
      if(b > solve(0,i,0)) a = i+1, b = solve(0,i,0);
    }
 
    if(b == INF) puts("NA");
    else printf("%d %d\n", a, b);
 
  }
}

Measured memory_bytes: 1192
#include <stdio.h>
#include <string.h>

void island_delete(int data[][60], int w, int h, int self_i, int self_j) {
  data[self_i][self_j] = 0;
  if (self_j-1 >= 0 && data[self_i][self_j-1] == 1) {
	island_delete(data,w,h,self_i,self_j-1);
  }
  if (self_i-1 >= 0 && data[self_i-1][self_j] == 1) {
	island_delete(data,w,h,self_i-1,self_j);
  }
  if (self_j+1 <= w && data[self_i][self_j+1] == 1) {
	island_delete(data,w,h,self_i,self_j+1);
  }
  if (self_i+1 <= h && data[self_i+1][self_j] == 1) {
	island_delete(data,w,h,self_i+1,self_j);
  }

  if (self_j-1 >= 0 && self_i-1 >= 0 && data[self_i-1][self_j-1] == 1) {
	island_delete(data,w,h,self_i-1,self_j-1);
  }
  if (self_j+1 <= w && self_i-1 >= 0 && data[self_i-1][self_j+1] == 1) {
	island_delete(data,w,h,self_i-1,self_j+1);
  }
  if (self_j-1 >= 0 && self_i+1 <= h && data[self_i+1][self_j-1] == 1) {
	island_delete(data,w,h,self_i+1,self_j-1);
  }
  if (self_j+1 <= w && self_i+1 <= h && data[self_i+1][self_j+1] == 1) {
	island_delete(data,w,h,self_i+1,self_j+1);
  }


  
}

int main(void) {
  while(1) {
	int w, h;
	int cnt = 0;
	int data[60][60] = {{0}};
	scanf("%d%d", &w, &h);
	if (w == h && w == 0) break;
	for (int i = 0; i < h; i++) {
	  for (int j = 0; j < w; j++) {
		scanf("%d", &data[i][j]);
	  }
	}
	int self_i, self_j;
	for (int i = 0; i < h; i++) {
	  for (int j = 0; j < w; j++) {
		if (data[i][j] == 1) {
		  self_i = i; self_j = j; cnt++;
		  island_delete(data,w,h,self_i,self_j);
		}
	  }
	}
	printf("%d\n",cnt);
  }
  return 0;
}

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

using namespace std;

#define int long long
#define FOR(i, a, b) for(ll i = (a); i < (b); ++i)
#define FORR(i, a, b) for(ll i = (a); i > (b); --i)
#define REP(i, n) for(ll i = 0; i < (n); ++i)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOREACH(x, a) for(auto &(x) : (a))
#define VECCIN(x)                                                              \
    for(auto &youso_ : (x)) cin >> youso_
#define bitcnt __builtin_popcount
#define SZ(x) ((ll)(x).size())
#define fi first
#define se second
#define All(a) (a).begin(), (a).end()
template <typename T = long long> inline T IN() {
    T x;
    cin >> x;
    return (x);
}
inline void CIN() {}
template <class Head, class... Tail>
inline void CIN(Head &&head, Tail &&... tail) {
    cin >> head;
    CIN(move(tail)...);
}
#define CINT(...)                                                              \
    int __VA_ARGS__;                                                           \
    CIN(__VA_ARGS__)
#define LCIN(...)                                                              \
    ll __VA_ARGS__;                                                            \
    CIN(__VA_ARGS__)
#define SCIN(...)                                                              \
    string __VA_ARGS__;                                                        \
    CIN(__VA_ARGS__)
#define Yes(a) cout << (a ? "Yes" : "No") << "\n"
#define YES(a) cout << (a ? "YES" : "NO") << "\n"
#define Printv(v)                                                              \
    {                                                                          \
        FOREACH(x, v) { cout << x << " "; }                                    \
        cout << "\n";                                                          \
    }
template <typename T = string> inline void eputs(T s) {
    cout << s << "\n";
    exit(0);
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
    std::fill((T *)array, (T *)(array + N), val);
}
template <typename T> using PQG = priority_queue<T, vector<T>, greater<T>>;
template <typename T> using PQ = priority_queue<T>;

typedef long long ll;
typedef unsigned long long ul;
typedef vector<ll> VL;
typedef pair<ll, ll> PL;

const int INF = 1e9;
const int MOD = 1e9 + 7;
// const int MOD = 998244353;
const ll LINF = 1e18 + 1;
const ll dx[] = {1, -1, 0, 0};
const ll dy[] = {0, 0, 1, -1};

ll K;
VL d;

signed main() {
    cin >> K;
    d.assign(K, LINF);
    PQG<PL> pqg;
    FOR(i, 1, 10) {
        d[i % K] = min(d[i % K], i);
        pqg.emplace(d[i % K], i % K);
    }
    while(pqg.size()) {
        PL t = pqg.top();
        pqg.pop();
        if(t.fi != d[t.se]) continue;
        REP(i, 10) {
            ll nx = (t.se * 10 + i) % K;
            ll nc = t.fi + i;
            if(d[nx] > nc) {
                d[nx] = nc;
                pqg.emplace(nc, nx);
            }
        }
    }
    cout << d[0] << "\n";
}


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

ll dp[105][100007];
int main(){
  ll n,W; cin>>n>>W;
  ll w[n+2],v[n+2];
  
  rep(i,n){cin>>w[i]>>v[i];}
  
  rep(i,n+1)for(ll j=0;j<W+1;j++){
    if(j>=w[i]) dp[i][j]=max(dp[i-1][j],dp[i-1][j-w[i]]+v[i]);
    else dp[i][j]=dp[i-1][j];
  }
  cout<<dp[n][W]<<endl;
}

Measured memory_bytes: 79488
N,M = map(int,input().split())
S = [tuple(map(int,input().split()[1:])) for i in range(M)]
P = list(map(int,input().split()))

ans = 0
for b in range(1<<N):
    for i,s in enumerate(S):
        c = 0
        for t in s:
            if b&(1<<(t-1)): c+=1
        if c%2!=P[i]: break
    else:
        ans += 1
print(ans)

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

import math


sum_prob=0

for i in range(1,N+1):
    ratio =  K / i


    power = math.ceil(math.log2(ratio))
    if power <= 0:
        sum_prob+=1/N
        continue
    sum_prob += (1/(2**power ))/ N


print(sum_prob)

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

using namespace std;

static void inputArray(int A[], int num) {
  for (int i = 0; i < num; i++) {
    cin >> A[i];
  }
}

static inline bool solve(int A[], int i, int n, int m) {
  if (m == 0) {
    return true;
  }
  
  if (i < n && m > 0) {
    return solve(A, i + 1, n, m) || solve(A, i + 1, n, m - A[i]);
  } else {
    return false;
  }
}

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

  vector<int> A(n);
  inputArray(&A[0], n);

  int q;
  cin >> q;

  int m;
  bool ans;
  for (int i = 0; i < q; i++) {
    cin >> m;
    ans = solve(&A[0], 0, n, m);
    cout << (ans ? "yes" : "no") << endl;
  }
  
  return 0;
}



Measured memory_bytes: 3108
N,S=map(int,input().split())
A=list(map(int,input().split()))
mod=998244353

dp=[[0 for i in range(0,S+1)] for j in range(0,N)]
for i in range(0,S+1):
    if i==A[0]:
        dp[0][i]=1

for i in range(1,N):
    for j in range(0,S+1):
        if j>A[i]:
            dp[i][j]=(dp[i-1][j]+dp[i-1][j-A[i]])%mod
        elif j==A[i]:
            dp[i][j]=(dp[i-1][j]+(i+1))%mod
        else:
            dp[i][j]=dp[i-1][j]

ans=0
for i in range(0,N):
    ans=(ans+dp[i][S])%mod

print(ans)

Measured memory_bytes: 120092
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define F first
#define S second
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define Blue ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define rep(i,a,n) for(int i=a;i<n;++i)
typedef vector<int> vi;
typedef long long ll;
const int mod=1e9+7;
 
const int dx[]={1,-1,0,0},dy[]={0,0,1,-1};
vector<ll>q;

ll getAns(ll m){
	ll x=0;
	auto it=upper_bound(all(q),m)-q.begin()-1;
	return it;
}

void solve(){
	ll n;
	cin>>n;
	ll ans=0;
	for(ll i=0;i<=9;i++){
		q.pb(((i+1)*i)/2);
	}
	for(ll i=2;i*i<=n;i++){
		ll cnt=0;
		while(n%i==0){
			cnt++;
			n/=i;
		}
		ans+=getAns(cnt);
	}
	if(n>1)ans++;
	cout<<ans;
 
}
 
 
int main(){
	Blue;
	int test=1;
	//cin>>test;
	while(test--)
		solve();
	return 0;
}

Measured memory_bytes: 3632
var n,i,a,b,c,j,k,l,o:longint;
begin
read(a,b,c,n);
for i:=0 to a do
  for j:=0 to b do
    for k:=0 to c do
      if(i*500+j*100+k*50=n)then inc(o);write(o);
end.

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
using str = string;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
const double PI = 3.141592653589793238;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define REP(i, m, n) for (int i = m; i < (int)n; i++)
#define all(a) (a).begin(), (a).end()
#define allg(a) (a).begin(), (a).end(), greator<>()
#define d20 std::setprecision(20)
#define veci vector<int>
#define vecll vector<long long int>
#define vecb vector<bool>
#define vecd vector<double>
template <typename T>
T lcm(T a, T b)
{
	return a / __gcd(a, b) * b;
}

int main()
{
	int n;
	cin >> n;
	set<char> s;
	rep(i, n)
	{
		char tmp;
		cin >> tmp;
		s.insert(tmp);
	}
	if (s.size() == 4)
		cout << "Four" << endl;
	else
		cout << "Three" << endl;
	return 0;
}

Measured memory_bytes: 3624
import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 1_000_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "begin", long, "end");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    long k, t;
    scan(k, t);
    auto a = aryread();
    auto m = a.reduce!(max);
    long other = k - m;
    writeln(max(0, m - 1 - other));
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define vb __int128
#define ll long long
#define ld long double
#define full(a) a.begin(),a.end()
#define stoink stack<ll>
#define vec vector <ll>
#define vg vector<vector<ll> >
#define vgw vector<vector<pair<ll,ll> >
#define pa pair<ll,ll>
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define pre 0.00000000000000000001
#define inf 1000000000000
#define mod 998244353
bool comp(pa a,pa b) {
	if(a.ff  == b.ff)
		return a.ss < b.ss;
	return a.ff < b.ss;
}
int main()
{	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll n;
	cin >> n;
	vec a(n),b(n);
	ll i;
	for(i = 0 ; i < n ; i++) {
		cin >> a[i] >> b[i];
	}
	sort(full(a));
	sort(full(b));
	if(n & 1) {
		ll ind = n / 2;
		ll ans = b[ind] - a[ind] + 1;
		cout << ans ;	
	}
	else {
		ll ind1 = n / 2;
		ind1--;
		ll ind2 = ind1 + 1;
		ld med1 = ((ld)a[ind1] + (ld)a[ind2]) / 2;
		ld med2 = ((ld)b[ind1] + (ld)b[ind2]) / 2;
		ld ans = (med2 - med1) / 0.5;
		ans++;
		ll anss = (ll)ans;
		cout << anss ;	
	}
	return 0;
}

Measured memory_bytes: 6348
#include <bits/stdc++.h>
#define rep(i,n1) for(int i=0;i<n1;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define yesno(flg) if(flg){cout<<'YES'<<endl;}else{cout<<'NO'<<endl;}
#define vi vector<int>
#define pb push_back
#define i197 1000000007
#define MAX_N 200002
#define PI 3.141592653589793
using namespace std;

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<Pii,int> Piii;
typedef pair<int,ll> Pil;
typedef pair<ll,ll> Pll;
typedef pair<string,int> Psi;
typedef pair<Psi,int> Psii;

const ll inf=1000000007;
struct edge{
	int myc,to,c,cost;
};
struct pos{
	int to,cost,color;
};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

vector<Pii> v[100001];
ll dp[300000][60]={};
ll dp2[300000][60]={};
int main() {
	string s,t;
	cin>>s>>t;
	cout<<t<<s;
	return 0;
}


Measured memory_bytes: 3328
#include <iostream>
#include <set>

using namespace std;

int main() {
	long long h, w, n;
	long long ans[10] = {};

	cin >> h >> w >> n;
	ans[0] = (h - 2) * (w - 2);

	set<pair<int, int>> s;
	while (n--) {
		int a, b;
		cin >> a >> b;
		a--; b--;
		s.insert(make_pair(a, b));

		for (int i = -1; i <= 1; i++)
			for (int j = -1; j <= 1; j++)
				if (a + i - 1 >= 0 && a + i + 1 < h && b + j - 1 >= 0 && b + j + 1 < w) {
					int cnt = 0;
					for (int k = -1; k <= 1; k++)
						for (int l = -1; l <= 1; l++)
							cnt += s.find(make_pair(a + i + k, b + j + l)) != s.end();
					ans[cnt - 1]--;
					ans[cnt]++;
				}
	}

	for (int i = 0; i < 10; i++)
		cout << ans[i] << endl;

	return 0;
}


Measured memory_bytes: 4992
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvvl vector<vvl>
#define vvl vector<vector<ll>>
#define VV(a, b, c, d) vector<vector<d>>(a, vector<d>(b, c))
#define VVV(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

int main(int argc, char const *argv[]) {
  ll x;std::cin >> x;
  ll y = x-400;
  ll z = y/200;
  std::cout << 8 - z << '\n';
  return 0;
}


Measured memory_bytes: 3168
#include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<deque>
using namespace std;

int main() {

    int a, b;
    while(cin >> a >> b) {
        int cross[101];
        for(int i = 0; i <= 100; i++) {
            cross[i] = 0;
        }
        cross[a] += 1;
        cross[b] += 1;
        while(cin >> a >> b) {
            if ( a == 0 && b == 0 ) {
                int odds = 0;
                for(int i = 1; i <= 100; i++) {
                    if (cross[i] % 2 == 1)  odds += 1;
                }
                if (odds == 2 && cross[1] % 2 == 1 && cross[2] % 2 == 1) cout << "OK" << endl;
                else    cout << "NG" << endl;

                break;
            } else {
                cross[a] += 1;
                cross[b] += 1;
            }

        }
    }
     
    return 0;

}

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

int main(){
    int n,ans =0;
    cin >> n;
    VI d(n);
    for(int i=0; i<n; ++i)cin >> d[i];

    for(int i=0; i<n-1; ++i){
        for(int j=i+1; j<n; ++j){
            ans += d[i] * d[j];
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
N = int(input())
routes = [(0,0,0)]
append = routes.append
for _ in range(0, N):
    t, x, y = map(int, input().split())
    append((t, x, y))
for i in range(1, N+1):
    bt, bx, by = routes[i-1]
    t, x, y = routes[i]
    ct = t - bt
    # xだけで考える。yとxは独立させて考えて問題ない。両方が成立しなければ成立しないため。
    cx = abs(x - bx)
    cy = abs(y - by)
    if cx > ct or cy > ct:
        print ("No")
        exit()
    if (cx+cy) % 2 != ct % 2:
        print ("No")
        exit()
print ("Yes")

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

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define MOD 1000000007
#define el endl
typedef long long ll;

int main() {
    int a,b;
    cin >> a >> b;
    int ans[3] = {1, 2, 3};
    ans[a-1] = 0;
    ans[b-1] = 0;
    rep(i, 3){
        if(ans[i] != 0) cout << ans[i] << endl;
    }
}


Measured memory_bytes: 256
# 優先度付きキューを用いないと速度的に無理
module Color
  WHITE = 0
  GRAY = 1
  BLACK = 2
end

def bfs(s)
  d = Array.new($n, Float::INFINITY)
  q = []
  q << s
  d[s] = 0
  while !q.empty? do
    u = q.shift
    $g[u].each do | edge |
      t = edge[0]
      if d[t] == Float::INFINITY
        d[t] = d[u] + edge[1]
        q << t
      end
    end
  end
  d
end

$n = gets.to_i
$g = Array.new($n) { [] }
($n-1).times do |i|
  s, t, w = gets.split.map(&:to_i)
  $g[s] << [t, w]
  $g[t] << [s, w]
end


d = bfs(0)
maxv = 0
tgt = 0
d.each_with_index do | v, i |
  if v == Float::INFINITY
    next
  end
  if maxv < v
    maxv = v
    tgt = i
  end
end

d = bfs(tgt)
maxv = 0
d.each do |v|
  if v == Float::INFINITY
    next
  end
  if maxv < v
    maxv = v
  end
end
puts maxv


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

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;A++)

using namespace std;

/////////////////////////////////////////////////////

ll N,A[101010],B[101010];
vector<ll> sa;
ll i,j,k,l,ans;
int main(){
    scanf("%lld",&N);
    fornum(i,0,N){
        scanf("%lld",&A[i]);
        
    }
    fornum(i,0,N){
        scanf("%lld",&B[i]);
        sa.push_back(A[i]-B[i]);
    }
    fornum(i,0,N){
        j+=sa[i];
    }
    if(j<0){
        printf("-1");
        return 0;
    }
    sort(sa.begin(),sa.end());
    l=0;
    fornum(i,0,N){
        if(sa[i]>=0)
            break;
        ans++;
        l+=sa[i];
        //printf("%lld ",sa[i]);
    }
    for(i=N-1;i>=0;i--){
        if(sa[i]<=0||l>=0)
            break;
        ans++;
        l+=sa[i];
        //printf("%lld ",l);
    }
    printf("%lld",ans);
    return 0;
}

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

int main()
{
    int n,num_4=0,num_2=0,num_no=0;
    cin>>n;
    int x;
    for(int i=0;i<n;i++)
    {
        cin>>x;
        if(x%4==0)
            num_4++;
        else
            if(x%2==0)
                num_2++;
            else
                num_no++;

    }
    if(num_2 )
        num_no++;
    if(num_4+1>=num_no)
        cout<<"Yes";
    else
        cout<<"No";

    return 0;

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <stdio.h>
#include <math.h>
using namespace std;
using vi = vector<int>;
using vll = vector<long long int>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<long long int>>;
using ll = long long int;

int main(){
    ll N; cin >> N;
    vll D(N); 
    for(int i=0; i<N; i++){
        cin >> D[i];
    }
    ll M; cin >> M;
    vll T(M);
    for(int i=0; i<M; i++){
        cin >> T[i];
    }
    sort(D.begin(),D.end());
    sort(T.begin(),T.end());
    ll d = 0;
    map<ll, ll> m;
    map<ll, ll> n;
    vll s(0);
    for(int i=0; i<M; i++){
        if(m.find(T[i]) == m.end()){
            m[T[i]] = 1;
            s.emplace_back(T[i]);
        }else{
            m[T[i]]++;
        }
    }
    for(int i=0; i<N; i++){
        if(n.find(D[i]) == n.end()){
            n[D[i]] = 1;       
        }else{
            n[D[i]]++;
        }
    }
    bool t = true;
    for(auto x: s){
        if(n.find(x) == n.end()){
            t = false;
        }else if(m[x] > n[x]){
            t = false;
        }
    }
    if(t){cout << "YES";}
    else{cout << "NO";}
}

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

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s;
    cin>>s;
    int ans =0;
    int temp=0;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='A' || s[i]=='C' || s[i]=='G' || s[i]=='T')
        {
            temp++;
            if(i==s.size()-1)
            {
            cout<<max(ans,temp)<<"\n";
            return 0;
            }
        }
        else
        {
            ans=max(ans,temp);
            temp=0;
        }
    }
    cout<<ans<<"\n";
    
}

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

typedef long long ll;

int main()
{
    string s;
    cin >> s;

    if(((s[0] == s[1]) && (s[2] == s[3]) && (s[0] != s[2]))||
    ((s[0] == s[2]) && (s[1] == s[3]) && (s[0] != s[1]))||
    ((s[0] == s[3]) && (s[1] == s[2]) && (s[0] != s[1]))){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}



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

using namespace std;

const int h=12;
const int w=12;

string field[12];
bool passed[12][12];
int cnt;

const int dy[]={-1,0,0,1};
const int dx[]={0,-1,1,0};

void dfs(int y,int x){
	if(passed[y][x]){
		return;
	}
	passed[y][x]=true;
	for(int i = 0; i < 4; i++){
		int nx,ny;
		nx=x+dx[i];
		ny=y+dy[i];
		if(nx>=0&&ny>=0&&nx<w&&ny<h&&!passed[ny][nx]&&field[ny][nx]!='0')
			dfs(ny,nx);
	}
}

int main(){

	while(1){
		cnt=0;
		for(int i = 0; i < h; i++){
			field[i].clear();
			if(cin.eof())
				return 0;
			cin>>field[i];
			for(int j = 0; j < w; j++)
				passed[i][j]=false;
		}
		for(int i = 0; i < h; i++){
			for(int j = 0; j < w; j++){
				if(!passed[i][j]&&field[i][j]!='0'){
					cnt++;
					dfs(i,j);
				}
			}
		}
		cout<<cnt<<endl;
	}

	return 0;
}

Measured memory_bytes: 0
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String[] s=br.readLine().split(" ");
        long a=Long.parseLong(s[0].trim());
        long b=Long.parseLong(s[1].trim());
        long c=Long.parseLong(s[2].trim());
        long d=Long.parseLong(s[3].trim());
        long res=Math.max(Math.max(a*c,a*d),Math.max(b*c,b*d));
        System.out.println(res);


    }



}


Measured memory_bytes: 32724
/*
 * Author: Anmol Choudhary
 */
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define rep0(a,b) for(int a=0;a<b;a++)
#define rep1(a,b) for(int a=1;a<=b;a++)
#define repp(a,b,c) for(int a=b;a<c;a++)
#define in insert
#define len length()
#define si size()
#define lb lower_bound
#define ub upper_bound
#define beg begin()
#define en end()
#define f first
#define s second
#define pr(a) cout<<a
#define pr2(a,b) cout<<a<<" "<<b<<"\n"
#define nextl cout<<"\n"
#define deb(x) cout<<#x<<"="<<x<<"\n"
#define deb2(x,y) cout<<"["<<#x<<"="<<x<<"] , ["<<#y<<"="<<y<<"]"<<"\n"
const ll mod = 1000000007;
const ll maxn = 100005;
const ll mm = 1e+18;
ll power(ll x, ll y)
{
    ll res = 1;
    x = x % mod;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % mod;
        y = y>>1;
        x = (x*x) % mod;
    }
    return res;
}
void solve()
{
    int n;
    cin>>n;
    ll arr[n];
    rep0(i,n) cin>>arr[i];
    ll mi=mod;
    ll an=0;
    rep0(i,n){
        if(arr[i]<mi){
            an++;
            mi=arr[i];
        }
    }
    pr(an);
}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t=1;
    //cin>>t;
    while(t--){
        solve();
        //nextl;
    }
    return 0;
}


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

#define ed cout << "\n";
#define speed                         \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL);
#define ll long long
#define ffor(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i)
#define rep(i, n) ffor(i, 0, n)
#define All(obj) (obj).begin(), (obj).end()
#define INF ((ll)1e9 + 7)
#define c(a) cout << a << "\n";
using namespace std;
const int N = 100005;

int main()
{
    speed;
    cout << fixed << setprecision(6);
    /*start*/
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i, n) cin >> a[i];
    sort(All(a));
    int Alice = 0;
    int Bob = 0;
    rep(i, n)
    {
        if (i % 2 == 0)
        {
            Alice += a.back();
            a.pop_back();
        }
        else
        {
            Bob += a.back();
            a.pop_back();
        }
    }
    //c(Alice);
    //c(Bob);
    c(Alice - Bob);
    return 0;
}

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

using namespace std;

int main() {
  string s;
  cin >> s;
  int cnt_small = 0;
  int cnt_C = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] >= 'a' && s[i] <= 'z') cnt_small++;
    if (i >= 2 && i < s.size() - 1 && s[i] == 'C') cnt_C++;
  }
  if (s.front() == 'A' && cnt_C == 1 && cnt_small + 2 == s.size()) cout << "AC" << endl;
  else cout << "WA" << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <bitset>

using namespace std;

typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

const ll SIZE = 1e5 * 2 + 10, INF = 1e9 + 10, MOD = 1e9 + 7;

ll binpow (ll a, ll n, ll md) {
	if (n == 0)
		return 1;
	if (n % 2 == 1)
		return (binpow(a, n-1, md) * a) % md;
	else {
		ll b = binpow(a, n/2, md);
		return (b * b) % md;
	}
}

ll bts(ll vl) {
    ll ret = 0;
    for (ll i = 60; i >= 0; i--) {
        if ((vl >> i) & 1) ret++;
    }
    return ret;
}
int main()
{
    fastInp;

    ll n;
    string s;
    cin >> n;
    cin >> s;
    vector<pair<ll, ll>> vals;
    vector<ll> sm(2);

    ll cnt = 0;
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == '1') cnt++;
    }

    if (cnt == 0) {
        for (int i = 0; i < n; i++) {
            cout << "1\n";
        }
        return 0;
    }
    

    vals.resize(n);
    for (int i = 0; i < s.size(); i++) {
        ll vl1 = 0, vl2 = 0;
        if (s[i] == '1') {
            if (cnt + 1 >= 1) vl1 = binpow(2, s.size() - i - 1, cnt + 1);
            if (cnt - 1 >= 1) vl2 = binpow(2, s.size() - i - 1, cnt - 1);
        }
        vals[i].first = vl1;
        vals[i].second = vl2;
        sm[0] += vl1;
        sm[1] += vl2;
        if (cnt + 1 >= 1) sm[0] %= cnt + 1;
        if (cnt - 1 >= 1) sm[1] %= cnt - 1;
    }

    //cerr << sm[0] << " " << sm[1] << "\n";
    for (int i = 0; i < s.size(); i++) {
        //cerr << vals[i].first << " " << vals[i].second << "\n";
        if (cnt == 1) {
            if (s[i] == '0') {
                ll vl = 0, c = 1;
                vl = (sm[0] + binpow(2, s.size() - i - 1, cnt + 1) + cnt + 1) % (cnt + 1);
                while (vl > 0) {
                    vl = vl % bts(vl);
                    c++;
                }
                cout << c << "\n";
            } else {
                cout << "0\n";
            }

            continue;
        }
        ll vl = 0, c = 1;
        if (s[i] == '0') {
            vl = (sm[0] + binpow(2, s.size() - i - 1, cnt + 1) + cnt + 1) % (cnt + 1);
        } else {
            vl = (sm[1] - binpow(2, s.size() - i - 1, cnt - 1) + cnt - 1 + cnt - 1) % (cnt - 1);
        }

        while (vl > 0) {
            vl = vl % bts(vl);
            c++;
        }
        cout << c << "\n";
    }

    return 0;
}

Measured memory_bytes: 6708
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();
		int A = Integer.valueOf(W);

		W = in.readLine();
		int B = Integer.valueOf(W);
		int sum = A+B;

		System.out.println(6-sum);
	}
}


Measured memory_bytes: 21204
#include<bits/stdc++.h>
#define x first
#define y second
#define size(a) (ll)(a).size()

typedef long long ll;
typedef long double ld;

using namespace std;
int n;
string s, t;


int main()
{
    //ifstream cin("input.txt");
    //ofstream cout("output.txt");


    cin.tie(0);
    ios_base::sync_with_stdio(0);

    cin >> s >> t;

    n = size(s);

    vector<vector<int>> Next(n + 1, vector<int> (26, n));


    for (int i = n - 1; i >= 0; i--)
    {
        for (int j = 0; j < 26; j++)
        {
            Next[i][j] = Next[i + 1][j];
        }

        int num = (int)(s[i] - 'a');
        Next[i][num] = i;
    }

    ll ans = 0, cur_pos = 0;
    for (int i = 0; i < size(t); i++)
    {
        int num = (int)(t[i] - 'a');
        if (Next[cur_pos][num] == n)
        {
            ans += n - cur_pos;
            if (Next[0][num] == n)
            {
                ans = -1;
                break;
            }

            ans += Next[0][num];
            ans++;
            cur_pos = (Next[0][num] + 1) % n;
        }
        else
        {
            ans += Next[cur_pos][num] - cur_pos;
            ans++;
            cur_pos = (Next[cur_pos][num] + 1) % n;
        }


    }

    cout << ans  << "\n";


}


Measured memory_bytes: 13776
package main

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

type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextRuneSlice() []rune {
	return []rune(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func max(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m < i {
			m = i
		}
	}
	return m
}

func min(nums ...int) int {
	m := nums[0]
	for _, i := range nums {
		if m > i {
			m = i
		}
	}
	return m
}

func abs(x int) int {
	if x > 0 {
		return x
	}
	return -x
}

func pow(x, y int) int {
	res := 1
	for i := 0; i < y; i++ {
		res *= x
	}
	return res
}

func main() {
	sc := NewScanner()
	X, A := sc.nextInt(), sc.nextInt()
	if X < A {
		fmt.Println(0)
	} else {
		fmt.Println(10)
	}
}


Measured memory_bytes: 640
# input
n = int(input())

# process/output
if n%2 == 1 or n < 10:
    print(0)

else:
    # 5で割り切れる数を数える
    ans = 0
    i = 10
    while i <= n:
        ans += n//i
        i *= 5
    
    print(ans)


Measured memory_bytes: 2940
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll count(ll a, ll b, ll c){
    ll ans,tmp,r,x,bb,cc;
    bb=b; cc=c;
    x=b*c;
    if(b<c){
    tmp = b;
    b = c;
    c = tmp;
    }
    r = b % c;
    while(r!=0){
        b = c;
        c = r;
        r = b % c;
    }
    ans = a-(a/bb)-(a/cc)+(a/(x/c));
    return ans;
}


int main(){
ll a,b,c,d,ans;
cin >> a >> b >> c >> d;
ans = count(b,c,d) - count(a-1,c,d);
cout << ans << endl;
return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
int main(){
    int N;
    cin >> N;
    int64_t power = 1;
    int64_t big = 1e9 + 7;
    for(int i = 1;i < N+1;i++){
        power = power*i%big ;
    }
    cout << power << endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <stdlib.h>
#include <vector>

using namespace std;

struct UnionFind{
    vector<int> par;

    UnionFind(int N) : par(N){
        for(int i=0;i<N;i++)    par[i]=i;
    }

    int root(int x){
        if(par[x]==x)   return x;
        return par[x] = root(par[x]);
    }

    void unite(int x,int y){
        int rx=root(x);
        int ry=root(y);
        if(rx==ry)  return;
        par[rx]=ry;
    }
};

int main(){

    int N,M,count=0;
    cin>>N>>M;
    UnionFind tree(N);

    for(int i=0;i<M;i++){
        int A,B;
        cin>>A>>B;
        A--; B--;
        tree.unite(A,B);
    }
    for(int i=0;i<N;i++){
        if(tree.root(i)==i) count++;
    }

    cout<<count-1<<endl;
    return 0;
}

Measured memory_bytes: 3784
#include <stdio.h>

int main(){
	int x,y,z;
	
	while(1){
		scanf("%d %d\n",&x,&y);
		if(x == 0 && y == 0){
			break;
		}
		if(x>y) {
			printf("%d %d\n",y,x);
		}
		else {
			printf("%d %d\n",x,y);
		}
	}
	return 0;
}


Measured memory_bytes: 2104
parseInt(x) = parse(Int, x)
parseArray(x::Array{SubString{String}, 1}) = map(parseInt, x)

function main()
  n = readline() |> parseInt
  h = readline() |> split |> parseArray

  for i in n-1:-1:1
    if h[i]>h[i+1]
      h[i]-=1
    end
  end

  check() = begin
    for i in n-1:-1:1
      h[i] > h[i+1] && return false
    end
    true
  end

  (check() ? "Yes" : "No") |> println
end

main()


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

#include <iostream>
using namespace std;
int main() {
  uint64_t n;
  cin >> n;
  vector<uint64_t> p(n);
  for (auto& pi : p) {
    cin >> pi;
  }
  uint64_t cnt = 0;
  uint64_t min_p = p[0];
  for (size_t i = 0; i < n; i++) {
    if (p[i] <= min_p) {
      cnt++;
      min_p = p[i];
    }
  }
  cout << cnt << endl;

  return 0;
}


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

//#include "rubo.h"
//#define mp make_pair
//#define pb push_back
#define in int
#define ll long long
#define vc vector
#define SQ(j) (j)*(j)
//#define x first
//#define y second

//#define ld long double
#define dbl  long double
#define pll pair<long long,long long>
#define pii pair<int,int>
#define all(j) j.begin(), j.end()
#define loop(xxx, yyy) for(int xxx = 0; xxx < yyy; xxx++)
//#define printf(fmt, ...) (0)
//#define HOME
//#define y0 ngacaleiebinvoaeu
//#define y1 gnarpipipaigare
#define j1 adsfndnasfafoasp

#define db(x) cout << #x << " = " << x << endl
#define dbCont(x) cout << #x << ": "; for(auto shun: x) cout << shun << ' '; cout << endl;

typedef long double ld;

using namespace std;


const int N = 100+5;
const int MAXW= 100*1000+5;

int n,W;
int w[N];
ll v[N];

ll dp[N][MAXW];

int main() {
    cin >> n >> W;
    loop(i,n){
        cin >> w[i] >> v[i];
    }

    for(int i = 0; i < n; i++){
        for(int kw = 0; kw <= W; kw++){
            if(i == 0){
                if(w[i] <= kw) dp[i][kw] = v[i];
                else dp[i][kw] = 0;
            } else {
                dp[i][kw] = max(
                        dp[i-1][kw], // not take
                        kw-w[i] >= 0 ? dp[i-1][kw-w[i]] + v[i] : 0
                        );
            }
        }
    }


    cout << dp[n-1][W] << endl;



    return 0;
}


Measured memory_bytes: 80128
#include <bits/stdc++.h>
#define MAXS 20
using namespace std;

char s[MAXS];
int n;
bool flag;

int main() {
    scanf("%s", s + 1); n = strlen(s + 1);
    if (s[1] != 'A') {
        printf("WA");
        return 0;
    }
    for (register int i = 2; i <= n; ++i) {
        if (s[i] == 'C') {
            if (flag || i == 2 || i == n) {
                printf("WA");
                return 0;
            }
            flag = 1;
        }
        else if ((s[i] >= 'A' && s[i] <= 'Z')) {
            printf("WA");
            return 0;
        }
    }
    printf(flag ? "AC" : "WA");
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;

const ll INF=1000100010001000100;
ll dp[3001][3001][2];
ll a[3001];
int n;
ll dfs(int l,int r){
    int cur=abs(l+n-1-r);
    int b=cur&1;
    if(dp[l][r][b]!=INF) return dp[l][r][b];
    
    ll ret;
    if(cur&1){
        if(l==r) return dp[l][l][b]=-a[l];
        ret=dfs(l+1,r)-a[l];
        ret=min(ret,dfs(l,r-1)-a[r]);
    }
    else{
        if(l==r) return dp[l][l][b]=a[l];
        ret=dfs(l+1,r)+a[l];
        ret=max(ret,dfs(l,r-1)+a[r]);
    }
    return dp[l][r][b]=ret;
}
int main(){
    cin>>n;
    rep(i,n) cin>>a[i];
    rep(i,n)rep(j,n) dp[i][j][0]=INF,dp[i][j][1]=INF;
    cout<<dfs(0,n-1)<<endl;
    return 0;
}


Measured memory_bytes: 141184
// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	const inputLines = input.split("\n");
	const line0 = inputLines[0];

	const a = parseInt(line0, 10);
	const result = (30 <= a) ? "Yes" : "No";
	console.log(result);

	// tmp = input[1].split(" ");
	// //文字列から10進数に変換するときはparseIntを使います
	// var a = parseInt(input[0], 10);
	// var b = parseInt(tmp[0], 10);
	// var c = parseInt(tmp[1], 10);
	// var s = input[2];

	//出力
	// console.log('%d %s',a+b+c,s);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

// node index.js
// 1
// 2 3
// test
// (Ctrl + D)


Measured memory_bytes: 29740
#include <iostream>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <map>
#include <vector>

using namespace std;

int main(void) {
  int N;
  cin >> N;
  vector<string> A;
  map<string, int> m;
  string s;
  int p;
  string tmp1, tmp2;
  for (int i = 0; i < N; i++) {
    cin >> s >> p;
    p = 100 - p;
    tmp2 = "00" + to_string(p);
    reverse(tmp2.begin(), tmp2.end());
    tmp2 = tmp2.substr(0, 3);
    reverse(tmp2.begin(), tmp2.end());
    tmp1 = s + "_" + tmp2;
    A.push_back(tmp1);
    m[tmp1] = i + 1;
    //cout << tmp1 << endl;
  }
  sort(A.begin(), A.end());
  for (int i = 0; i < A.size(); i++) {
    cout << m[A[i]] << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FASTIO
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 = numeric_limits<int>::max();
constexpr ll L_INF = numeric_limits<ll>::max();

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

int main() {
#ifdef FASTIO
    cin.tie(0), cout.tie(0);
    ios::sync_with_stdio(false);
#endif
#ifdef FILEINPUT
    ifstream ifs("./in_out/input.txt");
    cin.rdbuf(ifs.rdbuf());
#endif

    Vl A(3);
    cin >> A[0] >> A[1] >> A[2];
    sort(A.begin(), A.end());

    ll d = A[2] - A[1];

    ll ans = d;
    A[1] += d;
    A[0] += d;

    if ((A[2] - A[0]) & 1) {
        ans += (A[2] - A[0] + 1) / 2;
        ans += 1;
    }
    else {
        ans += (A[2] - A[0]) / 2;
    }

    cout << ans << "\n";

    return 0;
}

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

int main(){
  int n=0;

  cin >> n;
  rep(i,n){
  	cout << "ACL";
  }
  return 0;
}

Measured memory_bytes: 3636